Repository navigation
perf: let agents finish Figma tasks in fewer calls - #49
Merged
Merged
Conversation
- eval helpers $page $var $bind $style $component $instance $fontSafe $describe shared with render - fonts that are not installed are swapped to Inter so instances can be relabelled and moved - render and render-batch take --page and print the structure they built - <Instance component variant text> finds components on any page - effectStyle and textStyle in JSX and per-side padding on root frames - render-batch --variant-set builds a component set in one call - piped eval output is compact JSON capped at 20k characters - agent rules move to lib/agent-rules.js with a hashed marker and connect refreshes outdated copies - instantiate bounds every lookup so an unpublished library key no longer hangs the CLI - the roundtrip test builds on its own page and no longer leaves fixtures behind - tests/live/regression.mjs covers the commands users already rely on Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
What changes
Agents that drive figma-cli now finish a Figma task in fewer calls. Every call is a full agent turn so fewer calls means less time and fewer tokens for the user.
New in
renderandrender-batch--page "Name"renders on that page and creates it when missing<Instance component="Button" variant="size=large" text="Save" />finds a component on any page and picks the variant and relabels iteffectStyleon frames andtextStyleon textptprpbplnow work on the outermost frame too (they were ignored before)render-batch --variant-set Buttonturns frames namedprop=value, prop=valueinto one component setNew in
eval$page$var$bind$style$component$instance$fontSafe$describeMissing fonts
Text in a component whose font is not installed could not be relabelled and Figma even refused to move the instance into a frame. Those fonts are now swapped to Inter automatically and reported as a
note:line.Agent rules
The rules
init-agentwrites live insrc/lib/agent-rules.jsinside a hashed marker block.connectrefreshes an outdated copy in the project. Text the user wrote around the block stays untouched.Fixes
instantiatebounds every lookup to 5 seconds so a library key that was never published no longer hangs the CLIBehaviour change
One visible behaviour change: piped
evaloutput has no indentation anymore.JSON.parsereads it the same.🤖 Generated with Claude Code