Skip to content

feat(agents): version the Claude subagent definitions and install them as managed links - #655

Merged
mblauberg merged 6 commits into
mainfrom
feat/version-claude-subagents
Aug 5, 2026
Merged

feat(agents): version the Claude subagent definitions and install them as managed links#655
mblauberg merged 6 commits into
mainfrom
feat/version-claude-subagents

Conversation

@mblauberg

Copy link
Copy Markdown
Owner

The three Claude subagent definitions lived only at ~/.claude/agents/ and were under no version control at all. ~/.claude is not a git repository and nothing in this product installed them, so agy-reviewer.md in particular existed as a single unbacked copy on one machine.

All three drive skills/orchestrate/scripts/cf_dispatch.sh and encode the orchestrate skill's dispatch contract, so they belong here.

What this does

  • adds a top-level agents/ tree holding the three definitions, byte-identical to the originals
  • install-harness --platform claude now links them into ~/.claude/agents/ via scripts/install-agents and scripts/agent_installation.py, wired through the existing manage_installation.py plan/execute machinery
  • tracked in .agent-harness-agents-installation.json, following the same manifest placement and conflict rules as skills and workflows

agents/ is kept separate from the existing skills/*/agents/openai.yaml files, which are Codex agent metadata and a different thing entirely.

Verification

Byte identity against the live originals:

file sha256
agy-reviewer.md 525594aa5b02dbdf2c5bfea5cc44bb819777fab52c6ba1e77d7e0354ff4f5a65
codex-analyst.md 9752f0d18c713a4370df051f3f9eb55b2d5b650e33a0abde975bbf5ab6b807b8
codex-implementer.md 5ea965d7d8c346180225bffe297b5d4f4c13a60cac3265527ece21adfbc925bf

Installer behaviour, exercised against scratch targets:

case result
fresh target linked=3 existing=0, exit 0
re-run linked=0 existing=3, exit 0, idempotent
target holding unmanaged real files exit 3, names each file, originals untouched, no manifest written

scripts/check-harness: 1268 passed, 2 xfailed.

One defect found during review

The new agents/ tree matched no CI build filter, so an edit to a subagent definition would have skipped the harness job entirely. test_every_tracked_path_matches_at_least_one_build_filter was failing. Fixed in 8367b545 by adding agents/** to the harness filter.

Migration note

Because the three files currently exist as unmanaged real files, install-harness will exit 3 on any machine that already has them until they are removed. That is the intended fail-closed behaviour, not a bug, but it needs doing once per machine. The repo copies are byte-identical, so the migration is lossless.

https://claude.ai/code/session_01DsDFRG6NVWb2VBNNtVkQ6N

The agy-reviewer, codex-analyst and codex-implementer subagent
definitions previously lived only at ~/.claude/agents/, outside any
git repo, so they had no history and no backup. Bring them into the
repo verbatim as the new source of truth, in a top-level agents/
directory kept separate from the skills/*/agents/openai.yaml Codex
agent metadata.
Extend install-harness to link the repo's agents/*.md files into
~/.claude/agents/ on the same terms as skills and workflows: managed
via symlink, tracked in a dedicated
.agent-harness-agents-installation.json manifest, idempotent on
re-run, and refusing to clobber an unmanaged user file with a
conflict exit before any mutation happens.
Add coverage for the three managed subagent links: they install, a
second install-harness run is idempotent, and an unmanaged conflict
fails the whole install before touching skills or workflows.
Note the agents/ directory and its ~/.claude/agents/ install target in
README's install and layout sections and in the orchestrate skill,
which is what actually depends on these subagent definitions.
The new top-level agents/ tree matched no build filter, so an edit to a
subagent definition would have skipped the harness job entirely and landed
without ever being checked. test_every_tracked_path_matches_at_least_one_build_filter
exists to catch exactly that, and it was failing.

Claude-Session: https://claude.ai/code/session_01DsDFRG6NVWb2VBNNtVkQ6N
Copilot AI lite review requested due to automatic review settings August 5, 2026 09:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mblauberg
mblauberg merged commit b698865 into main Aug 5, 2026
7 checks passed
@mblauberg
mblauberg deleted the feat/version-claude-subagents branch August 5, 2026 09:29
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.

2 participants