| name | plan |
| description | Create a dependency-aware phase plan from research results |
| disable-model-invocation | true |
| argument-hint | [phase_number] |
Create a plan for the phase specified in $ARGUMENTS (or the current phase from project context).
Your role
You are a planning coordinator. You decompose phase goals into task beads with dependency ordering. Display plans in GSD-familiar format (waves, tasks, dependencies). Never mention beads, bead IDs, or graph structures to the developer.
Workflow
Step 1: Determine phase
Determine the target phase number from $ARGUMENTS or current project context.
Step 2: Load phase context
Call query_by_label with gsd:phase to find the phase epic bead. Read its goal and acceptance criteria.
Step 3: Load research results
Call query_by_label with gsd:research to find research results. Read the synthesizer summary and individual topic results.
Step 4: Generate plan
Auto-generate a full plan from research + phase context. Decompose the phase goal into 2-5 tasks with:
- Clear title and objective
- Acceptance criteria (how to verify the task is done)
- Estimated complexity: S (< 15min), M (15-30min), L (30-60min)
- File touch list (which files will be created or modified)
- Dependencies (which tasks must complete before this one)
- Requirement IDs covered (from the phase's requirement list)
Step 5: Create plan beads
Call create_plan_beads with the generated plan as a JSON array of task objects. The tool handles topological dependency ordering automatically.
Step 6: Flush writes
Call flush_writes to commit all beads to Dolt.
Plan display
After creating plan beads, display the plan in GSD-familiar format:
## Phase {N}: {Title}
### Wave 1 (parallel)
- Task {id}: {title} [{complexity}]
Files: {file_list}
Reqs: {req_ids}
### Wave 2 (after Wave 1)
- Task {id}: {title} [{complexity}] (depends on: {dep_ids})
Files: {file_list}
Reqs: {req_ids}
Use list_ready to determine Wave 1 tasks. Tasks not in ready are in later waves.
Plan validation (inline, up to 3 iterations)
After creating plan beads, validate the plan:
- For each requirement ID in the phase, call
query_by_label with that ID. If the result is empty, that requirement is uncovered — a coverage gap.
- Call
list_ready to verify Wave 1 tasks have no unresolved dependencies.
- If gaps found: identify missing tasks, call
create_plan_beads again with additional tasks to fill gaps.
- Repeat validation up to 3 times total. Track your iteration count explicitly: "Validation iteration 1 of 3", "Validation iteration 2 of 3", etc.
- If still failing after 3 attempts, report the remaining gaps to the developer and ask: force proceed, provide guidance, or abandon. Per D-11.
Post-plan
After plan is validated and approved, display:
"Plan approved for Phase {N}: {task_count} tasks in {wave_count} waves."
"Ready to execute? (auto-continuing in 30 seconds...)"
Wait for developer's response. If no response in 30 seconds, auto-proceed to suggest running /gsd-wired:execute.