Repository navigation
docs: split AGENTS.md into directory-scoped rule files - #1035
Conversation
Rules whose triggering file lives in one tree move verbatim to that tree's AGENTS.md, with a sibling CLAUDE.md (@AGENTS.md) for Claude Code. The root keeps cross-cutting rules and an index of the scoped files. Refs #1034
… the index Astra review of #1035: #775, #776 and #277 can be triggered outside the tree they moved to, so they return to the root. #417 and the release boundary stay scoped with their extra paths listed in the index. #505 joins the persistence rules. tools/simulation/AGENTS.md is now empty and removed. Refs #1034
ebd4e3a to
55bcbc7
Compare
|
Review round 1: Codex
I also took the reviewer's suggested index wording: each entry lists explicit trigger paths, and one read instruction applies to every harness. The reviewer could not refute rule preservation, link resolution, the guards or in-tree discovery. Verification at |
Application shape, data and tenancy, auth, boot guards, the one-shot verbs and callers, and the single serving instance move verbatim to src/AGENTS.md, routed from src/**, tests/**, Dockerfile, deploy/** and .editorconfig. The root keeps cross-cutting rules: layout, build/test, browser tests and screenshots, secrets, host-agnostic, writing a guard, CI gates, Git/PR, phase context and graphify. Decision-record pointers, anchors and RenameAccountDocsTests follow the moved rules. Refs #1034
|
Rule-following probe at Each run started in the PR worktree, so it loaded only this branch's root
All 6 runs found the right scoped files through the root index alone. The only miss was a detail inside a rule the model had already opened, not a failure to find the rule. Raw runs and the runner are in |
|
Review round 2: Codex
Verification at That makes two review rounds. Both found real routing defects and no product defects (this is a docs PR). Per the owner's loop rule, I am not triggering a third round. The owner decides whether to merge. |
TL;DR
This PR moves rules that apply only to a few paths out of the root
AGENTS.mdand into scopedAGENTS.mdfiles. The root drops from 80.4 KB to 26.9 KB (67%), and every session loads it. No rule text changes. A script checked that every non-blank line of the old root appears exactly once across the new files.Closes #1034
Design
CLAUDE.md(root,@AGENTS.md).src/**,tests/**,tools/simulation/**,Dockerfile,deploy/**,.editorconfig,Directory.Build.propssrc/AGENTS.mdweb/**web/AGENTS.mdsrc/Cluckwork.Infrastructure/Persistence/**,docs/schema/**,tools/schema-docs/**src/Cluckwork.Infrastructure/Persistence/AGENTS.md.github/**,docs/releasing.md,deploy/**.github/AGENTS.mdruns-onlabels, the Releases and image publishing (#351) section including the canonical deploy-boundary paragraphStayed in the root on purpose: layout, build/test, secrets, host-agnostic, writing a guard, CI security gates, Git/PR, phase context, graphify, and a new Browser tests, screenshots and verification section (#277, UI screenshots, the
verifyskill). Also:tools/coverage/.web/too.How to review
8d2916f6is the move itself. Read only the root Scoped rule files section, the line-5 intro change and the scoped file headers. Everything else is moved text, with relative links re-prefixed for the new depth.2083d9adrepoints references to the new locations: decision-recordRule —pointers, the#releases-and-image-publishing-351anchors inSECURITY.mdanddocs/releasing.md, and comments in workflows andCODEOWNERS.f3c0014edrops the per-directoryCLAUDE.mdshims (owner: oneCLAUDE.md).55bcbc73applies the Codex Astra review: three rules return to the root, the index lists every trigger path, and chore(infra): do not partition AuditEvents by time — record why, and what to do instead #505 moves to Persistence.7a789c82moves the backend rules tosrc/AGENTS.md(owner request). It repoints about 40 decision-record pointers, theCONTRIBUTING.mdVersionanchor, the Background worker has no single-runner guarantee — double-runs if scaled >1 instance #271 anchor (which was broken before this PR), five live comments in workflows,deploy/and.specify, andRenameAccountDocsTests, which now readssrc/AGENTS.mdfor the CLI: rename-account verb to change a farm code (replaces the raw-SQL runbook path) #732 link.d247ea3fapplies Astra round 2: routesDirectory.Build.propsandtools/simulation/**, adds a Farm configuration and identity become Owner-only, matching spec §5.1 #729 note to theweb/**entry, returns Deploy: container/image hardening — non-root USER, pinned base digests, image vulnerability scan #267 to the root, fixes the chore(infra): do not partition AuditEvents by time — record why, and what to do instead #505 link and three stale references.Verification (head
d247ea3f, rebased ona71ec7af)### Migrations and schemaheading, and the screenshot rule's anchor.SchemaDocsTestsandSolutionTestProjectSplitTests: 5/5 passed.changed-paths.test.mjs: 16/16 passed.git diff --check: clean.This PR is not documentation-only under #782, because it adds
.mdfiles outside the root, sowebandimagerun.Not repointed: code comments in
tests/andsrc/that cite "AGENTS.md" generically. The root index resolves them, and editing about 24.csfiles only to change a comment is noise.