Skip to content

repos_sync: retire nested CLAUDE.md pointers, drop the temporary gate skip, keep Memory skills in spawn (#484) - #485

Merged
Jammy2211 merged 4 commits into
mainfrom
feature/retire-nested-claude-md-pointers
Oct 7, 2026
Merged

Jammy2211 merged 4 commits into
mainfrom
feature/retire-nested-claude-md-pointers

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Closes #484. Finishes the CLAUDE.md retirement (#482/#483) inside PyAutoMind:

  • Gate skip removed. firewall_gate.yml loses the TEMPORARY pointer-leg skip, its banners and the "Assert PyAutoMind carries no CLAUDE.md" replacement step. The pointer leg runs normally on PR and push again. The gate's structure test is back to its pre-repos_sync: retire the CLAUDE.md → AGENTS.md pointer files (#482) #483 shape and the TEMPORARY tests are deleted.
  • Nested pointers are now in scope. check_claude_md_pointers / remove_claude_md_pointers (via stray_claude_mds) now also cover every tracked CLAUDE.md below a repo's root that sits beside an AGENTS.md. Discovery uses git ls-files only, so tmp/, output/ and .worktrees/ are never read, and a checkout that is not a git repo gets the root check only. The rule is unchanged: content-free pointers are removable, content-bearing files are reported as KEPT and never deleted, and a CLAUDE.md with no sibling AGENTS.md is neither reported nor touched. The leg name CLAUDE.md → AGENTS.md pointers is byte-identical (Heart's parser).
  • Nested pointer wordings recognised. Four nested pointer wordings found in the workspace were added to the exact-match CLAUDE_POINTER_BOILERPLATE list: the scripts/ folder, the literature sub-wiki, the Euclid sub-wiki and Shared instructions live in [AGENTS.md](AGENTS.md). Without them, 15 of the 16 real pointers would have been reported as content and kept. Matching stays exact, so any other wording is still content.
  • The propagation job stages nested deletions. session_hook_propagate.yml now stages every tracked CLAUDE.md the removal deleted (git ls-files --deleted -- CLAUDE.md '*/CLAUDE.md'), not just the root one. It is still dispatch-only and still honours dry_run. The header is updated, and the hand-cleanup list drops euclid_assistant (hand-cleaned in a39e35c).
  • Spawn rule (architect scope addition): Memory skills/** → KEEP verbatim. See below.

API Changes

None to any library API. These are internal organ tooling changes only:

  • repos_sync.stray_claude_mds now yields (label, path, is_pointer). label is the repo name for a root file and <repo>/<relpath> for a nested one.
  • New helper: repos_sync.tracked_nested_claude_mds(repo_dir).
  • CLAUDE_POINTER_BOILERPLATE gains four exact wordings.
  • spawn.MEMORY_RULES gains ("skills/*", "KEEP"), and the spec gains Memory rule 1c.

Spawn rule

The /spawn dry run exited 2 on two UNMATCHED Memory files, skills/catch_up/SKILL.md and skills/catch_up/catch_up.md, added by PyAutoMemory 047ec2b. Ruling: Memory skills/** is KEEP verbatim, mirroring the Mind table's rule 8. The change went into docs/pyautobrain/spawn_spec.md first (Memory rule 1c), then into MEMORY_RULES, placed after the pointer docs and before the .github rules. tests/test_spawn_template_contract.py::test_memory_skills_are_kept_verbatim asserts that both files are KEPT byte for byte. The canary scan still grades every kept file.

Dry run (python3 scripts/spawn.py from the workspace root) now exits 0:

== PyAutoMind-template
  unmatched: none
  canary scan: clean
== PyAutoMemory-template
  unmatched: none
  canary scan: clean

Test Plan

  • Mind suite (clean shell, no activate.sh): 693 passed
  • PyAutoHeart/tests/test_manifest_drift.py: 8 passed (the leg-name parser still matches)
  • New nested tests in tests/test_repos_sync_structure_lint.py: every nested wording counts as a pointer, and a near-miss wording counts as content. They also cover nested check, nested KEPT, untracked and ignored folders, no sibling AGENTS.md, a non-git checkout (root only), and removal plus idempotence. Two further tests run the job's own staging lines against a real repo: one checks that root and nested deletions are staged and nothing else, the other that nothing is staged when nothing was removed. The staging test fails against the old root-only staging (checked).
  • Scratch --write equivalent: remove_claude_md_pointers + the staging snippet were run on clones of PyAutoMemory, autolens_assistant, autocti_assistant and autolens_workspace_test. 13 pointers were removed and staged as D, with no other changes, a second run removed 0, and the leg then reported OK.
  • Real workspace, --check only (expected to FAIL until the wave):
check CLAUDE.md → AGENTS.md pointers: 16 mismatch(es)
  ✗ 'PyAutoMemory/wiki/CLAUDE.md': retired pointer (removable)
  ✗ 'PyAutoMemory/wiki/cti/CLAUDE.md': retired pointer (removable)
  ✗ 'PyAutoMemory/wiki/galaxies/CLAUDE.md': retired pointer (removable)
  ✗ 'PyAutoMemory/wiki/lensing/CLAUDE.md': retired pointer (removable)
  ✗ 'PyAutoMemory/wiki/methods/CLAUDE.md': retired pointer (removable)
  ✗ 'PyAutoMemory/wiki/smbh/CLAUDE.md': retired pointer (removable)
  ✗ 'autolens_workspace_test/scripts/CLAUDE.md': retired pointer (removable)
  ✗ 'autolens_workspace_test/scripts/misc/database/scrape/CLAUDE.md': retired pointer (removable)
  ✗ 'autocti_assistant/scripts/CLAUDE.md': retired pointer (removable)
  ✗ 'autocti_assistant/wiki/literature/CLAUDE.md': retired pointer (removable)
  ✗ 'autofit_assistant/wiki/literature/CLAUDE.md': retired pointer (removable)
  ✗ 'autogalaxy_assistant/scripts/CLAUDE.md': retired pointer (removable)
  ✗ 'autogalaxy_assistant/wiki/literature/CLAUDE.md': retired pointer (removable)
  ✗ 'autolens_assistant/scripts/CLAUDE.md': retired pointer (removable)
  ✗ 'autolens_assistant/wiki/euclid/CLAUDE.md': retired pointer (removable)
  ✗ 'autolens_assistant/wiki/literature/CLAUDE.md': retired pointer (removable)

The prompt said 17 nested pointers; its own list and the measurement both have 16, across 6 repos.

Notes for the merger

  • After merge, Heart's manifest_drift will name this leg (16 mismatches) until the propagation wave runs. That is expected and is the signal for the follow-up below. The firewall gate stays green: it checks out only Brain, Heart and Hands, and none of them tracks a nested CLAUDE.md.
  • The workspace checkouts (manifest ↔ disk) mismatch (autofit_inference, undeclared) is pre-existing on main and unrelated.

Follow-ups

  • Dispatch session_hook_propagate with dry_run: true, then for real, to remove the nested pointers. Then work the Brain remainder draft drop_legacy_claude_md_patterns.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QmiavJnNzmKb6EJmgYATfx

Jammy2211 and others added 4 commits October 7, 2026 14:35
The CLAUDE.md retirement wave has run and the pointer leg is green on main,
so the TEMPORARY skip from 082eec0 goes: both drift checks run the leg
again on PR and push, the replacement 'Assert PyAutoMind carries no
CLAUDE.md' step and its banners are gone, and the gate's structure test is
back to its pre-#483 shape (the skipping step composes only the hook and
where-to-file decisions).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmiavJnNzmKb6EJmgYATfx
…#484)

The pointer leg and the removal looked only at each repo's root, so 16
tracked content-free pointers below repo roots (assistant scripts/ and
sub-wiki folders, the Memory sub-wikis, a workspace_test folder) were never
seen — and a session started inside one of those folders loses every
ancestor AGENTS.md. stray_claude_mds now also reads every tracked nested
CLAUDE.md (git ls-files, never a walk, so tmp/ output/ .worktrees/ are out)
that sits beside an AGENTS.md; one without a sibling AGENTS.md stays out of
scope. The nested pointer wordings join the exact-match boilerplate list so
they classify as content-free; anything else is still KEPT. The leg name is
unchanged (Heart's parser). Tests: nested check, KEPT, untracked/ignored,
no-sibling, non-git checkout, removal + idempotence.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmiavJnNzmKb6EJmgYATfx
The dispatch-only removal staged only the root CLAUDE.md; it now stages
every tracked CLAUDE.md the removal deleted (git ls-files --deleted, root
and nested), still dispatch-only and still honouring dry_run. Header
updated; the hand-cleanup list drops euclid_assistant (hand-cleaned in
a39e35c). Tests execute the job's own staging lines against a real repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmiavJnNzmKb6EJmgYATfx
The spawn dry run exited 2 on two UNMATCHED Memory files,
skills/catch_up/SKILL.md and skills/catch_up/catch_up.md (PyAutoMemory
047ec2b). Architect ruling: Memory skills/** are generic organism skills,
KEEP verbatim, mirroring the Mind table's rule 8. Spec first (Memory rule
1c), then MEMORY_RULES, then a contract test; the canary scan still grades
every kept file. Dry run: unmatched none, canary clean, exit 0, for both
templates.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QmiavJnNzmKb6EJmgYATfx
@Jammy2211
Jammy2211 merged commit a97e2f4 into main Oct 7, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/retire-nested-claude-md-pointers branch October 7, 2026 13:49
Jammy2211 added a commit that referenced this pull request Oct 29, 2026
… RAL jax 0.11.2 with the XLA:CPU flag

Batch 0: 413272-413274, 413292-413297 from autolens_profiling main ad103340 (#486, #485).
Quiet reruns: 413267-413271 cancelled (held, never started); resubmitted 413319 -> 413323 from
7c682ccb (2b) / f99c70ed (2c). RAL venv jax 0.10.2 -> 0.11.2 (freezes in scratch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: retire nested CLAUDE.md pointers and remove the temporary gate skip

1 participant