gsd-opencode 1.22.1 → 1.33.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/agents/gsd-advisor-researcher.md +112 -0
- package/agents/gsd-assumptions-analyzer.md +110 -0
- package/agents/gsd-codebase-mapper.md +0 -2
- package/agents/gsd-debugger.md +117 -2
- package/agents/gsd-doc-verifier.md +207 -0
- package/agents/gsd-doc-writer.md +608 -0
- package/agents/gsd-executor.md +45 -4
- package/agents/gsd-integration-checker.md +0 -2
- package/agents/gsd-nyquist-auditor.md +0 -2
- package/agents/gsd-phase-researcher.md +191 -5
- package/agents/gsd-plan-checker.md +152 -5
- package/agents/gsd-planner.md +131 -157
- package/agents/gsd-project-researcher.md +28 -3
- package/agents/gsd-research-synthesizer.md +0 -2
- package/agents/gsd-roadmapper.md +29 -2
- package/agents/gsd-security-auditor.md +129 -0
- package/agents/gsd-ui-auditor.md +485 -0
- package/agents/gsd-ui-checker.md +305 -0
- package/agents/gsd-ui-researcher.md +368 -0
- package/agents/gsd-user-profiler.md +173 -0
- package/agents/gsd-verifier.md +207 -22
- package/commands/gsd/gsd-add-backlog.md +76 -0
- package/commands/gsd/gsd-analyze-dependencies.md +34 -0
- package/commands/gsd/gsd-audit-uat.md +24 -0
- package/commands/gsd/gsd-autonomous.md +45 -0
- package/commands/gsd/gsd-cleanup.md +5 -0
- package/commands/gsd/gsd-debug.md +29 -21
- package/commands/gsd/gsd-discuss-phase.md +15 -36
- package/commands/gsd/gsd-do.md +30 -0
- package/commands/gsd/gsd-docs-update.md +48 -0
- package/commands/gsd/gsd-execute-phase.md +24 -2
- package/commands/gsd/gsd-fast.md +30 -0
- package/commands/gsd/gsd-forensics.md +56 -0
- package/commands/gsd/gsd-help.md +2 -0
- package/commands/gsd/gsd-join-discord.md +2 -1
- package/commands/gsd/gsd-list-workspaces.md +19 -0
- package/commands/gsd/gsd-manager.md +40 -0
- package/commands/gsd/gsd-milestone-summary.md +51 -0
- package/commands/gsd/gsd-new-project.md +4 -0
- package/commands/gsd/gsd-new-workspace.md +44 -0
- package/commands/gsd/gsd-next.md +24 -0
- package/commands/gsd/gsd-note.md +34 -0
- package/commands/gsd/gsd-plan-phase.md +8 -1
- package/commands/gsd/gsd-plant-seed.md +28 -0
- package/commands/gsd/gsd-pr-branch.md +25 -0
- package/commands/gsd/gsd-profile-user.md +46 -0
- package/commands/gsd/gsd-quick.md +7 -3
- package/commands/gsd/gsd-reapply-patches.md +178 -45
- package/commands/gsd/gsd-remove-workspace.md +26 -0
- package/commands/gsd/gsd-research-phase.md +7 -12
- package/commands/gsd/gsd-review-backlog.md +62 -0
- package/commands/gsd/gsd-review.md +38 -0
- package/commands/gsd/gsd-secure-phase.md +35 -0
- package/commands/gsd/gsd-session-report.md +19 -0
- package/commands/gsd/gsd-set-profile.md +24 -23
- package/commands/gsd/gsd-ship.md +23 -0
- package/commands/gsd/gsd-stats.md +18 -0
- package/commands/gsd/gsd-thread.md +127 -0
- package/commands/gsd/gsd-ui-phase.md +34 -0
- package/commands/gsd/gsd-ui-review.md +32 -0
- package/commands/gsd/gsd-workstreams.md +71 -0
- package/get-shit-done/bin/gsd-tools.cjs +450 -90
- package/get-shit-done/bin/lib/commands.cjs +489 -24
- package/get-shit-done/bin/lib/config.cjs +329 -48
- package/get-shit-done/bin/lib/core.cjs +1143 -102
- package/get-shit-done/bin/lib/docs.cjs +267 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +125 -43
- package/get-shit-done/bin/lib/init.cjs +918 -106
- package/get-shit-done/bin/lib/milestone.cjs +65 -33
- package/get-shit-done/bin/lib/model-profiles.cjs +70 -0
- package/get-shit-done/bin/lib/phase.cjs +434 -404
- package/get-shit-done/bin/lib/profile-output.cjs +1048 -0
- package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
- package/get-shit-done/bin/lib/roadmap.cjs +156 -101
- package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
- package/get-shit-done/bin/lib/security.cjs +384 -0
- package/get-shit-done/bin/lib/state.cjs +711 -79
- package/get-shit-done/bin/lib/template.cjs +2 -2
- package/get-shit-done/bin/lib/uat.cjs +282 -0
- package/get-shit-done/bin/lib/verify.cjs +254 -42
- package/get-shit-done/bin/lib/workstream.cjs +495 -0
- 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/checkpoints.md +12 -10
- 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/decimal-phase-calculation.md +2 -3
- 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/git-integration.md +47 -0
- package/get-shit-done/references/model-profile-resolution.md +2 -0
- package/get-shit-done/references/model-profiles.md +62 -16
- package/get-shit-done/references/phase-argument-parsing.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 +18 -1
- 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/user-profiling.md +681 -0
- package/get-shit-done/references/workstream-flag.md +111 -0
- package/get-shit-done/templates/SECURITY.md +61 -0
- package/get-shit-done/templates/UAT.md +21 -3
- package/get-shit-done/templates/UI-SPEC.md +100 -0
- package/get-shit-done/templates/VALIDATION.md +3 -3
- package/get-shit-done/templates/claude-md.md +145 -0
- package/get-shit-done/templates/config.json +14 -3
- package/get-shit-done/templates/context.md +61 -6
- package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
- package/get-shit-done/templates/dev-preferences.md +21 -0
- package/get-shit-done/templates/discussion-log.md +63 -0
- package/get-shit-done/templates/phase-prompt.md +46 -5
- package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
- package/get-shit-done/templates/project.md +2 -0
- package/get-shit-done/templates/state.md +2 -2
- package/get-shit-done/templates/user-profile.md +146 -0
- package/get-shit-done/workflows/add-phase.md +4 -4
- package/get-shit-done/workflows/add-tests.md +4 -4
- package/get-shit-done/workflows/add-todo.md +4 -4
- package/get-shit-done/workflows/analyze-dependencies.md +96 -0
- package/get-shit-done/workflows/audit-milestone.md +20 -16
- package/get-shit-done/workflows/audit-uat.md +109 -0
- package/get-shit-done/workflows/autonomous.md +1036 -0
- package/get-shit-done/workflows/check-todos.md +4 -4
- package/get-shit-done/workflows/cleanup.md +4 -4
- package/get-shit-done/workflows/complete-milestone.md +22 -10
- package/get-shit-done/workflows/diagnose-issues.md +21 -7
- package/get-shit-done/workflows/discovery-phase.md +2 -2
- package/get-shit-done/workflows/discuss-phase-assumptions.md +671 -0
- package/get-shit-done/workflows/discuss-phase-power.md +291 -0
- package/get-shit-done/workflows/discuss-phase.md +558 -47
- package/get-shit-done/workflows/do.md +104 -0
- package/get-shit-done/workflows/docs-update.md +1093 -0
- package/get-shit-done/workflows/execute-phase.md +741 -58
- package/get-shit-done/workflows/execute-plan.md +77 -12
- package/get-shit-done/workflows/fast.md +105 -0
- package/get-shit-done/workflows/forensics.md +265 -0
- package/get-shit-done/workflows/health.md +28 -6
- package/get-shit-done/workflows/help.md +127 -7
- package/get-shit-done/workflows/insert-phase.md +4 -4
- package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
- package/get-shit-done/workflows/list-workspaces.md +56 -0
- package/get-shit-done/workflows/manager.md +363 -0
- package/get-shit-done/workflows/map-codebase.md +83 -44
- package/get-shit-done/workflows/milestone-summary.md +223 -0
- package/get-shit-done/workflows/new-milestone.md +133 -25
- package/get-shit-done/workflows/new-project.md +216 -54
- package/get-shit-done/workflows/new-workspace.md +237 -0
- package/get-shit-done/workflows/next.md +97 -0
- package/get-shit-done/workflows/node-repair.md +92 -0
- package/get-shit-done/workflows/note.md +156 -0
- package/get-shit-done/workflows/pause-work.md +132 -15
- package/get-shit-done/workflows/plan-milestone-gaps.md +6 -7
- package/get-shit-done/workflows/plan-phase.md +513 -62
- package/get-shit-done/workflows/plant-seed.md +169 -0
- package/get-shit-done/workflows/pr-branch.md +129 -0
- package/get-shit-done/workflows/profile-user.md +450 -0
- package/get-shit-done/workflows/progress.md +154 -29
- package/get-shit-done/workflows/quick.md +285 -111
- package/get-shit-done/workflows/remove-phase.md +2 -2
- package/get-shit-done/workflows/remove-workspace.md +90 -0
- package/get-shit-done/workflows/research-phase.md +13 -9
- package/get-shit-done/workflows/resume-project.md +37 -18
- package/get-shit-done/workflows/review.md +281 -0
- package/get-shit-done/workflows/secure-phase.md +154 -0
- package/get-shit-done/workflows/session-report.md +146 -0
- package/get-shit-done/workflows/set-profile.md +2 -2
- package/get-shit-done/workflows/settings.md +91 -11
- package/get-shit-done/workflows/ship.md +237 -0
- package/get-shit-done/workflows/stats.md +60 -0
- package/get-shit-done/workflows/transition.md +150 -23
- package/get-shit-done/workflows/ui-phase.md +292 -0
- package/get-shit-done/workflows/ui-review.md +183 -0
- package/get-shit-done/workflows/update.md +262 -30
- package/get-shit-done/workflows/validate-phase.md +14 -17
- package/get-shit-done/workflows/verify-phase.md +143 -11
- package/get-shit-done/workflows/verify-work.md +141 -39
- package/package.json +1 -1
- package/skills/gsd-audit-milestone/SKILL.md +29 -0
- package/skills/gsd-cleanup/SKILL.md +19 -0
- package/skills/gsd-complete-milestone/SKILL.md +131 -0
- package/skills/gsd-discuss-phase/SKILL.md +54 -0
- package/skills/gsd-execute-phase/SKILL.md +49 -0
- package/skills/gsd-plan-phase/SKILL.md +37 -0
- package/skills/gsd-ui-phase/SKILL.md +24 -0
- package/skills/gsd-ui-review/SKILL.md +24 -0
- package/skills/gsd-verify-work/SKILL.md +30 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<
|
|
1
|
+
<objective>
|
|
2
2
|
Remove an unstarted future phase from the project roadmap, delete its directory, renumber all subsequent phases to maintain a clean linear sequence, and commit the change. The git commit serves as the historical record of removal.
|
|
3
|
-
</
|
|
3
|
+
</objective>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
6
|
read all files referenced by the invoking prompt's execution_context before starting.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<objective>
|
|
2
|
+
Remove a GSD workspace, cleaning up git worktrees and deleting the workspace directory.
|
|
3
|
+
</objective>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
</required_reading>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
## 1. Setup
|
|
12
|
+
|
|
13
|
+
Extract workspace name from $ARGUMENTS.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init remove-workspace "$WORKSPACE_NAME")
|
|
17
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Parse JSON for: `workspace_name`, `workspace_path`, `has_manifest`, `strategy`, `repos`, `repo_count`, `dirty_repos`, `has_dirty_repos`.
|
|
21
|
+
|
|
22
|
+
**If no workspace name provided:**
|
|
23
|
+
|
|
24
|
+
First run `/gsd-list-workspaces` to show available workspaces, then ask:
|
|
25
|
+
|
|
26
|
+
Use question:
|
|
27
|
+
- header: "Remove Workspace"
|
|
28
|
+
- question: "Which workspace do you want to remove?"
|
|
29
|
+
- requireAnswer: true
|
|
30
|
+
|
|
31
|
+
Re-run init with the provided name.
|
|
32
|
+
|
|
33
|
+
## 2. Safety Checks
|
|
34
|
+
|
|
35
|
+
**If `has_dirty_repos` is true:**
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Cannot remove workspace "$WORKSPACE_NAME" — the following repos have uncommitted changes:
|
|
39
|
+
|
|
40
|
+
- repo1
|
|
41
|
+
- repo2
|
|
42
|
+
|
|
43
|
+
Commit or stash changes in these repos before removing the workspace:
|
|
44
|
+
cd $WORKSPACE_PATH/repo1
|
|
45
|
+
git stash # or git commit
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Exit. Do NOT proceed.
|
|
49
|
+
|
|
50
|
+
## 3. Confirm Removal
|
|
51
|
+
|
|
52
|
+
Use question:
|
|
53
|
+
- header: "Confirm Removal"
|
|
54
|
+
- question: "Remove workspace '$WORKSPACE_NAME' at $WORKSPACE_PATH? This will delete all files in the workspace directory. Type the workspace name to confirm:"
|
|
55
|
+
- requireAnswer: true
|
|
56
|
+
|
|
57
|
+
**If answer does not match `$WORKSPACE_NAME`:** Exit with "Removal cancelled."
|
|
58
|
+
|
|
59
|
+
## 4. Clean Up Worktrees
|
|
60
|
+
|
|
61
|
+
**If strategy is `worktree`:**
|
|
62
|
+
|
|
63
|
+
For each repo in the workspace:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
cd "$SOURCE_REPO_PATH"
|
|
67
|
+
git worktree remove "$WORKSPACE_PATH/$REPO_NAME" 2>&1 || true
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If `git worktree remove` fails, warn but continue:
|
|
71
|
+
```
|
|
72
|
+
Warning: Could not remove worktree for $REPO_NAME — source repo may have been moved or deleted.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 5. Delete Workspace Directory
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
rm -rf "$WORKSPACE_PATH"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 6. Report
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Workspace "$WORKSPACE_NAME" removed.
|
|
85
|
+
|
|
86
|
+
Path: $WORKSPACE_PATH (deleted)
|
|
87
|
+
Repos: $REPO_COUNT worktrees cleaned up
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
</process>
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
<
|
|
1
|
+
<objective>
|
|
2
2
|
Research how to implement a phase. Spawns gsd-phase-researcher with phase context.
|
|
3
3
|
|
|
4
4
|
Standalone research command. For most workflows, use `/gsd-plan-phase` which integrates research automatically.
|
|
5
|
-
</
|
|
5
|
+
</objective>
|
|
6
|
+
|
|
7
|
+
<available_agent_types>
|
|
8
|
+
Valid GSD subagent types (use exact names — do not fall back to 'general'):
|
|
9
|
+
- gsd-phase-researcher — Researches technical approaches for a phase
|
|
10
|
+
</available_agent_types>
|
|
6
11
|
|
|
7
12
|
<process>
|
|
8
13
|
|
|
@@ -26,7 +31,7 @@ If `found` is false: Error and exit.
|
|
|
26
31
|
## Step 2: Check Existing Research
|
|
27
32
|
|
|
28
33
|
```bash
|
|
29
|
-
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
|
|
34
|
+
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null || true
|
|
30
35
|
```
|
|
31
36
|
|
|
32
37
|
If exists: Offer update/view/skip options.
|
|
@@ -37,13 +42,13 @@ If exists: Offer update/view/skip options.
|
|
|
37
42
|
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE}")
|
|
38
43
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
39
44
|
# Extract: phase_dir, padded_phase, phase_number, state_path, requirements_path, context_path
|
|
45
|
+
AGENT_SKILLS_RESEARCHER=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" agent-skills gsd-researcher 2>/dev/null)
|
|
40
46
|
```
|
|
41
47
|
|
|
42
48
|
## Step 4: Spawn Researcher
|
|
43
49
|
|
|
44
50
|
```
|
|
45
|
-
|
|
46
|
-
prompt="<objective>
|
|
51
|
+
@gsd-phase-researcher "<objective>
|
|
47
52
|
Research implementation approach for Phase {phase}: {name}
|
|
48
53
|
</objective>
|
|
49
54
|
|
|
@@ -53,16 +58,15 @@ Research implementation approach for Phase {phase}: {name}
|
|
|
53
58
|
- {state_path} (Project decisions and history)
|
|
54
59
|
</files_to_read>
|
|
55
60
|
|
|
61
|
+
${AGENT_SKILLS_RESEARCHER}
|
|
62
|
+
|
|
56
63
|
<additional_context>
|
|
57
64
|
Phase description: {description}
|
|
58
65
|
</additional_context>
|
|
59
66
|
|
|
60
67
|
<output>
|
|
61
68
|
write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
|
62
|
-
</output>"
|
|
63
|
-
subagent_type="gsd-phase-researcher",
|
|
64
|
-
model="{researcher_model}"
|
|
65
|
-
)
|
|
69
|
+
</output>"
|
|
66
70
|
```
|
|
67
71
|
|
|
68
72
|
## Step 5: Handle Return
|
|
@@ -6,9 +6,9 @@ Use this workflow when:
|
|
|
6
6
|
- User returns after time away from project
|
|
7
7
|
</trigger>
|
|
8
8
|
|
|
9
|
-
<
|
|
9
|
+
<objective>
|
|
10
10
|
Instantly restore full project context so "Where were we?" has an immediate, complete answer.
|
|
11
|
-
</
|
|
11
|
+
</objective>
|
|
12
12
|
|
|
13
13
|
<required_reading>
|
|
14
14
|
@$HOME/.config/opencode/get-shit-done/references/continuation-format.md
|
|
@@ -63,14 +63,18 @@ cat .planning/PROJECT.md
|
|
|
63
63
|
Look for incomplete work that needs attention:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
+
# Check for structured handoff (preferred — machine-readable)
|
|
67
|
+
cat .planning/HANDOFF.json 2>/dev/null || true
|
|
68
|
+
|
|
66
69
|
# Check for continue-here files (mid-plan resumption)
|
|
67
|
-
ls .planning/phases/*/.continue-here*.md 2>/dev/null
|
|
70
|
+
ls .planning/phases/*/.continue-here*.md 2>/dev/null || true
|
|
68
71
|
|
|
69
72
|
# Check for plans without summaries (incomplete execution)
|
|
70
73
|
for plan in .planning/phases/*/*-PLAN.md; do
|
|
74
|
+
[ -e "$plan" ] || continue
|
|
71
75
|
summary="${plan/PLAN/SUMMARY}"
|
|
72
76
|
[ ! -f "$summary" ] && echo "Incomplete: $plan"
|
|
73
|
-
done 2>/dev/null
|
|
77
|
+
done 2>/dev/null || true
|
|
74
78
|
|
|
75
79
|
# Check for interrupted agents (use has_interrupted_agent and interrupted_agent_id from init)
|
|
76
80
|
if [ "$has_interrupted_agent" = "true" ]; then
|
|
@@ -78,7 +82,18 @@ if [ "$has_interrupted_agent" = "true" ]; then
|
|
|
78
82
|
fi
|
|
79
83
|
```
|
|
80
84
|
|
|
81
|
-
**If .
|
|
85
|
+
**If HANDOFF.json exists:**
|
|
86
|
+
|
|
87
|
+
- This is the primary resumption source — structured data from `/gsd-pause-work`
|
|
88
|
+
- Parse `status`, `phase`, `plan`, `task`, `total_tasks`, `next_action`
|
|
89
|
+
- Check `blockers` and `human_actions_pending` — surface these immediately
|
|
90
|
+
- Check `completed_tasks` for `in_progress` items — these need attention first
|
|
91
|
+
- Validate `uncommitted_files` against `git status` — flag divergence
|
|
92
|
+
- Use `context_notes` to restore mental model
|
|
93
|
+
- Flag: "Found structured handoff — resuming from task {task}/{total_tasks}"
|
|
94
|
+
- **After successful resumption, delete HANDOFF.json** (it's a one-shot artifact)
|
|
95
|
+
|
|
96
|
+
**If .continue-here file exists (fallback):**
|
|
82
97
|
|
|
83
98
|
- This is a mid-plan resumption point
|
|
84
99
|
- read the file for specific resumption context
|
|
@@ -145,8 +160,12 @@ Based on project state, determine the most logical next action:
|
|
|
145
160
|
→ Primary: Resume interrupted agent (task tool with resume parameter)
|
|
146
161
|
→ Option: Start fresh (abandon agent work)
|
|
147
162
|
|
|
163
|
+
**If HANDOFF.json exists:**
|
|
164
|
+
→ Primary: Resume from structured handoff (highest priority — specific task/blocker context)
|
|
165
|
+
→ Option: Discard handoff and reassess from files
|
|
166
|
+
|
|
148
167
|
**If .continue-here file exists:**
|
|
149
|
-
→
|
|
168
|
+
→ Fallback: Resume from checkpoint
|
|
150
169
|
→ Option: Start fresh on current plan
|
|
151
170
|
|
|
152
171
|
**If incomplete plan (PLAN without SUMMARY):**
|
|
@@ -154,7 +173,7 @@ Based on project state, determine the most logical next action:
|
|
|
154
173
|
→ Option: Abandon and move on
|
|
155
174
|
|
|
156
175
|
**If phase in progress, all plans complete:**
|
|
157
|
-
→ Primary:
|
|
176
|
+
→ Primary: Advance to next phase (via internal transition workflow)
|
|
158
177
|
→ Option: Review completed work
|
|
159
178
|
|
|
160
179
|
**If phase ready to plan:**
|
|
@@ -181,11 +200,11 @@ What would you like to do?
|
|
|
181
200
|
[Primary action based on state - e.g.:]
|
|
182
201
|
1. Resume interrupted agent [if interrupted agent found]
|
|
183
202
|
OR
|
|
184
|
-
1. Execute phase (/gsd-execute-phase {phase})
|
|
203
|
+
1. Execute phase (/gsd-execute-phase {phase} ${GSD_WS})
|
|
185
204
|
OR
|
|
186
|
-
1. Discuss Phase 3 context (/gsd-discuss-phase 3) [if CONTEXT.md missing]
|
|
205
|
+
1. Discuss Phase 3 context (/gsd-discuss-phase 3 ${GSD_WS}) [if CONTEXT.md missing]
|
|
187
206
|
OR
|
|
188
|
-
1. Plan Phase 3 (/gsd-plan-phase 3) [if CONTEXT.md exists or discuss option declined]
|
|
207
|
+
1. Plan Phase 3 (/gsd-plan-phase 3 ${GSD_WS}) [if CONTEXT.md exists or discuss option declined]
|
|
189
208
|
|
|
190
209
|
[Secondary options:]
|
|
191
210
|
2. Review current phase status
|
|
@@ -197,7 +216,7 @@ What would you like to do?
|
|
|
197
216
|
**Note:** When offering phase planning, check for CONTEXT.md existence first:
|
|
198
217
|
|
|
199
218
|
```bash
|
|
200
|
-
ls .planning/phases/XX-name/*-CONTEXT.md 2>/dev/null
|
|
219
|
+
ls .planning/phases/XX-name/*-CONTEXT.md 2>/dev/null || true
|
|
201
220
|
```
|
|
202
221
|
|
|
203
222
|
If missing, suggest discuss-phase before plan. If exists, offer plan directly.
|
|
@@ -216,9 +235,9 @@ Based on user selection, route to appropriate workflow:
|
|
|
216
235
|
|
|
217
236
|
**{phase}-{plan}: [Plan Name]** — [objective from PLAN.md]
|
|
218
237
|
|
|
219
|
-
`/
|
|
238
|
+
`/new` then:
|
|
220
239
|
|
|
221
|
-
|
|
240
|
+
`/gsd-execute-phase {phase} ${GSD_WS}`
|
|
222
241
|
|
|
223
242
|
---
|
|
224
243
|
```
|
|
@@ -230,19 +249,19 @@ Based on user selection, route to appropriate workflow:
|
|
|
230
249
|
|
|
231
250
|
**Phase [N]: [Name]** — [Goal from ROADMAP.md]
|
|
232
251
|
|
|
233
|
-
`/
|
|
252
|
+
`/new` then:
|
|
234
253
|
|
|
235
|
-
|
|
254
|
+
`/gsd-plan-phase [phase-number] ${GSD_WS}`
|
|
236
255
|
|
|
237
256
|
---
|
|
238
257
|
|
|
239
258
|
**Also available:**
|
|
240
|
-
- `/gsd-discuss-phase [N]` — gather context first
|
|
241
|
-
- `/gsd-research-phase [N]` — investigate unknowns
|
|
259
|
+
- `/gsd-discuss-phase [N] ${GSD_WS}` — gather context first
|
|
260
|
+
- `/gsd-research-phase [N] ${GSD_WS}` — investigate unknowns
|
|
242
261
|
|
|
243
262
|
---
|
|
244
263
|
```
|
|
245
|
-
- **
|
|
264
|
+
- **Advance to next phase** → ./transition.md (internal workflow, invoked inline — NOT a user command)
|
|
246
265
|
- **Check todos** → read .planning/todos/pending/, present summary
|
|
247
266
|
- **Review alignment** → read PROJECT.md, compare to current state
|
|
248
267
|
- **Something else** → Ask what they need
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<objective>
|
|
2
|
+
Cross-AI peer review — invoke external AI CLIs to independently review phase plans.
|
|
3
|
+
Each CLI gets the same prompt (PROJECT.md context, phase plans, requirements) and
|
|
4
|
+
produces structured feedback. Results are combined into REVIEWS.md for the planner
|
|
5
|
+
to incorporate via --reviews flag.
|
|
6
|
+
|
|
7
|
+
This implements adversarial review: different AI models catch different blind spots.
|
|
8
|
+
A plan that survives review from 2-3 independent AI systems is more robust.
|
|
9
|
+
</objective>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="detect_clis">
|
|
14
|
+
Check which AI CLIs are available on the system:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Check each CLI
|
|
18
|
+
command -v gemini >/dev/null 2>&1 && echo "gemini:available" || echo "gemini:missing"
|
|
19
|
+
command -v OpenCode >/dev/null 2>&1 && echo "OpenCode:available" || echo "OpenCode:missing"
|
|
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"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Parse flags from `$ARGUMENTS`:
|
|
26
|
+
- `--gemini` → include Gemini
|
|
27
|
+
- `--OpenCode` → include OpenCode
|
|
28
|
+
- `--codex` → include Codex
|
|
29
|
+
- `--coderabbit` → include CodeRabbit
|
|
30
|
+
- `--opencode` → include OpenCode
|
|
31
|
+
- `--all` → include all available
|
|
32
|
+
- No flags → include all available
|
|
33
|
+
|
|
34
|
+
If no CLIs are available:
|
|
35
|
+
```
|
|
36
|
+
No external AI CLIs found. Install at least one:
|
|
37
|
+
- gemini: https://github.com/google-gemini/gemini-cli
|
|
38
|
+
- codex: https://github.com/openai/codex
|
|
39
|
+
- OpenCode: https://github.com/anthropics/OpenCode-code
|
|
40
|
+
- opencode: https://opencode.ai (leverages GitHub Copilot subscription models)
|
|
41
|
+
|
|
42
|
+
Then run /gsd-review again.
|
|
43
|
+
```
|
|
44
|
+
Exit.
|
|
45
|
+
|
|
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.
|
|
68
|
+
</step>
|
|
69
|
+
|
|
70
|
+
<step name="gather_context">
|
|
71
|
+
Collect phase artifacts for the review prompt:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
|
|
75
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
read from init: `phase_dir`, `phase_number`, `padded_phase`.
|
|
79
|
+
|
|
80
|
+
Then read:
|
|
81
|
+
1. `.planning/PROJECT.md` (first 80 lines — project context)
|
|
82
|
+
2. Phase section from `.planning/ROADMAP.md`
|
|
83
|
+
3. All `*-PLAN.md` files in the phase directory
|
|
84
|
+
4. `*-CONTEXT.md` if present (user decisions)
|
|
85
|
+
5. `*-RESEARCH.md` if present (domain research)
|
|
86
|
+
6. `.planning/REQUIREMENTS.md` (requirements this phase addresses)
|
|
87
|
+
</step>
|
|
88
|
+
|
|
89
|
+
<step name="build_prompt">
|
|
90
|
+
Build a structured review prompt:
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
# Cross-AI Plan Review Request
|
|
94
|
+
|
|
95
|
+
You are reviewing implementation plans for a software project phase.
|
|
96
|
+
Provide structured feedback on plan quality, completeness, and risks.
|
|
97
|
+
|
|
98
|
+
## Project Context
|
|
99
|
+
{first 80 lines of PROJECT.md}
|
|
100
|
+
|
|
101
|
+
## Phase {N}: {phase name}
|
|
102
|
+
### Roadmap Section
|
|
103
|
+
{roadmap phase section}
|
|
104
|
+
|
|
105
|
+
### Requirements Addressed
|
|
106
|
+
{requirements for this phase}
|
|
107
|
+
|
|
108
|
+
### User Decisions (CONTEXT.md)
|
|
109
|
+
{context if present}
|
|
110
|
+
|
|
111
|
+
### Research Findings
|
|
112
|
+
{research if present}
|
|
113
|
+
|
|
114
|
+
### Plans to Review
|
|
115
|
+
{all PLAN.md contents}
|
|
116
|
+
|
|
117
|
+
## Review Instructions
|
|
118
|
+
|
|
119
|
+
Analyze each plan and provide:
|
|
120
|
+
|
|
121
|
+
1. **Summary** — One-paragraph assessment
|
|
122
|
+
2. **Strengths** — What's well-designed (bullet points)
|
|
123
|
+
3. **Concerns** — Potential issues, gaps, risks (bullet points with severity: HIGH/MEDIUM/LOW)
|
|
124
|
+
4. **Suggestions** — Specific improvements (bullet points)
|
|
125
|
+
5. **Risk Assessment** — Overall risk level (LOW/MEDIUM/HIGH) with justification
|
|
126
|
+
|
|
127
|
+
Focus on:
|
|
128
|
+
- Missing edge cases or error handling
|
|
129
|
+
- Dependency ordering issues
|
|
130
|
+
- Scope creep or over-engineering
|
|
131
|
+
- Security considerations
|
|
132
|
+
- Performance implications
|
|
133
|
+
- Whether the plans actually achieve the phase goals
|
|
134
|
+
|
|
135
|
+
Output your review in markdown format.
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
write to a temp file: `/tmp/gsd-review-prompt-{phase}.md`
|
|
139
|
+
</step>
|
|
140
|
+
|
|
141
|
+
<step name="invoke_reviewers">
|
|
142
|
+
For each selected CLI, invoke in sequence (not parallel — avoid rate limits):
|
|
143
|
+
|
|
144
|
+
**Gemini:**
|
|
145
|
+
```bash
|
|
146
|
+
gemini -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-review-gemini-{phase}.md
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**OpenCode (separate session):**
|
|
150
|
+
```bash
|
|
151
|
+
OpenCode -p "$(cat /tmp/gsd-review-prompt-{phase}.md)" --no-input 2>/dev/null > /tmp/gsd-review-OpenCode-{phase}.md
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Codex:**
|
|
155
|
+
```bash
|
|
156
|
+
codex exec --skip-git-repo-check "$(cat /tmp/gsd-review-prompt-{phase}.md)" 2>/dev/null > /tmp/gsd-review-codex-{phase}.md
|
|
157
|
+
```
|
|
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
|
+
|
|
175
|
+
If a CLI fails, log the error and continue with remaining CLIs.
|
|
176
|
+
|
|
177
|
+
Display progress:
|
|
178
|
+
```
|
|
179
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
180
|
+
GSD ► CROSS-AI REVIEW — Phase {N}
|
|
181
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
182
|
+
|
|
183
|
+
◆ Reviewing with {CLI}... done ✓
|
|
184
|
+
◆ Reviewing with {CLI}... done ✓
|
|
185
|
+
```
|
|
186
|
+
</step>
|
|
187
|
+
|
|
188
|
+
<step name="write_reviews">
|
|
189
|
+
Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`:
|
|
190
|
+
|
|
191
|
+
```markdown
|
|
192
|
+
---
|
|
193
|
+
phase: {N}
|
|
194
|
+
reviewers: [gemini, OpenCode, codex, coderabbit, opencode]
|
|
195
|
+
reviewed_at: {ISO timestamp}
|
|
196
|
+
plans_reviewed: [{list of PLAN.md files}]
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
# Cross-AI Plan Review — Phase {N}
|
|
200
|
+
|
|
201
|
+
## Gemini Review
|
|
202
|
+
|
|
203
|
+
{gemini review content}
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## OpenCode Review
|
|
208
|
+
|
|
209
|
+
{OpenCode review content}
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Codex Review
|
|
214
|
+
|
|
215
|
+
{codex review content}
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## CodeRabbit Review
|
|
220
|
+
|
|
221
|
+
{coderabbit review content}
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## OpenCode Review
|
|
226
|
+
|
|
227
|
+
{opencode review content}
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Consensus Summary
|
|
232
|
+
|
|
233
|
+
{synthesize common concerns across all reviewers}
|
|
234
|
+
|
|
235
|
+
### Agreed Strengths
|
|
236
|
+
{strengths mentioned by 2+ reviewers}
|
|
237
|
+
|
|
238
|
+
### Agreed Concerns
|
|
239
|
+
{concerns raised by 2+ reviewers — highest priority}
|
|
240
|
+
|
|
241
|
+
### Divergent Views
|
|
242
|
+
{where reviewers disagreed — worth investigating}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Commit:
|
|
246
|
+
```bash
|
|
247
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: cross-AI review for phase {N}" --files {phase_dir}/{padded_phase}-REVIEWS.md
|
|
248
|
+
```
|
|
249
|
+
</step>
|
|
250
|
+
|
|
251
|
+
<step name="present_results">
|
|
252
|
+
Display summary:
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
256
|
+
GSD ► REVIEW COMPLETE
|
|
257
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
258
|
+
|
|
259
|
+
Phase {N} reviewed by {count} AI systems.
|
|
260
|
+
|
|
261
|
+
Consensus concerns:
|
|
262
|
+
{top 3 shared concerns}
|
|
263
|
+
|
|
264
|
+
Full review: {padded_phase}-REVIEWS.md
|
|
265
|
+
|
|
266
|
+
To incorporate feedback into planning:
|
|
267
|
+
/gsd-plan-phase {N} --reviews
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Clean up temp files.
|
|
271
|
+
</step>
|
|
272
|
+
|
|
273
|
+
</process>
|
|
274
|
+
|
|
275
|
+
<success_criteria>
|
|
276
|
+
- [ ] At least one external CLI invoked successfully
|
|
277
|
+
- [ ] REVIEWS.md written with structured feedback
|
|
278
|
+
- [ ] Consensus summary synthesized from multiple reviewers
|
|
279
|
+
- [ ] Temp files cleaned up
|
|
280
|
+
- [ ] User knows how to use feedback (/gsd-plan-phase --reviews)
|
|
281
|
+
</success_criteria>
|