This repository is a collection of reusable AI agents, workflows, skills, rules, and tools to help teams follow:
- Test Driven Development (TDD) - Red → Green → Refactor
- V-model development - Requirements → Design → Implementation → Verification
- Critical design reviews (CDR) and document reviews
- Bidirectional traceability - REQ ↔ Design ↔ Test
- Change-aware documentation - Docs evolve with code
- CI enforcement - Automated quality gates
# 1. Check current traceability status
python tools/traceability/check_traceability.py --docs docs --tests tests
# 2. Find next available IDs
python tools/traceability/find_next_id.py
# 3. Validate requirement quality
python tools/traceability/validate_requirements.py
# 4. Run tests
pytest.cursor/
rules/ # Contextual rules (auto-applied based on file patterns)
prompts/ # Reusable prompt templates for common workflows
agents/
orchestrator.md # Meta-agent: coordinates workflows
workflows/ # Pre-defined workflow patterns
skills/ # Reusable task-focused capabilities
*.md # Role-focused agent playbooks
docs/
product/ # PRDs, customer/user goals, roadmap notes
requirements/ # Verifiable requirements (REQ-xxxx) - YAML
use_cases/ # Use cases (UC-xxxx) - Markdown
design/ # Design specs (DES-xxxx) - Markdown
verification/ # Verification plans - YAML
test_plans/ # Test plans - YAML
traceability/ # Traceability conventions + reports
reviews/ # Review checklists and gates
user/ # User-facing docs and guides
src/ # Production source code (C++/Python)
tests/ # Unit/integration/system tests
tools/ # Repository tooling (traceability, validation)
.github/workflows/ # CI/CD workflows
All artifacts use stable, traceable IDs:
| Type | Format | Example | Location |
|---|---|---|---|
| Requirement | REQ-XXXX |
REQ-0001 |
docs/requirements/ |
| Use Case | UC-XXXX |
UC-0001 |
docs/use_cases/ |
| Design | DES-XXXX |
DES-0001 |
docs/design/ |
| Test | TST-XXXX |
TST-0001 |
tests/ (optional) |
- Design documents must reference requirements (e.g.,
Traces to: REQ-0001) - Tests must reference requirements (e.g., comment
# REQ-0001) - CI enforces that every requirement has design and test coverage
┌─────────────────────────────────────────────────────────────────┐
│ ORCHESTRATOR │
│ Coordinates workflow, selects sub-agents │
└─────────────────────────────────────────────────────────────────┘
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
REQUIREMENTS DESIGN IMPLEMENTATION
- requirements-author - design-author - tdd-coach
- requirements-reviewer- cdr-reviewer - test-generator
- use-case-author - test-reviewer
- cpp-quality-enforcer
- python-quality-enforcer
└─────────────────────┼─────────────────────┘
▼
CROSS-CUTTING
- traceability-manager
- ci-impact-reviewer
- doc-change-manager
- user-doc-reviewer
- Start with the orchestrator (
agents/orchestrator.md) to determine workflow - Pick the appropriate agent for your current task
- Follow pre-defined workflows in
agents/workflows/for common scenarios - Use prompt templates in
.cursor/prompts/for quick access
See agents/README.md for the complete agent catalog.
This repository includes Cursor-specific configurations:
Applied to all interactions, defining project conventions.
Auto-applied based on file patterns:
requirements.mdc- When editingdocs/requirements/**design.mdc- When editingdocs/design/**tests.mdc- When editingtests/**python-src.mdc- When editing**/*.pycpp-src.mdc- When editing**/*.cpp,**/*.hci-workflows.mdc- When editing.github/workflows/**
Ready-to-use prompts for:
- TDD cycle:
tdd-red.md,tdd-green.md,tdd-refactor.md - Requirements:
new-requirement.md,create-design.md - Quality:
generate-tests.md,check-traceability.md,code-review.md
python tools/traceability/check_traceability.py --docs docs --tests testspython tools/traceability/generate_matrix.py --output docs/traceability/matrix.mdpython tools/traceability/find_next_id.pypython tools/traceability/validate_requirements.py1. requirements-author → Create REQ-xxxx
2. requirements-reviewer → Validate requirements
3. design-author → Create DES-xxxx with REQ refs
4. cdr-reviewer → Critical design review
5. traceability-manager → Verify REQ↔DES links
6. tdd-coach → Write failing tests (Red)
7. [implement] → Make tests pass (Green)
8. [refactor] → Improve code quality
9. test-reviewer → Review test quality
10. ci-impact-reviewer → Ensure CI coverage
1. Identify affected REQ-xxxx
2. Write failing test reproducing bug
3. Fix with minimal change
4. Verify all tests pass
5. Run traceability check
1. Verify test coverage
2. Add tests for gaps
3. Refactor in small steps (keep tests green)
4. Run traceability check
Install git hooks to enforce TDD + V-model practices before every commit:
# Install hooks
./tools/hooks/install-hooks.sh
# Or manually
pip install pre-commit && pre-commit install| Check | Description |
|---|---|
| Ruff lint/format | Python code quality |
| Traceability | REQ↔DES↔TEST links complete |
| Requirement validation | Quality of requirement statements |
| Test REQ references | Tests must reference REQ-xxxx |
| Design traces | Design docs must have "Traces to" |
See tools/hooks/README.md for details.
The GitHub Actions workflow (.github/workflows/quality.yml) runs:
- Ruff lint - Python style
- Ruff format - Python formatting
- Pytest - Test execution
- Traceability check - REQ↔DES↔TEST coverage
All checks must pass before merging.
-
Find next ID:
python tools/traceability/find_next_id.py --type REQ
-
Create requirement file:
cp docs/requirements/requirements-template.yaml docs/requirements/REQ-0002-my-feature.yaml
-
Edit with your requirement details
-
Create matching design:
cp docs/design/design-template.md docs/design/DES-0002-my-feature.md
-
Add
Traces to: REQ-0002in design doc -
Write tests with
# REQ-0002comments -
Verify traceability:
python tools/traceability/check_traceability.py --docs docs --tests tests
See LICENSE file.