feat(agents-init): retire CLAUDE.md, discover and normalize AGENTS.md in every subdirectory #177

Merged
rootiest merged 12 commits from docs/retire-claude-md-for-agents-md into main 2026-09-24 04:56:06 +00:00
12 Commits
Author SHA1 Message Date
rootiest 911c6e95ed feat(docs): add manual-section CLASSIFICATION tag, wire it into the build
CI / github-mirror (pull_request) Skipped
CI / test (pull_request) Successful in 2m26s
CI / docs (pull_request) Successful in 1m17s
A function with a dedicated manual section (docs/manual/16-agent-tooling.md,
so far) now carries manual-section(<slug>) in its own CLASSIFICATION line
instead of relying on a NOTES pointer nobody can grep for. Applied to
agents-init and agents-vault, both pointing at 16-agent-tooling.

docs/build-manual.py: _resolve_manual_section reads the target page's own
manTitle/title fresh at build time rather than duplicating a section
number into the tag, so a renumbered section (like this one, twice
already) never requires touching the tag -- only the slug (the filename)
does, and only if the page itself is renamed. render_entry and
render_entry_site both gained an optional root parameter and now emit a
'See also' line (plain text + relative path for the man page, a real
markdown link on the site) whenever the tag resolves; omitted silently
when it doesn't (a build isn't the place to fail on a bad slug).

docs/verify-manual.py: unit tests for the new resolver and both renderers,
plus a real-data scan (test_real_manual_section_tags_resolve) that fails
the suite if any function's manual-section(<slug>) tag points nowhere --
the actual enforcement half of the convention, since the build stays
silent about it.

docs/function-classification-schema.md, CONTRIBUTING.md: documents the
tag, and widens CLASSIFICATION's own framing from strictly hazard/shadow
tags to general-purpose (the user's call, not mine to make unilaterally --
scope-broadening an existing convention). The 'Dedicated manual sections'
subsection (added earlier this branch) now names the tag as the
machine-checked half of that convention, with NOTES demoted to a
nice-to-have for a header-only reader.
2026-09-24 00:50:36 -04:00
rootiest 1d714a84d0 docs(agent-tooling): add scenario reference table, cross-reference from code
CI / github-mirror (pull_request) Skipped
CI / test (pull_request) Successful in 2m24s
CI / docs (pull_request) Successful in 1m37s
Adds a 'Scenario reference' subsection to docs/manual/16-agent-tooling.md:
two ruled tables covering every combination of what a directory can hold
(only AGENTS.md, only CLAUDE.md, both identical, both different, an
inverted mirror, an already-settled symlink) crossed with whether the
file is deliberately git-tracked, plus the settled-mirror/later-arrival
case separately. Verified against build-manual.py's actual table parser
and the generated Starlight site output, not just visual inspection.

Also closes the gap this section itself pointed out: nothing previously
linked a reader of agents-init.fish or agents-vault.fish's own doc-header
to this page, and nothing told a future contributor the page has to be
kept in sync. Adds:
- CONTRIBUTING.md: a new 'Dedicated manual sections for complex
  subsystems' subsection documenting the pattern in general (when to use
  one, and the update-it-in-the-same-change obligation verify-manual.py
  cannot check for you).
- functions/agents-init.fish, functions/agents-vault.fish: a NOTES
  pointer to the section from each function's own header, so a reader
  who only sees the header still finds the fuller page.
2026-09-23 22:10:36 -04:00
rootiest e01e83bd36 docs: add AI Agent Tooling manual section
CI / github-mirror (pull_request) Skipped
CI / test (pull_request) Successful in 2m26s
CI / docs (pull_request) Successful in 1m14s
Documents agents-init/agents-vault's concept, purpose, and complete
behavior as its own manual section (16), separate from the auto-generated
function reference: the AGENTS.md convention and CLAUDE.md retirement,
the AGENTS/ sub-repository (layout, versioning, hooks), per-directory
discovery and its four-state normalization, the two safety mechanisms
(discovery containment, deliberately-tracked-file protection), the
plans/specs/devlogs wiring, and the launch lifecycle.

Inserted before Attribution/License (now 17/18) rather than mid-document,
since that's the only placement that doesn't touch any of the manual's
prose cross-references to other section numbers. docs/fish-config.index
updated to match (new keywords, renumbered attribution/license entries;
agents-init and agy were already indexed to their own function-reference
entries and are left pointing there, not redirected to this new page).
2026-09-23 21:47:26 -04:00
rootiest de92277226 fix(agents-init): use --literal-pathspecs so glob characters in a path can't false-match tracked files
CI / github-mirror (pull_request) Skipped
CI / test (pull_request) Successful in 2m28s
CI / docs (pull_request) Successful in 1m21s
2026-09-23 21:07:57 -04:00
rootiest 2baa91f275 feat(agents-init): protect deliberately git-tracked instruction files from being replaced
A real AGENTS.md/CLAUDE.md that is in git's index, in a project with a
non-empty .gitignore, is now left in place (with a stderr warning) by
steps 2 and 4 of _agents_init_sync_instructions instead of being moved
into AGENTS/ and symlinked. Discovery also prunes build/, dist/, out/
and target/ outright.
2026-09-23 20:59:55 -04:00
rootiest 6a410a0fce fix(agents-init): contain discovery to the project tree, prevent silent overwrite of real files
CI / test (pull_request) Successful in 2m23s
CI / github-mirror (pull_request) Skipped
CI / docs (pull_request) Successful in 1m19s
2026-09-23 20:12:41 -04:00
rootiest c3f134b5b4 fix(agents-init): tag grep in CLASSIFICATION header 2026-09-23 20:00:52 -04:00
rootiest 4e5f0078ce docs: drop CLAUDE.md wording from wrapper and manual prose 2026-09-23 19:52:25 -04:00
rootiest 4240a04754 fix(agents-init): clean up stale anchored gitignore patterns on migration 2026-09-23 19:46:16 -04:00
rootiest ecfb93a818 feat(agents-init): discover and normalize AGENTS.md/CLAUDE.md in every subdirectory 2026-09-23 19:36:24 -04:00
rootiest a776d4d12d fix(agents-init): add missing branch test coverage and explicit terminal return 2026-09-23 19:32:36 -04:00
rootiest 731661b581 feat(agents-init): add per-directory AGENTS.md/CLAUDE.md sync helper 2026-09-23 19:25:01 -04:00