gsd-codex-cli 1.20.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/.codex/prompts/gsd-add-phase.md +44 -0
- package/.codex/prompts/gsd-add-todo.md +43 -0
- package/.codex/prompts/gsd-audit-milestone.md +43 -0
- package/.codex/prompts/gsd-check-todos.md +43 -0
- package/.codex/prompts/gsd-complete-milestone.md +43 -0
- package/.codex/prompts/gsd-debug.md +46 -0
- package/.codex/prompts/gsd-discuss-phase.md +43 -0
- package/.codex/prompts/gsd-execute-phase.md +43 -0
- package/.codex/prompts/gsd-help.md +43 -0
- package/.codex/prompts/gsd-insert-phase.md +43 -0
- package/.codex/prompts/gsd-list-phase-assumptions.md +43 -0
- package/.codex/prompts/gsd-map-codebase.md +43 -0
- package/.codex/prompts/gsd-new-milestone.md +43 -0
- package/.codex/prompts/gsd-new-project.md +43 -0
- package/.codex/prompts/gsd-pause-work.md +43 -0
- package/.codex/prompts/gsd-plan-milestone-gaps.md +43 -0
- package/.codex/prompts/gsd-plan-phase.md +43 -0
- package/.codex/prompts/gsd-progress.md +43 -0
- package/.codex/prompts/gsd-quick.md +43 -0
- package/.codex/prompts/gsd-remove-phase.md +43 -0
- package/.codex/prompts/gsd-research-phase.md +43 -0
- package/.codex/prompts/gsd-resume-work.md +43 -0
- package/.codex/prompts/gsd-set-profile.md +43 -0
- package/.codex/prompts/gsd-settings.md +43 -0
- package/.codex/prompts/gsd-update.md +43 -0
- package/.codex/prompts/gsd-verify-work.md +43 -0
- package/.codex/skills/get-shit-done-codex/SKILL.md +65 -0
- package/.codex/skills/get-shit-done-codex/references/compat.md +32 -0
- package/.codex/skills/get-shit-done-codex/references/windows.md +23 -0
- package/CHANGELOG.md +1434 -0
- package/LICENSE +21 -0
- package/README.md +690 -0
- package/agents/gsd-codebase-mapper.md +761 -0
- package/agents/gsd-debugger.md +1198 -0
- package/agents/gsd-executor.md +419 -0
- package/agents/gsd-integration-checker.md +423 -0
- package/agents/gsd-phase-researcher.md +469 -0
- package/agents/gsd-plan-checker.md +622 -0
- package/agents/gsd-planner.md +1159 -0
- package/agents/gsd-project-researcher.md +618 -0
- package/agents/gsd-research-synthesizer.md +236 -0
- package/agents/gsd-roadmapper.md +639 -0
- package/agents/gsd-verifier.md +541 -0
- package/bin/install-codex.js +100 -0
- package/bin/install.js +1806 -0
- package/commands/gsd/add-phase.md +39 -0
- package/commands/gsd/add-todo.md +42 -0
- package/commands/gsd/audit-milestone.md +42 -0
- package/commands/gsd/check-todos.md +41 -0
- package/commands/gsd/cleanup.md +18 -0
- package/commands/gsd/complete-milestone.md +136 -0
- package/commands/gsd/debug.md +162 -0
- package/commands/gsd/discuss-phase.md +87 -0
- package/commands/gsd/execute-phase.md +42 -0
- package/commands/gsd/health.md +22 -0
- package/commands/gsd/help.md +22 -0
- package/commands/gsd/insert-phase.md +33 -0
- package/commands/gsd/join-discord.md +18 -0
- package/commands/gsd/list-phase-assumptions.md +50 -0
- package/commands/gsd/map-codebase.md +71 -0
- package/commands/gsd/new-milestone.md +51 -0
- package/commands/gsd/new-project.md +42 -0
- package/commands/gsd/pause-work.md +35 -0
- package/commands/gsd/plan-milestone-gaps.md +40 -0
- package/commands/gsd/plan-phase.md +44 -0
- package/commands/gsd/progress.md +24 -0
- package/commands/gsd/quick.md +40 -0
- package/commands/gsd/reapply-patches.md +110 -0
- package/commands/gsd/remove-phase.md +32 -0
- package/commands/gsd/research-phase.md +187 -0
- package/commands/gsd/resume-work.md +40 -0
- package/commands/gsd/set-profile.md +34 -0
- package/commands/gsd/settings.md +36 -0
- package/commands/gsd/update.md +37 -0
- package/commands/gsd/verify-work.md +39 -0
- package/get-shit-done/bin/gsd-tools.cjs +5243 -0
- package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
- package/get-shit-done/references/checkpoints.md +775 -0
- package/get-shit-done/references/continuation-format.md +249 -0
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +248 -0
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +34 -0
- package/get-shit-done/references/model-profiles.md +92 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +196 -0
- package/get-shit-done/references/questioning.md +145 -0
- package/get-shit-done/references/tdd.md +263 -0
- package/get-shit-done/references/ui-brand.md +160 -0
- package/get-shit-done/references/verification-patterns.md +612 -0
- package/get-shit-done/templates/DEBUG.md +159 -0
- package/get-shit-done/templates/UAT.md +247 -0
- package/get-shit-done/templates/codebase/architecture.md +255 -0
- package/get-shit-done/templates/codebase/concerns.md +310 -0
- package/get-shit-done/templates/codebase/conventions.md +307 -0
- package/get-shit-done/templates/codebase/integrations.md +280 -0
- package/get-shit-done/templates/codebase/stack.md +186 -0
- package/get-shit-done/templates/codebase/structure.md +285 -0
- package/get-shit-done/templates/codebase/testing.md +480 -0
- package/get-shit-done/templates/config.json +36 -0
- package/get-shit-done/templates/context.md +283 -0
- package/get-shit-done/templates/continue-here.md +78 -0
- package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/get-shit-done/templates/discovery.md +146 -0
- package/get-shit-done/templates/milestone-archive.md +123 -0
- package/get-shit-done/templates/milestone.md +115 -0
- package/get-shit-done/templates/phase-prompt.md +567 -0
- package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/get-shit-done/templates/project.md +184 -0
- package/get-shit-done/templates/requirements.md +231 -0
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/get-shit-done/templates/research-project/STACK.md +120 -0
- package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/get-shit-done/templates/research.md +552 -0
- package/get-shit-done/templates/roadmap.md +202 -0
- package/get-shit-done/templates/state.md +176 -0
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +246 -0
- package/get-shit-done/templates/user-setup.md +311 -0
- package/get-shit-done/templates/verification-report.md +322 -0
- package/get-shit-done/workflows/add-phase.md +111 -0
- package/get-shit-done/workflows/add-todo.md +157 -0
- package/get-shit-done/workflows/audit-milestone.md +242 -0
- package/get-shit-done/workflows/check-todos.md +176 -0
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +674 -0
- package/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/get-shit-done/workflows/discovery-phase.md +289 -0
- package/get-shit-done/workflows/discuss-phase.md +485 -0
- package/get-shit-done/workflows/execute-phase.md +408 -0
- package/get-shit-done/workflows/execute-plan.md +441 -0
- package/get-shit-done/workflows/health.md +156 -0
- package/get-shit-done/workflows/help.md +486 -0
- package/get-shit-done/workflows/insert-phase.md +129 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/get-shit-done/workflows/map-codebase.md +327 -0
- package/get-shit-done/workflows/new-milestone.md +373 -0
- package/get-shit-done/workflows/new-project.md +1113 -0
- package/get-shit-done/workflows/pause-work.md +122 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
- package/get-shit-done/workflows/plan-phase.md +448 -0
- package/get-shit-done/workflows/progress.md +393 -0
- package/get-shit-done/workflows/quick.md +444 -0
- package/get-shit-done/workflows/remove-phase.md +154 -0
- package/get-shit-done/workflows/research-phase.md +74 -0
- package/get-shit-done/workflows/resume-project.md +306 -0
- package/get-shit-done/workflows/set-profile.md +80 -0
- package/get-shit-done/workflows/settings.md +200 -0
- package/get-shit-done/workflows/transition.md +539 -0
- package/get-shit-done/workflows/update.md +214 -0
- package/get-shit-done/workflows/verify-phase.md +242 -0
- package/get-shit-done/workflows/verify-work.md +570 -0
- package/hooks/dist/gsd-check-update.js +62 -0
- package/hooks/dist/gsd-statusline.js +91 -0
- package/package.json +54 -0
- package/scripts/build-hooks.js +42 -0
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Create executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification. Default flow: Research (if needed) -> Plan -> Verify -> Done. Orchestrates gsd-phase-researcher, gsd-planner, and gsd-plan-checker agents with a revision loop (max 3 iterations).
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
|
|
8
|
+
@~/.claude/get-shit-done/references/ui-brand.md
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
## 1. Initialize
|
|
14
|
+
|
|
15
|
+
Load all context in one call (include file contents to avoid redundant reads):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
INIT_RAW=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init plan-phase "$PHASE" --include state,roadmap,requirements,context,research,verification,uat)
|
|
19
|
+
# Large payloads are written to a tmpfile — output starts with @file:/path
|
|
20
|
+
if [[ "$INIT_RAW" == @file:* ]]; then
|
|
21
|
+
INIT_FILE="${INIT_RAW#@file:}"
|
|
22
|
+
INIT=$(cat "$INIT_FILE")
|
|
23
|
+
rm -f "$INIT_FILE"
|
|
24
|
+
else
|
|
25
|
+
INIT="$INIT_RAW"
|
|
26
|
+
fi
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `plan_count`, `planning_exists`, `roadmap_exists`.
|
|
30
|
+
|
|
31
|
+
**File contents (from --include):** `state_content`, `roadmap_content`, `requirements_content`, `context_content`, `research_content`, `verification_content`, `uat_content`. These are null if files don't exist.
|
|
32
|
+
|
|
33
|
+
**If `planning_exists` is false:** Error — run `/gsd:new-project` first.
|
|
34
|
+
|
|
35
|
+
## 2. Parse and Normalize Arguments
|
|
36
|
+
|
|
37
|
+
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`).
|
|
38
|
+
|
|
39
|
+
**If no phase number:** Detect next unplanned phase from roadmap.
|
|
40
|
+
|
|
41
|
+
**If `phase_found` is false:** Validate phase exists in ROADMAP.md. If valid, create the directory using `phase_slug` and `padded_phase` from init:
|
|
42
|
+
```bash
|
|
43
|
+
mkdir -p ".planning/phases/${padded_phase}-${phase_slug}"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Existing artifacts from init:** `has_research`, `has_plans`, `plan_count`.
|
|
47
|
+
|
|
48
|
+
## 3. Validate Phase
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
PHASE_INFO=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
|
|
55
|
+
|
|
56
|
+
## 4. Load CONTEXT.md
|
|
57
|
+
|
|
58
|
+
Use `context_content` from init JSON (already loaded via `--include context`).
|
|
59
|
+
|
|
60
|
+
**CRITICAL:** Use `context_content` from INIT — pass to researcher, planner, checker, and revision agents.
|
|
61
|
+
|
|
62
|
+
If `context_content` is not null, display: `Using phase context from: ${PHASE_DIR}/*-CONTEXT.md`
|
|
63
|
+
|
|
64
|
+
**If `context_content` is null (no CONTEXT.md exists):**
|
|
65
|
+
|
|
66
|
+
Use AskUserQuestion:
|
|
67
|
+
- header: "No context"
|
|
68
|
+
- question: "No CONTEXT.md found for Phase {X}. Plans will use research and requirements only — your design preferences won't be included. Continue or capture context first?"
|
|
69
|
+
- options:
|
|
70
|
+
- "Continue without context" — Plan using research + requirements only
|
|
71
|
+
- "Run discuss-phase first" — Capture design decisions before planning
|
|
72
|
+
|
|
73
|
+
If "Continue without context": Proceed to step 5.
|
|
74
|
+
If "Run discuss-phase first": Display `/gsd:discuss-phase {X}` and exit workflow.
|
|
75
|
+
|
|
76
|
+
## 5. Handle Research
|
|
77
|
+
|
|
78
|
+
**Skip if:** `--gaps` flag, `--skip-research` flag, or `research_enabled` is false (from init) without `--research` override.
|
|
79
|
+
|
|
80
|
+
**If `has_research` is true (from init) AND no `--research` flag:** Use existing, skip to step 6.
|
|
81
|
+
|
|
82
|
+
**If RESEARCH.md missing OR `--research` flag:**
|
|
83
|
+
|
|
84
|
+
Display banner:
|
|
85
|
+
```
|
|
86
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
87
|
+
GSD ► RESEARCHING PHASE {X}
|
|
88
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
89
|
+
|
|
90
|
+
◆ Spawning researcher...
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Spawn gsd-phase-researcher
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
PHASE_DESC=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section')
|
|
97
|
+
# Use requirements_content from INIT (already loaded via --include requirements)
|
|
98
|
+
REQUIREMENTS=$(echo "$INIT" | jq -r '.requirements_content // empty' | grep -A100 "## Requirements" | head -50)
|
|
99
|
+
STATE_SNAP=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs state-snapshot)
|
|
100
|
+
# Extract decisions from state-snapshot JSON: jq '.decisions[] | "\(.phase): \(.summary) - \(.rationale)"'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Research prompt:
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
<objective>
|
|
107
|
+
Research how to implement Phase {phase_number}: {phase_name}
|
|
108
|
+
Answer: "What do I need to know to PLAN this phase well?"
|
|
109
|
+
</objective>
|
|
110
|
+
|
|
111
|
+
<phase_context>
|
|
112
|
+
IMPORTANT: If CONTEXT.md exists below, it contains user decisions from /gsd:discuss-phase.
|
|
113
|
+
- **Decisions** = Locked — research THESE deeply, no alternatives
|
|
114
|
+
- **Claude's Discretion** = Freedom areas — research options, recommend
|
|
115
|
+
- **Deferred Ideas** = Out of scope — ignore
|
|
116
|
+
|
|
117
|
+
{context_content}
|
|
118
|
+
</phase_context>
|
|
119
|
+
|
|
120
|
+
<additional_context>
|
|
121
|
+
**Phase description:** {phase_description}
|
|
122
|
+
**Requirements:** {requirements}
|
|
123
|
+
**Prior decisions:** {decisions}
|
|
124
|
+
</additional_context>
|
|
125
|
+
|
|
126
|
+
<output>
|
|
127
|
+
Write to: {phase_dir}/{phase_num}-RESEARCH.md
|
|
128
|
+
</output>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Task(
|
|
133
|
+
prompt="First, read ~/.claude/agents/gsd-phase-researcher.md for your role and instructions.\n\n" + research_prompt,
|
|
134
|
+
subagent_type="general-purpose",
|
|
135
|
+
model="{researcher_model}",
|
|
136
|
+
description="Research Phase {phase}"
|
|
137
|
+
)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Handle Researcher Return
|
|
141
|
+
|
|
142
|
+
- **`## RESEARCH COMPLETE`:** Display confirmation, continue to step 6
|
|
143
|
+
- **`## RESEARCH BLOCKED`:** Display blocker, offer: 1) Provide context, 2) Skip research, 3) Abort
|
|
144
|
+
|
|
145
|
+
## 6. Check Existing Plans
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**If exists:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch.
|
|
152
|
+
|
|
153
|
+
## 7. Use Context Files from INIT
|
|
154
|
+
|
|
155
|
+
All file contents are already loaded via `--include` in step 1 (`@` syntax doesn't work across Task() boundaries):
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Extract from INIT JSON (no need to re-read files)
|
|
159
|
+
STATE_CONTENT=$(echo "$INIT" | jq -r '.state_content // empty')
|
|
160
|
+
ROADMAP_CONTENT=$(echo "$INIT" | jq -r '.roadmap_content // empty')
|
|
161
|
+
REQUIREMENTS_CONTENT=$(echo "$INIT" | jq -r '.requirements_content // empty')
|
|
162
|
+
RESEARCH_CONTENT=$(echo "$INIT" | jq -r '.research_content // empty')
|
|
163
|
+
VERIFICATION_CONTENT=$(echo "$INIT" | jq -r '.verification_content // empty')
|
|
164
|
+
UAT_CONTENT=$(echo "$INIT" | jq -r '.uat_content // empty')
|
|
165
|
+
CONTEXT_CONTENT=$(echo "$INIT" | jq -r '.context_content // empty')
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## 8. Spawn gsd-planner Agent
|
|
169
|
+
|
|
170
|
+
Display banner:
|
|
171
|
+
```
|
|
172
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
173
|
+
GSD ► PLANNING PHASE {X}
|
|
174
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
175
|
+
|
|
176
|
+
◆ Spawning planner...
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Planner prompt:
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
<planning_context>
|
|
183
|
+
**Phase:** {phase_number}
|
|
184
|
+
**Mode:** {standard | gap_closure}
|
|
185
|
+
|
|
186
|
+
**Project State:** {state_content}
|
|
187
|
+
**Roadmap:** {roadmap_content}
|
|
188
|
+
**Requirements:** {requirements_content}
|
|
189
|
+
|
|
190
|
+
**Phase Context:**
|
|
191
|
+
IMPORTANT: If context exists below, it contains USER DECISIONS from /gsd:discuss-phase.
|
|
192
|
+
- **Decisions** = LOCKED — honor exactly, do not revisit
|
|
193
|
+
- **Claude's Discretion** = Freedom — make implementation choices
|
|
194
|
+
- **Deferred Ideas** = Out of scope — do NOT include
|
|
195
|
+
|
|
196
|
+
{context_content}
|
|
197
|
+
|
|
198
|
+
**Research:** {research_content}
|
|
199
|
+
**Gap Closure (if --gaps):** {verification_content} {uat_content}
|
|
200
|
+
</planning_context>
|
|
201
|
+
|
|
202
|
+
<downstream_consumer>
|
|
203
|
+
Output consumed by /gsd:execute-phase. Plans need:
|
|
204
|
+
- Frontmatter (wave, depends_on, files_modified, autonomous)
|
|
205
|
+
- Tasks in XML format
|
|
206
|
+
- Verification criteria
|
|
207
|
+
- must_haves for goal-backward verification
|
|
208
|
+
</downstream_consumer>
|
|
209
|
+
|
|
210
|
+
<quality_gate>
|
|
211
|
+
- [ ] PLAN.md files created in phase directory
|
|
212
|
+
- [ ] Each plan has valid frontmatter
|
|
213
|
+
- [ ] Tasks are specific and actionable
|
|
214
|
+
- [ ] Dependencies correctly identified
|
|
215
|
+
- [ ] Waves assigned for parallel execution
|
|
216
|
+
- [ ] must_haves derived from phase goal
|
|
217
|
+
</quality_gate>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
Task(
|
|
222
|
+
prompt="First, read ~/.claude/agents/gsd-planner.md for your role and instructions.\n\n" + filled_prompt,
|
|
223
|
+
subagent_type="general-purpose",
|
|
224
|
+
model="{planner_model}",
|
|
225
|
+
description="Plan Phase {phase}"
|
|
226
|
+
)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## 9. Handle Planner Return
|
|
230
|
+
|
|
231
|
+
- **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10.
|
|
232
|
+
- **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12)
|
|
233
|
+
- **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual
|
|
234
|
+
|
|
235
|
+
## 10. Spawn gsd-plan-checker Agent
|
|
236
|
+
|
|
237
|
+
Display banner:
|
|
238
|
+
```
|
|
239
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
240
|
+
GSD ► VERIFYING PLANS
|
|
241
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
242
|
+
|
|
243
|
+
◆ Spawning plan checker...
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Checker prompt:
|
|
251
|
+
|
|
252
|
+
```markdown
|
|
253
|
+
<verification_context>
|
|
254
|
+
**Phase:** {phase_number}
|
|
255
|
+
**Phase Goal:** {goal from ROADMAP}
|
|
256
|
+
|
|
257
|
+
**Plans to verify:** {plans_content}
|
|
258
|
+
**Requirements:** {requirements_content}
|
|
259
|
+
|
|
260
|
+
**Phase Context:**
|
|
261
|
+
IMPORTANT: Plans MUST honor user decisions. Flag as issue if plans contradict.
|
|
262
|
+
- **Decisions** = LOCKED — plans must implement exactly
|
|
263
|
+
- **Claude's Discretion** = Freedom areas — plans can choose approach
|
|
264
|
+
- **Deferred Ideas** = Out of scope — plans must NOT include
|
|
265
|
+
|
|
266
|
+
{context_content}
|
|
267
|
+
</verification_context>
|
|
268
|
+
|
|
269
|
+
<expected_output>
|
|
270
|
+
- ## VERIFICATION PASSED — all checks pass
|
|
271
|
+
- ## ISSUES FOUND — structured issue list
|
|
272
|
+
</expected_output>
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Task(
|
|
277
|
+
prompt=checker_prompt,
|
|
278
|
+
subagent_type="gsd-plan-checker",
|
|
279
|
+
model="{checker_model}",
|
|
280
|
+
description="Verify Phase {phase} plans"
|
|
281
|
+
)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## 11. Handle Checker Return
|
|
285
|
+
|
|
286
|
+
- **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
|
|
287
|
+
- **`## ISSUES FOUND`:** Display issues, check iteration count, proceed to step 12.
|
|
288
|
+
|
|
289
|
+
## 12. Revision Loop (Max 3 Iterations)
|
|
290
|
+
|
|
291
|
+
Track `iteration_count` (starts at 1 after initial plan + check).
|
|
292
|
+
|
|
293
|
+
**If iteration_count < 3:**
|
|
294
|
+
|
|
295
|
+
Display: `Sending back to planner for revision... (iteration {N}/3)`
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Revision prompt:
|
|
302
|
+
|
|
303
|
+
```markdown
|
|
304
|
+
<revision_context>
|
|
305
|
+
**Phase:** {phase_number}
|
|
306
|
+
**Mode:** revision
|
|
307
|
+
|
|
308
|
+
**Existing plans:** {plans_content}
|
|
309
|
+
**Checker issues:** {structured_issues_from_checker}
|
|
310
|
+
|
|
311
|
+
**Phase Context:**
|
|
312
|
+
Revisions MUST still honor user decisions.
|
|
313
|
+
{context_content}
|
|
314
|
+
</revision_context>
|
|
315
|
+
|
|
316
|
+
<instructions>
|
|
317
|
+
Make targeted updates to address checker issues.
|
|
318
|
+
Do NOT replan from scratch unless issues are fundamental.
|
|
319
|
+
Return what changed.
|
|
320
|
+
</instructions>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
Task(
|
|
325
|
+
prompt="First, read ~/.claude/agents/gsd-planner.md for your role and instructions.\n\n" + revision_prompt,
|
|
326
|
+
subagent_type="general-purpose",
|
|
327
|
+
model="{planner_model}",
|
|
328
|
+
description="Revise Phase {phase} plans"
|
|
329
|
+
)
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
After planner returns -> spawn checker again (step 10), increment iteration_count.
|
|
333
|
+
|
|
334
|
+
**If iteration_count >= 3:**
|
|
335
|
+
|
|
336
|
+
Display: `Max iterations reached. {N} issues remain:` + issue list
|
|
337
|
+
|
|
338
|
+
Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
|
|
339
|
+
|
|
340
|
+
## 13. Present Final Status
|
|
341
|
+
|
|
342
|
+
Route to `<offer_next>` OR `auto_advance` depending on flags/config.
|
|
343
|
+
|
|
344
|
+
## 14. Auto-Advance Check
|
|
345
|
+
|
|
346
|
+
Check for auto-advance trigger:
|
|
347
|
+
|
|
348
|
+
1. Parse `--auto` flag from $ARGUMENTS
|
|
349
|
+
2. Read `workflow.auto_advance` from config:
|
|
350
|
+
```bash
|
|
351
|
+
AUTO_CFG=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
**If `--auto` flag present OR `AUTO_CFG` is true:**
|
|
355
|
+
|
|
356
|
+
Display banner:
|
|
357
|
+
```
|
|
358
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
359
|
+
GSD ► AUTO-ADVANCING TO EXECUTE
|
|
360
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
361
|
+
|
|
362
|
+
Plans ready. Spawning execute-phase...
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Spawn execute-phase as Task:
|
|
366
|
+
```
|
|
367
|
+
Task(
|
|
368
|
+
prompt="Run /gsd:execute-phase ${PHASE}",
|
|
369
|
+
subagent_type="general-purpose",
|
|
370
|
+
description="Execute Phase ${PHASE}"
|
|
371
|
+
)
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Handle execute-phase return:**
|
|
375
|
+
- **PHASE COMPLETE** → Display final summary:
|
|
376
|
+
```
|
|
377
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
378
|
+
GSD ► PHASE ${PHASE} COMPLETE ✓
|
|
379
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
380
|
+
|
|
381
|
+
Auto-advance pipeline finished.
|
|
382
|
+
|
|
383
|
+
Next: /gsd:discuss-phase ${NEXT_PHASE} --auto
|
|
384
|
+
```
|
|
385
|
+
- **GAPS FOUND / VERIFICATION FAILED** → Display result, stop chain:
|
|
386
|
+
```
|
|
387
|
+
Auto-advance stopped: Execution needs review.
|
|
388
|
+
|
|
389
|
+
Review the output above and continue manually:
|
|
390
|
+
/gsd:execute-phase ${PHASE}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**If neither `--auto` nor config enabled:**
|
|
394
|
+
Route to `<offer_next>` (existing behavior).
|
|
395
|
+
|
|
396
|
+
</process>
|
|
397
|
+
|
|
398
|
+
<offer_next>
|
|
399
|
+
Output this markdown directly (not as a code block):
|
|
400
|
+
|
|
401
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
402
|
+
GSD ► PHASE {X} PLANNED ✓
|
|
403
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
404
|
+
|
|
405
|
+
**Phase {X}: {Name}** — {N} plan(s) in {M} wave(s)
|
|
406
|
+
|
|
407
|
+
| Wave | Plans | What it builds |
|
|
408
|
+
|------|-------|----------------|
|
|
409
|
+
| 1 | 01, 02 | [objectives] |
|
|
410
|
+
| 2 | 03 | [objective] |
|
|
411
|
+
|
|
412
|
+
Research: {Completed | Used existing | Skipped}
|
|
413
|
+
Verification: {Passed | Passed with override | Skipped}
|
|
414
|
+
|
|
415
|
+
───────────────────────────────────────────────────────────────
|
|
416
|
+
|
|
417
|
+
## ▶ Next Up
|
|
418
|
+
|
|
419
|
+
**Execute Phase {X}** — run all {N} plans
|
|
420
|
+
|
|
421
|
+
/gsd:execute-phase {X}
|
|
422
|
+
|
|
423
|
+
<sub>/clear first → fresh context window</sub>
|
|
424
|
+
|
|
425
|
+
───────────────────────────────────────────────────────────────
|
|
426
|
+
|
|
427
|
+
**Also available:**
|
|
428
|
+
- cat .planning/phases/{phase-dir}/*-PLAN.md — review plans
|
|
429
|
+
- /gsd:plan-phase {X} --research — re-research first
|
|
430
|
+
|
|
431
|
+
───────────────────────────────────────────────────────────────
|
|
432
|
+
</offer_next>
|
|
433
|
+
|
|
434
|
+
<success_criteria>
|
|
435
|
+
- [ ] .planning/ directory validated
|
|
436
|
+
- [ ] Phase validated against roadmap
|
|
437
|
+
- [ ] Phase directory created if needed
|
|
438
|
+
- [ ] CONTEXT.md loaded early (step 4) and passed to ALL agents
|
|
439
|
+
- [ ] Research completed (unless --skip-research or --gaps or exists)
|
|
440
|
+
- [ ] gsd-phase-researcher spawned with CONTEXT.md
|
|
441
|
+
- [ ] Existing plans checked
|
|
442
|
+
- [ ] gsd-planner spawned with CONTEXT.md + RESEARCH.md
|
|
443
|
+
- [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
|
|
444
|
+
- [ ] gsd-plan-checker spawned with CONTEXT.md
|
|
445
|
+
- [ ] Verification passed OR user override OR max iterations with user decision
|
|
446
|
+
- [ ] User sees status between agent spawns
|
|
447
|
+
- [ ] User knows next steps
|
|
448
|
+
</success_criteria>
|