pi-gsd 1.12.4 → 2.0.0

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 (120) hide show
  1. package/.gsd/extensions/pi-gsd-hooks.ts +202 -40
  2. package/.gsd/harnesses/pi/get-shit-done/workflows/add-phase.md +66 -11
  3. package/.gsd/harnesses/pi/get-shit-done/workflows/add-tests.md +69 -4
  4. package/.gsd/harnesses/pi/get-shit-done/workflows/add-todo.md +30 -4
  5. package/.gsd/harnesses/pi/get-shit-done/workflows/audit-milestone.md +75 -17
  6. package/.gsd/harnesses/pi/get-shit-done/workflows/audit-uat.md +38 -0
  7. package/.gsd/harnesses/pi/get-shit-done/workflows/autonomous.md +95 -286
  8. package/.gsd/harnesses/pi/get-shit-done/workflows/check-todos.md +67 -4
  9. package/.gsd/harnesses/pi/get-shit-done/workflows/cleanup.md +25 -0
  10. package/.gsd/harnesses/pi/get-shit-done/workflows/complete-milestone.md +51 -529
  11. package/.gsd/harnesses/pi/get-shit-done/workflows/diagnose-issues.md +39 -0
  12. package/.gsd/harnesses/pi/get-shit-done/workflows/discovery-phase.md +2 -0
  13. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase-assumptions.md +80 -5
  14. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase.md +43 -5
  15. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase.md.bak +1049 -0
  16. package/.gsd/harnesses/pi/get-shit-done/workflows/do.md +30 -3
  17. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-milestone.md +64 -0
  18. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-phase.md +78 -20
  19. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-phase.md.bak +846 -0
  20. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-plan.md +56 -19
  21. package/.gsd/harnesses/pi/get-shit-done/workflows/fast.md +2 -0
  22. package/.gsd/harnesses/pi/get-shit-done/workflows/forensics.md +40 -0
  23. package/.gsd/harnesses/pi/get-shit-done/workflows/health.md +25 -0
  24. package/.gsd/harnesses/pi/get-shit-done/workflows/help.md +2 -0
  25. package/.gsd/harnesses/pi/get-shit-done/workflows/insert-phase.md +69 -11
  26. package/.gsd/harnesses/pi/get-shit-done/workflows/list-phase-assumptions.md +2 -0
  27. package/.gsd/harnesses/pi/get-shit-done/workflows/list-workspaces.md +51 -4
  28. package/.gsd/harnesses/pi/get-shit-done/workflows/manager.md +81 -8
  29. package/.gsd/harnesses/pi/get-shit-done/workflows/map-codebase.md +40 -5
  30. package/.gsd/harnesses/pi/get-shit-done/workflows/milestone-summary.md +66 -48
  31. package/.gsd/harnesses/pi/get-shit-done/workflows/new-milestone.md +41 -13
  32. package/.gsd/harnesses/pi/get-shit-done/workflows/new-milestone.md.bak +486 -0
  33. package/.gsd/harnesses/pi/get-shit-done/workflows/new-project.md +43 -7
  34. package/.gsd/harnesses/pi/get-shit-done/workflows/new-project.md.bak +1250 -0
  35. package/.gsd/harnesses/pi/get-shit-done/workflows/new-workspace.md +55 -4
  36. package/.gsd/harnesses/pi/get-shit-done/workflows/next.md +39 -0
  37. package/.gsd/harnesses/pi/get-shit-done/workflows/node-repair.md +2 -0
  38. package/.gsd/harnesses/pi/get-shit-done/workflows/note.md +2 -0
  39. package/.gsd/harnesses/pi/get-shit-done/workflows/pause-work.md +46 -0
  40. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-milestone-gaps.md +39 -0
  41. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-milestone.md +40 -0
  42. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-phase.md +57 -7
  43. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-phase.md.bak +859 -0
  44. package/.gsd/harnesses/pi/get-shit-done/workflows/plant-seed.md +28 -0
  45. package/.gsd/harnesses/pi/get-shit-done/workflows/pr-branch.md +2 -0
  46. package/.gsd/harnesses/pi/get-shit-done/workflows/profile-user.md +51 -0
  47. package/.gsd/harnesses/pi/get-shit-done/workflows/progress.md +52 -4
  48. package/.gsd/harnesses/pi/get-shit-done/workflows/quick.md +99 -32
  49. package/.gsd/harnesses/pi/get-shit-done/workflows/remove-phase.md +66 -4
  50. package/.gsd/harnesses/pi/get-shit-done/workflows/remove-workspace.md +55 -4
  51. package/.gsd/harnesses/pi/get-shit-done/workflows/research-phase.md +79 -22
  52. package/.gsd/harnesses/pi/get-shit-done/workflows/resume-project.md +66 -4
  53. package/.gsd/harnesses/pi/get-shit-done/workflows/review.md +66 -36
  54. package/.gsd/harnesses/pi/get-shit-done/workflows/session-report.md +2 -0
  55. package/.gsd/harnesses/pi/get-shit-done/workflows/settings.md +27 -5
  56. package/.gsd/harnesses/pi/get-shit-done/workflows/ship.md +41 -4
  57. package/.gsd/harnesses/pi/get-shit-done/workflows/stats.md +24 -0
  58. package/.gsd/harnesses/pi/get-shit-done/workflows/transition.md +54 -0
  59. package/.gsd/harnesses/pi/get-shit-done/workflows/ui-phase.md +91 -6
  60. package/.gsd/harnesses/pi/get-shit-done/workflows/ui-review.md +80 -5
  61. package/.gsd/harnesses/pi/get-shit-done/workflows/update.md +2 -0
  62. package/.gsd/harnesses/pi/get-shit-done/workflows/validate-phase.md +90 -17
  63. package/.gsd/harnesses/pi/get-shit-done/workflows/verify-phase.md +79 -4
  64. package/.gsd/harnesses/pi/get-shit-done/workflows/verify-work.md +87 -31
  65. package/README.md +146 -112
  66. package/dist/pi-gsd-tools.js +166 -163
  67. package/package.json +13 -5
  68. package/prompts/gsd-add-backlog.md +2 -3
  69. package/prompts/gsd-add-phase.md +3 -2
  70. package/prompts/gsd-add-tests.md +3 -2
  71. package/prompts/gsd-add-todo.md +3 -2
  72. package/prompts/gsd-audit-milestone.md +3 -2
  73. package/prompts/gsd-audit-uat.md +3 -2
  74. package/prompts/gsd-autonomous.md +3 -2
  75. package/prompts/gsd-check-todos.md +3 -2
  76. package/prompts/gsd-cleanup.md +3 -2
  77. package/prompts/gsd-complete-milestone.md +2 -3
  78. package/prompts/gsd-debug.md +2 -3
  79. package/prompts/gsd-discuss-phase.md +4 -3
  80. package/prompts/gsd-do.md +3 -2
  81. package/prompts/gsd-execute-milestone.md +3 -2
  82. package/prompts/gsd-execute-phase.md +3 -2
  83. package/prompts/gsd-fast.md +2 -1
  84. package/prompts/gsd-forensics.md +3 -2
  85. package/prompts/gsd-insert-phase.md +3 -2
  86. package/prompts/gsd-join-discord.md +2 -3
  87. package/prompts/gsd-list-phase-assumptions.md +2 -1
  88. package/prompts/gsd-list-workspaces.md +3 -2
  89. package/prompts/gsd-manager.md +3 -2
  90. package/prompts/gsd-map-codebase.md +3 -2
  91. package/prompts/gsd-milestone-summary.md +3 -2
  92. package/prompts/gsd-new-milestone.md +3 -2
  93. package/prompts/gsd-new-project.md +3 -2
  94. package/prompts/gsd-new-workspace.md +3 -2
  95. package/prompts/gsd-note.md +2 -1
  96. package/prompts/gsd-pause-work.md +3 -2
  97. package/prompts/gsd-plan-milestone-gaps.md +3 -2
  98. package/prompts/gsd-plan-milestone.md +3 -2
  99. package/prompts/gsd-plan-phase.md +3 -2
  100. package/prompts/gsd-plant-seed.md +3 -2
  101. package/prompts/gsd-pr-branch.md +2 -1
  102. package/prompts/gsd-profile-user.md +3 -2
  103. package/prompts/gsd-quick.md +3 -2
  104. package/prompts/gsd-reapply-patches.md +2 -3
  105. package/prompts/gsd-remove-phase.md +3 -2
  106. package/prompts/gsd-remove-workspace.md +3 -2
  107. package/prompts/gsd-research-phase.md +2 -3
  108. package/prompts/gsd-resume-work.md +3 -2
  109. package/prompts/gsd-review-backlog.md +2 -3
  110. package/prompts/gsd-review.md +3 -2
  111. package/prompts/gsd-session-report.md +2 -1
  112. package/prompts/gsd-set-profile.md +2 -3
  113. package/prompts/gsd-settings.md +3 -2
  114. package/prompts/gsd-ship.md +3 -2
  115. package/prompts/gsd-thread.md +2 -3
  116. package/prompts/gsd-ui-phase.md +3 -2
  117. package/prompts/gsd-ui-review.md +3 -2
  118. package/prompts/gsd-validate-phase.md +3 -2
  119. package/prompts/gsd-verify-work.md +3 -2
  120. package/prompts/gsd-workstreams.md +2 -3
