refactor: complete context-proxy orchestration flow

This commit is contained in:
Lex Christopherson
2026-02-19 12:40:45 -06:00
parent bf2f57105f
commit 3dcd3f0609
39 changed files with 351 additions and 427 deletions

View File

@@ -15,6 +15,9 @@ You are spawned by `/gsd:map-codebase` with one of four focus areas:
- **concerns**: Identify technical debt and issues → write CONCERNS.md - **concerns**: Identify technical debt and issues → write CONCERNS.md
Your job: Explore thoroughly, then write document(s) directly. Return confirmation only. Your job: Explore thoroughly, then write document(s) directly. Return confirmation only.
**CRITICAL: Mandatory Initial Read**
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.
</role> </role>
<why_this_matters> <why_this_matters>

View File

@@ -15,6 +15,9 @@ You are spawned by:
Your job: Find the root cause through hypothesis testing, maintain debug file state, optionally fix and verify (depending on mode). Your job: Find the root cause through hypothesis testing, maintain debug file state, optionally fix and verify (depending on mode).
**CRITICAL: Mandatory Initial Read**
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.
**Core responsibilities:** **Core responsibilities:**
- Investigate autonomously (user reports symptoms, you find cause) - Investigate autonomously (user reports symptoms, you find cause)
- Maintain persistent debug file state (survives context resets) - Maintain persistent debug file state (survives context resets)

View File

@@ -11,6 +11,9 @@ You are a GSD plan executor. You execute PLAN.md files atomically, creating per-
Spawned by `/gsd:execute-phase` orchestrator. Spawned by `/gsd:execute-phase` orchestrator.
Your job: Execute the plan completely, commit each task, create SUMMARY.md, update STATE.md. Your job: Execute the plan completely, commit each task, create SUMMARY.md, update STATE.md.
**CRITICAL: Mandatory Initial Read**
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.
</role> </role>
<project_context> <project_context>

View File

@@ -10,6 +10,9 @@ You are an integration checker. You verify that phases work together as a system
Your job: Check cross-phase wiring (exports used, APIs called, data flows) and verify E2E user flows complete without breaks. Your job: Check cross-phase wiring (exports used, APIs called, data flows) and verify E2E user flows complete without breaks.
**CRITICAL: Mandatory Initial Read**
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.
**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. **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.
</role> </role>

View File

@@ -10,6 +10,9 @@ You are a GSD phase researcher. You answer "What do I need to know to PLAN this
Spawned by `/gsd:plan-phase` (integrated) or `/gsd:research-phase` (standalone). Spawned by `/gsd:plan-phase` (integrated) or `/gsd:research-phase` (standalone).
**CRITICAL: Mandatory Initial Read**
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.
**Core responsibilities:** **Core responsibilities:**
- Investigate the phase's technical domain - Investigate the phase's technical domain
- Identify standard stack, patterns, and pitfalls - Identify standard stack, patterns, and pitfalls

View File

@@ -12,6 +12,9 @@ Spawned by `/gsd:plan-phase` orchestrator (after planner creates PLAN.md) or re-
Goal-backward verification of PLANS before execution. Start from what the phase SHOULD deliver, verify plans address it. Goal-backward verification of PLANS before execution. Start from what the phase SHOULD deliver, verify plans address it.
**CRITICAL: Mandatory Initial Read**
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.
**Critical mindset:** Plans describe intent. You verify they deliver. A plan can have all tasks filled in but still miss the goal if: **Critical mindset:** Plans describe intent. You verify they deliver. A plan can have all tasks filled in but still miss the goal if:
- Key requirements have no tasks - Key requirements have no tasks
- Tasks exist but don't actually achieve the requirement - Tasks exist but don't actually achieve the requirement

View File

@@ -15,6 +15,9 @@ Spawned by:
Your job: Produce PLAN.md files that Claude executors can implement without interpretation. Plans are prompts, not documents that become prompts. Your job: Produce PLAN.md files that Claude executors can implement without interpretation. Plans are prompts, not documents that become prompts.
**CRITICAL: Mandatory Initial Read**
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.
**Core responsibilities:** **Core responsibilities:**
- **FIRST: Parse and honor user decisions from CONTEXT.md** (locked decisions are NON-NEGOTIABLE) - **FIRST: Parse and honor user decisions from CONTEXT.md** (locked decisions are NON-NEGOTIABLE)
- Decompose phases into parallel-optimized plans with 2-3 tasks each - Decompose phases into parallel-optimized plans with 2-3 tasks each

View File

@@ -10,6 +10,9 @@ You are a GSD project researcher spawned by `/gsd:new-project` or `/gsd:new-mile
Answer "What does this domain ecosystem look like?" Write research files in `.planning/research/` that inform roadmap creation. Answer "What does this domain ecosystem look like?" Write research files in `.planning/research/` that inform roadmap creation.
**CRITICAL: Mandatory Initial Read**
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.
Your files feed the roadmap: Your files feed the roadmap:
| File | How Roadmap Uses It | | File | How Roadmap Uses It |

View File

@@ -14,6 +14,9 @@ You are spawned by:
Your job: Create a unified research summary that informs roadmap creation. Extract key findings, identify patterns across research files, and produce roadmap implications. Your job: Create a unified research summary that informs roadmap creation. Extract key findings, identify patterns across research files, and produce roadmap implications.
**CRITICAL: Mandatory Initial Read**
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.
**Core responsibilities:** **Core responsibilities:**
- Read all 4 research files (STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md) - Read all 4 research files (STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md)
- Synthesize findings into executive summary - Synthesize findings into executive summary

View File

@@ -14,6 +14,9 @@ You are spawned by:
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. 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.
**CRITICAL: Mandatory Initial Read**
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.
**Core responsibilities:** **Core responsibilities:**
- Derive phases from requirements (not impose arbitrary structure) - Derive phases from requirements (not impose arbitrary structure)
- Validate 100% requirement coverage (no orphans) - Validate 100% requirement coverage (no orphans)

View File

@@ -10,6 +10,9 @@ You are a GSD phase verifier. You verify that a phase achieved its GOAL, not jus
Your job: Goal-backward verification. Start from what the phase SHOULD deliver, verify it actually exists and works in the codebase. Your job: Goal-backward verification. Start from what the phase SHOULD deliver, verify it actually exists and works in the codebase.
**CRITICAL: Mandatory Initial Read**
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.
**Critical mindset:** Do NOT trust SUMMARY.md claims. SUMMARYs document what Claude SAID it did. You verify what ACTUALLY exists in the code. These often differ. **Critical mindset:** Do NOT trust SUMMARY.md claims. SUMMARYs document what Claude SAID it did. You verify what ACTUALLY exists in the code. These often differ.
</role> </role>

View File

@@ -19,11 +19,15 @@ Routes to the add-phase workflow which handles:
</objective> </objective>
<execution_context> <execution_context>
@.planning/ROADMAP.md
@.planning/STATE.md
@~/.claude/get-shit-done/workflows/add-phase.md @~/.claude/get-shit-done/workflows/add-phase.md
</execution_context> </execution_context>
<context>
Arguments: $ARGUMENTS (phase description)
Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool calls.
</context>
<process> <process>
**Follow the add-phase workflow** from `@~/.claude/get-shit-done/workflows/add-phase.md`. **Follow the add-phase workflow** from `@~/.claude/get-shit-done/workflows/add-phase.md`.

View File

@@ -23,10 +23,15 @@ Routes to the add-todo workflow which handles:
</objective> </objective>
<execution_context> <execution_context>
@.planning/STATE.md
@~/.claude/get-shit-done/workflows/add-todo.md @~/.claude/get-shit-done/workflows/add-todo.md
</execution_context> </execution_context>
<context>
Arguments: $ARGUMENTS (optional todo description)
State is resolved in-workflow via `init todos` and targeted reads.
</context>
<process> <process>
**Follow the add-todo workflow** from `@~/.claude/get-shit-done/workflows/add-todo.md`. **Follow the add-todo workflow** from `@~/.claude/get-shit-done/workflows/add-todo.md`.

View File

@@ -23,13 +23,7 @@ Verify milestone achieved its definition of done. Check requirements coverage, c
<context> <context>
Version: $ARGUMENTS (optional — defaults to current milestone) Version: $ARGUMENTS (optional — defaults to current milestone)
**Original Intent:** Core planning files are resolved in-workflow (`init milestone-op`) and loaded only as needed.
@.planning/PROJECT.md
@.planning/REQUIREMENTS.md
**Planned Work:**
@.planning/ROADMAP.md
@.planning/config.json (if exists)
**Completed Work:** **Completed Work:**
Glob: .planning/phases/*/*-SUMMARY.md Glob: .planning/phases/*/*-SUMMARY.md

View File

@@ -21,11 +21,15 @@ Routes to the check-todos workflow which handles:
</objective> </objective>
<execution_context> <execution_context>
@.planning/STATE.md
@.planning/ROADMAP.md
@~/.claude/get-shit-done/workflows/check-todos.md @~/.claude/get-shit-done/workflows/check-todos.md
</execution_context> </execution_context>
<context>
Arguments: $ARGUMENTS (optional area filter)
Todo state and roadmap correlation are loaded in-workflow using `init todos` and targeted reads.
</context>
<process> <process>
**Follow the check-todos workflow** from `@~/.claude/get-shit-done/workflows/check-todos.md`. **Follow the check-todos workflow** from `@~/.claude/get-shit-done/workflows/check-todos.md`.

View File

@@ -129,7 +129,9 @@ Continue debugging {slug}. Evidence is in the debug file.
</objective> </objective>
<prior_state> <prior_state>
Debug file: @.planning/debug/{slug}.md <files_to_read>
- .planning/debug/{slug}.md (Debug session state)
</files_to_read>
</prior_state> </prior_state>
<checkpoint_response> <checkpoint_response>

View File

@@ -32,11 +32,7 @@ Extract implementation decisions that downstream agents need — researcher and
<context> <context>
Phase number: $ARGUMENTS (required) Phase number: $ARGUMENTS (required)
**Load project state:** Context files are resolved in-workflow using `init phase-op` and roadmap/state tool calls.
@.planning/STATE.md
**Load roadmap:**
@.planning/ROADMAP.md
</context> </context>
<process> <process>

View File

@@ -32,8 +32,7 @@ Phase: $ARGUMENTS
**Flags:** **Flags:**
- `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans. - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
@.planning/ROADMAP.md Context files are resolved inside the workflow via `gsd-tools init execute-phase` and per-subagent `<files_to_read>` blocks.
@.planning/STATE.md
</context> </context>
<process> <process>

