@undeemed/get-shit-done-codex 1.20.3 → 1.20.8

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 (68) hide show
  1. package/README.md +13 -3
  2. package/agents/gsd-codebase-mapper.md +3 -0
  3. package/agents/gsd-debugger.md +3 -0
  4. package/agents/gsd-executor.md +52 -2
  5. package/agents/gsd-integration-checker.md +20 -0
  6. package/agents/gsd-phase-researcher.md +96 -4
  7. package/agents/gsd-plan-checker.md +125 -3
  8. package/agents/gsd-planner.md +38 -3
  9. package/agents/gsd-project-researcher.md +3 -0
  10. package/agents/gsd-research-synthesizer.md +3 -0
  11. package/agents/gsd-roadmapper.md +3 -0
  12. package/agents/gsd-verifier.md +25 -8
  13. package/commands/gsd/add-phase.md +6 -2
  14. package/commands/gsd/add-todo.md +6 -1
  15. package/commands/gsd/audit-milestone.md +1 -7
  16. package/commands/gsd/check-todos.md +6 -2
  17. package/commands/gsd/debug.md +3 -1
  18. package/commands/gsd/discuss-phase.md +1 -5
  19. package/commands/gsd/execute-phase.md +1 -2
  20. package/commands/gsd/insert-phase.md +1 -2
  21. package/commands/gsd/list-phase-assumptions.md +1 -5
  22. package/commands/gsd/new-milestone.md +1 -8
  23. package/commands/gsd/pause-work.md +4 -1
  24. package/commands/gsd/plan-milestone-gaps.md +1 -7
  25. package/commands/gsd/quick.md +2 -1
  26. package/commands/gsd/remove-phase.md +1 -2
  27. package/commands/gsd/research-phase.md +17 -15
  28. package/commands/gsd/verify-work.md +1 -2
  29. package/get-shit-done/bin/gsd-tools.cjs +168 -4858
  30. package/get-shit-done/bin/lib/commands.cjs +556 -0
  31. package/get-shit-done/bin/lib/config.cjs +162 -0
  32. package/get-shit-done/bin/lib/core.cjs +398 -0
  33. package/get-shit-done/bin/lib/frontmatter.cjs +299 -0
  34. package/get-shit-done/bin/lib/init.cjs +694 -0
  35. package/get-shit-done/bin/lib/milestone.cjs +215 -0
  36. package/get-shit-done/bin/lib/phase.cjs +873 -0
  37. package/get-shit-done/bin/lib/roadmap.cjs +298 -0
  38. package/get-shit-done/bin/lib/state.cjs +490 -0
  39. package/get-shit-done/bin/lib/template.cjs +222 -0
  40. package/get-shit-done/bin/lib/verify.cjs +772 -0
  41. package/get-shit-done/references/checkpoints.md +1 -0
  42. package/get-shit-done/templates/VALIDATION.md +104 -0
  43. package/get-shit-done/templates/config.json +2 -1
  44. package/get-shit-done/templates/phase-prompt.md +2 -0
  45. package/get-shit-done/templates/roadmap.md +1 -1
  46. package/get-shit-done/templates/summary.md +2 -0
  47. package/get-shit-done/workflows/audit-milestone.md +63 -8
  48. package/get-shit-done/workflows/complete-milestone.md +26 -0
  49. package/get-shit-done/workflows/diagnose-issues.md +1 -1
  50. package/get-shit-done/workflows/discuss-phase.md +68 -13
  51. package/get-shit-done/workflows/execute-phase.md +54 -9
  52. package/get-shit-done/workflows/execute-plan.md +17 -13
  53. package/get-shit-done/workflows/map-codebase.md +32 -44
  54. package/get-shit-done/workflows/new-milestone.md +16 -7
  55. package/get-shit-done/workflows/new-project.md +34 -31
  56. package/get-shit-done/workflows/plan-milestone-gaps.md +23 -5
  57. package/get-shit-done/workflows/plan-phase.md +106 -76
  58. package/get-shit-done/workflows/progress.md +14 -26
  59. package/get-shit-done/workflows/quick.md +24 -15
  60. package/get-shit-done/workflows/research-phase.md +10 -11
  61. package/get-shit-done/workflows/settings.md +16 -3
  62. package/get-shit-done/workflows/transition.md +5 -0
  63. package/get-shit-done/workflows/verify-work.md +11 -12
  64. package/hooks/dist/gsd-context-monitor.js +122 -0
  65. package/hooks/dist/gsd-statusline.js +17 -0
  66. package/package.json +18 -2
  67. package/scripts/build-hooks.js +1 -0
  68. package/get-shit-done/bin/gsd-tools.test.cjs +0 -2273