@@ -1,3 +1,93 @@
1
+ <gsd-version v="1.12.4" />
2
+
3
+ <gsd-arguments>
4
+ <settings><keep-extra-args /></settings>
5
+ <arg name="from" type="number" optional />
6
+ <arg name="to" type="number" optional />
7
+ </gsd-arguments>
8
+
9
+ <gsd-execute>
10
+ <shell command="pi-gsd-tools">
11
+ <args>
12
+ <arg string="pi-gsd-tools" />
13
+ <arg string="roadmap" />
14
+ <arg string="analyze" />
15
+ <arg string="--raw" />
16
+ </args>
17
+ <outs>
18
+ <out type="string" name="roadmap" />
19
+ </outs>
20
+ </shell>
21
+ <shell command="pi-gsd-tools">
22
+ <args>
23
+ <arg string="pi-gsd-tools" />
24
+ <arg string="state" />
25
+ <arg string="json" />
26
+ <arg string="--raw" />
27
+ </args>
28
+ <outs>
29
+ <out type="string" name="state" />
30
+ </outs>
31
+ </shell>
32
+ <shell command="pi-gsd-tools">
33
+ <args>
34
+ <arg string="pi-gsd-tools" />
35
+ <arg string="init" />
36
+ <arg string="milestone-op" />
37
+ </args>
38
+ <outs>
39
+ <out type="string" name="milestone-data" />
40
+ </outs>
41
+ </shell>
42
+ <if>
43
+ <condition>
44
+ <starts-with>
45
+ <left name="milestone-data" />
46
+ <right type="string" value="@file:" />
47
+ </starts-with>
48
+ </condition>
49
+ <then>
50
+ <string-op op="split">
51
+ <args>
52
+ <arg name="milestone-data" />
53
+ <arg type="string" value="@file:" />
54
+ </args>
55
+ <outs>
56
+ <out type="string" name="milestone-data-file" />
57
+ </outs>
58
+ </string-op>
59
+ <shell command="cat">
60
+ <args>
61
+ <arg name="milestone-data-file" wrap='"' />
62
+ </args>
63
+ <outs>
64
+ <out type="string" name="milestone-data" />
65
+ </outs>
66
+ </shell>
67
+ </then>
68
+ </if>
69
+ <!-- SET _auto_chain_active when chain starts — cleared by chain completion/pause, not by absence of --auto -->
70
+ <shell command="pi-gsd-tools">
71
+ <args>
72
+ <arg string="config-set" />
73
+ <arg string="workflow._auto_chain_active" />
74
+ <arg string="true" />
75
+ </args>
76
+ <outs><suppress-errors /></outs>
77
+ </shell>
78
+ </gsd-execute>
79
+
80
+ ## Context (pre-injected)
81
+
82
+ **Roadmap:**
83
+ <gsd-paste name="roadmap" />
84
+
85
+ **State:**
86
+ <gsd-paste name="state" />
87
+
88
+ **Milestone Data:**
89
+ <gsd-paste name="milestone-data" />
90
+
1
91
  <purpose>
