@undeemed/get-shit-done-codex 1.6.12 → 1.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +40 -7
  2. package/agents/gsd-codebase-mapper.md +761 -0
  3. package/agents/gsd-debugger.md +1198 -0
  4. package/agents/gsd-executor.md +419 -0
  5. package/agents/gsd-integration-checker.md +423 -0
  6. package/agents/gsd-phase-researcher.md +469 -0
  7. package/agents/gsd-plan-checker.md +622 -0
  8. package/agents/gsd-planner.md +1159 -0
  9. package/agents/gsd-project-researcher.md +618 -0
  10. package/agents/gsd-research-synthesizer.md +236 -0
  11. package/agents/gsd-roadmapper.md +639 -0
  12. package/agents/gsd-verifier.md +541 -0
  13. package/bin/install.js +108 -102
  14. package/commands/gsd/add-phase.md +17 -185
  15. package/commands/gsd/add-todo.md +23 -163
  16. package/commands/gsd/audit-milestone.md +3 -219
  17. package/commands/gsd/check-todos.md +20 -196
  18. package/commands/gsd/cleanup.md +18 -0
  19. package/commands/gsd/complete-milestone.md +2 -2
  20. package/commands/gsd/debug.md +13 -0
  21. package/commands/gsd/discuss-phase.md +13 -6
  22. package/commands/gsd/execute-phase.md +4 -266
  23. package/commands/gsd/health.md +22 -0
  24. package/commands/gsd/help.md +8 -369
  25. package/commands/gsd/insert-phase.md +9 -203
  26. package/commands/gsd/join-discord.md +18 -0
  27. package/commands/gsd/list-phase-assumptions.md +4 -4
  28. package/commands/gsd/map-codebase.md +1 -1
  29. package/commands/gsd/new-milestone.md +16 -682
  30. package/commands/gsd/new-project.md +12 -866
  31. package/commands/gsd/new-project.md.bak +1041 -0
  32. package/commands/gsd/pause-work.md +17 -105
  33. package/commands/gsd/plan-milestone-gaps.md +3 -247
  34. package/commands/gsd/plan-phase.md +13 -444
  35. package/commands/gsd/progress.md +5 -337
  36. package/commands/gsd/quick.md +40 -0
  37. package/commands/gsd/reapply-patches.md +110 -0
  38. package/commands/gsd/remove-phase.md +9 -315
  39. package/commands/gsd/research-phase.md +27 -20
  40. package/commands/gsd/resume-work.md +2 -2
  41. package/commands/gsd/set-profile.md +34 -0
  42. package/commands/gsd/settings.md +36 -0
  43. package/commands/gsd/update.md +25 -160
  44. package/commands/gsd/verify-work.md +6 -186
  45. package/get-shit-done/bin/gsd-tools.cjs +5243 -0
  46. package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
  47. package/get-shit-done/references/checkpoints.md +270 -283
  48. package/get-shit-done/references/decimal-phase-calculation.md +65 -0
  49. package/get-shit-done/references/git-integration.md +7 -13
  50. package/get-shit-done/references/git-planning-commit.md +38 -0
  51. package/get-shit-done/references/model-profile-resolution.md +34 -0
  52. package/get-shit-done/references/model-profiles.md +92 -0
  53. package/get-shit-done/references/phase-argument-parsing.md +61 -0
  54. package/get-shit-done/references/planning-config.md +196 -0
  55. package/get-shit-done/references/questioning.md +5 -1
  56. package/get-shit-done/references/verification-patterns.md +17 -0
  57. package/get-shit-done/templates/DEBUG.md +4 -4
  58. package/get-shit-done/templates/UAT.md +1 -1
  59. package/get-shit-done/templates/codebase/architecture.md +1 -1
  60. package/get-shit-done/templates/codebase/concerns.md +1 -1
  61. package/get-shit-done/templates/codebase/conventions.md +1 -1
  62. package/get-shit-done/templates/codebase/structure.md +9 -9
  63. package/get-shit-done/templates/config.json +10 -0
  64. package/get-shit-done/templates/context.md +7 -15
  65. package/get-shit-done/templates/continue-here.md +1 -1
  66. package/get-shit-done/templates/phase-prompt.md +32 -41
  67. package/get-shit-done/templates/planner-subagent-prompt.md +4 -4
  68. package/get-shit-done/templates/project.md +1 -1
  69. package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
  70. package/get-shit-done/templates/research.md +27 -4
  71. package/get-shit-done/templates/state.md +1 -31
  72. package/get-shit-done/templates/summary-complex.md +59 -0
  73. package/get-shit-done/templates/summary-minimal.md +41 -0
  74. package/get-shit-done/templates/summary-standard.md +48 -0
  75. package/get-shit-done/templates/summary.md +5 -28
  76. package/get-shit-done/templates/user-setup.md +8 -20
  77. package/get-shit-done/templates/verification-report.md +3 -3
  78. package/get-shit-done/workflows/add-phase.md +111 -0
  79. package/get-shit-done/workflows/add-todo.md +157 -0
  80. package/get-shit-done/workflows/audit-milestone.md +242 -0
  81. package/get-shit-done/workflows/check-todos.md +176 -0
  82. package/get-shit-done/workflows/cleanup.md +152 -0
  83. package/get-shit-done/workflows/complete-milestone.md +225 -301
  84. package/get-shit-done/workflows/diagnose-issues.md +3 -17
  85. package/get-shit-done/workflows/discovery-phase.md +11 -15
  86. package/get-shit-done/workflows/discuss-phase.md +105 -42
  87. package/get-shit-done/workflows/execute-phase.md +205 -349
  88. package/get-shit-done/workflows/execute-plan.md +179 -1569
  89. package/get-shit-done/workflows/health.md +156 -0
  90. package/get-shit-done/workflows/help.md +486 -0
  91. package/get-shit-done/workflows/insert-phase.md +129 -0
  92. package/get-shit-done/workflows/list-phase-assumptions.md +9 -9
  93. package/get-shit-done/workflows/map-codebase.md +56 -18
  94. package/get-shit-done/workflows/new-milestone.md +373 -0
  95. package/get-shit-done/workflows/new-project.md +1113 -0
  96. package/get-shit-done/workflows/pause-work.md +122 -0
  97. package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
  98. package/get-shit-done/workflows/plan-phase.md +448 -0
  99. package/get-shit-done/workflows/progress.md +393 -0
  100. package/get-shit-done/workflows/quick.md +444 -0
  101. package/get-shit-done/workflows/remove-phase.md +154 -0
  102. package/get-shit-done/workflows/research-phase.md +74 -0
  103. package/get-shit-done/workflows/resume-project.md +18 -23
  104. package/get-shit-done/workflows/set-profile.md +80 -0
  105. package/get-shit-done/workflows/settings.md +200 -0
  106. package/get-shit-done/workflows/transition.md +78 -103
  107. package/get-shit-done/workflows/update.md +214 -0
  108. package/get-shit-done/workflows/verify-phase.md +109 -496
  109. package/get-shit-done/workflows/verify-work.md +22 -15
  110. package/hooks/dist/gsd-check-update.js +66 -0
  111. package/hooks/dist/gsd-statusline.js +91 -0
  112. package/package.json +19 -3
  113. package/scripts/build-hooks.js +42 -0
  114. package/commands/gsd/whats-new.md +0 -124