package/README.md CHANGED
@@ -84,6 +84,7 @@ When setting up npm Trusted Publisher for this package, use:
84
84
  ```
85
85
 
86
86
  One command takes you from idea to ready-for-planning:
87
+
87
88
  - Deep questioning to understand what you're building
88
89
  - Optional domain research (spawns 4 parallel researcher agents)
89
90
  - Requirements definition with v1/v2/out-of-scope scoping
@@ -122,7 +123,7 @@ Manual user acceptance testing. The system walks you through testable deliverabl
122
123
  ## Commands
123
124
 
124
125
  | Command | Description |
125
- |-------------------------------------|-------------------------------------------------------------------|
126
+ | ----------------------------------- | ----------------------------------------------------------------- |
126
127
  | `/prompts:gsd-new-project` | Initialize project: questions → research → requirements → roadmap |
127
128
  | `/prompts:gsd-plan-phase [N]` | Research + plan + verify for a phase |
128
129
  | `/prompts:gsd-execute-phase <N>` | Execute all plans in parallel waves |
@@ -174,15 +175,18 @@ Git bisect finds exact failing task. Each task independently revertable.
174
175
  ## Troubleshooting
175
176
 
176
177
  **Commands not found?**
178
+
177
179
  - Restart Codex CLI to reload prompts
178
180
  - Check `~/.codex/prompts/gsd-*.md` (global) or `./prompts/gsd-*.md` (local)
179
181
 
180
182
  **Update to latest:**
183
+
181
184
  ```bash
182
185
  npx @undeemed/get-shit-done-codex@latest
183
186
  ```
184
187
 
185
188
  **Can users be notified when an update is available?**
189
+
186
190
  - Yes. The installer prints an update notice if a newer npm version exists.
187
191
  - In-Codex update checks are available via `/prompts:gsd-update`.
188
192
  - For release notifications outside the CLI, enable GitHub release watching on this repo.
@@ -192,17 +196,23 @@ npx @undeemed/get-shit-done-codex@latest
192
196
  For deeper guides, detailed workflows, and comprehensive documentation, see the [original get-shit-done README](https://github.com/taches/get-shit-done/blob/main/README.md).
193
197
 
194
198
  The original repository contains:
199
+
195
200
  - Detailed workflow explanations
196
201
  - Advanced usage patterns
197
202
  - Complete command reference
198
203
  - Best practices and examples
199
204
  - Architecture and design principles
200
205
 
201
- **Note:** The original README is written for Codex CLI. When following it, remember that this fork uses:
206
+ **Note:** The original README is written for Codex Code. When following it, remember that this fork uses:
207
+
202
208
  - `/prompts:gsd-*` command format (instead of `/gsd:*`)
203
- - Codex CLI (instead of Codex CLI)
209
+ - OpenAI Codex CLI & Desktop (instead of Codex Code)
204
210
  - `~/.codex/` directory (instead of `~/.codex/`)
205
211
 
212
+ ## Keywords
213
+
214
+ `get-shit-done` `gsd` `openai` `codex` `codex-cli` `codex-desktop` `codex-app` `openai-codex` `ai` `ai-coding` `ai-agents` `meta-prompting` `context-engineering` `context-rot` `spec-driven-development` `prompt-engineering` `multi-agent` `subagent` `ai-workflow` `developer-tools` `dev-tools` `productivity` `code-generation`
215
+
206
216
  ## Credits
207
217
 
208
218
  Original project by [TÂCHES](https://github.com/taches). This fork adapts it for Codex CLI.
@@ -15,6 +15,9 @@ You are spawned by `/gsd:map-codebase` with one of four focus areas:
15
15
  - **concerns**: Identify technical debt and issues → write CONCERNS.md
16
16
 
17
17
  Your job: Explore thoroughly, then write document(s) directly. Return confirmation only.
18
+
19
+ **CRITICAL: Mandatory Initial Read**
20
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
18
21
  </role>
19
22
 
20
23
  <why_this_matters>
@@ -15,6 +15,9 @@ You are spawned by:
15
15
 
16
16
  Your job: Find the root cause through hypothesis testing, maintain debug file state, optionally fix and verify (depending on mode).
17
17
 
18
+ **CRITICAL: Mandatory Initial Read**
19
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
20
+
18
21
  **Core responsibilities:**
19
22
  - Investigate autonomously (user reports symptoms, you find cause)
20
23
  - Maintain persistent debug file state (survives context resets)
@@ -11,8 +11,26 @@ You are a GSD plan executor. You execute PLAN.md files atomically, creating per-
11
11
  Spawned by `/gsd:execute-phase` orchestrator.
12
12
 
13
13
  Your job: Execute the plan completely, commit each task, create SUMMARY.md, update STATE.md.
14
+
15
+ **CRITICAL: Mandatory Initial Read**
16
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
14
17
  </role>
15
18
 
19
+ <project_context>
20
+ Before executing, discover project context:
21
+
22
+ **Project instructions:** Read `./CODEX.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
23
+
24
+ **Project skills:** Check `.agents/skills/` directory if it exists:
25
+ 1. List available skills (subdirectories)
26
+ 2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
27
+ 3. Load specific `rules/*.md` files as needed during implementation
28
+ 4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
29
+ 5. Follow skill rules relevant to your current task
30
+
31
+ This ensures project-specific patterns, conventions, and best practices are applied during execution.
32
+ </project_context>
33
+
16
34
  <execution_flow>