2
92
 
3
93
  Drive all remaining milestone phases autonomously. For each incomplete phase: discuss → plan → execute using Skill() flat invocations. Pauses only for explicit user decisions (grey area acceptance, blockers, validation requests). Re-reads ROADMAP.md after each phase to catch dynamically inserted phases.
@@ -18,19 +108,7 @@ Read all files referenced by the invoking prompt's execution_context before star
18
108
 
19
109
  Parse `$ARGUMENTS` for `--from N` flag:
20
110
 
21
- ```bash
22
- FROM_PHASE=""
23
- if echo "$ARGUMENTS" | grep -qE '\-\-from\s+[0-9]'; then
24
- FROM_PHASE=$(echo "$ARGUMENTS" | grep -oE '\-\-from\s+[0-9]+\.?[0-9]*' | awk '{print $2}')
25
- fi
26
- ```
27
-
28
- Bootstrap via milestone-level init:
29
-
30
- ```bash
31
- INIT=$(pi-gsd-tools init milestone-op)
32
- if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
33
- ```
111
+ <!-- Context pre-injected above via WXP — variables available via <gsd-paste name="..."> -->
34
112
 
35
113
  Parse JSON for: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `roadmap_exists`, `state_exists`, `commit_docs`.
36
114
 
@@ -58,74 +136,7 @@ If `FROM_PHASE` is set, display: `Starting from phase ${FROM_PHASE}`
58
136
 
