Repository navigation
fix(ci): allowlist .claude/ in the structure lint - #59
Merged
Merged
Conversation
Commit 498e1a8 added a tracked `.claude/` directory (the SessionStart hook and its settings.json) without adding it to `ALLOWED_TOP_DIRS` in scripts/validate_structure.py, so `make validate-structure` reports ERROR: unexpected top-level directory: .claude/ on main. That fails both `make validate` and `make test` (via tests/test_validate_structure.py::test_actual_repository_layout_is_valid), which is every leg of validate.yml — so main is red and any PR opened against it is red on arrival. `.claude/` is agent tooling, not content, and belongs beside `.git`/ `.github` in the allowlist rather than under wiki/ or bibliography/. Verified locally: `make validate` and `python -m pytest tests/ -q` (69 passed) both green with this change, both red without it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UoUmRWL7vsdd2N57DmgUvh
Jammy2211
pushed a commit
that referenced
this pull request
Aug 25, 2026
main landed the same .claude/ allowlist fix in #59 (93a0b6b) while this branch was in flight. Same one-line change, different comment wording — resolved in main's favour, so 05aa803 here now contributes nothing and the file is byte-identical to main. Kept as a merge rather than a rebase: the branch is pushed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ex9YARe5kDjsT3Ug7LKQ1r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One line in
scripts/validate_structure.py:Why
mainis red. Commit 498e1a8 added a tracked.claude/directory (hooks/session-start.sh,settings.json) without adding it toALLOWED_TOP_DIRS, so the structure lint reports:One root cause, both legs of
validate.yml:make validate→validate-structureexits 1make test→tests/test_validate_structure.py::test_actual_repository_layout_is_valid, which asserts the live repo layout validatesSo every PR opened against
mainwas red on arrival, regardless of its contents..claude/is agent tooling, not knowledge content — it belongs beside.git/.githubin the allowlist rather than being relocated underwiki/orbibliography/, which are the two content homes the lint exists to protect.Verification
Locally, on this branch:
make validate→ "Repository structure is valid."python -m pytest tests/ -q→ 69 passedBoth red without the change, green with it.
Scope
Deliberately one line.
.claude/is a generated artifact — per 498e1a8's own message the hook's canonical source isPyAutoMind/policy/session_start_hook.sh, installed byPyAutoMind/scripts/repos_sync.py. I checked PyAutoMind and PyAutoBrain for a template copy ofvalidate_structure.pycarrying the same allowlist; there is none, so this is a genuine single-site fix with no template drift following from it.Worth noting for later:
repos_synccan install.claude/into any repo without knowing about that repo's structure lint. PyAutoMemory is the only one that has such a lint today, which is why it is the only one that broke.Generated by Claude Code