pi-gsd 2.0.21 → 2.0.23

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 (70) hide show
  1. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-codebase-mapper.md +13 -13
  2. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-debugger.md +37 -37
  3. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-executor.md +8 -8
  4. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-nyquist-auditor.md +31 -31
  5. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-phase-researcher.md +85 -85
  6. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-plan-checker.md +32 -32
  7. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-planner.md +108 -108
  8. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-project-researcher.md +76 -76
  9. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-research-synthesizer.md +16 -16
  10. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-roadmapper.md +39 -39
  11. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-ui-auditor.md +24 -24
  12. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-ui-checker.md +21 -21
  13. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-ui-researcher.md +35 -35
  14. package/.gsd/harnesses/pi/get-shit-done/agents/gsd-verifier.md +30 -30
  15. package/.gsd/harnesses/pi/get-shit-done/references/continuation-format.md +11 -11
  16. package/.gsd/harnesses/pi/get-shit-done/references/ui-brand.md +1 -1
  17. package/.gsd/harnesses/pi/get-shit-done/templates/DEBUG.md +4 -4
  18. package/.gsd/harnesses/pi/get-shit-done/templates/UAT.md +1 -1
  19. package/.gsd/harnesses/pi/get-shit-done/workflows/add-backlog.md +132 -0
  20. package/.gsd/harnesses/pi/get-shit-done/workflows/add-phase.md +36 -68
  21. package/.gsd/harnesses/pi/get-shit-done/workflows/audit-milestone.md +3 -3
  22. package/.gsd/harnesses/pi/get-shit-done/workflows/complete-milestone.md +1 -1
  23. package/.gsd/harnesses/pi/get-shit-done/workflows/debug.md +250 -0
  24. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase-assumptions.md +1 -1
  25. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase.md +2 -2
  26. package/.gsd/harnesses/pi/get-shit-done/workflows/discuss-phase.md.bak +2 -2
  27. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-phase.md +5 -2
  28. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-phase.md.bak +2 -2
  29. package/.gsd/harnesses/pi/get-shit-done/workflows/execute-plan.md +1 -1
  30. package/.gsd/harnesses/pi/get-shit-done/workflows/help.md +5 -5
  31. package/.gsd/harnesses/pi/get-shit-done/workflows/insert-phase.md +1 -1
  32. package/.gsd/harnesses/pi/get-shit-done/workflows/list-phase-assumptions.md +78 -30
  33. package/.gsd/harnesses/pi/get-shit-done/workflows/map-codebase.md +1 -1
  34. package/.gsd/harnesses/pi/get-shit-done/workflows/new-milestone.md +1 -1
  35. package/.gsd/harnesses/pi/get-shit-done/workflows/new-milestone.md.bak +1 -1
  36. package/.gsd/harnesses/pi/get-shit-done/workflows/new-project.md +2 -2
  37. package/.gsd/harnesses/pi/get-shit-done/workflows/new-project.md.bak +2 -2
  38. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-milestone-gaps.md +1 -1
  39. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-phase.md +5 -1
  40. package/.gsd/harnesses/pi/get-shit-done/workflows/plan-phase.md.bak +1 -1
  41. package/.gsd/harnesses/pi/get-shit-done/workflows/progress.md +10 -10
  42. package/.gsd/harnesses/pi/get-shit-done/workflows/resume-project.md +2 -2
  43. package/.gsd/harnesses/pi/get-shit-done/workflows/review-backlog.md +219 -0
  44. package/.gsd/harnesses/pi/get-shit-done/workflows/session-report.md +47 -0
  45. package/.gsd/harnesses/pi/get-shit-done/workflows/set-profile.md +135 -0
  46. package/.gsd/harnesses/pi/get-shit-done/workflows/settings.md +1 -1
  47. package/.gsd/harnesses/pi/get-shit-done/workflows/thread.md +213 -0
  48. package/.gsd/harnesses/pi/get-shit-done/workflows/transition.md +3 -3
  49. package/.gsd/harnesses/pi/get-shit-done/workflows/ui-phase.md +3 -2
  50. package/.gsd/harnesses/pi/get-shit-done/workflows/ui-review.md +1 -1
  51. package/.gsd/harnesses/pi/get-shit-done/workflows/validate-phase.md +1 -1
  52. package/.gsd/harnesses/pi/get-shit-done/workflows/verify-work.md +1 -1
  53. package/.gsd/harnesses/pi/get-shit-done/workflows/workstreams.md +215 -0
  54. package/.gsd/harnesses/pi/gsd-file-manifest.json +1 -1
  55. package/.gsd/harnesses/pi/hooks/gsd-context-monitor.js +102 -102
  56. package/.gsd/harnesses/pi/hooks/gsd-statusline.js +2 -2
  57. package/.gsd/harnesses/pi/hooks/gsd-workflow-guard.js +65 -65
  58. package/README.md +1 -1
  59. package/dist/pi-gsd-hooks.js +33 -6
  60. package/dist/pi-gsd-tools.js +87 -76
  61. package/package.json +1 -1
  62. package/prompts/gsd-add-backlog.md +2 -0
  63. package/prompts/gsd-complete-milestone.md +2 -0
  64. package/prompts/gsd-debug.md +2 -0
  65. package/prompts/gsd-list-phase-assumptions.md +1 -1
  66. package/prompts/gsd-research-phase.md +2 -0
  67. package/prompts/gsd-review-backlog.md +2 -0
  68. package/prompts/gsd-set-profile.md +2 -0
  69. package/prompts/gsd-thread.md +2 -0
  70. package/prompts/gsd-workstreams.md +2 -0
