The language
How documents, identities, references, fields, and flow work.
The document model
A document contains domain catalogs, workshop notation, and workflows. Catalogs define contexts, actors, ownership, Events, aggregates, and field types. Workflows describe behavior. Chapters and hotspots retain workshop context.
After validation, downstream tools use a normalized typed model with derived titles and source-to-target edges.
Identities and derived titles
The identity is add_pet, and its derived display title is Add Pet. Labels use lower_snake_case. Write title only for different wording:
The formatter leaves derived titles implicit. Source order is model order, so keep workflows in business-time order.
Typed references: the most important syntax habit
Quoted values are data. Unquoted traversals are references. For example, to = [event.pet_management.pet_added] resolves a relationship; quoting that traversal turns it into an invalid string.
| Target | Form |
|---|---|
| Bounded context | bounded_context.clinic |
| Actor | actor.clinic_staff |
| Team | team.clinic_team |
| System | system.partner |
| Workflow | workflow.add_pet |
| Event | event.pet_management.pet_added |
| Aggregate | aggregate.pet_management.pet |
| Local aggregate, inside owning context | aggregate.pet |
| Field type | field_type.pet_management.pet_id |
| Local field type, inside owning context | field_type.pet_id |
| Local workflow element | command.add_pet |
| Workflow-qualified element, for a hotspot | command.add_pet.add_pet_command |
Bounded contexts own domain contracts
Events, aggregates, and field types belong to a bounded context:
Inside the owning context, references are local: aggregate.pet, field_type.pet_id. Outside it, use the qualified form: aggregate.pet_management.pet, field_type.pet_management.pet_id, event.pet_management.pet_added.
Aggregates
An aggregate is a context-owned consistency boundary:
Use aggregate_dependencies when behavior spans another consistency boundary.
Reusable field types
Use a field_type when the same ubiquitous-language concept appears in multiple contracts:
Inline one-off fields with a built-in type, such as field "request_id" { type = "UUID" }. The reference lists available types and flags.
Field shorthand
A plain field can infer a same-named field_type. A fields list adds reusable fields when no per-field override is needed:
The shorthand applies only to field blocks. A field_type must still declare an explicit built-in type.
Lists and structured data
A custom reusable field type can carry nested subfields:
Examples are native HCL literals, and the validator checks that examples match the effective type.
One edge, one canonical declaration
Each edge has one canonical spelling.
Rule 1: workflow-local source. Write to on the source.
Rule 2: catalog Event source. Write from on the receiving workflow element.
Here is what happens when a Command reverses the first rule and puts from on itself instead of to on the Screen:
The validator rejects the reverse form:
Quick check: who is the source? Use to on a workflow source. Use from on the receiver when the source is a catalog Event.