gsd-opencode 1.3.33 → 1.4.2

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/command/gsd/add-phase.md +3 -3
  3. package/command/gsd/add-todo.md +182 -0
  4. package/command/gsd/check-todos.md +217 -0
  5. package/command/gsd/complete-milestone.md +4 -3
  6. package/command/gsd/consider-issues.md +5 -5
  7. package/command/gsd/create-roadmap.md +4 -4
  8. package/command/gsd/debug.md +58 -0
  9. package/command/gsd/discuss-phase.md +3 -4
  10. package/command/gsd/execute-phase.md +137 -0
  11. package/command/gsd/execute-plan.md +70 -95
  12. package/command/gsd/help.md +83 -6
  13. package/command/gsd/insert-phase.md +16 -16
  14. package/command/gsd/list-phase-assumptions.md +8 -8
  15. package/command/gsd/map-codebase.md +11 -11
  16. package/command/gsd/new-milestone.md +1 -1
  17. package/command/gsd/new-project.md +26 -7
  18. package/command/gsd/pause-work.md +4 -3
  19. package/command/gsd/plan-fix.md +8 -8
  20. package/command/gsd/plan-phase.md +9 -9
  21. package/command/gsd/progress.md +20 -11
  22. package/command/gsd/remove-phase.md +15 -15
  23. package/command/gsd/research-phase.md +10 -10
  24. package/command/gsd/resume-work.md +4 -5
  25. package/command/gsd/status.md +127 -0
  26. package/command/gsd/verify-work.md +8 -8
  27. package/get-shit-done/references/continuation-format.md +8 -8
  28. package/get-shit-done/references/debugging/debugging-mindset.md +253 -0
  29. package/get-shit-done/references/debugging/hypothesis-testing.md +373 -0
  30. package/get-shit-done/references/debugging/investigation-techniques.md +337 -0
  31. package/get-shit-done/references/debugging/verification-patterns.md +425 -0
  32. package/get-shit-done/references/debugging/when-to-research.md +361 -0
  33. package/get-shit-done/references/plan-format.md +68 -21
  34. package/get-shit-done/references/questioning.md +12 -12
  35. package/get-shit-done/references/research-pitfalls.md +2 -2
  36. package/get-shit-done/references/scope-estimation.md +95 -11
  37. package/get-shit-done/templates/DEBUG.md +159 -0
  38. package/get-shit-done/templates/agent-history.md +263 -0
  39. package/get-shit-done/templates/checkpoint-return.md +204 -0
  40. package/get-shit-done/templates/codebase/architecture.md +4 -4
  41. package/get-shit-done/templates/codebase/concerns.md +1 -1
  42. package/get-shit-done/templates/codebase/structure.md +11 -11
  43. package/get-shit-done/templates/config.json +8 -0
  44. package/get-shit-done/templates/context.md +0 -21
  45. package/get-shit-done/templates/continuation-prompt.md +235 -0
  46. package/get-shit-done/templates/milestone-archive.md +1 -1
  47. package/get-shit-done/templates/phase-prompt.md +289 -129
  48. package/get-shit-done/templates/roadmap.md +1 -1
  49. package/get-shit-done/templates/state.md +11 -0
  50. package/get-shit-done/templates/subagent-task-prompt.md +95 -0
  51. package/get-shit-done/templates/summary.md +2 -2
  52. package/get-shit-done/workflows/_archive/execute-phase.md +899 -0
  53. package/get-shit-done/workflows/complete-milestone.md +1 -1
  54. package/get-shit-done/workflows/create-milestone.md +1 -1
  55. package/get-shit-done/workflows/create-roadmap.md +2 -2
  56. package/get-shit-done/workflows/debug.md +426 -0
  57. package/get-shit-done/workflows/discovery-phase.md +1 -1
  58. package/get-shit-done/workflows/discuss-milestone.md +6 -6
  59. package/get-shit-done/workflows/discuss-phase.md +12 -22
  60. package/get-shit-done/workflows/execute-phase.md +272 -1504
  61. package/get-shit-done/workflows/execute-plan.md +1813 -0
  62. package/get-shit-done/workflows/map-codebase.md +9 -9
  63. package/get-shit-done/workflows/plan-phase.md +262 -49
  64. package/get-shit-done/workflows/resume-project.md +28 -2
  65. package/get-shit-done/workflows/transition.md +4 -4
  66. package/get-shit-done/workflows/verify-work.md +4 -4
  67. package/package.json +1 -1
