Troubleshooting

Common SEA™ DSL errors and solutions.


E01: Missing @cqrs

Error: Flow "X" missing @cqrs annotation

Fix:

Flow "CreateOrder"
  @cqrs { "kind": "command" }  // Add this
from "A" to "B"

E02: Dotted Keys

Error: Invalid annotation: dotted keys

Fix:

// ❌ Wrong
@cqrs.kind "command"

// ✅ Correct
@cqrs { "kind": "command" }

E03: Unbound Identifier

Error: Unknown identifier 'f'

Fix:

// ❌ Wrong
Policy check as: (f.quantity > 0)

// ✅ Correct
Policy check as: forall f in flows: (f.quantity > 0)

E04: Domain Collision

Error: Duplicate entity 'X'

Fix:

Entity "Customer" in sales  // Add domain

E05: Invalid Expression

Error: Policy must be boolean

Fix:

// ❌ Wrong
Policy check as: "must be positive"

// ✅ Correct
Policy check as: (amount > 0)

Debug Commands

1
2
3
just sea-validate <file>           # Syntax check
just sea-parse <file> | jq .       # View AST
python tools/flow_lint.py -v <file> # Verbose lint

Last Updated: January 2026