figura-cli 0.13.0 → 0.14.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/dist/index.js +90 -86
- package/dist/mcp.js +32 -32
- package/package.json +1 -1
- package/skills/figura-brand/SKILL.md +31 -10
package/package.json
CHANGED
|
@@ -48,13 +48,18 @@ Hunt across whatever stack this repo uses — do not assume one framework:
|
|
|
48
48
|
- **Identity** — app/brand name + one-line description: `package.json` (name/description), `Info.plist` (`CFBundleName`), app-store copy, the README's first paragraph.
|
|
49
49
|
- **Role/usage notes** — inline comments next to tokens often state the role
|
|
50
50
|
(e.g. `// primary brand accent; record button`). Carry those into the tokens block.
|
|
51
|
+
- **Product areas** — the app's own top-level sections, e.g. a tab bar, a
|
|
52
|
+
sidebar's nav items, or the router's top-level route folders (`app/(tabs)/*`,
|
|
53
|
+
`src/routes/*`, `src/screens/*`). These become `surfaces` — THIS product's
|
|
54
|
+
real areas ("Feed", "Checkout"), never a generic placeholder list and never
|
|
55
|
+
another product's areas.
|
|
51
56
|
|
|
52
57
|
Use `Glob`/`Grep` to locate, `Read` to extract real values. Use the REAL hexes,
|
|
53
58
|
fonts, and sizes from the repo — never invent them.
|
|
54
59
|
|
|
55
60
|
### 2. Synthesize the brand profile
|
|
56
61
|
|
|
57
|
-
Produce
|
|
62
|
+
Produce four fields (see `reference/brand-format.md` for the exact tokensBlock shape):
|
|
58
63
|
|
|
59
64
|
- **name** — the product/brand name.
|
|
60
65
|
- **appDescription** — one clause: what it is + who it's for.
|
|
@@ -66,32 +71,48 @@ Produce three fields (see `reference/brand-format.md` for the exact tokensBlock
|
|
|
66
71
|
- **Icon language** — SF Symbols / inline SVG / icon set the product uses; ban emoji if the brand does.
|
|
67
72
|
- **Voice** — 3–5 short brand voice lines + a one-line tone rule, inferred from the docs/copy.
|
|
68
73
|
- **Conventions** — any hard rules you found ("never use X", aspect ratios, chrome shape).
|
|
74
|
+
- **surfaces** — THIS product's own key areas/sections, short labels (e.g.
|
|
75
|
+
`["Feed", "Profile", "Settings"]`), read from the real navigation/routes you
|
|
76
|
+
found in step 1. Drives the Studio Area picker. 3–10 is typical; skip
|
|
77
|
+
(leave unset) if the repo genuinely has no discoverable navigation — never
|
|
78
|
+
guess or reuse a generic/other-product list. Capped at 24 areas / 40
|
|
79
|
+
characters each.
|
|
69
80
|
|
|
70
81
|
This synthesis IS the value — enrich the raw tokens with the roles, voice, and
|
|
71
82
|
conventions you read from the repo. Keep it grounded in what's actually there.
|
|
72
83
|
|
|
73
84
|
### 3. Confirm, then push
|
|
74
85
|
|
|
75
|
-
Show the user the synthesized `name`, `appDescription`, and the full
|
|
76
|
-
and confirm the target team (`figura whoami`). On approval:
|
|
86
|
+
Show the user the synthesized `name`, `appDescription`, `surfaces`, and the full
|
|
87
|
+
`tokensBlock`, and confirm the target team (`figura whoami`). On approval:
|
|
77
88
|
|
|
78
|
-
- **MCP (preferred):** call `figura_set_brand` with `{ name, appDescription, tokensBlock }`.
|
|
79
|
-
- **CLI fallback:** pipe the block over stdin —
|
|
89
|
+
- **MCP (preferred):** call `figura_set_brand` with `{ name, appDescription, tokensBlock, surfaces }`.
|
|
90
|
+
- **CLI fallback:** pipe the tokens block over stdin, pass surfaces as a flag —
|
|
80
91
|
```bash
|
|
81
|
-
cat <<'TOKENS' | figura brand set --name "<name>" --description "<one clause>" --tokens -
|
|
92
|
+
cat <<'TOKENS' | figura brand set --name "<name>" --description "<one clause>" --tokens - --surfaces "Feed,Profile,Settings"
|
|
82
93
|
… the tokensBlock …
|
|
83
94
|
TOKENS
|
|
84
95
|
```
|
|
85
96
|
(Use `bunx figura-cli` in place of `figura` if it isn't on PATH.)
|
|
86
97
|
|
|
98
|
+
A user can always add/rename/remove/reorder areas later on the brand page — this
|
|
99
|
+
is a starting point, not a one-shot lock-in.
|
|
100
|
+
|
|
87
101
|
### 4. Verify
|
|
88
102
|
|
|
89
103
|
`figura brand --json` (or the `figura_whoami` → `figura brand` read) → confirm
|
|
90
|
-
`isCustom: true` and that the saved tokens
|
|
91
|
-
|
|
104
|
+
`isCustom: true` and that the saved tokens AND `surfaces` match what you set.
|
|
105
|
+
The response also carries `platformProfile` — the engine auto-detects mobile /
|
|
106
|
+
web / both from the tokens you just wrote (breakpoints, font stacks,
|
|
107
|
+
safe-area/tab-bar tokens, hover
|
|
108
|
+
states — deterministic, no LLM) every time you save, so nothing extra to do
|
|
109
|
+
here. It only ever changes on its own until the team explicitly overrides it
|
|
110
|
+
on the brand page (Studio then defaults its device frame off that value —
|
|
111
|
+
iPhone for mobile, browser for web). Then tell the user the brand is set and
|
|
112
|
+
suggest trying `/fig <a screen>` to see it render on-brand.
|
|
92
113
|
|
|
93
114
|
## Output
|
|
94
115
|
|
|
95
116
|
Report the brand you set (name + a one-line summary of the palette/type/voice you
|
|
96
|
-
captured) and confirm it's live for the team. Don't
|
|
97
|
-
again unless asked.
|
|
117
|
+
captured, plus the surfaces list) and confirm it's live for the team. Don't
|
|
118
|
+
paste the entire tokensBlock again unless asked.
|