@@ -1,5 +1,75 @@
1
1
  <gsd-version v="1.12.4" />
2
2
 
3
+ <gsd-arguments>
4
+ <settings>
5
+ <keep-extra-args />
6
+ </settings>
7
+ <arg name="phase" type="number" />
8
+ </gsd-arguments>
9
+
10
+ <gsd-execute>
11
+ <shell command="pi-gsd-tools">
12
+ <args>
13
+ <arg string="init" />
14
+ <arg string="phase-op" />
15
+ <arg name="phase" wrap='"' />
16
+ </args>
17
+ <outs>
18
+ <out type="string" name="init" />
19
+ </outs>
20
+ </shell>
21
+ <if>
22
+ <condition>
23
+ <starts-with>
24
+ <left name="init" />
25
+ <right type="string" value="@file:" />
26
+ </starts-with>
27
+ </condition>
28
+ <then>
29
+ <string-op op="split">
30
+ <args>
31
+ <arg name="init" />
32
+ <arg type="string" value="@file:" />
33
+ </args>
34
+ <outs>
35
+ <out type="string" name="init-file" />
36
+ </outs>
37
+ </string-op>
38
+ <shell command="cat">
39
+ <args>
40
+ <arg name="init-file" wrap='"' />
41
+ </args>
42
+ <outs>
43
+ <out type="string" name="init" />
44
+ </outs>
45
+ </shell>
46
+ </then>
47
+ </if>
48
+ <shell command="pi-gsd-tools">
49
+ <args>
50
+ <arg string="state" />
51
+ <arg string="json" />
52
+ <arg string="--raw" />
53
+ </args>
54
+ <outs>
55
+ <suppress-errors />
56
+ <out type="string" name="state" />
57
+ </outs>
58
+ </shell>
59
+ </gsd-execute>
60
+
61
+ ## Context (pre-injected by WXP)
62
+
63
+ **Phase:** <gsd-paste name="phase" />
64
+
65
+ **Phase Data:**
66
+ <gsd-paste name="init" />
67
+
68
+ **State:**
69
+ <gsd-paste name="state" />
70
+
71
+ ---
72
+
3
73
  <purpose>
