Mockup as specification: 548 variations approved before the first Vue component
How I approve an entire interface, with every state and persona, in HTML with the real tokens, before writing Vue. The Kravva method and what Blippy and Escambo showed.
In one of the validation rounds for Kravva's communities module, I decided that cancelling a purchase within 7 days happens inside the app. Days later I still hadn't written a line of Vue, but that rule already existed in three places: a requirement with the legal reason, a screen with 12 variations and a row in a list I ticked as reviewed. This post, a deep dive into the main article, explains the machinery that makes this possible: the HTML mockup treated as a specification.
The numbers come from the repository on October 12, 2026.
The problem: approving everything before coding
A real interface is a screen times states (loading, error, no permission) times personas (visitor, member, moderator, minor) times widths. If I only discover the "no permission" state once the Vue component is done, the cost of the change is in code, not in design.
I tried two tools before. On the first project I used screens generated in Google Stitch, and they drifted from the product: labels with vocabulary that compliance forbids, prices and buttons different from the documentation. The repository even had a file just to list 9 deviations between prototype and documentation.
Figma, in my experience, didn't solve it either. This is my view, not a measurement. The file doesn't go into git, doesn't run with the app's real tokens, and AI doesn't edit it well. To be fair: Figma already has an MCP server in Dev Mode that hands variables and components to the agent, which reduces the reading problem. The versioning and real-token problem remains, for my workflow.
Kravva's HTML mockup
It's static HTML with Tailwind, pointing only to the app's design system tokens. No build and no framework: it opens with a double click. The structure, simplified:
- Viewer: I pick a screen, variation and persona and see the same screen at five widths (375, 768, 1,200, 1,500 and 1,920 px).
- Catalog and components: 161
K.*components and functions (card, button, notice, chip, empty state). - Adjustments and validation list: where I answer, in pages of the mockup itself.
- Comparisons: the page that puts the mockup next to the Vue version after the port.
A screen is just composition. This is a simplified excerpt of the purchases screen:
K.tela({
id: 'minhas-compras',
titulo: 'My purchases and cancellation',
variacoes: [
v({ id: 'compras', estado: 'normal',
render: c => lista(c, {}) }),
v({ id: 'cancelar', estado: 'form',
render: c => cancelar(c, {}) }),
v({ id: 'fora-prazo', estado: 'normal',
render: c => lista(c, { foraPrazo: true }) }),
v({ id: 'pagamento-falhou', estado: 'business error',
render: falhou }),
v({ id: 'oferta-volta', persona: 'membro',
render: ofertaVolta })
]
});
Each variation is a function that builds the screen with K.* components. The default states (loading, error, feature turned off, no permission) are added automatically, and the persona comes from a catalog of 20 roles.
The hard rules fit in four lines:
- Color only through tokens. Hex outside the tokens file is forbidden.
- The page only composes. Copying markup from another screen is forbidden; a repeated block becomes a
K.*component. - Text comes from the user stories. I don't make up copy.
- What's missing shows up as "to be defined", never invented. Sample data is marked as sample.
The design flow
Since October 2 the flow is: user stories, gray wireframe, mockup with the real design system, validation list, Vue. The wireframe (40 pages, with the three width ranges side by side) answers "what exists on the screen". The mockup answers "how it behaves with the real design system". That way I don't argue about color before knowing whether the block should exist.
The variation validator
That's what I call this set of three pieces:
- Viewer at five widths, with a persona selector. I decide by looking, not by reading a description.
- Sweep robot. A script with Playwright opens every variation of every screen with every persona and checks for JavaScript errors, horizontal scrolling and broken text ("undefined", "NaN"). The versioned audit from October 7: 52 screens, 548 variations and 9,864 loads in about 20 minutes, with zero JS errors, zero horizontal scrolling and zero broken text. The local catalog already has 60 screens (count from October 10), but I quote the audit number. The robot also cross-checked the screens against the 68 stories: no story was left without a screen, and orphan screens dropped from 8 to 1.
- Validation list. Each decision has an ID, the AI's recommendation and a "blocks?" field. I answer agree, adjust or another decision. There were 12 rounds and 197 answers (162 agree, 35 adjustments), between October 7 and 10.
The demo below simulates the cycle: switch persona, state and width, run the robot and see a batch of adjustments.
fix batch · 2 pending
The robot measures what a machine can measure: that nothing breaks. Whether the right button is on the right screen is for me to decide, through the list.
Adjustment batches: feedback that doesn't get lost
Each feedback round becomes an adjustment batch. A batch is an object with a label and rows, and each row points to the exact screen, variation and persona (simplified format):
{ rotulo: 'Adjustments Oct 8, 2026 23:55 · 7-day cancellation',
itens: [
{ alt: 'text about T2 and T3 when cancelling',
tela: 'minhas-compras', v: 'cancelar', p: 'passaporte' }
] }
On the index page, each row has a "5 widths" link that opens the viewer already on the right variation and persona, and a Reviewed checkbox. The rules:
- Immutable batch. A request about the current batch goes into it; a new subject opens a new batch. The AI checks with
diffthat the old ones stayed identical. This came from a mistake: the "Reviewed" mark is stored by the row's text, and rewriting a reviewed row unticked my approval. - "Reviewed" belongs to the owner only. The AI never ticks or unticks it. A row without a mark means there's feedback of mine pending.
- An adjustment becomes a requirement in the same cycle. A row in the batch, a numbered requirement (rule, status, impact, screen sheet), a rule question and a new row at the end of the validation list.
The example from the beginning: the 7-day cancellation requirement records the decision, the legal reason (the right of withdrawal in Brazil's Consumer Protection Code, art. 49), the impact on the back end and the screen where it's already designed. That round's batch has 16 rows, pointing to variations like cancelar, recompra and pagamento-falhou.
The data map per screen
A good-looking mockup doesn't show the data cost. That's why each screen has a data map, where each block declares: where the data comes from (existing endpoint, one to extend, or new), freshness, transport (HTTP, polling, WebSocket), cache (key, TTL, invalidation), what runs in the background (queue, scheduler, event), permission and the cost on match day. The map relies on an inventory of the real back end, generated by a script (on October 7: 43 controllers, 248 routes, 2 WebSocket gateways, 16 queues). Finding out at the design stage that a block needs a new queue is cheap.
From mockup to Vue
The mockup is specification, not code. No copying HTML into the component. The port follows these rules:
- R/E/N/X. Each element is classified: Reuse an existing component, Extend, create a New one or discard (X). The "Mockup bar" and the sample data, for example, are X.
- Reuse before creating. I search the component folders before any new file and record the search.
- Only what the list has closed gets ported. An open decision becomes a question, not a guess.
- Parity. Each mockup variation is a test case.
After the port, a comparisons page shows the app's screenshots before and after by role and width, with the pixel difference marked in red (generated by a harness, with screenshots kept out of git). Where the same component exists on both sides with a different look, a divergence card puts the Storybook component next to the mockup's K.*, and I mark agree, adjust or another decision.
The most counterintuitive rule: Vue wins until the owner decides. Since the app already exists, the mockup doesn't override a component in production just for being newer. When I decide, the AI converges the side that lost and records the resolution on the card. On October 12 a component catalog was also added, with the inventory and the pairs side by side, so the next screens are born without the conflict.
The contrast: Escambo and Blippy
On Escambo, the prototype came from Stitch and Figma, versioned per component, with no validator at all. The behavior was "align with the prototype" after implementing. On August 3, one day after closing several packages, four commits in a row came with that message. A prototype without a gate becomes a suggestion.
On Blippy, the mockup became a contract with a gate:
- A manifest registers each mockup with status
approvedordraftand the list of components it authorizes. check-approvalfails a design system Vue component that no approved mockup declares (and the reverse too).check-fidelitycompares the class vocabulary of the mockup block with the.vuetemplate: the set, not the tree, to toleratev-forandv-if.- The mobile version is a second mockup, not a squeezed responsive layout: up to 768 px the mobile shell applies, from 769 px the desktop one, untouched.
- The runner that executes tasks on its own stopped at the gate: on September 4, a task asked for the toasts component without an approved mockup, the runner refused, and the mockup was proposed before the slice.
Here the mockup always wins, unlike on Kravva, which makes sense in a project born with no app to protect. There are also honest debts. Of the four validators planned for the design system, two never left the drawing board: tokens and contrast (the runner shows them as "postponed"). And check-fidelity has a visible cost in the code: since it reads text, Tailwind classes have to appear literally in the template, and some components ended up full of long strings in ternaries just so the validator can see the vocabulary.
Mistakes that became rules
- A replace script corrupted the mockup library. A
replacewith an empty snippet inserted text between every character ofkravva.js. Today every script that edits a fileasserts a non-empty snippet before writing. - Two Playwright robots at the same time froze the computer. Rule: one robot at a time, and the browser restarts every 400 loads.
- The static server served pages from cache. I replaced it with my own server using
no-store. - The screenshot harness turned off animations. A regression in the loading skeleton's shimmer passed the screenshots and it was the owner who caught it, looking at the comparison. Now a new animation gets a test of the class or the pseudo-element.
What they share: each failure became a rule in a versioned file or a machine check, not an "I'll pay more attention".
Takeaways
- Approving the entire interface (states, personas and widths) before the code trades Vue rework for HTML rework, which is much cheaper.
- An HTML mockup with real tokens goes into git, is diffable and AI edits it without friction. This comparison with Figma is my view, not a measurement.
- Two controls: a robot proves nothing breaks, and I decide the rest in a list with IDs, in immutable batches, with "Reviewed" being mine only.
- In the port, the mockup is specification: R/E/N/X, reuse before creating, parity per variation and pixel comparison. Without a gate, a prototype becomes a suggestion, as on Escambo.
- A gate has a cost: Blippy ended up with two validators still to implement and components with long strings because of
check-fidelity.
Continue the series: How I develop with AI · AI that proves it's done · Runner and /goal (coming soon) · SDD in practice (coming soon)