Spec-First Compliance

This guide covers achieving regulatory compliance through SEA™ Forge’s spec-first architecture.


1. Compliance Philosophy

SEA™ Forge transforms compliance from a periodic exercise to a continuous process:

Traditional SEA™ Forge Spec-First
Quarterly audits Continuous validation
Manual evidence gathering Automated audit trails
Documentation drift Specs are source of truth
Reactive compliance Proactive enforcement

2. Regulatory Framework Mapping

2.1 NIST AI RMF

Function SEA™ Forge Implementation
Govern SEA™ DSL policies, SDS-035 invariants
Map SDS context analysis, stakeholder mapping
Measure Evidence Service metrics, drift detection
Manage Policy Gateway enforcement, kill switch

2.2 ISO 42001

Requirement SEA™ Forge Implementation
Context analysis ADR/SDS context sections
Leadership commitment Governance roles in SDS
Risk assessment SEA™ DSL risk policies
Controls SDS-035 invariants
Monitoring Evidence Service
Continuous improvement Spec evolution

2.3 EU AI Act

Requirement SEA™ Forge Implementation
Risk classification SEA™ DSL policy annotations
Transparency Model cards in SDS
Human oversight HITL policies
Documentation Specs as audit evidence
Incident reporting Evidence Service alerts

3. Compliance Evidence

3.1 Specification as Evidence

Every spec serves as compliance evidence:

1
2
3
4
5
6
7
8
9
10
11
12
13
# SDS document serves as:
# - System documentation (ISO 42001)
# - Technical documentation (EU AI Act)
# - Control documentation (SOX)

metadata:
  compliance:
    frameworks:
      - iso-42001: [4.1, 4.2, 6.1]
      - eu-ai-act: [Article 11, Article 13]
      - nist-ai-rmf: [GOVERN-1, MAP-1]
    last_review: 2026-01-15
    next_review: 2026-04-15

3.2 Evidence Service Logs

1
2
3
4
5
6
7
8
9
10
11
12
# Generate compliance evidence package
curl http://localhost:8083/api/v1/evidence-package \
  -d '{
    "framework": "ISO-42001",
    "period": "2026-Q1",
    "include": [
      "policy_decisions",
      "access_logs",
      "incident_reports",
      "control_attestations"
    ]
  }' > iso42001_evidence_q1_2026.zip

3.3 Traceability Chain

1
2
3
4
5
6
7
# Verify spec-to-code traceability
node scripts/spec-cross-check.js --mode staging --dir docs/specs

# Output includes:
# - ADR → PRD → SDS links
# - SDS → Generated code mappings
# - Policy → Enforcement mappings

4. Audit Preparation

4.1 Pre-Audit Checklist

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Audit Readiness Checklist

## Documentation
- [ ] All specs pass `just spec-guard`
- [ ] SDS documents have compliance metadata
- [ ] Traceability matrix is current
- [ ] Model cards are complete

## Evidence
- [ ] Evidence Service logs complete
- [ ] Policy violation reports available
- [ ] Incident response documentation ready
- [ ] Access control logs retrievable

## Controls
- [ ] SDS-035 invariants documented
- [ ] Policy Gateway rules documented
- [ ] Kill switch tested and documented
- [ ] Key rotation records available

## Team
- [ ] Compliance roles assigned
- [ ] Training records available
- [ ] Interview preparation complete

4.2 Audit Package Generation

1
2
3
4
5
6
7
8
9
10
11
12
13
# Generate comprehensive audit package
just generate-audit-package \
  --framework ISO-42001 \
  --period 2026-Q1 \
  --output audit_package_q1_2026/

# Package includes:
# - specs/           # All relevant specifications
# - evidence/        # Evidence Service exports
# - traceability/    # Spec-to-code mappings
# - controls/        # Invariant documentation
# - incidents/       # Incident reports
# - training/        # Team training records

5. Continuous Compliance

5.1 Automated Validation

1
2
3
4
5
6
7
8
9
10
11
12
13
# CI/CD compliance gates
compliance_checks:
  - name: spec-guard
    run: just spec-guard
    gate: required
    
  - name: drift-detection
    run: just ci
    gate: required
    
  - name: policy-validation
    run: just sea-validate docs/specs/*/policies.sea
    gate: required

5.2 Compliance Dashboards

1
2
3
4
5
6
7
8
# Access compliance dashboard
open http://localhost:5080/dashboards/compliance

# Metrics displayed:
# - Spec validation status
# - Policy violations (trending)
# - Evidence Service health
# - Control effectiveness scores

5.3 Scheduled Reviews

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Governance calendar
reviews:
  weekly:
    - Policy violation summary
    - Drift detection status
    
  monthly:
    - Comprehensive spec review
    - Control effectiveness assessment
    
  quarterly:
    - Regulatory alignment check
    - External audit preparation
    
  annually:
    - Framework update review
    - Retention policy review

6. Industry-Specific Compliance

6.1 Healthcare (HIPAA)

1
2
3
4
5
6
7
8
9
10
11
# SDS compliance section
compliance:
  hipaa:
    enabled: true
    controls:
      - phi_encryption
      - access_logging
      - minimum_necessary
      - breach_notification
    evidence:
      retention: 6_years

6.2 Finance (SOX/GLBA)

1
2
3
4
5
6
7
8
9
10
11
12
compliance:
  sox:
    enabled: true
    controls:
      - financial_data_integrity
      - audit_trail_immutability
      - access_control_enforcement
  glba:
    enabled: true
    controls:
      - customer_data_protection
      - security_program_documentation

6.3 Government (FedRAMP/NIST 800-53)

1
2
3
4
5
6
7
8
compliance:
  fedramp:
    impact_level: moderate
    controls:
      ref: NIST-800-53
      families: [AC, AU, CM, IA, SC]
    documentation:
      ssp_reference: SSP-2026-001

7. Incident Response

7.1 Compliance Incident Handling

policy ComplianceIncidentResponse:
  it is obligatory that each ComplianceViolation
    with severity = critical
    has incident_report = created
    has root_cause_analysis = initiated
    has remediation_plan = documented
    within 24_hours

7.2 Regulatory Notification

1
2
3
4
5
6
7
8
9
10
11
# Notification requirements
notifications:
  gdpr_breach:
    deadline: 72_hours
    to: [dpo, supervisory_authority]
    template: gdpr_breach_notification
    
  hipaa_breach:
    deadline: 60_days
    to: [hhs, affected_individuals]
    template: hipaa_breach_notification

8. Best Practices

8.1 Documentation Standards

8.2 Evidence Management

8.3 Continuous Improvement


Last Updated: January 2026 Version: 1.0.0