This tutorial provides a step-by-step guide to applying spec-first governance in SEA™ Forge. It walks through creating a governed AI initiative from business understanding to deployment.
Before diving into details, here’s the high-level workflow:
just spec-guard → just pipelinePrerequisites:
1
2
3
4
5
6
7
8
9
10
# Clone repository
git clone https://github.com/GodSpeedAI/SEA™.git
cd SEA™
# Copy environment template
cp .env.example .env
# Verify environment
just doctor
# Expected: All checks passing
Start Services:
1
2
3
4
docker-compose up -d
# Verify all containers healthy
docker-compose ps
Purpose: Document the architectural decision and governance requirements for your AI initiative.
Steps:
1
just /spec adr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# ADR-XXX: Customer Service AI Assistant
## Status
Proposed
## Context
Customer service receives 10,000+ inquiries daily.
AI assistant can handle routine queries, reducing response time.
## Decision
Implement LLM-based assistant with Policy Gateway filtering
for PII protection and content safety.
## Governance Requirements
- Policy Gateway: Enable PII and jailbreak filters
- Evidence Service: Log all interactions
- Human escalation: Complex queries require agent review
## Compliance
- GDPR: Data minimization, right to explanation
- EU AI Act: Limited-risk classification (chatbot transparency)
1
just spec-guard
Purpose: Define functional requirements linked to governing ADR.
Steps:
1
just /spec prd
1
just spec-guard
Purpose: Define service architecture with governance built-in.
Steps:
1
just /spec sds
1
2
3
4
5
6
7
8
9
10
11
12
13
governance:
policy_gateway:
enabled: true
filters:
- pii_detection
- jailbreak_prevention
- content_safety
evidence_service:
enabled: true
retention: 7_years
invariants:
- ref: SDS-035
controls: [1, 2, 5, 8]
1
just sds-validate docs/specs/<context>/sds/XXX-<name>.md
Purpose: Express business rules as executable governance policies.
Steps:
docs/reference/sea_dsl_language_reference.yml — Grammar and syntaxdocs/reference/sea_dsl_language_idioms.yml — Patterns and conventions// Customer Service Assistant Policies
context CustomerServiceAssistant:
// PII Protection
policy PIIFiltering:
it is obligatory that each CustomerQuery
has pii_scan = completed
has pii_detected = false OR pii_redacted = true
before llm_processing
// Response Safety
policy ContentSafety:
it is prohibited that any AssistantResponse
contains harmful_content = true
OR contains jailbreak_attempt = true
// Human Escalation
policy ComplexQueryEscalation:
it is obligatory that each CustomerQuery
with complexity_score > 0.7
has human_agent_assigned = true
within 5_minutes
1
just sea-validate docs/specs/<context>/domain.sea
1
just sea-parse docs/specs/<context>/domain.sea
Purpose: Transform specifications into governed implementation.
Steps:
1
just pipeline <context>
1
2
# Regenerate should match committed code
git diff --exit-code
Purpose: Ensure runtime governance is active.
Steps:
1
2
just ci
# Includes: spec-guard, drift detection, tests
1
2
# After CI passes
git push origin main
Purpose: Maintain continuous governance.
Daily:
Weekly:
Quarterly:
A financial services firm wants to deploy an AI assistant to help customers with investment queries while maintaining GLBA compliance.
3.1 ADR:
1
2
3
4
5
6
7
# ADR-042: Investment Query Assistant
## Governance
- High-risk classification (financial advice)
- GLBA compliance required
- Full audit trail for regulatory review
- Human-in-the-loop for recommendations
3.2 SEA™ DSL Policies:
context InvestmentAdvisor:
policy FinancialAdviceDisclosure:
it is obligatory that each InvestmentRecommendation
has disclaimer_shown = true
has risk_disclosure = acknowledged
before display_to_customer
policy HumanReviewRequired:
it is obligatory that each InvestmentRecommendation
with risk_level = high
has advisor_review = approved
before display_to_customer
policy AuditTrailRequired:
it is obligatory that each CustomerInteraction
has evidence_logged = true
has timestamp = captured
has customer_id = recorded
3.3 Validation:
1
2
3
just sea-validate docs/specs/investment-advisor/policies.sea
just spec-guard
just ci
3.4 Monitoring:
Problem: just sea-validate returns errors
Solution:
sea_dsl_language_reference.ymlProblem: CI fails with drift detection error
Solution:
just pipeline <context>git diff --exit-codeProblem: Requests bypass Policy Gateway
Solution:
After completing this tutorial:
1
just cycle-start <phase> <cycle> <agent> <slug>
Expand policies: Add domain-specific governance rules
Train team: Share learnings via Enablement curriculum
| Last Updated: January 2026 | Version: 1.0.0 |