This guide covers integrating spec validation into your development workflow and CI/CD pipeline.
Spec-Guard validates all specifications against SEA™ Forge’s governance requirements:
1
2
3
4
5
6
7
# Validate all specifications
just spec-guard
# Expected output:
# ✓ 150 specs validated
# ✓ 0 errors
# ⚠ 3 warnings (optional review)
1
2
3
4
5
# Validate specific SDS
just sds-validate docs/specs/semantic-core/sds/002-dsl-management.md
# Validate SEA™ DSL
just sea-validate docs/specs/semantic-core/domain.sea
Spec-Guard runs automatically in CI:
1
2
3
4
5
6
# .github/workflows/ci.yml
jobs:
validate:
steps:
- name: Validate Specs
run: just spec-guard
Every spec must have valid frontmatter:
1
2
3
4
5
6
7
8
9
10
11
---
id: SDS-XXX
title: Service Name
status: draft | approved | deprecated
version: 1.0.0
references:
- type: adr
id: ADR-XXX
- type: prd
id: PRD-XXX
---
All references must resolve:
1
2
3
4
5
references:
- type: adr
id: ADR-001 # Must exist at docs/specs/shared/adr/001-*.md
- type: sds
id: SDS-035 # Must exist at docs/specs/*/sds/035-*.md
SDS documents must include:
1
2
3
4
5
6
7
just sea-validate <file>
# Checks:
# - Syntax correctness
# - Entity references exist
# - Policy structure valid
# - No circular dependencies
Error: Reference not found: ADR-042
Solution:
just /spec adrError: Invalid YAML in frontmatter
Solution:
yq . docs/specs/<file>.mdError: Unexpected token at line 15
Solution:
docs/reference/sea_dsl_language_reference.ymlError: Required section missing: Governance
Solution:
1
2
3
# .githooks/pre-commit
#!/bin/bash
just spec-guard || exit 1
1
git config core.hooksPath .githooks
1
2
# Validate only staged files (faster)
just spec-guard-staged
1
2
# Verbose output
just spec-guard --verbose
1
2
# Generate validation report
just spec-guard --report > validation-report.json
Solution:
1
2
3
4
5
# Run in parallel
just spec-guard --parallel
# Or validate specific context
just spec-guard --dir docs/specs/semantic-core
Solution:
exceptions:
| Last Updated: January 2026 | Version: 1.0.0 |