.pre-commit-config.yaml: a local refuse-claude-md hook (language: fail, files: (^|/)(\.claude/)?CLAUDE(\.local)?\.md$, stage pre-commit). Any CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md makes Claude Code ignore every AGENTS.md, silently; Lint runs the hook through pre-commit run --all-files.
.gitea/workflows/image.yml: ci image 0.2.36 → 0.2.37, because .pre-commit-config.yaml is an image input (main took 0.2.36 for its own hook bump). The digest-pin pull request follows after the image builds.
scripts/check_tarball.py: */agents.md in FORBIDDEN (compared case-folded), so an AGENTS.md under any directory fails the Build; a root AGENTS.md was already refused by ALLOWED_TOP. Test added in tests/scripts/test_check_tarball.py.
galaxy.yml: unchanged. AGENTS.md and roles/AGENTS.md are already in build_ignore, and CLAUDE.md is no longer listed.
No changelog fragment: no consumer-visible change.
Verified
New test failed first (0 != 1 : roles/AGENTS.md), then passed with the pattern.
python3 -m unittest discover -s tests/scripts: all pass on a copy of the tracked files. In the working clone test_real_build_passes fails on an untracked, git-ignored local directory and fails identically on main; unrelated to this change.
pre-commit run refuse-claude-md --files …: fails on CLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, roles/x/CLAUDE.md, .claude/CLAUDE.local.md; skips docs/CLAUDE-notes.md.
A real ansible-galaxy collection build with roles/AGENTS.md in the tree leaves it out of the tarball, and check_tarball.py passes it.
pre-commit run --all-files passes; check_image_versions.py bump origin/main and pins print ok after the merge of main; pre-push ansible-test sanity passed.
CI on the first head: Lint, Build and Molecule passed (Lint).
Not verified
The 0.2.37 ci image build after merge; the follow-up digest-pin pull request.
The hook is case-sensitive, as the spec's regex is: a claude.md or CLAUDE.MD passes it. Whether Claude Code reads such a name on a case-insensitive file system was not checked.
I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.
Assisted-by: Claude Code
## What and why
Closes #244
- **`.pre-commit-config.yaml`**: a local `refuse-claude-md` hook (`language: fail`, `files: (^|/)(\.claude/)?CLAUDE(\.local)?\.md$`, stage `pre-commit`). Any `CLAUDE.md`, `.claude/CLAUDE.md` or `CLAUDE.local.md` makes Claude Code ignore every `AGENTS.md`, silently; Lint runs the hook through `pre-commit run --all-files`.
- **`.gitea/workflows/image.yml`**: `ci` image 0.2.36 → 0.2.37, because `.pre-commit-config.yaml` is an image input (`main` took 0.2.36 for its own hook bump). The digest-pin pull request follows after the image builds.
- **`scripts/check_tarball.py`**: `*/agents.md` in `FORBIDDEN` (compared case-folded), so an `AGENTS.md` under any directory fails the Build; a root `AGENTS.md` was already refused by `ALLOWED_TOP`. Test added in `tests/scripts/test_check_tarball.py`.
- **`galaxy.yml`**: unchanged. `AGENTS.md` and `roles/AGENTS.md` are already in `build_ignore`, and `CLAUDE.md` is no longer listed.
- No changelog fragment: no consumer-visible change.
## Verified
- New test failed first (`0 != 1 : roles/AGENTS.md`), then passed with the pattern.
- `python3 -m unittest discover -s tests/scripts`: all pass on a copy of the tracked files. In the working clone `test_real_build_passes` fails on an untracked, git-ignored local directory and fails identically on `main`; unrelated to this change.
- `pre-commit run refuse-claude-md --files …`: fails on `CLAUDE.md`, `.claude/CLAUDE.md`, `CLAUDE.local.md`, `roles/x/CLAUDE.md`, `.claude/CLAUDE.local.md`; skips `docs/CLAUDE-notes.md`.
- A real `ansible-galaxy collection build` with `roles/AGENTS.md` in the tree leaves it out of the tarball, and `check_tarball.py` passes it.
- `pre-commit run --all-files` passes; `check_image_versions.py bump origin/main` and `pins` print ok after the merge of `main`; pre-push `ansible-test sanity` passed.
- CI on the first head: Lint, Build and Molecule passed ([Lint](https://git.rkdr.net/Mortis/Kamino/actions/runs/5137)).
## Not verified
- The 0.2.37 `ci` image build after merge; the follow-up digest-pin pull request.
- The hook is case-sensitive, as the spec's regex is: a `claude.md` or `CLAUDE.MD` passes it. Whether Claude Code reads such a name on a case-insensitive file system was not checked.
---
- [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none.
Assisted-by: Claude Code
Claude
added this to the Open to contributors milestone 2026-11-23 19:20:26 +00:00
Defame1297
was assigned by Claude2026-11-23 19:20:26 +00:00
Claude Code reads CLAUDE.md in place of AGENTS.md, so a stray CLAUDE.md,
CLAUDE.local.md or .claude/CLAUDE.md at any depth leaves an agent without
this repository's guidance, and nothing reports it. A language: fail hook
refuses such a file at commit time.
Refs: #244
Assisted-by: Claude Code
An AGENTS.md under roles/ holds contributor rules; shipped in the
Collection, a consumer's agent reading an installed role would load
them. galaxy.yml build_ignore lists the current ones, and the archive
check now refuses any AGENTS.md, compared case-insensitively, as the
allow list behind that deny list. A root AGENTS.md was already refused
by ALLOWED_TOP.
Refs: #244
Assisted-by: Claude Code
CODEOWNERS rules
requested review from Defame1297 2026-11-23 19:20:26 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What and why
Closes #244
.pre-commit-config.yaml: a localrefuse-claude-mdhook (language: fail,files: (^|/)(\.claude/)?CLAUDE(\.local)?\.md$, stagepre-commit). AnyCLAUDE.md,.claude/CLAUDE.mdorCLAUDE.local.mdmakes Claude Code ignore everyAGENTS.md, silently; Lint runs the hook throughpre-commit run --all-files..gitea/workflows/image.yml:ciimage 0.2.36 → 0.2.37, because.pre-commit-config.yamlis an image input (maintook 0.2.36 for its own hook bump). The digest-pin pull request follows after the image builds.scripts/check_tarball.py:*/agents.mdinFORBIDDEN(compared case-folded), so anAGENTS.mdunder any directory fails the Build; a rootAGENTS.mdwas already refused byALLOWED_TOP. Test added intests/scripts/test_check_tarball.py.galaxy.yml: unchanged.AGENTS.mdandroles/AGENTS.mdare already inbuild_ignore, andCLAUDE.mdis no longer listed.Verified
0 != 1 : roles/AGENTS.md), then passed with the pattern.python3 -m unittest discover -s tests/scripts: all pass on a copy of the tracked files. In the working clonetest_real_build_passesfails on an untracked, git-ignored local directory and fails identically onmain; unrelated to this change.pre-commit run refuse-claude-md --files …: fails onCLAUDE.md,.claude/CLAUDE.md,CLAUDE.local.md,roles/x/CLAUDE.md,.claude/CLAUDE.local.md; skipsdocs/CLAUDE-notes.md.ansible-galaxy collection buildwithroles/AGENTS.mdin the tree leaves it out of the tarball, andcheck_tarball.pypasses it.pre-commit run --all-filespasses;check_image_versions.py bump origin/mainandpinsprint ok after the merge ofmain; pre-pushansible-test sanitypassed.Not verified
ciimage build after merge; the follow-up digest-pin pull request.claude.mdorCLAUDE.MDpasses it. Whether Claude Code reads such a name on a case-insensitive file system was not checked.NOTICEandREUSE.toml, or there is none.Assisted-by: Claude Code
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings