get_guidelines
Returns the design rules for a file and a hash of them. Call it before your first edit, and pass the hash as guidelines on every edit.
What it does
The reply has three parts: Wonderblok's built-in rules, then the project's own rules under a Project rules heading when the file has any, then a status line for the design system and the fonts. It ends with hash: and a 16-character fingerprint of the rules text.
The built-in rules cover:
- Colors and fonts come from tokens, and components are reused before new ones are drawn.
- Spacing sits on a 4px grid, and hierarchy comes from size and weight.
- One primary action per screen, no decoration for its own sake, and real copy.
- Text contrast of at least 4.5:1, and empty, loading and error states for screens that show data.
- Token and component names carry over to code exactly.
- Common flows start from a Universe pattern (use_pattern), drawn with the file's own tokens.
The hash is how Wonderblok knows you read the rules. Tools that change the design, such as apply_ops and write_page, refuse to run without the current hash. When the rules change, the hash changes, and your next edit is refused until you read them again.
Arguments
- file
- Optional. The file to read, by name from list_files or by path. Leave it out when only one file is open, or to use the file in front in Wonderblok.
- guidelines
- Optional. A hash you already hold. If it is still current, the reply is only unchanged plus the design system and fonts lines, not the rules.
What it returns
Plain text. The design system line starts with Design system: and a status such as empty, thin or ready, followed by counts of colors, fonts, text styles, spacing and radius tokens and components. Any status other than ready adds a line telling you to run the setup_design_system op first. The fonts line lists each family the file uses and where it comes from, and names families that will draw in a fallback.
The hash covers the rules text only. Changing tokens or fonts does not change it, so the design system and fonts lines are for you to read, not part of the gate.
Example
get_guidelines {}Design guidelines (Wonderblok)1. Colors and fonts come from the file's tokens. Need a new value? Add a token first.2. Reuse components from the Components board before drawing a new one.…Design system: ready (… colors, … fonts, … text styles, …)Fonts: Geist (bundled)hash: 9c1e0b7a42d3f860Pass that hash on the next edit:
apply_ops { "guidelines": "9c1e0b7a42d3f860", "ops": [{ "op": "update", "id": "hfsuX", "patch": { "content": "Pay now" } }]}Notes
- A missing hash is refused with
edits need `guidelines`. A wrong or old one is refused withthe design guidelines changed since you read them. Neither message includes the hash, so reading the rules is the only way to get it. ack_noteand the read tools do not need the hash. Edit replies list any rule your changes break asguideline:warnings, so fix those before moving on.- Project rules are written in Wonderblok, not through MCP. See Tokens and guidelines for how they sit beside the built-in rules.
- Next, read the layout with get_tree, then change it with apply_ops.
Was this page helpful?
Edited Nov 9, 2026