Skip to main content
prompt CX Codex GP ChatGPT

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/speckit.plan.md
Open on GitHub

What 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.md

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

Similar prompts

All prompts for Agent setup: memory, context, orchestration →

From the same set83

The whole set →
speckit.companion.living-coverage speckit.companion.living-coverage — a command that reports which living-spec requirements have mapped tests and which remain uncovered. It runs read-only and never halts your workflow. CX Codex +1 ★ 110repo stars bench-sync bench-sync — a command for Claude Code and Codex that bakes benchmark cells and measures the current spec-kit and Companion extension versions. Use it to track how performance changes as tools are updated. CX Codex +1 ★ 110repo stars speckit.companion.living-show speckit.companion.living-show is a Claude Code command that prints requirement headings, one complete requirement, or rules tied to a file. Run it to inspect a specific part of a living spec without opening the whole document. CX Codex +1 ★ 110repo stars speckit.companion.status speckit.companion.status — a command for Claude Code and Codex reads .spec-context.json and reports the active spec’s step, status, decisions, and next action. It is read-only. CX Codex +1 ★ 110repo stars sandbox This command builds throwaway SpecKit sandboxes from recipes or lists available recipes and existing folders. It works with Claude Code and Codex. CX Codex +1 ★ 110repo stars release-qa release-qa is a Claude Code command that checks code before release. It compares the last version tag, runs automated and manual checks, and blocks /publish until all checks pass. CX Codex +1 ★ 110repo stars install-local The install-local command for Claude Code builds and installs local speckit-companion VS Code and spec-kit extensions, bumping the patch version to trigger an editor reload banner. CX Codex +1 ★ 110repo stars speckit.companion.living-drift speckit.companion.living-drift finds capability files that changed after their living spec was last committed. Use it to spot project changes that have not made it back into the spec. CX Codex +1 ★ 110repo stars

Project sponsors

Companies that keep this analytics open