get-shit-done-cc 1.10.0-experimental.0 → 1.10.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.
- package/README.md +16 -17
- package/agents/gsd-executor.md +375 -37
- package/agents/gsd-planner.md +108 -15
- package/bin/install.js +163 -238
- package/commands/gsd/help.md +0 -43
- package/commands/gsd/new-project.md +8 -94
- package/commands/gsd/plan-phase.md +5 -35
- package/get-shit-done/references/verification-patterns.md +1 -1
- package/get-shit-done/templates/phase-prompt.md +4 -4
- package/get-shit-done/templates/state.md +0 -37
- package/get-shit-done/workflows/execute-phase.md +1 -44
- package/get-shit-done/workflows/execute-plan.md +856 -34
- package/hooks/dist/gsd-statusline.js +9 -6
- package/package.json +7 -10
- package/agents/design-specialist.md +0 -222
- package/commands/gsd/autopilot.md +0 -518
- package/commands/gsd/checkpoints.md +0 -229
- package/commands/gsd/design-system.md +0 -70
- package/commands/gsd/discuss-design.md +0 -77
- package/commands/gsd/extend.md +0 -80
- package/get-shit-done/references/ccr-integration.md +0 -468
- package/get-shit-done/references/checkpoint-execution.md +0 -369
- package/get-shit-done/references/checkpoint-types.md +0 -728
- package/get-shit-done/references/deviation-rules.md +0 -215
- package/get-shit-done/references/framework-patterns.md +0 -543
- package/get-shit-done/references/ui-principles.md +0 -258
- package/get-shit-done/skills/gsd-extend/SKILL.md +0 -154
- package/get-shit-done/skills/gsd-extend/references/agent-structure.md +0 -305
- package/get-shit-done/skills/gsd-extend/references/extension-anatomy.md +0 -123
- package/get-shit-done/skills/gsd-extend/references/reference-structure.md +0 -408
- package/get-shit-done/skills/gsd-extend/references/template-structure.md +0 -370
- package/get-shit-done/skills/gsd-extend/references/validation-rules.md +0 -140
- package/get-shit-done/skills/gsd-extend/references/workflow-structure.md +0 -253
- package/get-shit-done/skills/gsd-extend/templates/agent-template.md +0 -234
- package/get-shit-done/skills/gsd-extend/templates/reference-template.md +0 -239
- package/get-shit-done/skills/gsd-extend/templates/workflow-template.md +0 -169
- package/get-shit-done/skills/gsd-extend/workflows/create-approach.md +0 -332
- package/get-shit-done/skills/gsd-extend/workflows/list-extensions.md +0 -133
- package/get-shit-done/skills/gsd-extend/workflows/remove-extension.md +0 -93
- package/get-shit-done/skills/gsd-extend/workflows/validate-extension.md +0 -184
- package/get-shit-done/templates/autopilot-script-simple.sh +0 -181
- package/get-shit-done/templates/autopilot-script.sh +0 -1142
- package/get-shit-done/templates/autopilot-script.sh.backup +0 -1142
- package/get-shit-done/templates/design-system.md +0 -238
- package/get-shit-done/templates/phase-design.md +0 -205
- package/get-shit-done/templates/phase-models-template.json +0 -71
- package/get-shit-done/tui/App.tsx +0 -169
- package/get-shit-done/tui/README.md +0 -107
- package/get-shit-done/tui/build.js +0 -37
- package/get-shit-done/tui/components/ActivityFeed.tsx +0 -126
- package/get-shit-done/tui/components/PhaseCard.tsx +0 -86
- package/get-shit-done/tui/components/StatsBar.tsx +0 -147
- package/get-shit-done/tui/dist/index.js +0 -387
- package/get-shit-done/tui/index.tsx +0 -12
- package/get-shit-done/tui/package-lock.json +0 -1074
- package/get-shit-done/tui/package.json +0 -22
- package/get-shit-done/tui/utils/pipeReader.ts +0 -129
- package/get-shit-done/workflows/design-system.md +0 -245
- package/get-shit-done/workflows/discuss-design.md +0 -330
- package/get-shit-done/workflows/execute-plan-auth.md +0 -122
- package/get-shit-done/workflows/execute-plan-checkpoints.md +0 -541
|
@@ -9,19 +9,6 @@ Read config.json for planning behavior settings.
|
|
|
9
9
|
@~/.claude/get-shit-done/references/git-integration.md
|
|
10
10
|
</required_reading>
|
|
11
11
|
|
|
12
|
-
<conditional_loading>
|
|
13
|
-
## Load Based on Plan Characteristics
|
|
14
|
-
|
|
15
|
-
**If plan has checkpoints** (detect with: `grep -q 'type="checkpoint' PLAN.md`):
|
|
16
|
-
@~/.claude/get-shit-done/workflows/execute-plan-checkpoints.md
|
|
17
|
-
|
|
18
|
-
**If authentication error encountered during execution:**
|
|
19
|
-
@~/.claude/get-shit-done/workflows/execute-plan-auth.md
|
|
20
|
-
|
|
21
|
-
**Deviation handling rules (reference as needed):**
|
|
22
|
-
@~/.claude/get-shit-done/references/deviation-rules.md
|
|
23
|
-
</conditional_loading>
|
|
24
|
-
|
|
25
12
|
<process>
|
|
26
13
|
|
|
27
14
|
<step name="resolve_model_profile" priority="first">
|
|
@@ -122,14 +109,6 @@ SUMMARY naming follows same pattern:
|
|
|
122
109
|
|
|
123
110
|
Confirm with user if ambiguous.
|
|
124
111
|
|
|
125
|
-
**Check for checkpoints (determines which workflow extensions to load):**
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
HAS_CHECKPOINTS=$(grep -q 'type="checkpoint' .planning/phases/XX-name/{phase}-{plan}-PLAN.md && echo "true" || echo "false")
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
If `HAS_CHECKPOINTS=true`, load execute-plan-checkpoints.md for checkpoint handling logic.
|
|
132
|
-
|
|
133
112
|
<config-check>
|
|
134
113
|
```bash
|
|
135
114
|
cat .planning/config.json 2>/dev/null
|
|
@@ -144,7 +123,7 @@ cat .planning/config.json 2>/dev/null
|
|
|
144
123
|
Starting execution...
|
|
145
124
|
```
|
|
146
125
|
|
|
147
|
-
Proceed directly to
|
|
126
|
+
Proceed directly to parse_segments step.
|
|
148
127
|
</if>
|
|
149
128
|
|
|
150
129
|
<if mode="interactive" OR="custom with gates.execute_next_plan true">
|
|
@@ -172,11 +151,384 @@ PLAN_START_EPOCH=$(date +%s)
|
|
|
172
151
|
Store in shell variables for duration calculation at completion.
|
|
173
152
|
</step>
|
|
174
153
|
|
|
154
|
+
<step name="parse_segments">
|
|
155
|
+
**Intelligent segmentation: Parse plan into execution segments.**
|
|
156
|
+
|
|
157
|
+
Plans are divided into segments by checkpoints. Each segment is routed to optimal execution context (subagent or main).
|
|
158
|
+
|
|
159
|
+
**1. Check for checkpoints:**
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Find all checkpoints and their types
|
|
163
|
+
grep -n "type=\"checkpoint" .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**2. Analyze execution strategy:**
|
|
167
|
+
|
|
168
|
+
**If NO checkpoints found:**
|
|
169
|
+
|
|
170
|
+
- **Fully autonomous plan** - spawn single subagent for entire plan
|
|
171
|
+
- Subagent gets fresh 200k context, executes all tasks, creates SUMMARY, commits
|
|
172
|
+
- Main context: Just orchestration (~5% usage)
|
|
173
|
+
|
|
174
|
+
**If checkpoints found, parse into segments:**
|
|
175
|
+
|
|
176
|
+
Segment = tasks between checkpoints (or start→first checkpoint, or last checkpoint→end)
|
|
177
|
+
|
|
178
|
+
**For each segment, determine routing:**
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Segment routing rules:
|
|
182
|
+
|
|
183
|
+
IF segment has no prior checkpoint:
|
|
184
|
+
→ SUBAGENT (first segment, nothing to depend on)
|
|
185
|
+
|
|
186
|
+
IF segment follows checkpoint:human-verify:
|
|
187
|
+
→ SUBAGENT (verification is just confirmation, doesn't affect next work)
|
|
188
|
+
|
|
189
|
+
IF segment follows checkpoint:decision OR checkpoint:human-action:
|
|
190
|
+
→ MAIN CONTEXT (next tasks need the decision/result)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**3. Execution pattern:**
|
|
194
|
+
|
|
195
|
+
**Pattern A: Fully autonomous (no checkpoints)**
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
Spawn subagent → execute all tasks → SUMMARY → commit → report back
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Pattern B: Segmented with verify-only checkpoints**
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Segment 1 (tasks 1-3): Spawn subagent → execute → report back
|
|
205
|
+
Checkpoint 4 (human-verify): Main context → you verify → continue
|
|
206
|
+
Segment 2 (tasks 5-6): Spawn NEW subagent → execute → report back
|
|
207
|
+
Checkpoint 7 (human-verify): Main context → you verify → continue
|
|
208
|
+
Aggregate results → SUMMARY → commit
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Pattern C: Decision-dependent (must stay in main)**
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Checkpoint 1 (decision): Main context → you decide → continue in main
|
|
215
|
+
Tasks 2-5: Main context (need decision from checkpoint 1)
|
|
216
|
+
No segmentation benefit - execute entirely in main
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**4. Why segment:** Fresh context per subagent preserves peak quality. Main context stays lean (~15% usage).
|
|
220
|
+
|
|
221
|
+
**5. Implementation:**
|
|
222
|
+
|
|
223
|
+
**For fully autonomous plans:**
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
1. Run init_agent_tracking step first (see step below)
|
|
227
|
+
|
|
228
|
+
2. Use Task tool with subagent_type="gsd-executor" and model="{executor_model}":
|
|
229
|
+
|
|
230
|
+
Prompt: "Execute plan at .planning/phases/{phase}-{plan}-PLAN.md
|
|
231
|
+
|
|
232
|
+
This is an autonomous plan (no checkpoints). Execute all tasks, create SUMMARY.md in phase directory, commit with message following plan's commit guidance.
|
|
233
|
+
|
|
234
|
+
Follow all deviation rules and authentication gate protocols from the plan.
|
|
235
|
+
|
|
236
|
+
When complete, report: plan name, tasks completed, SUMMARY path, commit hash."
|
|
237
|
+
|
|
238
|
+
3. After Task tool returns with agent_id:
|
|
239
|
+
|
|
240
|
+
a. Write agent_id to current-agent-id.txt:
|
|
241
|
+
echo "[agent_id]" > .planning/current-agent-id.txt
|
|
242
|
+
|
|
243
|
+
b. Append spawn entry to agent-history.json:
|
|
244
|
+
{
|
|
245
|
+
"agent_id": "[agent_id from Task response]",
|
|
246
|
+
"task_description": "Execute full plan {phase}-{plan} (autonomous)",
|
|
247
|
+
"phase": "{phase}",
|
|
248
|
+
"plan": "{plan}",
|
|
249
|
+
"segment": null,
|
|
250
|
+
"timestamp": "[ISO timestamp]",
|
|
251
|
+
"status": "spawned",
|
|
252
|
+
"completion_timestamp": null
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
4. Wait for subagent to complete
|
|
256
|
+
|
|
257
|
+
5. After subagent completes successfully:
|
|
258
|
+
|
|
259
|
+
a. Update agent-history.json entry:
|
|
260
|
+
- Find entry with matching agent_id
|
|
261
|
+
- Set status: "completed"
|
|
262
|
+
- Set completion_timestamp: "[ISO timestamp]"
|
|
263
|
+
|
|
264
|
+
b. Clear current-agent-id.txt:
|
|
265
|
+
rm .planning/current-agent-id.txt
|
|
266
|
+
|
|
267
|
+
6. Report completion to user
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**For segmented plans (has verify-only checkpoints):**
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
Execute segment-by-segment:
|
|
274
|
+
|
|
275
|
+
For each autonomous segment:
|
|
276
|
+
Spawn subagent with prompt: "Execute tasks [X-Y] from plan at .planning/phases/{phase}-{plan}-PLAN.md. Read the plan for full context and deviation rules. Do NOT create SUMMARY or commit - just execute these tasks and report results."
|
|
277
|
+
|
|
278
|
+
Wait for subagent completion
|
|
279
|
+
|
|
280
|
+
For each checkpoint:
|
|
281
|
+
Execute in main context
|
|
282
|
+
Wait for user interaction
|
|
283
|
+
Continue to next segment
|
|
284
|
+
|
|
285
|
+
After all segments complete:
|
|
286
|
+
Aggregate all results
|
|
287
|
+
Create SUMMARY.md
|
|
288
|
+
Commit with all changes
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**For decision-dependent plans:**
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
Execute in main context (standard flow below)
|
|
295
|
+
No subagent routing
|
|
296
|
+
Quality maintained through small scope (2-3 tasks per plan)
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
See step name="segment_execution" for detailed segment execution loop.
|
|
300
|
+
</step>
|
|
301
|
+
|
|
302
|
+
<step name="init_agent_tracking">
|
|
303
|
+
**Initialize agent tracking for subagent resume capability.**
|
|
304
|
+
|
|
305
|
+
Before spawning any subagents, set up tracking infrastructure:
|
|
306
|
+
|
|
307
|
+
**1. Create/verify tracking files:**
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
# Create agent history file if doesn't exist
|
|
311
|
+
if [ ! -f .planning/agent-history.json ]; then
|
|
312
|
+
echo '{"version":"1.0","max_entries":50,"entries":[]}' > .planning/agent-history.json
|
|
313
|
+
fi
|
|
314
|
+
|
|
315
|
+
# Clear any stale current-agent-id (from interrupted sessions)
|
|
316
|
+
# Will be populated when subagent spawns
|
|
317
|
+
rm -f .planning/current-agent-id.txt
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**2. Check for interrupted agents (resume detection):**
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Check if current-agent-id.txt exists from previous interrupted session
|
|
324
|
+
if [ -f .planning/current-agent-id.txt ]; then
|
|
325
|
+
INTERRUPTED_ID=$(cat .planning/current-agent-id.txt)
|
|
326
|
+
echo "Found interrupted agent: $INTERRUPTED_ID"
|
|
327
|
+
fi
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**If interrupted agent found:**
|
|
331
|
+
- The agent ID file exists from a previous session that didn't complete
|
|
332
|
+
- This agent can potentially be resumed using Task tool's `resume` parameter
|
|
333
|
+
- Present to user: "Previous session was interrupted. Resume agent [ID] or start fresh?"
|
|
334
|
+
- If resume: Use Task tool with `resume` parameter set to the interrupted ID
|
|
335
|
+
- If fresh: Clear the file and proceed normally
|
|
336
|
+
|
|
337
|
+
**3. Prune old entries (housekeeping):**
|
|
338
|
+
|
|
339
|
+
If agent-history.json has more than `max_entries`:
|
|
340
|
+
- Remove oldest entries with status "completed"
|
|
341
|
+
- Never remove entries with status "spawned" (may need resume)
|
|
342
|
+
- Keep file under size limit for fast reads
|
|
343
|
+
|
|
344
|
+
**When to run this step:**
|
|
345
|
+
- Pattern A (fully autonomous): Before spawning the single subagent
|
|
346
|
+
- Pattern B (segmented): Before the segment execution loop
|
|
347
|
+
- Pattern C (main context): Skip - no subagents spawned
|
|
348
|
+
</step>
|
|
349
|
+
|
|
350
|
+
<step name="segment_execution">
|
|
351
|
+
**Detailed segment execution loop for segmented plans.**
|
|
352
|
+
|
|
353
|
+
**This step applies ONLY to segmented plans (Pattern B: has checkpoints, but they're verify-only).**
|
|
354
|
+
|
|
355
|
+
For Pattern A (fully autonomous) and Pattern C (decision-dependent), skip this step.
|
|
356
|
+
|
|
357
|
+
**Execution flow:**
|
|
358
|
+
|
|
359
|
+
````
|
|
360
|
+
1. Parse plan to identify segments:
|
|
361
|
+
- Read plan file
|
|
362
|
+
- Find checkpoint locations: grep -n "type=\"checkpoint" PLAN.md
|
|
363
|
+
- Identify checkpoint types: grep "type=\"checkpoint" PLAN.md | grep -o 'checkpoint:[^"]*'
|
|
364
|
+
- Build segment map:
|
|
365
|
+
* Segment 1: Start → first checkpoint (tasks 1-X)
|
|
366
|
+
* Checkpoint 1: Type and location
|
|
367
|
+
* Segment 2: After checkpoint 1 → next checkpoint (tasks X+1 to Y)
|
|
368
|
+
* Checkpoint 2: Type and location
|
|
369
|
+
* ... continue for all segments
|
|
370
|
+
|
|
371
|
+
2. For each segment in order:
|
|
372
|
+
|
|
373
|
+
A. Determine routing (apply rules from parse_segments):
|
|
374
|
+
- No prior checkpoint? → Subagent
|
|
375
|
+
- Prior checkpoint was human-verify? → Subagent
|
|
376
|
+
- Prior checkpoint was decision/human-action? → Main context
|
|
377
|
+
|
|
378
|
+
B. If routing = Subagent:
|
|
379
|
+
```
|
|
380
|
+
Spawn Task tool with subagent_type="gsd-executor" and model="{executor_model}":
|
|
381
|
+
|
|
382
|
+
Prompt: "Execute tasks [task numbers/names] from plan at [plan path].
|
|
383
|
+
|
|
384
|
+
**Context:**
|
|
385
|
+
- Read the full plan for objective, context files, and deviation rules
|
|
386
|
+
- You are executing a SEGMENT of this plan (not the full plan)
|
|
387
|
+
- Other segments will be executed separately
|
|
388
|
+
|
|
389
|
+
**Your responsibilities:**
|
|
390
|
+
- Execute only the tasks assigned to you
|
|
391
|
+
- Follow all deviation rules and authentication gate protocols
|
|
392
|
+
- Track deviations for later Summary
|
|
393
|
+
- DO NOT create SUMMARY.md (will be created after all segments complete)
|
|
394
|
+
- DO NOT commit (will be done after all segments complete)
|
|
395
|
+
|
|
396
|
+
**Report back:**
|
|
397
|
+
- Tasks completed
|
|
398
|
+
- Files created/modified
|
|
399
|
+
- Deviations encountered
|
|
400
|
+
- Any issues or blockers"
|
|
401
|
+
|
|
402
|
+
**After Task tool returns with agent_id:**
|
|
403
|
+
|
|
404
|
+
1. Write agent_id to current-agent-id.txt:
|
|
405
|
+
echo "[agent_id]" > .planning/current-agent-id.txt
|
|
406
|
+
|
|
407
|
+
2. Append spawn entry to agent-history.json:
|
|
408
|
+
{
|
|
409
|
+
"agent_id": "[agent_id from Task response]",
|
|
410
|
+
"task_description": "Execute tasks [X-Y] from plan {phase}-{plan}",
|
|
411
|
+
"phase": "{phase}",
|
|
412
|
+
"plan": "{plan}",
|
|
413
|
+
"segment": [segment_number],
|
|
414
|
+
"timestamp": "[ISO timestamp]",
|
|
415
|
+
"status": "spawned",
|
|
416
|
+
"completion_timestamp": null
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
Wait for subagent to complete
|
|
420
|
+
Capture results (files changed, deviations, etc.)
|
|
421
|
+
|
|
422
|
+
**After subagent completes successfully:**
|
|
423
|
+
|
|
424
|
+
1. Update agent-history.json entry:
|
|
425
|
+
- Find entry with matching agent_id
|
|
426
|
+
- Set status: "completed"
|
|
427
|
+
- Set completion_timestamp: "[ISO timestamp]"
|
|
428
|
+
|
|
429
|
+
2. Clear current-agent-id.txt:
|
|
430
|
+
rm .planning/current-agent-id.txt
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
C. If routing = Main context:
|
|
435
|
+
Execute tasks in main using standard execution flow (step name="execute")
|
|
436
|
+
Track results locally
|
|
437
|
+
|
|
438
|
+
D. After segment completes (whether subagent or main):
|
|
439
|
+
Continue to next checkpoint/segment
|
|
440
|
+
|
|
441
|
+
3. After ALL segments complete:
|
|
442
|
+
|
|
443
|
+
A. Aggregate results from all segments:
|
|
444
|
+
- Collect files created/modified from all segments
|
|
445
|
+
- Collect deviations from all segments
|
|
446
|
+
- Collect decisions from all checkpoints
|
|
447
|
+
- Merge into complete picture
|
|
448
|
+
|
|
449
|
+
B. Create SUMMARY.md:
|
|
450
|
+
- Use aggregated results
|
|
451
|
+
- Document all work from all segments
|
|
452
|
+
- Include deviations from all segments
|
|
453
|
+
- Note which segments were subagented
|
|
454
|
+
|
|
455
|
+
C. Commit:
|
|
456
|
+
- Stage all files from all segments
|
|
457
|
+
- Stage SUMMARY.md
|
|
458
|
+
- Commit with message following plan guidance
|
|
459
|
+
- Include note about segmented execution if relevant
|
|
460
|
+
|
|
461
|
+
D. Report completion
|
|
462
|
+
|
|
463
|
+
**Example execution trace:**
|
|
464
|
+
|
|
465
|
+
````
|
|
466
|
+
|
|
467
|
+
Plan: 01-02-PLAN.md (8 tasks, 2 verify checkpoints)
|
|
468
|
+
|
|
469
|
+
Parsing segments...
|
|
470
|
+
|
|
471
|
+
- Segment 1: Tasks 1-3 (autonomous)
|
|
472
|
+
- Checkpoint 4: human-verify
|
|
473
|
+
- Segment 2: Tasks 5-6 (autonomous)
|
|
474
|
+
- Checkpoint 7: human-verify
|
|
475
|
+
- Segment 3: Task 8 (autonomous)
|
|
476
|
+
|
|
477
|
+
Routing analysis:
|
|
478
|
+
|
|
479
|
+
- Segment 1: No prior checkpoint → SUBAGENT ✓
|
|
480
|
+
- Checkpoint 4: Verify only → MAIN (required)
|
|
481
|
+
- Segment 2: After verify → SUBAGENT ✓
|
|
482
|
+
- Checkpoint 7: Verify only → MAIN (required)
|
|
483
|
+
- Segment 3: After verify → SUBAGENT ✓
|
|
484
|
+
|
|
485
|
+
Execution:
|
|
486
|
+
[1] Spawning subagent for tasks 1-3...
|
|
487
|
+
→ Subagent completes: 3 files modified, 0 deviations
|
|
488
|
+
[2] Executing checkpoint 4 (human-verify)...
|
|
489
|
+
╔═══════════════════════════════════════════════════════╗
|
|
490
|
+
║ CHECKPOINT: Verification Required ║
|
|
491
|
+
╚═══════════════════════════════════════════════════════╝
|
|
492
|
+
|
|
493
|
+
Progress: 3/8 tasks complete
|
|
494
|
+
Task: Verify database schema
|
|
495
|
+
|
|
496
|
+
Built: User and Session tables with relations
|
|
497
|
+
|
|
498
|
+
How to verify:
|
|
499
|
+
1. Check src/db/schema.ts for correct types
|
|
500
|
+
|
|
501
|
+
────────────────────────────────────────────────────────
|
|
502
|
+
→ YOUR ACTION: Type "approved" or describe issues
|
|
503
|
+
────────────────────────────────────────────────────────
|
|
504
|
+
User: "approved"
|
|
505
|
+
[3] Spawning subagent for tasks 5-6...
|
|
506
|
+
→ Subagent completes: 2 files modified, 1 deviation (added error handling)
|
|
507
|
+
[4] Executing checkpoint 7 (human-verify)...
|
|
508
|
+
User: "approved"
|
|
509
|
+
[5] Spawning subagent for task 8...
|
|
510
|
+
→ Subagent completes: 1 file modified, 0 deviations
|
|
511
|
+
|
|
512
|
+
Aggregating results...
|
|
513
|
+
|
|
514
|
+
- Total files: 6 modified
|
|
515
|
+
- Total deviations: 1
|
|
516
|
+
- Segmented execution: 3 subagents, 2 checkpoints
|
|
517
|
+
|
|
518
|
+
Creating SUMMARY.md...
|
|
519
|
+
Committing...
|
|
520
|
+
✓ Complete
|
|
521
|
+
|
|
522
|
+
````
|
|
523
|
+
|
|
524
|
+
**Benefit:** Each subagent starts fresh (~20-30% context), enabling larger plans without quality degradation.
|
|
525
|
+
</step>
|
|
526
|
+
|
|
175
527
|
<step name="load_prompt">
|
|
176
528
|
Read the plan prompt:
|
|
177
529
|
```bash
|
|
178
530
|
cat .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
179
|
-
|
|
531
|
+
````
|
|
180
532
|
|
|
181
533
|
This IS the execution instructions. Follow it exactly.
|
|
182
534
|
|
|
@@ -202,10 +554,10 @@ Use AskUserQuestion:
|
|
|
202
554
|
- "Proceed anyway" - Issues won't block this phase
|
|
203
555
|
- "Address first" - Let's resolve before continuing
|
|
204
556
|
- "Review previous" - Show me the full summary
|
|
205
|
-
</step>
|
|
557
|
+
</step>
|
|
206
558
|
|
|
207
559
|
<step name="execute">
|
|
208
|
-
Execute each task in the prompt. **Deviations are normal** - handle them using
|
|
560
|
+
Execute each task in the prompt. **Deviations are normal** - handle them automatically using embedded rules below.
|
|
209
561
|
|
|
210
562
|
1. Read the @context files listed in the prompt
|
|
211
563
|
|
|
@@ -218,8 +570,8 @@ Execute each task in the prompt. **Deviations are normal** - handle them using d
|
|
|
218
570
|
- If no: Standard implementation
|
|
219
571
|
|
|
220
572
|
- Work toward task completion
|
|
221
|
-
- **If CLI/API returns authentication error:**
|
|
222
|
-
- **When you discover additional work not in plan:** Apply deviation rules (see
|
|
573
|
+
- **If CLI/API returns authentication error:** Handle as authentication gate (see below)
|
|
574
|
+
- **When you discover additional work not in plan:** Apply deviation rules (see below) automatically
|
|
223
575
|
- Continue implementing, applying rules as needed
|
|
224
576
|
- Run the verification
|
|
225
577
|
- Confirm done criteria met
|
|
@@ -230,15 +582,327 @@ Execute each task in the prompt. **Deviations are normal** - handle them using d
|
|
|
230
582
|
**If `type="checkpoint:*"`:**
|
|
231
583
|
|
|
232
584
|
- STOP immediately (do not continue to next task)
|
|
233
|
-
- Execute checkpoint_protocol (see
|
|
585
|
+
- Execute checkpoint_protocol (see below)
|
|
234
586
|
- Wait for user response
|
|
235
587
|
- Verify if possible (check files, env vars, etc.)
|
|
236
588
|
- Only after user confirmation: continue to next task
|
|
237
589
|
|
|
238
590
|
3. Run overall verification checks from `<verification>` section
|
|
239
591
|
4. Confirm all success criteria from `<success_criteria>` section met
|
|
240
|
-
5. Document all deviations in Summary (
|
|
241
|
-
</step>
|
|
592
|
+
5. Document all deviations in Summary (automatic - see deviation_documentation below)
|
|
593
|
+
</step>
|
|
594
|
+
|
|
595
|
+
<authentication_gates>
|
|
596
|
+
|
|
597
|
+
## Handling Authentication Errors During Execution
|
|
598
|
+
|
|
599
|
+
**When you encounter authentication errors during `type="auto"` task execution:**
|
|
600
|
+
|
|
601
|
+
This is NOT a failure. Authentication gates are expected and normal. Handle them dynamically:
|
|
602
|
+
|
|
603
|
+
**Authentication error indicators:**
|
|
604
|
+
|
|
605
|
+
- CLI returns: "Error: Not authenticated", "Not logged in", "Unauthorized", "401", "403"
|
|
606
|
+
- API returns: "Authentication required", "Invalid API key", "Missing credentials"
|
|
607
|
+
- Command fails with: "Please run {tool} login" or "Set {ENV_VAR} environment variable"
|
|
608
|
+
|
|
609
|
+
**Authentication gate protocol:**
|
|
610
|
+
|
|
611
|
+
1. **Recognize it's an auth gate** - Not a bug, just needs credentials
|
|
612
|
+
2. **STOP current task execution** - Don't retry repeatedly
|
|
613
|
+
3. **Create dynamic checkpoint:human-action** - Present it to user immediately
|
|
614
|
+
4. **Provide exact authentication steps** - CLI commands, where to get keys
|
|
615
|
+
5. **Wait for user to authenticate** - Let them complete auth flow
|
|
616
|
+
6. **Verify authentication works** - Test that credentials are valid
|
|
617
|
+
7. **Retry the original task** - Resume automation where you left off
|
|
618
|
+
8. **Continue normally** - Don't treat this as an error in Summary
|
|
619
|
+
|
|
620
|
+
**Example: Vercel deployment hits auth error**
|
|
621
|
+
|
|
622
|
+
```
|
|
623
|
+
Task 3: Deploy to Vercel
|
|
624
|
+
Running: vercel --yes
|
|
625
|
+
|
|
626
|
+
Error: Not authenticated. Please run 'vercel login'
|
|
627
|
+
|
|
628
|
+
[Create checkpoint dynamically]
|
|
629
|
+
|
|
630
|
+
╔═══════════════════════════════════════════════════════╗
|
|
631
|
+
║ CHECKPOINT: Action Required ║
|
|
632
|
+
╚═══════════════════════════════════════════════════════╝
|
|
633
|
+
|
|
634
|
+
Progress: 2/8 tasks complete
|
|
635
|
+
Task: Authenticate Vercel CLI
|
|
636
|
+
|
|
637
|
+
Attempted: vercel --yes
|
|
638
|
+
Error: Not authenticated
|
|
639
|
+
|
|
640
|
+
What you need to do:
|
|
641
|
+
1. Run: vercel login
|
|
642
|
+
2. Complete browser authentication
|
|
643
|
+
|
|
644
|
+
I'll verify: vercel whoami returns your account
|
|
645
|
+
|
|
646
|
+
────────────────────────────────────────────────────────
|
|
647
|
+
→ YOUR ACTION: Type "done" when authenticated
|
|
648
|
+
────────────────────────────────────────────────────────
|
|
649
|
+
|
|
650
|
+
[Wait for user response]
|
|
651
|
+
|
|
652
|
+
[User types "done"]
|
|
653
|
+
|
|
654
|
+
Verifying authentication...
|
|
655
|
+
Running: vercel whoami
|
|
656
|
+
✓ Authenticated as: user@example.com
|
|
657
|
+
|
|
658
|
+
Retrying deployment...
|
|
659
|
+
Running: vercel --yes
|
|
660
|
+
✓ Deployed to: https://myapp-abc123.vercel.app
|
|
661
|
+
|
|
662
|
+
Task 3 complete. Continuing to task 4...
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
**In Summary documentation:**
|
|
666
|
+
|
|
667
|
+
Document authentication gates as normal flow, not deviations:
|
|
668
|
+
|
|
669
|
+
```markdown
|
|
670
|
+
## Authentication Gates
|
|
671
|
+
|
|
672
|
+
During execution, I encountered authentication requirements:
|
|
673
|
+
|
|
674
|
+
1. Task 3: Vercel CLI required authentication
|
|
675
|
+
- Paused for `vercel login`
|
|
676
|
+
- Resumed after authentication
|
|
677
|
+
- Deployed successfully
|
|
678
|
+
|
|
679
|
+
These are normal gates, not errors.
|
|
680
|
+
```
|
|
681
|
+
|
|
682
|
+
**Key principles:**
|
|
683
|
+
|
|
684
|
+
- Authentication gates are NOT failures or bugs
|
|
685
|
+
- They're expected interaction points during first-time setup
|
|
686
|
+
- Handle them gracefully and continue automation after unblocked
|
|
687
|
+
- Don't mark tasks as "failed" or "incomplete" due to auth gates
|
|
688
|
+
- Document them as normal flow, separate from deviations
|
|
689
|
+
</authentication_gates>
|
|
690
|
+
|
|
691
|
+
<deviation_rules>
|
|
692
|
+
|
|
693
|
+
## Automatic Deviation Handling
|
|
694
|
+
|
|
695
|
+
**While executing tasks, you WILL discover work not in the plan.** This is normal.
|
|
696
|
+
|
|
697
|
+
Apply these rules automatically. Track all deviations for Summary documentation.
|
|
698
|
+
|
|
699
|
+
---
|
|
700
|
+
|
|
701
|
+
**RULE 1: Auto-fix bugs**
|
|
702
|
+
|
|
703
|
+
**Trigger:** Code doesn't work as intended (broken behavior, incorrect output, errors)
|
|
704
|
+
|
|
705
|
+
**Action:** Fix immediately, track for Summary
|
|
706
|
+
|
|
707
|
+
**Examples:**
|
|
708
|
+
|
|
709
|
+
- Wrong SQL query returning incorrect data
|
|
710
|
+
- Logic errors (inverted condition, off-by-one, infinite loop)
|
|
711
|
+
- Type errors, null pointer exceptions, undefined references
|
|
712
|
+
- Broken validation (accepts invalid input, rejects valid input)
|
|
713
|
+
- Security vulnerabilities (SQL injection, XSS, CSRF, insecure auth)
|
|
714
|
+
- Race conditions, deadlocks
|
|
715
|
+
- Memory leaks, resource leaks
|
|
716
|
+
|
|
717
|
+
**Process:**
|
|
718
|
+
|
|
719
|
+
1. Fix the bug inline
|
|
720
|
+
2. Add/update tests to prevent regression
|
|
721
|
+
3. Verify fix works
|
|
722
|
+
4. Continue task
|
|
723
|
+
5. Track in deviations list: `[Rule 1 - Bug] [description]`
|
|
724
|
+
|
|
725
|
+
**No user permission needed.** Bugs must be fixed for correct operation.
|
|
726
|
+
|
|
727
|
+
---
|
|
728
|
+
|
|
729
|
+
**RULE 2: Auto-add missing critical functionality**
|
|
730
|
+
|
|
731
|
+
**Trigger:** Code is missing essential features for correctness, security, or basic operation
|
|
732
|
+
|
|
733
|
+
**Action:** Add immediately, track for Summary
|
|
734
|
+
|
|
735
|
+
**Examples:**
|
|
736
|
+
|
|
737
|
+
- Missing error handling (no try/catch, unhandled promise rejections)
|
|
738
|
+
- No input validation (accepts malicious data, type coercion issues)
|
|
739
|
+
- Missing null/undefined checks (crashes on edge cases)
|
|
740
|
+
- No authentication on protected routes
|
|
741
|
+
- Missing authorization checks (users can access others' data)
|
|
742
|
+
- No CSRF protection, missing CORS configuration
|
|
743
|
+
- No rate limiting on public APIs
|
|
744
|
+
- Missing required database indexes (causes timeouts)
|
|
745
|
+
- No logging for errors (can't debug production)
|
|
746
|
+
|
|
747
|
+
**Process:**
|
|
748
|
+
|
|
749
|
+
1. Add the missing functionality inline
|
|
750
|
+
2. Add tests for the new functionality
|
|
751
|
+
3. Verify it works
|
|
752
|
+
4. Continue task
|
|
753
|
+
5. Track in deviations list: `[Rule 2 - Missing Critical] [description]`
|
|
754
|
+
|
|
755
|
+
**Critical = required for correct/secure/performant operation**
|
|
756
|
+
**No user permission needed.** These are not "features" - they're requirements for basic correctness.
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
**RULE 3: Auto-fix blocking issues**
|
|
761
|
+
|
|
762
|
+
**Trigger:** Something prevents you from completing current task
|
|
763
|
+
|
|
764
|
+
**Action:** Fix immediately to unblock, track for Summary
|
|
765
|
+
|
|
766
|
+
**Examples:**
|
|
767
|
+
|
|
768
|
+
- Missing dependency (package not installed, import fails)
|
|
769
|
+
- Wrong types blocking compilation
|
|
770
|
+
- Broken import paths (file moved, wrong relative path)
|
|
771
|
+
- Missing environment variable (app won't start)
|
|
772
|
+
- Database connection config error
|
|
773
|
+
- Build configuration error (webpack, tsconfig, etc.)
|
|
774
|
+
- Missing file referenced in code
|
|
775
|
+
- Circular dependency blocking module resolution
|
|
776
|
+
|
|
777
|
+
**Process:**
|
|
778
|
+
|
|
779
|
+
1. Fix the blocking issue
|
|
780
|
+
2. Verify task can now proceed
|
|
781
|
+
3. Continue task
|
|
782
|
+
4. Track in deviations list: `[Rule 3 - Blocking] [description]`
|
|
783
|
+
|
|
784
|
+
**No user permission needed.** Can't complete task without fixing blocker.
|
|
785
|
+
|
|
786
|
+
---
|
|
787
|
+
|
|
788
|
+
**RULE 4: Ask about architectural changes**
|
|
789
|
+
|
|
790
|
+
**Trigger:** Fix/addition requires significant structural modification
|
|
791
|
+
|
|
792
|
+
**Action:** STOP, present to user, wait for decision
|
|
793
|
+
|
|
794
|
+
**Examples:**
|
|
795
|
+
|
|
796
|
+
- Adding new database table (not just column)
|
|
797
|
+
- Major schema changes (changing primary key, splitting tables)
|
|
798
|
+
- Introducing new service layer or architectural pattern
|
|
799
|
+
- Switching libraries/frameworks (React → Vue, REST → GraphQL)
|
|
800
|
+
- Changing authentication approach (sessions → JWT)
|
|
801
|
+
- Adding new infrastructure (message queue, cache layer, CDN)
|
|
802
|
+
- Changing API contracts (breaking changes to endpoints)
|
|
803
|
+
- Adding new deployment environment
|
|
804
|
+
|
|
805
|
+
**Process:**
|
|
806
|
+
|
|
807
|
+
1. STOP current task
|
|
808
|
+
2. Present clearly:
|
|
809
|
+
|
|
810
|
+
```
|
|
811
|
+
⚠️ Architectural Decision Needed
|
|
812
|
+
|
|
813
|
+
Current task: [task name]
|
|
814
|
+
Discovery: [what you found that prompted this]
|
|
815
|
+
Proposed change: [architectural modification]
|
|
816
|
+
Why needed: [rationale]
|
|
817
|
+
Impact: [what this affects - APIs, deployment, dependencies, etc.]
|
|
818
|
+
Alternatives: [other approaches, or "none apparent"]
|
|
819
|
+
|
|
820
|
+
Proceed with proposed change? (yes / different approach / defer)
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
3. WAIT for user response
|
|
824
|
+
4. If approved: implement, track as `[Rule 4 - Architectural] [description]`
|
|
825
|
+
5. If different approach: discuss and implement
|
|
826
|
+
6. If deferred: note in Summary and continue without change
|
|
827
|
+
|
|
828
|
+
**User decision required.** These changes affect system design.
|
|
829
|
+
|
|
830
|
+
---
|
|
831
|
+
|
|
832
|
+
**RULE PRIORITY (when multiple could apply):**
|
|
833
|
+
|
|
834
|
+
1. **If Rule 4 applies** → STOP and ask (architectural decision)
|
|
835
|
+
2. **If Rules 1-3 apply** → Fix automatically, track for Summary
|
|
836
|
+
3. **If genuinely unsure which rule** → Apply Rule 4 (ask user)
|
|
837
|
+
|
|
838
|
+
**Edge case guidance:**
|
|
839
|
+
|
|
840
|
+
- "This validation is missing" → Rule 2 (critical for security)
|
|
841
|
+
- "This crashes on null" → Rule 1 (bug)
|
|
842
|
+
- "Need to add table" → Rule 4 (architectural)
|
|
843
|
+
- "Need to add column" → Rule 1 or 2 (depends: fixing bug or adding critical field)
|
|
844
|
+
|
|
845
|
+
**When in doubt:** Ask yourself "Does this affect correctness, security, or ability to complete task?"
|
|
846
|
+
|
|
847
|
+
- YES → Rules 1-3 (fix automatically)
|
|
848
|
+
- MAYBE → Rule 4 (ask user)
|
|
849
|
+
|
|
850
|
+
</deviation_rules>
|
|
851
|
+
|
|
852
|
+
<deviation_documentation>
|
|
853
|
+
|
|
854
|
+
## Documenting Deviations in Summary
|
|
855
|
+
|
|
856
|
+
After all tasks complete, Summary MUST include deviations section.
|
|
857
|
+
|
|
858
|
+
**If no deviations:**
|
|
859
|
+
|
|
860
|
+
```markdown
|
|
861
|
+
## Deviations from Plan
|
|
862
|
+
|
|
863
|
+
None - plan executed exactly as written.
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
**If deviations occurred:**
|
|
867
|
+
|
|
868
|
+
```markdown
|
|
869
|
+
## Deviations from Plan
|
|
870
|
+
|
|
871
|
+
### Auto-fixed Issues
|
|
872
|
+
|
|
873
|
+
**1. [Rule 1 - Bug] Fixed case-sensitive email uniqueness constraint**
|
|
874
|
+
|
|
875
|
+
- **Found during:** Task 4 (Follow/unfollow API implementation)
|
|
876
|
+
- **Issue:** User.email unique constraint was case-sensitive - Test@example.com and test@example.com were both allowed, causing duplicate accounts
|
|
877
|
+
- **Fix:** Changed to `CREATE UNIQUE INDEX users_email_unique ON users (LOWER(email))`
|
|
878
|
+
- **Files modified:** src/models/User.ts, migrations/003_fix_email_unique.sql
|
|
879
|
+
- **Verification:** Unique constraint test passes - duplicate emails properly rejected
|
|
880
|
+
- **Commit:** abc123f
|
|
881
|
+
|
|
882
|
+
**2. [Rule 2 - Missing Critical] Added JWT expiry validation to auth middleware**
|
|
883
|
+
|
|
884
|
+
- **Found during:** Task 3 (Protected route implementation)
|
|
885
|
+
- **Issue:** Auth middleware wasn't checking token expiry - expired tokens were being accepted
|
|
886
|
+
- **Fix:** Added exp claim validation in middleware, reject with 401 if expired
|
|
887
|
+
- **Files modified:** src/middleware/auth.ts, src/middleware/auth.test.ts
|
|
888
|
+
- **Verification:** Expired token test passes - properly rejects with 401
|
|
889
|
+
- **Commit:** def456g
|
|
890
|
+
|
|
891
|
+
---
|
|
892
|
+
|
|
893
|
+
**Total deviations:** 4 auto-fixed (1 bug, 1 missing critical, 1 blocking, 1 architectural with approval)
|
|
894
|
+
**Impact on plan:** All auto-fixes necessary for correctness/security/performance. No scope creep.
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
**This provides complete transparency:**
|
|
898
|
+
|
|
899
|
+
- Every deviation documented
|
|
900
|
+
- Why it was needed
|
|
901
|
+
- What rule applied
|
|
902
|
+
- What was done
|
|
903
|
+
- User can see exactly what happened beyond the plan
|
|
904
|
+
|
|
905
|
+
</deviation_documentation>
|
|
242
906
|
|
|
243
907
|
<tdd_plan_execution>
|
|
244
908
|
## TDD Plan Execution
|
|
@@ -383,6 +1047,164 @@ TASK_COMMITS+=("Task ${TASK_NUM}: ${TASK_COMMIT}")
|
|
|
383
1047
|
|
|
384
1048
|
</task_commit>
|
|
385
1049
|
|
|
1050
|
+
<step name="checkpoint_protocol">
|
|
1051
|
+
When encountering `type="checkpoint:*"`:
|
|
1052
|
+
|
|
1053
|
+
**Critical: Claude automates everything with CLI/API before checkpoints.** Checkpoints are for verification and decisions, not manual work.
|
|
1054
|
+
|
|
1055
|
+
**Display checkpoint clearly:**
|
|
1056
|
+
|
|
1057
|
+
```
|
|
1058
|
+
╔═══════════════════════════════════════════════════════╗
|
|
1059
|
+
║ CHECKPOINT: [Type] ║
|
|
1060
|
+
╚═══════════════════════════════════════════════════════╝
|
|
1061
|
+
|
|
1062
|
+
Progress: {X}/{Y} tasks complete
|
|
1063
|
+
Task: [task name]
|
|
1064
|
+
|
|
1065
|
+
[Display task-specific content based on type]
|
|
1066
|
+
|
|
1067
|
+
────────────────────────────────────────────────────────
|
|
1068
|
+
→ YOUR ACTION: [Resume signal instruction]
|
|
1069
|
+
────────────────────────────────────────────────────────
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
**For checkpoint:human-verify (90% of checkpoints):**
|
|
1073
|
+
|
|
1074
|
+
```
|
|
1075
|
+
Built: [what was automated - deployed, built, configured]
|
|
1076
|
+
|
|
1077
|
+
How to verify:
|
|
1078
|
+
1. [Step 1 - exact command/URL]
|
|
1079
|
+
2. [Step 2 - what to check]
|
|
1080
|
+
3. [Step 3 - expected behavior]
|
|
1081
|
+
|
|
1082
|
+
────────────────────────────────────────────────────────
|
|
1083
|
+
→ YOUR ACTION: Type "approved" or describe issues
|
|
1084
|
+
────────────────────────────────────────────────────────
|
|
1085
|
+
```
|
|
1086
|
+
|
|
1087
|
+
**For checkpoint:decision (9% of checkpoints):**
|
|
1088
|
+
|
|
1089
|
+
```
|
|
1090
|
+
Decision needed: [decision]
|
|
1091
|
+
|
|
1092
|
+
Context: [why this matters]
|
|
1093
|
+
|
|
1094
|
+
Options:
|
|
1095
|
+
1. [option-id]: [name]
|
|
1096
|
+
Pros: [pros]
|
|
1097
|
+
Cons: [cons]
|
|
1098
|
+
|
|
1099
|
+
2. [option-id]: [name]
|
|
1100
|
+
Pros: [pros]
|
|
1101
|
+
Cons: [cons]
|
|
1102
|
+
|
|
1103
|
+
[Resume signal - e.g., "Select: option-id"]
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
**For checkpoint:human-action (1% - rare, only for truly unavoidable manual steps):**
|
|
1107
|
+
|
|
1108
|
+
```
|
|
1109
|
+
I automated: [what Claude already did via CLI/API]
|
|
1110
|
+
|
|
1111
|
+
Need your help with: [the ONE thing with no CLI/API - email link, 2FA code]
|
|
1112
|
+
|
|
1113
|
+
Instructions:
|
|
1114
|
+
[Single unavoidable step]
|
|
1115
|
+
|
|
1116
|
+
I'll verify after: [verification]
|
|
1117
|
+
|
|
1118
|
+
[Resume signal - e.g., "Type 'done' when complete"]
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
**After displaying:** WAIT for user response. Do NOT hallucinate completion. Do NOT continue to next task.
|
|
1122
|
+
|
|
1123
|
+
**After user responds:**
|
|
1124
|
+
|
|
1125
|
+
- Run verification if specified (file exists, env var set, tests pass, etc.)
|
|
1126
|
+
- If verification passes or N/A: continue to next task
|
|
1127
|
+
- If verification fails: inform user, wait for resolution
|
|
1128
|
+
|
|
1129
|
+
See ~/.claude/get-shit-done/references/checkpoints.md for complete checkpoint guidance.
|
|
1130
|
+
</step>
|
|
1131
|
+
|
|
1132
|
+
<step name="checkpoint_return_for_orchestrator">
|
|
1133
|
+
**When spawned by an orchestrator (execute-phase or execute-plan command):**
|
|
1134
|
+
|
|
1135
|
+
If you were spawned via Task tool and hit a checkpoint, you cannot directly interact with the user. Instead, RETURN to the orchestrator with structured checkpoint state so it can present to the user and spawn a fresh continuation agent.
|
|
1136
|
+
|
|
1137
|
+
**Return format for checkpoints:**
|
|
1138
|
+
|
|
1139
|
+
**Required in your return:**
|
|
1140
|
+
|
|
1141
|
+
1. **Completed Tasks table** - Tasks done so far with commit hashes and files created
|
|
1142
|
+
2. **Current Task** - Which task you're on and what's blocking it
|
|
1143
|
+
3. **Checkpoint Details** - User-facing content (verification steps, decision options, or action instructions)
|
|
1144
|
+
4. **Awaiting** - What you need from the user
|
|
1145
|
+
|
|
1146
|
+
**Example return:**
|
|
1147
|
+
|
|
1148
|
+
```
|
|
1149
|
+
## CHECKPOINT REACHED
|
|
1150
|
+
|
|
1151
|
+
**Type:** human-action
|
|
1152
|
+
**Plan:** 01-01
|
|
1153
|
+
**Progress:** 1/3 tasks complete
|
|
1154
|
+
|
|
1155
|
+
### Completed Tasks
|
|
1156
|
+
|
|
1157
|
+
| Task | Name | Commit | Files |
|
|
1158
|
+
|------|------|--------|-------|
|
|
1159
|
+
| 1 | Initialize Next.js 15 project | d6fe73f | package.json, tsconfig.json, app/ |
|
|
1160
|
+
|
|
1161
|
+
### Current Task
|
|
1162
|
+
|
|
1163
|
+
**Task 2:** Initialize Convex backend
|
|
1164
|
+
**Status:** blocked
|
|
1165
|
+
**Blocked by:** Convex CLI authentication required
|
|
1166
|
+
|
|
1167
|
+
### Checkpoint Details
|
|
1168
|
+
|
|
1169
|
+
**Automation attempted:**
|
|
1170
|
+
Ran `npx convex dev` to initialize Convex backend
|
|
1171
|
+
|
|
1172
|
+
**Error encountered:**
|
|
1173
|
+
"Error: Not authenticated. Run `npx convex login` first."
|
|
1174
|
+
|
|
1175
|
+
**What you need to do:**
|
|
1176
|
+
1. Run: `npx convex login`
|
|
1177
|
+
2. Complete browser authentication
|
|
1178
|
+
3. Run: `npx convex dev`
|
|
1179
|
+
4. Create project when prompted
|
|
1180
|
+
|
|
1181
|
+
**I'll verify after:**
|
|
1182
|
+
`cat .env.local | grep CONVEX` returns the Convex URL
|
|
1183
|
+
|
|
1184
|
+
### Awaiting
|
|
1185
|
+
|
|
1186
|
+
Type "done" when Convex is authenticated and project created.
|
|
1187
|
+
```
|
|
1188
|
+
|
|
1189
|
+
**After you return:**
|
|
1190
|
+
|
|
1191
|
+
The orchestrator will:
|
|
1192
|
+
1. Parse your structured return
|
|
1193
|
+
2. Present checkpoint details to the user
|
|
1194
|
+
3. Collect user's response
|
|
1195
|
+
4. Spawn a FRESH continuation agent with your completed tasks state
|
|
1196
|
+
|
|
1197
|
+
You will NOT be resumed. A new agent continues from where you stopped, using your Completed Tasks table to know what's done.
|
|
1198
|
+
|
|
1199
|
+
**How to know if you were spawned:**
|
|
1200
|
+
|
|
1201
|
+
If you're reading this workflow because an orchestrator spawned you (vs running directly), the orchestrator's prompt will include checkpoint return instructions. Follow those instructions when you hit a checkpoint.
|
|
1202
|
+
|
|
1203
|
+
**If running in main context (not spawned):**
|
|
1204
|
+
|
|
1205
|
+
Use the standard checkpoint_protocol - display checkpoint and wait for direct user response.
|
|
1206
|
+
</step>
|
|
1207
|
+
|
|
386
1208
|
<step name="verification_failure_gate">
|
|
387
1209
|
If any task verification fails:
|
|
388
1210
|
|
|
@@ -554,7 +1376,7 @@ The one-liner must be SUBSTANTIVE:
|
|
|
554
1376
|
|
|
555
1377
|
- If more plans exist in this phase: "Ready for {phase}-{next-plan}-PLAN.md"
|
|
556
1378
|
- If this is the last plan: "Phase complete, ready for transition"
|
|
557
|
-
</step>
|
|
1379
|
+
</step>
|
|
558
1380
|
|
|
559
1381
|
<step name="update_current_position">
|
|
560
1382
|
Update Current Position section in STATE.md to reflect plan completion.
|
|
@@ -612,7 +1434,7 @@ Progress: ███████░░░ 50%
|
|
|
612
1434
|
- [ ] Status reflects current state (In progress / Phase complete)
|
|
613
1435
|
- [ ] Last activity shows today's date and the plan just completed
|
|
614
1436
|
- [ ] Progress bar calculated correctly from total completed plans
|
|
615
|
-
</step>
|
|
1437
|
+
</step>
|
|
616
1438
|
|
|
617
1439
|
<step name="extract_decisions_and_issues">
|
|
618
1440
|
Extract decisions, issues, and concerns from SUMMARY.md into STATE.md accumulated context.
|
|
@@ -629,7 +1451,7 @@ Extract decisions, issues, and concerns from SUMMARY.md into STATE.md accumulate
|
|
|
629
1451
|
- Read SUMMARY.md "## Next Phase Readiness" section
|
|
630
1452
|
- If contains blockers or concerns:
|
|
631
1453
|
- Add to STATE.md "Blockers/Concerns Carried Forward"
|
|
632
|
-
</step>
|
|
1454
|
+
</step>
|
|
633
1455
|
|
|
634
1456
|
<step name="update_session_continuity">
|
|
635
1457
|
Update Session Continuity section in STATE.md to enable resumption in future sessions.
|
|
@@ -1019,4 +1841,4 @@ All {Y} plans finished.
|
|
|
1019
1841
|
- ROADMAP.md updated
|
|
1020
1842
|
- If codebase map exists: map updated with execution changes (or skipped if no significant changes)
|
|
1021
1843
|
- If USER-SETUP.md created: prominently surfaced in completion output
|
|
1022
|
-
</success_criteria>
|
|
1844
|
+
</success_criteria>
|