figura-cli 0.16.1 → 0.17.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "figura-cli",
3
- "version": "0.16.1",
3
+ "version": "0.17.0",
4
4
  "description": "Command-line client for the Figura visualization SaaS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -2,7 +2,7 @@
2
2
  name: fig
3
3
  description: "Mock up a screen as an on-brand, shareable HTML fig via your Figura team — render a UI state in seconds before writing the real code. Use when asked to visualize a screen, mock a UI, or 'make a fig'. iPhone-framed by default; browser frame for web/desktop."
4
4
  argument-hint: '<what to visualize>'
5
- allowed-tools: 'mcp__figura__figura_whoami, mcp__figura__figura_generate_fig, mcp__figura__figura_create_fig, mcp__figura__figura_revise_fig, mcp__figura__figura_publish_fig, mcp__figura__figura_commit_fig, Bash(figura *), Bash(bunx figura-cli *)'
5
+ allowed-tools: 'mcp__figura__figura_whoami, mcp__figura__figura_fig_scaffold, mcp__figura__figura_generate_fig, mcp__figura__figura_create_fig, mcp__figura__figura_revise_fig, mcp__figura__figura_publish_fig, mcp__figura__figura_commit_fig, Bash(figura *), Bash(bunx figura-cli *)'
6
6
  ---
7
7
 
8
8
  # /fig — figure it out before you build it
@@ -102,16 +102,26 @@ so you hand it the studied structure in the brief (see step 3, "Server render").
102
102
  re-verify. If the response has no `binding` field (older CLI/MCP), confirm
103
103
  the team slug matches this project with the user before proceeding.
104
104
 
105
- 2. **Default — build it yourself, with YOUR Claude.** Fetch the team's design
106
- system `bunx figura-cli brand --json` and hand-build the fig's HTML against
107
- it, then land it with **`figura_create_fig`**, setting
108
- `area`, `orientation` (`portrait` / `landscape` / `both`), `mode` (`single` /
109
- `compare` / `variations` — default to `compare` when Existing-first turned up a
110
- baseline), `title`, and a real description. This uses the
111
- caller's own Claude (the model running this skill) no extra cost, full control
112
- for precise broken-vs-proposed diptychs and applies the team's brand from the
113
- fetched design system. **Follow that design system verbatim; never invent brand
114
- values.**
105
+ 2. **Default — build it yourself, with YOUR Claude.** Fetch the **canonical
106
+ authoring scaffold****`figura_fig_scaffold`** (CLI:
107
+ `bunx figura-cli fig scaffold --platform <mobile|web> [--device <id>] [--area <str>]`)
108
+ and hand-build the fig's HTML against it, then land it with
109
+ **`figura_create_fig`**, setting `area`, `orientation` (`portrait` /
110
+ `landscape` / `both`), `mode` (`single` / `compare` / `variations` default
111
+ to `compare` when Existing-first turned up a baseline), `title`, and a real
112
+ description. This uses the caller's own Claude (the model running this skill)
113
+ no extra cost, full control for precise broken-vs-proposed diptychs.
114
+
115
+ The scaffold IS the source of truth: it's the **exact system prompt Figura
116
+ injects when it renders a fig server-side** — the design rules, exemplars,
117
+ accent hints, your team's composed brand, and the component/device kit
118
+ context, all in one. Follow it verbatim; never invent brand values or restate
119
+ design rules from memory. Match `--platform` to the target (a web fig's
120
+ scaffold composes the team's *web* brand surface, a mobile fig's the *mobile*
121
+ one). **Fallback if the scaffold fetch fails** (older engine/CLI, or the
122
+ `figura_fig_scaffold` tool is unavailable): fetch just the brand with
123
+ `bunx figura-cli brand --json` and author against that — the scaffold is the
124
+ preferred path, the raw brand is the degraded one.
115
125
 
116
126
  **Landing IS hosting — leave `publish` and `commit` unset.** Creating a fig
117
127
  always persists it to Figura (there is no separate "save it for real" step);
@@ -332,8 +342,9 @@ So when you **hand-build** a fig (the default path), do your part of the contrac
332
342
  - **MCP unavailable** (headless / cron, or no interactive auth): fall back to the
333
343
  CLI — `bunx figura-cli fig create` / `fig publish`, with `fig revise` /
334
344
  `fig revisions` for versions, `fig commit` / `fig uncommit` (or `--commit` on
335
- the final create/revise) for the team library, and
336
- `bunx figura-cli brand --json` for the brand.
345
+ the final create/revise) for the team library, `bunx figura-cli fig scaffold`
346
+ for the authoring scaffold, and `bunx figura-cli brand --json` for the raw
347
+ brand (the scaffold's fallback).
337
348
  - **`figura_create_fig`/`figura_revise_fig` itself fails** (no network, API down,
338
349
  auth expired): the fig never entered Figura, so there is no `id`/`viewUrl` to
339
350
  open. Only THEN write the HTML to a local scratch file (project-scoped —