.rk files
Every piece of Rangka metadata is a .rk file: YAML with strict rules, so a file means exactly the same thing in the kernel, the Python tools, the browser and an AI agent.
yaml
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/model.json
name: lead
label: {id: Lead, en: Lead}
fields:
- {name: phone, type: phone, label: {id: Telepon}}
- name: status
type: select
default: "'new'" # a CEL expression, so the string is quoted inside
options:
- {value: new, label: {id: Baru}}The rules
- YAML 1.2 types only:
true/false,null, numbers. Dates stay text (2026-10-30). - Values YAML tools read differently are refused unless quoted:
yes,no,on,off,y,n, numbers with a leading zero (phone numbers, NPWP, item codes),1_000, and times like08:30. Keys are always text, soon: saveis fine. - No duplicate keys, no tabs, no anchors or aliases (
&,*), no merge keys (<<). One document per file. ${ENV}values must be quoted inside{ }—url: '${DATABASE_URL}'— and are the only way to give secrets.- The first line names the schema, which gives VS Code (Red Hat YAML extension) completion and errors as you type.
Errors always point at a position:
text
pipeline/models/lead.rk:12:14 error ambiguous_value (syntax) yes means different things in different YAML tools; write "yes" in quotes for text, or true or false
pipeline/models/deal.rk:15:9 error unknown_model fields/1/to "custommer" is not a model in this app or its dependencies; did you mean "customer"?Kinds
Schema 0.5 is current (0.4 is still published, for app.rk files in the old layout). It has 20 kinds; each has a schema and a reference page.
| Kind | Where | Layer |
|---|---|---|
| module | modules/<module>/module.rk | 5 |
| model, flow, role | models/, flows/, roles/ in a module | 5 |
| print, import, process | print/, imports/, processes/ in a module, an app or the site | 5 |
| screen | modules/<module>/screens/<name>.rk: a work screen for staff, such as the POS counter (contract 0030) | 5 |
| app, dashboard | apps/<app>/app.rk, apps/<app>/dashboards/ | 5 |
| template | templates/<name>/ (deprecated: an app replaces it, contract 0001) | 5 |
| overlay, config, features, letterhead | site (custom/<model>.rk, config.rk, features.rk, letterhead.rk) | 4 |
| model, flow | site models/x_<name>.rk, flows/<name>.rk: the company's own tables and automations (contract 0016) | 4 |
| connector | rangka-connectors | 3 |
| system | site | 2 |
| theme, layout | site themes/, layouts/ | 6 |
| changeset | sent to the API | — |
See Print formats and Process canvas.
Accepted extensions: .rk (preferred), .rk.yaml, .rk.yml; legacy .json still loads, and tools/rk_convert.py converts it, refusing any file that would not read back identically.