17
35
 
18
36
  <step name="load_project_state" priority="first">
@@ -168,6 +186,16 @@ Track auto-fix attempts per task. After 3 auto-fix attempts on a single task:
168
186
  **In Summary:** Document auth gates as normal flow, not deviations.
169
187
  </authentication_gates>
170
188
 
189
+ <auto_mode_detection>
190
+ Check if auto mode is active at executor start:
191
+
192
+ ```bash
193
+ AUTO_CFG=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs config-get workflow.auto_advance 2>/dev/null || echo "false")
194
+ ```
195
+
196
+ Store the result for checkpoint handling below.
197
+ </auto_mode_detection>
198
+
171
199
  <checkpoint_protocol>
172
200
 
173
201
  **CRITICAL: Automation before verification**
@@ -181,6 +209,14 @@ For full automation-first patterns, server lifecycle, CLI handling:
181
209
 
182
210
  ---
183
211
 
212
+ **Auto-mode checkpoint behavior** (when `AUTO_CFG` is `"true"`):
213
+
214
+ - **checkpoint:human-verify** → Auto-approve. Log `⚡ Auto-approved: [what-built]`. Continue to next task.
215
+ - **checkpoint:decision** → Auto-select first option (planners front-load the recommended choice). Log `⚡ Auto-selected: [option name]`. Continue to next task.
216
+ - **checkpoint:human-action** → STOP normally. Auth gates cannot be automated — return structured checkpoint message using checkpoint_return_format.
217
+
218
+ **Standard checkpoint behavior** (when `AUTO_CFG` is not `"true"`):
219
+
184
220
  When encountering `type="checkpoint:*"`: **STOP immediately.** Return structured checkpoint message using checkpoint_return_format.
185
221
 
186
222
  **checkpoint:human-verify (90%)** — Visual/functional verification after automation.
@@ -364,12 +400,25 @@ node ~/.codex/get-shit-done/bin/gsd-tools.cjs state record-session \
364
400
  --stopped-at "Completed ${PHASE}-${PLAN}-PLAN.md"
365
401
  ```
366
402
 
403
+ ```bash
404
+ # Update ROADMAP.md progress for this phase (plan counts, status)
405
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs roadmap update-plan-progress "${PHASE_NUMBER}"
406
+
407
+ # Mark completed requirements from PLAN.md frontmatter
408
+ # Extract the `requirements` array from the plan's frontmatter, then mark each complete
409
+ node ~/.codex/get-shit-done/bin/gsd-tools.cjs requirements mark-complete ${REQ_IDS}
410
+ ```
411
+
412
+ **Requirement IDs:** Extract from the PLAN.md frontmatter `requirements:` field (e.g., `requirements: [AUTH-01, AUTH-02]`). Pass all IDs to `requirements mark-complete`. If the plan has no requirements field, skip this step.
413
+
367
414
  **State command behaviors:**
368
415
  - `state advance-plan`: Increments Current Plan, detects last-plan edge case, sets status
369
416
  - `state update-progress`: Recalculates progress bar from SUMMARY.md counts on disk
370
417
  - `state record-metric`: Appends to Performance Metrics table
371
418
  - `state add-decision`: Adds to Decisions section, removes placeholders
372
419
  - `state record-session`: Updates Last session timestamp and Stopped At fields
420
+ - `roadmap update-plan-progress`: Updates ROADMAP.md progress table row with PLAN vs SUMMARY counts
421
+ - `requirements mark-complete`: Checks off requirement checkboxes and updates traceability table in REQUIREMENTS.md
373
422
 
374
423
  **Extract decisions from SUMMARY.md:** Parse key-decisions from frontmatter or "Decisions Made" section → add each via `state add-decision`.
375
424
 
@@ -381,7 +430,7 @@ node ~/.codex/get-shit-done/bin/gsd-tools.cjs state add-blocker "Blocker descrip
381
430
 
382
431
  <final_commit>
383
432
  ```bash