4
74
  Surface the agent's assumptions about a phase before planning, enabling users to correct misconceptions early.
5
75
 
@@ -9,46 +79,24 @@ Key difference from discuss-phase: This is ANALYSIS of what the agent thinks, no
9
79
  <process>
10
80
 
11
81
  <step name="validate_phase" priority="first">
12
- Phase number: $ARGUMENTS (required)
82
+ <!-- Phase number, phase data and state are pre-injected above via WXP -->
13
83
 
14
- **If argument missing:**
84
+ Parse `init` JSON for: `phase_found`, `phase_number`, `phase_name`, `phase_slug`, `goal`, `phase_dir`.
15
85
 
16
- ```
17
- Error: Phase number required.
86
+ **If `phase_found` is false:**
18
87
 
19
- Usage: /gsd-list-phase-assumptions [phase-number]
20
- Example: /gsd-list-phase-assumptions 3
21
88
  ```
89
+ Error: Phase {phase} not found in roadmap.
22
90
 
23
- Exit workflow.
24
-
25
- **If argument provided:**
26
- Validate phase exists in roadmap:
91
+ Available phases: [list from roadmap]
27
92
 
28
- ```bash
29
- cat .planning/ROADMAP.md | grep -i "Phase ${PHASE}"
30
- ```
31
-
32
- **If phase not found:**
33
-
34
- ```
35
- Error: Phase ${PHASE} not found in roadmap.
36
-
37
- Available phases:
38
- [list phases from roadmap]
93
+ Usage: /gsd-list-phase-assumptions [phase-number]
94
+ Example: /gsd-list-phase-assumptions 3
39
95
  ```
40
96
 
41
97
  Exit workflow.
42
98
 
43
- **If phase found:**
44
- Parse phase details from roadmap:
45
-
46
- - Phase number
47
- - Phase name
48
- - Phase description/goal
49
- - Any scope details mentioned
50
-
51
- Continue to analyze_phase.
99
+ **If `phase_found` is true:** Continue to analyze_phase.
52
100
  </step>
53
101
 
54
102
  <step name="analyze_phase">
@@ -382,7 +382,7 @@ Created .planning/codebase/:
382
382
 
383
383
  `/gsd-new-project`
384
384
 
385
- <sub>`/clear` first → fresh context window</sub>
385
+ <sub>`/new` first → fresh context window</sub>
386
386
 
387
387
  ---
388
388
 
@@ -489,7 +489,7 @@ pi-gsd-tools commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files
489
489
 
490
490
  `/gsd-discuss-phase [N] ${GSD_WS}` - gather context and clarify approach
491
491
 
492
- <sub>`/clear` first → fresh context window</sub>
492
+ <sub>`/new` first → fresh context window</sub>
493
493
 
494
494
  Also: `/gsd-plan-phase [N] ${GSD_WS}` - skip discussion, plan directly
495
495
  ```
@@ -461,7 +461,7 @@ pi-gsd-tools commit "docs: create milestone v[X.Y] roadmap ([N] phases)" --files
461
461
 
462
462
  `/gsd-discuss-phase [N] ${GSD_WS}` - gather context and clarify approach
463
463
 
464
- <sub>`/clear` first → fresh context window</sub>
464
+ <sub>`/new` first → fresh context window</sub>
465
465
 
466
466
  Also: `/gsd-plan-phase [N] ${GSD_WS}` - skip discussion, plan directly
467
467
  ```
@@ -1209,7 +1209,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1209
1209
 
1210
1210
  /gsd-discuss-phase 1 - gather context and clarify approach
1211
1211
 
1212
- <sub>/clear first → fresh context window</sub>
1212
+ <sub>/new first → fresh context window</sub>
1213
1213
 
1214
1214
  ---
1215
1215
 
@@ -1231,7 +1231,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1231
1231
 
1232
1232
  /gsd-discuss-phase 1 - gather context and clarify approach
1233
1233
 
