After UAT finds issues, spawn parallel debug agents to investigate root causes before planning fixes. Each agent investigates one issue with symptoms pre-filled from UAT, finds the root cause, and returns diagnosis. New files: - workflows/diagnose-issues.md: Orchestrator for parallel debug agents - templates/debug-subagent-prompt.md: Prompt template for debug subagents Modified: - workflows/debug.md: Add symptoms_prefilled and diagnose-only modes - workflows/verify-work.md: Offer diagnosis step after issues found - templates/UAT.md: Add root_cause and debug_session fields - commands/gsd/plan-fix.md: Use root causes for targeted fix planning Flow: UAT → diagnose (parallel) → plan-fix (with root causes) → execute Co-Authored-By: Claude <noreply@anthropic.com>
9.2 KiB
User tests, Claude records. One test at a time. Plain text responses.
**Show expected, ask if reality matches.**Claude presents what SHOULD happen. User confirms or describes what's different.
- "yes" / "y" / "next" / empty → pass
- Anything else → logged as issue, severity inferred
No Pass/Fail buttons. No severity questions. Just: "Here's what should happen. Does it?"
@~/.claude/get-shit-done/templates/UAT.md **First: Check for active UAT sessions**find .planning/phases -name "*-UAT.md" -type f 2>/dev/null | head -5
If active sessions exist AND no $ARGUMENTS provided:
Read each file's frontmatter (status, phase) and Current Test section.
Display inline:
## Active UAT Sessions
| # | Phase | Status | Current Test | Progress |
|---|-------|--------|--------------|----------|
| 1 | 04-comments | testing | 3. Reply to Comment | 2/6 |
| 2 | 05-auth | testing | 1. Login Form | 0/4 |
Reply with a number to resume, or provide a phase number to start new.
Wait for user response.
- If user replies with number (1, 2) → Load that file, go to
resume_from_file - If user replies with phase number → Treat as new session, go to
create_uat_file
If active sessions exist AND $ARGUMENTS provided:
Check if session exists for that phase. If yes, offer to resume or restart.
If no, continue to create_uat_file.
If no active sessions AND no $ARGUMENTS:
No active UAT sessions.
Provide a phase number to start testing (e.g., /gsd:verify-work 4)
If no active sessions AND $ARGUMENTS provided:
Continue to create_uat_file.
Parse $ARGUMENTS as phase number (e.g., "4") or plan number (e.g., "04-02").
# Find phase directory
PHASE_DIR=$(ls -d .planning/phases/${PHASE_ARG}* 2>/dev/null | head -1)
# Find SUMMARY files
ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
Read each SUMMARY.md to extract testable deliverables.
**Extract testable deliverables from SUMMARY.md:**Parse for:
- Accomplishments - Features/functionality added
- User-facing changes - UI, workflows, interactions
Focus on USER-OBSERVABLE outcomes, not implementation details.
For each deliverable, create a test:
- name: Brief test name
- expected: What the user should see/experience (specific, observable)
Examples:
- Accomplishment: "Added comment threading with infinite nesting" → Test: "Reply to a Comment" → Expected: "Clicking Reply opens inline composer below comment. Submitting shows reply nested under parent with visual indentation."
Skip internal/non-observable items (refactors, type changes, etc.).
**Create UAT file with all tests:**mkdir -p "$PHASE_DIR"
Build test list from extracted deliverables.
Create file:
---
status: testing
phase: XX-name
source: [list of SUMMARY.md files]
started: [ISO timestamp]
updated: [ISO timestamp]
---
## Current Test
<!-- OVERWRITE each test - shows where we are -->
number: 1
name: [first test name]
expected: |
[what user should observe]
awaiting: user response
## Tests
### 1. [Test Name]
expected: [observable behavior]
result: [pending]
### 2. [Test Name]
expected: [observable behavior]
result: [pending]
...
## Summary
total: [N]
passed: 0
issues: 0
pending: [N]
skipped: 0
## Issues for /gsd:plan-fix
[none yet]
Write to .planning/phases/XX-name/{phase}-UAT.md
Proceed to present_test.
Read Current Test section from UAT file.
Display:
## Test {number}: {name}
**Expected:** {expected}
Does this match what you see?
Wait for user response (plain text, no AskUserQuestion).
**Process user response and update file:**If response indicates pass:
- Empty response, "yes", "y", "ok", "pass", "next", "approved", "✓"
Update Tests section:
### {N}. {name}
expected: {expected}
result: pass
If response indicates skip:
- "skip", "can't test", "n/a"
Update Tests section:
### {N}. {name}
expected: {expected}
result: skipped
reason: [user's reason if provided]
If response is anything else:
- Treat as issue description
Infer severity from description:
- Contains: crash, error, exception, fails, broken, unusable → blocker
- Contains: doesn't work, wrong, missing, can't → major
- Contains: slow, weird, off, minor, small → minor
- Contains: color, font, spacing, alignment, visual → cosmetic
- Default if unclear: major
Update Tests section:
### {N}. {name}
expected: {expected}
result: issue
reported: "{verbatim user response}"
severity: {inferred}
Append to Issues section:
- UAT-{NNN}: {brief summary from response} ({severity}) - Test {N}
After any response:
Update Summary counts. Update frontmatter.updated timestamp.
If more tests remain → Update Current Test, go to present_test
If no more tests → Go to complete_session
Read the full UAT file.
Find first test with result: [pending].
Announce:
Resuming: Phase {phase} UAT
Progress: {passed + issues + skipped}/{total}
Issues found so far: {issues count}
Continuing from Test {N}...
Update Current Test section with the pending test.
Proceed to present_test.
Update frontmatter:
- status: complete
- updated: [now]
Clear Current Test section:
## Current Test
[testing complete]
Commit the UAT file:
git add ".planning/phases/XX-name/{phase}-UAT.md"
git commit -m "test({phase}): complete UAT - {passed} passed, {issues} issues"
Present summary:
## UAT Complete: Phase {phase}
| Result | Count |
|--------|-------|
| Passed | {N} |
| Issues | {N} |
| Skipped| {N} |
[If issues > 0:]
### Issues Found
[List from Issues section]
If issues > 0: Proceed to offer_diagnosis
If issues == 0:
All tests passed. Ready to continue.
- `/gsd:plan-phase {next}` — Plan next phase
- `/gsd:execute-phase {next}` — Execute next phase
---
{N} issues found. Before planning fixes, diagnose root causes?
Diagnosis spawns parallel debug agents to investigate each issue.
Each agent finds the root cause, making fix planning more accurate.
Diagnose now? (yes/no)
Wait for user response.
If yes/y/diagnose:
- Load diagnose-issues workflow
- Follow @~/.claude/get-shit-done/workflows/diagnose-issues.md
- Spawn parallel debug agents for each issue
- Collect root causes
- Update UAT.md with root causes
- Return to
offer_plan_fix
If no/skip/later:
- Proceed to
offer_plan_fixwithout diagnosis - Plan-fix will work without root causes (less precise but still functional)
Check if UAT.md has root causes (status: "diagnosed" or root_cause fields populated).
If diagnosed:
---
Root causes identified. Ready to plan fixes.
| Issue | Root Cause |
|-------|------------|
| UAT-001 | {root_cause} |
| UAT-002 | {root_cause} |
...
Next steps:
- `/gsd:plan-fix {phase}` — Create fix plan with root causes
- `/gsd:verify-work {phase}` — Re-test after fixes
If not diagnosed:
---
Next steps:
- `/gsd:plan-fix {phase}` — Create fix plan for issues
- `/gsd:verify-work {phase}` — Re-test after fixes
- Continue to next phase (issues logged for later)
<update_rules> Section update rules:
| Section | Rule | When |
|---|---|---|
| Frontmatter.status | OVERWRITE | Start, complete |
| Frontmatter.updated | OVERWRITE | Every update |
| Current Test | OVERWRITE | Each test transition |
| Tests.{N}.result | OVERWRITE | When user responds |
| Summary | OVERWRITE | After each response |
| Issues | APPEND | When issue found |
Update file AFTER processing each response. If context resets, file shows exactly where to resume. </update_rules>
<severity_inference> Infer severity from user's natural language:
| User says | Infer |
|---|---|
| "crashes", "error", "exception", "fails completely" | blocker |
| "doesn't work", "nothing happens", "wrong behavior" | major |
| "works but...", "slow", "weird", "minor issue" | minor |
| "color", "spacing", "alignment", "looks off" | cosmetic |
Default to major if unclear. User can correct if needed.
Never ask "how severe is this?" - just infer and move on. </severity_inference>
<success_criteria>
- UAT file created with all tests from SUMMARY.md
- Tests presented one at a time with expected behavior
- User responses processed as pass/issue/skip
- Severity inferred from description (never asked)
- File updated after each response
- Can resume perfectly from any /clear
- Committed on completion
- Clear next steps based on results </success_criteria>