@viasat/beam-react-claude-plugin 2.51.0 → 2.53.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.
@@ -3,7 +3,7 @@
3
3
  "name": "beam-react-claude-plugin",
4
4
  "displayName": "Beam React Claude Plugin",
5
5
  "description": "Equips AI tools with Beam Design System context for building, auditing, and answering implementation questions across tokens, components and data sources in React.",
6
- "version": "2.51.0",
6
+ "version": "2.53.0",
7
7
  "author": {
8
8
  "name": "Viasat",
9
9
  "url": "https://git.viasat.com/vega/beam"
@@ -15,7 +15,7 @@
15
15
  "command": "npx",
16
16
  "args": [
17
17
  "-y",
18
- "@viasat/beam-react-mcp@2.51.0"
18
+ "@viasat/beam-react-mcp@2.53.0"
19
19
  ]
20
20
  }
21
21
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viasat/beam-react-claude-plugin",
3
- "version": "2.51.0",
3
+ "version": "2.53.0",
4
4
  "description": "Claude Code plugin that reduces AI hallucinations on Beam usage. Ships skills, reference docs, and a user-invocable token audit command.",
5
5
  "license": "MIT",
6
6
  "author": "Viasat",
@@ -28,12 +28,13 @@ See `references/data-sources.md` § MCP server for the tool catalog and call ord
28
28
 
29
29
  ## Checklist (each → a TodoWrite todo)
30
30
 
31
+ 0. **Verify project wiring (BUILD only).** Skip entirely on ASK. Grep project source (exclude `node_modules/`, `dist/`, `build/`, `.next/`, `out/`, and lockfiles) for `@viasat/beam-tokens/styles.css` and a `@viasat/beam-fonts` stylesheet import. Framework detect: `next` in `package.json` deps → Next.js; Vite/CRA → CSR; else → ambiguous, prompt the user, do not guess. **Wiring OK:** CSR = tokens import + `@viasat/beam-fonts/styles.css` (not the `.nextjs` variant); Next.js = tokens import + `@viasat/beam-fonts/styles.nextjs.css` + a `postinstall` font-copy script in `package.json`. On OK: emit `wiring OK` and continue. On missing / wrong variant / (Next.js) missing postinstall: alert the user what's wrong and ask **once** for approval to auto-remediate — do **not** edit anything before approval. On approval: fetch `getConcept('getting-started')` (if MCP is unavailable, fall back to `curl -fsSL https://react.beam.viasat.com/llms/getting-started.txt` per `references/data-sources.md`) and apply the correct variant from it (do not hand-author snippets) — add tokens import if missing; add/replace the correct fonts import for the framework; Next.js also add the `postinstall` script to `package.json` and tell the user to run `npm install` (skill does not run it). Insertion: CSR → root entry (`index.tsx`/`index.ts`, else `main.tsx`/`main.ts`, else `App.tsx`); Next.js pages-router → `_app.tsx`/`_app.js`; app-router → `layout.tsx`. If the root entry can't be confidently located, prompt the user. After wiring, surface exactly what changed. On decline or unresolved ambiguity: state that fonts/styles may silently fall back to system fonts; proceed only as the user directs. _Accepted limitation: grep confirms an import exists in source, not that it's in the bundled/executed path._
31
32
  1. **Plan.** BUILD: component tree, composition rule, expected tokens. ASK: list components/concepts to look up (cap ~5).
32
33
  2. **Gather.** Try MCP first: `listComponents` to discover, `getComponent` for props/story index, `getComponentStory` for usage examples. For any component that manages state across a tree (Toast, Dialog, Popover, Select, Menu, Stepper, SideNav), check `getComponent`'s `pairedHooks` and read those hook/provider signatures before writing code, because the hook is the API and props alone produce broken usage. If `pairedHooks` is absent but the component lists subcomponents (like `Dialog.Trigger` or `Select.Option`), build with those subcomponents. Only grep node_modules for sibling `useX`/`Provider` exports when there are no `pairedHooks` and no subcomponents (see `references/data-sources.md` § Paired hooks). If MCP unavailable, tell the user: "The Beam MCP server is unavailable, falling back to llms.txt. If you weren't expecting this, please report it in **#beam-help**." Then fall back to curl llms.txt (index then specific pages). If llms.txt unreachable, fall back to node_modules `.d.ts` files. If all fail, apply the honesty rule: stop, don't fabricate.
33
34
  3. **Token check (BUILD).** Look up every color/dimension/font per `references/tokens.md`. Zero violations.
34
35
  4. **Produce.** BUILD: names/props/imports from Step 2's fetched data only; styling values are tokens (or `rem`). ASK: every claim cites its MCP or llms.txt source.
35
- 5. **Self-check.** Names/props/imports match fetched data; zero token violations; composition matches the plan. If MCP and llms.txt were both unreachable, apply the honesty rule.
36
- 6. **Report.** BUILD: components/tokens/files touched + suggest `/beam-audit-tokens`. ASK: the cited answer is the report.
36
+ 5. **Self-check.** Names/props/imports match fetched data; zero token violations; composition matches the plan; required global CSS imports present (tokens + framework-correct fonts; Next.js also postinstall) — Step 0 passed or was remediated. If MCP and llms.txt were both unreachable, apply the honesty rule.
37
+ 6. **Report.** BUILD: components/tokens/files touched + suggest `/beam-audit-tokens`; wiring status (`wiring OK`, or what was wired + what the user still needs to run). ASK: the cited answer is the report.
37
38
 
38
39
  ## Red flags — STOP and re-check
39
40
 
@@ -48,6 +49,7 @@ See `references/data-sources.md` § MCP server for the tool catalog and call ord
48
49
  | "Question, but they obviously want code" | Default to ASK; end with the switch-to-BUILD prompt. Don't write files without an explicit BUILD request. |
49
50
  | "node_modules has it, skip the fetch" | MCP and llms.txt have descriptions/examples the `.d.ts` files lack. Try them first; node_modules is last resort. |
50
51
  | "ToastContainer takes toasts as children/props" | Context-driven components are driven by a hook. Check `pairedHooks` and read `useToast` before writing. Props-only is the canonical broken pattern. |
52
+ | "Components render, typography looks wrong" | The fonts stylesheet (or Next.js `postinstall`) isn't wired; a missing/`@font-face`-less import falls back to system fonts silently. Run the Step 0 wiring check. |
51
53
 
52
54
  ## Not in scope
53
55