Conversation
Marcosld
commented
Jun 3, 2026
| @@ -0,0 +1,128 @@ | |||
| --- | |||
Contributor
Author
There was a problem hiding this comment.
This is the evaluated subagent
|
Size stats
|
|
Deploy preview for mistica-web ready!
Deployed with vercel-action |
|
Accessibility report ❌ 55 problems detectedwelcome--welcome [O2-new] (1 violations)welcome--welcome [Movistar-new] (1 violations)welcome--welcome [Vivo-new] (1 violations)welcome--welcome [Blau] (1 violations)components-accordions--boxed-accordion-story [Vivo-new] (1 violations)components-accordions--boxed-accordion-story [Blau] (1 violations)components-accordions--boxed-accordion-story [Movistar-new] (1 violations)components-accordions--boxed-accordion-story [O2-new] (1 violations)components-badge--default [Movistar-new] (1 violations)components-badge--default [O2-new] (1 violations)components-buttons--primary-button [Vivo-new] (1 violations)components-buttons--danger-button [Movistar-new] (1 violations)components-buttons--secondary-button [Blau] (1 violations)components-buttons--danger-button [Vivo-new] (1 violations)components-buttons--icon-button-story [Blau] (1 violations)components-carousels-carousel--with-carousel-context-and-outside-controls [O2-new] (1 violations)components-carousels-centeredcarousel--default [Vivo-new] (1 violations)components-carousels-centeredcarousel--with-controls [Movistar-new] (1 violations)components-carousels-centeredcarousel--with-controls [O2-new] (1 violations)components-carousels-slideshow--with-carousel-context [O2-new] (1 violations)components-checkbox--uncontrolled [Movistar-new] (1 violations)components-checkbox--uncontrolled [O2-new] (1 violations)components-checkbox--uncontrolled [Vivo-new] (1 violations)components-chip--multiple-selection [Vivo-new] (1 violations)components-headers-header--default [Movistar-new] (1 violations)components-input-fields-autocomplete--controlled [O2-new] (1 violations)components-input-fields-cvvfield--controlled [Blau] (1 violations)components-input-fields-phonenumberfieldlite--uncontrolled [O2-new] (1 violations)components-input-fields-searchfield--uncontrolled [O2-new] (1 violations)components-input-fields-textfield--controlled [Movistar-new] (1 violations)components-input-fields-searchfield--uncontrolled [Vivo-new] (1 violations)components-modals-drawer--default [Movistar-new] (1 violations)components-modals-drawer--default [O2-new] (1 violations)components-popover--default [O2-new] (1 violations)components-primitives-video--default [Blau] (1 violations)components-progress-bars--progress-bar-story [Movistar-new] (1 violations)components-radio-button--controlled [Vivo-new] (1 violations)components-radio-button--uncontrolled [Vivo-new] (1 violations)components-radio-button--uncontrolled [Blau] (1 violations)components-radio-button--uncontrolled [O2-new] (1 violations)components-switch--uncontrolled [Vivo-new] (1 violations)components-text--text-wrapping [O2-new] (1 violations)components-text--text-wrapping [Movistar-new] (1 violations)components-timer--text-timer-story [Vivo-new] (1 violations)patterns-loading--brand-loading-screen-story [Blau] (1 violations)layout-align--default [Movistar-new] (1 violations)layout-inline--wrap [O2-new] (1 violations)community-advanceddatacard--default [Movistar-new] (1 violations)private-components-inside-portals--default [Vivo-new] (1 violations)private-components-inside-portals--default [O2-new] (1 violations)private-deprecated-card-stories-nakedcard--default [Vivo-new] (1 violations)private-fixedfooter--default [Blau] (1 violations)private-image-image-sizes--default [Blau] (1 violations)private-tooltip--moving-target [Vivo-new] (1 violations)private-tooltip--moving-target [Blau] (1 violations)ℹ️ You can run this locally by executing |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated “figma-mistica-implementer” agent definition intended to delegate Figma→Mistica React implementation work into a specialized subagent context.
Changes:
- Introduces a new agent prompt/spec for implementing Figma designs with
@telefonica/mistica. - Defines a required 5-step workflow (load skill → extract Figma → map → implement → verify) plus output requirements.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+5
| --- | ||
| name: 'figma-mistica-implementer' | ||
| description: | ||
| "Use this agent when you need to translate a Figma design into production-ready React code using the | ||
| @telefonica/mistica component library. This agent should be invoked whenever a user provides a Figma design |
Comment on lines
+2
to
+22
| name: 'figma-mistica-implementer' | ||
| description: | ||
| "Use this agent when you need to translate a Figma design into production-ready React code using the | ||
| @telefonica/mistica component library. This agent should be invoked whenever a user provides a Figma design | ||
| URL and wants it implemented as code, or when a design needs to be converted into Mistica-compliant | ||
| components. <example>\\nContext: The user wants to implement a Figma design into code using Mistica.\\nuser: | ||
| \"Here's the design for the new login screen: https://figma.com/file/abc123/login-screen. Can you implement | ||
| it?\"\\nassistant: \"I'm going to use the Agent tool to launch the figma-mistica-implementer agent to | ||
| translate this Figma design into Mistica-compliant React code.\"\\n<commentary>\\nSince the user provided a | ||
| Figma URL and wants it implemented, use the figma-mistica-implementer agent to extract the design via Figma | ||
| MCP and build it with @telefonica/mistica.\\n</commentary>\\n</example>\\n<example>\\nContext: The user | ||
| shares a Figma frame and asks for a component.\\nuser: \"Build this card component from Figma using our | ||
| design system: https://figma.com/file/xyz789/card\"\\nassistant: \"Let me use the Agent tool to launch the | ||
| figma-mistica-implementer agent to build a visually accurate, Mistica-compliant implementation of this | ||
| card.\"\\n<commentary>\\nThe user wants a Figma design implemented with the Telefonica design system, so the | ||
| figma-mistica-implementer agent is the right choice.\\n</commentary>\\n</example>\\n<example>\\nContext: The | ||
| user pastes a Figma node link mid-conversation while building a feature.\\nuser: \"Now add the settings | ||
| panel — here's the design: https://figma.com/file/def456/settings?node-id=12-345\"\\nassistant: \"I'll use | ||
| the Agent tool to launch the figma-mistica-implementer agent to implement the settings panel from this Figma | ||
| node using Mistica.\"\\n<commentary>\\nA Figma design link was provided for implementation; delegate to the | ||
| figma-mistica-implementer agent.\\n</commentary>\\n</example>" |
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.
Does using a specialiced subagent improve the
mistica-reactskill in any way?A/B experiment — 6 headless Claude Code runs, identical prompt, same Figma design.
Model:
claude-opus-4-8(all runs) · n = 3 per arm.TL;DR
num_turnscounts only the main loop. Total agentic work (deduped messages) is actually +22% higher in the subagent arm.Conclusion: the subagent does not make the result better (the
mistica-reactskill does the heavy lifting in both arms) and does not do less total work or use dramatically fewer total tokens. Its two real, verified effects are: (1) it keeps the orchestrator transcript ~90% leaner by relocating the work into a child context (context hygiene), and (2) the subagent generates ~52% less text per turn than the verbose top-level agent, which yields a modest ~10% cost / ~14% latency edge at equal quality. Its value here is orchestration hygiene + lower output verbosity — not output fidelity, and not a large compute saving. We think it is not worth to use a subagent as part of the mistica-react plugin due to context loss (for example when iterating over a implementation) and almost non-existent improvements.Methodology
Implement this design from Figma using Mistica @https://www.figma.com/design/puOwn8pBJCrMYksvXeCiJO/AI-Test---Figma-MCP-2-code?node-id=1-67393&m=dev.claude/agentsleaks in). Each = copy of the project +.claude(skill symlink),node_modulessymlinked to the main repo.with-1/2/3:.claude/agents/figma-mistica-implementer.mdpresent.no-1/2/3:.claude/agentsremoved — skill only.claude -p --output-format stream-json --verbose --model opus. Metrics (duration_ms,num_turns,total_cost_usd, per-model token usage) read straight from the terminalresultevent..tsx(excluding the identicalmain.tsxboilerplate).Sanity checks passed: all 6 runs exited 0; all loaded the
mistica-reactskill; all 3with-*runs delegated tofigma-mistica-implementerand nono-*run did; all 6 compiled and rendered with zero console/overlay errors.Original design (baseline)
Per-run results
Token economics — decomposed and verified
This is the core of the "why fewer tokens?" question. Three findings:
1. Total token volume is ≈ equal (−3%). Tokens are ~99.5% input-side (context fed in each step, mostly cache reads) and ~0.5% output (text generated):
Both arms read the same Mistica docs + Figma payloads once and re-read their growing context a comparable number of times, so the bulk (cache reads) is near-equal. The subagent doesn't avoid that context — it just holds it in a child session instead of the parent (same volume, different container).
2. The −40% output-token gap is driven by verbosity-per-turn, not less work. Despite doing +22% more total messages, the
with-*runs emit −40% output, because the subagent generates ~533 tokens/turn vs the top-level agent's ~1,116 (the two clusters don't overlap: max-with 539 < min-no 902). Causes: the subagent runs under a rigid 5-step workflow and its output is treated as a return value (terse, little narration), whereas theno-*run is the top-level conversational agent (more planning prose, running commentary, a long final user-facing summary).3. Cost composition is dominated by cache reads; output is where the arms differ. Shares are exact (uniform 3.00× discount, CHECK 4):
The mean output-token gap (18,557 tokens) is worth $0.46 at the realized output price — i.e. ~82% of the $0.56 total cost gap. The remaining ~$0.10 is cache-read run-to-run variance (note
with-1has the highest cache-read of all six → it cost $5.60 despite low output). So the ~10% cost edge is real but modest, and almost entirely an output-verbosity effect.Mistica primitive compliance
Both arms are excellent and effectively tied — the skill enforces primitive usage regardless of the subagent:
with-*= 0 / 0 / 0;no-*= 2 / 0 / 0 (onlyno-1slipped in two<span>s).with-*= 0 / 1 / 0;no-*= 2 / 0 / 0.px: onlywith-2(6 occurrences); all others 0.@telefonica/misticacomponents (MainNavigationBar,NavigationBreadcrumbs,Hero,Chip,GridLayout,MediaCard,Checkbox,RadioGroup,InfoRating,Text*, etc.) and pulls colors/spacing fromskinVarstokens.The subagent arm is marginally cleaner (0 raw HTML, more explicit
skinVarsusage), but the difference is within noise — both pass the "no raw divs / no raw styles" bar.Visual fidelity
Scored 1–5 against the baseline screenshot (layout, hero, sidebar, grid, pagination, type/colour). All six are strong; the arms are statistically indistinguishable.
components/), but customized nav to real labels ("Tienda/Móvil/…", "Lo quiero") — semantically nicer yet less literal vs the screenshot; hero smaller/top-right.Screenshot gallery
Interpretation
mistica-react, and both produced near-pixel-faithful, primitive-compliant pages. Removing the subagent did not degrade output quality.num_turnsmeasuring only the orchestrator loop (verified, CHECK 2).App.tsxvs split component files) — run-to-run variance, not a subagent effect.Recommendation