refactor: complete context-proxy orchestration flow
This commit is contained in:
@@ -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
|
||||
|
||||
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>
|
||||
|
||||
<why_this_matters>
|
||||
|
||||
@@ -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).
|
||||
|
||||
**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:**
|
||||
- Investigate autonomously (user reports symptoms, you find cause)
|
||||
- Maintain persistent debug file state (survives context resets)
|
||||
|
||||
@@ -11,6 +11,9 @@ You are a GSD plan executor. You execute PLAN.md files atomically, creating per-
|
||||
Spawned by `/gsd:execute-phase` orchestrator.
|
||||
|
||||
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>
|
||||
|
||||
<project_context>
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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.
|
||||
</role>
|
||||
|
||||
|
||||
@@ -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).
|
||||
|
||||
**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:**
|
||||
- Investigate the phase's technical domain
|
||||
- Identify standard stack, patterns, and pitfalls
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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:
|
||||
- Key requirements have no tasks
|
||||
- Tasks exist but don't actually achieve the requirement
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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:**
|
||||
- **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
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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:
|
||||
|
||||
| File | How Roadmap Uses It |
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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:**
|
||||
- Read all 4 research files (STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md)
|
||||
- Synthesize findings into executive summary
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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:**
|
||||
- Derive phases from requirements (not impose arbitrary structure)
|
||||
- Validate 100% requirement coverage (no orphans)
|
||||
|
||||
@@ -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.
|
||||
|
||||
**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.
|
||||
</role>
|
||||
|
||||
|
||||
@@ -19,11 +19,15 @@ Routes to the add-phase workflow which handles:
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
@~/.claude/get-shit-done/workflows/add-phase.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
Arguments: $ARGUMENTS (phase description)
|
||||
|
||||
Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool calls.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
**Follow the add-phase workflow** from `@~/.claude/get-shit-done/workflows/add-phase.md`.
|
||||
|
||||
|
||||
@@ -23,10 +23,15 @@ Routes to the add-todo workflow which handles:
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@.planning/STATE.md
|
||||
@~/.claude/get-shit-done/workflows/add-todo.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
Arguments: $ARGUMENTS (optional todo description)
|
||||
|
||||
State is resolved in-workflow via `init todos` and targeted reads.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
**Follow the add-todo workflow** from `@~/.claude/get-shit-done/workflows/add-todo.md`.
|
||||
|
||||
|
||||
@@ -23,13 +23,7 @@ Verify milestone achieved its definition of done. Check requirements coverage, c
|
||||
<context>
|
||||
Version: $ARGUMENTS (optional — defaults to current milestone)
|
||||
|
||||
**Original Intent:**
|
||||
@.planning/PROJECT.md
|
||||
@.planning/REQUIREMENTS.md
|
||||
|
||||
**Planned Work:**
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/config.json (if exists)
|
||||
Core planning files are resolved in-workflow (`init milestone-op`) and loaded only as needed.
|
||||
|
||||
**Completed Work:**
|
||||
Glob: .planning/phases/*/*-SUMMARY.md
|
||||
|
||||
@@ -21,11 +21,15 @@ Routes to the check-todos workflow which handles:
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@.planning/STATE.md
|
||||
@.planning/ROADMAP.md
|
||||
@~/.claude/get-shit-done/workflows/check-todos.md
|
||||
</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>
|
||||
**Follow the check-todos workflow** from `@~/.claude/get-shit-done/workflows/check-todos.md`.
|
||||
|
||||
|
||||
@@ -129,7 +129,9 @@ Continue debugging {slug}. Evidence is in the debug file.
|
||||
</objective>
|
||||
|
||||
<prior_state>
|
||||
Debug file: @.planning/debug/{slug}.md
|
||||
<files_to_read>
|
||||
- .planning/debug/{slug}.md (Debug session state)
|
||||
</files_to_read>
|
||||
</prior_state>
|
||||
|
||||
<checkpoint_response>
|
||||
|
||||
@@ -32,11 +32,7 @@ Extract implementation decisions that downstream agents need — researcher and
|
||||
<context>
|
||||
Phase number: $ARGUMENTS (required)
|
||||
|
||||
**Load project state:**
|
||||
@.planning/STATE.md
|
||||
|
||||
**Load roadmap:**
|
||||
@.planning/ROADMAP.md
|
||||
Context files are resolved in-workflow using `init phase-op` and roadmap/state tool calls.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -32,8 +32,7 @@ Phase: $ARGUMENTS
|
||||
**Flags:**
|
||||
- `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
|
||||
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
Context files are resolved inside the workflow via `gsd-tools init execute-phase` and per-subagent `<files_to_read>` blocks.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -23,8 +23,7 @@ Purpose: Handle urgent work discovered during execution without renumbering enti
|
||||
<context>
|
||||
Arguments: $ARGUMENTS (format: <after-phase-number> <description>)
|
||||
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
Roadmap and state are resolved in-workflow via `init phase-op` and targeted tool calls.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -23,11 +23,7 @@ Output: Conversational output only (no file creation) - ends with "What do you t
|
||||
<context>
|
||||
Phase number: $ARGUMENTS (required)
|
||||
|
||||
**Load project state first:**
|
||||
@.planning/STATE.md
|
||||
|
||||
**Load roadmap:**
|
||||
@.planning/ROADMAP.md
|
||||
Project state and roadmap are loaded in-workflow using targeted reads.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -35,14 +35,7 @@ Brownfield equivalent of new-project. Project exists, PROJECT.md has history. Ga
|
||||
<context>
|
||||
Milestone name: $ARGUMENTS (optional - will prompt if not provided)
|
||||
|
||||
**Load project context:**
|
||||
@.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
|
||||
Project and milestone context files are resolved inside the workflow (`init new-milestone`) and delegated via `<files_to_read>` blocks where subagents are used.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -19,10 +19,13 @@ Routes to the pause-work workflow which handles:
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@.planning/STATE.md
|
||||
@~/.claude/get-shit-done/workflows/pause-work.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
State and phase progress are gathered in-workflow with targeted reads.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
**Follow the pause-work workflow** from `@~/.claude/get-shit-done/workflows/pause-work.md`.
|
||||
|
||||
|
||||
@@ -25,13 +25,7 @@ One command creates all fix phases — no manual `/gsd:add-phase` per gap.
|
||||
**Audit results:**
|
||||
Glob: .planning/v*-MILESTONE-AUDIT.md (use most recent)
|
||||
|
||||
**Original intent (for prioritization):**
|
||||
@.planning/PROJECT.md
|
||||
@.planning/REQUIREMENTS.md
|
||||
|
||||
**Current state:**
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
Original intent and current planning state are loaded on demand inside the workflow.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -30,8 +30,9 @@ Quick mode is the same system with a shorter path:
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@.planning/STATE.md
|
||||
$ARGUMENTS
|
||||
|
||||
Context files are resolved inside the workflow (`init quick`) and delegated via `<files_to_read>` blocks.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -22,8 +22,7 @@ Output: Phase deleted, all subsequent phases renumbered, git commit as historica
|
||||
<context>
|
||||
Phase: $ARGUMENTS
|
||||
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
Roadmap and state are resolved in-workflow via `init phase-op` and targeted reads.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -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")
|
||||
```
|
||||
|
||||
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:
|
||||
```bash
|
||||
@@ -64,15 +64,12 @@ ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
|
||||
|
||||
## 3. Gather Phase Context
|
||||
|
||||
```bash
|
||||
# Phase section already loaded in PHASE_INFO
|
||||
echo "$PHASE_INFO" | jq -r '.section'
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null
|
||||
cat .planning/phases/${PHASE}-*/*-CONTEXT.md 2>/dev/null
|
||||
grep -A30 "### Decisions Made" .planning/STATE.md 2>/dev/null
|
||||
```
|
||||
Use paths from INIT (do not inline file contents in orchestrator context):
|
||||
- `requirements_path`
|
||||
- `context_path`
|
||||
- `state_path`
|
||||
|
||||
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
|
||||
|
||||
@@ -101,12 +98,15 @@ Research implementation approach for Phase {phase_number}: {phase_name}
|
||||
Mode: ecosystem
|
||||
</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}
|
||||
**Requirements:** {requirements_list}
|
||||
**Prior decisions:** {decisions_if_any}
|
||||
**Phase context:** {context_md_content}
|
||||
</context>
|
||||
</additional_context>
|
||||
|
||||
<downstream_consumer>
|
||||
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>
|
||||
|
||||
<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>
|
||||
|
||||
<checkpoint_response>
|
||||
|
||||
@@ -29,8 +29,7 @@ Phase: $ARGUMENTS (optional)
|
||||
- If provided: Test specific phase (e.g., "4")
|
||||
- If not provided: Check for active sessions or prompt for phase
|
||||
|
||||
@.planning/STATE.md
|
||||
@.planning/ROADMAP.md
|
||||
Context files are resolved inside the workflow (`init verify-work`) and delegated via `<files_to_read>` blocks.
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
@@ -145,14 +145,6 @@ const MODEL_PROFILES = {
|
||||
|
||||
// ─── 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) {
|
||||
try {
|
||||
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) {
|
||||
error('phase required for init execute-phase');
|
||||
}
|
||||
@@ -4300,23 +4292,16 @@ function cmdInitExecutePhase(cwd, phase, includes, raw) {
|
||||
state_exists: pathExistsInternal(cwd, '.planning/STATE.md'),
|
||||
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
|
||||
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);
|
||||
}
|
||||
|
||||
function cmdInitPlanPhase(cwd, phase, includes, raw) {
|
||||
function cmdInitPlanPhase(cwd, phase, raw) {
|
||||
if (!phase) {
|
||||
error('phase required for init plan-phase');
|
||||
}
|
||||
@@ -4352,59 +4337,33 @@ function cmdInitPlanPhase(cwd, phase, includes, raw) {
|
||||
// Environment
|
||||
planning_exists: pathExistsInternal(cwd, '.planning'),
|
||||
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 (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) {
|
||||
if (phaseInfo?.directory) {
|
||||
// Find *-CONTEXT.md in phase 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_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');
|
||||
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');
|
||||
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');
|
||||
if (uatFile) {
|
||||
result.uat_content = safeReadFile(path.join(phaseDirFull, uatFile));
|
||||
result.uat_path = path.join(phaseInfo.directory, uatFile);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
@@ -4463,6 +4422,9 @@ function cmdInitNewProject(cwd, raw) {
|
||||
|
||||
// Enhanced search
|
||||
brave_search_available: hasBraveSearch,
|
||||
|
||||
// File paths
|
||||
project_path: '.planning/PROJECT.md',
|
||||
};
|
||||
|
||||
output(result, raw);
|
||||
@@ -4490,6 +4452,11 @@ function cmdInitNewMilestone(cwd, raw) {
|
||||
project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'),
|
||||
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.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);
|
||||
@@ -4539,6 +4506,7 @@ function cmdInitQuick(cwd, description, raw) {
|
||||
// File existence
|
||||
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
|
||||
planning_exists: pathExistsInternal(cwd, '.planning'),
|
||||
|
||||
};
|
||||
|
||||
output(result, raw);
|
||||
@@ -4560,6 +4528,11 @@ function cmdInitResume(cwd, raw) {
|
||||
project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'),
|
||||
planning_exists: pathExistsInternal(cwd, '.planning'),
|
||||
|
||||
// File paths
|
||||
state_path: '.planning/STATE.md',
|
||||
roadmap_path: '.planning/ROADMAP.md',
|
||||
project_path: '.planning/PROJECT.md',
|
||||
|
||||
// Agent state
|
||||
has_interrupted_agent: !!interruptedAgentId,
|
||||
interrupted_agent_id: interruptedAgentId,
|
||||
@@ -4648,8 +4621,36 @@ function cmdInitPhaseOp(cwd, phase, raw) {
|
||||
// File existence
|
||||
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.md'),
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -4807,7 +4808,7 @@ function cmdInitMapCodebase(cwd, raw) {
|
||||
output(result, raw);
|
||||
}
|
||||
|
||||
function cmdInitProgress(cwd, includes, raw) {
|
||||
function cmdInitProgress(cwd, raw) {
|
||||
const config = loadConfig(cwd);
|
||||
const milestone = getMilestoneInfo(cwd);
|
||||
|
||||
@@ -4895,22 +4896,13 @@ function cmdInitProgress(cwd, includes, raw) {
|
||||
project_exists: pathExistsInternal(cwd, '.planning/PROJECT.md'),
|
||||
roadmap_exists: pathExistsInternal(cwd, '.planning/ROADMAP.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);
|
||||
}
|
||||
|
||||
@@ -5252,13 +5244,12 @@ async function main() {
|
||||
|
||||
case 'init': {
|
||||
const workflow = args[1];
|
||||
const includes = parseIncludeFlag(args);
|
||||
switch (workflow) {
|
||||
case 'execute-phase':
|
||||
cmdInitExecutePhase(cwd, args[2], includes, raw);
|
||||
cmdInitExecutePhase(cwd, args[2], raw);
|
||||
break;
|
||||
case 'plan-phase':
|
||||
cmdInitPlanPhase(cwd, args[2], includes, raw);
|
||||
cmdInitPlanPhase(cwd, args[2], raw);
|
||||
break;
|
||||
case 'new-project':
|
||||
cmdInitNewProject(cwd, raw);
|
||||
@@ -5288,7 +5279,7 @@ async function main() {
|
||||
cmdInitMapCodebase(cwd, raw);
|
||||
break;
|
||||
case 'progress':
|
||||
cmdInitProgress(cwd, includes, raw);
|
||||
cmdInitProgress(cwd, raw);
|
||||
break;
|
||||
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`);
|
||||
|
||||
@@ -1098,10 +1098,10 @@ key-decisions:
|
||||
});
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
// init --include flag tests
|
||||
// init commands tests
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
describe('init commands with --include flag', () => {
|
||||
describe('init commands', () => {
|
||||
let tmpDir;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -1112,127 +1112,83 @@ describe('init commands with --include flag', () => {
|
||||
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');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
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);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
assert.strictEqual(output.state_content, undefined, 'state_content should be omitted');
|
||||
assert.strictEqual(output.config_content, undefined, 'config_content should be omitted');
|
||||
assert.strictEqual(output.state_path, '.planning/STATE.md');
|
||||
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');
|
||||
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-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}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
assert.ok(output.state_content, 'state_content included');
|
||||
assert.ok(output.state_content.includes('Project State'), 'state content correct');
|
||||
assert.ok(output.roadmap_content, 'roadmap_content included');
|
||||
assert.ok(output.roadmap_content.includes('Roadmap v1.0'), 'roadmap content correct');
|
||||
assert.ok(output.requirements_content, 'requirements_content included');
|
||||
assert.ok(output.context_content, 'context_content included');
|
||||
assert.ok(output.research_content, 'research_content included');
|
||||
assert.strictEqual(output.state_path, '.planning/STATE.md');
|
||||
assert.strictEqual(output.roadmap_path, '.planning/ROADMAP.md');
|
||||
assert.strictEqual(output.requirements_path, '.planning/REQUIREMENTS.md');
|
||||
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 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');
|
||||
fs.mkdirSync(phaseDir, { recursive: true });
|
||||
fs.writeFileSync(path.join(phaseDir, '03-VERIFICATION.md'), '# Verification Results');
|
||||
fs.writeFileSync(path.join(phaseDir, '03-UAT.md'), '# UAT Findings');
|
||||
fs.writeFileSync(path.join(phaseDir, '03-CONTEXT.md'), '# Phase Context');
|
||||
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}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
assert.ok(output.verification_content, 'verification_content included');
|
||||
assert.ok(output.verification_content.includes('Verification Results'), 'verification content correct');
|
||||
assert.ok(output.uat_content, 'uat_content included');
|
||||
assert.ok(output.uat_content.includes('UAT Findings'), 'uat content correct');
|
||||
assert.strictEqual(output.state_path, '.planning/STATE.md');
|
||||
assert.strictEqual(output.roadmap_path, '.planning/ROADMAP.md');
|
||||
assert.strictEqual(output.requirements_path, '.planning/REQUIREMENTS.md');
|
||||
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', () => {
|
||||
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', () => {
|
||||
test('init plan-phase omits optional paths if files missing', () => {
|
||||
const phaseDir = path.join(tmpDir, '.planning', 'phases', '03-api');
|
||||
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}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
assert.strictEqual(output.state_content, null, 'missing state returns null');
|
||||
assert.strictEqual(output.config_content, null, 'missing config returns null');
|
||||
});
|
||||
|
||||
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');
|
||||
assert.strictEqual(output.context_path, undefined);
|
||||
assert.strictEqual(output.research_path, undefined);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ For each gap, fill the debug-subagent-prompt template and spawn:
|
||||
|
||||
```
|
||||
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",
|
||||
description="Debug: {truth_short}"
|
||||
)
|
||||
|
||||
@@ -118,11 +118,11 @@ Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`
|
||||
|
||||
<files_to_read>
|
||||
Read these files at execution start using the Read tool:
|
||||
- Plan: {phase_dir}/{plan_file}
|
||||
- State: .planning/STATE.md
|
||||
- Config: .planning/config.json (if exists)
|
||||
- Project instructions: ./CLAUDE.md (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)
|
||||
- {phase_dir}/{plan_file} (Plan)
|
||||
- .planning/STATE.md (State)
|
||||
- .planning/config.json (Config, if exists)
|
||||
- ./CLAUDE.md (Project instructions, if exists — follow project-specific guidelines and coding conventions)
|
||||
- .agents/skills/ (Project skills, if exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
|
||||
</files_to_read>
|
||||
|
||||
<success_criteria>
|
||||
@@ -375,7 +375,7 @@ The CLI handles:
|
||||
Extract from result: `next_phase`, `next_phase_name`, `is_last_phase`.
|
||||
|
||||
```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>
|
||||
|
||||
|
||||
@@ -12,19 +12,13 @@ Read config.json for planning behavior settings.
|
||||
<process>
|
||||
|
||||
<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
|
||||
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`.
|
||||
|
||||
**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')
|
||||
```
|
||||
Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `phase_number`, `plans`, `summaries`, `incomplete_plans`, `state_path`, `config_path`.
|
||||
|
||||
If `.planning/` missing: error.
|
||||
</step>
|
||||
@@ -40,7 +34,7 @@ Find first PLAN without matching SUMMARY. Decimal phases supported (`01.1-hotfix
|
||||
|
||||
```bash
|
||||
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">
|
||||
|
||||
@@ -128,7 +128,9 @@ Focus ONLY on what's needed for the NEW features.
|
||||
|
||||
<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>
|
||||
|
||||
@@ -157,7 +159,12 @@ After all 4 complete, spawn synthesizer:
|
||||
Task(prompt="
|
||||
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
|
||||
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="
|
||||
<planning_context>
|
||||
@.planning/PROJECT.md
|
||||
@.planning/REQUIREMENTS.md
|
||||
@.planning/research/SUMMARY.md (if exists)
|
||||
@.planning/config.json
|
||||
@.planning/MILESTONES.md
|
||||
<files_to_read>
|
||||
- .planning/PROJECT.md
|
||||
- .planning/REQUIREMENTS.md
|
||||
- .planning/research/SUMMARY.md (if exists)
|
||||
- .planning/config.json
|
||||
- .planning/MILESTONES.md
|
||||
</files_to_read>
|
||||
</planning_context>
|
||||
|
||||
<instructions>
|
||||
|
||||
@@ -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)
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
@@ -541,7 +541,7 @@ Display spawning indicator:
|
||||
→ 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.
|
||||
@@ -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]?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary - core value, constraints, what they're building]
|
||||
</project_context>
|
||||
<files_to_read>
|
||||
- {project_path} (Project context and goals)
|
||||
</files_to_read>
|
||||
|
||||
<downstream_consumer>
|
||||
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?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary]
|
||||
</project_context>
|
||||
<files_to_read>
|
||||
- {project_path} (Project context)
|
||||
</files_to_read>
|
||||
|
||||
<downstream_consumer>
|
||||
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?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary]
|
||||
</project_context>
|
||||
<files_to_read>
|
||||
- {project_path} (Project context)
|
||||
</files_to_read>
|
||||
|
||||
<downstream_consumer>
|
||||
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?
|
||||
</question>
|
||||
|
||||
<project_context>
|
||||
[PROJECT.md summary]
|
||||
</project_context>
|
||||
<files_to_read>
|
||||
- {project_path} (Project context)
|
||||
</files_to_read>
|
||||
|
||||
<downstream_consumer>
|
||||
Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
|
||||
@@ -713,13 +713,12 @@ Task(prompt="
|
||||
Synthesize research outputs into SUMMARY.md.
|
||||
</task>
|
||||
|
||||
<research_files>
|
||||
Read these files:
|
||||
<files_to_read>
|
||||
- .planning/research/STACK.md
|
||||
- .planning/research/FEATURES.md
|
||||
- .planning/research/ARCHITECTURE.md
|
||||
- .planning/research/PITFALLS.md
|
||||
</research_files>
|
||||
</files_to_read>
|
||||
|
||||
<output>
|
||||
Write to: .planning/research/SUMMARY.md
|
||||
@@ -902,23 +901,18 @@ Display stage banner:
|
||||
◆ Spawning roadmapper...
|
||||
```
|
||||
|
||||
Spawn gsd-roadmapper agent with context:
|
||||
Spawn gsd-roadmapper agent with path references:
|
||||
|
||||
```
|
||||
Task(prompt="
|
||||
<planning_context>
|
||||
|
||||
**Project:**
|
||||
@.planning/PROJECT.md
|
||||
|
||||
**Requirements:**
|
||||
@.planning/REQUIREMENTS.md
|
||||
|
||||
**Research (if exists):**
|
||||
@.planning/research/SUMMARY.md
|
||||
|
||||
**Config:**
|
||||
@.planning/config.json
|
||||
<files_to_read>
|
||||
- .planning/PROJECT.md (Project context)
|
||||
- .planning/REQUIREMENTS.md (v1 Requirements)
|
||||
- .planning/research/SUMMARY.md (Research findings - if exists)
|
||||
- .planning/config.json (Depth and mode settings)
|
||||
</files_to_read>
|
||||
|
||||
</planning_context>
|
||||
|
||||
@@ -1006,7 +1000,9 @@ Use AskUserQuestion:
|
||||
User feedback on roadmap:
|
||||
[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.
|
||||
Return ROADMAP REVISED with changes made.
|
||||
|
||||
@@ -12,23 +12,15 @@ Read all files referenced by the invoking prompt's execution_context before star
|
||||
|
||||
## 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
|
||||
INIT_RAW=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init plan-phase "$PHASE" --include state,roadmap,requirements,context,research,verification,uat)
|
||||
# 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
|
||||
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init plan-phase "$PHASE")
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
@@ -55,13 +47,11 @@ PHASE_INFO=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "$
|
||||
|
||||
## 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_content` is null (no CONTEXT.md exists):**
|
||||
**If `context_path` is null (no CONTEXT.md exists):**
|
||||
|
||||
Use AskUserQuestion:
|
||||
- header: "No context"
|
||||
@@ -94,11 +84,7 @@ Display banner:
|
||||
|
||||
```bash
|
||||
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)
|
||||
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)"'
|
||||
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/,$//')
|
||||
```
|
||||
|
||||
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?"
|
||||
</objective>
|
||||
|
||||
<phase_context>
|
||||
IMPORTANT: If CONTEXT.md exists below, it contains user decisions from /gsd:discuss-phase.
|
||||
- **Decisions** = Locked — research THESE deeply, no alternatives
|
||||
- **Claude's Discretion** = Freedom areas — research options, recommend
|
||||
- **Deferred Ideas** = Out of scope — ignore
|
||||
|
||||
{context_content}
|
||||
</phase_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:** {phase_description}
|
||||
**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 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.
|
||||
|
||||
## 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
|
||||
# Extract from INIT JSON (no need to re-read files)
|
||||
STATE_CONTENT=$(echo "$INIT" | jq -r '.state_content // empty')
|
||||
ROADMAP_CONTENT=$(echo "$INIT" | jq -r '.roadmap_content // empty')
|
||||
REQUIREMENTS_CONTENT=$(echo "$INIT" | jq -r '.requirements_content // empty')
|
||||
RESEARCH_CONTENT=$(echo "$INIT" | jq -r '.research_content // empty')
|
||||
VERIFICATION_CONTENT=$(echo "$INIT" | jq -r '.verification_content // empty')
|
||||
UAT_CONTENT=$(echo "$INIT" | jq -r '.uat_content // empty')
|
||||
CONTEXT_CONTENT=$(echo "$INIT" | jq -r '.context_content // empty')
|
||||
STATE_PATH=$(echo "$INIT" | jq -r '.state_path // empty')
|
||||
ROADMAP_PATH=$(echo "$INIT" | jq -r '.roadmap_path // empty')
|
||||
REQUIREMENTS_PATH=$(echo "$INIT" | jq -r '.requirements_path // empty')
|
||||
RESEARCH_PATH=$(echo "$INIT" | jq -r '.research_path // empty')
|
||||
VERIFICATION_PATH=$(echo "$INIT" | jq -r '.verification_path // empty')
|
||||
UAT_PATH=$(echo "$INIT" | jq -r '.uat_path // empty')
|
||||
CONTEXT_PATH=$(echo "$INIT" | jq -r '.context_path // empty')
|
||||
```
|
||||
|
||||
## 8. Spawn gsd-planner Agent
|
||||
@@ -188,21 +168,17 @@ Planner prompt:
|
||||
**Phase:** {phase_number}
|
||||
**Mode:** {standard | gap_closure}
|
||||
|
||||
**Project State:** {state_content}
|
||||
**Roadmap:** {roadmap_content}
|
||||
<files_to_read>
|
||||
- {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}
|
||||
**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 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...
|
||||
```
|
||||
|
||||
```bash
|
||||
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
|
||||
```
|
||||
|
||||
Checker prompt:
|
||||
|
||||
```markdown
|
||||
@@ -263,17 +235,14 @@ Checker prompt:
|
||||
**Phase:** {phase_number}
|
||||
**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}
|
||||
**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 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)`
|
||||
|
||||
```bash
|
||||
PLANS_CONTENT=$(cat "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
|
||||
```
|
||||
|
||||
Revision prompt:
|
||||
|
||||
```markdown
|
||||
@@ -318,12 +283,12 @@ Revision prompt:
|
||||
**Phase:** {phase_number}
|
||||
**Mode:** revision
|
||||
|
||||
**Existing plans:** {plans_content}
|
||||
**Checker issues:** {structured_issues_from_checker}
|
||||
<files_to_read>
|
||||
- {PHASE_DIR}/*-PLAN.md (Existing plans)
|
||||
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
|
||||
</files_to_read>
|
||||
|
||||
**Phase Context:**
|
||||
Revisions MUST still honor user decisions.
|
||||
{context_content}
|
||||
**Checker issues:** {structured_issues_from_checker}
|
||||
</revision_context>
|
||||
|
||||
<instructions>
|
||||
|
||||
@@ -9,23 +9,13 @@ Read all files referenced by the invoking prompt's execution_context before star
|
||||
<process>
|
||||
|
||||
<step name="init_context">
|
||||
**Load progress context (with file contents to avoid redundant reads):**
|
||||
**Load progress context (paths only):**
|
||||
|
||||
```bash
|
||||
INIT_RAW=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init progress --include state,roadmap,project,config)
|
||||
# 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
|
||||
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init progress)
|
||||
```
|
||||
|
||||
Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`.
|
||||
|
||||
**File contents (from --include):** `state_content`, `roadmap_content`, `project_content`, `config_content`. These are null if files don't exist.
|
||||
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`.
|
||||
|
||||
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 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:
|
||||
- `state_content` — living memory (position, decisions, issues)
|
||||
- `roadmap_content` — phase structure and objectives
|
||||
- `project_content` — current state (What This Is, Core Value, Requirements)
|
||||
- `config_content` — settings (model_profile, workflow toggles)
|
||||
Instead of reading full files, use targeted tools to get only the data needed for the report:
|
||||
- `ROADMAP=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap analyze)`
|
||||
- `STATE=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs state-snapshot)`
|
||||
|
||||
No additional file reads needed.
|
||||
This minimizes orchestrator context usage.
|
||||
</step>
|
||||
|
||||
<step name="analyze_roadmap">
|
||||
@@ -89,9 +77,8 @@ Use this instead of manually reading/parsing ROADMAP.md.
|
||||
<step name="position">
|
||||
**Parse current position from init context and roadmap analysis:**
|
||||
|
||||
- Use `current_phase` and `next_phase` from roadmap analyze
|
||||
- Use phase-level `has_context` and `has_research` flags from analyze
|
||||
- Note `paused_at` if work was paused (from init context)
|
||||
- Use `current_phase` and `next_phase` from `$ROADMAP`
|
||||
- Note `paused_at` if work was paused (from `$STATE`)
|
||||
- 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`
|
||||
</step>
|
||||
@@ -122,11 +109,12 @@ Plan [M] of [phase-total]: [status]
|
||||
CONTEXT: [✓ if has_context | - if not]
|
||||
|
||||
## Key Decisions Made
|
||||
- [decision 1 from STATE.md]
|
||||
- [decision 2]
|
||||
- [extract from $STATE.decisions[]]
|
||||
- [e.g. jq -r '.decisions[].decision' from state-snapshot]
|
||||
|
||||
## Blockers/Concerns
|
||||
- [any blockers or concerns from STATE.md]
|
||||
- [extract from $STATE.blockers[]]
|
||||
- [e.g. jq -r '.blockers[].text' from state-snapshot]
|
||||
|
||||
## Pending Todos
|
||||
- [count] pending — /gsd:check-todos to review
|
||||
|
||||
@@ -96,10 +96,11 @@ Task(
|
||||
**Directory:** ${QUICK_DIR}
|
||||
**Description:** ${DESCRIPTION}
|
||||
|
||||
**Project State:**
|
||||
@.planning/STATE.md
|
||||
<files_to_read>
|
||||
- .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
|
||||
|
||||
</planning_context>
|
||||
@@ -146,10 +147,6 @@ Display banner:
|
||||
◆ Spawning plan checker...
|
||||
```
|
||||
|
||||
```bash
|
||||
PLAN_CONTENT=$(cat "${QUICK_DIR}/${next_num}-PLAN.md" 2>/dev/null)
|
||||
```
|
||||
|
||||
Checker prompt:
|
||||
|
||||
```markdown
|
||||
@@ -157,7 +154,9 @@ Checker prompt:
|
||||
**Mode:** quick-full
|
||||
**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.
|
||||
</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)`
|
||||
|
||||
```bash
|
||||
PLAN_CONTENT=$(cat "${QUICK_DIR}/${next_num}-PLAN.md" 2>/dev/null)
|
||||
```
|
||||
|
||||
Revision prompt:
|
||||
|
||||
```markdown
|
||||
<revision_context>
|
||||
**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}
|
||||
|
||||
</revision_context>
|
||||
@@ -250,10 +248,12 @@ Task(
|
||||
prompt="
|
||||
Execute quick task ${next_num}.
|
||||
|
||||
Plan: @${QUICK_DIR}/${next_num}-PLAN.md
|
||||
Project state: @.planning/STATE.md
|
||||
Project instructions: ./CLAUDE.md (if exists — follow project-specific guidelines)
|
||||
Project skills: .agents/skills/ (if exists — list skills, read SKILL.md for each, follow relevant rules during implementation)
|
||||
<files_to_read>
|
||||
- ${QUICK_DIR}/${next_num}-PLAN.md (Plan)
|
||||
- .planning/STATE.md (Project state)
|
||||
- ./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>
|
||||
- Execute all tasks in the plan
|
||||
@@ -299,7 +299,11 @@ Task(
|
||||
prompt="Verify quick task goal achievement.
|
||||
Task directory: ${QUICK_DIR}
|
||||
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.",
|
||||
subagent_type="gsd-verifier",
|
||||
model="{verifier_model}",
|
||||
|
||||
@@ -34,12 +34,8 @@ If exists: Offer update/view/skip options.
|
||||
## Step 3: Gather Phase Context
|
||||
|
||||
```bash
|
||||
# Phase section from roadmap (already loaded in PHASE_INFO)
|
||||
echo "$PHASE_INFO" | jq -r '.section'
|
||||
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'
|
||||
INIT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs init phase-op "${PHASE}")
|
||||
# Extract: phase_dir, padded_phase, phase_number, state_path, requirements_path, context_path
|
||||
```
|
||||
|
||||
## Step 4: Spawn Researcher
|
||||
@@ -50,12 +46,15 @@ Task(
|
||||
Research implementation approach for Phase {phase}: {name}
|
||||
</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}
|
||||
Requirements: {requirements}
|
||||
Prior decisions: {decisions}
|
||||
Phase context: {context_md}
|
||||
</context>
|
||||
</additional_context>
|
||||
|
||||
<output>
|
||||
Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
||||
|
||||
@@ -365,14 +365,11 @@ Task(
|
||||
**Phase:** {phase_number}
|
||||
**Mode:** gap_closure
|
||||
|
||||
**UAT with diagnoses:**
|
||||
@.planning/phases/{phase_dir}/{phase_num}-UAT.md
|
||||
|
||||
**Project State:**
|
||||
@.planning/STATE.md
|
||||
|
||||
**Roadmap:**
|
||||
@.planning/ROADMAP.md
|
||||
<files_to_read>
|
||||
- {phase_dir}/{phase_num}-UAT.md (UAT with diagnoses)
|
||||
- .planning/STATE.md (Project State)
|
||||
- .planning/ROADMAP.md (Roadmap)
|
||||
</files_to_read>
|
||||
|
||||
</planning_context>
|
||||
|
||||
@@ -416,8 +413,9 @@ Task(
|
||||
**Phase:** {phase_number}
|
||||
**Phase Goal:** Close diagnosed gaps from UAT
|
||||
|
||||
**Plans to verify:**
|
||||
@.planning/phases/{phase_dir}/*-PLAN.md
|
||||
<files_to_read>
|
||||
- {phase_dir}/*-PLAN.md (Plans to verify)
|
||||
</files_to_read>
|
||||
|
||||
</verification_context>
|
||||
|
||||
@@ -455,8 +453,9 @@ Task(
|
||||
**Phase:** {phase_number}
|
||||
**Mode:** revision
|
||||
|
||||
**Existing plans:**
|
||||
@.planning/phases/{phase_dir}/*-PLAN.md
|
||||
<files_to_read>
|
||||
- {phase_dir}/*-PLAN.md (Existing plans)
|
||||
</files_to_read>
|
||||
|
||||
**Checker issues:**
|
||||
{structured_issues_from_checker}
|
||||
|
||||
Reference in New Issue
Block a user