agentleFS
bartstcbartstc/vite-ts-react-template/CLAUDE.md

vite-ts-react-template

CLAUDE.md122 starsChanged 4 months agoMITView on GitHub

React SPA built with Vite using feature slice architecture with clean architecture principles. TypeScript SPA. React 19, Vite 8, React Router 8, TanStack Query, Zustand, XState, Chakra UI, i18next. Testing: Vitest, Storybook, Playwright, MSW. Package manager: PNPM only. Path alias: @/* → src/. 1. Plan Mode Default 2. Self-Improvement Loop 3. Verification Before Done 4. Demand Elegance (Balanced) 5. Autonomous Bug Fixing 6. Spec-Driven Development

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When unsure about requirements or business logic, ask the developer — never assume

    line 25
  2. Distinctive:

    When multiple interpretations exist, present them — don't pick silently

    line 26
  3. Distinctive:

    Use git commands only when explicitly requested

    line 30
  4. Distinctive:

    Keep reports, options, and summaries extremely concise — prioritize information density

    line 31
  5. Distinctive:

    If something goes wrong, STOP and re-plan immediately — do not keep pushing

    line 38
  6. Distinctive:

    Use plan mode for verification steps, not just building

    line 40
  7. Very specific:

    After any correction, capture the pattern in specs/lessons.md and write a rule to prevent recurrence

    line 44
  8. Distinctive:

    Never mark a task complete without proving it works

    line 50
  9. Distinctive:

    Run tests, check logs, and demonstrate correctness

    line 51
  10. Distinctive:

    If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"

    line 56
  11. Distinctive:

    When given a bug report: just fix it

    line 61
  12. Distinctive:

    Use logs, errors, and failing tests to diagnose — require zero context switching from the developer

    line 62
  13. Distinctive:

    When implementing a spec, read the building-blocks skill rule file for each block in the Building Blocks Diff before writing code.

    line 67
  14. Distinctive:

    If a rule file is missing or ambiguous, raise the gap — do not substitute with codebase exploration

    line 68
  15. Very specific:

    Use AIDEV-NOTE:, AIDEV-TODO:, AIDEV-QUESTION: anchors near non-trivial code (exception to no-comments rule)

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Project

React SPA built with Vite using feature slice architecture with clean architecture principles.

Stack

TypeScript SPA. React 19, Vite 8, React Router 8, TanStack Query, Zustand, XState, Chakra UI, i18next. Testing: Vitest, Storybook, Playwright, MSW.

Commands

  • pnpm dev — start dev server (port 5173)
  • pnpm dev:all — start both frontend (port 5173) and local API server (port 3001)
  • pnpm typecheck — type-check all sources (src, e2e, stories, tests)
  • pnpm lint --fix — lint and auto-fix
  • pnpm test — all tests (unit + storybook)
  • pnpm test:e2e — Playwright E2E (headless)
  • pnpm storybook — component dev (port 6006)

Package manager: PNPM only. Path alias: @/* → src/.

Core Principles

  • Simplicity first — make every change as simple as possible, minimize code impact, choose the boring solution
  • Surgical changes — touch only what the task requires; don't refactor, reformat, or "improve" adjacent code. Remove only the orphans your own changes create
  • When unsure about requirements or business logic, ask the developer — never assume
  • When multiple interpretations exist, present them — don't pick silently
  • For changes >300 LOC or >3 files, ask for confirmation before proceeding
  • Stay within current task context; inform dev if fresh start needed
  • Modify API contracts only with explicit approval
  • Use git commands only when explicitly requested
  • Keep reports, options, and summaries extremely concise — prioritize information density

Workflow

1. Plan Mode Default

  • Enter plan mode for any non-trivial task (3+ steps or architectural decisions)
  • If something goes wrong, STOP and re-plan immediately — do not keep pushing
  • For complex features, write or request a spec before implementation
  • Use plan mode for verification steps, not just building

2. Self-Improvement Loop

  • After any correction, capture the pattern in specs/lessons.md and write a rule to prevent recurrence
  • Review specs/lessons.md at the start of each session
  • Ruthlessly iterate on lessons until the mistake rate drops

3. Verification Before Done

  • Never mark a task complete without proving it works
  • Run tests, check logs, and demonstrate correctness

4. Demand Elegance (Balanced)

  • For non-trivial changes, ask: "Is there a more elegant solution?"
  • If a fix feels hacky: "Knowing everything I know now, implement the elegant solution"
  • Skip this for simple fixes — do not over-engineer

5. Autonomous Bug Fixing

  • When given a bug report: just fix it
  • Use logs, errors, and failing tests to diagnose — require zero context switching from the developer

6. Spec-Driven Development

  • For features spanning 5+ files or 5+ unconstrained decisions, write a spec first using writing-spec skill
  • When implementing a spec, read the building-blocks skill rule file for each block in the Building Blocks Diff before writing code. That is the canonical pattern — do not explore existing files to reverse-engineer patterns. Only read existing files for integration points (imports, symbols, types)
  • If a rule file is missing or ambiguous, raise the gap — do not substitute with codebase exploration
  • Skip when the developer opts out

Conventions

  • Use AIDEV-NOTE:, AIDEV-TODO:, AIDEV-QUESTION: anchors near non-trivial code (exception to no-comments rule)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.