59
137
  Run phase discovery:
60
138
 
61
- ```bash
62
- ROADMAP=$(pi-gsd-tools roadmap analyze)
63
- ```
64
-
65
- Parse the JSON `phases` array.
66
-
67
- **Filter to incomplete phases:** Keep only phases where `disk_status !== "complete"` OR `roadmap_complete === false`.
68
-
69
- **Apply `--from N` filter:** If `FROM_PHASE` was provided, additionally filter out phases where `number < FROM_PHASE` (use numeric comparison - handles decimal phases like "5.1").
70
-
71
- **Sort by `number`** in numeric ascending order.
72
-
73
- **If no incomplete phases remain:**
74
-
75
- ```
76
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
- GSD ► AUTONOMOUS ▸ COMPLETE 🎉
78
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
79
-
80
- All phases complete! Nothing left to do.
81
- ```
82
-
83
- Exit cleanly.
84
-
85
- **Display phase plan:**
86
-
87
- ```
88
- ## Phase Plan
89
-
90
- | # | Phase | Status |
91
- | --- | ----------------------------------- | ----------- |
92
- | 5 | Skill Scaffolding & Phase Discovery | In Progress |
93
- | 6 | Smart Discuss | Not Started |
94
- | 7 | Auto-Chain Refinements | Not Started |
95
- | 8 | Lifecycle Orchestration | Not Started |
96
- ```
97
-
98
- **Fetch details for each phase:**
99
-
100
- ```bash
101
- DETAIL=$(pi-gsd-tools roadmap get-phase ${PHASE_NUM})
102
- ```
103
-
104
- Extract `phase_name`, `goal`, `success_criteria` from each. Store for use in execute_phase and transition messages.
105
-
106
- </step>
107
-
108
- <step name="execute_phase">
109
-
110
- ## 3. Execute Phase
111
-
112
- For the current phase, display the progress banner:
113
-
114
- ```
115
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
- GSD ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}%
117
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
118
- ```
119
-
120
- Where N = current phase number (from the ROADMAP, e.g., 6), T = total milestone phases (from `phase_count` parsed in initialize step, e.g., 8), P = percentage of all milestone phases completed so far. Calculate P as: (number of phases with `disk_status` "complete" from the latest `roadmap analyze` / T × 100). Use █ for filled and ░ for empty segments in the progress bar (8 characters wide).
121
-
122
- **3a. Smart Discuss**
123
-
124
- Check if CONTEXT.md already exists for this phase:
125
-
126
- ```bash
127
- PHASE_STATE=$(pi-gsd-tools init phase-op ${PHASE_NUM})
128
- ```
139
+ <!-- Context pre-injected above via WXP — variables available via <gsd-paste name="..."> -->
129
140
 
130
141
  Parse `has_context` from JSON.
131
142
 
@@ -139,83 +150,7 @@ Proceed to 3b.
139
150
 
140
151
  **If has_context is false:** Check if discuss is disabled via settings:
141
152
 
