feat: add figma-parity skill - #11
Draft
sameerroboto wants to merge 2 commits into
Draft
Conversation
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.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viagetComputedStyleandgetBoundingClientRectat each target width. Desktop is frozen and must render value-for-value identical before and after; every change is scoped belowlgwith an explicitlg: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.jsships 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.