@calibrate-ds/cli 0.1.66 → 0.1.67

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.
Files changed (2) hide show
  1. package/README.md +59 -27
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -154,32 +154,57 @@ PTB exposes 22 tools over a stdio MCP server. Your AI IDE can query component de
154
154
 
155
155
  ### Available tools
156
156
 
157
+ **Inspection**
158
+
157
159
  | Tool | What it does |
158
160
  |---|---|
159
161
  | `list_components` | List all components with kind, category, variant axes, and Figma node ID |
160
162
  | `get_component` | Full design context: variant axes, token bindings, state/interaction contracts, render tree |
161
- | `get_component_slots` | Instance-swap slots only what child components (e.g. icons) a component accepts, and which are valid |
162
- | `find_component_by_figma_node` | Resolve a Figma node ID to its component and Symbol Bridge entry |
163
- | `is_stale` | Check if a component's implementation is behind the latest design |
164
- | `what_uses` | Which components reference a given token or component |
165
- | `coverage_summary` | Stamped vs. stale vs. unimplemented counts across the whole design system |
163
+ | `find_component_by_figma_node` | Resolve a Figma node ID to its component |
164
+ | `get_status` | Compare `stampedHash` vs `designHash` what is ready, stale, or unimplemented |
165
+ | `what_uses` | Which components depend on a given component |
166
166
  | `token_impact` | Which components are affected by a token change |
167
- | `list_themes` | List all token themes/collections in the design system |
168
- | `get_token` | Resolve a token name to its value and which components use it |
169
- | `get_verify_report` | Latest pixel-diff verify report for a component |
170
- | `run_scan` | Scan Figma and refresh the local snapshot — no terminal required |
171
- | `generate_components` | Scaffold typed React shells from the snapshot — no terminal required |
172
- | `generate_tokens` | Regenerate CSS token files — no terminal required |
173
- | `export_context` | Export `.ptb/context/` and update `ptb.lock` — no terminal required |
174
- | `stamp_component` | Mark a component as implemented no terminal required |
175
- | `assign_component` | Assign a component to a developer — no terminal required |
176
- | `start_work` | Claim a component and get the full implementation brief (context, deps, acceptance criteria) in one call |
177
- | `submit_work` | Submit completed work — reads the actual `.ptb/verify/<slug>/report.json` (never trusts self-reported scores), hard-blocks on missing or scaffold reports, enforces a regression gate (score must meet or exceed the prior stamp), then stamps and transitions lifecycle status |
178
- | `implement_component` | Get full design context + dependency build plan for a component. Instructs the AI to build dependencies first, write files, ensure Storybook is running, run `run_verify`, then stamp with the verify result |
179
- | `setup_mcp` | Configure PTB MCP for additional AI IDEs (Cursor, Windsurf, Antigravity, VS Code) — no terminal required |
180
- | `get_changelog` | Show what changed in recent PTB versions |
181
- | `get_upgrade_checklist` | Steps to run after upgrading PTB |
182
- | `get_setup_checklist` | Check current project setup state (config, token, snapshot, context, tokens, components) and return a live guide the AI runs auto-executable steps immediately and only pauses for manual ones |
167
+ | `list_themes` | List all token collections and their modes |
168
+ | `get_token` | Resolve a token name to its value and which components reference it |
169
+
170
+ **Pipeline**
171
+
172
+ | Tool | What it does |
173
+ |---|---|
174
+ | `run` | Run a PTB pipeline stage: `scan`, `generate`, `tokens`, `context`, `prune` |
175
+
176
+ **Work lifecycle**
177
+
178
+ | Tool | What it does |
179
+ |---|---|
180
+ | `assign_component` | Assign a component to a developer |
181
+ | `start_work` | Claim a component and get the full implementation brief (context, deps, acceptance criteria) |
182
+ | `implement_component` | Get design context + dependency plan — AI writes code, runs verify, and stamps |
183
+ | `submit_work` | Stamp work done — reads `report.json`, hard-blocks on scaffold/missing report, enforces regression gate |
184
+ | `document_component` | Generate MDX documentation and/or Storybook stories |
185
+
186
+ **Governance**
187
+
188
+ | Tool | What it does |
189
+ |---|---|
190
+ | `run_diff` | What changed in Figma since the last stamp — variant axes, tokens, layout |
191
+ | `diff_clear` | Clear diff history for a component after reviewing changes |
192
+ | `my_queue` | Components assigned to the current developer, sorted by status |
193
+
194
+ **Verification**
195
+
196
+ | Tool | What it does |
197
+ |---|---|
198
+ | `run_verify` | Pixel-diff the implementation against Figma thumbnails — requires Storybook running locally |
199
+ | `get_verify_report` | Last verification report for a component without re-running |
200
+
201
+ **Setup & info**
202
+
203
+ | Tool | What it does |
204
+ |---|---|
205
+ | `setup_mcp` | Configure PTB MCP for additional AI IDEs (Cursor, Windsurf, Antigravity, VS Code) |
206
+ | `get_checklist` | Live setup or upgrade checklist with state detection (`kind: "setup"` or `"upgrade"`) |
207
+ | `whats_new` | Per-version upgrade changelog — what to re-run after updating PTB |
183
208
 
