# design-context-bridge - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for design-context-bridge. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Developers already using host AIs such as Claude/Codex/Cursor/Gemini**: The README or plugin config mentions multiple host AIs. Evidence: `README.md` Claim: `clm_0002` supported 0.86

## What It Can Do

- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `README.md` Claim: `clm_0001` supported 0.86

## How to Start

- `npx design-context-bridge` Evidence: `README.md` Claim: `clm_0003` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Needs admin / security approval
- **Why**: Continuing may involve secrets, accounts, external services, or sensitive context; get admin or security approval first.

### 30-Second Read

- **What to do now**: Needs admin / security approval
- **Minimum safe next step**: Run Prompt Preview first; if credentials or an enterprise environment are involved, get approval before trialing
- **Do not trust yet**: Tool permission boundaries cannot be trusted before install.
- **Continuing will touch**: Command execution, Local environment or project files, Environment variables / API keys

### What You Can Trust Now

- **Target-audience signal: Developers already using host AIs such as Claude/Codex/Cursor/Gemini** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `README.md` Claim: `clm_0002` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `README.md` Claim: `clm_0001` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `README.md` Claim: `clm_0003` supported 0.86

### What You Cannot Trust Yet

- **Tool permission boundaries cannot be trusted before install.** (unverified): MCP/tool projects usually touch files, the network, the browser, or external APIs, so permissions and logs must be checked for real.
- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `README.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `README.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `README.md`
- **Environment variables / API keys**: Project entry docs explicitly showing API key, token, secret, or account credential configuration. Why: If a real install needs credentials, use test credentials first and go through a permission/compliance review. Evidence: `PRIVACY.md`, `README.md`, `SECURITY.md`, `docs/clients.md` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Do not use real production credentials**: Once an environment variable / API key enters the host or toolchain, it can create account and compliance risk. (applies when: When environment signals like API, TOKEN, KEY, or SECRET appear.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **Be ready to revoke test API keys or tokens**: If test credentials leak or are misused, you can cut losses quickly.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0004` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `README.md` Claim: `clm_0005` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `README.md` Claim: `clm_0001` supported 0.86

### Context Scale

- Total files: 57
- Important-file coverage: 40/57
- Evidence index entries: 38
- Role / Skill entries: 10

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for design-context-bridge, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat design-context-bridge as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for design-context-bridge, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 10 role / Skill / project-doc entries.

- **Design Context Bridge** (project_doc): npm i -g design-context-bridge · An independent MCP server for Figma Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `README.md`
- **Client configuration** (project_doc): Add design-context-bridge as an MCP server in your AI client. Replace your-token-here with your Figma access token only needed for REST API tools — see rest-api.md rest-api.md . Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/clients.md`
- **Plugin setup** (project_doc): The Figma plugin runs inside Figma desktop and pushes design context to the AI in real time. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/plugin-setup.md`
- **REST API mode** (project_doc): Read any Figma file by URL — no plugin, no selection needed. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/rest-api.md`
- **Contributing** (project_doc): After changing figma-plugin/code.ts , always run npm run build:plugin — the compiled code.js must be committed because Figma loads it directly. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `CONTRIBUTING.md`
- **Figma Community listing copy** (project_doc): Ready-to-paste copy for the Figma Community submission form. Lead with the inspector works with zero setup so a reviewer can see value immediately, then present export as an optional, user-controlled feature. Keep this wording out of the manifest/UI too — none of it should mention MCP, AI agents, or specific AI tools as the primary positioning. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/figma-community-listing.md`
- **Tools reference** (project_doc): Every tool runs in one of two modes: Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `docs/tools.md`
- **Disclaimer** (project_doc): This project is independent and is not affiliated with, endorsed by, or sponsored by Figma, Inc. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `DISCLAIMER.md`
- **Privacy** (project_doc): Design Context Bridge runs entirely on your machine . It is a local relay between Figma and your AI client — it has no backend and its maintainers receive no data. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `PRIVACY.md`
- **Security Policy** (project_doc): Please report security issues privately — do not open a public GitHub issue. Activation hint: Reference this when the user needs to understand the project's structure, install path, or boundaries. Evidence: `SECURITY.md`

## Evidence Index

- Indexed 38 evidence entries.

- **Design Context Bridge** (documentation): npm i -g design-context-bridge · An independent MCP server for Figma Evidence: `README.md`
- **Package** (package_manifest): { "name": "design-context-bridge", "version": "1.1.0", "description": "Local developer handoff tool that exports selected Figma design information such as colors, text, spacing, variables, and prototype notes for frontend implementation workflows. Also includes an optional local MCP server for AI coding tools that support the Model Context Protocol.", "type": "module", "main": "dist/index.js", "bin": { "design-context-bridge": "dist/index.js" }, "files": "dist", "figma-plugin", "client-config-examples", "docs", "README.md", "LICENSE", "DISCLAIMER.md", "SECURITY.md", "PRIVACY.md" , "scripts": { "build": "tsc", "build:plugin": "cd figma-plugin && tsc -p tsconfig.json", "build:all": "npm run b… Evidence: `package.json`
- **Client configuration** (documentation): Add design-context-bridge as an MCP server in your AI client. Replace your-token-here with your Figma access token only needed for REST API tools — see rest-api.md rest-api.md . Evidence: `docs/clients.md`
- **Plugin setup** (documentation): The Figma plugin runs inside Figma desktop and pushes design context to the AI in real time. Evidence: `docs/plugin-setup.md`
- **REST API mode** (documentation): Read any Figma file by URL — no plugin, no selection needed. Evidence: `docs/rest-api.md`
- **Contributing** (documentation): After changing figma-plugin/code.ts , always run npm run build:plugin — the compiled code.js must be committed because Figma loads it directly. Evidence: `CONTRIBUTING.md`
- **License** (source_file): Copyright c 2026 Cristina Fores Campos Evidence: `LICENSE`
- **Figma Community listing copy** (documentation): Ready-to-paste copy for the Figma Community submission form. Lead with the inspector works with zero setup so a reviewer can see value immediately, then present export as an optional, user-controlled feature. Keep this wording out of the manifest/UI too — none of it should mention MCP, AI agents, or specific AI tools as the primary positioning. Evidence: `docs/figma-community-listing.md`
- **Tools reference** (documentation): Every tool runs in one of two modes: Evidence: `docs/tools.md`
- **Manifest** (structured_config): { "name": "Frontend Handoff Snapshot", "id": "1651991638967929445", "api": "1.0.0", "main": "code.js", "capabilities": , "enableProposedApi": false, "documentAccess": "dynamic-page", "editorType": "figma" , "ui": "ui.html", "networkAccess": { "allowedDomains": "http://localhost:3055" , "devAllowedDomains": "http://localhost:3055" , "reasoning": "Exports selected design information to a local developer handoff tool running on the user's machine." } } Evidence: `figma-plugin/manifest.json`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "es2017", "lib": "es2017", "dom" , "strict": true, "skipLibCheck": true, "typeRoots": "../node modules/@figma" , "types": "plugin-typings" }, "include": "code.ts" } Evidence: `figma-plugin/tsconfig.json`
- **Tsconfig** (structured_config): { "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "rootDir": "src", "outDir": "dist", "strict": true, "esModuleInterop": true, "resolveJsonModule": true, "declaration": true, "types": "node" }, "include": "src/ / " , "exclude": "node modules", "dist", "figma-plugin" } Evidence: `tsconfig.json`
- **Code** (source_file): function toHex n function rgbToHex c function extractFills fills function extractNode node ⋮---- function collectColors node, map, depth function collectTexts node, out, depth ⋮---- function bvId bound async function resolveVarName id async function collectSpacing node, out, depth ⋮---- function shallowTree page function extractComponents page ⋮---- function walk node ⋮---- function mapTransition t function mapAction a function mapReaction r function collectInteractions node, out, depth ⋮---- function resolveVarValue type, raw async function extractVariables // ── inspect broadcast no network — always runs on selection change ─────────── async function broadcastInspect ⋮---- async function… Evidence: `figma-plugin/code.js`
- **Code** (source_file): function toHex n: number : string function rgbToHex c: function extractFills fills: readonly Paint typeof figma.mixed ⋮---- function extractNode node: SceneNode ⋮---- function collectColors node: SceneNode, map: ⋮---- function collectTexts node: SceneNode, out: object , depth: number : void ⋮---- function bvId bound: any : string null async function resolveVarName id: string : Promise ⋮---- async function collectSpacing node: SceneNode, out: object , depth: number : Promise ⋮---- function shallowTree page: PageNode ⋮---- function extractComponents page: PageNode ⋮---- function walk node: SceneNode PageNode ⋮---- function mapTransition t: any : any function mapAction a: any : any function ma… Evidence: `figma-plugin/code.ts`
- **Ui** (source_file): :root { --bg: var --figma-color-bg, ffffff ; --bg-secondary: var --figma-color-bg-secondary, f5f5f5 ; --bg-hover: var --figma-color-bg-hover, rgba 0, 0, 0, 0.06 ; --text: var --figma-color-text, 1a1a1a ; --text-secondary: var --figma-color-text-secondary, 5a5a5a ; --text-tertiary: var --figma-color-text-tertiary, 999999 ; --border: var --figma-color-border, e6e6e6 ; --brand: var --figma-color-bg-brand, 0d99ff ; --brand-hover: var --figma-color-bg-brand-hover, 0a85e0 ; --on-brand: var --figma-color-text-onbrand, ffffff ; --success: var --figma-color-bg-success, 14ae5c ; } { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: Inter, -apple-system, system-ui, sans-serif; font-… Evidence: `figma-plugin/ui.html`
- **Index** (source_file): import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { registerTools } from './mcp-server/tool-registry.js'; import { startFigmaBridge } from './figma-bridge/ws-server.js'; Evidence: `src/index.ts`
- **Types** (source_file): export interface FigmaFill { type: string; color?: string; opacity: number; } ⋮---- export interface FigmaNode { id: string; name: string; type: string; x: number; y: number; width: number; height: number; visible: boolean; opacity: number; fills: FigmaFill ; strokes: FigmaFill ; characters?: string; fontSize?: number string; fontFamily?: string; } ⋮---- export interface FigmaTreeNode { id: string; name: string; type: string; fills?: FigmaFill ; characters?: string; fontSize?: number string; fontFamily?: string; children?: FigmaTreeNode ; } ⋮---- export interface FigmaPageSummary { id: string; name: string; childCount: number; } ⋮---- export interface FigmaComponentDef { id: string; name: s… Evidence: `src/core/types.ts`
- **Store** (source_file): import { writeFileSync, readFileSync, existsSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import type { FigmaDocumentContext } from '../core/types.js'; ⋮---- export interface PluginRequest { id: string; type: string; params: Record ; } ⋮---- function readJson path: string, fallback: T : T ⋮---- setContext incoming: Partial : void getContext : FigmaDocumentContext null ⋮---- addRequest req: PluginRequest : void ⋮---- takeRequests : PluginRequest setResponse id: string, result: unknown : void takeResponse id: string : unknown ⋮---- export async function requestFromPlugin type: string, params: Record , timeoutMs = 12000, : Promise Evidence: `src/figma-bridge/store.ts`
- **Ws Server** (source_file): import { createServer } from 'node:http'; import { store } from './store.js'; import type { FigmaDocumentContext } from '../core/types.js'; ⋮---- export function startFigmaBridge : void Evidence: `src/figma-bridge/ws-server.ts`
- **Client** (source_file): function getToken : string ⋮---- async function figmaFetch path: string, attempt = 0 : Promise ⋮---- export function parseFigmaUrl url: string : ⋮---- export async function fetchFile fileKey: string, depth?: number : Promise ⋮---- export async function fetchNodes fileKey: string, nodeIds: string : Promise ⋮---- / Local variables design tokens . Enterprise-plan only — callers must handle 403. / export async function fetchLocalVariables fileKey: string : Promise ⋮---- / Render URLs for one or more nodes in a given format. Returns Figma's { images: { nodeId : url } } payload. / export async function fetchImages fileKey: string, nodeIds: string , format: 'svg' 'png' 'jpg' = 'svg', scale = 1, :… Evidence: `src/figma-rest/client.ts`
- **Resolve** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { parseFigmaUrl, fetchFile, fetchNodes, fetchLocalVariables, fetchImages, downloadText } from './client.js'; import { extractDesignSystem, analyzeStructure, describeComponentVariants } from './analysis.js'; ⋮---- export async function restResult fn: = Promise : Promise ⋮---- export interface FigmaNode { id: string; name: string; type: string; children?: FigmaNode ; key: string : unknown; } ⋮---- export function walk node: FigmaNode, visit: n: FigmaNode = void : void ⋮---- async function getDocument fileKey: string : Promise ⋮---- async function getNodeDocument fileKey: string, nodeId: string : Promise ⋮---- exp… Evidence: `src/figma-rest/resolve.ts`
- **Tool Registry** (source_file): import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js'; import { GET CURRENT SELECTION, getCurrentSelectionDefinition, handleGetCurrentSelection } from './tools/get-current-selection.js'; import { GET CURRENT PAGE, getCurrentPageDefinition, handleGetCurrentPage } from './tools/get-current-page.js'; import { GET ALL PAGES, getAllPagesDefinition, handleGetAllPages } from './tools/get-all-pages.js'; import { GET FRAME BY NAME, getFrameByNameDefinition, handleGetFrameByName } from './tools/get-frame-by-name.js'; import { GET COMPONENT DEFINITIONS, getComponentDefinitionsDefinitio… Evidence: `src/mcp-server/tool-registry.ts`
- **Get Current Selection** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { store } from '../../figma-bridge/store.js'; ⋮---- export function handleGetCurrentSelection : CallToolResult ⋮---- function noData : CallToolResult ⋮---- function ok data: unknown : CallToolResult Evidence: `src/mcp-server/tools/get-current-selection.ts`
- **Get Selected Colors** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { store } from '../../figma-bridge/store.js'; ⋮---- export function handleGetSelectedColors : CallToolResult Evidence: `src/mcp-server/tools/get-selected-colors.ts`
- **Get Selected Interactions** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { store } from '../../figma-bridge/store.js'; ⋮---- export function handleGetSelectedInteractions : CallToolResult Evidence: `src/mcp-server/tools/get-selected-interactions.ts`
- **Get Selected Spacing** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { store } from '../../figma-bridge/store.js'; ⋮---- export function handleGetSelectedSpacing : CallToolResult Evidence: `src/mcp-server/tools/get-selected-spacing.ts`
- **Get Selected Texts** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { store } from '../../figma-bridge/store.js'; ⋮---- export function handleGetSelectedTexts : CallToolResult Evidence: `src/mcp-server/tools/get-selected-texts.ts`
- **Scan Nodes By Types** (source_file): import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import { requestFromPlugin } from '../../figma-bridge/store.js'; import { restResult, restScanNodesByTypes } from '../../figma-rest/resolve.js'; ⋮---- export async function handleScanNodesByTypes args: Record : Promise Evidence: `src/mcp-server/tools/scan-nodes-by-types.ts`
- **Disclaimer** (documentation): This project is independent and is not affiliated with, endorsed by, or sponsored by Figma, Inc. Evidence: `DISCLAIMER.md`
- **Privacy** (documentation): Design Context Bridge runs entirely on your machine . It is a local relay between Figma and your AI client — it has no backend and its maintainers receive no data. Evidence: `PRIVACY.md`
- **Security Policy** (documentation): Please report security issues privately — do not open a public GitHub issue. Evidence: `SECURITY.md`
- **Claude Code** (structured_config): { "//": "Claude Code config lives at ~/.claude/settings.json or project-level .claude/settings.json", "mcpServers": { "design-context-bridge": { "command": "npx", "args": "-y", "design-context-bridge" , "type": "stdio" } } } Evidence: `client-config-examples/claude-code.json`
- **Cursor** (structured_config): { "//": "Cursor config lives at ~/.cursor/mcp.json or project-level .cursor/mcp.json", "mcpServers": { "design-context-bridge": { "command": "npx", "args": "-y", "design-context-bridge" , "type": "stdio" } } } Evidence: `client-config-examples/cursor.json`
- **Generic** (structured_config): { "//": "Generic stdio MCP config. Adjust the key format to match your client.", "mcpServers": { "design-context-bridge": { "command": "npx", "args": "-y", "design-context-bridge" , "type": "stdio" } } } Evidence: `client-config-examples/generic.json`
- **Opencode** (structured_config): { "//": "OpenCode config lives at ~/.config/opencode/opencode.jsonc. Uses 'type: local' and 'command' as an array.", "mcp": { "design-context-bridge": { "type": "local", "command": "npx", "-y", "design-context-bridge" , "enabled": true } } } Evidence: `client-config-examples/opencode.json`
- **Dependencies** (source_file): Runtime state file-based bridge store design-context-bridge- .json Evidence: `.gitignore`
- **.node-version** (source_file): 20 Evidence: `.node-version`
- **Source files not needed by npm consumers** (source_file): Source files not needed by npm consumers figma-plugin/code.ts figma-plugin/tsconfig.json Evidence: `.npmignore`

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `README.md`, `package.json`, `docs/clients.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `README.md`, `package.json`, `docs/clients.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Overview and Getting Started**: importance `high`
  - source_paths: README.md, package.json, src/index.ts, docs/clients.md, docs/plugin-setup.md
- **System Architecture and Data Flow**: importance `high`
  - source_paths: src/index.ts, src/core/types.ts, src/figma-bridge/ws-server.ts, src/figma-bridge/store.ts, src/figma-rest/client.ts
- **MCP Tools and Capabilities**: importance `high`
  - source_paths: src/mcp-server/tool-registry.ts, src/mcp-server/tools/get-current-selection.ts, src/mcp-server/tools/get-selected-colors.ts, src/mcp-server/tools/get-selected-texts.ts, src/mcp-server/tools/get-selected-spacing.ts
- **Figma Plugin, Reliability, Security, and Operations**: importance `high`
  - source_paths: figma-plugin/code.ts, figma-plugin/code.js, figma-plugin/ui.html, figma-plugin/manifest.json, figma-plugin/tsconfig.json

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `2e747e26e1b4b3341e9cf02910f1c9a4c61cff74`
- inspected_files: `README.md`, `package.json`, `docs/clients.md`, `docs/figma-community-listing.md`, `docs/plugin-setup.md`, `docs/rest-api.md`, `docs/tools.md`, `src/core/types.ts`, `src/figma-bridge/store.ts`, `src/figma-bridge/ws-server.ts`, `src/figma-rest/analysis.ts`, `src/figma-rest/client.ts`, `src/figma-rest/resolve.ts`, `src/figma-rest/tools/analyze-structure.ts`, `src/figma-rest/tools/export-image.ts`, `src/figma-rest/tools/extract-design-system.ts`, `src/figma-rest/tools/find-assets.ts`, `src/figma-rest/tools/get-component-variants.ts`, `src/figma-rest/tools/get-file-from-url.ts`, `src/figma-rest/tools/get-node-from-url.ts`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v1.1.0 — copy-to-clipboard inspector
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.1.0 — copy-to-clipboard inspector. Context: Observed during installation or first-run setup.
- Why it matters: Upgrade or migration may change expected behavior: v1.1.0 — copy-to-clipboard inspector
- Evidence: failure_mode_cluster:github_release | https://github.com/CristinaFores/design-context-bridge/releases/tag/v1.1.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/CristinaFores/design-context-bridge
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/CristinaFores/design-context-bridge
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/CristinaFores/design-context-bridge
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Runtime risk requires verification

- Trigger: Developers should check this performance risk before relying on the project: v1.0.1 — fix: in-memory cache + 429 retry
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.0.1 — fix: in-memory cache + 429 retry. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: v1.0.1 — fix: in-memory cache + 429 retry
- Evidence: failure_mode_cluster:github_release | https://github.com/CristinaFores/design-context-bridge/releases/tag/v1.0.1
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 6: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/CristinaFores/design-context-bridge
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 7: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/CristinaFores/design-context-bridge
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 8: Maintenance risk requires verification

- Trigger: Developers should check this maintenance risk before relying on the project: v1.0.0 — Design Context Bridge
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v1.0.0 — Design Context Bridge. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Upgrade or migration may change expected behavior: v1.0.0 — Design Context Bridge
- Evidence: failure_mode_cluster:github_release | https://github.com/CristinaFores/design-context-bridge/releases/tag/v1.0.0
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
