Spec-Kit Integration Quick Reference¶
Commands¶
Scan Spec-Kit¶
./canary --root ./specs/spec-kit --out spec-kit-status.json --csv spec-kit-status.csv
Verify Against GAP¶
./canary verify --root ./specs/spec-kit --gap docs/SPEC_KIT_GAP_ANALYSIS.md --strict
Check Staleness¶
./canary --root ./specs/spec-kit --out status.json --strict
View Results¶
cat spec-kit-status.json | jq '.summary'
cat spec-kit-status.csv | column -t -s,
Token Format¶
Python¶
<!-- CANARY: REQ=REQ-SK-###; FEATURE="Name"; ASPECT=CLI; STATUS=IMPL; OWNER=team; UPDATED=2025-10-15 -->
Bash¶
<!-- CANARY: REQ=REQ-SK-###; FEATURE="Name"; ASPECT=Automation; STATUS=IMPL; OWNER=team; UPDATED=2025-10-15 -->
Markdown/HTML¶
<!-- CANARY: REQ=REQ-SK-###; FEATURE="Name"; ASPECT=Templates; STATUS=IMPL; OWNER=team; UPDATED=2025-10-15 -->
TOML¶
<!-- CANARY: REQ=REQ-SK-###; FEATURE="Name"; ASPECT=Agent; STATUS=IMPL; OWNER=team; UPDATED=2025-10-15 -->
Required Fields¶
REQ: Requirement ID (REQ-SK-###)FEATURE: Short name (quoted if spaces)ASPECT: Category (CLI, Testing, Templates, etc.)STATUS: MISSING/STUB/IMPL/TESTED/BENCHED/REMOVED
Optional Fields¶
TEST: Comma-separated test namesBENCH: Comma-separated benchmark namesOWNER: Team/area responsibleUPDATED: Date (YYYY-MM-DD)
Status Progression¶
MISSING → STUB → IMPL → TESTED → BENCHED
↓
REMOVED
Auto-Promotion¶
IMPL+TEST=→ Auto-promotes toTESTED(IMPL|TESTED)+BENCH=→ Auto-promotes toBENCHED
Requirements Ranges¶
| Category | Range | Count |
|---|---|---|
| Core Workflow Commands | REQ-SK-101 to 108 | 8 |
| CLI Tool Features | REQ-SK-201 to 203 | 3 |
| Template System | REQ-SK-301 to 306 | 6 |
| Constitutional Framework | REQ-SK-401 to 409 | 5 |
| Script Automation | REQ-SK-501 to 504 | 4 |
| Agent Support | REQ-SK-601 to 605 | 5 |
| Documentation System | REQ-SK-701 to 704 | 4 |
| Quality Assurance | REQ-SK-801 to 804 | 4 |
| Package Management | REQ-SK-901 to 903 | 3 |
| Total | 46 |
Common Aspects¶
CLI- Command-line interfaceCore- Core functionalityTemplates- Template filesAutomation- ScriptsAgent- AI agent supportTesting- Test filesBenchmarking- Benchmark filesDocumentation- DocsQuality- Quality assuranceConstitution- Constitutional framework
Documentation Files¶
- SPEC_KIT_INTEGRATION_SUMMARY.md - Overview
- SPEC_KIT_REQUIREMENTS.md - All 46 requirements
- SPEC_KIT_GAP_ANALYSIS.md - Tracking
- SPEC_KIT_INTEGRATION_GUIDE.md - Detailed guide
- CANARY_EXAMPLES_SPEC_KIT.md - Examples
- SPEC_KIT_QUICK_REFERENCE.md - This file
Sample Files with Tokens¶
specs/spec-kit/src/specify_cli/__init__.py- 3 tokensspecs/spec-kit/scripts/bash/create-new-feature.sh- 1 tokenspecs/spec-kit/templates/spec-template.md- 1 tokenspecs/spec-kit/templates/plan-template.md- 1 tokenspecs/spec-kit/templates/commands/specify.md- 1 token
Total: 7 sample tokens demonstrating the integration
Exit Codes¶
0- Success2- Verification or staleness failed3- Parse or IO error
Staleness Check¶
With --strict, canary fails if any TESTED/BENCHED token has UPDATED older than 30 days.
CI/CD Integration¶
- name: Verify Spec-Kit
run: |
./canary verify --root ./specs/spec-kit --gap docs/SPEC_KIT_GAP_ANALYSIS.md --strict
Common Tasks¶
Add New Requirement¶
- Add to
SPEC_KIT_REQUIREMENTS.md - Add to
SPEC_KIT_GAP_ANALYSIS.mdwith ❌ - Add CANARY token to implementation
- Run verification
Update Token¶
- Modify code
- Update
UPDATED=field to current date - Run scan to verify
Link Tests¶
- Create test file
- Add CANARY token with
TEST=TestName - Implementation auto-promotes to TESTED
Link Benchmarks¶
- Create benchmark file
- Add CANARY token with
BENCH=BenchName - Implementation auto-promotes to BENCHED
Best Practices¶
- ✅ Add tokens close to implementation
- ✅ Use consistent FEATURE names
- ✅ Update UPDATED field when modifying
- ✅ Link actual test function names
- ✅ Use separate tokens per aspect
- ✅ Clear OWNER identification
- ✅ Run scanner regularly
Need Help?¶
- Full guide: SPEC_KIT_INTEGRATION_GUIDE.md
- Examples: CANARY_EXAMPLES_SPEC_KIT.md
- Requirements: SPEC_KIT_REQUIREMENTS.md