184
209
  ### Setup: Claude Code (zero config)
185
210
 
@@ -236,7 +261,7 @@ Most AI IDEs spawn the MCP server from their own install directory, not your pro
236
261
 
237
262
  ### Figma token and the MCP server
238
263
 
239
- The MCP server is a **separate process** from your terminal — it does not inherit your shell exports. If `run_scan` tells you `FIGMA_ACCESS_TOKEN is not set in the MCP server environment`, that is why.
264
+ The MCP server is a **separate process** from your terminal — it does not inherit your shell exports. If `run({ stage: "scan" })` tells you `FIGMA_ACCESS_TOKEN is not set in the MCP server environment`, that is why.
240
265
 
241
266
  **Never put your token directly in the MCP config file.** That file can end up in a dotfiles repo, get synced, or be shared — treat it like a `.env` file.
242
267
 
@@ -282,8 +307,8 @@ Then add the block to your MCP config — but prefer options 1 or 2 to keep cred
282
307
 
283
308
  1. Update the CLI: `npm install -g @calibrate-ds/cli`
284
309
  2. Restart your IDE's MCP server (the IDE needs to re-spawn the process)
285
- 3. Ask your AI IDE: `"get_upgrade_checklist"` to see what to re-run
286
- 4. Run `ptb scan` (or ask your IDE to `run_scan`) to pick up any scanner changes
310
+ 3. Ask your AI IDE: `"whats_new"` to see what to re-run
311
+ 4. Run `ptb scan` (or ask your IDE to `run({ stage: "scan" })`) to pick up any scanner changes
287
312
 
288
313
  ---
289
314
 
@@ -400,7 +425,7 @@ Weaker models will produce code that compiles but misses design intent — wrong
400
425
  PTB extracts everything from Figma into structured JSON. Your AI IDE doesn't need a live Figma connection — `.ptb/context/` files contain variant axes, token bindings, state contracts, layout, render trees, and interaction contracts.
401
426
 
402
427
  **Workflow:**
403
- 1. Run `ptb export context` after each scan (or use the `export_context` MCP tool)
428
+ 1. Run `ptb export context` after each scan (or use `run({ stage: "context" })` via MCP)
404
429
  2. `ptb scan` auto-generates `AI.md` at your package root — most AI IDEs pick this up automatically
405
430
  3. Connect the MCP server — then ask your IDE: `"get_component Button"` for full design context
406
431
  4. Let the AI write the component — it has full design intent without needing Figma access
@@ -452,7 +477,7 @@ ptb stamp component Button -m "implemented with new focus ring per design v2"
452
477
  ptb stamp component . # stamp all
453
478
  ```
454
479
 
455
- Or ask your AI IDE: `"stamp_component Button"` — no terminal needed.
480
+ Or ask your AI IDE: `"submit_work Button"` — no terminal needed.
456
481
 
457
482
  ### Viewing history
458
483
 
@@ -707,7 +732,14 @@ All frameworks support the full governance workflow (scan, diff, status, stamp,
707
732
 
708
733
  ## Roadmap
709
734
 
710
- See [docs/PTB_ROADMAP.md](./docs/PTB_ROADMAP.md) for the full milestone breakdown: visual verification, MCP server, playground, visual governance, and bidirectional sync.
735
+ | Milestone | What shipped |
736
+ |---|---|
737
+ | M1 | Scan → generate → governance → team workflow |
738
+ | M2 | `ptb verify` — visual diff + AI feedback |
739
+ | M3 | `ptb mcp` — live MCP server + Symbol Bridge |
740
+ | M4 | `ptb dev` playground + three-column `ptb status` |
741
+ | M5 | Verify-gated implement loop, story index resolution, playground overlay |
742
+ | M5.5–M5.6 | 44-gap audit — CSS emission, naming, lifecycle integrity, scaffold guard, real verify gate (0.1.55 → 0.1.66) |
711
743
 
712
744
  ---
713
745
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calibrate-ds/cli",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,10 +24,10 @@
24
24
  "commander": "^14.0.3",
25
25
  "openai": "^6.34.0",
26
26
  "zod": "^4.3.6",
27
- "@calibrate-ds/core": "^0.1.66",
28
- "@calibrate-ds/shared-types": "^0.1.66",
29
- "@calibrate-ds/generator-react": "^0.1.66",
30
- "@calibrate-ds/figma-client": "^0.1.66"
27
+ "@calibrate-ds/core": "^0.1.67",
28
+ "@calibrate-ds/shared-types": "^0.1.67",
29
+ "@calibrate-ds/figma-client": "^0.1.67",
30
+ "@calibrate-ds/generator-react": "^0.1.67"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^22.13.5",