Skip to content

fix: stop spawning thirteen agents that do not exist - #40

Merged
MCKRUZ merged 2 commits into
masterfrom
fix/phantom-agents
Aug 1, 2026
Merged

fix: stop spawning thirteen agents that do not exist#40
MCKRUZ merged 2 commits into
masterfrom
fix/phantom-agents

Conversation

@MCKRUZ

@MCKRUZ MCKRUZ commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Closes #29.

Stacked on #39 (→ #38#37). Merge in order; GitHub retargets automatically.

Bigger than filed

I filed this as six phantom agents in phases 7–9. The real count across the repo is thirteen:

api-tester, backend-architect, devops-automator, doc-updater, e2e-runner, feedback-synthesizer, frontend-developer, performance-benchmarker, rapid-prototyper, refactor-cleaner, tdd-guide, test-writer-fixer, and code-reviewer as a claimed built-in.

Six of them sit in the Build-loop table — the most-exercised part of the product. references/agent-roster.md calls itself "the authoritative reference for agent orchestration decisions" and two-thirds of what it listed was fiction. SKILL.md — the file Claude actually reads — carried the same list plus a worked Agent(backend-architect, ...) example.

Why it does real damage

A spawn that resolves to nothing does not raise and does not warn. The phase carries on as though the work were done. A team runs Phase 7, the definition says the API documentation is being generated, and api-docs.md never appears.

The root cause

One false claim in docs/agents.md:

| Built-in Claude Code subagents | Claude Code runtime | 13+ | code-reviewer, security-reviewer, backend-architect, Explore |

They were never runtime built-ins. Only Explore and Plan come from the runtime; security-reviewer ships in harness/agents/. Believing the rest came free is almost certainly why nobody ever built them.

The fix follows what already worked

Phases 0–3 and the Build loop spawn nothing via Agent(...) and never did — they describe their work as steps, and they work. Phases 7–9 were the outlier.

Was delegated to a non-existent agent Now
README + API docs Written directly — 07-documentation.md Steps 1–2
Staging/production deploy Executed from RUNBOOK.md08-deployment.md Steps 2, 4
Smoke tests Executed directly — Step 3
Performance baseline Measured directly, before any threshold is set — 09-monitoring.md Step 1
Feedback synthesis Part of the retrospective — Step 5
Tests / API work / spikes The test-writer and api-pattern skills, and /sdlc-spike

build-error-resolver spawns are kept — it genuinely ships.

The docs now state the principle that decides this: a skill runs in the main context with the surrounding work in view, which is what authoring needs; an agent starts cold, which is what reviewing needs. That, not a persona name, is the test for whether to delegate.

Corroboration: docs/phase-lifecycle.md said "No custom SDLC agents are spawned during Documentation / Deployment / Monitoring" the whole time. It was right. Nothing ever reconciled it against the phase files that disagreed.

Also here

Completes #36's sweep — SKILL.md still documented the phaseNN- report convention, which the earlier pass missed because its glob covered phases/, docs/ and commands/ but not SKILL.md or references/. Both guards are now glob-driven over the whole repo.

Test plan

  • Full suite: 574 passed, 6 skipped
  • Zero phantom references remain outside CHANGELOG.md (history) and harness/agents/README.md (a deliberate catalogue of external agents a team may optionally pull — left as-is)
  • New guard mutation-tested twice: once with a phantom Agent() spawn, once with a phantom roster row, and again against SKILL.md after the parser was tightened
  • Guard parses agent-table columns rather than matching backticks — the naive version produced 10 false positives on phase slugs (build, close) and spec statuses

Note for review

This rewrites prose in five documents including SKILL.md. The mechanical claims are all test-enforced now, but the wording deserves your eye — particularly the skill-versus-agent framing in SKILL.md and references/agent-roster.md, since that is new guidance rather than a correction.

🤖 Generated with Claude Code

MCKRUZ and others added 2 commits August 1, 2026 16:25
Phases 7-9 spawned seven subagents by name and six did not exist. The
reference docs were worse: agent-roster.md and docs/agents.md between them
presented thirteen non-existent agents as usable, six in the Build-loop
table, and SKILL.md carried the same list plus a worked
Agent(backend-architect, ...) example.

A spawn that resolves to nothing does not raise and does not warn. The
phase carries on as though the work were done, so a team ran Phase 7 and
api-docs.md simply never appeared.

The root cause was one false claim: docs/agents.md listed these under
"Built-in Claude Code subagents - Claude Code runtime - 13+". They were
never runtime built-ins. Believing they came free is why nobody built them.

The fix follows what already worked. Phases 0-3 and the Build loop spawn
nothing via Agent(...) and never did; they describe their work as steps.
Phases 7-9 now do the same. build-error-resolver spawns are kept because it
genuinely ships. The docs now state the distinction that decides this: a
skill runs in the main context with the surrounding work in view, which is
what authoring needs, while an agent starts cold, which is what reviewing
needs.

docs/phase-lifecycle.md had said "No custom SDLC agents are spawned during
Documentation / Deployment / Monitoring" the whole time. It was right, and
nothing reconciled it against the phase files that disagreed.

Also completes #36's sweep: SKILL.md still documented the phaseNN- report
convention, which the earlier pass missed.

Adds test_agent_references.py, globbing every doc rather than a hand-listed
pair - the first pass at this fix corrected two files and left the same
claims in three others. It parses agent-table columns rather than matching
backticks, so phase slugs are not mistaken for agent names. Proven by
reintroducing a phantom spawn and a phantom table row. 574 passed,
6 skipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEA6GZUG9NKNQYrJKyDGdb
@MCKRUZ
MCKRUZ changed the base branch from docs/command-reference-and-markers to master August 1, 2026 21:01
@MCKRUZ
MCKRUZ merged commit c5e2dc3 into master Aug 1, 2026
3 checks passed
MCKRUZ added a commit that referenced this pull request Aug 1, 2026
The 1.0.1 corrective stack (#37-#40) landed on master first, so this branch
takes its version and changelog. Resolution: 1.1.0 is the shipped version and
supersedes 1.0.1; both changelog sections are kept, newest first.

Two corrections made while resolving:

- marketplace.json auto-merged to 1.0.1 because this branch bumped plugin.json
  and never touched the marketplace manifest. Both now read 1.1.0; shipping
  them disagreeing is how a marketplace serves a stale version.
- 1.1.0 was dated 2026-07-31, the day the branch was cut. It ships today, so
  it carries today's date rather than sitting above 1.0.1 with an earlier one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEA6GZUG9NKNQYrJKyDGdb
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.

bug: phase definitions spawn six subagents that don't exist

1 participant