From brief to linked flow: a worked example
An example brief for a coffee app, taken step by step through the real tools: patterns, drawing, notes, a denied-location state and links.
Arya Nugroho
Staff Editorial
A flow tends to go wrong in two places: between the brief and the first drawn screen, and between the first draft and the last fix. This post walks through the steps we use to close both gaps, with an example brief for a coffee app.
To be clear about what this is: the brief is invented for this post, and so are the notes. It is a worked example of the steps and the real tool names, not a recording of one session. We are not putting a time on it, because a time we did not measure would be a number we made up.
1. Write the brief, and put the flow in it
Universe is the library of flows, and it opens in its own window. That window is a web page with no access to the app or to your files, so a flow does not travel to your agent by itself. You carry it over in the brief: name the flow, then paste its patterns and the states it must cover.
// An example brief, written for this postKopi Senja is a coffee ordering app for iOS.Draw first-run onboarding, then the order checkout.Onboarding follows the Onboarding flow in Universe (7 screens): value before the account ask, a soft ask before the system notification prompt, and a Notifications blocked screen after a no.Checkout follows Purchase and ordering in Universe (8 screens).Cover empty, error and denied states. Use the file's tokens.
2. The agent reads the rules, then draws
Before its first edit, the agent calls get_guidelines. That returns the rules for the file and a hash, and every edit has to send the hash back. If the rules change, edits are refused until the agent reads them again. It also reads your tokens so it can use them by name.
list_filesget_guidelines // rules for this file, and a hashget_tokens // colors, type and spacing, by nameapply_ops { guidelines: "<hash>", ops: [ ...one frame per screen... ] }get_tree // the outline, to check what was drawn
The ops go in as one edit, which is also one undo step for you. When a screen breaks a rule, the reply lists it on a line that starts with "guideline:", and the agent is expected to fix those before moving on. New top-level frames can be lined up with arrange, which the agent calls through run_tool.
3. Draw the state nobody asked for
The Onboarding flow draws a Notifications blocked screen for the case where someone says no. In our example the same idea is the denied-location screen. The add_state tool only knows four kinds, which are empty, loading, error and success, so there is no "denied" to ask for. The agent can add an error state of the location screen and edit it into the denied version, or insert a plain new frame.
run_tool { name: "add_state", args: { frame: "<location screen id>", state: "error" } }// then edit its copy into the denied version with apply_ops
4. Link the frames
A link is a property on a layer that holds the id of a layer in another frame. In Preview, tapping the layer opens the frame that holds the target. So "Choose a store myself" on the location screen links to the next screen, and the denied screen links onward the same way. That is the way forward after a no, as the Notifications blocked screen shows it, written down as a link.
5. People leave notes on layers
Now you review. Select a layer in Wonderblok and write a note on it in the Agent tab. A note is plain text on a layer: something like "use our own store photo here" or "this secondary button is too quiet." Until an agent picks it up, the note reads Waiting for an agent.
6. The agent acknowledges and clears them
The agent is told to check for notes when it starts on a file. When it takes one, it marks it picked up, with a short reply you can read on the note. When the fix is done, it clears the note.
get_notes // oldest first: id, layer, textack_note { id: "<note id>", reply: "Swapping in the store photo" }apply_ops { ... } // fix the layer, with the guidelines hashack_note { id: "<note id>", clear: true }
The note is on the layer, the reply is on the note, and nothing gets copied between windows.
Problems that Wonderblok finds itself, such as a lint warning, work through the same door. Their Send to agent button creates a note that closes by itself once the problem is gone.
7. Check the flow, then time it yourself
Walk the links in Preview. If you want to hand the flow to someone without the app, export_play writes one .play.html file with the linked frames inside, which opens offline in a browser. It needs the file to be open in Wonderblok.
To try this on your own work, connect Claude Code from the docs, write a brief with the flow's patterns in it and run the steps above. If you want a number for how long it takes, time your own session. Ours would not tell you anything about yours. For a coffee-style brief, the Food and Drink category in Universe is a good place to look for the flow to start from.