Specs bring structured, plan-then-execute development to the CLI. The Spec agent is a built-in agent that runs alongside your custom agents on the unified engine. Switch to it when you want the agent to think through requirements and design before writing code, then execute an implementation plan with verification between each task.
Because Spec is a standard agent, your permissions, hooks, and MCP servers all apply to it the same way they apply to any other agent.
The /spec slash command manages spec workflows:
| Command | What it does |
|---|---|
/spec | List existing specs in the workspace and select one |
/spec new <name> | Start a new spec -- the agent switches to Spec mode and begins requirements |
/spec <name> | Resume an existing spec where you left off |
/spec run <name> | Execute all tasks in a spec's implementation plan autonomously |
When you run /spec new or /spec <name>, the CLI switches to the Spec agent. When execution completes or you manually switch back, the agent returns to your previous mode.
> /spec new auth-middleware Spec agent activated. Let me analyze your request and produce requirements... [Agent produces requirements.md with acceptance criteria] > Looks good, proceed to design. [Agent produces design.md with architecture decisions] > Execute the tasks. [Agent works through tasks.md sequentially, verifying between steps]
Each phase produces a file in .kiro/specs/<name>/:
.kiro/specs/my-feature/ requirements.md design.md tasks.md
You can review and edit these files between phases. The agent respects your changes.
/spec run <name> validates that tasks.md exists, then triggers autonomous execution. The agent works through each task without further prompts, streaming progress as it goes. You can interrupt at any point.
When you run /spec new, the agent asks what kind of spec you want:
Specs are stored in .kiro/specs/ which is shared across all Kiro surfaces. Start a spec in the CLI, continue it in the IDE. The file format is identical.
For the full specs reference, see the IDE documentation:
Specs in CLI