Repository navigation
Agent docs: AGENTS.md everywhere - #1947
Conversation
Every folder guide moves from CLAUDE.md to AGENTS.md (git mv, content unchanged). Claude Code 2.1.277+ reads AGENTS.md natively, so the root CLAUDE.md import shim goes too. check-known-traps.py gains an agent-docs check: a CLAUDE.md may only be a bare @AGENTS.md stub next to an AGENTS.md. References in agent-context, check-doc-paths, preflight, test matrix, agent contract, Package.swift and build-deps excludes, deps staleness, docs, and code comments follow. Product code that skips CLAUDE.md in users' capture folders is unchanged.
A CLAUDE.local.md makes Claude Code skip AGENTS.md, so the check now fails on one anywhere on disk, and .gitignore stops calling it the place for personal notes. CLAUDE.md files come from git ls-files, so an untracked or vendored copy can't fail a local run that CI passes.
|
Review verdict on 9615ec2: nothing blocking. No runtime change (Swift edits are comments only), build excludes follow the rename, product code that skips Two low findings, both real, both fixed in b4283e6:
While fixing this, Checks on b4283e6: 🤖 Generated with Claude Code |
Standardizes on
AGENTS.mdas the only agent-doc filename.Native support: yes
AGENTS.mddirectly from v2.1.277 on, at launch for the working dir and above, and lazily for a subdirectory when Claude reads a file there. Same as nestedCLAUDE.md.AGENTS.mdwhen there's noCLAUDE.mdorCLAUDE.local.mdin the working dir or above. So a strayCLAUDE.mdmakes theAGENTS.mdnext to it silently disappear. That's why the new check exists.agents-mdplugin turned off, and sometimes the first session right after upgrading from 2.1.276 or older. Before 2.1.281 some Bedrock and telemetry-off sessions couldn't either. In any of those, add a local one-line@AGENTS.mdstub. The check allows that..claude/worktrees/sit inside the main checkout. If the main checkout is on an old branch that still has the rootCLAUDE.md, worktree sessions pick up that parent file. Pull main in the main checkout after this lands.So I deleted every
CLAUDE.mdinstead of leaving stubs.What changed
git mvof all 18Sources/**/CLAUDE.mdandTools/*/CLAUDE.mdtoAGENTS.mdin the same folder. Content didn't change except reference fixes. RootCLAUDE.md(just the@AGENTS.mdimport) is deleted.scripts/dev/check-known-traps.py: newagent-docscheck plus self-test. It fails on anyCLAUDE.mdthat isn't a bare@AGENTS.mdstub, or on a stub with noAGENTS.mdnext to it. SetCLAUDE_STUBS_REQUIRED = Trueand it also fails when a folder with anAGENTS.mdhas no stub. It already runs inlinux-checks.sh, so it's part ofcheck.sh quick.agent-context.py(nearest-guide lookup and self-test),check-doc-paths.py(budget and self-test),agent-preflight.sh,.agents/test-matrix.yml,.agents/agent-contract.json, the rootPackage.swiftandbuild-deps.shTranscriptedCore excludes,deps-staleness.shandbuild-beta.sh(they now skipAGENTS.mdas well asCLAUDE.md), rootAGENTS.md,docs/**,Tools/README.md,.claude/agents/*.md, the PR template, and doc pointers in Swift comments.CLAUDE.md/AGENT.mdin users' capture folders (scanners, the QA validator, and their tests). That's user-folder behavior, not repo docs. I also leftCHANGELOG.mdalone because it's history.Overlap
Sources/Support/CLAUDE.mdandSources/UI/CLAUDE.md. Keep runtime heartbeat preference reads off the main thread #1941 editsSources/Observability/CLAUDE.md. Git rename detection should carry their edits over to the new paths, but let CI check the merged result. Whichever lands second should check that noCLAUDE.mdcame back (the check will fail if one did)..agents/test-matrix.ymlandbuild-beta.sh, but in hunks that don't overlap with these.Checks
python3 scripts/dev/agent-context.py Sources/Meeting/MeetingSessionController.swiftlistsAGENTS.mdandSources/Meeting/AGENTS.mdbash check.sh quick: PASS (60/60)python3 scripts/dev/check-known-traps.py --self-testandcheck-doc-paths.py --self-test: passpython3 scripts/dev/check-source-pins.py --changed-only: passbash build-deps.sh --force+swift build(root package; Package.swift touched): passbuild.sh/run-tests.sh. The only Swift edits are comments.🤖 Generated with Claude Code