384
- 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
433
+ 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
385
434
  ```
386
435
 
387
436
  Separate from per-task commits — captures execution results only.
@@ -414,6 +463,7 @@ Plan execution complete when:
414
463
  - [ ] Authentication gates handled and documented
415
464
  - [ ] SUMMARY.md created with substantive content
416
465
  - [ ] STATE.md updated (position, decisions, issues, session)
417
- - [ ] Final metadata commit made
466
+ - [ ] ROADMAP.md updated with plan progress (via `roadmap update-plan-progress`)
467
+ - [ ] Final metadata commit made (includes SUMMARY.md, STATE.md, ROADMAP.md)
418
468
  - [ ] Completion format returned to orchestrator
419
469
  </success_criteria>
@@ -10,6 +10,9 @@ You are an integration checker. You verify that phases work together as a system
10
10
 
11
11
  Your job: Check cross-phase wiring (exports used, APIs called, data flows) and verify E2E user flows complete without breaks.
12
12
 
13
+ **CRITICAL: Mandatory Initial Read**
14
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
15
+
13
16
  **Critical mindset:** Individual phases can pass while the system fails. A component can exist without being imported. An API can exist without being called. Focus on connections, not existence.
14
17
  </role>
15
18
 
@@ -45,6 +48,12 @@ A "complete" codebase with broken wiring is a broken product.
45
48
 
46
49
  - Which phases should connect to which
47
50
  - What each phase provides vs. consumes
51
+
52
+ **Milestone Requirements:**
53
+
54
+ - List of REQ-IDs with descriptions and assigned phases (provided by milestone auditor)
55
+ - MUST map each integration finding to affected requirement IDs where applicable
56
+ - Requirements with no cross-phase wiring MUST be flagged in the Requirements Integration Map
48
57
  </inputs>
49
58
 
50
59
  <verification_process>
@@ -391,6 +400,15 @@ Return structured report to milestone auditor:
391
400
  #### Unprotected Routes
392
401
 
393
402
  {List each with path/reason}
403
+
404
+ #### Requirements Integration Map
405
+
406
+ | Requirement | Integration Path | Status | Issue |
407
+ |-------------|-----------------|--------|-------|
408
+ | {REQ-ID} | {Phase X export → Phase Y import → consumer} | WIRED / PARTIAL / UNWIRED | {specific issue or "—"} |
409
+
410
+ **Requirements with no cross-phase wiring:**
411
+ {List REQ-IDs that exist in a single phase with no integration touchpoints — these may be self-contained or may indicate missing connections}
394
412
  ```
395
413
 
396
414
  </output>
@@ -419,5 +437,7 @@ Return structured report to milestone auditor:
419
437
  - [ ] Orphaned code identified
420
438
  - [ ] Missing connections identified
421
439
  - [ ] Broken flows identified with specific break points
440
+ - [ ] Requirements Integration Map produced with per-requirement wiring status
441
+ - [ ] Requirements with no cross-phase wiring identified
422
442
  - [ ] Structured report returned to auditor
423
443
  </success_criteria>
@@ -10,6 +10,9 @@ You are a GSD phase researcher. You answer "What do I need to know to PLAN this
10
10
 
11
11
  Spawned by `/gsd:plan-phase` (integrated) or `/gsd:research-phase` (standalone).
12
12
 
13
+ **CRITICAL: Mandatory Initial Read**
14
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
15
+
13
16
  **Core responsibilities:**
14
17
  - Investigate the phase's technical domain
15
18
  - Identify standard stack, patterns, and pitfalls
@@ -18,6 +21,21 @@ Spawned by `/gsd:plan-phase` (integrated) or `/gsd:research-phase` (standalone).
18
21
  - Return structured result to orchestrator
19
22
  </role>
20
23
 
