Documentation
Design to code
How to hand a design to an AI agent without letting it guess the structure, colors or spacing.
A coding agent cannot see your design. It sees what you give it. A screenshot shows the result, but not the hierarchy, the observed values, or what is missing. That gap is where the final render drifts: spacing by feel, a color that is almost right, a component that looks similar but is not the right one.
Cadralia closes that gap. A selection produces a structured description of the area, with its measurements, then delivers it to the agent with the image and an implementation instruction.
What the agent receives
| Item | Purpose |
|---|---|
| Area tree | the real hierarchy of elements, not a flat list |
| Colors | the observed values, not an approximation |
| Typography | measured families, sizes, weights and line heights |
| Spacing and radii | the computed values on the page |
| Detected icons | what must be replaced with a project icon |
| Open questions | what the structure cannot settle |
| Fidelity checklist | ok, partial or missing per category |
| States and handoff | interaction states and the implementation instruction |
The checklist is what changes the result. When a category is missing, the agent
knows it has to infer it instead of inventing it silently.
Three gestures
- Select. Open the page, click the Cadralia icon, then drag over the area. Nothing is sent on release: the preview stays on screen.
- Check. The preview shows what the agent will receive. Dimensions, surface and estimated weight appear while dragging.
- Deliver. Choose the target session, review the instruction, then click Deliver to your agent. The image, structure and instruction arrive in the session without interrupting a running turn.
If the analysis fails, the quota is refunded and the image stays available for up to 24 hours so you can retry.
Reference an element without spending an extraction
Not every area deserves a full analysis. For a button, a field or a link, Reference an element sends the marked page, selectors and computed styles straight into the local session. No extraction is counted, and it works on any page open in Brave or Chrome.
Use it when you fix a detail inside an existing component. Full extraction is for laying down a whole area.
Verify the render
A delivered structure does not guarantee an identical render. Verification compares the rendered component with the reference at the design width. If the width differs, the command fails instead of producing a false score: a clear failure is better than a misleading "98%".
Which agent
The local connector is the same for OpenCode, Codex and Claude Code. You can switch agents without reinstalling Cadralia, and your settings follow the account.
- OpenCode: add the plugin, restart, and the structure appears in the open session.
- Codex: start the connector in the project folder and keep the terminal open.
- Claude Code: install the hooks once; the connector starts on the first message.
What Cadralia does not do
Cadralia does not write the code for you and does not replace your agent. It also does not guess states that are not visible on the page. It delivers reliable material: structure, measurements, image and open questions. The agent decides the implementation, and you keep control of the final component.
Where to start
Install the extension and the connector, then make a first selection on a page you know. The Free plan is permanent, no credit card: 2 extractions per 5 hours, 4 per week and 16 per 30 days.