@@ -1,8 +1,8 @@
1
1
  # User Setup Template
2
2
 
3
- Template for `.planning/phases/XX-name/{phase}-USER-SETUP.md` - human-required configuration that Claude cannot automate.
3
+ Template for `.planning/phases/XX-name/{phase}-USER-SETUP.md` - human-required configuration that Codex cannot automate.
4
4
 
5
- **Purpose:** Document setup tasks that literally require human action - account creation, dashboard configuration, secret retrieval. Claude automates everything possible; this file captures only what remains.
5
+ **Purpose:** Document setup tasks that literally require human action - account creation, dashboard configuration, secret retrieval. Codex automates everything possible; this file captures only what remains.
6
6
 
7
7
  ---
8
8
 
@@ -15,7 +15,7 @@ Template for `.planning/phases/XX-name/{phase}-USER-SETUP.md` - human-required c
15
15
  **Phase:** {phase-name}
16
16
  **Status:** Incomplete
17
17
 
18
- Complete these items for the integration to function. Claude automated everything possible; these items require human access to external dashboards/accounts.
18
+ Complete these items for the integration to function. Codex automated everything possible; these items require human access to external dashboards/accounts.
19
19
 
20
20
  ## Environment Variables
21
21
 
@@ -97,9 +97,9 @@ user_setup:
97
97
 
