infra: generate the command surface into AGENTS.md (agent-agnostic discovery)#101
Merged
Merged
Conversation
…scovery) Spec 2 (command_surface_in_agents_md), agent-agnostic layer only: - bin/install.sh: add --write-agents-surface / --check-agents-surface modes that generate a drift-checked command-surface block (verb · purpose · bin/pyauto-brain <verb>) into each organ's auto-loaded AGENTS.md. Unified block (all verbs, hosted in Brain), so a single-repo web session still discovers every verb; skips absent repos / repos without markers. - bin/pyauto-brain: guard `main "$@"` on direct execution so the installer can source the agent registry as the single source of truth (no second list). - AGENTS.md: replace the hand-maintained `## Running` list with the generated block. - tests/test_skill_install.py: assert the committed block is current and covers every public agent — wires the drift check into Brain CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KUGujq6jAgU3CExnLkkELe
Reflect the Brain-only design in the generated block's intro and the generator comments: PyAutoBrain is loaded in every session, so its auto-loaded AGENTS.md carries the command surface everywhere — no per-organ copy. Regenerate Brain's block with the corrected wording. No change to the verb data. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KUGujq6jAgU3CExnLkkELe
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.
The PyAutoBrain half of the ecosystem AGENTS.md/CLAUDE.md/command-surface standardization (epic:
PyAutoMind/z_features/agents_md_standardization.md). Companion to the PyAutoMind PR.What changed
bin/install.sh—--write-agents-surface/--check-agents-surfacemodes generate a drift-checked command-surface block (verb · purpose ·bin/pyauto-brain <verb>) into an organ's auto-loadedAGENTS.md, sourced from thebin/pyauto-brainagent registry (the single source of truth).bin/pyauto-brain— guardmain "$@"on direct execution so the installer can source the registry (no second verb list).AGENTS.md— replaced the hand-maintained## Runninglist with the generated command-surface block. Brain is the sole home for this block: it's loaded in every session, so the surface reaches everywhere without per-organ copies.tests/test_skill_install.py— two tests: the committed block matches the registry, and it covers every public agent — wiring the drift check into Brain CI.Design note
The command surface (and the organism map) live once in PyAutoBrain, not duplicated into each organ. PyAutoBrain is guaranteed loaded in every web/mobile session, so its auto-loaded
AGENTS.mdcarries both shared blocks into context everywhere. Per-tool slash-command sugar remains deferred (agent-agnostic layer only). Every repo still keeps its ownCLAUDE.md → @AGENTS.mdpointer.🤖 Generated with Claude Code
Generated by Claude Code