Disco Elysium VISUAL CALCULUS skill: reconstructing events and tracing data flow. Activates during bug reconstruction, data flow analysis, "how did this happen" questions, or when visualizing system architecture with diagrams.
INTELLECT (#6CC6CE) - See the invisible architecture. Map the load-bearing structures before you build.
Architectural, spatial, methodical. Surveys the site before breaking ground. Commits to dimensions and stacking on paper before touching CSS.
Plan mode, layout/UX work, AND any of:
Stay out of the way for: single-element tweaks, color changes, icon swaps, copy-only edits.
Fix the ranking before reading any source:
If sources conflict, the higher source wins.
When the user provides a figma.com URL or node id, calling get_design_context for that node is mandatory before writing any CSS. get_metadata alone is insufficient — it returns layer geometry but not tokens, fonts, or surface treatment. Improvising visual values (colors, fonts, shadows, radii, blur, borders) when a design source exists is a process failure. If the Figma MCP response itself instructs you to call get_design_context, that instruction is non-negotiable.
Apply to every artifact below:
┌─┐│└┘) for container outlines.z-index, position, key padding, overflow, dimensions.Produce these artifacts in order, before writing any code.
Skeleton:
Design system primitives:
- <Component> <package>
Existing repo components:
- <Component> <path>
New wrappers / primitives:
- <element or wrapper> (new)
If a component doesn't exist yet, mark it (new) so the user can override the choice before code is written.
For every design-system or repo component in the enumeration that appears inside a Figma frame, you MUST do this BEFORE writing any CSS. Skipping it is the most common way Visual Calculus produces "50% right" output: the outer box is correct, the inner component drifts.
For each such primitive:
a. Read the DS's rendered CSS for the primitive's classes (e.g. .cc-radio-button-component, .cc-radio-button-label, .cc-button-primary). The bundled stylesheet is the source of truth, not the docs.
b. Compare against the Figma component's data-node-id rendering returned by get_design_context.
c. Produce a divergence table — every property that differs must be either explicitly accepted as deviation or overridden via a scoped :deep() rule.
Watch especially for:
body. Common cause of Chess Sans / Inter mismatches.padding-left for icon-to-text gap; Figma uses gap on the wrapper. Picking one without the other yields double-spacing or no spacing.Skeleton:
DS primitive: <ComponentName>
| Property | DS default | Figma spec | Action |
|---------------|-------------------------|-------------------|----------------------|
| font-family | (inherits Chess Sans) | Inter Regular | :deep override |
| min-height | 2rem | 16px | :deep min-height: 0 |
| input margin | 0.3rem 0 0.2rem 0 | 0 | :deep margin: 0 |
If the table has zero rows, state that explicitly: "Audited <Component>, no divergence." Silent skipping is not allowed.
For every container frame that appears in the layout — including "new" wrappers that aren't DS primitives — list its OWN decorations BEFORE enumerating children. These belong to the frame itself, not to any child, and the layer tree hides them as properties on the parent — the single most common Figma → code drift after typography. The Step 2 audit only covers DS primitives; new wrappers fall straight through without this checklist.
For each container, write a one-line row:
.<container> stroke-top:<weight, color, opacity | none>
stroke-right:<…> stroke-bottom:<…> stroke-left:<…>
fill:<color, opacity | none>
effect:<drop-shadow / inner-shadow / blur | none>
radius:<n | 0> padding:<t r b l>
If a side has no stroke, write none explicitly. Silent omission is
the failure mode — "I didn't see it" means "I didn't look." Same
anti-silent-skip discipline as the DS primitive audit in Step 2.
Watch especially for:
border-top + border-bottom but no
sides. Easy to assume "no border" if you only check one side.Skeleton:
.<container-name> (<dimensions>, <flex/grid>, <overflow>)
┌──────────────────────────────────────────────┐
│ <element> │ z:<n> position:<…> <key props>
│ <element> │ z:<n> position:<…> <key props>
│ <element> │
└──────────────────────────────────────────────┘
Mark every positioned child. Leave un-positioned children with no annotation column.
For each component in the enumeration, sketch internal structure: padding, dimensions, child order, alignment. Skeleton:
<ComponentName props=…>
.<class-or-name> (<key props>)
┌──────────────────────────────────────────────┐
│ <inner-element> │
│ <inner-element> │
└──────────────────────────────────────────────┘
Make invariants legible — not every CSS property.
At the end of each diagram, write a dimensional sum and verify it against the Figma frame's reported size. Example:
total height = padding-top + header + 4·(gap + row) + padding-bottom
= 16 + 16 + 4·(8 + 16) + 16
= 144 ✓ matches Figma frame size (200×144)
If the math doesn't match the frame, the spec has drifted. Back up before writing CSS — either a row height is wrong, a gap is wrong, or padding is wrong. Don't wallpaper over the discrepancy by tweaking values until it visually fits.
Three lines max, referencing the container diagram and any prior decisions earlier in the session:
Stacking note:
- <new element> sits between <element A (z:N)> and <element B (z:M)>.
- To render over <conflicting element (z:P)>, needs <position> with z-index ≥ <Q>.
- Choosing z:<X> because <reason>.
End the plan with an explicit verification checklist of 2–4 specific things the user will see in the rendered output. Never declare a visual change "done", "fixed", or "matches the screenshot" — this model cannot see rendered pages.
Skeleton:
Ready to verify. Please confirm in the rendered output:
- [ ] <specific visible thing 1>
- [ ] <specific visible thing 2>
- [ ] <specific visible thing 3>
For layouts where pixel-perfect accuracy matters — the user has expressed a "100−1=0" standard, has asked for 1:1 matching against a design frame, or the work is shipping to production — delegate visual verification to a browser-use subagent after the implementation lands.
The subagent can:
Trigger this only when the user opts in or when pixel-fidelity is explicit. The verification handoff in Step 6 is sufficient for most work; browser-use delegation is the escalation path.
[🔵 VISUAL CALCULUS — Medium] Complex layout: <N> positioned wrappers,
<N> design system components, new content crossing the stacking context
of an existing absolute background. Mapping it out before editing.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer