fix: add <available_agent_types> to all workflows spawning named agents

PR #1139 added <available_agent_types> sections to execute-phase.md and
plan-phase.md to prevent /clear from causing silent fallback to
general-purpose. However, 14 other workflows and 2 commands that also
spawn named GSD agents were missed, leaving them vulnerable to the same
regression after /clear.

Added <available_agent_types> listing to: research-phase, quick,
audit-milestone, diagnose-issues, discuss-phase-assumptions,
execute-plan, map-codebase, new-milestone, new-project, ui-phase,
ui-review, validate-phase, verify-work (workflows) and debug,
research-phase (commands).

Added regression test that enforces every workflow/command spawning
named subagent_type must have a matching <available_agent_types>
section listing all spawned types.

Fixes #1357

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-03-24 13:17:18 -04:00
parent 763c6cc642
commit 0ce31ae882
16 changed files with 131 additions and 0 deletions

View File

@@ -6,6 +6,11 @@ Each agent has fresh context, explores a specific focus area, and **writes docum
Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
</purpose>
<available_agent_types>
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
- gsd-codebase-mapper — Maps project structure and dependencies
</available_agent_types>
<philosophy>
**Why dedicated mapper agents:**
- Fresh context per domain (no token contamination)