Skip to content

uSpec V2.2

Choose a tag to compare

@redongreen redongreen released this 12 May 01:49
· 12 commits to main since this release

Highlights

  • Render-meta appendix in Component Markdown — every components/<name>.md now ships a fenced JSON block delimited by <!-- render-meta:start v=1 --> / <!-- render-meta:end --> carrying sectionTargets, groupTargets, booleanDefs[].associatedLayerId, subComponents[], slotContents[], and a SHA-256 sourceHash of the underlying _base.json. Downstream create-* skills consume this directly — no more fuzzy name lookups against layoutTree.
  • Layer identity stamped on structure output — extract-structure's new R6 rule populates section._anchor on every section and _layerName / _layerId on every group-header row, sourced from _base.json.variants[<default>].layoutTree. Sub-component sections anchor to the in-context INSTANCE node, slot sections to the slot host, composition sections to "__root__".
  • borderWidth + borderAlign row pair — both rows share the strokePaintToken != null gate. Legacy _base.json without dimensions.strokeAlign degrades cleanly to borderAlign: "—" with provenance: "not-measured" and a generalNotes recommendation to re-extract.

Figma plugin 2.3.0 (uspec-extract)

  • Boolean-gated layer fallback (Phase A). Boolean → gated layer resolution walks componentPropertyReferences.visible and falls back to sibling variants when the layer is absent from the default state (e.g., a "clear" button that only appears when input is active).
  • strokeAlign capture (Phase E). extractDims() emits strokeAlign as { value, token: null, display } alongside strokeWeight. Present on variants[].dimensions, treeHierarchical[*].dimensions, and subComponentVariantWalks entries.
  • Node ids on every walk entry. treeHierarchical, layoutTree, treeFlat, colorWalk, revealedTree, revealedColorWalk, and Phase I measureHierarchical all carry the Figma node id / nodeId of the source layer.

Rebuild locally to pick up the changes: cd figma-plugin && npm install && npm run build, then re-import the manifest in Figma Desktop.

Structure skill follow-ups

  • borderWidth rows now require strokeWeight.value > 0 — no more phantom borderWidth: 0 rows on nodes with the property set but no painted stroke.
  • Notes columns can no longer carry Figma node ids or TODO: confirm with Figma stubs — Notes is engineer-facing implementation context.
  • The Mode A / B split added on top of V2.1.4's 7d2e7f4 baseline is reverted in favour of the simpler unified rootOnly / fullTree annotation flow.

Housekeeping

  • maintaining.md updated for npm's current web-based 2FA flow (no more --otp=…).
  • utils/README.md removed; README.md and implementation.md prose tightened.

Get the changes

npx uspec-skills update

The Figma plugin is built locally — rebuild and re-import to pick up plugin 2.3.0 behaviour. No action needed on existing Figma libraries.

Companion npm release: uspec-skills@0.2.10.