How product logic works
A product’s logic is a set of small typed records. Records link to each other
by id. This notation shows a record’s fields. Here is one of them:
kind: ruleid: write.lengthdisplay_id: RULE-NOTE-LENGTHcapability: writerule_kind: decisiontitle: A note stays within the length limitsummary: Decides whether a note is short enough to save.when: The note is longer than the limitthen: Saving is refused and the editor shows the limitotherwise: The note is savedconstants: [constant.max-note-length]kindsays what the record is.idis the permanent machine name, starting with the record’s home (write.). Other records link to it.constants: [...]is a link. Nothing is copied between records.
This section is the reference for product logic. New to the idea? Start with Core concepts.
The model
Section titled “The model”A capability is an outcome some actor gets. Its records link by id (dashed) to the shared records several capabilities use.
A flow is how one subject moves: an actor subject makes it a journey, an entity subject a lifecycle. Its steps are places the subject can be, and each edge is a way out, naming a trigger and the sequence it runs.
| Form | Record kinds | Drawn as |
|---|---|---|
| Data schema | entity, data_group |
An entity diagram |
| Flow | flow, step |
A journey or a lifecycle |
| Sequence | sequence |
A sequence diagram |
| Interface | interface |
A surface or operation card |
Triggers, rules, actors, systems, constants, and terms sit inside these forms. A part gets its own record when it is reused or worth finding on its own; every edge names a trigger record.
What the records become
Section titled “What the records become”Nothing visual is stored. Emergent Instruments draws every diagram from the links:
- A flow with an actor subject is drawn as a journey. Each arrow is an edge, labelled with its trigger and the sequence it runs.
- A sequence is drawn as lanes with numbered messages and
altbranches. Each outcome leads to the step its edge names. - A rule is shown as words only: its title, summary, and
when,then, andotherwiselines. Ids, columns, and calls sit in typed fields beneath.
Every record has one home: a capability, or shared.
| Record | Home |
|---|---|
flow, sequence |
Always names its capability |
step |
Its flow’s capability |
rule, trigger |
A capability only when that one capability uses it; otherwise shared |
| every other kind | Always shared |
A capability owns the records that name it; the capability record lists none of them. A record’s id starts with its home: see Ids and parts.
Fields every record has
Section titled “Fields every record has”| Field | Required | Meaning |
|---|---|---|
kind |
yes | One of the thirteen kinds below. |
id |
yes | Lowercase dotted machine id, unique, starting with its home. Ids |
display_id |
no | Stable human id cited in code and tickets: RULE-NOTE-LENGTH. |
title / name |
yes | The plain-words name; each kind uses one of the two. |
summary |
no | One sentence, at most 160 characters. |
rationale |
no | Why the design is shaped this way. Markdown. |
notes |
no | Context: scope, terms, references. At most 700 characters. Never behavior. |
tags |
no | { tag, text } for a fact the format has no field for. |
Unknown fields are errors (field.unknown). Fields software draws, checks,
links, or searches are typed; explanations stay in rationale and notes.
Record kinds
Section titled “Record kinds”| Page | Kinds |
|---|---|
| Product and context | capability, actor, system |
| Flows | flow, step, trigger |
| Sequences and rules | sequence, rule, constant |
| Interfaces | interface |
| Data | entity, data_group |
| Terms | term |
The product is not a record: the records describe it, and it describes itself with its details (name, summary, outcome, boundary, and the rest). Flows, sequences, and data groups split into parts when they grow large.
See Validation for every check, and A complete example for a small product end to end.