ci: refuse CLAUDE.md files by hook and keep every AGENTS.md out of the Collection tarball #244
Notifications
Due Date
No due date set.
Depends on
Reference: Mortis/Kamino#244
Reference in new issue
Block a user
Spec: Making sure an agent actually loads the guidance, decisions 1 and 7 of its resolution comment.
Blocked by docs(agents): replace CLAUDE.md with a root AGENTS.md: when this starts,
CLAUDE.mdis gone and the rootAGENTS.mdis already ingalaxy.ymlbuild_ignore.What to build
CLAUDE.md. Add a local hook to.pre-commit-config.yaml:language: fail,files: (^|/)(\.claude/)?CLAUDE(\.local)?\.md$, stagepre-commit, with a one-line entry message explaining that any such file makes Claude Code ignore everyAGENTS.md. Lint runs it like every other hook. No script.apm compile(targetclaude), a tool's project init or a skill can create one, and the failure is silent: the agent gets no guidance and no error.build_ignore. Check thatAGENTS.mdandroles/AGENTS.mdare ingalaxy.ymlbuild_ignore(#185 and the roles/AGENTS.md issue #181 add them) and add whichever is missing.CLAUDE.mdis no longer listed.AGENTS.mdout of the tarball. Add aFORBIDDENpattern inscripts/check_tarball.pythat refusesAGENTS.mdat any depth (so a futureroles/<role>/AGENTS.mdfails the Build). Add a test case for it in the script's tests.Acceptance
CLAUDE.md,.claude/CLAUDE.md,CLAUDE.local.mdorroles/x/CLAUDE.mdfails the hook;docs/CLAUDE-notes.mddoes not.ansible-galaxy collection buildwith aroles/AGENTS.mdpresent produces a tarball without it, andcheck_tarball.pyfails on a tarball that contains one.Notes
.pre-commit-config.yamlis an image input: the two-PR loop applies.Body edited on 2026-11-20 (final validation round of the map, #87 (comment)): removed the note that this issue waits for #165; that edge was removed, and it is blocked only by #185.
Final validation round, second pass (2026-11-20): body edited.
CLAUDE.mdstill exists at the root when this lands, coordinate with #185": #244 is blocked by #185, soCLAUDE.mdis gone and rootAGENTS.mdis inbuild_ignorewhen this starts.build_ignoreitem is now "check thatAGENTS.mdandroles/AGENTS.mdare inbuild_ignoreand add whichever is missing";CLAUDE.mdis no longer listed. Hook andFORBIDDENpattern work unchanged.