Create AI-powered specifications using the SpecFlow framework
npm install create-specflow-projectš The official CLI for creating AI-powered software specifications using the SpecFlow framework. Build better software by starting with clear, convergent specifications that AI assistants can understand and implement.
``bashCreate a new SpecFlow project
npx create-specflow-project my-app
cd my-app
What is SpecFlow?
SpecFlow is a framework for creating machine-readable specifications that AI assistants can use to generate production-ready code. It consists of 6 interconnected templates:
1. PIS - Product Intent Specification (Vision & Goals)
2. DKB - Domain Knowledge Base (Business Rules)
3. UXS - User Experience Specification (User Journeys)
4. DSS - Design System Specification (Visual Design)
5. TAB - Technical Architecture Blueprint (System Design)
6. BSM - Behavioral Specification Matrix (Test Scenarios)
Features
- š¤ Multi-AI Support - Works with Claude, Gemini, and GPT-5
- š Guided Creation - AI interviews you to create specs
- š Document Convergence - Ensures consistency across all specs
- š Progress Tracking - Know exactly where you are
- ā
Validation - Automatic consistency checking
- š¦ Export Ready - Generate markdown, JSON, or PDF
š¦ Installation & Setup
$3
`bash
Create a new project directly (no installation needed)
npx create-specflow-project@latest my-project
cd my-project
`$3
`bash
Install globally
npm install -g create-specflow-projectCreate a project
create-specflow-project my-project
cd my-project
`$3
`bash
Skip Git initialization
npx create-specflow-project my-project --skip-gitSkip telemetry
npx create-specflow-project my-project --skip-telemetryBoth options
npx create-specflow-project my-project --skip-git --skip-telemetry
`$3
- Node.js: 16.0.0 or higher (check with
node --version)
- npm: 7.0.0 or higher (check with npm --version)
- Git: Optional, for version control
- AI Editor: Claude Code CLI, Cursor, VS Code, or any text editorProject Structure
After installation, your project will have:
`
my-project/
āāā specs/ # The 6 SpecFlow templates
ā āāā 01_PIS.md # Product Intent
ā āāā 02_DKB.md # Domain Knowledge
ā āāā 03_UXS.md # User Experience
ā āāā 04_DSS.md # Design System
ā āāā 05_TAB.md # Technical Architecture
ā āāā 06_BSM.md # Behavioral Specs
āāā .specflow/ # State and configuration
ā āāā state.json # Progress tracking
ā āāā config.json # User preferences
āāā CLAUDE.md # Instructions for Claude
āāā GEMINI.md # Instructions for Gemini
āāā GPT5.md # Instructions for GPT-5
āāā start-prompt.txt # Quick start prompt
āāā README.md # Project documentation
`Usage
$3
1. Open your project in Claude Code CLI
2. Say: "Load CLAUDE.md and execute /specflow start"
3. Follow the guided process
$3
1. Open your project in your preferred editor
2. Load GEMINI.md into Gemini
3. Execute:
/specflow start$3
1. Open your project
2. Load GPT5.md into GPT-5
3. Execute:
/specflow startCommands
All AI assistants support these commands:
-
/specflow start - Begin specification process
- /specflow status - Check progress
- /specflow validate - Validate specifications
- /specflow converge - Check convergence score
- /specflow export [format] - Export specificationsConfiguration
Edit
.specflow/config.json to customize:`json
{
"convergence_threshold": 85, // When documents are "ready"
"max_iterations": 3, // Max rounds before human decides
"auto_validate": true, // Validate on each change
"preferred_model": "claude", // Default AI model
"telemetry": true // Anonymous usage stats
}
`The SpecFlow Process
1. Foundation Phase: Define your product vision (PIS) and technical approach (TAB)
2. Journey Cycles: For each feature, elaborate UXS, DKB, DSS, and TAB
3. Convergence: Documents negotiate until they agree (85% threshold)
4. Synthesis: Generate comprehensive test scenarios (BSM)
5. Export: Create final blueprint for implementation
Convergence Scoring
Documents must agree on:
- Reference integrity (25%) - All references valid
- Naming consistency (20%) - Same terms everywhere
- Requirement coverage (25%) - PIS goals addressed
- No conflicts (20%) - No contradictions
- Completeness (10%) - No gaps or TODOs
š§ Troubleshooting
$3
#### "npx: command not found"
`bash
Install Node.js and npm from nodejs.org
Or use a version manager like nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 16
`#### "TypeError: inquirer.prompt is not a function"
`bash
Clear npm cache and reinstall
npm cache clean --force
npx clear-npx-cache
npx create-specflow-project@latest my-app
`#### "Directory already exists"
`bash
Choose a different name or remove the existing directory
rm -rf my-app # Be careful!
npx create-specflow-project my-app
`#### "Command not recognized" in AI
Make sure to load the appropriate AI instruction file:
- Claude: Load CLAUDE.md first
- Gemini: Load GEMINI.md first
- GPT: Load GPT5.md first
#### "Low convergence score"
`bash
Run validation to see specific issues
/specflow validate
Address each issue one by one
Re-run convergence check
/specflow converge
`#### "State lost between sessions"
- State is saved in
.specflow/state.json
- Make sure this file isn't deleted
- Keep the project directory intact between sessionsPrivacy & Telemetry
Basic anonymous telemetry is collected to improve the framework:
- Project creation events
- Node.js version
- Timestamp
To opt out:
--skip-telemetry flag or set telemetry: false` in config.jsonWe welcome contributions! Visit our GitHub repository
MIT Ā© SpecFlow Team
- Documentation: SpecFlow Docs
- Issues: GitHub Issues
- Discussions: GitHub Discussions
---
Built with ā¤ļø for the future of AI-assisted development