Loading...
Loading...
Validate Technical Specifications (SPEC) documents against Layer 9 schema standards
npx skill4agent add vladm3105/aidoc-flow-framework doc-spec-validatorai_dev_flow/SPEC/SPEC_SCHEMA.yaml| SPEC Type | Required Location |
|---|---|
| YAML | |
1. Check document is inside a nested folder: docs/09_SPEC/SPEC-NN_{slug}/
2. Verify folder name matches SPEC ID pattern: SPEC-NN_{slug}
3. Verify file name matches folder: SPEC-NN_{slug}.yaml
4. Parent path must be: docs/09_SPEC/docs/09_SPEC/
├── SPEC-01_f1_iam/
│ ├── SPEC-01_f1_iam.yaml ✓ Valid
│ ├── SPEC-01.R_review_report_v001.md
│ └── .drift_cache.json
├── SPEC-02_f2_session/
│ └── SPEC-02_f2_session.yaml ✓ Validdocs/09_SPEC/
├── SPEC-01_f1_iam.yaml ✗ NOT in nested folder| Code | Severity | Description |
|---|---|---|
| SPEC-E020 | ERROR | SPEC not in nested folder (BLOCKING) |
| SPEC-E021 | ERROR | Folder name doesn't match SPEC ID |
| SPEC-E022 | ERROR | File name doesn't match folder name |
File Format:
- Extension: .yaml (NOT .md)
- Naming pattern: SPEC-NNN_descriptive_name.yaml
- Encoding: UTF-8
- YAML version: 1.2Required fields:
- id: Component identifier (snake_case)
- summary: Single-sentence description (10-200 chars)
- metadata: Document control and versioning
- traceability: Upstream and downstream references
- architecture: Component architecture and dependencies
- interfaces: Interface definitions (classes, methods)
- behavior: Behavioral specifications
- performance: Performance targets
- security: Security specifications
- observability: Metrics, logging, health checks
- verification: Test scenarios
- implementation: Implementation specifics
Optional fields:
- caching
- rate_limiting
- circuit_breaker
- operations
- changelog
- maintenance
- notes| Code | Severity | Description |
|---|---|---|
| SPEC-E001 | error | File is not valid YAML |
| SPEC-E002 | error | Missing required top-level field |
| SPEC-E003 | error | Missing required metadata field |
| SPEC-E004 | error | Invalid version format |
| SPEC-E005 | error | Invalid status value |
| SPEC-E006 | error | Invalid date format |
| SPEC-E007 | error | No authors specified |
| SPEC-E008 | error | No classes defined in interfaces |
| SPEC-E009 | error | Class has no methods |
| SPEC-E010 | error | Missing latency_targets in performance |
| SPEC-E011 | error | Missing authentication in security |
| SPEC-E012 | error | Missing metrics in observability |
| SPEC-E013 | warning | File name does not match format |
| SPEC-E014 | error | Missing traceability section |
| SPEC-E015 | error | Missing cumulative_tags in traceability |
| SPEC-W001 | warning | Missing business_requirements in upstream |
| SPEC-W002 | warning | Missing cumulative tags for traceability |
| SPEC-W003 | warning | No BDD scenarios in verification |
| SPEC-W004 | warning | p95 latency not greater than p50 |
| SPEC-W005 | warning | p99 latency not greater than p95 |
| SPEC-W006 | warning | Method name not in snake_case |
| SPEC-W007 | warning | Class name not in PascalCase |
| SPEC-W008 | warning | id field does not match file name |
| SPEC-W009 | warning | task_ready_score below target |
| SPEC-I001 | info | Consider adding caching section |
| SPEC-I002 | info | Consider adding rate_limiting section |
| SPEC-I003 | info | Consider adding circuit_breaker section |
| SPEC-I004 | info | Consider adding operations runbook |
# Validate single SPEC document
python ai_dev_flow/scripts/validate_spec.py docs/09_SPEC/SPEC-001_example.yaml
# Validate all SPEC documents
python ai_dev_flow/scripts/validate_spec.py docs/09_SPEC/
# Check with verbose output
python ai_dev_flow/scripts/validate_spec.py docs/09_SPEC/ --verboseSPEC Validation Report
======================
Document: SPEC-001_example.yaml
Status: PASS/FAIL
YAML Validity: Valid/Invalid
Required Sections:
- metadata: Present/Missing
- traceability: Present/Missing
- architecture: Present/Missing
- interfaces: Present/Missing
- behavior: Present/Missing
- performance: Present/Missing
- security: Present/Missing
- observability: Present/Missing
- verification: Present/Missing
- implementation: Present/Missing
Interface Summary:
- Classes defined: N
- Methods defined: N
Performance Targets:
- p50: Nms
- p95: Nms (> p50: Yes/No)
- p99: Nms (> p95: Yes/No)
Errors: N
Warnings: N
Info: N
[Details listed by severity].claude/skills/doc-spec/SKILL.md.claude/skills/doc-naming/SKILL.mdai_dev_flow/09_SPEC/SPEC_VALIDATION_RULES.mdai_dev_flow/SPEC/SPEC_SCHEMA.yaml| Version | Date | Changes | Author |
|---|---|---|---|
| 1.2 | 2026-02-11 | Nested Folder Rule: Added Section 0 Folder Structure Validation (BLOCKING); SPEC must be in | |
| 1.1.0 | 2026-02-08 | Updated layer assignment from 10 to 9 per LAYER_REGISTRY v1.6; removed @impl from cumulative tags | System |
| 1.0.0 | 2025-01-15 | Initial validator skill definition | System |