@@ -78,15 +78,78 @@ See `~/.config/opencode/get-shit-done/references/tdd.md` for TDD plan structure.
78
78
  </split_signals>
79
79
 
80
80
  <splitting_strategies>
81
- **By subsystem:** Auth 01: DB models, 02: API routes, 03: Protected routes, 04: UI components
81
+ **Vertical slices (default):** Group by feature, not by layer.
82
82
 
83
- **By dependency:** Payments → 01: Stripe setup, 02: Subscription logic, 03: Frontend integration
83
+ ```
84
+ PREFER: Plan 01 = User (model + API + UI)
85
+ Plan 02 = Product (model + API + UI)
86
+ Plan 03 = Order (model + API + UI)
87
+
88
+ AVOID: Plan 01 = All models
89
+ Plan 02 = All APIs (depends on 01)
90
+ Plan 03 = All UIs (depends on 02)
91
+ ```
84
92
 
85
- **By complexity:** Dashboard 01: Layout shell, 02: Data fetching, 03: Visualization
93
+ Vertical slices maximize parallelism: [01, 02, 03] run simultaneously.
94
+ Horizontal layers force sequential execution: 01 → 02 → 03.
86
95
 
87
- **By verification:** Deploy 01: Vercel setup (checkpoint), 02: Env config (auto), 03: CI/CD (checkpoint)
96
+ **By dependency:** Only when genuine dependencies exist.
97
+ ```
98
+ Plan 01: Auth foundation (middleware, JWT utils)
99
+ Plan 02: Protected features (uses auth from 01)
100
+ ```
101
+
102
+ **By complexity:** When one slice is much heavier.
103
+ ```
104
+ Plan 01: Dashboard layout shell
105
+ Plan 02: Data fetching and state
106
+ Plan 03: Visualization components
107
+ ```
88
108
  </splitting_strategies>
89
109
 
110
+ <dependency_awareness>
111
+ **Plans declare dependencies explicitly via frontmatter.**
112
+
113
+ ```yaml
114
+ # Independent plan (Wave 1 candidate)
115
+ depends_on: []
116
+ files_modified: [src/features/user/model.ts, src/features/user/api.ts]
117
+ autonomous: true
118
+
119
+ # Dependent plan (later wave)
120
+ depends_on: ["03-01"]
121
+ files_modified: [src/integration/stripe.ts]
122
+ autonomous: true
123
+ ```
124
+
125
+ **Wave assignment rules:**
126
+ - `depends_on: []` + no file conflicts → Wave 1 (parallel)
127
+ - `depends_on: ["XX"]` → runs after plan XX completes
128
+ - Shared `files_modified` with sibling → sequential (by plan number)
129
+
130
+ **SUMMARY references:**
131
+ - Only reference prior SUMMARY if genuinely needed (imported types, decisions affecting this plan)
132
+ - Independent plans need NO prior SUMMARY references
133
+ - Reflexive chaining (02 refs 01, 03 refs 02) is an anti-pattern
134
+ </dependency_awareness>
135
+
136
+ <file_ownership>
137
+ **Exclusive file ownership prevents conflicts:**
138
+
139
+ ```yaml
140
+ # Plan 01 frontmatter
141
+ files_modified: [src/models/user.ts, src/api/users.ts, src/components/UserList.tsx]
142
+
143
+ # Plan 02 frontmatter
144
+ files_modified: [src/models/product.ts, src/api/products.ts, src/components/ProductList.tsx]
145
+ ```
146
+
147
+ No overlap → can run parallel.
148
+
149
+ **If file appears in multiple plans:** Later plan depends on earlier (by plan number).
150
+ **If file cannot be split:** Plans must be sequential for that file.
151
+ </file_ownership>
152
+
90
153
  <anti_patterns>
91
154
  **Bad - Comprehensive plan:**
92
155
  ```
@@ -101,8 +164,26 @@ Plan 1: "Auth Database Models" (2 tasks)
101
164
  Plan 2: "Auth API Core" (3 tasks)
102
165
  Plan 3: "Auth API Protection" (2 tasks)
103
166
  Plan 4: "Auth UI Components" (2 tasks)
104
- Each: 30-40% context, peak quality, atomic commits (2-3 task commits + 1 metadata commit)
167
+ Each: 30-40% context, peak quality, atomic commits
105
168
  ```
