Skip to content

feat: add figma-parity skill - #11

Draft
sameerroboto wants to merge 2 commits into
mainfrom
skill/figma-parity
Draft

feat: add figma-parity skill#11
sameerroboto wants to merge 2 commits into
mainfrom
skill/figma-parity

Conversation

@sameerroboto

Copy link
Copy Markdown
Contributor

Problem / Intent

Pages sign off against Figma at desktop and then drift at mobile and tablet. The drift is small enough to survive a glance — 2px of leading on every line, a button 6px too wide — so it ships. There was no repeatable procedure for deciding whether a page actually matches its frames at 393 and 840.

Approach

skills/figma-parity/ — a skill that decides parity by measured numbers on both sides: pixel values read out of the Figma frame, pixel values read out of the rendered DOM via getComputedStyle and getBoundingClientRect at each target width. Desktop is frozen and must render value-for-value identical before and after; every change is scoped below lg with an explicit lg: reset.

Seven steps: resolve the mobile/tablet ticket pair → read the spec out of Figma → measure the built page at 393/840/1440 → report a drift table with blast radius and frame contradictions before touching code → fix → re-measure and prove the frozen breakpoint is undisturbed → visual pass.

Step 7 exists because the checklist only proves the rows you thought to measure. engine/figma-parity-verify.js ships with the skill (not in .claude/workflows/, so it is not invocable standalone) and fans out one agent per region × breakpoint, screenshotting the Figma node against the rendered region. Every reported mismatch is adversarially re-verified — a vision model comparing two images invents differences, and a false positive costs a wrong edit — then a synthesis pass reads the survivors as a whole to call out contradicting frames, page-specific values, and correct routes the obvious fix would move.

Three reference files carry the detail: figma-values.md (decoding frames), measuring.md (build, serve, read computed styles — including the stale-server check that otherwise yields plausible, uniformly wrong numbers), fix-patterns.md (the traps that make a correct-looking edit render wrong).


No Linear ticket for this one.

Measures a page's mobile (393px) and tablet (840px) rendering against its
Figma frames and closes the gap, with desktop frozen as a signed-off baseline.

Seven steps: resolve the ticket pair, read the spec out of Figma, measure the
built page, report the drift table, fix below the frozen breakpoint, prove the
numbers, then run a visual pass for what the checklist never thought to measure.

Ships an engine workflow that fans out one agent per region x breakpoint,
adversarially re-verifies every reported mismatch, and synthesises the survivors
into shared-vs-page-specific calls.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 398ed486-158c-4e25-9901-153c268418f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

The engine embedded one machine's absolute path to a gc-web playwright
checkout, and measuring.md repeated it. Neither resolves anywhere else.

The path still has to be absolute — playwright is usually a transitive dep
and a bare specifier does not resolve from an agent's cwd — so the caller
resolves it via require.resolve and passes it in as `playwrightPath`. The
engine throws with that command in the message when it is missing, rather
than failing later inside an agent's import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant