The /speckit.implement command is the final execution phase of the Spec-Driven Development workflow. It transforms a validated implementation plan and task breakdown into working code by systematically executing tasks in dependency order, following test-driven development principles, and invoking local CLI commands as needed.
This command operates after the planning and task generation phases. For task generation, see /speckit.tasks Command. For quality validation during implementation, see /speckit.checklist Command.
Sources: README.md129-133 README.md259 README.md597-615
Before execution begins, /speckit.implement validates that all required artifacts are in place:
| Artifact | Location | Purpose |
|---|---|---|
constitution.md | .specify/memory/ | Architectural principles and constraints |
spec.md | .specify/specs/NNN-feature-name/ | Feature specification |
plan.md | .specify/specs/NNN-feature-name/ | Technical implementation plan |
tasks.md | .specify/specs/NNN-feature-name/ | Ordered task breakdown |
The command halts if any prerequisite is missing, preventing incomplete or inconsistent implementations.
Sources: README.md603-606
Execution Principles:
tasks.md, respecting inter-task dependencies (e.g., data models before services)[P] can execute concurrently if the AI agent supports parallelizationSources: README.md584-594 README.md603-610
The tasks.md file generated by /speckit.tasks provides the execution blueprint:
Key Elements:
[P] suffix indicates safe parallel executionSources: README.md584-594
Sources: README.md599-615
Tasks execute in the order specified in tasks.md, which already accounts for dependencies. The agent must:
[P] tasks one at a time[P] tasks for concurrent executionWhen tests are included in the task breakdown:
Sources: README.md584-594 README.md608
The /speckit.implement command executes local CLI tools directly, not through remote APIs. This enables:
| Category | Example Commands | Purpose |
|---|---|---|
| Project Initialization | dotnet new, npm init, cargo new | Bootstrap project structure |
| Dependency Management | npm install, pip install, dotnet add package | Install libraries |
| Build & Compilation | dotnet build, npm run build, cargo build | Compile source code |
| Test Execution | dotnet test, npm test, pytest | Run test suites |
| Database Operations | dotnet ef migrations add, npm run migrate | Schema management |
| Development Servers | npm run dev, dotnet run, python manage.py runserver | Local testing |
Critical Requirements:
check-prerequisites.sh)plan.md (e.g., NODE_ENV, ASPNETCORE_ENVIRONMENT)Sources: README.md610-613 README.md175
When a task specifies a file to create/modify:
The implementation must adhere to the constitutional principles established in .specify/memory/constitution.md:
| Constitutional Check | Implementation Impact |
|---|---|
| Library-First Principle | Prefer standard library features over custom abstractions |
| CLI Interface Mandate | Generate CLI entry points for executable functionality |
| Test-First Imperative | Write tests before implementation code |
| Simplicity Gate | Use ≤3 projects/modules unless complexity is justified |
| Anti-Abstraction Gate | Use framework features directly without extra layers |
| Integration-First Testing | Write integration tests with real dependencies |
Sources: README.md404-405 README.md574
Sources: README.md609-610 README.md614-615
After successful execution, the following artifacts exist:
project-root/
├── src/ # Source code
│ ├── models/ # Data models
│ ├── services/ # Business logic
│ ├── api/ # API endpoints
│ └── cli/ # CLI entry points
├── tests/ # Test suites
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
├── docs/ # Generated documentation
└── .specify/
└── specs/NNN-feature/
├── spec.md # Unchanged
├── plan.md # Unchanged
└── tasks.md # Checkboxes marked complete
As tasks complete, the agent marks checkboxes in tasks.md:
Sources: README.md438-459 README.md500-528
| Command | Output | Used By /speckit.implement |
|---|---|---|
/speckit.constitution | constitution.md | Validates architectural compliance |
/speckit.specify | spec.md | Provides feature requirements |
/speckit.plan | plan.md, data-model.md, contracts/ | Guides technical decisions |
/speckit.tasks | tasks.md | Defines execution sequence |
Sources: README.md249-270
[P], execute in paralleltask.cs and user.cs following data-model.mdtask_tests.csdotnet test tests/unit/task_tests.cs (expected to fail)task_service.cs to pass testsdotnet test tests/unit/task_tests.cs (expected to pass)Sources: README.md584-594 README.md603-610
specify check to verify all required CLI tools are availabletasks.md for completeness and orderingSources: README.md610-615
The /speckit.implement command operates within the feature branch context established by /speckit.specify. The branch structure follows:
main
└── 001-feature-name (created by /speckit.specify)
└── .specify/specs/001-feature-name/
├── spec.md
├── plan.md
└── tasks.md (read by /speckit.implement)
For details on branch creation and management, see Feature Creation and Branch Management.
Sources: README.md434-436 README.md441-459
Refresh this wiki