Linting, validation, and troubleshooting for SEA™ DSL files.
1
just sea-validate <file.sea>
1
just sea-parse <file.sea>
1
python tools/flow_lint.py --strict <file.sea>
1
just spec-guard
Every Flow MUST have @cqrs annotation.
| CQRS Kind | Required | Recommended |
|---|---|---|
command |
@cqrs |
@tx, @idempotency |
query |
@cqrs |
@read_model |
event |
@cqrs |
@outbox |
// ✅ Correct
@cqrs { "kind": "command" }
// ❌ Incorrect
@cqrs.kind "command"
Error: flow_lint.py: Flow "CreateOrder" missing @cqrs annotation
Fix:
Flow "CreateOrder"
@cqrs { "kind": "command" } // Add this
from "A" to "B"
Error: Invalid annotation format: dotted keys not allowed
Fix:
// ❌ Wrong
@cqrs.kind "command"
// ✅ Correct
@cqrs { "kind": "command" }
Error: Unknown identifier 'f' in expression
Fix:
// ❌ Wrong - f is unbound
Policy check as: (f.quantity > 0)
// ✅ Correct - bind with forall
Policy check as: forall f in flows: (f.quantity > 0)
Error: Duplicate entity 'Customer' in merged namespace
Fix:
// ❌ Wrong - no domain
Entity "Customer"
// ✅ Correct - explicit domain
Entity "Customer" in sales
Error: Policy expression must be boolean
Fix:
// ❌ Wrong - string, not boolean
Policy check as: "amounts must be positive"
// ✅ Correct - boolean expression
Policy check as: (amount > 0)
Error: Invalid version format: expected vX.Y.Z
Fix:
// ❌ Wrong
Entity "Order" v1
// ✅ Correct
Entity "Order" v1.0.0
Add to .githooks/pre-commit:
1
2
3
4
5
6
#!/bin/bash
# Validate all .sea files
for file in $(git diff --cached --name-only | grep '\.sea$'); do
just sea-validate "$file" || exit 1
python tools/flow_lint.py --strict "$file" || exit 1
done
1
2
3
4
5
# .github/workflows/ci.yml
- name: Validate SEA™ DSL
run: |
just spec-guard
find docs/specs -name "*.sea" -exec python tools/flow_lint.py --strict {} \;
1
2
3
4
5
# Start with single file
just sea-validate docs/specs/orders/orders.sea
# Then validate all
just spec-guard
1
just sea-parse docs/specs/orders/orders.sea | jq .
1
python tools/flow_lint.py --verbose docs/specs/orders/orders.sea
Ensure imported modules exist:
1
ls docs/specs/<module>/
Last Updated: January 2026