The SEA™ development process is spec-first: requirements drive design, design drives DSL, DSL drives code generation.
1
ADR → PRD → SDS → SEA™ → AST → IR → manifest → codegen
Path: docs/specs/<ctx>/<ctx>.adr.md
| Section | Purpose |
|---|---|
| Context | Problem domain, forces at play |
| Decision | Chosen approach (DDD, CQRS, etc.) |
| Rationale | Why this decision |
| Constraints | MUST/MUST NOT rules for generators |
| Quality Attributes | NFRs (latency, consistency) |
| Consequences | Trade-offs, complexity |
Path: docs/specs/<ctx>/<ctx>.prd.md
REQ-### IDPath: docs/specs/<ctx>/<ctx>.sds.yaml
Machine-readable design including:
Validate: python tools/validate_sds.py <sds.yaml>
Path: docs/specs/<ctx>/<ctx>.sea
Translate SDS into SEA-DSL:
Entity declarationsResource declarationsFlow with @cqrs annotationsPolicy with expression treesSee: flow-annotations.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Validate SEA™
sea validate docs/specs/<ctx>/<ctx>.sea
# Parse to AST
sea parse --format json docs/specs/<ctx>/<ctx>.sea > <ctx>.ast.json
# AST → IR
python tools/ast_to_ir.py <ctx>.ast.json <ctx>.ir.json
# IR → Manifest
python tools/ir_to_manifest.py <ctx>.ir.json <ctx>.manifest.json
# Manifest → Generated Code
python tools/codegen/gen.py <ctx>.manifest.json
# Determinism check
python tools/regen_check.py <ctx>.manifest.json
Per bounded context, define targets in project.json:
| Target | Command |
|---|---|
sds-validate |
python tools/validate_sds.py ... |
sea-validate |
sea validate ... |
sea-ast |
sea parse --format json ... |
ast-to-ir |
python tools/ast_to_ir.py ... |
ir-to-manifest |
python tools/ir_to_manifest.py ... |
codegen |
python tools/codegen/gen.py ... |
regen-check |
python tools/regen_check.py ... |
Run all:
1
2
nx run specs-<ctx>:codegen
nx run-many -t codegen