@undeemed/get-shit-done-codex 1.23.2 → 1.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +51 -5
  2. package/agents/gsd-debugger.md +8 -56
  3. package/agents/gsd-planner.md +2 -118
  4. package/agents/gsd-project-researcher.md +0 -3
  5. package/agents/gsd-research-synthesizer.md +0 -3
  6. package/bin/install.js +267 -5
  7. package/commands/gsd/add-phase.md +2 -6
  8. package/commands/gsd/add-todo.md +1 -6
  9. package/commands/gsd/check-todos.md +2 -6
  10. package/commands/gsd/debug.md +1 -6
  11. package/commands/gsd/discuss-phase.md +16 -9
  12. package/commands/gsd/execute-phase.md +2 -1
  13. package/commands/gsd/new-milestone.md +8 -1
  14. package/commands/gsd/pause-work.md +1 -4
  15. package/commands/gsd/plan-phase.md +1 -2
  16. package/commands/gsd/research-phase.md +15 -17
  17. package/commands/gsd/verify-work.md +2 -1
  18. package/get-shit-done/bin/gsd-tools.cjs +4951 -121
  19. package/get-shit-done/bin/lib/commands.cjs +4 -9
  20. package/get-shit-done/bin/lib/core.cjs +102 -23
  21. package/get-shit-done/bin/lib/init.cjs +11 -11
  22. package/get-shit-done/bin/lib/milestone.cjs +54 -3
  23. package/get-shit-done/bin/lib/phase.cjs +40 -10
  24. package/get-shit-done/bin/lib/state.cjs +86 -33
  25. package/get-shit-done/references/checkpoints.md +0 -1
  26. package/get-shit-done/references/model-profile-resolution.md +13 -6
  27. package/get-shit-done/references/model-profiles.md +60 -51
  28. package/get-shit-done/templates/context.md +14 -0
  29. package/get-shit-done/templates/phase-prompt.md +0 -2
  30. package/get-shit-done/workflows/audit-milestone.md +8 -63
  31. package/get-shit-done/workflows/diagnose-issues.md +1 -1
  32. package/get-shit-done/workflows/execute-phase.md +9 -54
  33. package/get-shit-done/workflows/execute-plan.md +13 -17
  34. package/get-shit-done/workflows/help.md +3 -3
  35. package/get-shit-done/workflows/map-codebase.md +44 -32
  36. package/get-shit-done/workflows/new-milestone.md +7 -16
  37. package/get-shit-done/workflows/new-project.md +80 -49
  38. package/get-shit-done/workflows/progress.md +26 -14
  39. package/get-shit-done/workflows/quick.md +15 -24
  40. package/get-shit-done/workflows/set-profile.md +12 -8
  41. package/get-shit-done/workflows/settings.md +14 -21
  42. package/get-shit-done/workflows/transition.md +0 -5
  43. package/get-shit-done/workflows/verify-work.md +12 -11
  44. package/hooks/dist/gsd-context-monitor.js +1 -1
  45. package/package.json +3 -2
  46. package/scripts/run-tests.cjs +43 -0
@@ -106,7 +106,7 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
106
106
  prompt="
107
107
  <objective>
108
108
  Execute plan {plan_number} of phase {phase_number}-{phase_name}.
109
- Commit each task atomically. Create SUMMARY.md. Update STATE.md and ROADMAP.md.
109
+ Commit each task atomically. Create SUMMARY.md. Update STATE.md.
110
110
  </objective>
111
111
 
112
112
  <execution_context>
@@ -118,11 +118,9 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
118
118
 
119
119
  <files_to_read>
120
120
  Read these files at execution start using the Read tool:
121
- - {phase_dir}/{plan_file} (Plan)
122
- - .planning/STATE.md (State)
123
- - .planning/config.json (Config, if exists)
124
- - ./CODEX.md (Project instructions, if exists — follow project-specific guidelines and coding conventions)
125
- - .agents/skills/ (Project skills, if exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
121
+ - Plan: {phase_dir}/{plan_file}
122
+ - State: .planning/STATE.md
123
+ - Config: .planning/config.json (if exists)
126
124
  </files_to_read>
127
125
 
128
126
  <success_criteria>
@@ -130,7 +128,6 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
130
128
  - [ ] Each task committed individually
131
129
  - [ ] SUMMARY.md created in plan directory
132
130
  - [ ] STATE.md updated with position and decisions
133
- - [ ] ROADMAP.md updated with plan progress (via `roadmap update-plan-progress`)
134
131
  </success_criteria>
135
132
  "
136
133
  )