142
- ```bash
143
- SKIP_DISCUSS=$(pi-gsd-tools config-get workflow.skip_discuss 2>/dev/null || echo "false")
144
- ```
145
-
146
- **If SKIP_DISCUSS is `true`:** Skip discuss entirely - the ROADMAP phase description is the spec. Display:
147
-
148
- ```
149
- Phase ${PHASE_NUM}: Discuss skipped (workflow.skip_discuss=true) - using ROADMAP phase goal as spec.
150
- ```
151
-
152
- Write a minimal CONTEXT.md so downstream plan-phase has valid input. Get phase details:
153
-
154
- ```bash
155
- DETAIL=$(pi-gsd-tools roadmap get-phase ${PHASE_NUM})
156
- ```
157
-
158
- Extract `goal` and `requirements` from JSON. Write `${phase_dir}/${padded_phase}-CONTEXT.md` with:
159
-
160
- ```markdown
161
- # Phase {PHASE_NUM}: {Phase Name} - Context
162
-
163
- **Gathered:** {date}
164
- **Status:** Ready for planning
165
- **Mode:** Auto-generated (discuss skipped via workflow.skip_discuss)
166
-
167
- <domain>
168
- ## Phase Boundary
169
-
170
- {goal from ROADMAP phase description}
171
-
172
- </domain>
173
-
174
- <decisions>
175
- ## Implementation Decisions
176
-
177
- ### the agent's Discretion
178
- All implementation choices are at the agent's discretion - discuss phase was skipped per user setting. Use ROADMAP phase goal, success criteria, and codebase conventions to guide decisions.
179
-
180
- </decisions>
181
-
182
- <code_context>
183
- ## Existing Code Insights
184
-
185
- Codebase context will be gathered during plan-phase research.
186
-
187
- </code_context>
188
-
189
- <specifics>
190
- ## Specific Ideas
191
-
192
- No specific requirements - discuss phase skipped. Refer to ROADMAP phase description and success criteria.
193
-
194
- </specifics>
195
-
196
- <deferred>
197
- ## Deferred Ideas
198
-
199
- None - discuss phase skipped.
200
-
201
- </deferred>
202
- ```
203
-
204
- Commit the minimal context:
205
-
206
- ```bash
207
- pi-gsd-tools commit "docs(${PADDED_PHASE}): auto-generated context (discuss skipped)" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
208
- ```
209
-
210
- Proceed to 3b.
211
-
212
- **If SKIP_DISCUSS is `false` (or unset):** Execute the smart_discuss step for this phase.
213
-
214
- After smart_discuss completes, verify context was written:
215
-
216
- ```bash
217
- PHASE_STATE=$(pi-gsd-tools init phase-op ${PHASE_NUM})
218
- ```
153
+ <!-- Context pre-injected above via WXP — variables available via <gsd-paste name="..."> -->
219
154
 
220
155
  Check `has_context`. If false → go to handle_blocker: "Smart discuss for phase ${PHASE_NUM} did not produce CONTEXT.md."
221
156
 
@@ -223,68 +158,7 @@ Check `has_context`. If false → go to handle_blocker: "Smart discuss for phase
223
158
 
224
159
  Check if this phase has frontend indicators and whether a UI-SPEC already exists:
225
160
 
226
- ```bash
227
- PHASE_SECTION=$(pi-gsd-tools roadmap get-phase ${PHASE_NUM} 2>/dev/null)
228
- echo "$PHASE_SECTION" | grep -iE "UI|interface|frontend|component|layout|page|screen|view|form|dashboard|widget" > /dev/null 2>&1
229
- HAS_UI=$?
230
- UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
231
- ```
232
-
233
- Check if UI phase workflow is enabled:
234
-
235
- ```bash
236
- UI_PHASE_CFG=$(pi-gsd-tools config-get workflow.ui_phase 2>/dev/null || echo "true")
237
- ```
238
-
239
- **If `HAS_UI` is 0 (frontend indicators found) AND `UI_SPEC_FILE` is empty (no UI-SPEC exists) AND `UI_PHASE_CFG` is not `false`:**
240
-
241
- Display:
242
-
243
- ```
244
- Phase ${PHASE_NUM}: Frontend phase detected - generating UI design contract...
245
- ```
246
-
247
- ```
248
- Skill(skill="gsd-ui-phase", args="${PHASE_NUM}")
249
- ```
250
-
251
- Verify UI-SPEC was created:
252
-
253
- ```bash
254
- UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
255
- ```
256
-
257
- **If `UI_SPEC_FILE` is still empty after ui-phase:** Display warning `Phase ${PHASE_NUM}: UI-SPEC generation did not produce output - continuing without design contract.` and proceed to 3b.
258
-
259
- **If `HAS_UI` is 1 (no frontend indicators) OR `UI_SPEC_FILE` is not empty (UI-SPEC already exists) OR `UI_PHASE_CFG` is `false`:** Skip silently to 3b.
260
-
261
- **3b. Plan**
262
-
263
- ```
264
- Skill(skill="gsd-plan-phase", args="${PHASE_NUM}")
265
- ```
266
-
267
- Verify plan produced output - re-run `init phase-op` and check `has_plans`. If false → go to handle_blocker: "Plan phase ${PHASE_NUM} did not produce any plans."
268
-
269
- **3c. Execute**
270
-
271
- ```
272
- Skill(skill="gsd-execute-phase", args="${PHASE_NUM} --no-transition")
273
- ```
274
-
275
- **3d. Post-Execution Routing**
276
-
277
- After execute-phase returns, read the verification result:
278
-
279
- ```bash
280
- VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
281
- ```
282
-
283
- Where `PHASE_DIR` comes from the `init phase-op` call already made in step 3a. If the variable is not in scope, re-fetch:
284
-
285
- ```bash
286
- PHASE_STATE=$(pi-gsd-tools init phase-op ${PHASE_NUM})
287
- ```
161
+ <!-- Context pre-injected above via WXP — variables available via <gsd-paste name="..."> -->
288
162
 
