pi-gsd 2.0.20 → 2.0.22
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.
- package/.gsd/harnesses/pi/get-shit-done/workflows/add-backlog.md +132 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/debug.md +250 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/do.md +11 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/execute-phase.md +3 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/list-phase-assumptions.md +78 -30
- package/.gsd/harnesses/pi/get-shit-done/workflows/next.md +11 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/plan-phase.md +4 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/progress.md +11 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/review-backlog.md +219 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/session-report.md +47 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/set-profile.md +135 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/thread.md +213 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/transition.md +11 -0
- package/.gsd/harnesses/pi/get-shit-done/workflows/ui-phase.md +2 -1
- package/.gsd/harnesses/pi/get-shit-done/workflows/workstreams.md +215 -0
- package/.gsd/harnesses/pi/gsd-file-manifest.json +1 -1
- package/dist/pi-gsd-hooks.js +2 -2
- package/dist/pi-gsd-tools.js +77 -77
- package/package.json +2 -2
- package/prompts/gsd-add-backlog.md +2 -0
- package/prompts/gsd-complete-milestone.md +2 -0
- package/prompts/gsd-debug.md +2 -0
- package/prompts/gsd-list-phase-assumptions.md +1 -1
- package/prompts/gsd-research-phase.md +2 -0
- package/prompts/gsd-review-backlog.md +2 -0
- package/prompts/gsd-set-profile.md +2 -0
- package/prompts/gsd-thread.md +2 -0
- package/prompts/gsd-workstreams.md +2 -0
|
@@ -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>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<gsd-version v="1.12.4" />
|
|
2
|
+
|
|
3
|
+
<gsd-arguments>
|
|
4
|
+
<settings>
|
|
5
|
+
<keep-extra-args />
|
|
6
|
+
</settings>
|
|
7
|
+
<arg name="profile" type="string" optional />
|
|
8
|
+
</gsd-arguments>
|
|
9
|
+
|
|
10
|
+
<gsd-execute>
|
|
11
|
+
<display msg="Loading model profile config..." />
|
|
12
|
+
<shell command="pi-gsd-tools">
|
|
13
|
+
<args>
|
|
14
|
+
<arg string="config-get" />
|
|
15
|
+
<arg string="workflow" />
|
|
16
|
+
<arg string="--raw" />
|
|
17
|
+
</args>
|
|
18
|
+
<outs>
|
|
19
|
+
<suppress-errors />
|
|
20
|
+
<out type="string" name="workflow-config" />
|
|
21
|
+
</outs>
|
|
22
|
+
</shell>
|
|
23
|
+
<json-parse src="workflow-config" out="current-profile" path="$.model_profile" />
|
|
24
|
+
</gsd-execute>
|
|
25
|
+
|
|
26
|
+
## Profile Context (pre-injected by WXP)
|
|
27
|
+
|
|
28
|
+
**Requested profile:** <gsd-paste name="profile" />
|
|
29
|
+
|
|
30
|
+
**Current profile:** <gsd-paste name="current-profile" />
|
|
31
|
+
|
|
32
|
+
**Full workflow config:**
|
|
33
|
+
<gsd-paste name="workflow-config" />
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
<purpose>
|
|
38
|
+
Set the active model profile, controlling which Claude model each GSD agent uses.
|
|
39
|
+
One command replaces the full /gsd-settings flow for the common case of switching profiles.
|
|
40
|
+
|
|
41
|
+
Profiles: `quality` | `balanced` | `budget` | `inherit`
|
|
42
|
+
</purpose>
|
|
43
|
+
|
|
44
|
+
<profile_reference>
|
|
45
|
+
|
|
46
|
+
| Profile | Planner | Executor | Researcher | Verifier | Use when |
|
|
47
|
+
|---------|---------|---------|------------|---------|---------|
|
|
48
|
+
| `quality` | opus | opus | opus | sonnet | Critical architecture, quota available |
|
|
49
|
+
| `balanced` | opus | sonnet | sonnet | sonnet | Normal development (default) |
|
|
50
|
+
| `budget` | sonnet | sonnet | haiku | haiku | Conserving quota, high-volume work |
|
|
51
|
+
| `inherit` | inherit | inherit | inherit | inherit | OpenRouter / local models / session switching |
|
|
52
|
+
|
|
53
|
+
</profile_reference>
|
|
54
|
+
|
|
55
|
+
<process>
|
|
56
|
+
|
|
57
|
+
<step name="resolve_profile">
|
|
58
|
+
<!-- Profile arg and current config pre-injected above via WXP -->
|
|
59
|
+
|
|
60
|
+
**If `profile` is empty (no argument provided):**
|
|
61
|
+
|
|
62
|
+
Show current profile and available options:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
## Current Model Profile
|
|
66
|
+
|
|
67
|
+
Active: {current-profile || "balanced (default)"}
|
|
68
|
+
|
|
69
|
+
Available profiles:
|
|
70
|
+
quality - Opus everywhere (highest quality, highest cost)
|
|
71
|
+
balanced - Opus for planning, Sonnet for execution (recommended)
|
|
72
|
+
budget - Sonnet/Haiku mix (lowest cost)
|
|
73
|
+
inherit - Use the current session model for all agents
|
|
74
|
+
|
|
75
|
+
Usage: /gsd-set-profile <profile>
|
|
76
|
+
|
|
77
|
+
To configure individual agents and other settings: /gsd-settings
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Exit (display only, no changes).
|
|
81
|
+
</step>
|
|
82
|
+
|
|
83
|
+
<step name="validate_profile">
|
|
84
|
+
Validate that the provided `profile` value is one of: `quality`, `balanced`, `budget`, `inherit`.
|
|
85
|
+
|
|
86
|
+
**If invalid:**
|
|
87
|
+
```
|
|
88
|
+
Error: Unknown profile '{profile}'.
|
|
89
|
+
|
|
90
|
+
Valid profiles: quality, balanced, budget, inherit
|
|
91
|
+
|
|
92
|
+
Example: /gsd-set-profile balanced
|
|
93
|
+
```
|
|
94
|
+
Exit.
|
|
95
|
+
</step>
|
|
96
|
+
|
|
97
|
+
<step name="apply_profile">
|
|
98
|
+
Apply the profile:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pi-gsd-tools config-set-model-profile {profile}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This updates `.planning/config.json` with the new model profile.
|
|
105
|
+
</step>
|
|
106
|
+
|
|
107
|
+
<step name="confirm">
|
|
108
|
+
```
|
|
109
|
+
✓ Model profile set to: {profile}
|
|
110
|
+
|
|
111
|
+
{profile description}
|
|
112
|
+
|
|
113
|
+
Planner: {model}
|
|
114
|
+
Executor: {model}
|
|
115
|
+
Researcher: {model}
|
|
116
|
+
Verifier: {model}
|
|
117
|
+
|
|
118
|
+
To configure more options: /gsd-settings
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Where "profile description" maps:
|
|
122
|
+
- `quality` → "Maximum reasoning power. Opus for all decision-making agents."
|
|
123
|
+
- `balanced` → "Smart allocation. Opus for planning, Sonnet for execution and verification."
|
|
124
|
+
- `budget` → "Minimal Opus usage. Sonnet for writing, Haiku for research and verification."
|
|
125
|
+
- `inherit` → "Follow the current session model. Required for non-Anthropic providers."
|
|
126
|
+
</step>
|
|
127
|
+
|
|
128
|
+
</process>
|
|
129
|
+
|
|
130
|
+
<success_criteria>
|
|
131
|
+
- [ ] Profile validated against allowed values
|
|
132
|
+
- [ ] .planning/config.json updated with new profile
|
|
133
|
+
- [ ] Confirmation shows per-agent model assignments
|
|
134
|
+
- [ ] Link to /gsd-settings for advanced configuration
|
|
135
|
+
</success_criteria>
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
<gsd-version v="1.12.4" />
|
|
2
|
+
|
|
3
|
+
<gsd-arguments>
|
|
4
|
+
<settings>
|
|
5
|
+
<keep-extra-args />
|
|
6
|
+
</settings>
|
|
7
|
+
<arg name="subcommand" type="string" optional />
|
|
8
|
+
<arg name="name" type="string" optional />
|
|
9
|
+
</gsd-arguments>
|
|
10
|
+
|
|
11
|
+
<gsd-execute>
|
|
12
|
+
<display msg="Loading thread context..." />
|
|
13
|
+
<shell command="pi-gsd-tools">
|
|
14
|
+
<args>
|
|
15
|
+
<arg string="state" />
|
|
16
|
+
<arg string="json" />
|
|
17
|
+
<arg string="--raw" />
|
|
18
|
+
</args>
|
|
19
|
+
<outs>
|
|
20
|
+
<suppress-errors />
|
|
21
|
+
<out type="string" name="state" />
|
|
22
|
+
</outs>
|
|
23
|
+
</shell>
|
|
24
|
+
<shell command="pi-gsd-tools">
|
|
25
|
+
<args>
|
|
26
|
+
<arg string="current-timestamp" />
|
|
27
|
+
<arg string="--raw" />
|
|
28
|
+
</args>
|
|
29
|
+
<outs>
|
|
30
|
+
<out type="string" name="timestamp" />
|
|
31
|
+
</outs>
|
|
32
|
+
</shell>
|
|
33
|
+
</gsd-execute>
|
|
34
|
+
|
|
35
|
+
## Thread Context (pre-injected by WXP)
|
|
36
|
+
|
|
37
|
+
**Subcommand:** <gsd-paste name="subcommand" />
|
|
38
|
+
**Name:** <gsd-paste name="name" />
|
|
39
|
+
**Timestamp:** <gsd-paste name="timestamp" />
|
|
40
|
+
|
|
41
|
+
**State:**
|
|
42
|
+
<gsd-paste name="state" />
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
<purpose>
|
|
47
|
+
Manage context threads — saved conversation checkpoints that can be resumed later.
|
|
48
|
+
A thread is a snapshot of the current agent context (active phase, decisions, blockers) that
|
|
49
|
+
survives `/clear` and can be handed off between sessions.
|
|
50
|
+
|
|
51
|
+
Subcommands: list, new [name], switch <name>
|
|
52
|
+
</purpose>
|
|
53
|
+
|
|
54
|
+
<process>
|
|
55
|
+
|
|
56
|
+
<step name="route">
|
|
57
|
+
<!-- Context pre-injected above via WXP -->
|
|
58
|
+
|
|
59
|
+
Parse `subcommand` and `name` from injected variables.
|
|
60
|
+
|
|
61
|
+
Route by subcommand:
|
|
62
|
+
- `list` (or empty) → **list_threads**
|
|
63
|
+
- `new [name]` → **new_thread**
|
|
64
|
+
- `switch <name>` → **switch_thread**
|
|
65
|
+
- Unknown → show help
|
|
66
|
+
</step>
|
|
67
|
+
|
|
68
|
+
<step name="list_threads">
|
|
69
|
+
Scan for thread files:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
ls .planning/threads/*.md 2>/dev/null || echo "no threads"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**If no threads exist:**
|
|
76
|
+
```
|
|
77
|
+
No saved threads.
|
|
78
|
+
|
|
79
|
+
Create one to preserve context across /clear:
|
|
80
|
+
/gsd-thread new <optional-name>
|
|
81
|
+
```
|
|
82
|
+
Exit.
|
|
83
|
+
|
|
84
|
+
**If threads found:**
|
|
85
|
+
|
|
86
|
+
For each thread file, read frontmatter and display:
|
|
87
|
+
```
|
|
88
|
+
## Context Threads
|
|
89
|
+
|
|
90
|
+
| Name | Phase | Created | Summary |
|
|
91
|
+
|------|-------|---------|---------|
|
|
92
|
+
| {name} | {phase} | {date} | {one-line} |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
Switch to a thread: /gsd-thread switch <name>
|
|
96
|
+
Create a new thread: /gsd-thread new [name]
|
|
97
|
+
```
|
|
98
|
+
</step>
|
|
99
|
+
|
|
100
|
+
<step name="new_thread">
|
|
101
|
+
Capture the current context as a named thread.
|
|
102
|
+
|
|
103
|
+
**Resolve name:**
|
|
104
|
+
- If `name` is provided, use it
|
|
105
|
+
- Otherwise generate from state: `{phase-slug}-{date}` (e.g., `auth-2025-01-15`)
|
|
106
|
+
|
|
107
|
+
**Ensure directory:**
|
|
108
|
+
```bash
|
|
109
|
+
mkdir -p .planning/threads
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Collect current context from state JSON:**
|
|
113
|
+
- `current_phase` + `phase_name`
|
|
114
|
+
- `milestone`
|
|
115
|
+
- `last_activity`
|
|
116
|
+
- Recent decisions (last 3 from STATE.md decisions table)
|
|
117
|
+
- Active blockers
|
|
118
|
+
|
|
119
|
+
**Write `.planning/threads/{name}.md`:**
|
|
120
|
+
```markdown
|
|
121
|
+
---
|
|
122
|
+
name: {name}
|
|
123
|
+
created: {timestamp}
|
|
124
|
+
phase: {current_phase}
|
|
125
|
+
phase_name: {phase_name}
|
|
126
|
+
milestone: {milestone}
|
|
127
|
+
status: active
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Thread: {name}
|
|
131
|
+
|
|
132
|
+
**Saved:** {timestamp}
|
|
133
|
+
**Phase:** {current_phase}: {phase_name}
|
|
134
|
+
**Milestone:** {milestone}
|
|
135
|
+
|
|
136
|
+
## Context Snapshot
|
|
137
|
+
|
|
138
|
+
{Summary of what's in progress: what was being worked on, key decisions made, any open questions}
|
|
139
|
+
|
|
140
|
+
## State at Save
|
|
141
|
+
|
|
142
|
+
[Key fields from STATE.md: current position, last activity, blockers]
|
|
143
|
+
|
|
144
|
+
## Resume Instructions
|
|
145
|
+
|
|
146
|
+
To resume this thread:
|
|
147
|
+
1. `/clear` - start fresh context
|
|
148
|
+
2. `/gsd-thread switch {name}` - restore this thread's context
|
|
149
|
+
3. `/gsd-resume-work` - re-orient with full project state
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Commit:**
|
|
153
|
+
```bash
|
|
154
|
+
pi-gsd-tools commit "docs: save context thread '{name}'" --files .planning/threads/{name}.md
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Confirm:**
|
|
158
|
+
```
|
|
159
|
+
✓ Thread saved: {name}
|
|
160
|
+
|
|
161
|
+
Phase: {current_phase}: {phase_name}
|
|
162
|
+
File: .planning/threads/{name}.md
|
|
163
|
+
|
|
164
|
+
Safe to /clear. Resume with: /gsd-thread switch {name}
|
|
165
|
+
```
|
|
166
|
+
</step>
|
|
167
|
+
|
|
168
|
+
<step name="switch_thread">
|
|
169
|
+
**Require `name`:** If empty, list available threads and ask user to choose.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
cat .planning/threads/{name}.md 2>/dev/null || echo "Thread '{name}' not found."
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**If not found:**
|
|
176
|
+
```
|
|
177
|
+
Thread '{name}' not found.
|
|
178
|
+
Available: [list]
|
|
179
|
+
```
|
|
180
|
+
Exit.
|
|
181
|
+
|
|
182
|
+
**If found:**
|
|
183
|
+
|
|
184
|
+
Read the thread file and display its full context:
|
|
185
|
+
```
|
|
186
|
+
## Restoring Thread: {name}
|
|
187
|
+
|
|
188
|
+
**Saved:** {created}
|
|
189
|
+
**Phase:** {phase}: {phase_name}
|
|
190
|
+
|
|
191
|
+
[Display the Context Snapshot section verbatim]
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
Thread context restored. Continuing from saved state.
|
|
195
|
+
|
|
196
|
+
Next:
|
|
197
|
+
- /gsd-execute-phase {phase} - continue executing
|
|
198
|
+
- /gsd-plan-phase {phase} - re-plan if context changed
|
|
199
|
+
- /gsd-resume-work - full project orientation
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Mark the thread as resumed by updating its frontmatter `status: resumed` and adding a `resumed:` timestamp field.
|
|
203
|
+
</step>
|
|
204
|
+
|
|
205
|
+
</process>
|
|
206
|
+
|
|
207
|
+
<success_criteria>
|
|
208
|
+
- [ ] Subcommand routed correctly
|
|
209
|
+
- [ ] list: shows all saved threads with phase context
|
|
210
|
+
- [ ] new: saves full state snapshot to .planning/threads/
|
|
211
|
+
- [ ] switch: displays saved context and marks thread resumed
|
|
212
|
+
- [ ] Thread files committed to git
|
|
213
|
+
</success_criteria>
|
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
</gsd-arguments>
|
|
6
6
|
|
|
7
7
|
<gsd-execute>
|
|
8
|
+
<shell command="pi-gsd-tools">
|
|
9
|
+
<args>
|
|
10
|
+
<arg string="state" />
|
|
11
|
+
<arg string="reconcile" />
|
|
12
|
+
<arg string="--raw" />
|
|
13
|
+
</args>
|
|
14
|
+
<outs>
|
|
15
|
+
<suppress-errors />
|
|
16
|
+
<out type="string" name="reconcile-result" />
|
|
17
|
+
</outs>
|
|
18
|
+
</shell>
|
|
8
19
|
<shell command="pi-gsd-tools">
|
|
9
20
|
<args>
|
|
10
21
|
<arg string="roadmap" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<gsd-version v="1.12.
|
|
1
|
+
<gsd-version v="1.12.5" />
|
|
2
2
|
|
|
3
3
|
<gsd-arguments>
|
|
4
4
|
<settings><keep-extra-args /></settings>
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<args>
|
|
11
11
|
<arg string="init" />
|
|
12
12
|
<arg string="plan-phase" />
|
|
13
|
+
<arg name="phase" wrap='"' />
|
|
13
14
|
</args>
|
|
14
15
|
<outs>
|
|
15
16
|
<out type="string" name="init" />
|