1234
- <sub>/clear first → fresh context window</sub>
1234
+ <sub>/new first → fresh context window</sub>
1235
1235
 
1236
1236
  ---
1237
1237
 
@@ -1173,7 +1173,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1173
1173
 
1174
1174
  /gsd-discuss-phase 1 - gather context and clarify approach
1175
1175
 
1176
- <sub>/clear first → fresh context window</sub>
1176
+ <sub>/new first → fresh context window</sub>
1177
1177
 
1178
1178
  ---
1179
1179
 
@@ -1195,7 +1195,7 @@ PHASE1_HAS_UI=$(echo "$PHASE1_SECTION" | grep -qi "UI hint.*yes" && echo "true"
1195
1195
 
1196
1196
  /gsd-discuss-phase 1 - gather context and clarify approach
1197
1197
 
1198
- <sub>/clear first → fresh context window</sub>
1198
+ <sub>/new first → fresh context window</sub>
1199
1199
 
1200
1200
  ---
1201
1201
 
@@ -202,7 +202,7 @@ pi-gsd-tools commit "docs(roadmap): add gap closure phases {N}-{M}" --files .pla
202
202
 
203
203
  `/gsd-plan-phase {N}`
204
204
 
205
- <sub>`/clear` first → fresh context window</sub>
205
+ <sub>`/new` first → fresh context window</sub>
206
206
 
207
207
  ---
208
208
 
@@ -6,6 +6,10 @@
6
6
  </settings>
7
7
  <arg name="auto-chain-active" type="flag" flag="--auto" optional />
8
8
  <arg name="skip-research" type="flag" flag="--skip-research" optional />
9
+ <arg name="gaps" type="flag" flag="--gaps" optional />
10
+ <arg name="skip-verify" type="flag" flag="--skip-verify" optional />
11
+ <arg name="reviews" type="flag" flag="--reviews" optional />
12
+ <arg name="text" type="flag" flag="--text" optional />
9
13
  <arg name="phase" type="number" />
10
14
  </gsd-arguments>
11
15
 
@@ -855,7 +859,7 @@ Verification: {Passed | Passed with override | Skipped}
855
859
 
856
860
  /gsd-execute-phase {X} ${GSD_WS}
857
861
 
858
- <sub>/clear first → fresh context window</sub>
862
+ <sub>/new first → fresh context window</sub>
859
863
 
860
864
  ───────────────────────────────────────────────────────────────
861
865
 
@@ -805,7 +805,7 @@ Verification: {Passed | Passed with override | Skipped}
805
805
 
806
806
  /gsd-execute-phase {X} ${GSD_WS}
807
807
 
808
- <sub>/clear first → fresh context window</sub>
808
+ <sub>/new first → fresh context window</sub>
809
809
 
810
810
  ───────────────────────────────────────────────────────────────
811
811
 
@@ -273,7 +273,7 @@ Read its `<objective>` section.
273
273
 
274
274
  `/gsd-execute-phase {phase} ${GSD_WS}`
275
275
 
276
- <sub>`/clear` first → fresh context window</sub>
276
+ <sub>`/new` first → fresh context window</sub>
277
277
 
278
278
  ---
279
279
  ```
@@ -303,7 +303,7 @@ PHASE_HAS_UI=$(echo "$PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true" ||
303
303
 
304
304
  `/gsd-plan-phase {phase-number} ${GSD_WS}`
305
305
 
306
- <sub>`/clear` first → fresh context window</sub>
306
+ <sub>`/new` first → fresh context window</sub>
307
307
 
308
308
  ---
309
309
  ```
@@ -319,7 +319,7 @@ PHASE_HAS_UI=$(echo "$PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true" ||
319
319
 
320
320
  `/gsd-discuss-phase {phase}` - gather context and clarify approach
321
321
 
322
- <sub>`/clear` first → fresh context window</sub>
322
+ <sub>`/new` first → fresh context window</sub>
323
323
 
324
324
  ---
325
325
 
@@ -342,7 +342,7 @@ PHASE_HAS_UI=$(echo "$PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true" ||
342
342
 
343
343
  `/gsd-discuss-phase {phase} ${GSD_WS}` - gather context and clarify approach
344
344
 
345
- <sub>`/clear` first → fresh context window</sub>
345
+ <sub>`/new` first → fresh context window</sub>
346
346
 
347
347
  ---
348
348
 
@@ -368,7 +368,7 @@ UAT.md exists with gaps (diagnosed issues). User needs to plan fixes.
368
368
 
369
369
  `/gsd-plan-phase {phase} --gaps ${GSD_WS}`
370
370
 
371
- <sub>`/clear` first → fresh context window</sub>
371
+ <sub>`/new` first → fresh context window</sub>
372
372
 
373
373
  ---
374
374
 
@@ -394,7 +394,7 @@ UAT.md exists with `status: partial` - testing session ended before all items re
394
394
 
395
395
  `/gsd-verify-work {phase} ${GSD_WS}` - resume testing from where you left off
396
396
 
397
- <sub>`/clear` first → fresh context window</sub>
397
+ <sub>`/new` first → fresh context window</sub>
398
398
 
399
399
  ---
400
400
 
@@ -450,7 +450,7 @@ NEXT_HAS_UI=$(echo "$NEXT_PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true
450
450
 
451
451
  `/gsd-discuss-phase {Z+1}` - gather context and clarify approach
452
452
 
453
- <sub>`/clear` first → fresh context window</sub>
453
+ <sub>`/new` first → fresh context window</sub>
454
454
 
455
455
  ---
456
456
 
@@ -475,7 +475,7 @@ NEXT_HAS_UI=$(echo "$NEXT_PHASE_SECTION" | grep -qi "UI hint.*yes" && echo "true
475
475
 
476
476
  `/gsd-discuss-phase {Z+1} ${GSD_WS}` - gather context and clarify approach
477
477
 
478
- <sub>`/clear` first → fresh context window</sub>
478
+ <sub>`/new` first → fresh context window</sub>
479
479
 
480
480
  ---
481
481
 
@@ -503,7 +503,7 @@ All {N} phases finished!
503
503
 
504
504
  `/gsd-complete-milestone ${GSD_WS}`
505
505
 
506
- <sub>`/clear` first → fresh context window</sub>
506
+ <sub>`/new` first → fresh context window</sub>
507
507
 
508
508
  ---
509
509
 
@@ -534,7 +534,7 @@ Ready to plan the next milestone.
534
534
 
535
535
  `/gsd-new-milestone ${GSD_WS}`
536
536
 
537
- <sub>`/clear` first → fresh context window</sub>
537
+ <sub>`/new` first → fresh context window</sub>
538
538
 
539
539
  ---
540
540
  ```
@@ -297,7 +297,7 @@ Based on user selection, route to appropriate workflow:
297
297
 
298
298
  `/gsd-execute-phase {phase} ${GSD_WS}`
299
299
 
300
- <sub>`/clear` first → fresh context window</sub>
300
+ <sub>`/new` first → fresh context window</sub>
301
301
 
302
302
  ---
303
303
  ```
@@ -311,7 +311,7 @@ Based on user selection, route to appropriate workflow:
311
311
 
312
312
  `/gsd-plan-phase [phase-number] ${GSD_WS}`
313
313
 
314
- <sub>`/clear` first → fresh context window</sub>
314
+ <sub>`/new` first → fresh context window</sub>
315
315
 
316
316
  ---
317
317
 
@@ -0,0 +1,219 @@
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
+ <display msg="Loading backlog and todos..." />
9
+ <shell command="pi-gsd-tools">
10
+ <args>
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="state" />
49
+ <arg string="json" />
50
+ <arg string="--raw" />
51
+ </args>
52
+ <outs>
53
+ <suppress-errors />
54
+ <out type="string" name="state" />
55
+ </outs>
56
+ </shell>
57
+ <shell command="pi-gsd-tools">
58
+ <args>
59
+ <arg string="roadmap" />
60
+ <arg string="analyze" />
61
+ <arg string="--raw" />
62
+ </args>
63
+ <outs>
64
+ <suppress-errors />
65
+ <out type="string" name="roadmap" />
66
+ </outs>
67
+ </shell>
68
+ </gsd-execute>
69
+
70
+ ## Backlog Review Context (pre-injected by WXP)
71
+
72
+ **Todos:**
73
+ <gsd-paste name="todos-data" />
74
+
75
+ **Roadmap:**
76
+ <gsd-paste name="roadmap" />
77
+
78
+ **State:**
79
+ <gsd-paste name="state" />
80
+
81
+ ---
82
+
83
+ <purpose>
84
+ Review accumulated backlog items (999.x phases and pending todos) and decide what to do with each: promote to a real phase, convert to a todo, discard, or keep.
85
+
86
+ This is the "inbox zero" command for ideas that were parked during active development.
87
+ </purpose>
88
+
89
+ <process>
90
+
91
+ <step name="load_backlog">
92
+ <!-- Context pre-injected above via WXP - variables available via <gsd-paste name="..."> -->
93
+
94
+ **Step A: Extract backlog phases from roadmap.**
95
+
96
+ From `roadmap` JSON, find all phases where `phase_number` starts with `999` (backlog entries added via `/gsd-add-backlog`).
97
+
98
+ **Step B: Extract pending todos from todos data.**
99
+
100
+ From `todos-data` JSON, extract `todos` array with fields: `id`, `title`, `area`, `created`, `problem`.
101
+
102
+ **If both backlog phases and todos are empty:**
103
+ ```
104
+ Nothing in the backlog. The queue is clear.
105
+
106
+ To capture an idea: /gsd-add-backlog <idea>
107
+ To capture a todo: /gsd-add-todo <task>
108
+ ```
109
+ Exit.
110
+ </step>
111
+
112
+ <step name="present_inventory">
113
+ Display a combined inventory:
114
+
115
+ ```
116
+ ## Backlog Review
117
+
118
+ ### 999.x Backlog Phases ({N} items)
119
+ | Phase | Idea | Added |
120
+ |-------|------|-------|
121
+ | 999.1 | {idea} | {date} |
122
+ | 999.2 | {idea} | {date} |
123
+
124
+ ### Pending Todos ({M} items)
125
+ | # | Title | Area | Created |
126
+ |---|-------|------|---------|
127
+ | 1 | {title} | {area} | {date} |
128
+ | 2 | {title} | {area} | {date} |
129
+
130
+ **Total:** {N+M} items to review
131
+ ```
132
+
133
+ Ask:
134
+ ```
135
+ Options:
136
+ 1. Review each item interactively (recommended)
137
+ 2. Promote a specific backlog phase → real phase number
138
+ 3. Work on a specific todo
139
+ 4. Discard a backlog phase
140
+ 5. Done (keep everything)
141
+ ```
142
+ </step>
143
+
144
+ <step name="interactive_review">
145
+ **If user chooses interactive review:**
146
+
147
+ For each backlog phase (999.x), present:
148
+ ```
149
+ ## Phase 999.{N}: {idea}
150
+
151
+ Options:
152
+ 1. Promote to next available phase slot ← recommended if actionable
153
+ 2. Convert to a todo (more granular)
154
+ 3. Keep in backlog
155
+ 4. Discard (remove from ROADMAP.md)
156
+ ```
157
+
158
+ **Promote:** Remove the 999.x entry, add as a properly numbered phase at the end of the current milestone using:
159
+ ```bash
160
+ pi-gsd-tools roadmap add-phase "{next_available_number}" "{idea_text}" --raw
161
+ ```
162
+ Then remove the 999.x placeholder:
163
+ ```bash
164
+ pi-gsd-tools roadmap remove-phase "999.{N}" --raw
165
+ ```
166
+
167
+ **Convert to todo:** Create a todo file (see `/gsd-add-todo` workflow) and remove the 999.x phase entry.
168
+
169
+ **Discard:**
170
+ ```bash
171
+ pi-gsd-tools roadmap remove-phase "999.{N}" --raw
172
+ ```
173
+
174
+ For each pending todo, present:
175
+ ```
176
+ ## Todo: {title}
177
+ Area: {area}
178
+ Problem: {problem excerpt}
179
+
180
+ Options:
181
+ 1. Work on this now → promote to current phase plan
182
+ 2. Keep as todo
183
+ 3. Promote to backlog phase
184
+ 4. Mark done (won't be worked on)
185
+ ```
186
+ </step>
187
+
188
+ <step name="commit_changes">
189
+ After all reviews, commit any ROADMAP.md changes and completed todos:
190
+
191
+ ```bash
192
+ pi-gsd-tools commit "docs: backlog review - promoted {X} items, discarded {Y}" --files .planning/ROADMAP.md .planning/todos/done/
193
+ ```
194
+
195
+ Display summary:
196
+ ```
197
+ ## Backlog Review Complete
198
+
199
+ ✓ Promoted: {list of promoted items}
200
+ ✓ Converted: {list of todos created}
201
+ ✓ Discarded: {count}
202
+ → Kept: {count remaining}
203
+
204
+ {If phases promoted:}
205
+ Next: /gsd-plan-phase {new_phase_number}
206
+ ```
207
+ </step>
208
+
209
+ </process>
210
+
211
+ <success_criteria>
212
+ - [ ] All 999.x backlog phases listed
213
+ - [ ] All pending todos listed
214
+ - [ ] Each item reviewed with a clear decision
215
+ - [ ] Promotions written to ROADMAP.md
216
+ - [ ] Discards removed from ROADMAP.md
217
+ - [ ] Changes committed to git
218
+ - [ ] User knows what's next
219
+ </success_criteria>
@@ -1,5 +1,52 @@
1
1
  <gsd-version v="1.12.4" />
2
2
 
3
+ <gsd-execute>
4
+ <display msg="Loading session context..." />
5
+ <shell command="pi-gsd-tools">
6
+ <args>
7
+ <arg string="state" />
8
+ <arg string="json" />
9
+ <arg string="--raw" />
10
+ </args>
11
+ <outs>
12
+ <suppress-errors />
13
+ <out type="string" name="state" />
14
+ </outs>
15
+ </shell>
16
+ <shell command="pi-gsd-tools">
17
+ <args>
18
+ <arg string="current-timestamp" />
19
+ <arg string="--raw" />
20
+ </args>
21
+ <outs>
22
+ <out type="string" name="timestamp" />
23
+ </outs>
24
+ </shell>
25
+ <shell command="pi-gsd-tools">
26
+ <args>
27
+ <arg string="roadmap" />
28
+ <arg string="analyze" />
29
+ <arg string="--raw" />
30
+ </args>
31
+ <outs>
32
+ <suppress-errors />
33
+ <out type="string" name="roadmap" />
34
+ </outs>
35
+ </shell>
36
+ </gsd-execute>
37
+
38
+ ## Session Context (pre-injected by WXP)
39
+
40
+ **Generated:** <gsd-paste name="timestamp" />
41
+
42
+ **State:**
43
+ <gsd-paste name="state" />
44
+
45
+ **Roadmap:**
46
+ <gsd-paste name="roadmap" />
47
+
48
+ ---
49
+
3
50
  <purpose>
4
51
  Generate a post-session summary document capturing work performed, outcomes achieved, and estimated resource usage. Writes SESSION_REPORT.md to .planning/reports/ for human review and stakeholder sharing.
5
52
  </purpose>