View File

@@ -23,8 +23,7 @@ Purpose: Handle urgent work discovered during execution without renumbering enti
<context> <context>
Arguments: $ARGUMENTS (format: <after-phase-number> <description>) Arguments: $ARGUMENTS (format: <after-phase-number> <description>)
@.planning/ROADMAP.md Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool calls.
@.planning/STATE.md
</context> </context>
<process> <process>

View File

@@ -23,11 +23,7 @@ Output: Conversational output only (no file creation) - ends with "What do you t
<context> <context>
Phase number: $ARGUMENTS (required) Phase number: $ARGUMENTS (required)
**Load project state first:** Project state and roadmap are loaded in-workflow using targeted reads.
@.planning/STATE.md
**Load roadmap:**
@.planning/ROADMAP.md
</context> </context>
<process> <process>

View File

@@ -35,14 +35,7 @@ Brownfield equivalent of new-project. Project exists, PROJECT.md has history. Ga
<context> <context>
Milestone name: $ARGUMENTS (optional - will prompt if not provided) Milestone name: $ARGUMENTS (optional - will prompt if not provided)
**Load project context:** Project and milestone context files are resolved inside the workflow (`init new-milestone`) and delegated via `<files_to_read>` blocks where subagents are used.
@.planning/PROJECT.md
@.planning/STATE.md
@.planning/MILESTONES.md
@.planning/config.json
**Load milestone context (if exists, from /gsd:discuss-milestone):**
@.planning/MILESTONE-CONTEXT.md
</context> </context>
<process> <process>

View File

@@ -19,10 +19,13 @@ Routes to the pause-work workflow which handles:
</objective> </objective>
<execution_context> <execution_context>
@.planning/STATE.md
@~/.claude/get-shit-done/workflows/pause-work.md @~/.claude/get-shit-done/workflows/pause-work.md
</execution_context> </execution_context>
<context>
State and phase progress are gathered in-workflow with targeted reads.
</context>
<process> <process>
**Follow the pause-work workflow** from `@~/.claude/get-shit-done/workflows/pause-work.md`. **Follow the pause-work workflow** from `@~/.claude/get-shit-done/workflows/pause-work.md`.

View File

@@ -25,13 +25,7 @@ One command creates all fix phases — no manual `/gsd:add-phase` per gap.
**Audit results:** **Audit results:**
Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent) Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
**Original intent (for prioritization):** Original intent and current planning state are loaded on demand inside the workflow.
@.planning/PROJECT.md
@.planning/REQUIREMENTS.md
**Current state:**
@.planning/ROADMAP.md
@.planning/STATE.md
</context> </context>
<process> <process>

View File

@@ -30,8 +30,9 @@ Quick mode is the same system with a shorter path:
</execution_context> </execution_context>
<context> <context>
@.planning/STATE.md
$ARGUMENTS $ARGUMENTS
Context files are resolved inside the workflow (`init quick`) and delegated via `<files_to_read>` blocks.
</context> </context>
<process> <process>

View File

@@ -22,8 +22,7 @@ Output: Phase deleted, all subsequent phases renumbered, git commit as historica
<context> <context>
Phase: $ARGUMENTS Phase: $ARGUMENTS
@.planning/ROADMAP.md Roadmap and state are resolved in-workflow via `init phase-op` and targeted reads.
@.planning/STATE.md
</context> </context>
<process> <process>

View File

@@ -37,7 +37,7 @@ Normalize phase input in step 1 before any directory lookups.
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init phase-op "$ARGUMENTS") INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init phase-op "$ARGUMENTS")
``` ```
Extract from init JSON: `phase_dir`, `phase_number`, `phase_name`, `phase_found`, `commit_docs`, `has_research`. Extract from init JSON: `phase_dir`, `phase_number`, `phase_name`, `phase_found`, `commit_docs`, `has_research`, `state_path`, `requirements_path`, `context_path`, `research_path`.
Resolve researcher model: Resolve researcher model:
```bash ```bash
@@ -64,15 +64,12 @@ ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
## 3. Gather Phase Context ## 3. Gather Phase Context
```bash Use paths from INIT (do not inline file contents in orchestrator context):
# Phase section already loaded in PHASE_INFO - `requirements_path`
echo "$PHASE_INFO" | jq -r '.section' - `context_path`
cat .planning/REQUIREMENTS.md 2>/dev/null - `state_path`
cat .planning/phases/${PHASE}-*/*-CONTEXT.md 2>/dev/null
grep -A30 "### Decisions Made" .planning/STATE.md 2>/dev/null
```
Present summary with phase description, requirements, prior decisions. Present summary with phase description and what files the researcher will load.
## 4. Spawn gsd-phase-researcher Agent ## 4. Spawn gsd-phase-researcher Agent
@@ -101,12 +98,15 @@ Research implementation approach for Phase {phase_number}: {phase_name}
Mode: ecosystem Mode: ecosystem
</objective> </objective>
<context> <files_to_read>
- {requirements_path} (Requirements)
- {context_path} (Phase context from discuss-phase, if exists)
- {state_path} (Prior project decisions and blockers)
</files_to_read>
<additional_context>
**Phase description:** {phase_description} **Phase description:** {phase_description}
**Requirements:** {requirements_list} </additional_context>
**Prior decisions:** {decisions_if_any}
**Phase context:** {context_md_content}
</context>
<downstream_consumer> <downstream_consumer>
Your RESEARCH.md will be loaded by `/gsd:plan-phase` which uses specific sections: Your RESEARCH.md will be loaded by `/gsd:plan-phase` which uses specific sections:
@@ -158,7 +158,9 @@ Continue research for Phase {phase_number}: {phase_name}
</objective> </objective>
<prior_state> <prior_state>
Research file: @.planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md <files_to_read>
- .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md (Existing research)
</files_to_read>
</prior_state> </prior_state>
<checkpoint_response> <checkpoint_response>

View File

@@ -29,8 +29,7 @@ Phase: $ARGUMENTS (optional)
- If provided: Test specific phase (e.g., "4") - If provided: Test specific phase (e.g., "4")
- If not provided: Check for active sessions or prompt for phase - If not provided: Check for active sessions or prompt for phase
@.planning/STATE.md Context files are resolved inside the workflow (`init verify-work`) and delegated via `<files_to_read>` blocks.
@.planning/ROADMAP.md
</context> </context>
<process> <process>