169
+
170
+ **Bad - Horizontal layers (sequential):**
171
+ ```
172
+ Plan 01: Create User model, Product model, Order model
173
+ Plan 02: Create /api/users, /api/products, /api/orders
174
+ Plan 03: Create UserList UI, ProductList UI, OrderList UI
175
+ ```
176
+ Result: 02 depends on 01, 03 depends on 02
177
+ Waves: [01] → [02] → [03] (fully sequential)
178
+
179
+ **Good - Vertical slices (parallel):**
180
+ ```
181
+ Plan 01: User feature (model + API + UI)
182
+ Plan 02: Product feature (model + API + UI)
183
+ Plan 03: Order feature (model + API + UI)
184
+ ```
185
+ Result: Each plan self-contained, no file overlap
186
+ Waves: [01, 02, 03] (all parallel)
106
187
  </anti_patterns>
107
188
 
108
189
  <estimating_context>
@@ -158,15 +239,18 @@ Each plan: fresh context, peak quality. More plans = more thoroughness, same qua
158
239
  <summary>
159
240
  **2-3 tasks, 50% context target:**
160
241
  - All tasks: Peak quality
161
- - Git: Atomic per-task commits (each task = 1 commit, plan = 1 metadata commit)
162
- - Autonomous plans: Subagent execution (fresh context)
242
+ - Git: Atomic per-task commits
243
+ - Parallel by default: Fresh context per subagent
163
244
 
164
245
  **The principle:** Aggressive atomicity. More plans, smaller scope, consistent quality.
165
246
 
166
- **The rule:** If in doubt, split. Quality over consolidation. Always.
167
-
168
- **Depth rule:** Depth increases plan COUNT, never plan SIZE.
247
+ **The rules:**
248
+ - If in doubt, split. Quality over consolidation.
249
+ - Depth increases plan COUNT, never plan SIZE.
250
+ - Vertical slices over horizontal layers.
251
+ - Explicit dependencies via `depends_on` frontmatter.
252
+ - Autonomous plans get parallel execution.
169
253
 
170
- **Commit rule:** Each plan produces 3-4 commits total (2-3 task commits + 1 docs commit). More granular history = better observability for Claude.
254
+ **Commit rule:** Each plan produces 3-4 commits total (2-3 task commits + 1 docs commit).
171
255
  </summary>
172
256
  </scope_estimation>
