From 8d199427a8da766dba4cb7febb12ca092a32cc5b Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sat, 17 Jan 2026 00:01:30 -0600 Subject: [PATCH] fix(offer-next): remove code blocks from output templates for proper markdown rendering Commands with sections were outputting backticks literally instead of rendering them as inline code. Removed code block wrappers and added explicit 'Output this markdown directly' instruction. Affected: plan-phase, execute-phase, audit-milestone --- commands/gsd/audit-milestone.md | 42 ++--- commands/gsd/execute-phase.md | 42 ++--- commands/gsd/plan-phase.md | 20 ++- commands/gsd/verify-work.md | 20 ++- get-shit-done/workflows/diagnose-issues.md | 30 ++-- get-shit-done/workflows/verify-work.md | 184 +++++++++++++++++++-- 6 files changed, 248 insertions(+), 90 deletions(-) diff --git a/commands/gsd/audit-milestone.md b/commands/gsd/audit-milestone.md index 02831a604..9bd0b004e 100644 --- a/commands/gsd/audit-milestone.md +++ b/commands/gsd/audit-milestone.md @@ -143,9 +143,12 @@ Route by status (see ``). +Output this markdown directly (not as a code block). Route based on status: + +--- + **If passed:** -```markdown ## ✓ Milestone {version} — Audit Passed **Score:** {N}/{M} requirements satisfied @@ -153,22 +156,22 @@ Route by status (see ``). All requirements covered. Cross-phase integration verified. E2E flows complete. ---- +─────────────────────────────────────────────────────────────── ## ▶ Next Up **Complete milestone** — archive and tag -`/gsd:complete-milestone {version}` +/gsd:complete-milestone {version} -`/clear` first → fresh context window -``` +/clear first → fresh context window + +─────────────────────────────────────────────────────────────── --- **If gaps_found:** -```markdown ## ⚠ Milestone {version} — Gaps Found **Score:** {N}/{M} requirements satisfied @@ -190,28 +193,28 @@ All requirements covered. Cross-phase integration verified. E2E flows complete. {For each flow gap:} - **{flow name}:** breaks at {step} ---- +─────────────────────────────────────────────────────────────── ## ▶ Next Up **Plan gap closure** — create phases to complete milestone -`/gsd:plan-milestone-gaps` +/gsd:plan-milestone-gaps -`/clear` first → fresh context window +/clear first → fresh context window ---- +─────────────────────────────────────────────────────────────── **Also available:** -- `cat .planning/v{version}-MILESTONE-AUDIT.md` — see full report -- `/gsd:complete-milestone {version}` — proceed anyway (accept tech debt) -``` +- cat .planning/v{version}-MILESTONE-AUDIT.md — see full report +- /gsd:complete-milestone {version} — proceed anyway (accept tech debt) + +─────────────────────────────────────────────────────────────── --- **If tech_debt (no blockers but accumulated debt):** -```markdown ## ⚡ Milestone {version} — Tech Debt Review **Score:** {N}/{M} requirements satisfied @@ -228,20 +231,21 @@ All requirements met. No critical blockers. Accumulated tech debt needs review. ### Total: {N} items across {M} phases ---- +─────────────────────────────────────────────────────────────── ## ▶ Options **A. Complete milestone** — accept debt, track in backlog -`/gsd:complete-milestone {version}` +/gsd:complete-milestone {version} **B. Plan cleanup phase** — address debt before completing -`/gsd:plan-milestone-gaps` +/gsd:plan-milestone-gaps -`/clear` first → fresh context window -``` +/clear first → fresh context window + +─────────────────────────────────────────────────────────────── diff --git a/commands/gsd/execute-phase.md b/commands/gsd/execute-phase.md index 6419a0b35..42b2d22f7 100644 --- a/commands/gsd/execute-phase.md +++ b/commands/gsd/execute-phase.md @@ -105,9 +105,7 @@ Phase: $ARGUMENTS -**MANDATORY: Present copy/paste-ready next command.** - -After verification completes, route based on status: +Output this markdown directly (not as a code block). Route based on status: | Status | Route | |--------|-------| @@ -120,7 +118,6 @@ After verification completes, route based on status: **Route A: Phase verified, more phases remain** -``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GSD ► PHASE {Z} COMPLETE ✓ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -136,24 +133,22 @@ Goal verified ✓ **Phase {Z+1}: {Name}** — {Goal from ROADMAP.md} -`/gsd:discuss-phase {Z+1}` — gather context and clarify approach +/gsd:discuss-phase {Z+1} — gather context and clarify approach -`/clear` first → fresh context window +/clear first → fresh context window ─────────────────────────────────────────────────────────────── **Also available:** -- `/gsd:plan-phase {Z+1}` — skip discussion, plan directly -- `/gsd:verify-work {Z}` — manual acceptance testing before continuing +- /gsd:plan-phase {Z+1} — skip discussion, plan directly +- /gsd:verify-work {Z} — manual acceptance testing before continuing ─────────────────────────────────────────────────────────────── -``` --- **Route B: Phase verified, milestone complete** -``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GSD ► MILESTONE COMPLETE 🎉 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -169,24 +164,22 @@ All phase goals verified ✓ **Audit milestone** — verify requirements, cross-phase integration, E2E flows -`/gsd:audit-milestone` +/gsd:audit-milestone -`/clear` first → fresh context window +/clear first → fresh context window ─────────────────────────────────────────────────────────────── **Also available:** -- `/gsd:verify-work` — manual acceptance testing -- `/gsd:complete-milestone` — skip audit, archive directly +- /gsd:verify-work — manual acceptance testing +- /gsd:complete-milestone — skip audit, archive directly ─────────────────────────────────────────────────────────────── -``` --- **Route C: Gaps found — need additional planning** -``` ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GSD ► PHASE {Z} GAPS FOUND ⚠ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -194,7 +187,7 @@ All phase goals verified ✓ **Phase {Z}: {Name}** Score: {N}/{M} must-haves verified -Report: `.planning/phases/{phase_dir}/{phase}-VERIFICATION.md` +Report: .planning/phases/{phase_dir}/{phase}-VERIFICATION.md ### What's Missing @@ -206,23 +199,24 @@ Report: `.planning/phases/{phase_dir}/{phase}-VERIFICATION.md` **Plan gap closure** — create additional plans to complete the phase -`/gsd:plan-phase {Z} --gaps` +/gsd:plan-phase {Z} --gaps -`/clear` first → fresh context window +/clear first → fresh context window ─────────────────────────────────────────────────────────────── **Also available:** -- `cat .planning/phases/{phase_dir}/{phase}-VERIFICATION.md` — see full report -- `/gsd:verify-work {Z}` — manual testing before planning +- cat .planning/phases/{phase_dir}/{phase}-VERIFICATION.md — see full report +- /gsd:verify-work {Z} — manual testing before planning ─────────────────────────────────────────────────────────────── -``` -After user runs `/gsd:plan-phase {Z} --gaps`: +--- + +After user runs /gsd:plan-phase {Z} --gaps: 1. Planner reads VERIFICATION.md gaps 2. Creates plans 04, 05, etc. to close gaps -3. User runs `/gsd:execute-phase {Z}` again +3. User runs /gsd:execute-phase {Z} again 4. Execute-phase runs incomplete plans (04, 05...) 5. Verifier runs again → loop until passed diff --git a/commands/gsd/plan-phase.md b/commands/gsd/plan-phase.md index 44f8df162..9775b24d8 100644 --- a/commands/gsd/plan-phase.md +++ b/commands/gsd/plan-phase.md @@ -419,7 +419,13 @@ Wait for user response. ## 13. Present Final Status -``` +Route to ``. + + + + +Output this markdown directly (not as a code block): + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ GSD ► PHASE {X} PLANNED ✓ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -440,20 +446,18 @@ Verification: {Passed | Passed with override | Skipped} **Execute Phase {X}** — run all {N} plans -`/gsd:execute-phase {X}` +/gsd:execute-phase {X} -`/clear` first → fresh context window +/clear first → fresh context window ─────────────────────────────────────────────────────────────── **Also available:** -- `cat .planning/phases/{phase-dir}/*-PLAN.md` — review plans -- `/gsd:plan-phase {X} --research` — re-research first +- cat .planning/phases/{phase-dir}/*-PLAN.md — review plans +- /gsd:plan-phase {X} --research — re-research first ─────────────────────────────────────────────────────────────── -``` - - + - [ ] .planning/ directory validated diff --git a/commands/gsd/verify-work.md b/commands/gsd/verify-work.md index ad8e25dba..c5ebb53a8 100644 --- a/commands/gsd/verify-work.md +++ b/commands/gsd/verify-work.md @@ -9,14 +9,15 @@ allowed-tools: - Grep - Edit - Write + - Task --- Validate built features through conversational testing with persistent state. -Purpose: Confirm what Claude built actually works from user's perspective. One test at a time, plain text responses, no interrogation. +Purpose: Confirm what Claude built actually works from user's perspective. One test at a time, plain text responses, no interrogation. When issues are found, automatically diagnose, plan fixes, and prepare for execution. -Output: {phase}-UAT.md tracking all test results, gaps logged for /gsd:plan-phase --gaps +Output: {phase}-UAT.md tracking all test results. If issues found: diagnosed gaps, verified fix plans ready for /gsd:execute-phase @@ -43,7 +44,13 @@ Phase: $ARGUMENTS (optional) - Wait for plain text response - "yes/y/next" = pass, anything else = issue (severity inferred) 6. Update UAT.md after each response -7. On completion: commit, present summary, offer next steps +7. On completion: commit, present summary +8. If issues found: + - Spawn parallel debug agents to diagnose root causes + - Spawn gsd-planner in --gaps mode to create fix plans + - Spawn gsd-plan-checker to verify fix plans + - Iterate planner ↔ checker until plans pass (max 3) + - Present ready status with `/clear` then `/gsd:execute-phase` @@ -51,7 +58,7 @@ Phase: $ARGUMENTS (optional) - Don't ask severity — infer from description - Don't present full checklist upfront — one test at a time - Don't run automated tests — this is manual user validation -- Don't fix issues during testing — log as gaps for /gsd:plan-phase --gaps +- Don't fix issues during testing — log as gaps, diagnose after all tests complete @@ -61,5 +68,8 @@ Phase: $ARGUMENTS (optional) - [ ] Severity inferred, never asked - [ ] Batched writes: on issue, every 5 passes, or completion - [ ] Committed on completion -- [ ] Clear next steps based on results +- [ ] If issues: parallel debug agents diagnose root causes +- [ ] If issues: gsd-planner creates fix plans from diagnosed gaps +- [ ] If issues: gsd-plan-checker verifies fix plans (max 3 iterations) +- [ ] Ready for `/gsd:execute-phase` when complete diff --git a/get-shit-done/workflows/diagnose-issues.md b/get-shit-done/workflows/diagnose-issues.md index c5bfe0f63..92778cffb 100644 --- a/get-shit-done/workflows/diagnose-issues.md +++ b/get-shit-done/workflows/diagnose-issues.md @@ -164,10 +164,13 @@ git commit -m "docs({phase}): add root causes from diagnosis" -**Report diagnosis results:** +**Report diagnosis results and hand off:** +Display: ``` -## Diagnosis Complete +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + GSD ► DIAGNOSIS COMPLETE +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | Gap (Truth) | Root Cause | Files | |-------------|------------|-------| @@ -175,26 +178,13 @@ git commit -m "docs({phase}): add root causes from diagnosis" | Reply button positioned correctly | CSS flex order incorrect | ReplyButton.tsx | | Delete removes comment | API missing auth header | api/comments.ts | -Debug sessions saved to ${DEBUG_DIR}/ +Debug sessions: ${DEBUG_DIR}/ ---- - -Next steps: -- `/gsd:plan-phase {phase} --gaps` — Create fix plans from diagnosed gaps -- Review debug sessions for details +Proceeding to plan fixes... ``` - - -**Offer gap closure:** - -``` -Root causes identified. Ready to plan fixes? - -`/gsd:plan-phase {phase} --gaps` - -The fix plans will use diagnosed root causes for targeted fixes. -``` +Return to verify-work orchestrator for automatic planning. +Do NOT offer manual next steps - verify-work handles the rest. @@ -239,5 +229,5 @@ The fix plans will use diagnosed root causes for targeted fixes. - [ ] Root causes collected from all agents - [ ] UAT.md gaps updated with artifacts and missing - [ ] Debug sessions saved to ${DEBUG_DIR}/ -- [ ] User knows next steps (plan-phase --gaps) +- [ ] Hand off to verify-work for automatic planning diff --git a/get-shit-done/workflows/verify-work.md b/get-shit-done/workflows/verify-work.md index d92a7411c..56c658f7d 100644 --- a/get-shit-done/workflows/verify-work.md +++ b/get-shit-done/workflows/verify-work.md @@ -334,28 +334,180 @@ Spawning parallel debug agents to investigate each issue. - Spawn parallel debug agents for each issue - Collect root causes - Update UAT.md with root causes -- Proceed to `offer_gap_closure` +- Proceed to `plan_gap_closure` Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate. - -**Offer next steps after diagnosis:** + +**Auto-plan fixes from diagnosed gaps:** + +Display: +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + GSD ► PLANNING FIXES +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +◆ Spawning planner for gap closure... +``` + +Spawn gsd-planner in --gaps mode: ``` ---- +Task( + prompt=""" + -## Diagnosis Complete +**Phase:** {phase_number} +**Mode:** gap_closure -| Gap | Root Cause | -|-----|------------| -| {truth 1} | {root_cause} | -| {truth 2} | {root_cause} | -... +**UAT with diagnoses:** +@.planning/phases/{phase_dir}/{phase}-UAT.md -Next steps: -- `/gsd:plan-phase {phase} --gaps` — Create fix plans from diagnosed gaps -- `/gsd:verify-work {phase}` — Re-test after fixes +**Project State:** +@.planning/STATE.md + +**Roadmap:** +@.planning/ROADMAP.md + + + + +Output consumed by /gsd:execute-phase +Plans must be executable prompts. + +""", + subagent_type="gsd-planner", + description="Plan gap fixes for Phase {phase}" +) +``` + +On return: +- **PLANNING COMPLETE:** Proceed to `verify_gap_plans` +- **PLANNING INCONCLUSIVE:** Report and offer manual intervention + + + +**Verify fix plans with checker:** + +Display: +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + GSD ► VERIFYING FIX PLANS +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +◆ Spawning plan checker... +``` + +Initialize: `iteration_count = 1` + +Spawn gsd-plan-checker: + +``` +Task( + prompt=""" + + +**Phase:** {phase_number} +**Phase Goal:** Close diagnosed gaps from UAT + +**Plans to verify:** +@.planning/phases/{phase_dir}/*-PLAN.md + + + + +Return one of: +- ## VERIFICATION PASSED — all checks pass +- ## ISSUES FOUND — structured issue list + +""", + subagent_type="gsd-plan-checker", + description="Verify Phase {phase} fix plans" +) +``` + +On return: +- **VERIFICATION PASSED:** Proceed to `present_ready` +- **ISSUES FOUND:** Proceed to `revision_loop` + + + +**Iterate planner ↔ checker until plans pass (max 3):** + +**If iteration_count < 3:** + +Display: `Sending back to planner for revision... (iteration {N}/3)` + +Spawn gsd-planner with revision context: + +``` +Task( + prompt=""" + + +**Phase:** {phase_number} +**Mode:** revision + +**Existing plans:** +@.planning/phases/{phase_dir}/*-PLAN.md + +**Checker issues:** +{structured_issues_from_checker} + + + + +Read existing PLAN.md files. Make targeted updates to address checker issues. +Do NOT replan from scratch unless issues are fundamental. + +""", + subagent_type="gsd-planner", + description="Revise Phase {phase} plans" +) +``` + +After planner returns → spawn checker again (verify_gap_plans logic) +Increment iteration_count + +**If iteration_count >= 3:** + +Display: `Max iterations reached. {N} issues remain.` + +Offer options: +1. Force proceed (execute despite issues) +2. Provide guidance (user gives direction, retry) +3. Abandon (exit, user runs /gsd:plan-phase manually) + +Wait for user response. + + + +**Present completion and next steps:** + +``` +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + GSD ► FIXES READY ✓ +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +**Phase {X}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created + +| Gap | Root Cause | Fix Plan | +|-----|------------|----------| +| {truth 1} | {root_cause} | {phase}-04 | +| {truth 2} | {root_cause} | {phase}-04 | + +Plans verified and ready for execution. + +─────────────────────────────────────────────────────────────── + +## ▶ Next Up + +**Execute fixes** — run fix plans + +`/clear` then `/gsd:execute-phase {phase}` + +─────────────────────────────────────────────────────────────── ``` @@ -403,5 +555,9 @@ Default to **major** if unclear. User can correct if needed. - [ ] Severity inferred from description (never asked) - [ ] Batched writes: on issue, every 5 passes, or completion - [ ] Committed on completion -- [ ] Clear next steps based on results (plan-phase --gaps if issues) +- [ ] If issues: parallel debug agents diagnose root causes +- [ ] If issues: gsd-planner creates fix plans (gap_closure mode) +- [ ] If issues: gsd-plan-checker verifies fix plans +- [ ] If issues: revision loop until plans pass (max 3 iterations) +- [ ] Ready for `/gsd:execute-phase` when complete