98
98
  ## The Automation-First Rule
99
99
 
100
- **USER-SETUP.md contains ONLY what Claude literally cannot do.**
100
+ **USER-SETUP.md contains ONLY what Codex literally cannot do.**
101
101
 
102
- | Claude CAN Do (not in USER-SETUP) | Claude CANNOT Do (→ USER-SETUP) |
102
+ | Codex CAN Do (not in USER-SETUP) | Codex CANNOT Do (→ USER-SETUP) |
103
103
  |-----------------------------------|--------------------------------|
104
104
  | `npm install stripe` | Create Stripe account |
105
105
  | Write webhook handler code | Get API keys from dashboard |
@@ -108,9 +108,9 @@ user_setup:
108
108
  | Configure package.json | Access external service dashboards |
109
109
  | Write any code | Retrieve secrets from third-party systems |
110
110
 
111
- **The test:** "Does this require a human in a browser, accessing an account Claude doesn't have credentials for?"
111
+ **The test:** "Does this require a human in a browser, accessing an account Codex doesn't have credentials for?"
112
112
  - Yes → USER-SETUP.md
113
- - No → Claude does it automatically
113
+ - No → Codex does it automatically
114
114
 
115
115
  ---
116
116
 
@@ -304,20 +304,8 @@ curl -X POST http://localhost:3000/api/test-email \
304
304
 
305
305
  ## Guidelines
306
306
 
307
- **Include in USER-SETUP.md:**
308
- - Environment variable names and where to find values
309
- - Account creation URLs (if new service)
310
- - Dashboard configuration steps
311
- - Verification commands to confirm setup works
312
- - Local development alternatives (e.g., `stripe listen`)
313
-
314
- **Do NOT include:**
315
- - Actual secret values (never)
316
- - Steps Claude can automate (package installs, code changes, file creation)
317
- - Generic instructions ("set up your environment")
307
+ **Never include:** Actual secret values. Steps Codex can automate (package installs, code changes).
318
308
 
319
309
  **Naming:** `{phase}-USER-SETUP.md` matches the phase number pattern.
320
-
321
310
  **Status tracking:** User marks checkboxes and updates status line when complete.
322
-
323
311
  **Searchability:** `grep -r "USER-SETUP" .planning/` finds all phases with user requirements.
@@ -1,6 +1,6 @@
1
1
  # Verification Report Template
2
2
 
3
- Template for `.planning/phases/XX-name/{phase}-VERIFICATION.md` — phase goal verification results.
3
+ Template for `.planning/phases/XX-name/{phase_num}-VERIFICATION.md` — phase goal verification results.
4
4
 
5
5
  ---
6
6
 
@@ -154,7 +154,7 @@ None — all verifiable items checked programmatically.
154
154
 
155
155
  ---
156
156
  *Verified: {timestamp}*
157
- *Verifier: Claude (subagent)*
157
+ *Verifier: Codex (subagent)*
158
158
  ```
159
159
 
160
160
  ---
@@ -318,5 +318,5 @@ None needed until automated gaps are fixed.
318
318
 
319
319
  ---
320
320
  *Verified: 2025-01-15T14:30:00Z*
321
- *Verifier: Claude (subagent)*
321
+ *Verifier: Codex (subagent)*
322
322
  ```
