Prerequisites
Relevant source files
The following files were used as context for generating this wiki page:To effectively use and contribute to the spec-kit project, a specific set of tools and environmental configurations must be in place. These prerequisites ensure that the Spec-Driven Development (SDD) workflow, powered by the specify CLI and AI coding agents, functions correctly. The requirements span the operating system, core development tools, Python environment, and specific AI agent command-line interfaces.
This document outlines the necessary components for both running the SDD process and for local development on the spec-kit itself. The specify CLI includes checks to validate some of these prerequisites during initialization.
Sources: README.md:86-93, CONTRIBUTING.md:11-15
Core System Requirements
The foundational layer of prerequisites includes the operating system and essential software development tools.
| Tool | Version / Information | Description |
|---|---|---|
| Operating System | Linux/macOS | Required for running the toolchain. WSL2 is the supported method for Windows users. |
| Python | 3.11+ | The minimum required version for running the specify CLI and associated scripts. |
| uv | Latest | The recommended Python package manager for installing and managing dependencies. |
| Git | Latest | Required for version control, branch management, and downloading the project template. |
Sources: README.md:87-93, CONTRIBUTING.md:12-14, src/specify_cli/init.py:4-5
AI Coding Agents
A key component of the Spec-Driven Development workflow is an AI coding agent. The spec-kit is designed to work with several specific agents, and their corresponding CLI tools are often required.
| Agent | CLI Tool | Checked by specify init? |
|---|---|---|
| GitHub Copilot | N/A (IDE Integration) | No |
| Claude Code | claude | Yes |
| Gemini CLI | gemini | Yes |
The specify init command will verify the presence of the claude or gemini CLI tools unless the --ignore-agent-tools flag is used.
This diagram shows the logic within the specify init command for selecting and verifying an AI agent.
Tool Verification
The specify CLI uses a helper function check_tool to determine if a command-line tool is available in the system's PATH.
# src/specify_cli/__init__.py:366-374
def check_tool(tool: str, install_hint: str) -> bool:
"""Check if a tool is installed."""
if shutil.which(tool):
return True
else:
console.print(f"[yellow]⚠️ {tool} not found[/yellow]")
console.print(f" Install with: [cyan]{install_hint}[/cyan]")
return False
Sources: src/specify_cli/init.py:366-374
Python Dependencies
The specify-cli tool itself has a set of Python dependencies required for its operation. These are managed by uv.
| Package | Description |
|---|---|
typer | Used for creating the command-line interface. |
rich | Powers the rich text formatting, progress bars, and panels in the console output. |
platformdirs | Used for determining platform-specific directory paths (though not explicitly used in the provided init logic). |
readchar | Enables cross-platform single-character input for the interactive arrow-key selection menu. |
httpx | Used for making HTTP requests to the GitHub API to download project templates. |
These dependencies are defined in the header of the main CLI script.
# src/specify_cli/__init__.py:3-9
# requires-python = ">=3.11"
# dependencies = [
# "typer",
# "rich",
# "platformdirs",
# "readchar",
# "httpx",
# ]
Sources: src/specify_cli/init.py:3-9
Workflow-Specific Prerequisites
Within the Spec-Driven Development process, certain commands have their own prerequisites, which are checked by helper scripts.
/tasks Command Prerequisites
The /tasks command, which generates an executable task list, depends on the prior completion of the /plan command. This is enforced by scripts/check-task-prerequisites.sh.
The script's primary responsibilities are:
- Verify it is running on a feature branch.
- Check that the feature directory (
specs/[branch-name]/) exists. - Crucially, ensure that
plan.mdexists within the feature directory.
This sequence diagram illustrates the prerequisite check when the /tasks command is invoked.
The script explicitly checks for the implementation plan file:
# scripts/check-task-prerequisites.sh:28-32
# Check for implementation plan (required)
if [[ ! -f "$IMPL_PLAN" ]]; then
echo "ERROR: plan.md not found in $FEATURE_DIR"
echo "Run /plan first to create the plan."
exit 1
fi
This ensures that tasks are only generated after a technical plan has been established, enforcing the structured SDD workflow.
Sources: scripts/check-task-prerequisites.sh:28-32, spec-driven.md:200-204