gsd-opencode 1.30.0 → 1.33.1
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/agents/gsd-debugger.md +0 -1
- package/agents/gsd-doc-verifier.md +207 -0
- package/agents/gsd-doc-writer.md +608 -0
- package/agents/gsd-executor.md +22 -1
- package/agents/gsd-phase-researcher.md +41 -0
- package/agents/gsd-plan-checker.md +82 -0
- package/agents/gsd-planner.md +123 -194
- package/agents/gsd-security-auditor.md +129 -0
- package/agents/gsd-ui-auditor.md +40 -0
- package/agents/gsd-user-profiler.md +2 -2
- package/agents/gsd-verifier.md +84 -18
- package/commands/gsd/gsd-add-backlog.md +1 -1
- package/commands/gsd/gsd-analyze-dependencies.md +34 -0
- package/commands/gsd/gsd-autonomous.md +6 -2
- package/commands/gsd/gsd-cleanup.md +5 -0
- package/commands/gsd/gsd-debug.md +24 -21
- package/commands/gsd/gsd-discuss-phase.md +7 -2
- package/commands/gsd/gsd-docs-update.md +48 -0
- package/commands/gsd/gsd-execute-phase.md +4 -0
- package/commands/gsd/gsd-help.md +2 -0
- package/commands/gsd/gsd-join-discord.md +2 -1
- package/commands/gsd/gsd-manager.md +1 -0
- package/commands/gsd/gsd-new-project.md +4 -0
- package/commands/gsd/gsd-plan-phase.md +5 -0
- package/commands/gsd/gsd-quick.md +5 -3
- package/commands/gsd/gsd-reapply-patches.md +171 -39
- package/commands/gsd/gsd-research-phase.md +2 -12
- package/commands/gsd/gsd-review-backlog.md +1 -0
- package/commands/gsd/gsd-review.md +3 -2
- package/commands/gsd/gsd-secure-phase.md +35 -0
- package/commands/gsd/gsd-set-profile.md +0 -1
- package/commands/gsd/gsd-thread.md +1 -1
- package/commands/gsd/gsd-workstreams.md +7 -2
- package/get-shit-done/bin/gsd-tools.cjs +42 -8
- package/get-shit-done/bin/lib/commands.cjs +68 -14
- package/get-shit-done/bin/lib/config.cjs +18 -10
- package/get-shit-done/bin/lib/core.cjs +383 -80
- package/get-shit-done/bin/lib/docs.cjs +267 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +47 -2
- package/get-shit-done/bin/lib/init.cjs +85 -5
- package/get-shit-done/bin/lib/milestone.cjs +21 -0
- package/get-shit-done/bin/lib/model-profiles.cjs +2 -0
- package/get-shit-done/bin/lib/phase.cjs +232 -189
- package/get-shit-done/bin/lib/profile-output.cjs +97 -1
- package/get-shit-done/bin/lib/roadmap.cjs +137 -113
- package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
- package/get-shit-done/bin/lib/security.cjs +5 -3
- package/get-shit-done/bin/lib/state.cjs +366 -44
- package/get-shit-done/bin/lib/verify.cjs +158 -14
- package/get-shit-done/bin/lib/workstream.cjs +6 -2
- package/get-shit-done/references/agent-contracts.md +79 -0
- package/get-shit-done/references/artifact-types.md +113 -0
- package/get-shit-done/references/context-budget.md +49 -0
- package/get-shit-done/references/continuation-format.md +15 -15
- package/get-shit-done/references/domain-probes.md +125 -0
- package/get-shit-done/references/gate-prompts.md +100 -0
- package/get-shit-done/references/model-profiles.md +2 -2
- package/get-shit-done/references/planner-gap-closure.md +62 -0
- package/get-shit-done/references/planner-reviews.md +39 -0
- package/get-shit-done/references/planner-revision.md +87 -0
- package/get-shit-done/references/planning-config.md +15 -0
- package/get-shit-done/references/revision-loop.md +97 -0
- package/get-shit-done/references/ui-brand.md +2 -2
- package/get-shit-done/references/universal-anti-patterns.md +58 -0
- package/get-shit-done/references/workstream-flag.md +56 -3
- package/get-shit-done/templates/SECURITY.md +61 -0
- package/get-shit-done/templates/VALIDATION.md +3 -3
- package/get-shit-done/templates/claude-md.md +27 -4
- package/get-shit-done/templates/config.json +4 -0
- package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
- package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
- package/get-shit-done/workflows/add-phase.md +2 -2
- package/get-shit-done/workflows/add-todo.md +1 -1
- package/get-shit-done/workflows/analyze-dependencies.md +96 -0
- package/get-shit-done/workflows/audit-milestone.md +8 -12
- package/get-shit-done/workflows/autonomous.md +158 -13
- package/get-shit-done/workflows/check-todos.md +2 -2
- package/get-shit-done/workflows/complete-milestone.md +13 -4
- package/get-shit-done/workflows/diagnose-issues.md +8 -6
- package/get-shit-done/workflows/discovery-phase.md +1 -1
- package/get-shit-done/workflows/discuss-phase-assumptions.md +24 -6
- package/get-shit-done/workflows/discuss-phase-power.md +291 -0
- package/get-shit-done/workflows/discuss-phase.md +153 -20
- package/get-shit-done/workflows/docs-update.md +1093 -0
- package/get-shit-done/workflows/execute-phase.md +362 -66
- package/get-shit-done/workflows/execute-plan.md +1 -1
- package/get-shit-done/workflows/help.md +9 -6
- package/get-shit-done/workflows/insert-phase.md +2 -2
- package/get-shit-done/workflows/manager.md +27 -26
- package/get-shit-done/workflows/map-codebase.md +10 -32
- package/get-shit-done/workflows/new-milestone.md +14 -8
- package/get-shit-done/workflows/new-project.md +48 -25
- package/get-shit-done/workflows/next.md +1 -1
- package/get-shit-done/workflows/note.md +1 -1
- package/get-shit-done/workflows/pause-work.md +73 -10
- package/get-shit-done/workflows/plan-milestone-gaps.md +2 -2
- package/get-shit-done/workflows/plan-phase.md +184 -32
- package/get-shit-done/workflows/progress.md +20 -20
- package/get-shit-done/workflows/quick.md +102 -84
- package/get-shit-done/workflows/research-phase.md +2 -6
- package/get-shit-done/workflows/resume-project.md +4 -4
- package/get-shit-done/workflows/review.md +56 -3
- package/get-shit-done/workflows/secure-phase.md +154 -0
- package/get-shit-done/workflows/settings.md +13 -2
- package/get-shit-done/workflows/ship.md +13 -4
- package/get-shit-done/workflows/transition.md +6 -6
- package/get-shit-done/workflows/ui-phase.md +4 -14
- package/get-shit-done/workflows/ui-review.md +25 -7
- package/get-shit-done/workflows/update.md +165 -16
- package/get-shit-done/workflows/validate-phase.md +1 -11
- package/get-shit-done/workflows/verify-phase.md +127 -6
- package/get-shit-done/workflows/verify-work.md +69 -21
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<objective>
|
|
2
2
|
Execute small, ad-hoc tasks with GSD guarantees (atomic commits, STATE.md tracking). Quick mode spawns gsd-planner (quick mode) + gsd-executor(s), tracks tasks in `.planning/quick/`, and updates STATE.md's "Quick Tasks Completed" table.
|
|
3
3
|
|
|
4
|
-
With `--
|
|
4
|
+
With `--full` flag: enables the complete quality pipeline — discussion + research + plan-checking + verification. One flag for everything.
|
|
5
|
+
|
|
6
|
+
With `--validate` flag: enables plan-checking (max 2 iterations) and post-execution verification only. Use when you want quality guarantees without discussion or research.
|
|
5
7
|
|
|
6
|
-
With `--
|
|
8
|
+
With `--discuss` flag: lightweight discussion phase before planning. Surfaces assumptions, clarifies gray areas, captures decisions in CONTEXT.md so the planner treats them as locked.
|
|
7
9
|
|
|
8
10
|
With `--research` flag: spawns a focused research agent before planning. Investigates implementation approaches, library options, and pitfalls. Use when you're unsure how to approach a task.
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
Granular flags are composable: `--discuss --research --validate` gives the same result as `--full`.
|
|
11
13
|
</objective>
|
|
12
14
|
|
|
13
15
|
<required_reading>
|
|
@@ -27,9 +29,10 @@ Valid GSD subagent types (use exact names — do not fall back to 'general'):
|
|
|
27
29
|
**Step 1: Parse arguments and get task description**
|
|
28
30
|
|
|
29
31
|
Parse `$ARGUMENTS` for:
|
|
30
|
-
- `--full` flag → store
|
|
31
|
-
- `--
|
|
32
|
-
- `--
|
|
32
|
+
- `--full` flag → store `$FULL_MODE=true`, `$DISCUSS_MODE=true`, `$RESEARCH_MODE=true`, `$VALIDATE_MODE=true`
|
|
33
|
+
- `--validate` flag → store `$VALIDATE_MODE=true`
|
|
34
|
+
- `--discuss` flag → store `$DISCUSS_MODE=true`
|
|
35
|
+
- `--research` flag → store `$RESEARCH_MODE=true`
|
|
33
36
|
- Remaining text → use as `$DESCRIPTION` if non-empty
|
|
34
37
|
|
|
35
38
|
If `$DESCRIPTION` is empty after parsing, prompt user interactively:
|
|
@@ -48,25 +51,34 @@ If still empty, re-prompt: "Please provide a task description."
|
|
|
48
51
|
|
|
49
52
|
Display banner based on active flags:
|
|
50
53
|
|
|
51
|
-
If `$
|
|
54
|
+
If `$FULL_MODE` (all phases enabled — `--full` or all granular flags):
|
|
55
|
+
```
|
|
56
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
57
|
+
GSD ► QUICK TASK (FULL)
|
|
58
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
59
|
+
|
|
60
|
+
◆ Discussion + research + plan checking + verification enabled
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If `$DISCUSS_MODE` and `$RESEARCH_MODE` and `$VALIDATE_MODE` (no `$FULL_MODE` — composed granularly):
|
|
52
64
|
```
|
|
53
65
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
54
|
-
GSD ► QUICK TASK (DISCUSS + RESEARCH +
|
|
66
|
+
GSD ► QUICK TASK (DISCUSS + RESEARCH + VALIDATE)
|
|
55
67
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
56
68
|
|
|
57
69
|
◆ Discussion + research + plan checking + verification enabled
|
|
58
70
|
```
|
|
59
71
|
|
|
60
|
-
If `$DISCUSS_MODE` and `$
|
|
72
|
+
If `$DISCUSS_MODE` and `$VALIDATE_MODE` (no research):
|
|
61
73
|
```
|
|
62
74
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
-
GSD ► QUICK TASK (DISCUSS +
|
|
75
|
+
GSD ► QUICK TASK (DISCUSS + VALIDATE)
|
|
64
76
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
65
77
|
|
|
66
78
|
◆ Discussion + plan checking + verification enabled
|
|
67
79
|
```
|
|
68
80
|
|
|
69
|
-
If `$DISCUSS_MODE` and `$RESEARCH_MODE` (no
|
|
81
|
+
If `$DISCUSS_MODE` and `$RESEARCH_MODE` (no validate):
|
|
70
82
|
```
|
|
71
83
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
72
84
|
GSD ► QUICK TASK (DISCUSS + RESEARCH)
|
|
@@ -75,10 +87,10 @@ If `$DISCUSS_MODE` and `$RESEARCH_MODE` (no full):
|
|
|
75
87
|
◆ Discussion + research enabled
|
|
76
88
|
```
|
|
77
89
|
|
|
78
|
-
If `$RESEARCH_MODE` and `$
|
|
90
|
+
If `$RESEARCH_MODE` and `$VALIDATE_MODE` (no discuss):
|
|
79
91
|
```
|
|
80
92
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
81
|
-
GSD ► QUICK TASK (RESEARCH +
|
|
93
|
+
GSD ► QUICK TASK (RESEARCH + VALIDATE)
|
|
82
94
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
83
95
|
|
|
84
96
|
◆ Research + plan checking + verification enabled
|
|
@@ -102,10 +114,10 @@ If `$RESEARCH_MODE` only:
|
|
|
102
114
|
◆ Research phase enabled — investigating approaches before planning
|
|
103
115
|
```
|
|
104
116
|
|
|
105
|
-
If `$
|
|
117
|
+
If `$VALIDATE_MODE` only:
|
|
106
118
|
```
|
|
107
119
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
108
|
-
GSD ► QUICK TASK (
|
|
120
|
+
GSD ► QUICK TASK (VALIDATE)
|
|
109
121
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
110
122
|
|
|
111
123
|
◆ Plan checking + verification enabled
|
|
@@ -126,6 +138,10 @@ AGENT_SKILLS_VERIFIER=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools
|
|
|
126
138
|
|
|
127
139
|
Parse JSON for: `planner_model`, `executor_model`, `checker_model`, `verifier_model`, `commit_docs`, `branch_name`, `quick_id`, `slug`, `date`, `timestamp`, `quick_dir`, `task_dir`, `roadmap_exists`, `planning_exists`.
|
|
128
140
|
|
|
141
|
+
```bash
|
|
142
|
+
USE_WORKTREES=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config-get workflow.use_worktrees 2>/dev/null || echo "true")
|
|
143
|
+
```
|
|
144
|
+
|
|
129
145
|
**If `roadmap_exists` is false:** Error — Quick mode requires an active project with ROADMAP.md. Run `/gsd-new-project` first.
|
|
130
146
|
|
|
131
147
|
Quick tasks can run mid-phase - validation only checks ROADMAP.md exists, not phase status.
|
|
@@ -316,8 +332,7 @@ Display banner:
|
|
|
316
332
|
Spawn a single focused researcher (not 4 parallel researchers like full phases — quick tasks need targeted research, not broad domain surveys):
|
|
317
333
|
|
|
318
334
|
```
|
|
319
|
-
|
|
320
|
-
prompt="
|
|
335
|
+
@gsd-phase-researcher "
|
|
321
336
|
<research_context>
|
|
322
337
|
|
|
323
338
|
**Mode:** quick-task
|
|
@@ -350,11 +365,7 @@ write research to: ${QUICK_DIR}/${quick_id}-RESEARCH.md
|
|
|
350
365
|
Use standard research format but keep it lean — skip sections that don't apply.
|
|
351
366
|
Return: ## RESEARCH COMPLETE with file path
|
|
352
367
|
</output>
|
|
353
|
-
"
|
|
354
|
-
subagent_type="gsd-phase-researcher",
|
|
355
|
-
model="{planner_model}",
|
|
356
|
-
description="Research: ${DESCRIPTION}"
|
|
357
|
-
)
|
|
368
|
+
"
|
|
358
369
|
```
|
|
359
370
|
|
|
360
371
|
After researcher returns:
|
|
@@ -367,16 +378,15 @@ If research file not found, warn but continue: "Research agent did not produce o
|
|
|
367
378
|
|
|
368
379
|
**Step 5: Spawn planner (quick mode)**
|
|
369
380
|
|
|
370
|
-
**If `$
|
|
381
|
+
**If `$VALIDATE_MODE`:** Use `quick-full` mode with stricter constraints.
|
|
371
382
|
|
|
372
|
-
**If NOT `$
|
|
383
|
+
**If NOT `$VALIDATE_MODE`:** Use standard `quick` mode.
|
|
373
384
|
|
|
374
385
|
```
|
|
375
|
-
|
|
376
|
-
prompt="
|
|
386
|
+
@gsd-planner "
|
|
377
387
|
<planning_context>
|
|
378
388
|
|
|
379
|
-
**Mode:** ${
|
|
389
|
+
**Mode:** ${VALIDATE_MODE ? 'quick-full' : 'quick'}
|
|
380
390
|
**Directory:** ${QUICK_DIR}
|
|
381
391
|
**Description:** ${DESCRIPTION}
|
|
382
392
|
|
|
@@ -397,20 +407,16 @@ ${AGENT_SKILLS_PLANNER}
|
|
|
397
407
|
- Create a SINGLE plan with 1-3 focused tasks
|
|
398
408
|
- Quick tasks should be atomic and self-contained
|
|
399
409
|
${RESEARCH_MODE ? '- Research findings are available — use them to inform library/pattern choices' : '- No research phase'}
|
|
400
|
-
${
|
|
401
|
-
${
|
|
402
|
-
${
|
|
410
|
+
${VALIDATE_MODE ? '- Target ~40% context usage (structured for verification)' : '- Target ~30% context usage (simple, focused)'}
|
|
411
|
+
${VALIDATE_MODE ? '- MUST generate `must_haves` in plan frontmatter (truths, artifacts, key_links)' : ''}
|
|
412
|
+
${VALIDATE_MODE ? '- Each task MUST have `files`, `action`, `verify`, `done` fields' : ''}
|
|
403
413
|
</constraints>
|
|
404
414
|
|
|
405
415
|
<output>
|
|
406
416
|
write plan to: ${QUICK_DIR}/${quick_id}-PLAN.md
|
|
407
417
|
Return: ## PLANNING COMPLETE with plan path
|
|
408
418
|
</output>
|
|
409
|
-
"
|
|
410
|
-
subagent_type="gsd-planner",
|
|
411
|
-
model="{planner_model}",
|
|
412
|
-
description="Quick plan: ${DESCRIPTION}"
|
|
413
|
-
)
|
|
419
|
+
"
|
|
414
420
|
```
|
|
415
421
|
|
|
416
422
|
After planner returns:
|
|
@@ -422,9 +428,9 @@ If plan not found, error: "Planner failed to create ${quick_id}-PLAN.md"
|
|
|
422
428
|
|
|
423
429
|
---
|
|
424
430
|
|
|
425
|
-
**Step 5.5: Plan-checker loop (only when `$
|
|
431
|
+
**Step 5.5: Plan-checker loop (only when `$VALIDATE_MODE`)**
|
|
426
432
|
|
|
427
|
-
Skip this step entirely if NOT `$
|
|
433
|
+
Skip this step entirely if NOT `$VALIDATE_MODE`.
|
|
428
434
|
|
|
429
435
|
Display banner:
|
|
430
436
|
```
|
|
@@ -469,12 +475,7 @@ ${DISCUSS_MODE ? '- Context compliance: Does the plan honor locked decisions fro
|
|
|
469
475
|
```
|
|
470
476
|
|
|
471
477
|
```
|
|
472
|
-
|
|
473
|
-
prompt=checker_prompt,
|
|
474
|
-
subagent_type="gsd-plan-checker",
|
|
475
|
-
model="{checker_model}",
|
|
476
|
-
description="Check quick plan: ${DESCRIPTION}"
|
|
477
|
-
)
|
|
478
|
+
@gsd-plan-checker checker_prompt
|
|
478
479
|
```
|
|
479
480
|
|
|
480
481
|
**Handle checker return:**
|
|
@@ -514,12 +515,7 @@ Return what changed.
|
|
|
514
515
|
```
|
|
515
516
|
|
|
516
517
|
```
|
|
517
|
-
|
|
518
|
-
prompt=revision_prompt,
|
|
519
|
-
subagent_type="gsd-planner",
|
|
520
|
-
model="{planner_model}",
|
|
521
|
-
description="Revise quick plan: ${DESCRIPTION}"
|
|
522
|
-
)
|
|
518
|
+
@gsd-planner revision_prompt
|
|
523
519
|
```
|
|
524
520
|
|
|
525
521
|
After planner returns → spawn checker again, increment iteration_count.
|
|
@@ -534,13 +530,26 @@ Offer: 1) Force proceed, 2) Abort
|
|
|
534
530
|
|
|
535
531
|
**Step 6: Spawn executor**
|
|
536
532
|
|
|
533
|
+
Capture current HEAD before spawning (used for worktree branch check):
|
|
534
|
+
```bash
|
|
535
|
+
EXPECTED_BASE=$(git rev-parse HEAD)
|
|
536
|
+
```
|
|
537
|
+
|
|
537
538
|
Spawn gsd-executor with plan reference:
|
|
538
539
|
|
|
539
540
|
```
|
|
540
|
-
|
|
541
|
-
prompt="
|
|
541
|
+
@gsd-executor "
|
|
542
542
|
Execute quick task ${quick_id}.
|
|
543
543
|
|
|
544
|
+
${USE_WORKTREES !== "false" ? `
|
|
545
|
+
<worktree_branch_check>
|
|
546
|
+
FIRST ACTION before any other work: verify this worktree branch is based on the correct commit.
|
|
547
|
+
Run: git merge-base HEAD ${EXPECTED_BASE}
|
|
548
|
+
If the result differs from ${EXPECTED_BASE}, run: git reset --soft ${EXPECTED_BASE}
|
|
549
|
+
This corrects a known issue on Windows where EnterWorktree creates branches from main instead of the feature branch HEAD.
|
|
550
|
+
</worktree_branch_check>
|
|
551
|
+
` : ''}
|
|
552
|
+
|
|
544
553
|
<files_to_read>
|
|
545
554
|
- ${QUICK_DIR}/${quick_id}-PLAN.md (Plan)
|
|
546
555
|
- .planning/STATE.md (Project state)
|
|
@@ -552,22 +561,32 @@ ${AGENT_SKILLS_EXECUTOR}
|
|
|
552
561
|
|
|
553
562
|
<constraints>
|
|
554
563
|
- Execute all tasks in the plan
|
|
555
|
-
- Commit each task atomically
|
|
564
|
+
- Commit each task atomically (code changes only)
|
|
556
565
|
- Create summary at: ${QUICK_DIR}/${quick_id}-SUMMARY.md
|
|
566
|
+
- Do NOT commit docs artifacts (SUMMARY.md, STATE.md, PLAN.md) — the orchestrator handles the docs commit in Step 8
|
|
557
567
|
- Do NOT update ROADMAP.md (quick tasks are separate from planned phases)
|
|
558
568
|
</constraints>
|
|
559
|
-
"
|
|
560
|
-
subagent_type="gsd-executor",
|
|
561
|
-
model="{executor_model}",
|
|
562
|
-
isolation="worktree",
|
|
563
|
-
description="Execute: ${DESCRIPTION}"
|
|
564
|
-
)
|
|
569
|
+
"
|
|
565
570
|
```
|
|
566
571
|
|
|
567
572
|
After executor returns:
|
|
568
|
-
1.
|
|
569
|
-
|
|
570
|
-
|
|
573
|
+
1. **Worktree cleanup:** If the executor ran with `isolation="worktree"`, merge the worktree branch back and clean up:
|
|
574
|
+
```bash
|
|
575
|
+
# Find worktrees created by the executor
|
|
576
|
+
WORKTREES=$(git worktree list --porcelain | grep "^worktree " | grep -v "$(pwd)$" | sed 's/^worktree //')
|
|
577
|
+
for WT in $WORKTREES; do
|
|
578
|
+
WT_BRANCH=$(git -C "$WT" rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
579
|
+
if [ -n "$WT_BRANCH" ] && [ "$WT_BRANCH" != "HEAD" ]; then
|
|
580
|
+
git merge "$WT_BRANCH" --no-edit -m "chore: merge quick task worktree ($WT_BRANCH)" 2>&1 || echo "⚠ Merge conflict — resolve manually"
|
|
581
|
+
git worktree remove "$WT" --force 2>/dev/null || true
|
|
582
|
+
git branch -D "$WT_BRANCH" 2>/dev/null || true
|
|
583
|
+
fi
|
|
584
|
+
done
|
|
585
|
+
```
|
|
586
|
+
If `workflow.use_worktrees` is `false`, skip this step.
|
|
587
|
+
2. Verify summary exists at `${QUICK_DIR}/${quick_id}-SUMMARY.md`
|
|
588
|
+
3. Extract commit hash from executor output
|
|
589
|
+
4. Report completion status
|
|
571
590
|
|
|
572
591
|
**Known OpenCode bug (classifyHandoffIfNeeded):** If executor reports "failed" with error `classifyHandoffIfNeeded is not defined`, this is a OpenCode runtime bug — not a real failure. Check if summary file exists and git log shows commits. If so, treat as successful.
|
|
573
592
|
|
|
@@ -577,9 +596,9 @@ Note: For quick tasks producing multiple plans (rare), spawn executors in parall
|
|
|
577
596
|
|
|
578
597
|
---
|
|
579
598
|
|
|
580
|
-
**Step 6.5: Verification (only when `$
|
|
599
|
+
**Step 6.5: Verification (only when `$VALIDATE_MODE`)**
|
|
581
600
|
|
|
582
|
-
Skip this step entirely if NOT `$
|
|
601
|
+
Skip this step entirely if NOT `$VALIDATE_MODE`.
|
|
583
602
|
|
|
584
603
|
Display banner:
|
|
585
604
|
```
|
|
@@ -591,8 +610,7 @@ Display banner:
|
|
|
591
610
|
```
|
|
592
611
|
|
|
593
612
|
```
|
|
594
|
-
task
|
|
595
|
-
prompt="Verify quick task goal achievement.
|
|
613
|
+
@gsd-verifier "Verify quick task goal achievement.
|
|
596
614
|
task directory: ${QUICK_DIR}
|
|
597
615
|
task goal: ${DESCRIPTION}
|
|
598
616
|
|
|
@@ -602,11 +620,7 @@ task goal: ${DESCRIPTION}
|
|
|
602
620
|
|
|
603
621
|
${AGENT_SKILLS_VERIFIER}
|
|
604
622
|
|
|
605
|
-
Check must_haves against actual codebase. Create VERIFICATION.md at ${QUICK_DIR}/${quick_id}-VERIFICATION.md."
|
|
606
|
-
subagent_type="gsd-verifier",
|
|
607
|
-
model="{verifier_model}",
|
|
608
|
-
description="Verify: ${DESCRIPTION}"
|
|
609
|
-
)
|
|
623
|
+
Check must_haves against actual codebase. Create VERIFICATION.md at ${QUICK_DIR}/${quick_id}-VERIFICATION.md."
|
|
610
624
|
```
|
|
611
625
|
|
|
612
626
|
read verification status:
|
|
@@ -636,7 +650,7 @@ read STATE.md and check for `### Quick Tasks Completed` section.
|
|
|
636
650
|
|
|
637
651
|
Insert after `### Blockers/Concerns` section:
|
|
638
652
|
|
|
639
|
-
**If `$
|
|
653
|
+
**If `$VALIDATE_MODE`:**
|
|
640
654
|
```markdown
|
|
641
655
|
### Quick Tasks Completed
|
|
642
656
|
|
|
@@ -644,7 +658,7 @@ Insert after `### Blockers/Concerns` section:
|
|
|
644
658
|
|---|-------------|------|--------|--------|-----------|
|
|
645
659
|
```
|
|
646
660
|
|
|
647
|
-
**If NOT `$
|
|
661
|
+
**If NOT `$VALIDATE_MODE`:**
|
|
648
662
|
```markdown
|
|
649
663
|
### Quick Tasks Completed
|
|
650
664
|
|
|
@@ -652,18 +666,18 @@ Insert after `### Blockers/Concerns` section:
|
|
|
652
666
|
|---|-------------|------|--------|-----------|
|
|
653
667
|
```
|
|
654
668
|
|
|
655
|
-
**Note:** If the table already exists, match its existing column format. If adding `--full` to a project that already has quick tasks without a Status column, add the Status column to the header and separator rows, and leave Status empty for the new row's predecessors.
|
|
669
|
+
**Note:** If the table already exists, match its existing column format. If adding `--validate` (or `--full`) to a project that already has quick tasks without a Status column, add the Status column to the header and separator rows, and leave Status empty for the new row's predecessors.
|
|
656
670
|
|
|
657
671
|
**7c. Append new row to table:**
|
|
658
672
|
|
|
659
673
|
Use `date` from init:
|
|
660
674
|
|
|
661
|
-
**If `$
|
|
675
|
+
**If `$VALIDATE_MODE` (or table has Status column):**
|
|
662
676
|
```markdown
|
|
663
677
|
| ${quick_id} | ${DESCRIPTION} | ${date} | ${commit_hash} | ${VERIFICATION_STATUS} | [${quick_id}-${slug}](./quick/${quick_id}-${slug}/) |
|
|
664
678
|
```
|
|
665
679
|
|
|
666
|
-
**If NOT `$
|
|
680
|
+
**If NOT `$VALIDATE_MODE` (and table has no Status column):**
|
|
667
681
|
```markdown
|
|
668
682
|
| ${quick_id} | ${DESCRIPTION} | ${date} | ${commit_hash} | [${quick_id}-${slug}](./quick/${quick_id}-${slug}/) |
|
|
669
683
|
```
|
|
@@ -681,7 +695,7 @@ Use edit tool to make these changes atomically
|
|
|
681
695
|
|
|
682
696
|
**Step 8: Final commit and completion**
|
|
683
697
|
|
|
684
|
-
Stage and commit quick task artifacts
|
|
698
|
+
Stage and commit quick task artifacts. This step MUST always run — even if the executor already committed some files (e.g. when running without worktree isolation). The `gsd-tools commit` command handles already-committed files gracefully.
|
|
685
699
|
|
|
686
700
|
Build file list:
|
|
687
701
|
- `${QUICK_DIR}/${quick_id}-PLAN.md`
|
|
@@ -689,9 +703,12 @@ Build file list:
|
|
|
689
703
|
- `.planning/STATE.md`
|
|
690
704
|
- If `$DISCUSS_MODE` and context file exists: `${QUICK_DIR}/${quick_id}-CONTEXT.md`
|
|
691
705
|
- If `$RESEARCH_MODE` and research file exists: `${QUICK_DIR}/${quick_id}-RESEARCH.md`
|
|
692
|
-
- If `$
|
|
706
|
+
- If `$VALIDATE_MODE` and verification file exists: `${QUICK_DIR}/${quick_id}-VERIFICATION.md`
|
|
693
707
|
|
|
694
708
|
```bash
|
|
709
|
+
# Explicitly stage all artifacts before commit — PLAN.md may be untracked
|
|
710
|
+
# if the executor ran without worktree isolation and committed docs early
|
|
711
|
+
git add ${file_list} 2>/dev/null
|
|
695
712
|
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs(quick-${quick_id}): ${DESCRIPTION}" --files ${file_list}
|
|
696
713
|
```
|
|
697
714
|
|
|
@@ -702,11 +719,11 @@ commit_hash=$(git rev-parse --short HEAD)
|
|
|
702
719
|
|
|
703
720
|
Display completion output:
|
|
704
721
|
|
|
705
|
-
**If `$
|
|
722
|
+
**If `$VALIDATE_MODE`:**
|
|
706
723
|
```
|
|
707
724
|
---
|
|
708
725
|
|
|
709
|
-
GSD > QUICK TASK COMPLETE (
|
|
726
|
+
GSD > QUICK TASK COMPLETE (VALIDATED)
|
|
710
727
|
|
|
711
728
|
Quick task ${quick_id}: ${DESCRIPTION}
|
|
712
729
|
|
|
@@ -720,7 +737,7 @@ Commit: ${commit_hash}
|
|
|
720
737
|
Ready for next task: /gsd-quick ${GSD_WS}
|
|
721
738
|
```
|
|
722
739
|
|
|
723
|
-
**If NOT `$
|
|
740
|
+
**If NOT `$VALIDATE_MODE`:**
|
|
724
741
|
```
|
|
725
742
|
---
|
|
726
743
|
|
|
@@ -742,16 +759,17 @@ Ready for next task: /gsd-quick ${GSD_WS}
|
|
|
742
759
|
<success_criteria>
|
|
743
760
|
- [ ] ROADMAP.md validation passes
|
|
744
761
|
- [ ] User provides task description
|
|
745
|
-
- [ ] `--full`, `--discuss`, and `--research` flags parsed from arguments when present
|
|
762
|
+
- [ ] `--full`, `--validate`, `--discuss`, and `--research` flags parsed from arguments when present
|
|
763
|
+
- [ ] `--full` sets all booleans (`$FULL_MODE`, `$DISCUSS_MODE`, `$RESEARCH_MODE`, `$VALIDATE_MODE`)
|
|
746
764
|
- [ ] Slug generated (lowercase, hyphens, max 40 chars)
|
|
747
765
|
- [ ] Quick ID generated (YYMMDD-xxx format, 2s Base36 precision)
|
|
748
766
|
- [ ] Directory created at `.planning/quick/YYMMDD-xxx-slug/`
|
|
749
767
|
- [ ] (--discuss) Gray areas identified and presented, decisions captured in `${quick_id}-CONTEXT.md`
|
|
750
768
|
- [ ] (--research) Research agent spawned, `${quick_id}-RESEARCH.md` created
|
|
751
769
|
- [ ] `${quick_id}-PLAN.md` created by planner (honors CONTEXT.md decisions when --discuss, uses RESEARCH.md findings when --research)
|
|
752
|
-
- [ ] (--
|
|
770
|
+
- [ ] (--validate) Plan checker validates plan, revision loop capped at 2
|
|
753
771
|
- [ ] `${quick_id}-SUMMARY.md` created by executor
|
|
754
|
-
- [ ] (--
|
|
755
|
-
- [ ] STATE.md updated with quick task row (Status column when --
|
|
772
|
+
- [ ] (--validate) `${quick_id}-VERIFICATION.md` created by verifier
|
|
773
|
+
- [ ] STATE.md updated with quick task row (Status column when --validate)
|
|
756
774
|
- [ ] Artifacts committed
|
|
757
775
|
</success_criteria>
|
|
@@ -48,8 +48,7 @@ AGENT_SKILLS_RESEARCHER=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-too
|
|
|
48
48
|
## Step 4: Spawn Researcher
|
|
49
49
|
|
|
50
50
|
```
|
|
51
|
-
|
|
52
|
-
prompt="<objective>
|
|
51
|
+
@gsd-phase-researcher "<objective>
|
|
53
52
|
Research implementation approach for Phase {phase}: {name}
|
|
54
53
|
</objective>
|
|
55
54
|
|
|
@@ -67,10 +66,7 @@ Phase description: {description}
|
|
|
67
66
|
|
|
68
67
|
<output>
|
|
69
68
|
write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
70
|
-
</output>"
|
|
71
|
-
subagent_type="gsd-phase-researcher",
|
|
72
|
-
model="{researcher_model}"
|
|
73
|
-
)
|
|
69
|
+
</output>"
|
|
74
70
|
```
|
|
75
71
|
|
|
76
72
|
## Step 5: Handle Return
|
|
@@ -235,9 +235,9 @@ Based on user selection, route to appropriate workflow:
|
|
|
235
235
|
|
|
236
236
|
**{phase}-{plan}: [Plan Name]** — [objective from PLAN.md]
|
|
237
237
|
|
|
238
|
-
`/
|
|
238
|
+
`/new` then:
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
`/gsd-execute-phase {phase} ${GSD_WS}`
|
|
241
241
|
|
|
242
242
|
---
|
|
243
243
|
```
|
|
@@ -249,9 +249,9 @@ Based on user selection, route to appropriate workflow:
|
|
|
249
249
|
|
|
250
250
|
**Phase [N]: [Name]** — [Goal from ROADMAP.md]
|
|
251
251
|
|
|
252
|
-
`/
|
|
252
|
+
`/new` then:
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
`/gsd-plan-phase [phase-number] ${GSD_WS}`
|
|
255
255
|
|
|
256
256
|
---
|
|
257
257
|
|
|
@@ -18,12 +18,16 @@ Check which AI CLIs are available on the system:
|
|
|
18
18
|
command -v gemini >/dev/null 2>&1 && echo "gemini:available" || echo "gemini:missing"
|
|
19
19
|
command -v OpenCode >/dev/null 2>&1 && echo "OpenCode:available" || echo "OpenCode:missing"
|
|
20
20
|
command -v codex >/dev/null 2>&1 && echo "codex:available" || echo "codex:missing"
|
|
21
|
+
command -v coderabbit >/dev/null 2>&1 && echo "coderabbit:available" || echo "coderabbit:missing"
|
|
22
|
+
command -v opencode >/dev/null 2>&1 && echo "opencode:available" || echo "opencode:missing"
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
Parse flags from `$ARGUMENTS`:
|
|
24
26
|
- `--gemini` → include Gemini
|
|
25
27
|
- `--OpenCode` → include OpenCode
|
|
26
28
|
- `--codex` → include Codex
|
|
29
|
+
- `--coderabbit` → include CodeRabbit
|
|
30
|
+
- `--opencode` → include OpenCode
|
|
27
31
|
- `--all` → include all available
|
|
28
32
|
- No flags → include all available
|
|
29
33
|
|
|
@@ -33,13 +37,34 @@ No external AI CLIs found. Install at least one:
|
|
|
33
37
|
- gemini: https://github.com/google-gemini/gemini-cli
|
|
34
38
|
- codex: https://github.com/openai/codex
|
|
35
39
|
- OpenCode: https://github.com/anthropics/OpenCode-code
|
|
40
|
+
- opencode: https://opencode.ai (leverages GitHub Copilot subscription models)
|
|
36
41
|
|
|
37
42
|
Then run /gsd-review again.
|
|
38
43
|
```
|
|
39
44
|
Exit.
|
|
40
45
|
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
Determine which CLI to skip based on the current runtime environment:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Environment-based runtime detection (priority order)
|
|
50
|
+
if [ "$ANTIGRAVITY_AGENT" = "1" ]; then
|
|
51
|
+
# Antigravity is a separate client — all CLIs are external, skip none
|
|
52
|
+
SELF_CLI="none"
|
|
53
|
+
elif [ -n "$CLAUDE_CODE_ENTRYPOINT" ]; then
|
|
54
|
+
# Running inside OpenCode CLI — skip OpenCode for independence
|
|
55
|
+
SELF_CLI="OpenCode"
|
|
56
|
+
else
|
|
57
|
+
# Other environments (Gemini CLI, Codex CLI, etc.)
|
|
58
|
+
# Fall back to AI self-identification to decide which CLI to skip
|
|
59
|
+
SELF_CLI="auto"
|
|
60
|
+
fi
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Rules:
|
|
64
|
+
- If `SELF_CLI="none"` → invoke ALL available CLIs (no skip)
|
|
65
|
+
- If `SELF_CLI="OpenCode"` → skip OpenCode, use gemini/codex
|
|
66
|
+
- If `SELF_CLI="auto"` → the executing AI identifies itself and skips its own CLI
|
|
67
|
+
- At least one DIFFERENT CLI must be available for the review to proceed.
|
|
43
68
|
</step>
|
|
44
69
|
|
|
45
70
|
<step name="gather_context">
|
|
@@ -131,6 +156,22 @@ OpenCode -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" --no-input 2>/dev/null >
|
|
|
131
156
|
codex exec --skip-git-repo-check "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-review-codex-{phase}.md
|
|
132
157
|
```
|
|
133
158
|
|
|
159
|
+
**CodeRabbit:**
|
|
160
|
+
|
|
161
|
+
Note: CodeRabbit reviews the current git diff/working tree — it does not accept a prompt. It may take up to 5 minutes. Use `timeout: 360000` on the bash tool call.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
coderabbit review --prompt-only 2>/dev/null > /tmp/gsd-review-coderabbit-{phase}.md
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**OpenCode (via GitHub Copilot):**
|
|
168
|
+
```bash
|
|
169
|
+
cat /tmp/gsd-review-prompt-{phase}.md | opencode run - 2>/dev/null > /tmp/gsd-review-opencode-{phase}.md
|
|
170
|
+
if [ ! -s /tmp/gsd-review-opencode-{phase}.md ]; then
|
|
171
|
+
echo "OpenCode review failed or returned empty output." > /tmp/gsd-review-opencode-{phase}.md
|
|
172
|
+
fi
|
|
173
|
+
```
|
|
174
|
+
|
|
134
175
|
If a CLI fails, log the error and continue with remaining CLIs.
|
|
135
176
|
|
|
136
177
|
Display progress:
|
|
@@ -150,7 +191,7 @@ Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`:
|
|
|
150
191
|
```markdown
|
|
151
192
|
---
|
|
152
193
|
phase: {N}
|
|
153
|
-
reviewers: [gemini, OpenCode, codex]
|
|
194
|
+
reviewers: [gemini, OpenCode, codex, coderabbit, opencode]
|
|
154
195
|
reviewed_at: {ISO timestamp}
|
|
155
196
|
plans_reviewed: [{list of PLAN.md files}]
|
|
156
197
|
---
|
|
@@ -175,6 +216,18 @@ plans_reviewed: [{list of PLAN.md files}]
|
|
|
175
216
|
|
|
176
217
|
---
|
|
177
218
|
|
|
219
|
+
## CodeRabbit Review
|
|
220
|
+
|
|
221
|
+
{coderabbit review content}
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## OpenCode Review
|
|
226
|
+
|
|
227
|
+
{opencode review content}
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
178
231
|
## Consensus Summary
|
|
179
232
|
|
|
180
233
|
{synthesize common concerns across all reviewers}
|