DSL reference
The quick lookup surface: one line and a minimal snippet per construct. For rules, edge cases and worked examples, follow the links into the specification.
| Construct | What it gives you |
|---|---|
entities | tables + CRUD UI + a generated data layer & API |
| field / relation attributes | uniqueness, layout, read-only, dropdown filtering, cascades |
function | an explicit presentation role (Document, Setting, ...) |
label | a stored, read-only display name for lookups |
number | a platform-numbered, gap-free document field |
checks | cross-field / cross-line validations |
immutableWhen / immutable | reject user writes in a status / append-only |
hierarchy / leafOnly | tree entities, leaf-only references |
| calculated fields | server + UI-evaluated expressions, date helpers, call-outs |
relations / composition | associations and master-detail compositions |
uses | reuse entities owned by another intent model |
processes | workflows: user tasks, decisions, waits, boundary timers |
forms | task data-entry pages |
actions | developer-defined buttons opening custom pages |
view | calendar / range / slot-booking pages |
documentItemsLayout: chat | render a document's items as a chat thread |
reports | aggregations, charts, dashboard KPI tiles, balance reports |
widgets | custom KPI / embedded-page dashboard tiles |
notifications | email on create / update / delete |
schedules | cron: notify or generate records per matching row |
integrations | outbound HTTP on a data change |
inbound | a webhook that creates records |
rollups | counts, sums, balance + status maintenance |
settlements | auto-allocation of payments across open invoices |
expansions | generated child rows per day / week / month |
generates | one-click document-from-document cloning |
transitions | guarded on-demand status flips (void / cancel / reopen) |
postings | declarative source-document to balanced-document posting |
personal / partner | per-user and per-partner row-scoped surfaces |
seeds | initial data, CSV-backed sets, translations |
multilingual / languages | translation tables + read-time translation overlay |
permissions | roles |
Snippets
entities
yaml
entities:
- name: Member
icon: user
group: master-data
audit: true
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
- { name: name, type: string, required: true, length: 200 }
relations:
- { name: loans, kind: oneToMany, to: Loan }field / relation attributes
yaml
- { name: code, type: string, unique: true, length: 30 }
- { name: total, type: decimal, precision: 18, scale: 2, readOnly: true }
- { name: period, type: month }
- { name: Number, type: string, number: { series: SalesInvoice, format: "SI-{seq:06}" } }
- { name: Status, kind: manyToOne, to: OrderStatus, function: EntityStatus, init: 1 }
- { name: City, kind: manyToOne, to: City, dependsOn: { relation: Country, filterBy: Country } }
- { name: Product, kind: manyToOne, to: Product, where: { Type: 1 } }function
yaml
- name: ProjectTimesheet
function: Document # header + line items + status pill + totals
- name: EmployeeTimesheet
function: DocumentItemchecks
yaml
- name: JournalEntry
checks:
- { kind: itemsMin, count: 1, status: 2, message: "An entry needs at least one line" }
- { kind: itemsSumEqual, over: [debit, credit], status: 2, message: "Debits must equal credits" }
- name: JournalEntryItem
checks:
- { kind: exactlyOne, fields: [debit, credit], message: "Exactly one of debit / credit" }processes
yaml
processes:
- name: OrderApproval
trigger: { onCreate: Order }
steps:
- { name: review, kind: userTask, args: { assignee: manager, form: ApproveOrder } }
- { name: decide, kind: decision, args: { if: "action == 'approve'", then: activate, else: cancel } }
- { name: activate, kind: serviceTask, args: { setRelationField: Status, value: 2, next: end } }
- { name: cancel, kind: serviceTask, args: { setRelationField: Status, value: 3, next: end } }
- { name: end, kind: end }reports
yaml
reports:
- name: OrdersByMonth
source: Order
dimensions: ["month(orderDate)"]
measures: ["count(*)", "sum(total)"]
filter: "total > 0"
chart: bar
widget: { value: "sum(total)", at: { "month(orderDate)": now }, label: Revenue (this month) }generates / transitions
yaml
generates:
- { name: invoice-from-order, from: Order, to: Invoice, map: { Customer: Customer }, sourceStatus: 3 }
transitions:
- { name: VoidInvoice, forEntity: Invoice, from: [3, 4], setStatus: 8, when: "Paid == 0", label: Void, icon: ban }seeds
yaml
seeds:
- name: statuses
entity: OrderStatus
rows:
- { id: 1, name: DRAFT }
- { id: 2, name: POSTED }
- name: countries
entity: Country
file: data/countries.csvPlanned — recognised but not yet implemented
The following are parsed (or reserved) but not yet materialised by a generator; a conforming tool rejects or ignores them with a clear message rather than failing obscurely:
- Reserved
functionvalues for upcoming presentations (Board,Gantt,Timeline). manyToMany— parsed but never materialised; the supported shape is the explicit intermediate entity.- Cross-model schedule source — a schedule's
entitymust be local (the generate target may be cross-model). - Event-driven document generation (produce a document on an event), a declarative state machine, and shadow audit-history entities (audit columns via
audit: trueship today). - Arbitrary resolver-path task assignment beyond
assignee: personal.