Spec-Flow automates feature development with AI-powered spec-driven workflows. Operations teams benefit from repeatable Claude Code workflows, quality gates, and auditable artifacts. Connects to npm for package management and integrates with existing development tools.
git clone https://github.com/marcusgoll/Spec-Flow.gitSpec-Flow is a workflow toolkit that transforms feature development by replacing ad-hoc prompting with a structured pipeline. It automates the journey from specification through planning, task breakdown, implementation with test-driven development, quality validation, and deployment. The tool enforces TDD, runs parallel quality gates including performance and security checks, and maintains auditable artifacts at every phase. Teams using Spec-Flow benefit from repeatable patterns, efficient context management, and complete traceability of decisions. Installation adds workflow files to your project with no package.json dependency, and commands like /feature, /epic, and /quick integrate directly into Claude Code.
1. **Prepare your spec document**: Upload your feature specification to a URL (e.g., Confluence, Notion, or a hosted Markdown file) or use a local file path. Ensure it includes clear acceptance criteria and edge cases. 2. **Customize the workflow**: Replace [FEATURE_NAME], [SPEC_DOCUMENT_URL], [TEST_COVERAGE_THRESHOLD], and [BRANCH_NAME] with your project's values. For npm projects, keep [PACKAGE_MANAGER] as 'npm'; switch to 'pnpm' or 'yarn' if needed. 3. **Run the generator**: Execute the Claude Code script in your terminal with `claude code generate-workflow.js` or use the prompt directly in your AI assistant. The script will create: - Test files in `specs/[FEATURE_NAME]/` - Quality gate configuration - GitHub Actions workflow - Changelog template 4. **Integrate with your toolchain**: Commit the generated files to your repository. Spec-Flow will automatically: - Run tests on push - Enforce coverage thresholds - Generate audit logs - Create PR comments with results 5. **Iterate and refine**: Review the auto-generated tests and coverage reports. Adjust your spec document if tests reveal gaps. Use the changelog template to document changes before merging. **Tips for Better Results:** - Use structured spec formats (e.g., Gherkin, OpenAPI) for more accurate test generation. - Start with a small feature to validate the workflow before scaling to larger projects. - Combine with `claude code --review` to get AI feedback on the generated tests before committing.
Automating feature development from specification to production deployment
Enforcing test-driven development and quality gates across teams
Breaking down large epics into parallel sprints with locked API contracts
Creating auditable artifacts for compliance and knowledge retention
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/marcusgoll/Spec-FlowCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a Spec-Flow workflow for [FEATURE_NAME] that includes: 1) A Claude Code script to auto-generate test cases from [SPEC_DOCUMENT_URL], 2) A quality gate that enforces [TEST_COVERAGE_THRESHOLD]% coverage, 3) A GitHub Actions workflow to run tests on [BRANCH_NAME] pushes, and 4) A changelog entry template for [VERSION_NUMBER]. Use [PACKAGE_MANAGER] (npm/pnpm/yarn) for dependency management.
### Spec-Flow Workflow for 'User Authentication Refresh'
**1. Auto-Generated Test Cases (Claude Code Script)**
```javascript
// Generated from: https://specs.company.com/auth-refresh-2024
const testCases = [
{ scenario: 'Valid credentials with 2FA enabled', expected: 'Returns JWT token', steps: ['POST /auth/login', 'Verify 2FA code'] },
{ scenario: 'Expired refresh token', expected: 'Returns 401 Unauthorized', steps: ['POST /auth/refresh', 'Verify token age'] },
{ scenario: 'Rate-limited login attempts', expected: 'Returns 429 Too Many Requests', steps: ['POST /auth/login (5x)'] }
];
```
**2. Quality Gate Configuration**
```yaml
# .spec-flow/quality-gate.yml
coverage_threshold: 85
required_tests:
- auth.spec.ts
- refresh-token.spec.ts
- rate-limiting.spec.ts
```
**3. GitHub Actions Workflow**
```yaml
# .github/workflows/spec-flow.yml
name: Spec-Flow CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx spec-flow generate --spec https://specs.company.com/auth-refresh-2024
- run: npm test
- run: npx spec-flow audit --threshold 85
```
**4. Changelog Entry Template**
```markdown
## [2.1.0] - 2024-05-15
### Added
- User authentication refresh flow with 2FA support (#1234)
- Automated test generation via Spec-Flow
### Changed
- Updated refresh token logic to use [NEW_ALGORITHM]
### Fixed
- Rate-limiting edge case for high-traffic scenarios
```
**Artifacts Generated:**
- `auth-refresh.spec.ts` (12 test cases, 87% coverage)
- `refresh-token.spec.ts` (8 test cases, 92% coverage)
- GitHub PR comment with test results and coverage report
- Audit log entry in `spec-flow/audit.log`
**Next Steps:**
1. Review auto-generated tests in `specs/auth-refresh/`
2. Merge PR #1234 after approval
3. Deploy to staging for manual QA
4. Promote to production after 24h monitoringCreate and collaborate on interactive animations with powerful, user-friendly tools.
AI assistant built for thoughtful, nuanced conversation
Secure bash execution for AI agents
Get more done every day with Microsoft Teams – powered by AI
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan