English | ไธญๆ | ๆฅๆฌ่ช | Espaรฑol | Portuguรชs | ํ๊ตญ์ด | Deutsch | Franรงais
A Spec-Driven Development (SDD) toolkit for Claude Code
CodexSpec helps you build high-quality software through a structured, specification-first approach. Instead of jumping straight to code, you define what to build and why before deciding how to build it.
๐ Documentation | ไธญๆๆๆกฃ | ๆฅๆฌ่ชใใญใฅใกใณใ | ํ๊ตญ์ด ๋ฌธ์ | Documentaciรณn | Documentation | Dokumentation | Documentaรงรฃo
- Why Choose CodexSpec?
- What is Spec-Driven Development?
- Design Philosophy: Human-AI Collaboration
- 30-Second Quick Start
- Installation
- Core Workflow
- Available Commands
- Comparison with spec-kit
- Internationalization
- Contributing & License
Why use CodexSpec on top of Claude Code? Here's the comparison:
| Aspect | Claude Code Only | CodexSpec + Claude Code |
|---|---|---|
| Multi-language Support | Default English interaction | Configure team language for smoother collaboration and reviews |
| Traceability | Hard to trace decisions after session ends | All specs, plans, and tasks saved in .codexspec/specs/ |
| Session Recovery | Plan mode interruptions are hard to recover from | Multi-command split + persisted docs = easy recovery |
| Team Governance | No unified principles, inconsistent styles | constitution.md enforces team standards and quality |
Spec-Driven Development (SDD) is a "specifications first, code later" methodology:
Traditional: Idea โ Code โ Debug โ Rewrite
SDD: Idea โ Spec โ Plan โ Tasks โ Code
Why use SDD?
| Problem | SDD Solution |
|---|---|
| AI misunderstandings | Specs clarify "what to build", AI stops guessing |
| Missing requirements | Interactive clarification discovers edge cases |
| Architecture drift | Review checkpoints ensure correct direction |
| Wasted rework | Problems are found before code is written |
โจ Key Features
- Constitution-Based Development - Establish project principles that guide all decisions
- Two-Phase Specification - Interactive clarification (
/specify) followed by document generation (/generate-spec) - Automatic Reviews - Every artifact includes built-in quality checks
- TDD-Ready Tasks - Task breakdowns enforce test-first methodology
- Review Commands - Dedicated review commands for spec, plan, and tasks
- Interactive Clarification - Q&A-based requirement refinement
- Cross-Artifact Analysis - Detect inconsistencies before implementation
- Native Claude Code Integration - Slash commands work seamlessly
- Multi-Language Support - 13+ languages via LLM dynamic translation
- Cross-Platform - Bash and PowerShell scripts included
- Extensible - Plugin architecture for custom commands
CodexSpec is built on the belief that effective AI-assisted development requires active human participation at every stage.
| Without Reviews | With Reviews |
|---|---|
| AI makes wrong assumptions | Humans catch misunderstandings early |
| Incomplete requirements propagate | Gaps identified before implementation |
| Architecture drifts from intent | Alignment verified at each stage |
| Tasks miss critical features | Systematic coverage validation |
| Result: Rework, wasted effort | Result: Get it right the first time |
CodexSpec structures development into reviewable checkpoints:
Idea โ /specify โ /generate-spec โ /spec-to-plan โ /plan-to-tasks โ /implement
โ โ โ
Review spec Review plan Review tasks
โ โ โ
โ
Human โ
Human โ
Human
Every artifact has a corresponding review command:
spec.mdโ/codexspec:review-specplan.mdโ/codexspec:review-plantasks.mdโ/codexspec:review-tasks- All artifacts โ
/codexspec:analyze
This systematic review process ensures:
- Early error detection: Catch misunderstandings before code is written
- Alignment verification: Confirm AI's interpretation matches your intent
- Quality gates: Validate completeness, clarity, and feasibility at each stage
- Reduced rework: Invest minutes in review to save hours of reimplementation
# 1. Install
uv tool install codexspec
# 2. Initialize project
# Option A: Create new project
codexspec init my-project && cd my-project
# Option B: Initialize in existing project
cd your-existing-project && codexspec init .
# 3. Use in Claude Code
claude
> /codexspec:constitution Create principles focused on code quality and testing
> /codexspec:specify I want to build a todo application
> /codexspec:generate-spec
> /codexspec:spec-to-plan
> /codexspec:plan-to-tasks
> /codexspec:implement-tasksThat's it! Read on for the complete workflow.
- Python 3.11+
- uv (recommended) or pip
# Using uv (recommended)
uv tool install codexspec
# Or using pip
pip install codexspeccodexspec --version๐ฆ Alternative Installation Methods
# Create new project
uvx codexspec init my-project
# Initialize in existing project
cd your-existing-project
uvx codexspec init . --ai claude# Using uv
uv tool install git+https://github.com/Zts0hg/codexspec.git
# Specify branch or tag
uv tool install git+https://github.com/Zts0hg/codexspec.git@main
uv tool install git+https://github.com/Zts0hg/codexspec.git@v0.5.6๐ช Notes for Windows Users
Recommended: Use PowerShell
# 1. Install uv (if not already installed)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# 2. Restart PowerShell, then install codexspec
uv tool install codexspec
# 3. Verify installation
codexspec --versionCMD Troubleshooting
If you encounter "Access denied" errors:
- Close all CMD windows and reopen
- Or manually refresh PATH:
set PATH=%PATH%;%USERPROFILE%\.local\bin - Or use full path:
%USERPROFILE%\.local\bin\codexspec.exe --version
For detailed troubleshooting, see Windows Troubleshooting Guide.
# Using uv
uv tool install codexspec --upgrade
# Using pip
pip install --upgrade codexspecCodexSpec is also available as a Claude Code plugin. This method is ideal if you want to use CodexSpec commands directly in Claude Code without the CLI tool.
# In Claude Code, add the marketplace
> /plugin marketplace add Zts0hg/codexspec
# Install the plugin
> /plugin install codexspec@codexspec-marketAfter installing via Plugin Marketplace, configure your preferred language using the /codexspec:config command:
# Start interactive configuration
> /codexspec:config
# Or view current configuration
> /codexspec:config --viewThe config command will guide you through:
- Selecting output language (for generated documents)
- Selecting commit message language
- Creating the
.codexspec/config.ymlfile
Comparison of Installation Methods
| Method | Best For | Features |
|---|---|---|
CLI Installation (uv tool install) |
Full development workflow | CLI commands (init, check, config) + slash commands |
| Plugin Marketplace | Quick start, existing projects | Slash commands only (use /codexspec:config for language setup) |
Note: The plugin uses strict: false mode and reuses the existing multi-language support via LLM dynamic translation.
CodexSpec breaks development into reviewable checkpoints:
Idea โ /specify โ /generate-spec โ /spec-to-plan โ /plan-to-tasks โ /implement
โ โ โ
Review spec Review plan Review tasks
โ โ โ
โ
Human โ
Human โ
Human
| Step | Command | Output | Human Check |
|---|---|---|---|
| 1. Project Principles | /codexspec:constitution |
constitution.md |
โ |
| 2. Requirement Clarification | /codexspec:specify |
None (interactive dialogue) | โ |
| 3. Generate Spec | /codexspec:generate-spec |
spec.md + auto-review |
โ |
| 4. Technical Planning | /codexspec:spec-to-plan |
plan.md + auto-review |
โ |
| 5. Task Breakdown | /codexspec:plan-to-tasks |
tasks.md + auto-review |
โ |
| 6. Cross-Artifact Analysis | /codexspec:analyze |
Analysis report | โ |
| 7. Implementation | /codexspec:implement-tasks |
Code | - |
| Aspect | /codexspec:specify |
/codexspec:clarify |
|---|---|---|
| Purpose | Initial requirement exploration | Refine existing spec |
| When to Use | No spec.md exists yet | spec.md needs improvement |
| Output | None (dialogue only) | Updates spec.md |
| Method | Open-ended Q&A | Structured scan (4 categories) |
| Questions | Unlimited | Max 5 per run |
Every generation command includes automatic review, generating a review report. You can:
- Review the report
- Describe issues to fix in natural language
- System automatically updates specs and review reports
%%{init: {
'theme': 'base',
'themeVariables': {
'lineColor': '#888888',
'primaryColor': '#2d2d2d',
'primaryTextColor': '#ffffff',
'primaryBorderColor': '#666666'
},
'flowchart': {
'curve': 'stepBefore',
'nodeSpacing': 50,
'rankSpacing': 40
}
}}%%
flowchart TB
classDef rectStyle fill:#2d2d2d,stroke:#666,stroke-width:1px,color:#fff,width:220px;
classDef diamondStyle fill:#3d3d3d,stroke:#888,stroke-width:2px,color:#fff;
A["Generate Spec/Plan/Tasks"]:::rectStyle --> B["Auto Review"]:::rectStyle
B --> C{"Issues Found?"}:::diamondStyle
C -->|Yes| D["Describe Fix in Natural Language"]:::rectStyle
D --> E["Update Spec + Review Report"]:::rectStyle
E --> B
C -->|No| F["Continue to Next Step"]:::rectStyle
linkStyle 2,4 stroke:#aaa,stroke-width:1px;
๐ Detailed Workflow Description
codexspec init my-awesome-project
cd my-awesome-project
claude/codexspec:constitution Create principles focused on code quality, testing standards, and clean architecture
/codexspec:specify I want to build a task management application
This command will:
- Ask clarifying questions to understand your idea
- Explore edge cases you might not have considered
- NOT generate files automatically - you stay in control
Once requirements are clarified:
/codexspec:generate-spec
This command:
- Compiles clarified requirements into structured specification
- Automatically runs review and generates
review-spec.md
/codexspec:spec-to-plan Use Python FastAPI for backend, PostgreSQL for database, React for frontend
Includes constitutionality review - verifies plan aligns with project principles.
/codexspec:plan-to-tasks
Tasks are organized into standard phases:
- TDD Enforcement: Test tasks precede implementation tasks
- Parallel Markers
[P]: Identify independent tasks - File Path Specifications: Clear deliverables per task
/codexspec:analyze
Detects issues across spec, plan, and tasks:
- Coverage gaps (requirements without tasks)
- Duplication and inconsistencies
- Constitution violations
- Underspecified items
/codexspec:implement-tasks
Implementation follows conditional TDD workflow:
- Code tasks: Test-first (Red โ Green โ Verify โ Refactor)
- Non-testable tasks (docs, config): Direct implementation
| Command | Description |
|---|---|
codexspec init |
Initialize a new project |
codexspec check |
Check for installed tools |
codexspec version |
Display version information |
codexspec config |
View or modify configuration |
๐ init Options
| Option | Description |
|---|---|
PROJECT_NAME |
Project directory name |
--here, -h |
Initialize in current directory |
--ai, -a |
AI assistant to use (default: claude) |
--lang, -l |
Output language (e.g., en, zh-CN, ja) |
--force, -f |
Force overwrite existing files |
--no-git |
Skip git initialization |
--debug, -d |
Enable debug output |
๐ config Options
| Option | Description |
|---|---|
--set-lang, -l |
Set output language |
--set-commit-lang, -c |
Set commit message language |
--list-langs |
List all supported languages |
| Command | Description |
|---|---|
/codexspec:constitution |
Create/update project constitution with cross-artifact validation |
/codexspec:specify |
Clarify requirements through interactive Q&A |
/codexspec:generate-spec |
Generate spec.md document โ
Auto-review |
/codexspec:spec-to-plan |
Convert spec to technical plan โ Auto-review |
/codexspec:plan-to-tasks |
Break down plan into atomic tasks โ Auto-review |
/codexspec:implement-tasks |
Execute tasks (conditional TDD) |
| Command | Description |
|---|---|
/codexspec:review-spec |
Review specification (auto or manual) |
/codexspec:review-plan |
Review technical plan (auto or manual) |
/codexspec:review-tasks |
Review task breakdown (auto or manual) |
| Command | Description |
|---|---|
/codexspec:config |
Manage project configuration (create/view/modify/reset) |
/codexspec:clarify |
Scan spec for ambiguities (4 categories, max 5 questions) |
/codexspec:analyze |
Cross-artifact consistency analysis (read-only, severity-based) |
/codexspec:checklist |
Generate requirements quality checklist |
/codexspec:tasks-to-issues |
Convert tasks to GitHub Issues |
| Command | Description |
|---|---|
/codexspec:commit-staged |
Generate commit message from staged changes |
/codexspec:pr |
Generate PR/MR description (auto-detect platform) |
| Command | Description |
|---|---|
/codexspec:review-code |
Review code in any language (idiomatic clarity, correctness, robustness, architecture) |
CodexSpec is inspired by GitHub spec-kit with key differences:
| Feature | spec-kit | CodexSpec |
|---|---|---|
| Core Philosophy | Spec-driven development | Spec-driven + Human-AI collaboration |
| CLI Name | specify |
codexspec |
| Primary AI | Multi-agent support | Focused on Claude Code |
| Constitution System | Basic | Full constitution + cross-artifact validation |
| Two-Phase Spec | No | Yes (clarify + generate) |
| Review Commands | Optional | 3 dedicated review commands + scoring |
| Clarify Command | Yes | 4 focus categories, review integration |
| Analyze Command | Yes | Read-only, severity-based, constitution-aware |
| TDD in Tasks | Optional | Enforced (tests before implementation) |
| Implementation | Standard | Conditional TDD (code vs docs/config) |
| Extension System | Yes | Yes |
| PowerShell Scripts | Yes | Yes |
| i18n Support | No | Yes (13+ languages via LLM translation) |
- Review-First Culture: Every major artifact has a dedicated review command
- Constitution Governance: Principles are validated, not just documented
- TDD by Default: Test-first methodology enforced in task generation
- Human Checkpoints: Workflow designed around validation gates
CodexSpec supports multiple languages through LLM dynamic translation. No translation templates to maintain - Claude translates content at runtime based on your language configuration.
During initialization:
# Create Chinese output project
codexspec init my-project --lang zh-CN
# Create Japanese output project
codexspec init my-project --lang jaAfter initialization:
# View current configuration
codexspec config
# Change output language
codexspec config --set-lang zh-CN
# Set commit message language
codexspec config --set-commit-lang en| Code | Language |
|---|---|
en |
English (default) |
zh-CN |
็ฎไฝไธญๆ |
zh-TW |
็น้ซไธญๆ |
ja |
ๆฅๆฌ่ช |
ko |
ํ๊ตญ์ด |
es |
Espaรฑol |
fr |
Franรงais |
de |
Deutsch |
pt-BR |
Portuguรชs |
ru |
ะ ัััะบะธะน |
it |
Italiano |
ar |
ุงูุนุฑุจูุฉ |
hi |
เคนเคฟเคจเฅเคฆเฅ |
โ๏ธ Configuration File Example
.codexspec/config.yml:
version: "1.0"
language:
output: "zh-CN" # Output language
commit: "zh-CN" # Commit message language (defaults to output)
templates: "en" # Keep as "en"
project:
ai: "claude"
created: "2025-02-15"Project structure after initialization:
my-project/
โโโ .codexspec/
โ โโโ memory/
โ โ โโโ constitution.md # Project constitution
โ โโโ specs/
โ โ โโโ {feature-id}/
โ โ โโโ spec.md # Feature specification
โ โ โโโ plan.md # Technical plan
โ โ โโโ tasks.md # Task breakdown
โ โ โโโ checklists/ # Quality checklists
โ โโโ templates/ # Custom templates
โ โโโ scripts/ # Helper scripts
โ โโโ extensions/ # Custom extensions
โโโ .claude/
โ โโโ commands/ # Claude Code slash commands
โโโ CLAUDE.md # Claude Code context
CodexSpec supports a plugin architecture for custom commands:
my-extension/
โโโ extension.yml # Extension manifest
โโโ commands/ # Custom slash commands
โ โโโ command.md
โโโ README.md
See extensions/EXTENSION-DEVELOPMENT-GUIDE.md for details.
- Python 3.11+
- uv package manager
- Git
# Clone repository
git clone https://github.com/Zts0hg/codexspec.git
cd codexspec
# Install dev dependencies
uv sync --dev
# Run locally
uv run codexspec --help
# Run tests
uv run pytest
# Lint code
uv run ruff check src/
# Build package
uv buildContributions are welcome! Please read the contributing guidelines before submitting a pull request.
MIT License - see LICENSE for details.
- Inspired by GitHub spec-kit
- Built for Claude Code