289
163
  Parse `phase_dir` from the JSON.
290
164
 
@@ -345,72 +219,7 @@ Skill(skill="gsd-execute-phase", args="${PHASE_NUM} --no-transition")
345
219
  ```
346
220
 
347
221
  Re-read verification status:
348
- ```bash
349
- VERIFY_STATUS=$(grep "^status:" "${PHASE_DIR}"/*-VERIFICATION.md 2>/dev/null | head -1 | cut -d: -f2 | tr -d ' ')
350
- ```
351
-
352
- If `passed` or `human_needed`: Route normally (continue or ask user as above).
353
-
354
- If still `gaps_found` after this retry: Display "Gaps persist after closure attempt." and ask via AskUserQuestion:
355
- - **question:** "Gap closure did not fully resolve issues. How to proceed?"
356
- - **options:** "Continue anyway" / "Stop autonomous mode"
357
-
358
- On "Continue anyway": Proceed to iterate step.
359
- On "Stop autonomous mode": Go to handle_blocker.
360
-
361
- This limits gap closure to 1 automatic retry to prevent infinite loops.
362
-
363
- On **"Continue without fixing"**: Display `Phase ${PHASE_NUM} ⏭ Gaps deferred` and proceed to iterate step.
364
-
365
- On **"Stop autonomous mode"**: Go to handle_blocker with "User stopped - gaps remain in phase ${PHASE_NUM}".
366
-
367
- **3d.5. UI Review (Frontend Phases)**
368
-
369
- > Run after any successful execution routing (passed, human_needed accepted, or gaps deferred/accepted) - before proceeding to the iterate step.
370
-
371
- Check if this phase had a UI-SPEC (created in step 3a.5 or pre-existing):
372
-
373
- ```bash
374
- UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
375
- ```
376
-
377
- Check if UI review is enabled:
378
-
379
- ```bash
380
- UI_REVIEW_CFG=$(pi-gsd-tools config-get workflow.ui_review 2>/dev/null || echo "true")
381
- ```
382
-
383
- **If `UI_SPEC_FILE` is not empty AND `UI_REVIEW_CFG` is not `false`:**
384
-
385
- Display:
386
-
387
- ```
388
- Phase ${PHASE_NUM}: Frontend phase with UI-SPEC - running UI review audit...
389
- ```
390
-
391
- ```
392
- Skill(skill="gsd-ui-review", args="${PHASE_NUM}")
393
- ```
394
-
395
- Display the review result summary (score from UI-REVIEW.md if produced). Continue to iterate step regardless of score - UI review is advisory, not blocking.
396
-
397
- **If `UI_SPEC_FILE` is empty OR `UI_REVIEW_CFG` is `false`:** Skip silently to iterate step.
398
-
399
- </step>
400
-
401
- <step name="smart_discuss">
402
-
403
- ## Smart Discuss
404
-
405
- Run smart discuss for the current phase. Proposes grey area answers in batch tables - the user accepts or overrides per area. Produces identical CONTEXT.md output to regular discuss-phase.
406
-
407
- > **Note:** Smart discuss is an autonomous-optimized variant of the `gsd-discuss-phase` skill. It produces identical CONTEXT.md output but uses batch table proposals instead of sequential questioning. The original `discuss-phase` skill remains unchanged (per CTRL-03). Future milestones may extract this to a separate skill file.
408
-
409
- **Inputs:** `PHASE_NUM` from execute_phase. Run init to get phase paths:
410
-
411
- ```bash
412
- PHASE_STATE=$(pi-gsd-tools init phase-op ${PHASE_NUM})
413
- ```
222
+ <!-- Context pre-injected above via WXP — variables available via <gsd-paste name="..."> -->
414
223
 
415
224
  Parse from JSON: `phase_dir`, `phase_slug`, `padded_phase`, `phase_name`.
416
225
 
@@ -1,3 +1,69 @@
1
+ <gsd-version v="1.12.4" />
2
+
3
+ <gsd-arguments>
4
+ <settings><keep-extra-args /></settings>
5
+ </gsd-arguments>
6
+
7
+ <gsd-execute>
8
+ <shell command="pi-gsd-tools">
9
+ <args>
10
+ <arg string="pi-gsd-tools" />
11
+ <arg string="init" />
12
+ <arg string="todos" />
13
+ <arg string="0" />
14
+ </args>
15
+ <outs>
16
+ <out type="string" name="todos-data" />
17
+ </outs>
18
+ </shell>
19
+ <if>
20
+ <condition>
21
+ <starts-with>
22
+ <left name="todos-data" />
23
+ <right type="string" value="@file:" />
24
+ </starts-with>
25
+ </condition>
26
+ <then>
27
+ <string-op op="split">
28
+ <args>
29
+ <arg name="todos-data" />
30
+ <arg type="string" value="@file:" />
31
+ </args>
32
+ <outs>
33
+ <out type="string" name="todos-data-file" />
34
+ </outs>
35
+ </string-op>
36
+ <shell command="cat">
37
+ <args>
38
+ <arg name="todos-data-file" wrap='"' />
39
+ </args>
40
+ <outs>
41
+ <out type="string" name="todos-data" />
42
+ </outs>
43
+ </shell>
44
+ </then>
45
+ </if>
46
+ <shell command="pi-gsd-tools">
47
+ <args>
48
+ <arg string="pi-gsd-tools" />
49
+ <arg string="state" />
50
+ <arg string="json" />
51
+ <arg string="--raw" />
52
+ </args>
53
+ <outs>
54
+ <out type="string" name="state" />
55
+ </outs>
56
+ </shell>
57
+ </gsd-execute>
58
+
59
+ ## Context (pre-injected)
60
+
61
+ **Todos:**
62
+ <gsd-paste name="todos-data" />
63
+
64
+ **State:**
65
+ <gsd-paste name="state" />
66
+
1
67
  <purpose>
2
68
  List all pending todos, allow selection, load full context for the selected todo, and route to appropriate action.
3
69
  </purpose>
@@ -11,10 +77,7 @@ Read all files referenced by the invoking prompt's execution_context before star
11
77
  <step name="init_context">
12
78
  Load todo context:
13
79
 
14
- ```bash
15
- INIT=$(pi-gsd-tools init todos)
16
- if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
17
- ```
80
+ <!-- Context pre-injected above via WXP — variables available via <gsd-paste name="..."> -->
18
81
 
19
82
  Extract from init JSON: `todo_count`, `todos`, `pending_dir`.
20
83
 
@@ -1,3 +1,28 @@
1
+ <gsd-version v="1.12.4" />
2
+
3
+ <gsd-arguments>
4
+ <settings><keep-extra-args /></settings>
5
+ </gsd-arguments>
6
+
7
+ <gsd-execute>
8
+ <shell command="pi-gsd-tools">
9
+ <args>
10
+ <arg string="pi-gsd-tools" />
11
+ <arg string="state" />
12
+ <arg string="json" />
13
+ <arg string="--raw" />
14
+ </args>
15
+ <outs>
16
+ <out type="string" name="state" />
17
+ </outs>
18
+ </shell>
19
+ </gsd-execute>
20
+
21
+ ## Context (pre-injected)
22
+
23
+ **State:**
24
+ <gsd-paste name="state" />
25
+
1
26
  <purpose>
2
27
 
3
28
  Archive accumulated phase directories from completed milestones into `.planning/milestones/v{X.Y}-phases/`. Identifies which phases belong to each completed milestone, shows a dry-run summary, and moves directories on confirmation.