* fix: replace /gsd: command format with /gsd- skill format in all suggestions All next-step suggestions shown to users were still using the old colon format (/gsd:xxx) which cannot be copy-pasted as skills. Migrated all occurrences across agents/, commands/, get-shit-done/, docs/, README files, bin/install.js (hardcoded defaults for claude runtime), and get-shit-done/bin/lib/*.cjs (generate-claude-md templates and error messages). Updated tests to assert new hyphen format instead of old colon format. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: migrate remaining /gsd: format to /gsd- in hooks, workflows, and sdk Addresses remaining user-facing occurrences missed in the initial migration: - hooks/: fix 4 user-facing messages (pause-work, update, fast, quick) and 2 comments in gsd-workflow-guard.js - get-shit-done/workflows/: fix 21 Skill() literal calls that Claude executes directly (installer does not transform workflow content) - sdk/prompt-sanitizer.ts: update regex to strip /gsd- format in addition to legacy /gsd: format; update JSDoc comment - tests/: update autonomous-ui-steps, prompt-sanitizer to assert new format Note: commands/gsd/*.md frontmatter (name: gsd:xxx) intentionally unchanged — installer derives skillName from directory path, not the name field. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(plan-phase): preserve --chain flag in auto-advance sync and handle ui-phase gate in chain mode Bug 1: step 15 sync-flag check only guarded against --auto, causing _auto_chain_active to be cleared when plan-phase is invoked without --auto in ARGUMENTS even though a --chain pipeline was active. Added --chain to the guard condition, matching discuss-phase behaviour. Bug 2: UI Design Contract gate (step 5.6) always exited the workflow when UI-SPEC was missing, breaking the discuss --chain pipeline silently. When _auto_chain_active is true, the gate now auto-invokes gsd-ui-phase --auto via Skill() and continues to step 6 without prompting. Manual invocations retain the existing AskUserQuestion flow. * fix: remove <sub>/clear</sub> pattern and duplicate old-format command in discuss-phase.md --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
239 lines
7.4 KiB
Markdown
239 lines
7.4 KiB
Markdown
<purpose>
|
|
Orchestrate parallel debug agents to investigate UAT gaps and find root causes.
|
|
|
|
After UAT finds gaps, spawn one debug agent per gap. Each agent investigates autonomously with symptoms pre-filled from UAT. Collect root causes, update UAT.md gaps with diagnosis, then hand off to plan-phase --gaps with actual diagnoses.
|
|
|
|
Orchestrator stays lean: parse gaps, spawn agents, collect results, update UAT.
|
|
</purpose>
|
|
|
|
<available_agent_types>
|
|
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
- gsd-debugger — Diagnoses and fixes issues
|
|
</available_agent_types>
|
|
|
|
<paths>
|
|
DEBUG_DIR=.planning/debug
|
|
|
|
Debug files use the `.planning/debug/` path (hidden directory with leading dot).
|
|
</paths>
|
|
|
|
<core_principle>
|
|
**Diagnose before planning fixes.**
|
|
|
|
UAT tells us WHAT is broken (symptoms). Debug agents find WHY (root cause). plan-phase --gaps then creates targeted fixes based on actual causes, not guesses.
|
|
|
|
Without diagnosis: "Comment doesn't refresh" → guess at fix → maybe wrong
|
|
With diagnosis: "Comment doesn't refresh" → "useEffect missing dependency" → precise fix
|
|
</core_principle>
|
|
|
|
<process>
|
|
|
|
<step name="parse_gaps">
|
|
**Extract gaps from UAT.md:**
|
|
|
|
Read the "Gaps" section (YAML format):
|
|
```yaml
|
|
- truth: "Comment appears immediately after submission"
|
|
status: failed
|
|
reason: "User reported: works but doesn't show until I refresh the page"
|
|
severity: major
|
|
test: 2
|
|
artifacts: []
|
|
missing: []
|
|
```
|
|
|
|
For each gap, also read the corresponding test from "Tests" section to get full context.
|
|
|
|
Build gap list:
|
|
```
|
|
gaps = [
|
|
{truth: "Comment appears immediately...", severity: "major", test_num: 2, reason: "..."},
|
|
{truth: "Reply button positioned correctly...", severity: "minor", test_num: 5, reason: "..."},
|
|
...
|
|
]
|
|
```
|
|
</step>
|
|
|
|
<step name="report_plan">
|
|
**Read worktree config:**
|
|
|
|
```bash
|
|
USE_WORKTREES=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-get workflow.use_worktrees 2>/dev/null || echo "true")
|
|
```
|
|
|
|
**Report diagnosis plan to user:**
|
|
|
|
```
|
|
## Diagnosing {N} Gaps
|
|
|
|
Spawning parallel debug agents to investigate root causes:
|
|
|
|
| Gap (Truth) | Severity |
|
|
|-------------|----------|
|
|
| Comment appears immediately after submission | major |
|
|
| Reply button positioned correctly | minor |
|
|
| Delete removes comment | blocker |
|
|
|
|
Each agent will:
|
|
1. Create DEBUG-{slug}.md with symptoms pre-filled
|
|
2. Investigate autonomously (read code, form hypotheses, test)
|
|
3. Return root cause
|
|
|
|
This runs in parallel - all gaps investigated simultaneously.
|
|
```
|
|
</step>
|
|
|
|
<step name="spawn_agents">
|
|
**Load agent skills:**
|
|
|
|
```bash
|
|
AGENT_SKILLS_DEBUGGER=$(node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-debugger 2>/dev/null)
|
|
EXPECTED_BASE=$(git rev-parse HEAD)
|
|
```
|
|
|
|
**Spawn debug agents in parallel:**
|
|
|
|
For each gap, fill the debug-subagent-prompt template and spawn:
|
|
|
|
```
|
|
Task(
|
|
prompt=filled_debug_subagent_prompt + "\n\n<worktree_branch_check>\nFIRST ACTION: run git merge-base HEAD {EXPECTED_BASE} — if result differs from {EXPECTED_BASE}, run git reset --soft {EXPECTED_BASE} to correct the branch base (fixes Windows EnterWorktree creating branches from main).\n</worktree_branch_check>\n\n<files_to_read>\n- {phase_dir}/{phase_num}-UAT.md\n- .planning/STATE.md\n</files_to_read>\n${AGENT_SKILLS_DEBUGGER}",
|
|
subagent_type="gsd-debugger",
|
|
${USE_WORKTREES !== "false" ? 'isolation="worktree",' : ''}
|
|
description="Debug: {truth_short}"
|
|
)
|
|
```
|
|
|
|
**All agents spawn in single message** (parallel execution).
|
|
|
|
Template placeholders:
|
|
- `{truth}`: The expected behavior that failed
|
|
- `{expected}`: From UAT test
|
|
- `{actual}`: Verbatim user description from reason field
|
|
- `{errors}`: Any error messages from UAT (or "None reported")
|
|
- `{reproduction}`: "Test {test_num} in UAT"
|
|
- `{timeline}`: "Discovered during UAT"
|
|
- `{goal}`: `find_root_cause_only` (UAT flow - plan-phase --gaps handles fixes)
|
|
- `{slug}`: Generated from truth
|
|
</step>
|
|
|
|
<step name="collect_results">
|
|
**Collect root causes from agents:**
|
|
|
|
Each agent returns with:
|
|
```
|
|
## ROOT CAUSE FOUND
|
|
|
|
**Debug Session:** ${DEBUG_DIR}/{slug}.md
|
|
|
|
**Root Cause:** {specific cause with evidence}
|
|
|
|
**Evidence Summary:**
|
|
- {key finding 1}
|
|
- {key finding 2}
|
|
- {key finding 3}
|
|
|
|
**Files Involved:**
|
|
- {file1}: {what's wrong}
|
|
- {file2}: {related issue}
|
|
|
|
**Suggested Fix Direction:** {brief hint for plan-phase --gaps}
|
|
```
|
|
|
|
Parse each return to extract:
|
|
- root_cause: The diagnosed cause
|
|
- files: Files involved
|
|
- debug_path: Path to debug session file
|
|
- suggested_fix: Hint for gap closure plan
|
|
|
|
If agent returns `## INVESTIGATION INCONCLUSIVE`:
|
|
- root_cause: "Investigation inconclusive - manual review needed"
|
|
- Note which issue needs manual attention
|
|
- Include remaining possibilities from agent return
|
|
</step>
|
|
|
|
<step name="update_uat">
|
|
**Update UAT.md gaps with diagnosis:**
|
|
|
|
For each gap in the Gaps section, add artifacts and missing fields:
|
|
|
|
```yaml
|
|
- truth: "Comment appears immediately after submission"
|
|
status: failed
|
|
reason: "User reported: works but doesn't show until I refresh the page"
|
|
severity: major
|
|
test: 2
|
|
root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
|
|
artifacts:
|
|
- path: "src/components/CommentList.tsx"
|
|
issue: "useEffect missing dependency"
|
|
missing:
|
|
- "Add commentCount to useEffect dependency array"
|
|
- "Trigger re-render when new comment added"
|
|
debug_session: .planning/debug/comment-not-refreshing.md
|
|
```
|
|
|
|
Update status in frontmatter to "diagnosed".
|
|
|
|
Commit the updated UAT.md:
|
|
```bash
|
|
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" commit "docs({phase_num}): add root causes from diagnosis" --files ".planning/phases/XX-name/{phase_num}-UAT.md"
|
|
```
|
|
</step>
|
|
|
|
<step name="report_results">
|
|
**Report diagnosis results and hand off:**
|
|
|
|
Display:
|
|
```
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
GSD ► DIAGNOSIS COMPLETE
|
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
|
|
| Gap (Truth) | Root Cause | Files |
|
|
|-------------|------------|-------|
|
|
| Comment appears immediately | useEffect missing dependency | CommentList.tsx |
|
|
| Reply button positioned correctly | CSS flex order incorrect | ReplyButton.tsx |
|
|
| Delete removes comment | API missing auth header | api/comments.ts |
|
|
|
|
Debug sessions: ${DEBUG_DIR}/
|
|
|
|
Proceeding to plan fixes...
|
|
```
|
|
|
|
Return to verify-work orchestrator for automatic planning.
|
|
Do NOT offer manual next steps - verify-work handles the rest.
|
|
</step>
|
|
|
|
</process>
|
|
|
|
<context_efficiency>
|
|
Agents start with symptoms pre-filled from UAT (no symptom gathering).
|
|
Agents only diagnose—plan-phase --gaps handles fixes (no fix application).
|
|
</context_efficiency>
|
|
|
|
<failure_handling>
|
|
**Agent fails to find root cause:**
|
|
- Mark gap as "needs manual review"
|
|
- Continue with other gaps
|
|
- Report incomplete diagnosis
|
|
|
|
**Agent times out:**
|
|
- Check DEBUG-{slug}.md for partial progress
|
|
- Can resume with /gsd-debug
|
|
|
|
**All agents fail:**
|
|
- Something systemic (permissions, git, etc.)
|
|
- Report for manual investigation
|
|
- Fall back to plan-phase --gaps without root causes (less precise)
|
|
</failure_handling>
|
|
|
|
<success_criteria>
|
|
- [ ] Gaps parsed from UAT.md
|
|
- [ ] Debug agents spawned in parallel
|
|
- [ ] Root causes collected from all agents
|
|
- [ ] UAT.md gaps updated with artifacts and missing
|
|
- [ ] Debug sessions saved to ${DEBUG_DIR}/
|
|
- [ ] Hand off to verify-work for automatic planning
|
|
</success_criteria>
|