dispatch
CLAUDE.md3 starsChanged 11 days agoMITView on GitHub
Run npm run check with NODE_ENV unset. It runs the unit tests (npm run test) and then, as its last step, the tmux and wall-clock tests (npm run test:timing). Both steps run in the check slot of scripts/with-check-slot.mjs. test:timing runs each file in TIMING_FILES (scripts/run-tests.mjs) alone and runs a failed file one more time. A file that passes on its second run does not fail the check. When a new test starts a real tmux server or asserts on real…
In this repository3 other files it gives its agents.
- add-shadcn-componentSkill
- scaffold-backend-sliceSkill
- scaffold-moduleSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
16 rules. About 0 are common, 4 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Put each new frontend file in a route, a layer folder of src/web/modules/<feature>/ or a shared tier.
- Very specific: line 4
Use only these layer folders: views, containers, components, hooks, domain, queries.
- Distinctive: line 7
Call query and mutation hooks only in containers.
- Very specific: line 8
Keep components free of TanStack Query, TanStack Router and the HTTP client.
- Very specific: line 9
Keep domain files pure. Do not import React, and do not use fetch, window, document, localStorage or EventSource.
- Distinctive: line 10
Do not import a sibling module.
- Very specific: line 13
Add a primitive with npx shadcn@latest add.
- Very specific: line 15
Do not use the JSX style prop, except in components/ui/ files, modules/<feature>/components/dnd/ files, src/web/viewer/ files and …
- Very specific: line 16
Do not write a colour value outside src/web/styles/tokens.css.
- Very specific: line 19
Put a <subject>.test.ts file next to each non-test domain file and each *-queries.ts file.
- Very specific: line 25
Keep routes free of exec, tmux and git calls.
- Distinctive: line 26
Keep business logic in services, not in routes or handlers.
- Very specific: line 27
Do not read req or res in a service.
- Distinctive: line 28
Write board state only through the store.
- Very specific: line 30
Put a node:test file next to each new route, service and domain file.
- Very specific: line 32
Use bootstrap/ as the composition root.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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.
Files
Frontend agent rules
- Put each new frontend file in a route, a layer folder of
src/web/modules/<feature>/or a shared tier. - Use only these layer folders:
views,containers,components,hooks,domain,queries. - A route renders one view, or one shared layout component that gets module views as children. Keep business logic, JSX layout and data transforms out of routes.
- Get server data only in query files. Only query files import the HTTP client.
- Call query and mutation hooks only in containers.
- Keep components free of TanStack Query, TanStack Router and the HTTP client. Only query files and
http.tscallfetch. - Keep domain files pure. Do not import React, and do not use
fetch,window,document,localStorageorEventSource. - Do not import a sibling module. Compose modules in a route or a shared layout component.
- Export only views and
queryOptionsfactories from a moduleindex.ts. - Build UI from
src/web/components/ui/primitives, except the allowed custom families. - Add a primitive with
npx shadcn@latest add. Do not write a lookalike. - Change a primitive with a
cvavariant in its own file, or with an edit that "Primitive conventions" names. - Do not use the JSX
styleprop, except incomponents/ui/files,modules/<feature>/components/dnd/files,src/web/viewer/files andsrc/web/viewer-main.tsx(U4-13). Use Tailwind token classes. - Do not write a colour value outside
src/web/styles/tokens.css. - Show focus with an outline, not a ring or a box-shadow.
- Name
.tsxfiles in PascalCase, except incomponents/ui/and route files. Name.tsfiles in kebab-case. - Put a
<subject>.test.tsfile next to each non-test domain file and each*-queries.tsfile.
Backend agent rules
- Parse each route input with a zod schema in the route file.
- Throw a typed error from
services/domain/errors.ts. Do not callres.statuswith a 4xx or 5xx code. - Keep routes free of
exec, tmux and git calls. A new route file callsboardRepository, notboard.store.ts. - Keep business logic in services, not in routes or handlers.
- Do not read
reqorresin a service. - Write board state only through the store.
- Spawn a subprocess only through
adapters/exec.tsor a named exception incode-review-rules.md. - Put a
node:testfile next to each new route, service and domain file. - A file imports only from its own folder and from folders earlier in this list:
src/shared/,store/andsources/,adapters/,services/infra/,services/orchestration/,routes/.store/andsources/do not import each other, and among these folders onlyadapters/importssources/. A file inservices/domain/importssrc/shared/only; orchestration files and routes can import it. The one exception isadapters/image-proxy.ts, which importsservices/infra/config-holder.ts. - Use
bootstrap/as the composition root. It can import every folder. Onlybootstrap/index.tscallssetBoardRepository(store)in source code. A test can callsetBoardRepositoryto installfakeBoardRepository.
Check rule
Run npm run check with NODE_ENV unset. It runs the unit tests (npm run test) and then, as its last step, the tmux and wall-clock tests (npm run test:timing). Both steps run in the check slot of scripts/with-check-slot.mjs. test:timing runs each file in TIMING_FILES (scripts/run-tests.mjs) alone and runs a failed file one more time. A file that passes on its second run does not fail the check. When a new test starts a real tmux server or asserts on real elapsed time, add it to TIMING_FILES. To run one timing file, use node scripts/run-tests.mjs timing <file>.
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
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.