@@ -165,7 +162,7 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
165
162
 
166
163
  5. **Handle failures:**
167
164
 
168
- **Known Codex Code bug (classifyHandoffIfNeeded):** If an agent reports "failed" with error containing `classifyHandoffIfNeeded is not defined`, this is a Codex Code runtime bug — not a GSD or agent issue. The error fires in the completion handler AFTER all tool calls finish. In this case: run the same spot-checks as step 4 (SUMMARY.md exists, git commits present, no Self-Check: FAILED). If spot-checks PASS → treat as **successful**. If spot-checks FAIL → treat as real failure below.
165
+ **Known Codex CLI bug (classifyHandoffIfNeeded):** If an agent reports "failed" with error containing `classifyHandoffIfNeeded is not defined`, this is a Codex CLI runtime bug — not a GSD or agent issue. The error fires in the completion handler AFTER all tool calls finish. In this case: run the same spot-checks as step 4 (SUMMARY.md exists, git commits present, no Self-Check: FAILED). If spot-checks PASS → treat as **successful**. If spot-checks FAIL → treat as real failure below.
169
166
 
170
167
  For real failures: report which plan failed → ask "Continue?" or "Stop?" → if continue, dependent plans may also fail. If stop, partial completion report.
171
168
 
@@ -177,19 +174,7 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
177
174
  <step name="checkpoint_handling">
178
175
  Plans with `autonomous: false` require user interaction.
179
176
 
180
- **Auto-mode checkpoint handling:**
181
-
182
- Read auto-advance config:
183
- ```bash
184
- AUTO_CFG=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
185
- ```
186
-
187
- When executor returns a checkpoint AND `AUTO_CFG` is `"true"`:
188
- - **human-verify** → Auto-spawn continuation agent with `{user_response}` = `"approved"`. Log `⚡ Auto-approved checkpoint`.
189
- - **decision** → Auto-spawn continuation agent with `{user_response}` = first option from checkpoint details. Log `⚡ Auto-selected: [option]`.
190
- - **human-action** → Present to user (existing behavior below). Auth gates cannot be automated.
191
-
192
- **Standard flow (not auto-mode, or human-action type):**
177
+ **Flow:**
193
178
 
194
179
  1. Spawn agent for checkpoint plan
195
180
  2. Agent runs until checkpoint task or auth gate → returns structured state
@@ -294,19 +279,12 @@ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-${PARENT_PHASE}
294
279
  <step name="verify_phase_goal">
295
280
  Verify phase achieved its GOAL, not just completed tasks.
296
281
 
297
- ```bash
298
- PHASE_REQ_IDS=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE_NUMBER}" | jq -r '.section' | grep -i "Requirements:" | sed 's/.*Requirements:\*\*\s*//' | sed 's/[\[\]]//g')
299
- ```
300
-
301
282
  ```
302
283
  Task(
303
284
  prompt="Verify phase {phase_number} goal achievement.
304
285
  Phase directory: {phase_dir}
305
286
  Phase goal: {goal from ROADMAP.md}
306
- Phase requirement IDs: {phase_req_ids}
307
- Check must_haves against actual codebase.
308
- Cross-reference requirement IDs from PLAN frontmatter against REQUIREMENTS.md — every ID MUST be accounted for.
309
- Create VERIFICATION.md.",
287
+ Check must_haves against actual codebase. Create VERIFICATION.md.",
310
288
  subagent_type="gsd-verifier",
311
289
  model="{verifier_model}"
312
290
  )
@@ -375,7 +353,7 @@ The CLI handles:
375
353
  Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
376
354
 
377
355
  ```bash
