figura-cli 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/index.js +127 -122
- package/dist/mcp.js +44 -44
- package/package.json +1 -1
- package/skills/fig/SKILL.md +45 -6
- package/skills/figura-brand/reference/brand-format.md +15 -16
package/package.json
CHANGED
package/skills/fig/SKILL.md
CHANGED
|
@@ -74,13 +74,19 @@ greenfield.
|
|
|
74
74
|
fetched design system. **Follow that design system verbatim; never invent brand
|
|
75
75
|
values.** `figura_create_fig` returns a shareable `figura.so/f/<id>` link.
|
|
76
76
|
|
|
77
|
-
3. **
|
|
77
|
+
3. **Server render — the user's call, never yours.** Figura can also render the
|
|
78
|
+
fig server-side against the team brand: **`figura_generate_fig`** with a
|
|
78
79
|
natural-language brief (same `area` / `orientation` / `mode` / `title` /
|
|
79
|
-
`publish: true`) when
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
`publish: true`). Use it only when the **user explicitly asks** for a server
|
|
81
|
+
render ("let Figura render it", headless/CI flows with no local model) — or
|
|
82
|
+
when you've offered both paths and they picked this one. It runs as an
|
|
83
|
+
**async job the tool polls for you** — expect ~30–90s before the landed fig
|
|
84
|
+
returns; don't re-call while one is in flight. Unlike the default path, this
|
|
85
|
+
**spends the team's Figura credits** (a `403` means no active subscription).
|
|
86
|
+
Pass **`fidelity: 'high'`** to render on the better model (the default
|
|
87
|
+
`'fast'` is lighter — fine for rough states, weaker on brand). Never pick
|
|
88
|
+
this path on your own to save effort: it costs credits and hand-built figs
|
|
89
|
+
track the brand better.
|
|
84
90
|
|
|
85
91
|
4. **Review** the returned link, share it, move on.
|
|
86
92
|
|
|
@@ -114,12 +120,45 @@ CSS-only radio tabs, since figs carry no `<script>`:
|
|
|
114
120
|
width into scrollable overflow; scale minis with `transform` in
|
|
115
121
|
fixed-aspect wrappers instead), and screenshot each state to check no
|
|
116
122
|
annotation chip covers the content it annotates.
|
|
123
|
+
When you write the fig's HTML out to render/screenshot it, save it to a
|
|
124
|
+
**deterministic**, project-scoped path — the repo's `.figura/figs/` (already
|
|
125
|
+
gitignored), or `~/.figura/figs/` outside a bound repo — never `/tmp` or
|
|
126
|
+
`mktemp`. A stable path means a rerun overwrites the same file instead of
|
|
127
|
+
littering volatile temp locations, and matches where `figura fig open` writes
|
|
128
|
+
(`<repo>/.figura/figs/figura-fig-<id>.html`).
|
|
117
129
|
|
|
118
130
|
A **wipe-slider** stays the narrow tool for exactly two states of the same
|
|
119
131
|
layout with pixel-level tweaks. Never ship a squeezed side-by-side as the
|
|
120
132
|
*only* view of desktop frames, and never a full-frame toggle as the only
|
|
121
133
|
view of many variations — each is one half of the pair above.
|
|
122
134
|
|
|
135
|
+
## Metadata & geometry — stamped for you
|
|
136
|
+
|
|
137
|
+
Every landed fig is **auto-stamped server-side** (on `create` and `generate`)
|
|
138
|
+
with two things you do **not** hand-write:
|
|
139
|
+
|
|
140
|
+
- A **device kit** `<style>` — the target's hard geometry as CSS custom
|
|
141
|
+
properties from the one source of truth: `--fig-artboard-w/h` and
|
|
142
|
+
`--fig-safe-top/right/bottom/left`, plus `.fig-safe` / `.fig-safe-top` /
|
|
143
|
+
`.fig-safe-bottom` helpers. Only mobile figs with a fixed artboard get it.
|
|
144
|
+
- A **machine-readable manifest** — `<script type="application/fig+json"
|
|
145
|
+
id="fig-manifest">` describing the artifact (target, geometry, generator,
|
|
146
|
+
intent, feature, external deps, and objective fidelity `checks`). It powers fig
|
|
147
|
+
search and the self-improving loop. Artifact-descriptive only — no team/brand
|
|
148
|
+
ids (the block is served on the public link).
|
|
149
|
+
|
|
150
|
+
So when you **hand-build** a fig (the default path), do your part of the contract:
|
|
151
|
+
|
|
152
|
+
- **Mobile:** size the body to the exact logical screen and emit
|
|
153
|
+
`<meta name="figura:artboard" content="WxH">` matching it (iPhone portrait
|
|
154
|
+
`393x852` / landscape `852x393`). For OS-chrome insets prefer
|
|
155
|
+
`var(--fig-safe-top, 59px)` / `.fig-safe-top` over hardcoded pixels — the stamp
|
|
156
|
+
fills the value, the fallback keeps you correct if the kit is absent.
|
|
157
|
+
- **Always:** emit `<meta name="figura:context" content="...">` (design intent).
|
|
158
|
+
- **Optional but valued:** if the fig grounds a specific feature or flag, emit
|
|
159
|
+
`<meta name="figura:feature" content="<flag-or-slug>">` so it links back to the
|
|
160
|
+
feature it depicts.
|
|
161
|
+
|
|
123
162
|
## Notes
|
|
124
163
|
|
|
125
164
|
- **MCP unavailable** (headless / cron, or no interactive auth): fall back to the
|
|
@@ -42,40 +42,39 @@ CONVENTIONS (hard rules found in the repo)
|
|
|
42
42
|
- e.g. aspect ratios, chrome shape (pill/capsule), "never use <X>", dark-first, etc.
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
## Worked example (
|
|
45
|
+
## Worked example (fictional brand "Ledgerline" — abridged)
|
|
46
46
|
|
|
47
47
|
```
|
|
48
|
-
|
|
48
|
+
LEDGERLINE BRAND GROUND-TRUTH (locked):
|
|
49
49
|
|
|
50
|
-
WHAT
|
|
51
|
-
- A
|
|
52
|
-
-
|
|
50
|
+
WHAT LEDGERLINE IS
|
|
51
|
+
- A calm B2B invoicing web app. Dense tables, quiet confidence, desktop-first.
|
|
52
|
+
- Numbers first. Tagline: "Books, balanced."
|
|
53
53
|
|
|
54
54
|
COLORS (use ONLY these)
|
|
55
|
-
- #
|
|
56
|
-
- #
|
|
57
|
-
- #
|
|
58
|
-
- #
|
|
55
|
+
- #1F6F54 Fern — primary brand accent; primary actions; gradient start.
|
|
56
|
+
- #C9A227 Brass — secondary accent; highlights + paid states; gradient end.
|
|
57
|
+
- #F4F2EC Bone — light surfaces + foreground on dark (a warm off-white).
|
|
58
|
+
- #101312 Ink — near-black base background.
|
|
59
59
|
|
|
60
60
|
THE BRAND GRADIENT
|
|
61
|
-
- EXACTLY one: linear-gradient(90deg, #
|
|
61
|
+
- EXACTLY one: linear-gradient(90deg, #1F6F54, #C9A227). Wordmark/hero accents only.
|
|
62
62
|
|
|
63
63
|
TYPE
|
|
64
|
-
- Display:
|
|
64
|
+
- Display: Fraunces — stack 'Fraunces', Georgia, serif. Semibold at display size.
|
|
65
65
|
- Body: Inter — stack Inter, -apple-system, 'SF Pro Text', system-ui, sans-serif.
|
|
66
|
-
- Mono: JetBrains Mono —
|
|
66
|
+
- Mono: JetBrains Mono — amounts, invoice ids, dates.
|
|
67
67
|
- Scale: 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 48.
|
|
68
68
|
|
|
69
69
|
SPACING / RADIUS
|
|
70
70
|
- 4-based scale: 4 8 12 16 20 24 32 40 48 64. Radius: sm 4, md 8, lg 12, full 999.
|
|
71
71
|
|
|
72
72
|
ICON LANGUAGE
|
|
73
|
-
-
|
|
73
|
+
- Inline stroke SVG (receipt, arrow-right, check-circle). NEVER emoji.
|
|
74
74
|
|
|
75
75
|
VOICE
|
|
76
|
-
- "
|
|
77
|
-
- Terse, sideways, confident — never salesy.
|
|
76
|
+
- "Every cent, accounted." "Close the month, not your eyes." Terse, dry, precise — never salesy.
|
|
78
77
|
|
|
79
78
|
CONVENTIONS
|
|
80
|
-
-
|
|
79
|
+
- Tables are the hero. Chrome is squared (radius md, never pill). Light-first with a dark ledger mode.
|
|
81
80
|
```
|