View File

@@ -145,14 +145,6 @@ const MODEL_PROFILES = {
// ─── Helpers ────────────────────────────────────────────────────────────────── // ─── Helpers ──────────────────────────────────────────────────────────────────
function parseIncludeFlag(args) {
const includeIndex = args.indexOf('--include');
if (includeIndex === -1) return new Set();
const includeValue = args[includeIndex + 1];
if (!includeValue) return new Set();
return new Set(includeValue.split(',').map(s => s.trim()));
}
function safeReadFile(filePath) { function safeReadFile(filePath) {
try { try {
return fs.readFileSync(filePath, 'utf-8'); return fs.readFileSync(filePath, 'utf-8');
@@ -4244,7 +4236,7 @@ function getMilestoneInfo(cwd) {
} }
} }
function cmdInitExecutePhase(cwd, phase, includes, raw) { function cmdInitExecutePhase(cwd, phase, raw) {
if (!phase) { if (!phase) {
error('phase required for init execute-phase'); error('phase required for init execute-phase');
} }
@@ -4300,23 +4292,16 @@ function cmdInitExecutePhase(cwd, phase, includes, raw) {
state_exists: pathExistsInternal(cwd, '.planning/STATE.md'), state_exists: pathExistsInternal(cwd, '.planning/STATE.md'),
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'), roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
config_exists: pathExistsInternal(cwd, '.planning/config.json'), config_exists: pathExistsInternal(cwd, '.planning/config.json'),
// File paths
state_path: '.planning/STATE.md',
roadmap_path: '.planning/ROADMAP.md',
config_path: '.planning/config.json',
}; };
// Include file contents if requested via --include
if (includes.has('state')) {
result.state_content = safeReadFile(path.join(cwd, '.planning', 'STATE.md'));
}
if (includes.has('config')) {
result.config_content = safeReadFile(path.join(cwd, '.planning', 'config.json'));
}
if (includes.has('roadmap')) {
result.roadmap_content = safeReadFile(path.join(cwd, '.planning', 'ROADMAP.md'));
}
output(result, raw); output(result, raw);
} }
function cmdInitPlanPhase(cwd, phase, includes, raw) { function cmdInitPlanPhase(cwd, phase, raw) {
if (!phase) { if (!phase) {
error('phase required for init plan-phase'); error('phase required for init plan-phase');
} }
@@ -4352,59 +4337,33 @@ function cmdInitPlanPhase(cwd, phase, includes, raw) {
// Environment // Environment
planning_exists: pathExistsInternal(cwd, '.planning'), planning_exists: pathExistsInternal(cwd, '.planning'),
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'), roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
// File paths
state_path: '.planning/STATE.md',
roadmap_path: '.planning/ROADMAP.md',
requirements_path: '.planning/REQUIREMENTS.md',
}; };
// Include file contents if requested via --include if (phaseInfo?.directory) {
if (includes.has('state')) {
result.state_content = safeReadFile(path.join(cwd, '.planning', 'STATE.md'));
}
if (includes.has('roadmap')) {
result.roadmap_content = safeReadFile(path.join(cwd, '.planning', 'ROADMAP.md'));
}
if (includes.has('requirements')) {
result.requirements_content = safeReadFile(path.join(cwd, '.planning', 'REQUIREMENTS.md'));
}
if (includes.has('context') && phaseInfo?.directory) {
// Find *-CONTEXT.md in phase directory // Find *-CONTEXT.md in phase directory
const phaseDirFull = path.join(cwd, phaseInfo.directory); const phaseDirFull = path.join(cwd, phaseInfo.directory);
try { try {
const files = fs.readdirSync(phaseDirFull); const files = fs.readdirSync(phaseDirFull);
const contextFile = files.find(f => f.endsWith('-CONTEXT.md') || f === 'CONTEXT.md'); const contextFile = files.find(f => f.endsWith('-CONTEXT.md') || f === 'CONTEXT.md');
if (contextFile) { if (contextFile) {
result.context_content = safeReadFile(path.join(phaseDirFull, contextFile)); result.context_path = path.join(phaseInfo.directory, contextFile);
} }
} catch {}
}
if (includes.has('research') && phaseInfo?.directory) {
// Find *-RESEARCH.md in phase directory
const phaseDirFull = path.join(cwd, phaseInfo.directory);
try {
const files = fs.readdirSync(phaseDirFull);
const researchFile = files.find(f => f.endsWith('-RESEARCH.md') || f === 'RESEARCH.md'); const researchFile = files.find(f => f.endsWith('-RESEARCH.md') || f === 'RESEARCH.md');
if (researchFile) { if (researchFile) {
result.research_content = safeReadFile(path.join(phaseDirFull, researchFile)); result.research_path = path.join(phaseInfo.directory, researchFile);
} }
} catch {}
}
if (includes.has('verification') && phaseInfo?.directory) {
// Find *-VERIFICATION.md in phase directory
const phaseDirFull = path.join(cwd, phaseInfo.directory);
try {
const files = fs.readdirSync(phaseDirFull);
const verificationFile = files.find(f => f.endsWith('-VERIFICATION.md') || f === 'VERIFICATION.md'); const verificationFile = files.find(f => f.endsWith('-VERIFICATION.md') || f === 'VERIFICATION.md');
if (verificationFile) { if (verificationFile) {
result.verification_content = safeReadFile(path.join(phaseDirFull, verificationFile)); result.verification_path = path.join(phaseInfo.directory, verificationFile);
} }
} catch {}
}
if (includes.has('uat') && phaseInfo?.directory) {
// Find *-UAT.md in phase directory
const phaseDirFull = path.join(cwd, phaseInfo.directory);
try {
const files = fs.readdirSync(phaseDirFull);
const uatFile = files.find(f => f.endsWith('-UAT.md') || f === 'UAT.md'); const uatFile = files.find(f => f.endsWith('-UAT.md') || f === 'UAT.md');
if (uatFile) { if (uatFile) {
result.uat_content = safeReadFile(path.join(phaseDirFull, uatFile)); result.uat_path = path.join(phaseInfo.directory, uatFile);
} }
} catch {} } catch {}
} }
@@ -4463,6 +4422,9 @@ function cmdInitNewProject(cwd, raw) {
// Enhanced search // Enhanced search
brave_search_available: hasBraveSearch, brave_search_available: hasBraveSearch,
// File paths
project_path: '.planning/PROJECT.md',
}; };
output(result, raw); output(result, raw);
@@ -4490,6 +4452,11 @@ function cmdInitNewMilestone(cwd, raw) {
project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'), project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'),
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'), roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
state_exists: pathExistsInternal(cwd, '.planning/STATE.md'), state_exists: pathExistsInternal(cwd, '.planning/STATE.md'),
// File paths
project_path: '.planning/PROJECT.md',
roadmap_path: '.planning/ROADMAP.md',
state_path: '.planning/STATE.md',
}; };
output(result, raw); output(result, raw);
@@ -4539,6 +4506,7 @@ function cmdInitQuick(cwd, description, raw) {
// File existence // File existence
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'), roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
planning_exists: pathExistsInternal(cwd, '.planning'), planning_exists: pathExistsInternal(cwd, '.planning'),
}; };
output(result, raw); output(result, raw);
@@ -4560,6 +4528,11 @@ function cmdInitResume(cwd, raw) {
project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'), project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'),
planning_exists: pathExistsInternal(cwd, '.planning'), planning_exists: pathExistsInternal(cwd, '.planning'),
// File paths
state_path: '.planning/STATE.md',
roadmap_path: '.planning/ROADMAP.md',
project_path: '.planning/PROJECT.md',
// Agent state // Agent state
has_interrupted_agent: !!interruptedAgentId, has_interrupted_agent: !!interruptedAgentId,
interrupted_agent_id: interruptedAgentId, interrupted_agent_id: interruptedAgentId,
@@ -4648,8 +4621,36 @@ function cmdInitPhaseOp(cwd, phase, raw) {
// File existence // File existence
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'), roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
planning_exists: pathExistsInternal(cwd, '.planning'), planning_exists: pathExistsInternal(cwd, '.planning'),
// File paths
state_path: '.planning/STATE.md',
roadmap_path: '.planning/ROADMAP.md',
requirements_path: '.planning/REQUIREMENTS.md',
}; };
if (phaseInfo?.directory) {
const phaseDirFull = path.join(cwd, phaseInfo.directory);
try {
const files = fs.readdirSync(phaseDirFull);
const contextFile = files.find(f => f.endsWith('-CONTEXT.md') || f === 'CONTEXT.md');
if (contextFile) {
result.context_path = path.join(phaseInfo.directory, contextFile);
}
const researchFile = files.find(f => f.endsWith('-RESEARCH.md') || f === 'RESEARCH.md');
if (researchFile) {
result.research_path = path.join(phaseInfo.directory, researchFile);
}
const verificationFile = files.find(f => f.endsWith('-VERIFICATION.md') || f === 'VERIFICATION.md');
if (verificationFile) {
result.verification_path = path.join(phaseInfo.directory, verificationFile);
}
const uatFile = files.find(f => f.endsWith('-UAT.md') || f === 'UAT.md');
if (uatFile) {
result.uat_path = path.join(phaseInfo.directory, uatFile);
}
} catch {}
}
output(result, raw); output(result, raw);
} }
@@ -4807,7 +4808,7 @@ function cmdInitMapCodebase(cwd, raw) {
output(result, raw); output(result, raw);
} }
function cmdInitProgress(cwd, includes, raw) { function cmdInitProgress(cwd, raw) {
const config = loadConfig(cwd); const config = loadConfig(cwd);
const milestone = getMilestoneInfo(cwd); const milestone = getMilestoneInfo(cwd);
@@ -4895,22 +4896,13 @@ function cmdInitProgress(cwd, includes, raw) {
project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'), project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'),
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'), roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
state_exists: pathExistsInternal(cwd, '.planning/STATE.md'), state_exists: pathExistsInternal(cwd, '.planning/STATE.md'),
// File paths
state_path: '.planning/STATE.md',
roadmap_path: '.planning/ROADMAP.md',
project_path: '.planning/PROJECT.md',
config_path: '.planning/config.json',
}; };
// Include file contents if requested via --include
if (includes.has('state')) {
result.state_content = safeReadFile(path.join(cwd, '.planning', 'STATE.md'));
}
if (includes.has('roadmap')) {
result.roadmap_content = safeReadFile(path.join(cwd, '.planning', 'ROADMAP.md'));
}
if (includes.has('project')) {
result.project_content = safeReadFile(path.join(cwd, '.planning', 'PROJECT.md'));
}
if (includes.has('config')) {
result.config_content = safeReadFile(path.join(cwd, '.planning', 'config.json'));
}
output(result, raw); output(result, raw);
} }
@@ -5252,13 +5244,12 @@ async function main() {
case 'init': { case 'init': {
const workflow = args[1]; const workflow = args[1];
const includes = parseIncludeFlag(args);
switch (workflow) { switch (workflow) {
case 'execute-phase': case 'execute-phase':
cmdInitExecutePhase(cwd, args[2], includes, raw); cmdInitExecutePhase(cwd, args[2], raw);
break; break;
case 'plan-phase': case 'plan-phase':
cmdInitPlanPhase(cwd, args[2], includes, raw); cmdInitPlanPhase(cwd, args[2], raw);
break; break;
case 'new-project': case 'new-project':
cmdInitNewProject(cwd, raw); cmdInitNewProject(cwd, raw);
@@ -5288,7 +5279,7 @@ async function main() {
cmdInitMapCodebase(cwd, raw); cmdInitMapCodebase(cwd, raw);
break; break;
case 'progress': case 'progress':
cmdInitProgress(cwd, includes, raw); cmdInitProgress(cwd, raw);
break; break;
default: default:
error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress`); error(`Unknown init workflow: ${workflow}\nAvailable: execute-phase, plan-phase, new-project, new-milestone, quick, resume, verify-work, phase-op, todos, milestone-op, map-codebase, progress`);

View File

@@ -1098,10 +1098,10 @@ key-decisions:
}); });
// ───────────────────────────────────────────────────────────────────────────── // ─────────────────────────────────────────────────────────────────────────────
// init --include flag tests // init commands tests
// ───────────────────────────────────────────────────────────────────────────── // ─────────────────────────────────────────────────────────────────────────────
describe('init commands with --include flag', () => { describe('init commands', () => {
let tmpDir; let tmpDir;
beforeEach(() => { beforeEach(() => {
@@ -1112,127 +1112,83 @@ describe('init commands with --include flag', () => {
cleanup(tmpDir); cleanup(tmpDir);
}); });
test('init execute-phase includes state and config content', () => { test('init execute-phase returns file paths', () => {
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api'); const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
fs.mkdirSync(phaseDir, { recursive: true }); fs.mkdirSync(phaseDir, { recursive: true });
fs.writeFileSync(path.join(phaseDir, '03-01-PLAN.md'), '# Plan'); fs.writeFileSync(path.join(phaseDir, '03-01-PLAN.md'), '# Plan');
fs.writeFileSync(
path.join(tmpDir, '.planning', 'STATE.md'),
'# State\n\n**Current Phase:** 03\n**Status:** In progress'
);
fs.writeFileSync(
path.join(tmpDir, '.planning', 'config.json'),
JSON.stringify({ model_profile: 'balanced' })
);
const result = runGsdTools('init execute-phase 03 --include state,config', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.ok(output.state_content, 'state_content should be included');
assert.ok(output.state_content.includes('Current Phase'), 'state content correct');
assert.ok(output.config_content, 'config_content should be included');
assert.ok(output.config_content.includes('model_profile'), 'config content correct');
});
test('init execute-phase without --include omits content', () => {
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
fs.mkdirSync(phaseDir, { recursive: true });
fs.writeFileSync(path.join(phaseDir, '03-01-PLAN.md'), '# Plan');
fs.writeFileSync(path.join(tmpDir, '.planning', 'STATE.md'), '# State');
const result = runGsdTools('init execute-phase 03', tmpDir); const result = runGsdTools('init execute-phase 03', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`); assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output); const output = JSON.parse(result.output);
assert.strictEqual(output.state_content, undefined, 'state_content should be omitted'); assert.strictEqual(output.state_path, '.planning/STATE.md');
assert.strictEqual(output.config_content, undefined, 'config_content should be omitted'); assert.strictEqual(output.roadmap_path, '.planning/ROADMAP.md');
assert.strictEqual(output.config_path, '.planning/config.json');
}); });
test('init plan-phase includes multiple file contents', () => { test('init plan-phase returns file paths', () => {
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api'); const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
fs.mkdirSync(phaseDir, { recursive: true }); fs.mkdirSync(phaseDir, { recursive: true });
fs.writeFileSync(path.join(tmpDir, '.planning', 'STATE.md'), '# Project State');
fs.writeFileSync(path.join(tmpDir, '.planning', 'ROADMAP.md'), '# Roadmap v1.0');
fs.writeFileSync(path.join(tmpDir, '.planning', 'REQUIREMENTS.md'), '# Requirements');
fs.writeFileSync(path.join(phaseDir, '03-CONTEXT.md'), '# Phase Context'); fs.writeFileSync(path.join(phaseDir, '03-CONTEXT.md'), '# Phase Context');
fs.writeFileSync(path.join(phaseDir, '03-RESEARCH.md'), '# Research Findings'); fs.writeFileSync(path.join(phaseDir, '03-RESEARCH.md'), '# Research Findings');
fs.writeFileSync(path.join(phaseDir, '03-VERIFICATION.md'), '# Verification');
fs.writeFileSync(path.join(phaseDir, '03-UAT.md'), '# UAT');
const result = runGsdTools('init plan-phase 03 --include state,roadmap,requirements,context,research', tmpDir); const result = runGsdTools('init plan-phase 03', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`); assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output); const output = JSON.parse(result.output);
assert.ok(output.state_content, 'state_content included'); assert.strictEqual(output.state_path, '.planning/STATE.md');
assert.ok(output.state_content.includes('Project State'), 'state content correct'); assert.strictEqual(output.roadmap_path, '.planning/ROADMAP.md');
assert.ok(output.roadmap_content, 'roadmap_content included'); assert.strictEqual(output.requirements_path, '.planning/REQUIREMENTS.md');
assert.ok(output.roadmap_content.includes('Roadmap v1.0'), 'roadmap content correct'); assert.strictEqual(output.context_path, '.planning/phases/03-api/03-CONTEXT.md');
assert.ok(output.requirements_content, 'requirements_content included'); assert.strictEqual(output.research_path, '.planning/phases/03-api/03-RESEARCH.md');
assert.ok(output.context_content, 'context_content included'); assert.strictEqual(output.verification_path, '.planning/phases/03-api/03-VERIFICATION.md');
assert.ok(output.research_content, 'research_content included'); assert.strictEqual(output.uat_path, '.planning/phases/03-api/03-UAT.md');
}); });
test('init plan-phase includes verification and uat content', () => { test('init progress returns file paths', () => {
const result = runGsdTools('init progress', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.strictEqual(output.state_path, '.planning/STATE.md');
assert.strictEqual(output.roadmap_path, '.planning/ROADMAP.md');
assert.strictEqual(output.project_path, '.planning/PROJECT.md');
assert.strictEqual(output.config_path, '.planning/config.json');
});
test('init phase-op returns core and optional phase file paths', () => {
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api'); const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
fs.mkdirSync(phaseDir, { recursive: true }); fs.mkdirSync(phaseDir, { recursive: true });
fs.writeFileSync(path.join(phaseDir, '03-VERIFICATION.md'), '# Verification Results'); fs.writeFileSync(path.join(phaseDir, '03-CONTEXT.md'), '# Phase Context');
fs.writeFileSync(path.join(phaseDir, '03-UAT.md'), '# UAT Findings'); fs.writeFileSync(path.join(phaseDir, '03-RESEARCH.md'), '# Research');
fs.writeFileSync(path.join(phaseDir, '03-VERIFICATION.md'), '# Verification');
fs.writeFileSync(path.join(phaseDir, '03-UAT.md'), '# UAT');
const result = runGsdTools('init plan-phase 03 --include verification,uat', tmpDir); const result = runGsdTools('init phase-op 03', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`); assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output); const output = JSON.parse(result.output);
assert.ok(output.verification_content, 'verification_content included'); assert.strictEqual(output.state_path, '.planning/STATE.md');
assert.ok(output.verification_content.includes('Verification Results'), 'verification content correct'); assert.strictEqual(output.roadmap_path, '.planning/ROADMAP.md');
assert.ok(output.uat_content, 'uat_content included'); assert.strictEqual(output.requirements_path, '.planning/REQUIREMENTS.md');
assert.ok(output.uat_content.includes('UAT Findings'), 'uat content correct'); assert.strictEqual(output.context_path, '.planning/phases/03-api/03-CONTEXT.md');
assert.strictEqual(output.research_path, '.planning/phases/03-api/03-RESEARCH.md');
assert.strictEqual(output.verification_path, '.planning/phases/03-api/03-VERIFICATION.md');
assert.strictEqual(output.uat_path, '.planning/phases/03-api/03-UAT.md');
}); });
test('init progress includes state, roadmap, project, config', () => { test('init plan-phase omits optional paths if files missing', () => {
fs.writeFileSync(path.join(tmpDir, '.planning', 'STATE.md'), '# State');
fs.writeFileSync(path.join(tmpDir, '.planning', 'ROADMAP.md'), '# Roadmap');
fs.writeFileSync(path.join(tmpDir, '.planning', 'PROJECT.md'), '# Project');
fs.writeFileSync(
path.join(tmpDir, '.planning', 'config.json'),
JSON.stringify({ model_profile: 'quality' })
);
const result = runGsdTools('init progress --include state,roadmap,project,config', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.ok(output.state_content, 'state_content included');
assert.ok(output.roadmap_content, 'roadmap_content included');
assert.ok(output.project_content, 'project_content included');
assert.ok(output.config_content, 'config_content included');
});
test('missing files return null in content fields', () => {
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api'); const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
fs.mkdirSync(phaseDir, { recursive: true }); fs.mkdirSync(phaseDir, { recursive: true });
fs.writeFileSync(path.join(phaseDir, '03-01-PLAN.md'), '# Plan');
const result = runGsdTools('init execute-phase 03 --include state,config', tmpDir); const result = runGsdTools('init plan-phase 03', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`); assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output); const output = JSON.parse(result.output);
assert.strictEqual(output.state_content, null, 'missing state returns null'); assert.strictEqual(output.context_path, undefined);
assert.strictEqual(output.config_content, null, 'missing config returns null'); assert.strictEqual(output.research_path, undefined);
});
test('partial includes work correctly', () => {
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
fs.mkdirSync(phaseDir, { recursive: true });
fs.writeFileSync(path.join(phaseDir, '03-01-PLAN.md'), '# Plan');
fs.writeFileSync(path.join(tmpDir, '.planning', 'STATE.md'), '# State');
fs.writeFileSync(path.join(tmpDir, '.planning', 'ROADMAP.md'), '# Roadmap');
// Only request state, not roadmap
const result = runGsdTools('init execute-phase 03 --include state', tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const output = JSON.parse(result.output);
assert.ok(output.state_content, 'state_content included');
assert.strictEqual(output.roadmap_content, undefined, 'roadmap_content not requested, should be undefined');
}); });
}); });

View File

@@ -79,7 +79,7 @@ For each gap, fill the debug-subagent-prompt template and spawn:
``` ```
Task( Task(
prompt=filled_debug_subagent_prompt, prompt=filled_debug_subagent_prompt + "\n\n<files_to_read>\n- {phase_dir}/{phase_num}-UAT.md\n- .planning/STATE.md\n</files_to_read>",
subagent_type="general-purpose", subagent_type="general-purpose",
description="Debug: {truth_short}" description="Debug: {truth_short}"
) )

View File

@@ -118,11 +118,11 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
<files_to_read> <files_to_read>
Read these files at execution start using the Read tool: Read these files at execution start using the Read tool:
- Plan: {phase_dir}/{plan_file} - {phase_dir}/{plan_file} (Plan)
- State: .planning/STATE.md - .planning/STATE.md (State)
- Config: .planning/config.json (if exists) - .planning/config.json (Config, if exists)
- Project instructions: ./CLAUDE.md (if exists — follow project-specific guidelines and coding conventions) - ./CLAUDE.md (Project instructions, if exists — follow project-specific guidelines and coding conventions)
- Project skills: .agents/skills/ (if exists — list skills, read SKILL.md for each, follow relevant rules during implementation) - .agents/skills/ (Project skills, if exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
</files_to_read> </files_to_read>
<success_criteria> <success_criteria>
@@ -375,7 +375,7 @@ The CLI handles:
Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`. Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
```bash ```bash
node ~/.claude/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 node ~/.claude/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
``` ```
</step> </step>

View File

@@ -12,19 +12,13 @@ Read config.json for planning behavior settings.
<process> <process>
<step name="init_context" priority="first"> <step name="init_context" priority="first">
Load execution context (uses `init execute-phase` for full context, including file contents): Load execution context (paths only to minimize orchestrator context):
```bash ```bash
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}" --include state,config) INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init execute-phase "${PHASE}")
``` ```
Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`. Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`, `state_path`, `config_path`.
**File contents (from --include):** `state_content`, `config_content`. Access with:
```bash
STATE_CONTENT=$(echo "$INIT" | jq -r '.state_content // empty')
CONFIG_CONTENT=$(echo "$INIT" | jq -r '.config_content // empty')
```
If `.planning/` missing: error. If `.planning/` missing: error.
</step> </step>
@@ -40,7 +34,7 @@ Find first PLAN without matching SUMMARY. Decimal phases supported (`01.1-hotfix
```bash ```bash
PHASE=$(echo "$PLAN_PATH" | grep -oE '[0-9]+(\.[0-9]+)?-[0-9]+') PHASE=$(echo "$PLAN_PATH" | grep -oE '[0-9]+(\.[0-9]+)?-[0-9]+')
# config_content already loaded via --include config in init_context # config settings can be fetched via gsd-tools config-get if needed
``` ```
<if mode="yolo"> <if mode="yolo">

View File

@@ -128,7 +128,9 @@ Focus ONLY on what's needed for the NEW features.
<question>{QUESTION}</question> <question>{QUESTION}</question>
<project_context>[PROJECT.md summary]</project_context> <files_to_read>
- .planning/PROJECT.md (Project context)
</files_to_read>
<downstream_consumer>{CONSUMER}</downstream_consumer> <downstream_consumer>{CONSUMER}</downstream_consumer>
@@ -157,7 +159,12 @@ After all 4 complete, spawn synthesizer:
Task(prompt=" Task(prompt="
Synthesize research outputs into SUMMARY.md. Synthesize research outputs into SUMMARY.md.
Read: .planning/research/STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md <files_to_read>
- .planning/research/STACK.md
- .planning/research/FEATURES.md
- .planning/research/ARCHITECTURE.md
- .planning/research/PITFALLS.md
</files_to_read>
Write to: .planning/research/SUMMARY.md Write to: .planning/research/SUMMARY.md
Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md Use template: ~/.claude/get-shit-done/templates/research-project/SUMMARY.md
@@ -264,11 +271,13 @@ node ~/.claude/get-shit-done/bin/gsd-tools.cjs commit "docs: define milestone v[
``` ```
Task(prompt=" Task(prompt="
<planning_context> <planning_context>
@.planning/PROJECT.md <files_to_read>
@.planning/REQUIREMENTS.md - .planning/PROJECT.md
@.planning/research/SUMMARY.md (if exists) - .planning/REQUIREMENTS.md
@.planning/config.json - .planning/research/SUMMARY.md (if exists)
@.planning/MILESTONES.md - .planning/config.json
- .planning/MILESTONES.md
</files_to_read>
</planning_context> </planning_context>
<instructions> <instructions>

View File

@@ -49,7 +49,7 @@ The document should describe what you want to build.
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init new-project) INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init new-project)
``` ```
Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`. Parse JSON for: `researcher_model`, `synthesizer_model`, `roadmapper_model`, `commit_docs`, `project_exists`, `has_codebase_map`, `planning_exists`, `has_existing_code`, `has_package_file`, `is_brownfield`, `needs_codebase_map`, `has_git`, `project_path`.
**If `project_exists` is true:** Error — project already initialized. Use `/gsd:progress`. **If `project_exists` is true:** Error — project already initialized. Use `/gsd:progress`.
@@ -541,7 +541,7 @@ Display spawning indicator:
→ Pitfalls research → Pitfalls research
``` ```
Spawn 4 parallel gsd-project-researcher agents with rich context: Spawn 4 parallel gsd-project-researcher agents with path references:
``` ```
Task(prompt="First, read ~/.claude/agents/gsd-project-researcher.md for your role and instructions. Task(prompt="First, read ~/.claude/agents/gsd-project-researcher.md for your role and instructions.
@@ -561,9 +561,9 @@ Subsequent: Research what's needed to add [target features] to an existing [doma
What's the standard 2025 stack for [domain]? What's the standard 2025 stack for [domain]?
</question> </question>
<project_context> <files_to_read>
[PROJECT.md summary - core value, constraints, what they're building] - {project_path} (Project context and goals)
</project_context> </files_to_read>
<downstream_consumer> <downstream_consumer>
Your STACK.md feeds into roadmap creation. Be prescriptive: Your STACK.md feeds into roadmap creation. Be prescriptive:
@@ -601,9 +601,9 @@ Subsequent: How do [target features] typically work? What's expected behavior?
What features do [domain] products have? What's table stakes vs differentiating? What features do [domain] products have? What's table stakes vs differentiating?
</question> </question>
<project_context> <files_to_read>
[PROJECT.md summary] - {project_path} (Project context)
</project_context> </files_to_read>
<downstream_consumer> <downstream_consumer>
Your FEATURES.md feeds into requirements definition. Categorize clearly: Your FEATURES.md feeds into requirements definition. Categorize clearly:
@@ -641,9 +641,9 @@ Subsequent: How do [target features] integrate with existing [domain] architectu
How are [domain] systems typically structured? What are major components? How are [domain] systems typically structured? What are major components?
</question> </question>
<project_context> <files_to_read>
[PROJECT.md summary] - {project_path} (Project context)
</project_context> </files_to_read>
<downstream_consumer> <downstream_consumer>
Your ARCHITECTURE.md informs phase structure in roadmap. Include: Your ARCHITECTURE.md informs phase structure in roadmap. Include:
@@ -681,9 +681,9 @@ Subsequent: What are common mistakes when adding [target features] to [domain]?
What do [domain] projects commonly get wrong? Critical mistakes? What do [domain] projects commonly get wrong? Critical mistakes?
</question> </question>
<project_context> <files_to_read>
[PROJECT.md summary] - {project_path} (Project context)
</project_context> </files_to_read>
<downstream_consumer> <downstream_consumer>
Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall: Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
@@ -713,13 +713,12 @@ Task(prompt="
Synthesize research outputs into SUMMARY.md. Synthesize research outputs into SUMMARY.md.
</task> </task>
<research_files> <files_to_read>
Read these files:
- .planning/research/STACK.md - .planning/research/STACK.md
- .planning/research/FEATURES.md - .planning/research/FEATURES.md
- .planning/research/ARCHITECTURE.md - .planning/research/ARCHITECTURE.md
- .planning/research/PITFALLS.md - .planning/research/PITFALLS.md
</research_files> </files_to_read>
<output> <output>
Write to: .planning/research/SUMMARY.md Write to: .planning/research/SUMMARY.md
@@ -902,23 +901,18 @@ Display stage banner:
◆ Spawning roadmapper... ◆ Spawning roadmapper...
``` ```
Spawn gsd-roadmapper agent with context: Spawn gsd-roadmapper agent with path references:
``` ```
Task(prompt=" Task(prompt="
<planning_context> <planning_context>
**Project:** <files_to_read>
@.planning/PROJECT.md - .planning/PROJECT.md (Project context)
- .planning/REQUIREMENTS.md (v1 Requirements)
**Requirements:** - .planning/research/SUMMARY.md (Research findings - if exists)
@.planning/REQUIREMENTS.md - .planning/config.json (Depth and mode settings)
</files_to_read>
**Research (if exists):**
@.planning/research/SUMMARY.md
**Config:**
@.planning/config.json
</planning_context> </planning_context>
@@ -1006,7 +1000,9 @@ Use AskUserQuestion:
User feedback on roadmap: User feedback on roadmap:
[user's notes] [user's notes]
Current ROADMAP.md: @.planning/ROADMAP.md <files_to_read>
- .planning/ROADMAP.md (Current roadmap to revise)
</files_to_read>
Update the roadmap based on feedback. Edit files in place. Update the roadmap based on feedback. Edit files in place.
Return ROADMAP REVISED with changes made. Return ROADMAP REVISED with changes made.

View File

@@ -12,23 +12,15 @@ Read all files referenced by the invoking prompt's execution_context before star
## 1. Initialize ## 1. Initialize
Load all context in one call (include file contents to avoid redundant reads): Load all context in one call (paths only to minimize orchestrator context):
```bash ```bash
INIT_RAW=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init plan-phase "$PHASE" --include state,roadmap,requirements,context,research,verification,uat) INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init plan-phase "$PHASE")
# Large payloads are written to a tmpfile — output starts with @file:/path
if [[ "$INIT_RAW" == @file:* ]]; then
INIT_FILE="${INIT_RAW#@file:}"
INIT=$(cat "$INIT_FILE")
rm -f "$INIT_FILE"
else
INIT="$INIT_RAW"
fi
``` ```
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`. 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`.
**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. **File paths (for <files_to_read> blocks):** `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`, `verification_path`, `uat_path`. These are null if files don't exist.
**If `planning_exists` is false:** Error — run `/gsd:new-project` first. **If `planning_exists` is false:** Error — run `/gsd:new-project` first.
@@ -55,13 +47,11 @@ PHASE_INFO=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "$
## 4. Load CONTEXT.md ## 4. Load CONTEXT.md
Use `context_content` from init JSON (already loaded via `--include context`). Check `context_path` from init JSON.
**CRITICAL:** Use `context_content` from INIT — pass to researcher, planner, checker, and revision agents. If `context_path` is not null, display: `Using phase context from: ${context_path}`
If `context_content` is not null, display: `Using phase context from: ${PHASE_DIR}/*-CONTEXT.md` **If `context_path` is null (no CONTEXT.md exists):**
**If `context_content` is null (no CONTEXT.md exists):**
Use AskUserQuestion: Use AskUserQuestion:
- header: "No context" - header: "No context"
@@ -94,11 +84,7 @@ Display banner:
```bash ```bash
PHASE_DESC=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section') PHASE_DESC=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section')
# Use requirements_content from INIT (already loaded via --include requirements) PHASE_REQ_IDS=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}" | jq -r '.section // empty' | grep -i "Requirements:" | head -1 | sed 's/.*Requirements:\*\*\s*//' | sed 's/[\[\]]//g' | tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep -v '^$' | tr '\n' ',' | sed 's/,$//')
REQUIREMENTS=$(echo "$INIT" | jq -r '.requirements_content // empty' | grep -A100 "## Requirements" | head -50)
PHASE_REQ_IDS=$(echo "$INIT" | jq -r '.roadmap_content // empty' | grep -i "Requirements:" | head -1 | sed 's/.*Requirements:\*\*\s*//' | sed 's/[\[\]]//g' | tr ',' '\n' | sed 's/^ *//;s/ *$//' | grep -v '^$' | tr '\n' ',' | sed 's/,$//')
STATE_SNAP=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs state-snapshot)
# Extract decisions from state-snapshot JSON: jq '.decisions[] | "\(.phase): \(.summary) - \(.rationale)"'
``` ```
Research prompt: Research prompt:
@@ -109,20 +95,15 @@ Research how to implement Phase {phase_number}: {phase_name}
Answer: "What do I need to know to PLAN this phase well?" Answer: "What do I need to know to PLAN this phase well?"
</objective> </objective>
<phase_context> <files_to_read>
IMPORTANT: If CONTEXT.md exists below, it contains user decisions from /gsd:discuss-phase. - {context_path} (USER DECISIONS from /gsd:discuss-phase)
- **Decisions** = Locked — research THESE deeply, no alternatives - {requirements_path} (Project requirements)
- **Claude's Discretion** = Freedom areas — research options, recommend - {state_path} (Project decisions and history)
- **Deferred Ideas** = Out of scope — ignore </files_to_read>
{context_content}
</phase_context>
<additional_context> <additional_context>
**Phase description:** {phase_description} **Phase description:** {phase_description}
**Phase requirement IDs (MUST address):** {phase_req_ids} **Phase requirement IDs (MUST address):** {phase_req_ids}
**Requirements:** {requirements}
**Prior decisions:** {decisions}
**Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines **Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
**Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, research should account for project skill patterns **Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, research should account for project skill patterns
@@ -155,19 +136,18 @@ ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null
**If exists:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch. **If exists:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch.
## 7. Use Context Files from INIT ## 7. Use Context Paths from INIT
All file contents are already loaded via `--include` in step 1 (`@` syntax doesn't work across Task() boundaries): Extract from INIT JSON:
```bash ```bash
# Extract from INIT JSON (no need to re-read files) STATE_PATH=$(echo "$INIT" | jq -r '.state_path // empty')
STATE_CONTENT=$(echo "$INIT" | jq -r '.state_content // empty') ROADMAP_PATH=$(echo "$INIT" | jq -r '.roadmap_path // empty')
ROADMAP_CONTENT=$(echo "$INIT" | jq -r '.roadmap_content // empty') REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty')
REQUIREMENTS_CONTENT=$(echo "$INIT" | jq -r '.requirements_content // empty') RESEARCH_PATH=$(echo "$INIT" | jq -r '.research_path // empty')
RESEARCH_CONTENT=$(echo "$INIT" | jq -r '.research_content // empty') VERIFICATION_PATH=$(echo "$INIT" | jq -r '.verification_path // empty')
VERIFICATION_CONTENT=$(echo "$INIT" | jq -r '.verification_content // empty') UAT_PATH=$(echo "$INIT" | jq -r '.uat_path // empty')
UAT_CONTENT=$(echo "$INIT" | jq -r '.uat_content // empty') CONTEXT_PATH=$(echo "$INIT" | jq -r '.context_path // empty')
CONTEXT_CONTENT=$(echo "$INIT" | jq -r '.context_content // empty')
``` ```
## 8. Spawn gsd-planner Agent ## 8. Spawn gsd-planner Agent
@@ -188,21 +168,17 @@ Planner prompt:
**Phase:** {phase_number} **Phase:** {phase_number}
**Mode:** {standard | gap_closure} **Mode:** {standard | gap_closure}
**Project State:** {state_content} <files_to_read>
**Roadmap:** {roadmap_content} - {state_path} (Project State)
- {roadmap_path} (Roadmap)
- {requirements_path} (Requirements)
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
- {research_path} (Technical Research)
- {verification_path} (Verification Gaps - if --gaps)
- {uat_path} (UAT Gaps - if --gaps)
</files_to_read>
**Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids} **Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
**Requirements:** {requirements_content}
**Phase Context:**
IMPORTANT: If context exists below, it contains USER DECISIONS from /gsd:discuss-phase.
- **Decisions** = LOCKED — honor exactly, do not revisit
- **Claude's Discretion** = Freedom — make implementation choices
- **Deferred Ideas** = Out of scope — do NOT include
{context_content}
**Research:** {research_content}
**Gap Closure (if --gaps):** {verification_content} {uat_content}
**Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines **Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
**Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, plans should account for project skill rules **Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, plans should account for project skill rules
@@ -252,10 +228,6 @@ Display banner:
◆ Spawning plan checker... ◆ Spawning plan checker...
``` ```
```bash
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
```
Checker prompt: Checker prompt:
```markdown ```markdown
@@ -263,17 +235,14 @@ Checker prompt:
**Phase:** {phase_number} **Phase:** {phase_number}
**Phase Goal:** {goal from ROADMAP} **Phase Goal:** {goal from ROADMAP}
**Plans to verify:** {plans_content} <files_to_read>
- {PHASE_DIR}/*-PLAN.md (Plans to verify)
- {roadmap_path} (Roadmap)
- {requirements_path} (Requirements)
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
</files_to_read>
**Phase requirement IDs (MUST ALL be covered):** {phase_req_ids} **Phase requirement IDs (MUST ALL be covered):** {phase_req_ids}
**Requirements:** {requirements_content}
**Phase Context:**
IMPORTANT: Plans MUST honor user decisions. Flag as issue if plans contradict.
- **Decisions** = LOCKED — plans must implement exactly
- **Claude's Discretion** = Freedom areas — plans can choose approach
- **Deferred Ideas** = Out of scope — plans must NOT include
{context_content}
**Project instructions:** Read ./CLAUDE.md if exists — verify plans honor project guidelines **Project instructions:** Read ./CLAUDE.md if exists — verify plans honor project guidelines
**Project skills:** Check .agents/skills/ directory (if exists) — verify plans account for project skill rules **Project skills:** Check .agents/skills/ directory (if exists) — verify plans account for project skill rules
@@ -307,10 +276,6 @@ Track `iteration_count` (starts at 1 after initial plan + check).
Display: `Sending back to planner for revision... (iteration {N}/3)` Display: `Sending back to planner for revision... (iteration {N}/3)`
```bash
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
```
Revision prompt: Revision prompt:
```markdown ```markdown
@@ -318,12 +283,12 @@ Revision prompt:
**Phase:** {phase_number} **Phase:** {phase_number}
**Mode:** revision **Mode:** revision
**Existing plans:** {plans_content} <files_to_read>
**Checker issues:** {structured_issues_from_checker} - {PHASE_DIR}/*-PLAN.md (Existing plans)
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
</files_to_read>
**Phase Context:** **Checker issues:** {structured_issues_from_checker}
Revisions MUST still honor user decisions.
{context_content}
</revision_context> </revision_context>
<instructions> <instructions>

View File

@@ -9,23 +9,13 @@ Read all files referenced by the invoking prompt's execution_context before star
<process> <process>
<step name="init_context"> <step name="init_context">
**Load progress context (with file contents to avoid redundant reads):** **Load progress context (paths only):**
```bash ```bash
INIT_RAW=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init progress --include state,roadmap,project,config) INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init progress)
# Large payloads are written to a tmpfile — output starts with @file:/path
if [[ "$INIT_RAW" == @file:* ]]; then
INIT_FILE="${INIT_RAW#@file:}"
INIT=$(cat "$INIT_FILE")
rm -f "$INIT_FILE"
else
INIT="$INIT_RAW"
fi
``` ```
Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`. Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`, `state_path`, `roadmap_path`, `project_path`, `config_path`.
**File contents (from --include):** `state_content`, `roadmap_content`, `project_content`, `config_content`. These are null if files don't exist.
If `project_exists` is false (no `.planning/` directory): If `project_exists` is false (no `.planning/` directory):
@@ -47,15 +37,13 @@ If missing both ROADMAP.md and PROJECT.md: suggest `/gsd:new-project`.
</step> </step>
<step name="load"> <step name="load">
**Use project context from INIT:** **Use structured extraction from gsd-tools:**
All file contents are already loaded via `--include` in init_context step: Instead of reading full files, use targeted tools to get only the data needed for the report:
- `state_content` — living memory (position, decisions, issues) - `ROADMAP=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap analyze)`
- `roadmap_content` — phase structure and objectives - `STATE=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs state-snapshot)`
- `project_content` — current state (What This Is, Core Value, Requirements)
- `config_content` — settings (model_profile, workflow toggles)
No additional file reads needed. This minimizes orchestrator context usage.
</step> </step>
<step name="analyze_roadmap"> <step name="analyze_roadmap">
@@ -89,9 +77,8 @@ Use this instead of manually reading/parsing ROADMAP.md.
<step name="position"> <step name="position">
**Parse current position from init context and roadmap analysis:** **Parse current position from init context and roadmap analysis:**
- Use `current_phase` and `next_phase` from roadmap analyze - Use `current_phase` and `next_phase` from `$ROADMAP`
- Use phase-level `has_context` and `has_research` flags from analyze - Note `paused_at` if work was paused (from `$STATE`)
- Note `paused_at` if work was paused (from init context)
- Count pending todos: use `init todos` or `list-todos` - Count pending todos: use `init todos` or `list-todos`
- Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l` - Check for active debug sessions: `ls .planning/debug/*.md 2>/dev/null | grep -v resolved | wc -l`
</step> </step>
@@ -122,11 +109,12 @@ Plan [M] of [phase-total]: [status]
CONTEXT: [✓ if has_context | - if not] CONTEXT: [✓ if has_context | - if not]
## Key Decisions Made ## Key Decisions Made
- [decision 1 from STATE.md] - [extract from $STATE.decisions[]]
- [decision 2] - [e.g. jq -r '.decisions[].decision' from state-snapshot]
## Blockers/Concerns ## Blockers/Concerns
- [any blockers or concerns from STATE.md] - [extract from $STATE.blockers[]]
- [e.g. jq -r '.blockers[].text' from state-snapshot]
## Pending Todos ## Pending Todos
- [count] pending — /gsd:check-todos to review - [count] pending — /gsd:check-todos to review

View File

@@ -96,10 +96,11 @@ Task(
**Directory:** ${QUICK_DIR} **Directory:** ${QUICK_DIR}
**Description:** ${DESCRIPTION} **Description:** ${DESCRIPTION}
**Project State:** <files_to_read>
@.planning/STATE.md - .planning/STATE.md (Project State)
- ./CLAUDE.md (if exists — follow project-specific guidelines)
</files_to_read>
**Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
**Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, plans should account for project skill rules **Project skills:** Check .agents/skills/ directory (if exists) — read SKILL.md files, plans should account for project skill rules
</planning_context> </planning_context>
@@ -146,10 +147,6 @@ Display banner:
◆ Spawning plan checker... ◆ Spawning plan checker...
``` ```
```bash
PLAN_CONTENT=$(cat "${QUICK_DIR}/${next_num}-PLAN.md" 2>/dev/null)
```
Checker prompt: Checker prompt:
```markdown ```markdown
@@ -157,7 +154,9 @@ Checker prompt:
**Mode:** quick-full **Mode:** quick-full
**Task Description:** ${DESCRIPTION} **Task Description:** ${DESCRIPTION}
**Plan to verify:** ${PLAN_CONTENT} <files_to_read>
- ${QUICK_DIR}/${next_num}-PLAN.md (Plan to verify)
</files_to_read>
**Scope:** This is a quick task, not a full phase. Skip checks that require a ROADMAP phase goal. **Scope:** This is a quick task, not a full phase. Skip checks that require a ROADMAP phase goal.
</verification_context> </verification_context>
@@ -200,17 +199,16 @@ Track `iteration_count` (starts at 1 after initial plan + check).
Display: `Sending back to planner for revision... (iteration ${N}/2)` Display: `Sending back to planner for revision... (iteration ${N}/2)`
```bash
PLAN_CONTENT=$(cat "${QUICK_DIR}/${next_num}-PLAN.md" 2>/dev/null)
```
Revision prompt: Revision prompt:
```markdown ```markdown
<revision_context> <revision_context>
**Mode:** quick-full (revision) **Mode:** quick-full (revision)
**Existing plan:** ${PLAN_CONTENT} <files_to_read>
- ${QUICK_DIR}/${next_num}-PLAN.md (Existing plan)
</files_to_read>
**Checker issues:** ${structured_issues_from_checker} **Checker issues:** ${structured_issues_from_checker}
</revision_context> </revision_context>
@@ -250,10 +248,12 @@ Task(
prompt=" prompt="
Execute quick task ${next_num}. Execute quick task ${next_num}.
Plan: @${QUICK_DIR}/${next_num}-PLAN.md <files_to_read>
Project state: @.planning/STATE.md - ${QUICK_DIR}/${next_num}-PLAN.md (Plan)
Project instructions: ./CLAUDE.md (if exists — follow project-specific guidelines) - .planning/STATE.md (Project state)
Project skills: .agents/skills/ (if exists — list skills, read SKILL.md for each, follow relevant rules during implementation) - ./CLAUDE.md (Project instructions, if exists)
- .agents/skills/ (Project skills, if exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
</files_to_read>
<constraints> <constraints>
- Execute all tasks in the plan - Execute all tasks in the plan
@@ -299,7 +299,11 @@ Task(
prompt="Verify quick task goal achievement. prompt="Verify quick task goal achievement.
Task directory: ${QUICK_DIR} Task directory: ${QUICK_DIR}
Task goal: ${DESCRIPTION} Task goal: ${DESCRIPTION}
Plan: @${QUICK_DIR}/${next_num}-PLAN.md
<files_to_read>
- ${QUICK_DIR}/${next_num}-PLAN.md (Plan)
</files_to_read>
Check must_haves against actual codebase. Create VERIFICATION.md at ${QUICK_DIR}/${next_num}-VERIFICATION.md.", Check must_haves against actual codebase. Create VERIFICATION.md at ${QUICK_DIR}/${next_num}-VERIFICATION.md.",
subagent_type="gsd-verifier", subagent_type="gsd-verifier",
model="{verifier_model}", model="{verifier_model}",

View File

@@ -34,12 +34,8 @@ If exists: Offer update/view/skip options.
## Step 3: Gather Phase Context ## Step 3: Gather Phase Context
```bash ```bash
# Phase section from roadmap (already loaded in PHASE_INFO) INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init phase-op "${PHASE}")
echo "$PHASE_INFO" | jq -r '.section' # Extract: phase_dir, padded_phase, phase_number, state_path, requirements_path, context_path
cat .planning/REQUIREMENTS.md 2>/dev/null
cat .planning/phases/${PHASE}-*/*-CONTEXT.md 2>/dev/null
# Decisions from state-snapshot (structured JSON)
node ~/.claude/get-shit-done/bin/gsd-tools.cjs state-snapshot | jq '.decisions'
``` ```
## Step 4: Spawn Researcher ## Step 4: Spawn Researcher
@@ -50,12 +46,15 @@ Task(
Research implementation approach for Phase {phase}: {name} Research implementation approach for Phase {phase}: {name}
</objective> </objective>
<context> <files_to_read>
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
- {requirements_path} (Project requirements)
- {state_path} (Project decisions and history)
</files_to_read>
<additional_context>
Phase description: {description} Phase description: {description}
Requirements: {requirements} </additional_context>
Prior decisions: {decisions}
Phase context: {context_md}
</context>
<output> <output>
Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md

View File

@@ -365,14 +365,11 @@ Task(
**Phase:** {phase_number} **Phase:** {phase_number}
**Mode:** gap_closure **Mode:** gap_closure
**UAT with diagnoses:** <files_to_read>
@.planning/phases/{phase_dir}/{phase_num}-UAT.md - {phase_dir}/{phase_num}-UAT.md (UAT with diagnoses)
- .planning/STATE.md (Project State)
**Project State:** - .planning/ROADMAP.md (Roadmap)
@.planning/STATE.md </files_to_read>
**Roadmap:**
@.planning/ROADMAP.md
</planning_context> </planning_context>
@@ -416,8 +413,9 @@ Task(
**Phase:** {phase_number} **Phase:** {phase_number}
**Phase Goal:** Close diagnosed gaps from UAT **Phase Goal:** Close diagnosed gaps from UAT
**Plans to verify:** <files_to_read>
@.planning/phases/{phase_dir}/*-PLAN.md - {phase_dir}/*-PLAN.md (Plans to verify)
</files_to_read>
</verification_context> </verification_context>
@@ -455,8 +453,9 @@ Task(
**Phase:** {phase_number} **Phase:** {phase_number}
**Mode:** revision **Mode:** revision
**Existing plans:** <files_to_read>
@.planning/phases/{phase_dir}/*-PLAN.md - {phase_dir}/*-PLAN.md (Existing plans)
</files_to_read>
**Checker issues:** **Checker issues:**
{structured_issues_from_checker} {structured_issues_from_checker}