speckit.plan — Claude Code prompt: what it does, how to install
speckit.plan runs an implementation planning workflow from a feature spec, generating research.md, data models, and API contracts.
MIT ★ 110 updated 2026-10-19
.claude/commands/speckit.plan.mdWhat speckit.plan does
The prompt executes .specify/scripts/bash/setup-plan.sh --json from the repository root to locate the target feature spec, branch, and plan template. It inspects .specify/memory/constitution.md to run gate evaluations. Unresolved clarification markers or unjustified rule breaches immediately stop execution with an error.
The process runs across structured stages. Phase 0 addresses unknown technical context, writing selected choices, rationales, and reviewed alternatives into research.md. Phase 1 maps entities into data-model.md, creates REST or GraphQL specifications in /contracts/, and prepares quickstart.md.
At the end of design, it runs .specify/scripts/bash/update-agent-context.sh codex to sync context while preserving manual edits between markers. The workflow fails immediately if the .specify directory and its bash helper scripts are missing from the project.
What it helps with
- build phased implementation plans from written specifications
- document technical decisions and evaluated alternatives in research.md
- produce entity relationships in data-model.md and API schemas in contracts/
- verify architecture choices against constraints in constitution.md
Example prompts for the agent
- /speckit.plan
- /speckit.plan Plan the authentication module implementation
- /speckit.plan Setup user billing workflow from spec
How to install speckit.plan
Manually: put the files in place
.claude/commands/speckit.plan.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about speckit.plan
How to install speckit.plan in Claude Code?
Place the prompt file into your repository at .claude/commands/speckit.plan.md.
What does speckit.plan do?
It coordinates implementation planning by inspecting specifications, resolving unknowns in research.md, and generating data models and API schemas.
What prerequisites does speckit.plan need?
The repository must contain the .specify folder, including .specify/memory/constitution.md and the bash script .specify/scripts/bash/setup-plan.sh.
Source text
speckit.plan.md · MIT
---
description: Execute the implementation planning workflow using the plan template to generate design artifacts.
handoffs:
- label: Create Tasks
agent: speckit.tasks
prompt: Break the plan into tasks
send: true
- label: Create Checklist
agent: speckit.checklist
prompt: Create a checklist for the following domain...
---
## User Input
```text
$ARGUMENTS
```
You **MUST** consider the user input before proceeding (if not empty).
## Outline
1. **Setup**: Run `.specify/scripts/bash/setup-plan.sh --json` from repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
2. **Load context**: Read FEATURE_SPEC and `.specify/memory/constitution.md`. Load IMPL_PLAN template (already copied).
3. **Execute plan workflow**: Follow the structure in IMPL_PLAN template to:
- Fill Technical Context (mark unknowns as "NEEDS CLARIFICATION")
- Fill Constitution Check section from constitution
- Evaluate gates (ERROR if violations unjustified)
- Phase 0: Generate research.md (resolve all NEEDS CLARIFICATION)
- Phase 1: Generate data-model.md, contracts/, quickstart.md
- Phase 1: Update agent context by running the agent script
- Re-evaluate Constitution Check post-design
4. **Stop and report**: Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts.
## Phases
### Phase 0: Outline & Research
1. **Extract unknowns from Technical Context** above:
- For each NEEDS CLARIFICATION → research task
- For each dependency → best practices task
- For each integration → patterns task
2. **Generate and dispatch research agents**:
```text
For each unknown in Technical Context:
Task: "Research {unknown} for {feature context}"
For each technology choice:
Task: "Find best practices for {tech} in {domain}"
```
3. **Consolidate findings** in `research.md` using format:
- Decision: [what was chosen]
- Rationale: [why chosen]
- Alternatives considered: [what else evaluated]
**Output**: research.md with all NEEDS CLARIFICATION resolved
### Phase 1: Design & Contracts
**Prerequisites:** `research.md` complete
1. **Extract entities from feature spec** → `data-model.md`:
- Entity name, fields, relationships
- Validation rules from requirements
- State transitions if applicable
2. **Generate API contracts** from functional requirements:
- For each user action → endpoint
- Use standard REST/GraphQL patterns
- Output OpenAPI/GraphQL schema to `/contracts/`
3. **Agent context update**:
- Run `.specify/scripts/bash/update-agent-context.sh codex`
- These scripts detect which AI agent is in use
- Update the appropriate agent-specific context file
- Add only new technology from current plan
- Preserve manual additions between markers
**Output**: data-model.md, /contracts/*, quickstart.md, agent-specific file
## Key rules
- Use absolute paths
- ERROR on gate failures or unresolved clarifications
© alfredoperez · MIT · alfredoperez/speckit-companion