# AGENTS.md Patterns Use only sections supported by repository evidence. Prefer a short accurate file over a comprehensive-looking template. ## Repository Root ```markdown # Repository guidance ## Commands - `npm ci` - Install the locked dependency set. - `npm run test:unit` - Run unit tests. - `npm run lint` - Check formatting and static rules. ## Architecture - `src/server.ts` - HTTP entry point. - `packages/payments/` - Payment domain package. ## Verification - Run the smallest relevant test during iteration. - Before handoff, run `npm run lint` and `npm run test:unit`. ``` ## Nested Additive Guidance Use nested `AGENTS.md` when local rules add to broader guidance. ```markdown # Payments package guidance ## Commands - `npm run test:payments` - Run payment-domain tests from the repository root. ## Gotchas - Payment fixtures use UTC timestamps; do not compare local-time strings. ``` ## Nested Override Use `AGENTS.override.md` only when same-directory standard guidance must be replaced. Broader parent guidance still remains earlier in the chain. ```markdown # Generated client override ## Editing - Do not hand-edit files under `src/generated/`. - Regenerate them with `npm run generate:client`. ## Verification - Run `npm run check:generated`. ``` ## Scope Rules - Put team-wide repository rules at the root. - Put subtree-only commands and constraints in the closest nested directory. - Put personal cross-repository preferences in Codex-home guidance only when the user explicitly requests global scope. - Avoid overrides for ordinary additive instructions.