@@ -0,0 +1,111 @@
1
+ <purpose>
2
+ Add a new integer phase to the end of the current milestone in the roadmap. Automatically calculates next phase number, creates phase directory, and updates roadmap structure.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="parse_arguments">
12
+ Parse the command arguments:
13
+ - All arguments become the phase description
14
+ - Example: `/gsd:add-phase Add authentication` → description = "Add authentication"
15
+ - Example: `/gsd:add-phase Fix critical performance issues` → description = "Fix critical performance issues"
16
+
17
+ If no arguments provided:
18
+
19
+ ```
20
+ ERROR: Phase description required
21
+ Usage: /gsd:add-phase <description>
22
+ Example: /gsd:add-phase Add authentication system
23
+ ```
24
+
25
+ Exit.
26
+ </step>
27
+
28
+ <step name="init_context">
29
+ Load phase operation context:
30
+
31
+ ```bash
32
+ INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init phase-op "0")
33
+ ```
34
+
35
+ Check `roadmap_exists` from init JSON. If false:
36
+ ```
37
+ ERROR: No roadmap found (.planning/ROADMAP.md)
38
+ Run /gsd:new-project to initialize.
39
+ ```
40
+ Exit.
41
+ </step>
42
+
43
+ <step name="add_phase">
44
+ **Delegate the phase addition to gsd-tools:**
45
+
46
+ ```bash
47
+ RESULT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs phase add "${description}")
48
+ ```
49
+
50
+ The CLI handles:
51
+ - Finding the highest existing integer phase number
52
+ - Calculating next phase number (max + 1)
53
+ - Generating slug from description
54
+ - Creating the phase directory (`.planning/phases/{NN}-{slug}/`)
55
+ - Inserting the phase entry into ROADMAP.md with Goal, Depends on, and Plans sections
56
+
57
+ Extract from result: `phase_number`, `padded`, `name`, `slug`, `directory`.
58
+ </step>
59
+
60
+ <step name="update_project_state">
61
+ Update STATE.md to reflect the new phase:
62
+
63
+ 1. Read `.planning/STATE.md`
64
+ 2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
65
+ ```
66
+ - Phase {N} added: {description}
67
+ ```
68
+
69
+ If "Roadmap Evolution" section doesn't exist, create it.
70
+ </step>
71
+
72
+ <step name="completion">
73
+ Present completion summary:
74
+
75
+ ```
76
+ Phase {N} added to current milestone:
77
+ - Description: {description}
78
+ - Directory: .planning/phases/{phase-num}-{slug}/
79
+ - Status: Not planned yet
80
+
81
+ Roadmap updated: .planning/ROADMAP.md
82
+
83
+ ---
84
+
85
+ ## ▶ Next Up
86
+
87
+ **Phase {N}: {description}**
88
+
89
+ `/gsd:plan-phase {N}`
90
+
91
+ <sub>`/clear` first → fresh context window</sub>
92
+
93
+ ---
94
+
95
+ **Also available:**
96
+ - `/gsd:add-phase <description>` — add another phase
97
+ - Review roadmap
98
+
99
+ ---
100
+ ```
101
+ </step>
102
+
103
+ </process>
104
+
105
+ <success_criteria>
106
+ - [ ] `gsd-tools phase add` executed successfully
107
+ - [ ] Phase directory created
108
+ - [ ] Roadmap updated with new phase entry
109
+ - [ ] STATE.md updated with roadmap evolution note
110
+ - [ ] User informed of next steps
111
+ </success_criteria>
@@ -0,0 +1,157 @@
1
+ <purpose>
2
+ Capture an idea, task, or issue that surfaces during a GSD session as a structured todo for later work. Enables "thought → capture → continue" flow without losing context.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ <step name="init_context">
12
+ Load todo context:
13
+
14
+ ```bash
15
+ INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init todos)
16
+ ```
17
+
18
+ Extract from init JSON: `commit_docs`, `date`, `timestamp`, `todo_count`, `todos`, `pending_dir`, `todos_dir_exists`.
19
+
20
+ Ensure directories exist:
21
+ ```bash
22
+ mkdir -p .planning/todos/pending .planning/todos/done
23
+ ```
24
+
25
+ Note existing areas from the todos array for consistency in infer_area step.
26
+ </step>
27
+
28
+ <step name="extract_content">
29
+ **With arguments:** Use as the title/focus.
30
+ - `/gsd:add-todo Add auth token refresh` → title = "Add auth token refresh"
31
+
32
+ **Without arguments:** Analyze recent conversation to extract:
33
+ - The specific problem, idea, or task discussed
34
+ - Relevant file paths mentioned
35
+ - Technical details (error messages, line numbers, constraints)
36
+
37
+ Formulate:
38
+ - `title`: 3-10 word descriptive title (action verb preferred)
39
+ - `problem`: What's wrong or why this is needed
40
+ - `solution`: Approach hints or "TBD" if just an idea
41
+ - `files`: Relevant paths with line numbers from conversation
42
+ </step>
43
+
44
+ <step name="infer_area">
45
+ Infer area from file paths:
46
+
47
+ | Path pattern | Area |
48
+ |--------------|------|
49
+ | `src/api/*`, `api/*` | `api` |
50
+ | `src/components/*`, `src/ui/*` | `ui` |
51
+ | `src/auth/*`, `auth/*` | `auth` |
52
+ | `src/db/*`, `database/*` | `database` |
53
+ | `tests/*`, `__tests__/*` | `testing` |
54
+ | `docs/*` | `docs` |
55
+ | `.planning/*` | `planning` |
56
+ | `scripts/*`, `bin/*` | `tooling` |
57
+ | No files or unclear | `general` |
58
+
59
+ Use existing area from step 2 if similar match exists.
60
+ </step>
61
+
62
+ <step name="check_duplicates">
63
+ ```bash
64
+ # Search for key words from title in existing todos
65
+ grep -l -i "[key words from title]" .planning/todos/pending/*.md 2>/dev/null
66
+ ```
67
+
68
+ If potential duplicate found:
69
+ 1. Read the existing todo
70
+ 2. Compare scope
71
+
72
+ If overlapping, use AskUserQuestion:
73
+ - header: "Duplicate?"
74
+ - question: "Similar todo exists: [title]. What would you like to do?"
75
+ - options:
76
+ - "Skip" — keep existing todo
77
+ - "Replace" — update existing with new context
78
+ - "Add anyway" — create as separate todo
79
+ </step>
80
+
81
+ <step name="create_file">
82
+ Use values from init context: `timestamp` and `date` are already available.
83
+
84
+ Generate slug for the title:
85
+ ```bash
86
+ slug=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs generate-slug "$title" --raw)
87
+ ```
88
+
89
+ Write to `.planning/todos/pending/${date}-${slug}.md`:
90
+
91
+ ```markdown
92
+ ---
93
+ created: [timestamp]
94
+ title: [title]
95
+ area: [area]
96
+ files:
97
+ - [file:lines]
98
+ ---
99
+
100
+ ## Problem
101
+
102
+ [problem description - enough context for future Codex to understand weeks later]
103
+
104
+ ## Solution
105
+
106
+ [approach hints or "TBD"]
107
+ ```
108
+ </step>
109
+
110
+ <step name="update_state">
111
+ If `.planning/STATE.md` exists:
112
+
113
+ 1. Use `todo_count` from init context (or re-run `init todos` if count changed)
114
+ 2. Update "### Pending Todos" under "## Accumulated Context"
115
+ </step>
116
+
117
+ <step name="git_commit">
118
+ Commit the todo and any updated state:
119
+
120
+ ```bash
121
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs: capture todo - [title]" --files .planning/todos/pending/[filename] .planning/STATE.md
122
+ ```
123
+
124
+ Tool respects `commit_docs` config and gitignore automatically.
125
+
126
+ Confirm: "Committed: docs: capture todo - [title]"
127
+ </step>
128
+
129
+ <step name="confirm">
130
+ ```
131
+ Todo saved: .planning/todos/pending/[filename]
132
+
133
+ [title]
134
+ Area: [area]
135
+ Files: [count] referenced
136
+
137
+ ---
138
+
139
+ Would you like to:
140
+
141
+ 1. Continue with current work
142
+ 2. Add another todo
143
+ 3. View all todos (/gsd:check-todos)
144
+ ```
145
+ </step>
146
+
147
+ </process>
148
+
149
+ <success_criteria>
150
+ - [ ] Directory structure exists
151
+ - [ ] Todo file created with valid frontmatter
152
+ - [ ] Problem section has enough context for future Codex
153
+ - [ ] No duplicates (checked and resolved)
154
+ - [ ] Area consistent with existing todos
155
+ - [ ] STATE.md updated if exists
156
+ - [ ] Todo and state committed to git
157
+ </success_criteria>
@@ -0,0 +1,242 @@
1
+ <purpose>
2
+ Verify milestone achieved its definition of done by aggregating phase verifications, checking cross-phase integration, and assessing requirements coverage. Reads existing VERIFICATION.md files (phases already verified during execute-phase), aggregates tech debt and deferred gaps, then spawns integration checker for cross-phase wiring.
3
+ </purpose>
4
+
5
+ <required_reading>
6
+ Read all files referenced by the invoking prompt's execution_context before starting.
7
+ </required_reading>
8
+
9
+ <process>
10
+
11
+ ## 0. Initialize Milestone Context
12
+
13
+ ```bash
14
+ INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init milestone-op)
15
+ ```
16
+
17
+ Extract from init JSON: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `commit_docs`.
18
+
19
+ Resolve integration checker model:
20
+ ```bash
21
+ CHECKER_MODEL=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs resolve-model gsd-integration-checker --raw)
22
+ ```
23
+
24
+ ## 1. Determine Milestone Scope
25
+
26
+ ```bash
27
+ # Get phases in milestone (sorted numerically, handles decimals)
28
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs phases list
29
+ ```
30
+
31
+ - Parse version from arguments or detect current from ROADMAP.md
32
+ - Identify all phase directories in scope
33
+ - Extract milestone definition of done from ROADMAP.md
34
+ - Extract requirements mapped to this milestone from REQUIREMENTS.md
35
+
36
+ ## 2. Read All Phase Verifications
37
+
38
+ For each phase directory, read the VERIFICATION.md:
39
+
40
+ ```bash
41
+ # For each phase, use find-phase to resolve the directory (handles archived phases)
42
+ PHASE_INFO=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs find-phase 01 --raw)
43
+ # Extract directory from JSON, then read VERIFICATION.md from that directory
44
+ # Repeat for each phase number from ROADMAP.md
45
+ ```
46
+
47
+ From each VERIFICATION.md, extract:
48
+ - **Status:** passed | gaps_found
49
+ - **Critical gaps:** (if any — these are blockers)
50
+ - **Non-critical gaps:** tech debt, deferred items, warnings
51
+ - **Anti-patterns found:** TODOs, stubs, placeholders
52
+ - **Requirements coverage:** which requirements satisfied/blocked
53
+
54
+ If a phase is missing VERIFICATION.md, flag it as "unverified phase" — this is a blocker.
55
+
56
+ ## 3. Spawn Integration Checker
57
+
58
+ With phase context collected:
59
+
60
+ ```
61
+ Task(
62
+ prompt="Check cross-phase integration and E2E flows.
63
+
64
+ Phases: {phase_dirs}
65
+ Phase exports: {from SUMMARYs}
66
+ API routes: {routes created}
67
+
68
+ Verify cross-phase wiring and E2E user flows.",
69
+ subagent_type="gsd-integration-checker",
70
+ model="{integration_checker_model}"
71
+ )
72
+ ```
73
+
74
+ ## 4. Collect Results
75
+
76
+ Combine:
77
+ - Phase-level gaps and tech debt (from step 2)
78
+ - Integration checker's report (wiring gaps, broken flows)
79
+
80
+ ## 5. Check Requirements Coverage
81
+
82
+ For each requirement in REQUIREMENTS.md mapped to this milestone:
83
+ - Find owning phase
84
+ - Check phase verification status
85
+ - Determine: satisfied | partial | unsatisfied
86
+
87
+ ## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
88
+
89
+ Create `.planning/v{version}-v{version}-MILESTONE-AUDIT.md` with:
90
+
91
+ ```yaml
92
+ ---
93
+ milestone: {version}
94
+ audited: {timestamp}
95
+ status: passed | gaps_found | tech_debt
96
+ scores:
97
+ requirements: N/M
98
+ phases: N/M
99
+ integration: N/M
100
+ flows: N/M
101
+ gaps: # Critical blockers
102
+ requirements: [...]
103
+ integration: [...]
104
+ flows: [...]
105
+ tech_debt: # Non-critical, deferred
106
+ - phase: 01-auth
107
+ items:
108
+ - "TODO: add rate limiting"
109
+ - "Warning: no password strength validation"
110
+ - phase: 03-dashboard
111
+ items:
112
+ - "Deferred: mobile responsive layout"
113
+ ---
114
+ ```
115
+
116
+ Plus full markdown report with tables for requirements, phases, integration, tech debt.
117
+
118
+ **Status values:**
119
+ - `passed` — all requirements met, no critical gaps, minimal tech debt
120
+ - `gaps_found` — critical blockers exist
121
+ - `tech_debt` — no blockers but accumulated deferred items need review
122
+
123
+ ## 7. Present Results
124
+
125
+ Route by status (see `<offer_next>`).
126
+
127
+ </process>
128
+
129
+ <offer_next>
130
+ Output this markdown directly (not as a code block). Route based on status:
131
+
132
+ ---
133
+
134
+ **If passed:**
135
+
136
+ ## ✓ Milestone {version} — Audit Passed
137
+
138
+ **Score:** {N}/{M} requirements satisfied
139
+ **Report:** .planning/v{version}-MILESTONE-AUDIT.md
140
+
141
+ All requirements covered. Cross-phase integration verified. E2E flows complete.
142
+
143
+ ───────────────────────────────────────────────────────────────
144
+
145
+ ## ▶ Next Up
146
+
147
+ **Complete milestone** — archive and tag
148
+
149
+ /gsd:complete-milestone {version}
150
+
151
+ <sub>/clear first → fresh context window</sub>
152
+
153
+ ───────────────────────────────────────────────────────────────
154
+
155
+ ---
156
+
157
+ **If gaps_found:**
158
+
159
+ ## ⚠ Milestone {version} — Gaps Found
160
+
161
+ **Score:** {N}/{M} requirements satisfied
162
+ **Report:** .planning/v{version}-MILESTONE-AUDIT.md
163
+
164
+ ### Unsatisfied Requirements
165
+
166
+ {For each unsatisfied requirement:}
167
+ - **{REQ-ID}: {description}** (Phase {X})
168
+ - {reason}
169
+
170
+ ### Cross-Phase Issues
171
+
172
+ {For each integration gap:}
173
+ - **{from} → {to}:** {issue}
174
+
175
+ ### Broken Flows
176
+
177
+ {For each flow gap:}
178
+ - **{flow name}:** breaks at {step}
179
+
180
+ ───────────────────────────────────────────────────────────────
181
+
182
+ ## ▶ Next Up
183
+
184
+ **Plan gap closure** — create phases to complete milestone
185
+
186
+ /gsd:plan-milestone-gaps
187
+
188
+ <sub>/clear first → fresh context window</sub>
189
+
190
+ ───────────────────────────────────────────────────────────────
191
+
192
+ **Also available:**
193
+ - cat .planning/v{version}-MILESTONE-AUDIT.md — see full report
194
+ - /gsd:complete-milestone {version} — proceed anyway (accept tech debt)
195
+
196
+ ───────────────────────────────────────────────────────────────
197
+
198
+ ---
199
+
200
+ **If tech_debt (no blockers but accumulated debt):**
201
+
202
+ ## ⚡ Milestone {version} — Tech Debt Review
203
+
204
+ **Score:** {N}/{M} requirements satisfied
205
+ **Report:** .planning/v{version}-MILESTONE-AUDIT.md
206
+
207
+ All requirements met. No critical blockers. Accumulated tech debt needs review.
208
+
209
+ ### Tech Debt by Phase
210
+
211
+ {For each phase with debt:}
212
+ **Phase {X}: {name}**
213
+ - {item 1}
214
+ - {item 2}
215
+
216
+ ### Total: {N} items across {M} phases
217
+
218
+ ───────────────────────────────────────────────────────────────
219
+
220
+ ## ▶ Options
221
+
222
+ **A. Complete milestone** — accept debt, track in backlog
223
+
224
+ /gsd:complete-milestone {version}
225
+
226
+ **B. Plan cleanup phase** — address debt before completing
227
+
228
+ /gsd:plan-milestone-gaps
229
+
230
+ <sub>/clear first → fresh context window</sub>
231
+
232
+ ───────────────────────────────────────────────────────────────
233
+ </offer_next>
234
+
235
+ <success_criteria>
236
+ - [ ] Milestone scope identified
237
+ - [ ] All phase VERIFICATION.md files read
238
+ - [ ] Tech debt and deferred gaps aggregated
239
+ - [ ] Integration checker spawned for cross-phase wiring
240
+ - [ ] v{version}-MILESTONE-AUDIT.md created
241
+ - [ ] Results presented with actionable next steps
242
+ </success_criteria>