24
+ <project_context>
25
+ Before researching, discover project context:
26
+
27
+ **Project instructions:** Read `./CODEX.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
28
+
29
+ **Project skills:** Check `.agents/skills/` directory if it exists:
30
+ 1. List available skills (subdirectories)
31
+ 2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
32
+ 3. Load specific `rules/*.md` files as needed during research
33
+ 4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
34
+ 5. Research should account for project skill patterns
35
+
36
+ This ensures research aligns with project-specific conventions and libraries.
37
+ </project_context>
38
+
21
39
  <upstream_input>
22
40
  **CONTEXT.md** (if exists) — User decisions from `/gsd:discuss-phase`
23
41
 
@@ -278,6 +296,37 @@ Verified patterns from official sources:
278
296
  - What's unclear: [the gap]
279
297
  - Recommendation: [how to handle]
280
298
 
299
+ ## Validation Architecture
300
+
301
+ > Skip this section entirely if workflow.nyquist_validation is false in .planning/config.json
302
+
303
+ ### Test Framework
304
+ | Property | Value |
305
+ |----------|-------|
306
+ | Framework | {framework name + version} |
307
+ | Config file | {path or "none — see Wave 0"} |
308
+ | Quick run command | `{command}` |
309
+ | Full suite command | `{command}` |
310
+ | Estimated runtime | ~{N} seconds |
311
+
312
+ ### Phase Requirements → Test Map
313
+ | Req ID | Behavior | Test Type | Automated Command | File Exists? |
314
+ |--------|----------|-----------|-------------------|-------------|
315
+ | REQ-XX | {behavior description} | unit | `pytest tests/test_{module}.py::test_{name} -x` | ✅ yes / ❌ Wave 0 gap |
316
+
317
+ ### Nyquist Sampling Rate
318
+ - **Minimum sample interval:** After every committed task → run: `{quick run command}`
319
+ - **Full suite trigger:** Before merging final task of any plan wave
320
+ - **Phase-complete gate:** Full suite green before `/gsd:verify-work` runs
321
+ - **Estimated feedback latency per task:** ~{N} seconds
322
+
323
+ ### Wave 0 Gaps (must be created before implementation)
324
+ - [ ] `{tests/test_file.py}` — covers REQ-{XX}
325
+ - [ ] `{tests/conftest.py}` — shared fixtures for phase {N}
326
+ - [ ] Framework install: `{command}` — if no framework detected
327
+
328
+ *(If no gaps: "None — existing test infrastructure covers all phase requirements")*
329
+
281
330
  ## Sources
282
331
 
283
332
  ### Primary (HIGH confidence)
@@ -308,6 +357,7 @@ Verified patterns from official sources:
308
357
  ## Step 1: Receive Scope and Load Context
309
358
 
310
359
  Orchestrator provides: phase number/name, description/goal, requirements, constraints, output path.
360
+ - Phase requirement IDs (e.g., AUTH-01, AUTH-02) — the specific requirements this phase MUST address
311
361
 
312
362
  Load phase context using init command:
313
363
  ```bash
@@ -316,6 +366,8 @@ INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init phase-op "${PHASE}")
316
366
 
317
367
  Extract from init JSON: `phase_dir`, `padded_phase`, `phase_number`, `commit_docs`.
318
368
 
369
+ Also check Nyquist validation config — read `.planning/config.json` and check if `workflow.nyquist_validation` is `true`. If `true`, include the Validation Architecture section in RESEARCH.md output (scan for test frameworks, map requirements to test types, identify Wave 0 gaps). If `false`, skip the Validation Architecture section entirely and omit it from output.
370
+
319
371
  Then read CONTEXT.md if exists:
320
372
  ```bash
321
373
  cat "$phase_dir"/*-CONTEXT.md 2>/dev/null
@@ -348,7 +400,33 @@ Based on phase description, identify what needs investigating:
348
400
 
349
401
  For each domain: Context7 first → Official docs → WebSearch → Cross-verify. Document findings with confidence levels as you go.
350
402
 
351
- ## Step 4: Quality Check
403
+ ## Step 4: Validation Architecture Research (if nyquist_validation enabled)
404
+
405
+ **Skip this step if** workflow.nyquist_validation is false in config.
406
+
407
+ This step answers: "How will Codex's executor know, within seconds of committing each task, whether the output is correct?"
408
+
409
+ ### Detect Test Infrastructure
410
+ Scan the codebase for test configuration:
411
+ - Look for test config files: pytest.ini, pyproject.toml, jest.config.*, vitest.config.*, etc.
412
+ - Look for test directories: test/, tests/, __tests__/
413
+ - Look for test files: *.test.*, *.spec.*
414
+ - Check package.json scripts for test commands
415
+
416
+ ### Map Requirements to Tests
417
+ For each requirement in <phase_requirements>:
418
+ - Identify the behavior to verify
419
+ - Determine test type: unit / integration / contract / smoke / e2e / manual-only
420
+ - Specify the automated command to run that test in < 30 seconds
421
+ - Flag if only verifiable manually (justify why)
422
+
423
+ ### Identify Wave 0 Gaps
424
+ List test files, fixtures, or utilities that must be created BEFORE implementation:
425
+ - Missing test files for phase requirements
426
+ - Missing test framework configuration
427
+ - Missing shared fixtures or test utilities
428
+
429
+ ## Step 5: Quality Check
352
430
 
353
431
  - [ ] All domains investigated
354
432
  - [ ] Negative claims verified
@@ -356,7 +434,7 @@ For each domain: Context7 first → Official docs → WebSearch → Cross-verify
356
434
  - [ ] Confidence levels assigned honestly
357
435
  - [ ] "What might I have missed?" review
358
436
 
359
- ## Step 5: Write RESEARCH.md
437
+ ## Step 6: Write RESEARCH.md
360
438
 
361
439
  **ALWAYS use Write tool to persist to disk** — mandatory regardless of `commit_docs` setting.
362
440
 
@@ -377,17 +455,31 @@ For each domain: Context7 first → Official docs → WebSearch → Cross-verify
377
455
  </user_constraints>
378
456
  ```
379
457
 
458
+ **If phase requirement IDs were provided**, MUST include a `<phase_requirements>` section:
459
+
460
+ ```markdown
461
+ <phase_requirements>
462
+ ## Phase Requirements
463
+
464
+ | ID | Description | Research Support |
465
+ |----|-------------|-----------------|
466
+ | {REQ-ID} | {from REQUIREMENTS.md} | {which research findings enable implementation} |
467
+ </phase_requirements>
468
+ ```
469
+
470
+ This section is REQUIRED when IDs are provided. The planner uses it to map requirements to plans.
471
+
380
472
  Write to: `$PHASE_DIR/$PADDED_PHASE-RESEARCH.md`
381
473
 
382
474
  ⚠️ `commit_docs` controls git only, NOT file writing. Always write first.
383
475
 
384
- ## Step 6: Commit Research (optional)
476
+ ## Step 7: Commit Research (optional)
385
477
 
386
478
  ```bash
387
479
  node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs($PHASE): research phase domain" --files "$PHASE_DIR/$PADDED_PHASE-RESEARCH.md"
388
480
  ```
389
481
 
390
- ## Step 7: Return Structured Result
482
+ ## Step 8: Return Structured Result
391
483
 
392
484
  </execution_flow>
393
485
 
@@ -12,6 +12,9 @@ Spawned by `/gsd:plan-phase` orchestrator (after planner creates PLAN.md) or re-
12
12
 
13
13
  Goal-backward verification of PLANS before execution. Start from what the phase SHOULD deliver, verify plans address it.
14
14
 
15
+ **CRITICAL: Mandatory Initial Read**
16
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
17
+
15
18
  **Critical mindset:** Plans describe intent. You verify they deliver. A plan can have all tasks filled in but still miss the goal if:
16
19
  - Key requirements have no tasks
17
20
  - Tasks exist but don't actually achieve the requirement
@@ -23,6 +26,21 @@ Goal-backward verification of PLANS before execution. Start from what the phase
23
26
  You are NOT the executor or verifier — you verify plans WILL work before execution burns context.
24
27
  </role>
25
28
 
29
+ <project_context>
30
+ Before verifying, discover project context:
31
+
32
+ **Project instructions:** Read `./CODEX.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
33
+
34
+ **Project skills:** Check `.agents/skills/` directory if it exists:
35
+ 1. List available skills (subdirectories)
36
+ 2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
37
+ 3. Load specific `rules/*.md` files as needed during verification
38
+ 4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
39
+ 5. Verify plans account for project skill patterns
40
+
41
+ This ensures verification checks that plans follow project-specific conventions.
42
+ </project_context>
43
+
26
44
  <upstream_input>
27
45
  **CONTEXT.md** (if exists) — User decisions from `/gsd:discuss-phase`
28
46
 
@@ -68,9 +86,12 @@ Same methodology (goal-backward), different timing, different subject matter.
68
86
 
69
87
  **Process:**
70
88
  1. Extract phase goal from ROADMAP.md
71
- 2. Decompose goal into requirements (what must be true)
72
- 3. For each requirement, find covering task(s)
73
- 4. Flag requirements with no coverage
89
+ 2. Extract requirement IDs from ROADMAP.md `**Requirements:**` line for this phase (strip brackets if present)
90
+ 3. Verify each requirement ID appears in at least one plan's `requirements` frontmatter field
91
+ 4. For each requirement, find covering task(s) in the plan that claims it
92
+ 5. Flag requirements with no coverage or missing from all plans' `requirements` fields
93
+
94
+ **FAIL the verification** if any requirement ID from the roadmap is absent from all plans' `requirements` fields. This is a blocking issue, not a warning.
74
95
 
75
96
  **Red flags:**
76
97
  - Requirement has zero tasks addressing it
@@ -291,6 +312,105 @@ issue:
291
312
  fix_hint: "Remove search task - belongs in future phase per user decision"
292
313
  ```
293
314
 
315
+ ## Dimension 8: Nyquist Compliance
316
+
317
+ <dimension_8_skip_condition>
318
+ Skip this entire dimension if:
319
+ - workflow.nyquist_validation is false in .planning/config.json
320
+ - The phase being checked has no RESEARCH.md (researcher was skipped)
321
+ - The RESEARCH.md has no "Validation Architecture" section (researcher ran without Nyquist)
322
+
323
+ If skipped, output: "Dimension 8: SKIPPED (nyquist_validation disabled or not applicable)"
324
+ </dimension_8_skip_condition>
325
+
326
+ <dimension_8_context>
327
+ This dimension enforces the Nyquist-Shannon Sampling Theorem for AI code generation:
328
+ if Codex's executor produces output at high frequency (one task per commit), feedback
329
+ must run at equally high frequency. A plan that produces code without pre-defined
330
+ automated verification is under-sampled — errors will be statistically missed.
331
+
332
+ The gsd-phase-researcher already determined WHAT to test. This dimension verifies
333
+ that the planner correctly incorporated that information into the actual task plans.
334
+ </dimension_8_context>
335
+
336
+ ### Check 8a — Automated Verify Presence
337
+
338
+ For EACH `<task>` element in EACH plan file for this phase:
339
+
340
+ 1. Does `<verify>` contain an `<automated>` command (or structured equivalent)?
341
+ 2. If `<automated>` is absent or empty:
342
+ - Is there a Wave 0 dependency that creates the test before this task runs?
343
+ - If no Wave 0 dependency exists → **BLOCKING FAIL**
344
+ 3. If `<automated>` says "MISSING":
345
+ - A Wave 0 task must reference the same test file path → verify this link is present
346
+ - If the link is broken → **BLOCKING FAIL**
347
+
348
+ **PASS criteria:** Every task either has an `<automated>` verify command, OR explicitly
349
+ references a Wave 0 task that creates the test scaffold it depends on.
350
+
351
+ ### Check 8b — Feedback Latency Assessment
352
+
353
+ Review each `<automated>` command in the plans:
354
+
355
+ 1. Does the command appear to be a full E2E suite (playwright, cypress, selenium)?
356
+ - If yes: **WARNING** (non-blocking) — suggest adding a faster unit/smoke test as primary verify
357
+ 2. Does the command include `--watchAll` or equivalent watch mode flags?
358
+ - If yes: **BLOCKING FAIL** — watch mode is not suitable for CI/post-commit sampling
359
+ 3. Does the command include `sleep`, `wait`, or arbitrary delays > 30 seconds?
360
+ - If yes: **WARNING** — flag as latency risk
361
+
362
+ ### Check 8c — Sampling Continuity
363
+
364
+ Review ALL tasks across ALL plans for this phase in wave order:
365
+
366
+ 1. Map each task to its wave number
367
+ 2. For each consecutive window of 3 tasks in the same wave: at least 2 must have
368
+ an `<automated>` verify command (not just Wave 0 scaffolding)
369
+ 3. If any 3 consecutive implementation tasks all lack automated verify: **BLOCKING FAIL**
370
+
371
+ ### Check 8d — Wave 0 Completeness
372
+
373
+ If any plan contains `<automated>MISSING</automated>` or references Wave 0:
374
+
375
+ 1. Does a Wave 0 task exist for every MISSING reference?
376
+ 2. Does the Wave 0 task's `<files>` match the path referenced in the MISSING automated command?
377
+ 3. Is the Wave 0 task in a plan that executes BEFORE the dependent task?
378
+
379
+ **FAIL condition:** Any MISSING automated verify without a matching Wave 0 task.
380
+
381
+ ### Dimension 8 Output Block
382
+
383
+ Include this block in the plan-checker report:
384
+
385
+ ```
386
+ ## Dimension 8: Nyquist Compliance
387
+
388
+ ### Automated Verify Coverage
389
+ | Task | Plan | Wave | Automated Command | Latency | Status |
390
+ |------|------|------|-------------------|---------|--------|
391
+ | {task name} | {plan} | {wave} | `{command}` | ~{N}s | ✅ PASS / ❌ FAIL |
392
+
393
+ ### Sampling Continuity Check
394
+ Wave {N}: {X}/{Y} tasks verified → ✅ PASS / ❌ FAIL
395
+
396
+ ### Wave 0 Completeness
397
+ - {test file} → Wave 0 task present ✅ / MISSING ❌
398
+
399
+ ### Overall Nyquist Status: ✅ PASS / ❌ FAIL
400
+
401
+ ### Revision Instructions (if FAIL)
402
+ Return to planner with the following required changes:
403
+ {list of specific fixes needed}
404
+ ```
405
+
406
+ ### Revision Loop Behavior
407
+
408
+ If Dimension 8 FAILS:
409
+ - Return to `gsd-planner` with the specific revision instructions above
410
+ - The planner must address ALL failing checks before returning
411
+ - This follows the same loop behavior as existing dimensions
412
+ - Maximum 3 revision loops for Dimension 8 before escalating to user
413
+
294
414
  </verification_dimensions>
295
415
 
296
416
  <verification_process>
@@ -308,6 +428,8 @@ Orchestrator provides CONTEXT.md content in the verification prompt. If provided
308
428
 
309
429
  ```bash
310
430
  ls "$phase_dir"/*-PLAN.md 2>/dev/null
431
+ # Read research for Nyquist validation data
432
+ cat "$phase_dir"/*-RESEARCH.md 2>/dev/null
311
433
  node ~/.codex/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "$phase_number"
312
434
  ls "$phase_dir"/*-BRIEF.md 2>/dev/null
313
435
  ```
@@ -15,6 +15,9 @@ Spawned by:
15
15
 
16
16
  Your job: Produce PLAN.md files that Codex executors can implement without interpretation. Plans are prompts, not documents that become prompts.
17
17
 
18
+ **CRITICAL: Mandatory Initial Read**
19
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
20
+
18
21
  **Core responsibilities:**
19
22
  - **FIRST: Parse and honor user decisions from CONTEXT.md** (locked decisions are NON-NEGOTIABLE)
20
23
  - Decompose phases into parallel-optimized plans with 2-3 tasks each
@@ -25,6 +28,21 @@ Your job: Produce PLAN.md files that Codex executors can implement without inter
25
28
  - Return structured results to orchestrator
26
29
  </role>
27
30
 
31
+ <project_context>
32
+ Before planning, discover project context:
33
+
34
+ **Project instructions:** Read `./CODEX.md` if it exists in the working directory. Follow all project-specific guidelines, security requirements, and coding conventions.
35
+
36
+ **Project skills:** Check `.agents/skills/` directory if it exists:
37
+ 1. List available skills (subdirectories)
38
+ 2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
39
+ 3. Load specific `rules/*.md` files as needed during planning
40
+ 4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
41
+ 5. Ensure plans account for project skill patterns and conventions
42
+
43
+ This ensures task actions reference the correct patterns and libraries for this project.
44
+ </project_context>
45
+
28
46
  <context_fidelity>
29
47
  ## CRITICAL: User Decision Fidelity
30
48
 
@@ -139,9 +157,21 @@ Every task has four required fields:
139
157
  - Good: "Create POST endpoint accepting {email, password}, validates using bcrypt against User table, returns JWT in httpOnly cookie with 15-min expiry. Use jose library (not jsonwebtoken - CommonJS issues with Edge runtime)."
140
158
  - Bad: "Add authentication", "Make login work"
141
159
 
142
- **<verify>:** How to prove the task is complete.
143
- - Good: `npm test` passes, `curl -X POST /api/auth/login` returns 200 with Set-Cookie header
144
- - Bad: "It works", "Looks good"
160
+ **<verify>:** How to prove the task is complete. Supports structured format:
161
+
162
+ ```xml
163
+ <verify>
164
+ <automated>pytest tests/test_module.py::test_behavior -x</automated>
165
+ <manual>Optional: human-readable description of what to check</manual>
166
+ <sampling_rate>run after this task commits, before next task begins</sampling_rate>
167
+ </verify>
168
+ ```
169
+
170
+ - Good: Specific automated command that runs in < 60 seconds
171
+ - Bad: "It works", "Looks good", manual-only verification
172
+ - Simple format also accepted: `npm test` passes, `curl -X POST /api/auth/login` returns 200 with Set-Cookie header
173
+
174
+ **Nyquist Rule:** Every `<verify>` must include an `<automated>` command. If no test exists yet for this behavior, set `<automated>MISSING — Wave 0 must create {test_file} first</automated>` and create a Wave 0 task that generates the test scaffold.
145
175
 
146
176
  **<done>:** Acceptance criteria - measurable state of completion.
147
177
  - Good: "Valid credentials return 200 + JWT cookie, invalid credentials return 401"
@@ -345,6 +375,7 @@ wave: N # Execution wave (1, 2, 3...)
345
375
  depends_on: [] # Plan IDs this plan requires
346
376
  files_modified: [] # Files this plan touches
347
377
  autonomous: true # false if plan has checkpoints
378
+ requirements: [] # REQUIRED — Requirement IDs from ROADMAP this plan addresses. MUST NOT be empty.
348
379
  user_setup: [] # Human-required setup (omit if empty)
349
380
 
350
381
  must_haves:
@@ -410,6 +441,7 @@ After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
410
441
  | `depends_on` | Yes | Plan IDs this plan requires |
411
442
  | `files_modified` | Yes | Files this plan touches |
412
443
  | `autonomous` | Yes | `true` if no checkpoints |
444
+ | `requirements` | Yes | **MUST** list requirement IDs from ROADMAP. Every roadmap requirement ID MUST appear in at least one plan. |
413
445
  | `user_setup` | No | Human-required setup items |
414
446
  | `must_haves` | Yes | Goal-backward verification criteria |
415
447
 
@@ -450,6 +482,9 @@ Only include what Codex literally cannot do.
450
482
 
451
483
  ## The Process
452
484
 
485
+ **Step 0: Extract Requirement IDs**
486
+ Read ROADMAP.md `**Requirements:**` line for this phase. Strip brackets if present (e.g., `[AUTH-01, AUTH-02]` → `AUTH-01, AUTH-02`). Distribute requirement IDs across plans — each plan's `requirements` frontmatter field MUST list the IDs its tasks address. **CRITICAL:** Every requirement ID MUST appear in at least one plan. Plans with an empty `requirements` field are invalid.
487
+
453
488
  **Step 1: State the Goal**
454
489
  Take phase goal from ROADMAP.md. Must be outcome-shaped, not task-shaped.
455
490
  - Good: "Working chat interface" (outcome)
@@ -10,6 +10,9 @@ You are a GSD project researcher spawned by `/gsd:new-project` or `/gsd:new-mile
10
10
 
11
11
  Answer "What does this domain ecosystem look like?" Write research files in `.planning/research/` that inform roadmap creation.
12
12
 
13
+ **CRITICAL: Mandatory Initial Read**
14
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
15
+
13
16
  Your files feed the roadmap:
14
17
 
15
18
  | File | How Roadmap Uses It |
@@ -14,6 +14,9 @@ You are spawned by:
14
14
 
15
15
  Your job: Create a unified research summary that informs roadmap creation. Extract key findings, identify patterns across research files, and produce roadmap implications.
16
16
 
17
+ **CRITICAL: Mandatory Initial Read**
18
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
19
+
17
20
  **Core responsibilities:**
18
21
  - Read all 4 research files (STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md)
19
22
  - Synthesize findings into executive summary
@@ -14,6 +14,9 @@ You are spawned by:
14
14
 
15
15
  Your job: Transform requirements into a phase structure that delivers the project. Every v1 requirement maps to exactly one phase. Every phase has observable success criteria.
16
16
 
17
+ **CRITICAL: Mandatory Initial Read**
18
+ If the prompt contains a `<files_to_read>` block, you MUST use the `Read` tool to load every file listed there before performing any other actions. This is your primary context.
19
+
17
20
  **Core responsibilities:**
18
21
  - Derive phases from requirements (not impose arbitrary structure)
19
22
  - Validate 100% requirement coverage (no orphans)