378
- node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md {phase_dir}/*-VERIFICATION.md
356
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-{X}): complete phase execution" --files .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md .planning/phases/{phase_dir}/*-VERIFICATION.md
379
357
  ```
380
358
  </step>
381
359
 
@@ -383,29 +361,6 @@ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs(phase-{X}): complete
383
361
 
384
362
  **Exception:** If `gaps_found`, the `verify_phase_goal` step already presents the gap-closure path (`$gsd-plan-phase {X} --gaps`). No additional routing needed — skip auto-advance.
385
363
 
386
- **No-transition check (spawned by auto-advance chain):**
387
-
388
- Parse `--no-transition` flag from $ARGUMENTS.
389
-
390
- **If `--no-transition` flag present:**
391
-
392
- Execute-phase was spawned by plan-phase's auto-advance. Do NOT run transition.md.
393
- After verification passes and roadmap is updated, return completion status to parent:
394
-
395
- ```
396
- ## PHASE COMPLETE
397
-
398
- Phase: ${PHASE_NUMBER} - ${PHASE_NAME}
399
- Plans: ${completed_count}/${total_count}
400
- Verification: {Passed | Gaps Found}
401
-
402
- [Include aggregate_results output]
403
- ```
404
-
405
- STOP. Do not proceed to auto-advance or transition.
406
-
407
- **If `--no-transition` flag is NOT present:**
408
-
409
364
  **Auto-advance detection:**
410
365
 
411
366
  1. Parse `--auto` flag from $ARGUMENTS
@@ -439,7 +394,7 @@ Orchestrator: ~10-15% context. Subagents: fresh 200k each. No polling (Task bloc
439
394
  </context_efficiency>
440
395
 
441
396
  <failure_handling>
442
- - **classifyHandoffIfNeeded false failure:** Agent reports "failed" but error is `classifyHandoffIfNeeded is not defined` → Codex Code bug, not GSD. Spot-check (SUMMARY exists, commits present) → if pass, treat as success
397
+ - **classifyHandoffIfNeeded false failure:** Agent reports "failed" but error is `classifyHandoffIfNeeded is not defined` → Codex CLI bug, not GSD. Spot-check (SUMMARY exists, commits present) → if pass, treat as success
443
398
  - **Agent fails mid-plan:** Missing SUMMARY.md → report, ask user how to proceed
444
399
  - **Dependency chain breaks:** Wave 1 fails → Wave 2 dependents likely fail → user chooses attempt or skip
445
400
  - **All agents in wave fail:** Systemic issue → stop, report for investigation
@@ -12,13 +12,19 @@ Read config.json for planning behavior settings.
12
12
  <process>
13
13
 
14
14
  <step name="init_context" priority="first">
15
- Load execution context (paths only to minimize orchestrator context):
15
+ Load execution context (uses `init execute-phase` for full context, including file contents):
16
16
 
17
17
  ```bash
18
- INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}")
18
+ INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}" --include state,config)
19
19
  ```
20
20
 
21
- Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`, `state_path`, `config_path`.
21
+ Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`.
22
+
23
+ **File contents (from --include):** `state_content`, `config_content`. Access with:
24
+ ```bash
25
+ STATE_CONTENT=$(echo "$INIT" | jq -r '.state_content // empty')
26
+ CONFIG_CONTENT=$(echo "$INIT" | jq -r '.config_content // empty')
27
+ ```
22
28
 
23
29
  If `.planning/` missing: error.
24
30
  </step>
@@ -34,7 +40,7 @@ Find first PLAN without matching SUMMARY. Decimal phases supported (`01.1-hotfix
34
40
 
35
41
  ```bash
36
42
  PHASE=$(echo "$PLAN_PATH" | grep -oE '[0-9]+(\.[0-9]+)?-[0-9]+')
37
- # config settings can be fetched via gsd-tools config-get if needed
43
+ # config_content already loaded via --include config in init_context
38
44
  ```
39
45
 
40
46
  <if mode="yolo">
@@ -106,7 +112,7 @@ Pattern B only (verify-only checkpoints). Skip for A/C.
106
112
  - Check `git log --oneline --all --grep="{phase}-{plan}"` returns ≥1 commit
107
113
  - Append `## Self-Check: PASSED` or `## Self-Check: FAILED` to SUMMARY
108
114
 
109
- **Known Codex Code bug (classifyHandoffIfNeeded):** If any segment agent reports "failed" with `classifyHandoffIfNeeded is not defined`, this is a Codex Code runtime bug — not a real failure. Run spot-checks; if they pass, treat as successful.
115
+ **Known Codex CLI bug (classifyHandoffIfNeeded):** If any segment agent reports "failed" with `classifyHandoffIfNeeded is not defined`, this is a Codex CLI runtime bug — not a real failure. Run spot-checks; if they pass, treat as successful.
110
116
 
111
117
 
112
118
 
@@ -316,7 +322,7 @@ If user_setup exists: create `{phase}-USER-SETUP.md` using template `~/.codex/ge
316
322
  <step name="create_summary">
317
323
  Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use `~/.codex/get-shit-done/templates/summary.md`.
318
324
 
319
- **Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | requirements-completed (**MUST** copy `requirements` array from PLAN.md frontmatter verbatim) | duration ($DURATION), completed ($PLAN_END_TIME date).
325
+ **Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | duration ($DURATION), completed ($PLAN_END_TIME date).
320
326
 
321
327
  Title: `# Phase [X] Plan [Y]: [Name] Summary`
322
328
 
@@ -380,21 +386,11 @@ node ~/.codex/get-shit-done/bin/gsd-tools.cjs roadmap update-plan-progress "${PH
380
386
  Counts PLAN vs SUMMARY files on disk. Updates progress table row with correct count and status (`In Progress` or `Complete` with date).
381
387
  </step>
382
388
 
383
- <step name="update_requirements">
384
- Mark completed requirements from the PLAN.md frontmatter `requirements:` field:
385
-
386
- ```bash
387
- node ~/.codex/get-shit-done/bin/gsd-tools.cjs requirements mark-complete ${REQ_IDS}
388
- ```
389
-
390
- Extract requirement IDs from the plan's frontmatter (e.g., `requirements: [AUTH-01, AUTH-02]`). If no requirements field, skip.
391
- </step>
392
-
393
389
  <step name="git_commit_metadata">
394
390
  Task code already committed per-task. Commit plan metadata:
395
391
 
396
392
  ```bash
397
- node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md .planning/REQUIREMENTS.md
393
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
398
394
  ```
399
395
  </step>
400
396
 
@@ -309,9 +309,9 @@ Usage: `$gsd-settings`
309
309
  **`$gsd-set-profile <profile>`**
310
310
  Quick switch model profile for GSD agents.
311
311
 
312
- - `quality` — Opus everywhere except verification
313
- - `balanced` — Opus for planning, Sonnet for execution (default)
314
- - `budget` — Sonnet for writing, Haiku for research/verification
312
+ - `quality` — xhigh thinking for decision-makers, high for analysis agents
313
+ - `balanced` — xhigh thinking for planner/debugger, high/medium for others (default)
314
+ - `budget` — minimal thinking — high for planner/debugger, medium everywhere else
315
315
 
316
316
  Usage: `$gsd-set-profile budget`
317
317
 
@@ -90,13 +90,17 @@ Use Task tool with `subagent_type="gsd-codebase-mapper"`, `model="{mapper_model}
90
90
 
91
91
  **Agent 1: Tech Focus**
92
92
 
93
+ Task tool parameters:
93
94
  ```
94
- Task(
95
- subagent_type="gsd-codebase-mapper",
96
- model="{mapper_model}",
97
- run_in_background=true,
98
- description="Map codebase tech stack",
99
- prompt="Focus: tech
95
+ subagent_type: "gsd-codebase-mapper"
96
+ model: "{mapper_model}"
97
+ run_in_background: true
98
+ description: "Map codebase tech stack"
99
+ ```
100
+
101
+ Prompt:
102
+ ```
103
+ Focus: tech
100
104
 
101
105
  Analyze this codebase for technology stack and external integrations.
102
106
 
@@ -104,19 +108,22 @@ Write these documents to .planning/codebase/:
104
108
  - STACK.md - Languages, runtime, frameworks, dependencies, configuration
105
109
  - INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
106
110
 
107
- Explore thoroughly. Write documents directly using templates. Return confirmation only."
108
- )
111
+ Explore thoroughly. Write documents directly using templates. Return confirmation only.
109
112
  ```
110
113
 
111
114
  **Agent 2: Architecture Focus**
112
115
 
116
+ Task tool parameters:
117
+ ```
118
+ subagent_type: "gsd-codebase-mapper"
119
+ model: "{mapper_model}"
120
+ run_in_background: true
121
+ description: "Map codebase architecture"
122
+ ```
123
+
124
+ Prompt:
113
125
  ```
114
- Task(
115
- subagent_type="gsd-codebase-mapper",
116
- model="{mapper_model}",
117
- run_in_background=true,
118
- description="Map codebase architecture",
119
- prompt="Focus: arch
126
+ Focus: arch
120
127
 
121
128
  Analyze this codebase architecture and directory structure.
122
129
 
@@ -124,19 +131,22 @@ Write these documents to .planning/codebase/:
124
131
  - ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
125
132
  - STRUCTURE.md - Directory layout, key locations, naming conventions
126
133
 
127
- Explore thoroughly. Write documents directly using templates. Return confirmation only."
128
- )
134
+ Explore thoroughly. Write documents directly using templates. Return confirmation only.
129
135
  ```
130
136
 
131
137
  **Agent 3: Quality Focus**
132
138
 
139
+ Task tool parameters:
133
140
  ```
134
- Task(
135
- subagent_type="gsd-codebase-mapper",
136
- model="{mapper_model}",
137
- run_in_background=true,
138
- description="Map codebase conventions",
139
- prompt="Focus: quality
141
+ subagent_type: "gsd-codebase-mapper"
142
+ model: "{mapper_model}"
143
+ run_in_background: true
144
+ description: "Map codebase conventions"
145
+ ```
146
+
147
+ Prompt:
148
+ ```
149
+ Focus: quality
140
150
 
141
151
  Analyze this codebase for coding conventions and testing patterns.
142
152
 
@@ -144,27 +154,29 @@ Write these documents to .planning/codebase/:
144
154
  - CONVENTIONS.md - Code style, naming, patterns, error handling
145
155
  - TESTING.md - Framework, structure, mocking, coverage
146
156
 
147
- Explore thoroughly. Write documents directly using templates. Return confirmation only."
148
- )
157
+ Explore thoroughly. Write documents directly using templates. Return confirmation only.
149
158
  ```
150
159
 
151
160
  **Agent 4: Concerns Focus**
152
161
 
162
+ Task tool parameters:
163
+ ```
164
+ subagent_type: "gsd-codebase-mapper"
165
+ model: "{mapper_model}"
166
+ run_in_background: true
167
+ description: "Map codebase concerns"
168
+ ```
169
+
170
+ Prompt:
153
171
  ```
154
- Task(
155
- subagent_type="gsd-codebase-mapper",
156
- model="{mapper_model}",
157
- run_in_background=true,
158
- description="Map codebase concerns",
159
- prompt="Focus: concerns
172
+ Focus: concerns
160
173
 
161
174
  Analyze this codebase for technical debt, known issues, and areas of concern.
162
175
 
163
176
  Write this document to .planning/codebase/:
164
177
  - CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
165
178
 
166
- Explore thoroughly. Write document directly using template. Return confirmation only."
167
- )
179
+ Explore thoroughly. Write document directly using template. Return confirmation only.
168
180
  ```
169
181
 
170
182
  Continue to collect_confirmations.
@@ -128,9 +128,7 @@ Focus ONLY on what's needed for the NEW features.
128
128
 
129
129
  <question>{QUESTION}</question>
130
130
 
131
- <files_to_read>
132
- - .planning/PROJECT.md (Project context)
133
- </files_to_read>
131
+ <project_context>[PROJECT.md summary]</project_context>
134
132
 
135
133
  <downstream_consumer>{CONSUMER}</downstream_consumer>
136
134
 
@@ -159,12 +157,7 @@ After all 4 complete, spawn synthesizer:
159
157
  Task(prompt="
160
158
  Synthesize research outputs into SUMMARY.md.
161
159
 
162
- <files_to_read>
163
- - .planning/research/STACK.md
164
- - .planning/research/FEATURES.md
165
- - .planning/research/ARCHITECTURE.md
166
- - .planning/research/PITFALLS.md
167
- </files_to_read>
160
+ Read: .planning/research/STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md
168
161
 
169
162
  Write to: .planning/research/SUMMARY.md
170
163
  Use template: ~/.codex/get-shit-done/templates/research-project/SUMMARY.md
@@ -271,13 +264,11 @@ node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs: define milestone v[X
271
264
  ```
272
265
  Task(prompt="
273
266
  <planning_context>
274
- <files_to_read>
275
- - .planning/PROJECT.md
276
- - .planning/REQUIREMENTS.md
277
- - .planning/research/SUMMARY.md (if exists)
278
- - .planning/config.json
279
- - .planning/MILESTONES.md
280
- </files_to_read>
267
+ @.planning/PROJECT.md
268
+ @.planning/REQUIREMENTS.md
269
+ @.planning/research/SUMMARY.md (if exists)
270
+ @.planning/config.json
271
+ @.planning/MILESTONES.md
281
272
  </planning_context>
282
273
 
283
274
  <instructions>