Docs
UJN documentation
UJN 0.1 draft · revision 23 · November 29, 2026 · Changes
For AI assistants
Give your assistant the primer
The primer is short, about 2,400 words: the nine kinds, the arrows, the flags, the common warnings and two worked examples. Paste it into your AI assistant before you ask it for a journey.
- Assistants do not know UJN yet: give them the primer first.
- We have not measured how often assistants write UJN without mistakes.
- A drawing with no warnings can still describe the wrong journey: the checks catch broken structure, not wrong intent.
For your AGENTS.md or CLAUDE.md: keep UJN's rules loaded
UJN rules for an agent file
## UJN journeys- UJN (UI Journey Notation) 0.1 is a draft. Read the primer before you write a journey: <docs>/primer.md. Where the primer and the spec differ, the spec wins.- A journey is plain text from `@startujn` to `@endujn`. Write it as the spec's examples do, one statement per line.- Nodes: `keyword handle [ID] { key: value }`. Arrows: `from --> to : [Trigger] guard { payload: [a, b] }`.- Give a node that other files link to `unique_id: {{auto}}`, and let `-populate_ids` fill it (local build only).- Never invent a unique id, and never link to a display id.- The module that draws and checks UJN is not public yet. If the UJN setup installed its test build on this computer, draw and check with it; never pass it on or tell anyone else to install it.For people
What UJN is, and is notThe problem UJN solves, the three outputs of one file, and what its checks cannot catch.How to read a UJN drawingEvery shape, arrow and flag, pinned on the checkout journey. For readers who will never write UJN.Your first journeyBuild the checkout step by step, with its drawing after each step. About 10 minutes.RecipesThree common tasks: the user leaves the app and comes back, a form error and a retry, and steps marked planned, idea or legacy.Cheat sheetOne printable page: the nine node kinds, the arrow forms, the eleven flags, the id rules and the common warnings.GlossaryShort definitions of the words UJN uses, such as handle, trigger, guard, pill and resume.
Reference
The specThe whole language on one page: every statement, key, default and warning, in sections 1 to 23.Model referenceEvery key of the JSON model the module writes, for the tools and tests that read it.Command lineDraw a journey, write its model and fill unique ids. Local build only.ChangesWhat each revision of the spec changed, newest first.Give feedbackWhat helps most, the open questions, and where to send feedback once the repository is public.
Use UJN today
Works now
- Write journeys by hand, or with an assistant you have given the primer.
- Read and edit the samples in Try it, drawn as they were when the site was built.
- Sketch with the draw.io shape library on the Goodies page: a picture, with no checks and no model.
Not yet
- No public build to install: every command in these docs is labeled local build only.
- Drawing your own edits in Try it needs the local render server, which is not public.
- No public repository and no feedback channel.
Planned
- A public build of the PlantUML module.
- A Mermaid extension.
- GitHub issues for feedback, once the repository is public.