mcp
v1.0.0Bridge MCP server: lets Claude (Claude Code, Claude Desktop or any MCP client) read, check and propose changes to a DTCG design system repo through pull…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
bridge_get_config Get Bridge config
Where the design system lives and what Bridge may do: source (local path or GitHub repo), write access, token tiers, modes (brand/theme/density...), reviews (who decides what the library keeps, and who reviews each product's design before developers) and the full bridge.config.json. Call first in a new repo.
bridge_whoami Who am I in Bridge
Who this session acts as: the person's name, their role in the team (Admin, Reviewer, Can edit or Reader), how they signed in (GitHub login, or email member with the address masked), the team, and in one line what a save means for them (through Bridge as them, or with their own GitHub access). Call it when the person asks which account Bridge uses, or before a first save when unsure.
bridge_get_claude_design_system Get the Library for Claude Design
The Bridge Library as a Claude Design System, at the version Bridge serves now: the version, a manifest (path, size, sha256 and download url of each file, published under project/), the team's Design System artifact when Bridge knows it, what to do ("create", "update" or "none"), the files that changed since the team last published, and the steps. Call it when the person asks to add or update the Library in Claude Design, and before building with the Library in a claude.ai artifact or any page that cannot install npm packages (load its files from "base"). Create the artifact once; after that a…
| Parameter | Type | Description |
|---|---|---|
inline | array | Manifest paths (project/...) whose text to include in the answer, at most 256 kB together. Download the others (components/bundle.js) from their url. |
bridge_set_claude_design_system_url Remember the team's Library in Claude Design
Saves, for the team, the address of its Design System artifact in Claude Design and the version just published to it, so the next bridge_get_claude_design_system lists only the files that changed and Studio Settings says when an update is ready. Admins and leads only (Bridge checks). Call it right after creating or republishing the artifact.
| Parameter | Type | Description |
|---|---|---|
url * | string | The artifact link, like https://claude.ai/artifact/AbC123. |
version | string | The Library version just published (from bridge_get_claude_design_system). Default: the one Bridge serves now. |
bridge_list_tokens List tokens
List tokens with their resolved CSS value in one mode. Filter by tier (primitive, brand, semantic, density, component...), $type, or path prefix. Paginated (limit/offset).
| Parameter | Type | Description |
|---|---|---|
limit | integer | Default 100. |
mode | object | Mode values, e.g. {"theme":"dark","brand":"ocean"}. Omitted modes use their default. See bridge_get_config for the modes this repo has. |
offset | integer | |
prefix | string | Path prefix, e.g. color.action or button. |
tier | string | Tier name from bridge_get_config.tokensPerTier. |
type | string | DTCG $type: color, dimension, duration, shadow, fontFamily, number... |
bridge_get_token Get token
Everything about one token: CSS variable, type, tier, description, the files that define it, resolved value in every mode (brand x theme x density, collapsed where equal) with its alias chain, tokens that alias it, and components whose CSS uses it (directly or through a component token).
| Parameter | Type | Description |
|---|---|---|
path * | string | color.text.muted, --color-text-muted or var(--color-text-muted). |
bridge_search_tokens Search tokens
Find tokens by words in the path or description ("danger text", "focus ring"), by CSS variable, or by value ("#c2410c", "16px": exact and near colors). Use before writing UI code or proposing a new token.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer | Default 20. |
type | string | Restrict to a $type. |
bridge_check_contrast Check contrast
Run the repo's WCAG contrast gate (every pair in every brand x theme). Pass `edits` to preview a change: returns the pairs that move and any new failure, without writing anything. Pass `pairs` to check ad-hoc fg/bg pairs.
| Parameter | Type | Description |
|---|---|---|
edits | array | Proposed edits to evaluate (nothing is written). |
includePassing | boolean | Return every result, not only failures and the tightest pairs. |
mode | object | Only report these modes. |
pairs | array | Ad-hoc pairs instead of the repo gate. min: 4.5 text, 3 non-text. |
bridge_validate_tokens Validate tokens
Validate tokens: DTCG 2025.10 shape per $type, names, broken and circular aliases in every mode, alias type mismatches, missing layer files, and mode parity (a semantic token must exist in both light and dark). Pass `edits` to validate a change before proposing it.
| Parameter | Type | Description |
|---|---|---|
edits | array | |
includeWarnings | boolean |
bridge_list_components List components
List design system components with family, one-line summary (what it is for) and figma: the Figma component and its link, or "not linked to Figma yet". Use before building UI: prefer an existing component over new markup. For a claude.ai artifact or any page that cannot install npm packages, call bridge_get_claude_design_system and load the Library from its base URL; never invent token values.
| Parameter | Type | Description |
|---|---|---|
family | string | Storybook family, e.g. Forms, Overlays. |
withSummaries | boolean | Default true locally, false remotely (fewer requests). |
bridge_get_component Get component
One component: props parsed from TypeScript (type, default, description, allowed values), usage docs (summary, whenToUse, whenNotToUse, dos/donts with examples, accessibility, contentGuidelines, anatomy), behaviors when the docs list them ({ id, family, text, keys?, announces? }: how it reacts to keys and pointer, with stable ids shared across components) and version (the package version those ids ship in), CSS variables it uses, story names, and figma: its Figma component and link from bridge.components.json, or "not linked to Figma yet". For a claude.ai artifact or any page that cannot insta…
| Parameter | Type | Description |
|---|---|---|
name * | string | Component name, e.g. Button. |
include | array | Keep only these docs keys, e.g. ["whenToUse","accessibility"]. |
bridge_list_patterns List patterns
List the patterns of the design system (patterns/<id>.pattern.json) with id, kind and what each is for: interactions (one gesture several components share, like close-on-escape) and actions (a task people take across the product, like delete). Call bridge_get_pattern before building a flow that does one of them.
| Parameter | Type | Description |
|---|---|---|
kind | string | Only this kind. |
bridge_get_pattern Get pattern
One pattern by id or name, with its kind. An interaction gives the components that do it, each in its own words and keys (from their docs.json behaviors). An action gives whether it can be undone, its rules (Undo in a Toast when it can be undone, an AlertDialog first when it cannot), the components it uses and usedIn: the real places of the product that do it. Follow the rules when building that flow.
| Parameter | Type | Description |
|---|---|---|
id * | string | Pattern id or name, e.g. delete or close-on-escape. |
bridge_draft_docs Draft component docs
Start or refresh a component's docs.json. Returns what the code tells (props table from TypeScript, tokens its stylesheet reads, tokens it reads through another component's stylesheet, anatomy from the CSS module classes, contrast checks those tokens take part in, a changelog line, existing prose kept, the keys still missing), the target path, and a prompt for you to write the missing prose in the repo conventions. Nothing is written: save the result with "draftedBy": "claude" and "needsReview": true so a reviewer accepts it in Bridge Studio.
| Parameter | Type | Description |
|---|---|---|
name * | string | Component name, e.g. Icon. |
branch | string | Exploration branch (explore/<slug>): read the component there (GitHub) and save the draft on that branch, not in a pull request to main. |
page | integer | Page of the prompt (default 1). A long prompt comes in pages; promptPage.next says when there is more. |
bridge_get_design_language Get design language
The design language doc (principles, color, type, space, density, radius, elevation, motion, icons, voice, accessibility). Without `section`: table of contents. With it: that section ("4", "Color", "voice-and-tone"), or "all".
| Parameter | Type | Description |
|---|---|---|
section | string |
bridge_get_guidelines Get guidelines
Rules for agents in this repo (AGENTS.md): always / ask before / never lists, token conventions, risk tiers, and what Bridge enforces. Pass `section` for one section verbatim, or "all".
| Parameter | Type | Description |
|---|---|---|
section | string |
bridge_propose_token_change Propose token change
Propose token edits as a reviewable change. Applies edits with minimal JSON diffs, validates, runs the contrast gate before/after, computes the risk tier and semver bump, writes a changeset and a designer-friendly PR body. Blocked (nothing written) if it adds validation errors or breaks a contrast pair. Suggest mode (the default unless bridge.config.json says "changes": "direct"): files a suggestion, a GitHub issue with the exact edits, the checks and the tier, status "suggested" with its number; owners approve it and a developer applies it (bridge_apply_suggestion). Direct mode: local repo, c…
| Parameter | Type | Description |
|---|---|---|
edits * | array | |
title * | string | Short imperative title, e.g. "Darken muted text in dark theme". Becomes the branch name and PR title. |
branch | string | Exploration branch (explore/<slug>) to commit the edits to instead of opening a new pull request. GitHub: one commit on that branch. Local: written to the working tree, which must have that branch che… |
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean | Return the diff, tier, files and PR body without writing. |
jira | string | Jira key like DS-42, as in Studio's Start an exploration: first in the branch name and title so Jira links them. |
pr | A branch already in review (12 or "#12") to add the edits to, as "Edit tokens in this branch" in Studio: one commit there and a comment for the reviewers. Its author or someone with write access; need… | |
product | string | Product key or name (bridge_list_products) the change is for. Default: the product of the current folder or repo. Ask the person when it is not obvious. |
summary | string | Why: the problem and the intent, for the reviewers. Plain sentences, no em dash. |
bridge_list_brands List brands
Brands of the repo: slug, name, default, primary action color and theme override files.
bridge_plan_brand Plan a new brand
Dry run of a new brand: the brand token file (generated primary and neutral ramps, radius and font roles), copied theme overrides, the bridge.config.json change, every contrast pair for the new brand in light and dark (ok, or the failing pairs), validation issues, the risk tier (always Tier 3, minor) and the PR body. Writes nothing.
| Parameter | Type | Description |
|---|---|---|
slug * | string | Lowercase letters, digits and single dashes, 2 to 24 characters: "acme", "north-star". Becomes brands/<slug>.tokens.json and the data-brand value. |
accent | Separate accent ramp (signal, focus ring). Optional. | |
fonts | object | Font ids the repo self-hosts: fraunces (headings only), instrument-sans, plex-sans, system. |
from | string | Brand to start from (see bridge_list_brands), or "blank". Default: the default brand. Its theme overrides are copied. |
link | Separate link ramp. Optional. | |
name | string | Display name. Default: the slug in title case. |
neutral | Neutral tint: "#rrggbb" (its hue and how tinted it is) or an OKLCH hue. Text and line steps keep Bridge contrast. | |
notes | string | Why this brand exists, for the reviewers. Plain sentences, no em dash. |
primary | Primary color: "#rrggbb" (pinned at the step primary buttons use, so a too-light color fails the contrast gate) or an OKLCH hue in degrees. Also drives accent and link unless set. | |
radius | Radius roles: a preset (soft 6/12/20/20, balanced 4/10/16/20, crisp 2/4/6/10) or px per role on the radius scale. |
bridge_propose_brand Propose a new brand
Propose a new brand as a reviewable change. Same plan as bridge_plan_brand; blocked (nothing written) when an input is invalid or a contrast pair fails. Local repo: commits to a new local bridge/brand-<slug> branch without touching your working tree (never pushes). GitHub with token: new branch + draft PR labelled "source: mcp", "tier: 3" and "tokens". Never writes to main. Suggest mode (the default unless bridge.config.json says "changes": "direct"): one suggestion issue with the brand files instead, applied by a developer once approved. Tell the user a new brand is Tier 3: it needs design an…
| Parameter | Type | Description |
|---|---|---|
slug * | string | Lowercase letters, digits and single dashes, 2 to 24 characters: "acme", "north-star". Becomes brands/<slug>.tokens.json and the data-brand value. |
accent | Separate accent ramp (signal, focus ring). Optional. | |
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean | Return the plan and file contents without writing. |
fonts | object | Font ids the repo self-hosts: fraunces (headings only), instrument-sans, plex-sans, system. |
from | string | Brand to start from (see bridge_list_brands), or "blank". Default: the default brand. Its theme overrides are copied. |
link | Separate link ramp. Optional. | |
name | string | Display name. Default: the slug in title case. |
neutral | Neutral tint: "#rrggbb" (its hue and how tinted it is) or an OKLCH hue. Text and line steps keep Bridge contrast. | |
notes | string | Why this brand exists, for the reviewers. Plain sentences, no em dash. |
primary | Primary color: "#rrggbb" (pinned at the step primary buttons use, so a too-light color fails the contrast gate) or an OKLCH hue in degrees. Also drives accent and link unless set. | |
radius | Radius roles: a preset (soft 6/12/20/20, balanced 4/10/16/20, crisp 2/4/6/10) or px per role on the radius scale. |
bridge_list_reviews List reviews
Open pull requests on the repo (flagging the ones Bridge opened) and, locally, the bridge/* proposal branches. An exploration In review carries waitingFor, who and why it waits ("Waiting for the library decision on Timeline"); null otherwise.
| Parameter | Type | Description |
|---|---|---|
onlyBridge | boolean | Only PRs labelled source: mcp or on bridge/* branches. |
state | string |
bridge_get_review Get review
Review a token change: designer-readable diff table, contrast before -> after, new validation errors, downstream impact, computed risk tier (and a warning if labelled lower), and for PRs waitingFor (an exploration In review: who and why it waits, else null), the CI status, approvals and roles: who may approve design, approve tech and ship, with GitHub teams named and their size, and any team that cannot be read with the fix. Pass `pr` (GitHub) or `branch` (local proposal branch).
| Parameter | Type | Description |
|---|---|---|
branch | string | |
pr | integer |
bridge_review_pr Review pull request
Post a review on a PR as the token owner: comment, approve or request changes, with a body. Kept for older prompts: bridge_review_branch does the same in designer words (an approval may have no text). Needs GITHUB_TOKEN. Only do this when the user asked for it; merging is a separate step (bridge_merge_branch), only when the person asks.
| Parameter | Type | Description |
|---|---|---|
body * | string | What to fix or why it is fine. Plain sentences. |
event * | string | |
pr * | integer |
bridge_get_history Get token history
History of the design tokens: merged token-changing PRs and commits (local git: first parent of HEAD; GitHub: PR merge commits), newest first, each with author, date, why (changeset summary, PR or commit body), version it shipped in, risk tier, semver bump, breaking flag and change counts, plus the timeline of design system versions. Filter by token (path or group prefix), author, tier, version, breaking, dates or text.
| Parameter | Type | Description |
|---|---|---|
author | string | |
breaking | boolean | |
includeChanges | boolean | List the token changes of each entry (always on with token). |
limit | integer | Entries returned (default 20). |
query | string | Text in the title, why, PR number or sha. |
since | string | ISO date, inclusive. |
tier | ||
token | string | Token path or group prefix: color.text matches color.text.muted. |
until | string | ISO date, inclusive. |
version | string | "1.2.0" or "Unreleased". |
bridge_get_token_history Get token history for one token
Every recorded change of one token, newest first, renames followed: value before and after per mode (raw and resolved CSS), who, when, the PR and why. Use before restoring a value or answering "when did this change and why".
| Parameter | Type | Description |
|---|---|---|
path * | string | color.text.muted or --color-text-muted. |
limit | integer |
bridge_plan_revert Plan a revert (dry run)
What undoing a merged token change takes, computed against the CURRENT base branch (not a blind git revert): the inverse edits, conflicts where a token changed again later (with the later PR), changes already undone, contrast before and after, new validation errors, risk tier, files and the PR body ("Revert: <title>", links the original PR). Or pass restore to put one token back to an older value. Writes nothing.
| Parameter | Type | Description |
|---|---|---|
includeBody | boolean | Include the PR body (default true). |
limit | integer | Edits, conflicts, skipped and changes listed per call (default 50). counts gives the totals. |
offset | integer | Skip that many of each list, to read the next page. |
resolutions | object | Per conflict key ("path@file" from bridge_plan_revert): keep-current (default) keeps the later value, use-before puts the value from before the reverted change back. |
restore | object | Restore one token to an older value instead of reverting a whole change. |
restoreConflicts | boolean | Every conflict uses the value from before the change. Only when the user asked. |
target | string | History entry to undo: id (pr-12), PR number (#12) or commit sha. |
bridge_propose_revert Propose a revert
Plans the revert (or restore) like bridge_plan_revert, then: local repo, commits to a new local bridge/* branch without touching your working tree (never pushes); GitHub with token, new bridge/* branch and a PR labelled revert and its tier (draft for Tier 2 and 3). Blocked when it would add validation errors or break a contrast pair. Never writes to main. Suggest mode (the default unless bridge.config.json says "changes": "direct"): one suggestion issue with the files instead, applied by a developer once approved. Show the user the plan and its conflicts first.
| Parameter | Type | Description |
|---|---|---|
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean | |
resolutions | object | Per conflict key ("path@file" from bridge_plan_revert): keep-current (default) keeps the later value, use-before puts the value from before the reverted change back. |
restore | object | Restore one token to an older value instead of reverting a whole change. |
restoreConflicts | boolean | |
target | string |
bridge_scaffold_component Scaffold component
Generate a new component folder per the repo checklist: Name.tsx (forwardRef, typed props), Name.module.css (existing tokens only), stories with AllStates, docs.json with the reference component's keys, a keyboard + axe test when interactive, index.ts. Locally writes the files (never overwrites); remotely returns them. New components are Tier 2: confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
family * | string | Storybook family, e.g. Forms, Navigation, Feedback. |
name * | string | PascalCase, e.g. SegmentedControl. |
summary * | string | One sentence: what it is for (goes to docs.json and the JSDoc). |
basePrimitive | string | Base UI part it wraps, e.g. @base-ui/react/toggle-group. |
element | string | Root HTML element: div, button, span, nav, section, ul, a, input. |
interactive | boolean | Adds the keyboard + axe test. |
write | boolean | Local only: false returns the files without writing. |
bridge_visual_impact Visual impact of a change
Screenshots what a design system change touches, before and after, and pixel-diffs them. Picks the impacted stories from the changed token values (CSS variables each component reads) and changed component files, plus the app screens (admin back office, both tenants), in every brand and theme. Builds Storybook and the app at both refs, so a full run takes minutes and needs Chrome; plan: true answers in seconds with the selection only. Returns counts, the largest changes with paths to before | after | diff composites, and the manifest path. Local repos only.
| Parameter | Type | Description |
|---|---|---|
base | string | Base git ref (default main). The merge base with head is used, like a pull request. |
head | string | Head git ref (default HEAD). Commits only: uncommitted edits are not captured. |
maxStoriesPerComponent | integer | Stories per directly impacted component (default 4, AllStates first). |
only | array | Limit to Storybook stories or app screens. |
out | string | Output folder, relative to the repo (default visual-impact/). |
plan | boolean | Only compute what would be captured and why. No build, no browser. |
threshold | number | Per-pixel color distance that counts as a change (pixelmatch YIQ distance, default 0.03; one step of a color ramp is about 0.1). |
bridge_audit Audit design system adoption
Measure how a product codebase uses this design system (local only). Reads CSS, SCSS, Less, TS/JS, TSX/JSX, and Astro, Vue and Svelte files (template markup, frontmatter and <script> blocks, <style> blocks). Finds hardcoded colors, spacing, radii, shadows, durations, z-index and fonts in style sheets, style attributes, style/sx/styled objects, CSS-in-JS and Tailwind classes, each with the closest token (colors by deltaE across every mode) and a confidence; and in JSX and template markup, DS components versus foreign UI libraries (MUI, react-admin, Radix, shadcn/ui...), native elements a DS com…
| Parameter | Type | Description |
|---|---|---|
path * | string | Product folder or file, absolute or relative to the design system repo root. |
allowlist | string | Allowlist file of known exceptions: { "entries": [{ "file", "line", "what"?, "reason" }] }, paths relative to the audited folder. |
baseline | string | Earlier report from `bridge audit --json` to compare with (progress per metric and file). |
findings | boolean | Include per-file findings with line numbers. Default: only when auditing one file. |
label | string | |
limit | integer | Top files and fixes to return. Default 10. |
bridge_list_requests List component change requests
Component change requests: GitHub issues labeled component-change (from Figma, Bridge Studio, the CLI or an AI tool). Each row has the number, component, kind, title, status (requested: open, no pull request; in-progress: an open pull request says "Closes #n"; done: closed as completed or by a merged pull request; declined: closed otherwise), url and linked pull requests.
| Parameter | Type | Description |
|---|---|---|
component | string | Only requests for this component, e.g. Button. |
limit | integer | Default 100. |
status | string | Default all. |
bridge_get_request Get a component change request
One request, ready to implement: the parsed request (component, kind, summary, changes asked, Figma link, images), its status and linked pull requests, the component files found under the components directory, the agent rules file, and `brief`: the prompt to implement it in this repo. Then work on a branch named agent/request-<n> and open a pull request whose body says "Closes #<n>". If the request is unclear, comment on the issue instead of guessing.
| Parameter | Type | Description |
|---|---|---|
number * | integer | Issue number. |
branch | string | Exploration branch (explore/<slug>) to implement it on: the brief then says to work there and never open a pull request to main. Default: the exploration the request names, if any. |
bridge_make_behavior_preview Make Claude's preview of a behavior request
When the person says "Make the Bridge preview for request #n" (or "Update the Bridge preview for request #n"): everything to make the preview of a behavior request (an issue labeled request: behavior) in this repository: the request (today's sentence, the wanted one), the component's files, its docs.json behaviors entry with its keys, and `brief`: change the component and that entry, add a test that presses the keys, push the branch agent/preview-<n>, open a draft pull request "Preview for #<n>" that never says "Closes", then call bridge_report_behavior_preview. On the Bridge connector it also…
| Parameter | Type | Description |
|---|---|---|
number * | integer | The request (issue) number. |
bridge_report_behavior_preview Record Claude's preview of a behavior request
After bridge_make_behavior_preview: records the preview on the request through Bridge (Bridge's server writes it on the request, so Studio shows it to the lead and the person who asked). state "ready" with the branch agent/preview-<n>, the draft pull request number and the commit sha; "failed" with the reason in one sentence. Needs the Bridge connector.
| Parameter | Type | Description |
|---|---|---|
number * | integer | The request (issue) number. |
state * | string | ready: the branch is pushed and the draft pull request is open. failed: it could not be made. |
branch | string | ready: agent/preview-<n>. |
pr | integer | ready: the draft pull request "Preview for #<n>". |
reason | string | failed: why, in one sentence. |
sha | string | ready: the commit pushed. |
bridge_list_build_requests List build requests
Build requests: structure changes pushed from Figma (a new variant, option, layout or component) that developers build, as GitHub issues labeled component-change and bridge-build, plus library branches from Figma waiting for a developer. Read only: developers split and track the work in GitHub or Jira, Bridge reads it. Each row has the number, component, title, status (requested: nobody assigned; picked-up: assigned; in-progress: a linked draft pull request; in-review: a linked pull request ready for review; shipped: merged or closed as completed; not-planned), who builds it, its age, stale (r…
| Parameter | Type | Description |
|---|---|---|
component | string | Only build requests for this component, e.g. Button. |
filter | string | Default all. waiting: nobody picked it up yet. in-progress: picked up, in progress or in review. |
limit | integer | Default 100. |
bridge_get_build_request Get a build request
One build request, ready to build: what the designer sent (the request, before and after images, props needed, the spec when the issue keeps it), the status timeline, the linked pull request, the Jira key, the component files and `brief`, the prompt to build it in this repo. Build it on a branch named agent/build-<n> and open a pull request whose body says "Closes #<n>". The design is approved in Figma: build what it shows, comment on the issue when something is unclear.
| Parameter | Type | Description |
|---|---|---|
number * | integer | Issue (or library branch) number. |
bridge_create_request Create a component change request
File a component change request as a GitHub issue labeled component-change (source: mcp), in the same format as Figma and Bridge Studio requests. Use it for component work (new component, variant, prop, structure, visual, token binding, bug) that someone should implement in code; token value changes go through bridge_propose_token_change instead. Needs GITHUB_TOKEN with issues write. dryRun returns the issue without creating it. Only create one when the user asked for it.
| Parameter | Type | Description |
|---|---|---|
component * | string | Component name as exported (Button), or the proposed name of a new component. |
kind * | string | new-component: A component the design system does not have yet. new-variant: A size, tone or state the component does not have yet. prop-change: Add, rename or change an option (a prop in code) or its… |
summary * | string | What should change and why, in plain sentences. No em dash. |
title * | string | One line, sentence case: "Add a danger ghost variant". |
changes | array | What changes, from what to what. |
dryRun | boolean | Return the issue title, body and labels without creating it. |
exploration | string | Exploration branch (explore/<slug>) to implement it on instead of a pull request to main. Adds the exploration label. |
figmaUrl | string | Link to the design in Figma, when there is one. |
product | string | Product key or name (bridge_list_products) it is for. Default: the product of the current folder or repo. |
bridge_pending_drafts Pending change texts from Figma
Change texts a designer asked their own Claude to write from the DS Bridge Figma plugin ("Draft with my Claude"), waiting on the bridge-requests branch. Call it when the user says "Draft my Bridge changes". Returns the pending sessions (newest first) with each item: scope (request: a component change request; push: a pull request description of token edits; docs: component docs sections from Bridge Studio, with a brief holding the full prompt), component, kind, the change table, token edits, the designer's notes, the deterministic starting draft, the change lines to write (one per component ch…
| Parameter | Type | Description |
|---|---|---|
images | boolean | Inline the before and after PNGs as image content. Default true. |
sessionId | string | One session only. Default: every pending session. |
bridge_write_drafts Write change texts for Figma
Write the titles, summaries and change lines (or, for docs items, the docs sections or the rewritten passage) you drafted for a session from bridge_pending_drafts. Docs results show up on the Library page marked "Drafted by Claude" for review, cleaned to the docs.json shapes (no em dash; only the sections the item asks for). The DS Bridge Figma plugin fills change texts in within seconds, marked "Drafted by Claude, review before sending"; it never overwrites text the designer typed meanwhile. Each change line becomes the main line of its component row and the first line of its request; its tit…
| Parameter | Type | Description |
|---|---|---|
results * | array | One result per item. |
sessionId * | string | The sessionId from bridge_pending_drafts. |
bridge_start_exploration Start an exploration
Start an exploration: a branch explore/<slug> from the default branch with a note file, and a DRAFT pull request labeled exploration. When the designer says they want to explore, try or prototype something, start one right away: take the name from what they said, never ask them for a purpose, a brief or a use case. For a product with its own repository (bridge.config.json products[].repo, see bridge_list_products), the branch and the draft pull request are created IN THAT PRODUCT REPOSITORY by default, so developers check it out in their own environment; the library arrives there as the npm pa…
| Parameter | Type | Description |
|---|---|---|
name * | string | Short name, sentence case: "Pill buttons". Becomes explore/pill-buttons. |
dryRun | boolean | Return the branch, note and pull request body without writing. |
experimental | array | What is experimental, one line each: "color.action.primary.bg", "Button: pill radius". |
mockup | string | Optional. The mockup the designer starts from: a Figma frame link (Copy link to selection) or a Claude Design page (claude.ai/artifact/<id>). Then bridge_continue_exploration gives the brief to rebuil… |
mockupName | string | Optional, with mockup: its own name when you know it ("Contacts v3"). Studio says "From Contacts v3: 2 pieces the library doesn't have" once its missing pieces are recorded. |
product | string | Product key or name (bridge_list_products) it is tried in. Default: the product of the current folder or repo. |
purpose | string | Optional, never ask for it. The designer's own first sentence about what they explore, when they said one; otherwise leave it out. No em dash. |
useCase | string | user-test: A coded prototype in a test version of a product, with the real components and tokens. stakeholder-demo: Show an idea on real screens before anyone signs off on it. ab-idea: Ship a variant… |
where | string | product (default): in the product's own repository when it has one, else the design system repository. library: always the design system repository; only when the designer chose it after Bridge could… |
bridge_list_explorations List explorations
Explorations (pull requests on explore/* branches) of the design system repository and of every product with its own repository (bridge.config.json products[].repo, one read each; a product repository Bridge cannot reach is left out, bridge_list_products says which): ref ("#12", or "shop#12" in a product repository: pass it as is to the other exploration tools), repo, name, purpose, status (active: running; ready: done exploring, waiting for code; building: developers push to it; shipped: merged; promoted: sent to review the older way; closed), waitingFor (In review: who and why it waits, "Wai…
| Parameter | Type | Description |
|---|---|---|
archived | boolean | true: only the archived ones (the Archived filter in Studio). |
mine | boolean | true: only the ones the person started (the GitHub token's account). Used once at the start of a session to offer to continue one. |
state | string | Pull request state. Default open: running ones and the ones with the developers. |
bridge_continue_exploration Continue an exploration
Pick an exploration up where it was left, when the person says "Continue Bridge exploration #12" (Studio's Continue line; shop#12 for a product with its own repository) or asks to continue one by name. Resolves it, switches the local checkout of its repository to its explore/ branch when nothing is uncommitted (checkout: false leaves the working tree alone; remote: the write tools take "branch"), and returns where it stands: stage (not-started: nothing built beyond the Bridge note; exploring; handed: done exploring or later), whereItStands (one or two plain sentences), the last 3 activity even…
| Parameter | Type | Description |
|---|---|---|
exploration * | string | Its ref (#12, or shop#12 in a product repository), the whole "Continue Bridge exploration #12" line, a name, explore/<name> branch or pull request link. |
checkout | boolean | false: do not switch the local working tree. Default: switch when it is a clean checkout of the exploration's repository. |
bridge_exploration_to_figma Put an exploration in Figma
What Claude needs to rebuild an exploration in a new page of the team's Figma file, when the person says put or send this exploration in Figma (Studio's line: "Put Bridge exploration shop#12 in Figma"). Reads only: Bridge never writes to Figma and holds no Figma token. You build it afterwards with your own Figma connector (use_figma, Plugin API). Returns the Figma file (or, when the team has none, a sentence for the designer pointing to Settings, Figma file), the page name, the source of the changed screens, each Library component they use with its bridge.components.json link (node, key when k…
| Parameter | Type | Description |
|---|---|---|
exploration * | string | Its ref (admin-app#1, #12), the whole "Put Bridge exploration #12 in Figma" line, a name, explore/<name> branch or pull request link. |
bridge_save_exploration Save to the exploration
Save prototype code on an exploration: one commit with the files you send on its explore/<name> branch, so its preview updates in a few minutes. Use it after each step you build, sending every changed file whole (content, or contentBase64 for an image or a font; delete: true removes one). It works without a GitHub access of your own: Bridge saves through the person's Bridge account, also for a designer who joined with their email (Can edit or Admin; a Reader saves nothing). For them any file goes in a product exploration; in an exploration of the design system repository itself only design fil…
| Parameter | Type | Description |
|---|---|---|
exploration * | string | Its ref (#12, or shop#12 for a product), the "Continue Bridge exploration #12" line, its name or its explore/<name> branch. |
message * | string | What this step changes, in a few plain words ("Orders: success toast when an order ships"). |
files | array | Every file this step changed, each whole. Leave it out to save only notes. |
mockupName | string | Only for an exploration started from a mockup: the mockup's own name once you opened it (the Figma frame's or the Claude Design page's title, "Contacts v3"). Studio says "From Contacts v3: 2 pieces th… |
notes | object | The exploration's notes ("Where it stands"), merged into it in the same save. |
screen | string | The screen this step changed, as its place inside the product preview: path, query and hash, starting with / ("/#/orders/XGZFHY3Z", "/?workspace=new#/"). Never the domain. Pick the route that shows th… |
bridge_promote_exploration Done exploring
"Done exploring" on an exploration (explore/<name>), as in Studio (the tool keeps its old name). It asks two reviews at once: the library decision when the screen has something new for the library (governance.owners.design, the library owners) and the product's design review when it is on (products[].designReview, any one of its reviewers, never the author); the result says which were asked and to whom (reviews: { design: { reviewers } | null, library: { owners, pieces } | null }), its status (in-review, or ready-to-build when neither applies; legacyStatus keeps the old waiting-for-lead and do…
| Parameter | Type | Description |
|---|---|---|
exploration * | string | Its ref from bridge_list_explorations (#42, or shop#42 in a product repository), name, explore/<name> branch or pull request link. |
dryRun | boolean | |
pieces | array | Ids of the missing pieces the person ticked (bridge_missing_pieces). Omitted: none is proposed, and the result lists the ones not sent. |
bridge_archive_exploration Archive an exploration
Archive an exploration, as in Studio: the archived label on its still open pull request hides it from the default lists, home and counts (bridge_list_explorations with archived: true lists them). The preview link keeps working. unarchive: true brings it back. Prefer it to bridge_close_exploration, which removes the preview. Needs GITHUB_TOKEN (pull requests or issues: write). Only when the person asked.
| Parameter | Type | Description |
|---|---|---|
exploration * | string | Its ref from bridge_list_explorations (#42, or shop#42 in a product repository), name, explore/<name> branch or pull request link. |
unarchive | boolean |
bridge_close_exploration Close an exploration
Close an exploration without merging it. Its branch stays on GitHub, but closing removes its preview prerelease and visual images: archive it instead (bridge_archive_exploration) unless the person explicitly wants it closed. Needs GITHUB_TOKEN (pull requests: write). Only when the person asked.
| Parameter | Type | Description |
|---|---|---|
exploration * | string | Its ref from bridge_list_explorations (#42, or shop#42 in a product repository), name, explore/<name> branch or pull request link. |
bridge_missing_pieces Find what a product branch adds outside the library
Check a product branch (an exploration started for a product) against the library: the adoption audit on each product file it changes, at its start and at its head, keeps what the branch added. New hardcoded values become token pieces beside the closest token, values written on a library component become a variant of it ("Badge: overdue tone"), components from another UI library with no library equivalent become new components. Values equal to a token and components the library has are fixes, not pieces. With record: true, saves the result in the branch description, where Bridge Studio shows i…
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
record | boolean | Save the pieces in the product branch description (Studio reads them there). Keeps the library branches already opened. |
bridge_open_library_branch Open a library branch for a missing piece
Turn one recorded missing piece into a library branch linked to the product branch, as Bridge Studio does: a token piece opens a token change (same gate and body as bridge_propose_token_change, a draft for design and tech review) and the product branch takes its preview; a variant opens a library exploration with the brief to build it (build it there, then bridge_use_library_preview); a new component opens a component request. Both sides link: the library side says "Needed by" the product branch (label needed-by-product), the product branch records it. Suggest mode (the default unless bridge.c…
| Parameter | Type | Description |
|---|---|---|
piece * | string | The piece id bridge_missing_pieces returned ("badge-overdue-tone"). |
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean | |
usePreview | boolean | Merge the new library branch into the product branch when it already changes something (default true). |
bridge_product_branch Product branch and its library branches
A product branch as Studio shows it: the summary sentence, each linked library branch with its status and reviewers, what its preview means for the product branch and the next action, and the pieces with no library branch yet.
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_use_library_preview Use a library branch preview in a product branch
The product branch takes the latest commits of the library branch of a piece (Bridge merges it in), so the product preview shows the real library change before it ships. A conflict is left to a developer. Needs GITHUB_TOKEN (contents: write). Only when the person asked.
| Parameter | Type | Description |
|---|---|---|
piece * | string | The piece id bridge_missing_pieces returned ("badge-overdue-tone"). |
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_switch_to_published Switch a product branch to the published version
Once its library branches shipped, bring main into the product branch (GitHub update branch): it stops carrying the library change and uses the shipped one. Token conflicts go through bridge_update_from_main. Needs GITHUB_TOKEN (contents and pull requests: write). Only when the person asked.
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_figma_changes Component changes sent from Figma
The library branches the DS Bridge Figma plugin opened for components changed in Figma (label from-figma), with where each stands: an exact token change (no AI, contrast gated), or a branch carrying the spec, waiting for Claude AI to draft the code, then drafted by Claude AI and reviewed by a person.
| Parameter | Type | Description |
|---|---|---|
state | string | Default open. |
bridge_get_figma_change Get a component change from Figma, to draft it
One library branch sent from Figma: its spec (variant matrix, properties, bound variables per variant, layers, what code gave Figma before, the exact token swaps) and the brief to draft the code on that branch. Check out the branch, write the TSX, CSS module, examples, docs and changeset, run npm run specs and the tests, push, then call bridge_mark_figma_change_drafted.
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_mark_figma_change_drafted Mark a Figma change drafted by Claude AI
After you pushed the code for a component change from Figma to its branch: mark its pull request ready for review, label it drafted-by-claude (no longer waiting-for-claude) and say so in its description, in one step, for a person to review. When GitHub refuses ready for review, the labels stay as they were and the error says why. Refused while the branch only carries the spec. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_push_figma_component Send a component change from Figma
What the DS Bridge plugin Push tab does, from a structured diff of a Figma component (the v 1 spec shape: component, figmaName, coded, kind, title, summary, changes, rebinds, needsCode, unknown, variantAxes, properties, bindings, anatomy). An exact token swap on a component token used nowhere else opens a token change (contrast gated, reviewed like any token change); anything that needs code opens a draft branch with the spec, waiting for Claude AI; detached layers, raw values and variables the library lacks are listed with what to do and never sent. Suggest mode (the default unless bridge.con…
| Parameter | Type | Description |
|---|---|---|
diff * | object | The structured component diff (v 1). |
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean |
bridge_figma_gaps Components that differ in Figma
The components whose Figma build differs from their story (Differs) or cannot be checked (Can't check, with the reason), from the latest Check fidelity run of the DS Bridge plugin (the story shots are the referee), else from the measure's own check; a status fix in figma-fixes.json shows with its reason. Read only.
| Parameter | Type | Description |
|---|---|---|
fidelity | The Check fidelity run: a path in the repo, or the report itself (pasted from the plugin's "Copy the report"). Default: figma-fidelity.json in the repo, else on the bridge-requests branch where the pl… | |
fixesFile | string | figma-fixes.json path in the repo (default figma-fixes.json). |
measured | string | measured-specs.json path (default measured-specs.json): read in the repo, else on the bridge-requests branch where the automatic measure (bridge-measure workflow) publishes it. |
bridge_get_gap_case Get the gap case of one component
One component's gap case: per differing variant, its story, args, state, shot and every difference with the part id, property, expected (code) and actual (Figma) and the delta in px. Read only.
| Parameter | Type | Description |
|---|---|---|
component * | string | The Figma set name, e.g. "TextInput". |
fidelity | The Check fidelity run: a path in the repo, or the report itself (pasted from the plugin's "Copy the report"). Default: figma-fidelity.json in the repo, else on the bridge-requests branch where the pl… | |
fixesFile | string | figma-fixes.json path in the repo (default figma-fixes.json). |
measured | string | measured-specs.json path (default measured-specs.json): read in the repo, else on the bridge-requests branch where the automatic measure (bridge-measure workflow) publishes it. |
bridge_propose_component_map Link components to Figma
Proposes bridge.components.json entries that link Library components to their Figma components, and opens them for review like other Bridge changes (a suggestion, or a draft pull request in direct mode; never main). Read the Figma side first with the Figma connector: open the team's Figma file (bridge_get_config, figma.file) and list its components and component sets with their node ids and variant properties, and their keys whenever your connector gives them (.key in the Plugin API): without a key, a link only works inside that same Figma file. Matches by name, then by variant properties; amb…
| Parameter | Type | Description |
|---|---|---|
components * | array | The Figma components and component sets read from the team's file. Variants ("Size=sm") are skipped. |
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean | |
file | string | The Figma file link or key. Default: figma.file of bridge.config.json. |
summary | string | One sentence for the reviewer. No em dash. |
bridge_list_products List products
The products of this design system (bridge.config.json "products": name, repo or folder, preview link pattern, framework; for a product with its own repository, connection: connected, read-only or not-connected, where not-connected means its explorations are left out of the lists until an admin installs the Bridge GitHub App there; access says in one sentence whether this person can start and save its explorations, trust it over connection) and the one the current folder or repo belongs to, which tools that start work use when no product is given. Ask the person which product when it is not ob…
bridge_what_needs_me What needs me
The review queue, as Studio counts it (open branches, without running explorations and the release automation), each with its status in designer words, and first the ones where the person acts now: an approval they can give, their own branch blocked, ready for them to merge. Each item carries hat ("design-review" or "library"): branches change the library, so their hat is library. explorations lists the explorations In review that ask the person something: one item per exploration, hat the first thing asked and hats every hat when it asks both (design review first), with line ("Sofia's screen:…
| Parameter | Type | Description |
|---|---|---|
limit | integer | Branches read (default 20, each costs a few GitHub reads). |
bridge_branch_status Branch status
One branch in review as Studio shows it: its product, status (draft, in review, needs design or tech approval, blocked by tests, conflict, ready to merge, merged, closed), approvals (Tier 1: one owner approval; a branch that applies an approved suggestion carries its approvals), tests, how it stands against main, whether the person may merge it (the same verdict as the Merge button and status chips in Studio), and the next step. For the token diff and contrast, use bridge_get_review.
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_list_comments List comments
The conversation on a branch and its line comment threads, with the ids to reply to (bridge_comment with replyTo).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_try_branch Try it in a product, share it
Try a branch before it merges: the preview link of each product Vercel reported for it (the admin demo opens with the Bridge toolbar on, as "Try it in the product" in Studio), the other previews, and "Share with a product team": the install command a product team runs in a staging branch, or why there is none yet, with a ready-to-paste message. Never a guessed link. Writes nothing.
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_combine_branches Try 2 to 4 branches together
Combined preview of 2 to 4 token branches, as "Try together" in Studio: each branch's own token edits on the latest main, the tokens two branches set differently (pick one per key with picks), and the links that open the combination (the admin demo with the Bridge toolbar, the library views). Branches that change code are refused. Writes nothing.
| Parameter | Type | Description |
|---|---|---|
prs * | array | 2 to 4 branch numbers. |
picks | object | For each conflict key, the branch whose value to use: {"semantic/light.tokens.json#color.text.muted": 118}. |
bridge_get_settings Get settings
What Studio Settings shows that is safe to read: who approves design and tech (GitHub teams named with their size), who may merge, the owner override (who, what reason), whether main is protected, the products, reviews (Settings > Reviews: "Decides what the library keeps", the library owners for every product; "Reviews the design before developers", each product's reviewers or off), the preview apps and the visual impact mode. Never tokens or secrets.
bridge_figma_coverage Figma coverage
Which components are in Figma, in Studio's words (Yes, Drafted, Auto layout, Not yet with the reason), and whether code images exist for the fidelity check the DS Bridge Figma plugin runs (its scores live in Figma).
| Parameter | Type | Description |
|---|---|---|
component | string | One component, e.g. Button. |
bridge_send_for_review Send for review
Ask for review: a draft branch becomes ready for review, as "Mark as ready" in Studio. Its author only. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_back_to_draft Back to draft
Take a branch out of review back to draft, as in Studio's More menu. Its author only. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_review_branch Review a branch
Approve, request changes or comment on a branch, as the review box in Studio, on the version the person saw, under their GitHub account. Request changes and comment need a text that says what to change; an approval may have none. Only when the person asked. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
decision * | string | |
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
body | string | What to change, or why it is fine. Plain sentences, no em dash. |
bridge_ask_someone_else Ask someone else to review
Ask the other people who can give the missing approvals to review a branch, as "Ask someone else to review" in the Studio review queue, and take the person off its requested reviewers. Never the person or the author. Only when the person asked; dryRun says who would be asked. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
dryRun | boolean |
bridge_comment Comment on a branch
Post a comment on a branch, or reply in the thread of a line comment (replyTo: its id from bridge_list_comments). Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
body * | string | Plain sentences, no em dash. |
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
replyTo | integer | Line comment thread to reply in. |
bridge_merge_branch Merge a branch
Merge a branch into main through the same gate as Studio's Merge button: tests pass, the approvals its tier needs (Tier 1: one owner approval; Tier 2 and 3: design and tech; a branch that applies an approved suggestion with Closes #n carries its approvals while the suggestion stays approved and the tier is not higher), no changes requested, no conflict, not a draft or an exploration, and the person holds the right to ship (governance.rights). When it is blocked, the error says by what. Owner override: pass overrideReason when only approvals are missing and the person is an owner named in gover…
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
dryRun | boolean | Check the gate without merging. |
overrideReason | string | Owner override only: why it merges without the missing approvals (at least the configured length). Posted on the branch. |
bridge_close_branch Close a branch
Close a branch without merging it, as in Studio's More menu. Its work stays on GitHub and it can be reopened. Explorations close with bridge_close_exploration. Only when the person asked. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_reopen_branch Reopen a branch
Reopen a closed branch, with Studio's rule: its author or an owner with write access, and only while its work is still on GitHub. Needs GITHUB_TOKEN (pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. |
bridge_update_from_main Update from main
Bring the latest main into a branch, as "Update from main" in Studio. Nothing conflicts: GitHub updates it. Only token files conflict: the tokens changed on both sides come back with keys; pass choices ("mine" keeps the branch value, "theirs" uses main's; tokens with a default keep the branch value) and Bridge commits the resolution. Code conflicts stay with a developer on GitHub. dryRun shows what would happen. Needs GITHUB_TOKEN (contents and pull requests: write).
| Parameter | Type | Description |
|---|---|---|
pr * | The branch number Studio shows (12 or "#12"), its GitHub link, or "<product>#12" (shop#12, the ref bridge_list_explorations gives) for a branch in a product's own repository. | |
choices | object | Per conflict key from a dry run: "mine" or "theirs". |
dryRun | boolean |
bridge_save_docs Save component docs
Save a component's usage guidance (docs.json sections: summary, whenToUse, whenNotToUse, dos, donts, accessibility, contentGuidelines, anatomy, preview) the way the Library edit mode does: merged into the docs on the branch, cleaned and checked (a summary, no empty items, no em dash). Without pr: a new branch sent for review (docs only: one owner approval, patch release note), with an optional Jira key and product. With pr: one commit on that open branch. Suggest mode (the default unless bridge.config.json says "changes": "direct"), without pr: a docs suggestion issue instead of a branch (Issu…
| Parameter | Type | Description |
|---|---|---|
component * | string | Component name, e.g. Button. |
docs * | object | The sections to set, in docs.json shapes: summary a string; whenToUse, whenNotToUse, accessibility, contentGuidelines lists of strings; dos and donts lists of {"title","text"}. |
changes | string | How this change reaches the code: "suggest" files a suggestion (a GitHub issue the owners approve and a developer applies, Issues write only), "direct" opens a branch and a pull request. Default: "cha… |
dryRun | boolean | |
jira | string | Jira key like DS-42: first in the branch name and title so Jira links them. |
notes | string | Why, for the reviewers. |
pr | An open branch to save the docs on, instead of a new one. | |
product | string | Product key or name (bridge_list_products). Default: the product of the current folder or repo. |
title | string | Title of the new branch. Default: "docs(<component>): usage guidance for <Component>". |
bridge_list_suggestions List suggestions
Suggestions in the repo: GitHub issues labeled bridge-suggestion, each an exact change (tokens, docs, a component spec, a brand, a revert, settings) that the owners approve and a developer applies. Each row has the number, title, kind, tier, status (needs-review, changes-requested, approved, applying, applied, declined, outdated) and linked pull requests. Statuses here come from labels, except that an open one whose change no longer applies to main reads outdated; bridge_get_suggestion counts the approvals.
| Parameter | Type | Description |
|---|---|---|
kind | string | |
limit | integer | Default 100. |
state | string | Issue state. Default: open, or closed for applied and declined. |
status | string | Default all open ones. |
bridge_get_suggestion Get a suggestion
One suggestion: the change (tokens before and after, docs, component spec, files), the checks when suggested, links, its version (payloadSha: what approvals bind to), who approved it, which approvals are missing for its tier, reviews that no longer count (an older version, or not an owner), whether the machine-readable block was edited by hand, linked pull requests, and for a component spec the brief to implement it.
| Parameter | Type | Description |
|---|---|---|
number * | The suggestion issue number (42 or "#42"), or its link. |
bridge_create_suggestion Create a suggestion
File any change as a suggestion from its payload (schema bridge.suggestion/1: kind, title, summary, and tokens edits, docs, componentSpec or files). Missing schema, source, date, base commit and checks are filled. The paths are checked against what the kind may change and the guardrail files before anything is sent. For token, docs, brand, revert and Figma changes prefer their own tools, which plan and check the change first. Needs GITHUB_TOKEN with Issues write. dryRun returns the issue. Only when the person asked.
| Parameter | Type | Description |
|---|---|---|
payload * | object | The suggestion payload (bridge.suggestion/1). |
dryRun | boolean | Return the issue title, body and labels without creating it. |
labels | array | More labels for the issue. |
bridge_review_suggestion Review a suggestion
Approve, request changes on, comment on or decline a suggestion, as the person whose GitHub token the server has. Approvals and requested changes count only from the owners in bridge.config.json (read from the default branch) and only on the version reviewed: pass payloadSha from bridge_get_suggestion so a newer version is never approved by mistake. Request changes and decline need a message. Decline closes the issue as not planned. "override": the owner override (docs/GOVERNANCE.md): an owner governance.override allows approves their own suggestion as owner when nobody else can review it, wit…
| Parameter | Type | Description |
|---|---|---|
event * | string | |
number * | The suggestion issue number (42 or "#42"), or its link. | |
message | string | What should change, why it is declined, or the comment. Plain sentences, no em dash. |
payloadSha | string | The version you reviewed (payloadSha or version from bridge_get_suggestion). |
role | string | The role you approve for, shown in the comment. Informative: what counts is who you are in the owner lists. |
bridge_apply_suggestion Apply a suggestion
Apply a Bridge suggestion to today's code ("Apply Bridge suggestion #42"). Bridge checks the paths, the approvals of the owners on its current version, re-applies token edits on the current tokens, merges files, re-runs validation, contrast and the tier, and stops on a conflict, a missing approval or a check that would fail. Local repo: mode "dry-run" (the plan and the diff, nothing written; run it first), "branch" (default: one commit on a new local branch, working tree untouched, never pushes), "write" (into the working tree, refused over uncommitted changes) or "patch" (a git format-patch t…
| Parameter | Type | Description |
|---|---|---|
number * | The suggestion issue number (42 or "#42"), or its link. | |
acceptEdited | boolean | Apply even though the machine-readable block was edited by hand after Bridge wrote it (check it first). |
base | string | Local mode, branch and patch: the ref to build on. Default HEAD. |
branch | string | Local mode, branch: the branch name. Default <branchPrefix>suggestion-<n>-<slug>. |
forceUnapproved | boolean | Apply without every approval, or with a tier that went up. Recorded on the issue. |
mode | string | Default branch. Run dry-run first. |
bridge_link_suggestion Link the pull request that applies a suggestion
Record the pull request (or branch, or commit) that applies a suggestion: a comment on the issue and the "suggestion: applying" label. Warns when the pull request does not say "Closes #<n>": add it so the suggestion closes when it merges. Needs GITHUB_TOKEN (Issues: read and write).
| Parameter | Type | Description |
|---|---|---|
number * | The suggestion issue number (42 or "#42"), or its link. | |
branch | string | |
commit | string | |
pr | integer | The pull request number. |