@@ -0,0 +1,159 @@
1
+ # Debug Template
2
+
3
+ Template for `.planning/debug/[slug].md` — active debug session tracking.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```markdown
10
+ ---
11
+ status: gathering | investigating | fixing | verifying | resolved
12
+ trigger: "[verbatim user input]"
13
+ created: [ISO timestamp]
14
+ updated: [ISO timestamp]
15
+ ---
16
+
17
+ ## Current Focus
18
+ <!-- OVERWRITE on each update - always reflects NOW -->
19
+
20
+ hypothesis: [current theory being tested]
21
+ test: [how testing it]
22
+ expecting: [what result means if true/false]
23
+ next_action: [immediate next step]
24
+
25
+ ## Symptoms
26
+ <!-- Written during gathering, then immutable -->
27
+
28
+ expected: [what should happen]
29
+ actual: [what actually happens]
30
+ errors: [error messages if any]
31
+ reproduction: [how to trigger]
32
+ started: [when it broke / always broken]
33
+
34
+ ## Eliminated
35
+ <!-- APPEND only - prevents re-investigating after /clear -->
36
+
37
+ - hypothesis: [theory that was wrong]
38
+ evidence: [what disproved it]
39
+ timestamp: [when eliminated]
40
+
41
+ ## Evidence
42
+ <!-- APPEND only - facts discovered during investigation -->
43
+
44
+ - timestamp: [when found]
45
+ checked: [what was examined]
46
+ found: [what was observed]
47
+ implication: [what this means]
48
+
49
+ ## Resolution
50
+ <!-- OVERWRITE as understanding evolves -->
51
+
52
+ root_cause: [empty until found]
53
+ fix: [empty until applied]
54
+ verification: [empty until verified]
55
+ files_changed: []
56
+ ```
57
+
58
+ ---
59
+
60
+ <section_rules>
61
+
62
+ **Frontmatter (status, trigger, timestamps):**
63
+ - `status`: OVERWRITE - reflects current phase
64
+ - `trigger`: IMMUTABLE - verbatim user input, never changes
65
+ - `created`: IMMUTABLE - set once
66
+ - `updated`: OVERWRITE - update on every change
67
+
68
+ **Current Focus:**
69
+ - OVERWRITE entirely on each update
70
+ - Always reflects what Claude is doing RIGHT NOW
71
+ - If Claude reads this after /clear, it knows exactly where to resume
72
+ - Fields: hypothesis, test, expecting, next_action
73
+
74
+ **Symptoms:**
75
+ - Written during initial gathering phase
76
+ - IMMUTABLE after gathering complete
77
+ - Reference point for what we're trying to fix
78
+ - Fields: expected, actual, errors, reproduction, started
79
+
80
+ **Eliminated:**
81
+ - APPEND only - never remove entries
82
+ - Prevents re-investigating dead ends after context reset
83
+ - Each entry: hypothesis, evidence that disproved it, timestamp
84
+ - Critical for efficiency across /clear boundaries
85
+
86
+ **Evidence:**
87
+ - APPEND only - never remove entries
88
+ - Facts discovered during investigation
89
+ - Each entry: timestamp, what checked, what found, implication
90
+ - Builds the case for root cause
91
+
92
+ **Resolution:**
93
+ - OVERWRITE as understanding evolves
94
+ - May update multiple times as fixes are tried
95
+ - Final state shows confirmed root cause and verified fix
96
+ - Fields: root_cause, fix, verification, files_changed
97
+
98
+ </section_rules>
99
+
100
+ <lifecycle>
101
+
102
+ **Creation:** Immediately when /gsd:debug is called
103
+ - Create file with trigger from user input
104
+ - Set status to "gathering"
105
+ - Current Focus: next_action = "gather symptoms"
106
+ - Symptoms: empty, to be filled
107
+
108
+ **During symptom gathering:**
109
+ - Update Symptoms section as user answers questions
110
+ - Update Current Focus with each question
111
+ - When complete: status → "investigating"
112
+
113
+ **During investigation:**
114
+ - OVERWRITE Current Focus with each hypothesis
115
+ - APPEND to Evidence with each finding
116
+ - APPEND to Eliminated when hypothesis disproved
117
+ - Update timestamp in frontmatter
118
+
119
+ **During fixing:**
120
+ - status → "fixing"
121
+ - Update Resolution.root_cause when confirmed
122
+ - Update Resolution.fix when applied
123
+ - Update Resolution.files_changed
124
+
125
+ **During verification:**
126
+ - status → "verifying"
127
+ - Update Resolution.verification with results
128
+ - If verification fails: status → "investigating", try again
129
+
130
+ **On resolution:**
131
+ - status → "resolved"
132
+ - Move file to .planning/debug/resolved/
133
+
134
+ </lifecycle>
135
+
136
+ <resume_behavior>
137
+
138
+ When Claude reads this file after /clear:
139
+
140
+ 1. Parse frontmatter → know status
141
+ 2. Read Current Focus → know exactly what was happening
142
+ 3. Read Eliminated → know what NOT to retry
143
+ 4. Read Evidence → know what's been learned
144
+ 5. Continue from next_action
145
+
146
+ The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
147
+
148
+ </resume_behavior>
149
+
150
+ <size_constraint>
151
+
152
+ Keep debug files focused:
153
+ - Evidence entries: 1-2 lines each, just the facts
154
+ - Eliminated: brief - hypothesis + why it failed
155
+ - No narrative prose - structured data only
156
+
157
+ If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
158
+
159
+ </size_constraint>
@@ -0,0 +1,263 @@
1
+ # Agent History Template
2
+
3
+ Template for `.planning/agent-history.json` - tracks subagent spawns during plan execution for resume capability.
4
+
5
+ ---
6
+
7
+ ## File Template
8
+
9
+ ```json
10
+ {
11
+ "version": "1.2",
12
+ "max_entries": 50,
13
+ "entries": []
14
+ }
15
+ ```
16
+
17
+ ## Entry Schema
18
+
19
+ Each entry tracks a subagent spawn or status change:
20
+
21
+ ```json
22
+ {
23
+ "agent_id": "agent_01HXXXX...",
24
+ "task_description": "Execute tasks 1-3 from plan 02-01",
25
+ "phase": "02",
26
+ "plan": "01",
27
+ "segment": 1,
28
+ "timestamp": "2026-01-15T14:22:10Z",
29
+ "status": "spawned",
30
+ "completion_timestamp": null,
31
+ "execution_mode": "sequential",
32
+ "parallel_group": null,
33
+ "granularity": "plan",
34
+ "depends_on": null,
35
+ "files_modified": null,
36
+ "checkpoints_skipped": null,
37
+ "task_results": null
38
+ }
39
+ ```
40
+
41
+ ### Field Definitions
42
+
43
+ | Field | Type | Description |
44
+ |-------|------|-------------|
45
+ | agent_id | string | Unique ID returned by Task tool |
46
+ | task_description | string | Brief description of what agent is executing |
47
+ | phase | string | Phase number (e.g., "02", "02.1") |
48
+ | plan | string | Plan number within phase |
49
+ | segment | number/null | Segment number for segmented plans, null for full plan |
50
+ | timestamp | string | ISO 8601 timestamp when agent was spawned |
51
+ | status | string | spawned, completed, interrupted, resumed, queued, failed |
52
+ | completion_timestamp | string/null | ISO timestamp when completed |
53
+ | execution_mode | string | "sequential" or "parallel" |
54
+ | parallel_group | string/null | Batch ID linking agents in same parallel execution |
55
+ | granularity | string | "plan" or "task_group" |
56
+ | depends_on | array/null | Agent IDs or plan refs this depends on |
57
+ | files_modified | array/null | Files this agent created/modified |
58
+ | checkpoints_skipped | number/null | Count of checkpoints skipped in background |
59
+ | task_results | object/null | Per-task outcomes for task-level parallelization |
60
+
61
+ ### Status Lifecycle
62
+
63
+ ```
64
+ queued ──> spawned ──────────────────> completed
65
+ │ ^
66
+ │ │
67
+ ├──> interrupted ──> resumed┘
68
+
69
+ └──> failed
70
+ ```
71
+
72
+ - **queued**: Waiting for dependency (parallel execution only)
73
+ - **spawned**: Agent created via Task tool, execution in progress
74
+ - **completed**: Agent finished successfully, results received
75
+ - **interrupted**: Session ended before agent completed (detected on resume)
76
+ - **resumed**: Previously interrupted agent resumed via resume parameter
77
+ - **failed**: Agent execution failed (error during execution)
78
+
79
+ ## Usage
80
+
81
+ ### When to Create File
82
+
83
+ Create `.planning/agent-history.json` from this template when:
84
+ - First subagent spawn in execute-plan workflow
85
+ - File doesn't exist yet
86
+
87
+ ### When to Add Entry
88
+
89
+ Add new entry immediately after Task tool returns with agent_id:
90
+
91
+ ```
92
+ 1. Task tool spawns subagent
93
+ 2. Response includes agent_id
94
+ 3. Write agent_id to .planning/current-agent-id.txt
95
+ 4. Append entry to agent-history.json with status "spawned"
96
+ ```
97
+
98
+ ### When to Update Entry
99
+
100
+ Update existing entry when:
101
+
102
+ **On successful completion:**
103
+ ```json
104
+ {
105
+ "status": "completed",
106
+ "completion_timestamp": "2026-01-15T14:45:33Z"
107
+ }
108
+ ```
109
+
110
+ **On resume detection (interrupted agent found):**
111
+ ```json
112
+ {
113
+ "status": "interrupted"
114
+ }
115
+ ```
116
+
117
+ Then add new entry with resumed status:
118
+ ```json
119
+ {
120
+ "agent_id": "agent_01HXXXX...",
121
+ "status": "resumed",
122
+ "timestamp": "2026-01-15T15:00:00Z"
123
+ }
124
+ ```
125
+
126
+ ### Entry Retention
127
+
128
+ - Keep maximum 50 entries (configurable via max_entries)
129
+ - On exceeding limit, remove oldest completed entries first
130
+ - Never remove entries with status "spawned" (may need resume)
131
+ - Prune during init_agent_tracking step
132
+
133
+ ## Example Entries
134
+
135
+ ### Sequential Execution (Default)
136
+
137
+ ```json
138
+ {
139
+ "agent_id": "agent_01HXY123ABC",
140
+ "task_description": "Execute full plan 02-01 (autonomous)",
141
+ "phase": "02",
142
+ "plan": "01",
143
+ "segment": null,
144
+ "timestamp": "2026-01-15T14:22:10Z",
145
+ "status": "completed",
146
+ "completion_timestamp": "2026-01-15T14:45:33Z",
147
+ "execution_mode": "sequential",
148
+ "parallel_group": null,
149
+ "granularity": "plan",
150
+ "depends_on": null,
151
+ "files_modified": ["src/api/auth.ts", "src/types/user.ts"],
152
+ "checkpoints_skipped": null,
153
+ "task_results": null
154
+ }
155
+ ```
156
+
157
+ ### Parallel Execution (Plan-Level)
158
+
159
+ Independent plans in a phase running in parallel:
160
+
161
+ ```json
162
+ {
163
+ "agent_id": "agent_01HXYZ123",
164
+ "task_description": "Execute plan 05-01 (parallel)",
165
+ "phase": "05",
166
+ "plan": "01",
167
+ "segment": null,
168
+ "timestamp": "2026-01-12T10:00:00Z",
169
+ "status": "completed",
170
+ "completion_timestamp": "2026-01-12T10:15:00Z",
171
+ "execution_mode": "parallel",
172
+ "parallel_group": "phase-05-batch-1736676000",
173
+ "granularity": "plan",
174
+ "depends_on": null,
175
+ "files_modified": ["src/auth/login.ts", "src/auth/types.ts"],
176
+ "checkpoints_skipped": 1,
177
+ "task_results": null
178
+ }
179
+ ```
180
+
181
+ ### Queued with Dependency
182
+
183
+ Agent waiting for another to complete:
184
+
185
+ ```json
186
+ {
187
+ "agent_id": "agent_01HXYZ456",
188
+ "task_description": "Execute plan 05-03 (depends on 05-01)",
189
+ "phase": "05",
190
+ "plan": "03",
191
+ "segment": null,
192
+ "timestamp": "2026-01-12T10:15:00Z",
193
+ "status": "spawned",
194
+ "completion_timestamp": null,
195
+ "execution_mode": "parallel",
196
+ "parallel_group": "phase-05-batch-1736676000",
197
+ "granularity": "plan",
198
+ "depends_on": ["agent_01HXYZ123"],
199
+ "files_modified": null,
200
+ "checkpoints_skipped": null,
201
+ "task_results": null
202
+ }
203
+ ```
204
+
205
+ ### Parallel Group Format
206
+
207
+ - **Plan-level parallel:** `phase-{phase}-batch-{timestamp}`
208
+ - **Task-level parallel:** `plan-{phase}-{plan}-tasks-batch-{timestamp}`
209
+
210
+ Example: `phase-05-batch-1736676000` groups all agents executing Phase 5 plans in parallel.
211
+
212
+ ## Parallel Execution Resume
213
+
214
+ When a session is interrupted during parallel execution:
215
+
216
+ ### Detection
217
+
218
+ Check for entries with `status: "spawned"` and `parallel_group` set. These are agents that were running when session ended.
219
+
220
+ ```bash
221
+ # Find interrupted parallel agents
222
+ jq '.entries[] | select(.status == "spawned" and .parallel_group != null)' .planning/agent-history.json
223
+ ```
224
+
225
+ ### Resume Options
226
+
227
+ 1. **Resume batch:** Resume all interrupted agents in the parallel group
228
+ 2. **Resume single:** Resume a specific agent by ID
229
+ 3. **Start fresh:** Abandon interrupted batch, start new execution
230
+
231
+ ### Resume Command
232
+
233
+ `/gsd:resume-task` accepts:
234
+ - No argument: Resume most recent interrupted agent
235
+ - Agent ID: Resume specific agent
236
+ - `--batch`: Resume entire parallel group
237
+
238
+ ### Conflict Detection
239
+
240
+ Before resuming, check for file modifications since spawn:
241
+
242
+ ```bash
243
+ git diff --name-only ${SPAWN_COMMIT}..HEAD
244
+ ```
245
+
246
+ If files modified by another agent conflict with files this agent modifies, warn user before proceeding. This prevents overwriting work done by other parallel agents that completed after the interruption.
247
+
248
+ ## Related Files
249
+
250
+ - `.planning/current-agent-id.txt`: Single line with currently active agent ID (for quick resume lookup)
251
+ - `.planning/STATE.md`: Project state including session continuity info
252
+
253
+ ---
254
+
255
+ ## Template Notes
256
+
257
+ **When to create:** First subagent spawn during execute-plan workflow.
258
+
259
+ **Location:** `.planning/agent-history.json`
260
+
261
+ **Companion file:** `.planning/current-agent-id.txt` (single agent ID, overwritten on each spawn)
262
+
263
+ **Purpose:** Enable resume capability for interrupted subagent executions via Task tool's resume parameter.