You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(Skill): read Mística Figma grid layouts into GridLayout/ResponsiveLayout (#1605)
## Summary
Teaches the `mistica-react` skill to read the layouts the updated
`mistica-figma` skill produces, so a design built with the new Figma
conventions is implemented with `GridLayout` / `ResponsiveLayout`
instead of raw `Grid`/flex `div`s.
The mistica-figma skill builds sections as native 12-column GRID frames
(column spans + template naming) and full-width padded
`ResponsiveLayout` frames. The reading path (`doc/llms/figma-mcp.md`)
predates this and was written against the older flex/Tailwind MCP output
— it had no `GridLayout` row and no guidance for the grid/section
conventions. The mapping rules here are grounded in the real Figma MCP
DOM (`grid grid-cols-[repeat(12,minmax(0,1fr))]` + `col-[start/span_N]`)
and verified against the `@telefonica/mistica` source (`GridLayout`
templates, the `Variant` enum, the `ResponsiveLayout` wrap requirement).
## Changes
- **`doc/llms/figma-mcp.md`** — mapping-table rows for the plain
`ResponsiveLayout` section, the `grid grid-cols-[repeat(12,…)]` section,
and `col-[S/span_N]` children; a "Reading grid sections" subsection with
a child-span → `template` lookup (`6+6`, `8+4`, `4+6`, `3+9`, `5+4`,
`10`, `8`), the wrap rule (`ResponsiveLayout` = side margins only,
`GridLayout` = columns), `px`→margin / `py`→`Box`, background→`variant`,
mobile collapse, and a worked `3+9` example.
- **`doc/llms/agents/figma-verifier.md`** — flag raw
grid/flex/`Grid`/spacers used instead of a span-matched `GridLayout`, an
unwrapped `GridLayout`, a padded section without `ResponsiveLayout`, and
double-wrapped nav/tabs.
## Validation (A/B test per `TESTING-MISTICA-SKILL.md`)
`claude-opus-4-8`, 3 runs/arm, isolated workspaces differing only in
these two files, same byte-for-byte prompt against a Figma frame with a
`6+6` hero and a `3+9` sidebar+table.
| Dimension | Baseline | Modified |
| --- | --- | --- |
| Correct `GridLayout` template usage | 2/3 runs | **3/3 runs** |
| Primitive compliance / pixel parity / tokens / time | 100% / faithful
/ — | 100% / faithful / no meaningful change |
The baseline failure run hand-built the split with low-level
`Grid`/`GridItem` + non-responsive hardcoded `paddingX={48}` (still
"Mistica primitives", so compliance and the desktop screenshot did not
flag it). The modified arm reliably used the semantic `GridLayout`
templates. No regression in tokens, cost, latency, or fidelity.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|`flex gap-[Npx]` (vertical — has `flex-col`) |`Stack space={N}`|
42
+
|`flex gap-[Npx]` (horizontal — no `flex-col`) |`Inline space={N}`|
43
+
| Full-width section with `px-[48/32/16px]`, **no**`grid-cols`|`ResponsiveLayout` (responsive side margins; content stacks inside) |
44
+
|`grid grid-cols-[repeat(12,…)]` on a full-width section |`GridLayout` (inside a `ResponsiveLayout`) — see [Reading grid sections](#reading-grid-sections)|
45
+
|`col-[S/span_N]` on a grid child | a `GridLayout` column of span `N` (drives the `template`) |
46
+
|`justify-between`|`Inline space="between"`|
47
+
|`justify-around`|`Inline space="around"`|
48
+
|`justify-evenly`|`Inline space="evenly"`|
49
+
|`items-center`|`alignItems="center"` on `Inline`|
0 commit comments