Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f1cb5d3
feat: add declarative Figma canvas authoring
Justineo Jul 27, 2026
1e854d9
ci: support tagged MCP prereleases
Justineo Jul 27, 2026
21fbfb7
chore(plugin): use alpha MCP release
Justineo Jul 27, 2026
05e4943
fix(extension): use valid canvas data namespace
Justineo Jul 27, 2026
8814f3b
feat: expand Figma canvas authoring support
Justineo Aug 4, 2026
b1f03f7
fix: address canvas authoring review feedback
Justineo Aug 4, 2026
6093cb8
fix: gate canvas writes by Figma editor type
Justineo Aug 4, 2026
12129b3
fix: harden canvas authoring workflows
Justineo Aug 4, 2026
b6e9f5f
feat: finalize agent plugin distribution
Justineo Aug 5, 2026
2979a02
fix: harden canvas authoring workflows
Justineo Aug 5, 2026
a6dbf29
fix: stabilize canvas reconciliation
Justineo Aug 5, 2026
8967280
fix: strengthen canvas design quality guardrails
Justineo Aug 5, 2026
df16a89
docs: clarify canvas text line breaks
Justineo Aug 5, 2026
b30ced9
feat: add bounded canvas delegation workflow
Justineo Aug 5, 2026
21517b3
fix: harden canvas sizing and exact identity resolution
Justineo Aug 5, 2026
d345767
fix: extend get_code execution deadline
Justineo Aug 5, 2026
9699e7a
fix: stabilize canvas lookup and removal
Justineo Aug 5, 2026
a3608aa
docs: refine canvas imagery source guidance
Justineo Aug 5, 2026
b62be4f
fix: isolate canvas failure rollback
Justineo Aug 5, 2026
d2a91fb
refactor: simplify canvas hardening
Justineo Aug 5, 2026
7d9c186
feat: harden Figma canvas authoring
Justineo Aug 8, 2026
889ba2b
refactor: streamline Figma agent guidance
Justineo Aug 8, 2026
96d1311
fix: clarify canvas authoring recovery
Justineo Aug 8, 2026
e0053de
fix: require explicit Figma session routing
Justineo Aug 8, 2026
2d3b3c2
refactor: align Figma authoring guidance
Justineo Aug 9, 2026
5f72f26
fix: stabilize Figma resource authoring
Justineo Aug 9, 2026
eec2dc6
refactor: focus Figma authoring guidance
Justineo Aug 9, 2026
100fb2b
fix: recover cold Figma reads
Justineo Aug 9, 2026
d0f9fcf
fix: close authored Figma systems
Justineo Aug 9, 2026
42b1370
refactor: focus Figma authoring semantics
Justineo Aug 9, 2026
68a2bec
docs: codify Figma agent evaluation loop
Justineo Aug 9, 2026
3b4eefb
fix: align Canvas flex with CSS defaults
Justineo Aug 9, 2026
7197be4
refactor: close Figma resources before propagation
Justineo Aug 9, 2026
b2ff086
docs: refine Figma agent evaluation guardrails
Justineo Aug 9, 2026
52962d7
refactor: sequence Figma authoring by semantics
Justineo Aug 9, 2026
737fef2
fix: preserve native Figma authoring state
Justineo Aug 9, 2026
edf3942
docs: clarify the Figma authoring reasoning model
Justineo Aug 9, 2026
99e4903
fix: normalize Figma native update state
Justineo Aug 9, 2026
38ae999
fix: harden Figma canvas reconciliation
Justineo Aug 9, 2026
ded60a1
fix: bound MCP design read results
Justineo Aug 9, 2026
9d8a1e0
fix: preserve MCP gateway request state
Justineo Aug 9, 2026
a1ef042
docs: clarify isolated Figma authoring
Justineo Aug 9, 2026
0575588
chore: automate Codex dev plugin reinstall
Justineo Aug 9, 2026
51f3795
ci: verify published MCP version on pull requests
Justineo Aug 9, 2026
256fb9b
fix(canvas): resolve instance and geometry edge cases
Justineo Aug 11, 2026
ae74162
refactor(extension): consolidate paint and codegen helpers
Justineo Aug 11, 2026
7d15212
refactor(extension): simplify response and metadata handling
Justineo Aug 11, 2026
81a58f3
ci: verify MCP version after publishing
Justineo Aug 11, 2026
081f517
feat: automate Codex dev plugin refresh
Justineo Aug 11, 2026
0d6327e
fix: harden Figma agent workflows
Justineo Aug 11, 2026
b430da0
fix: refine Figma canvas authoring workflows
Justineo Aug 12, 2026
b5143ae
fix: improve Figma canvas authoring fidelity
Justineo Aug 14, 2026
492239a
fix: harden canvas authoring runtime and evaluation
Justineo Aug 16, 2026
00d287e
feat: strengthen Figma canvas authoring workflow
Justineo Aug 25, 2026
87d21ec
fix: track image views in authoring evals
Justineo Aug 25, 2026
93ca015
fix: remove unused runtime assignment
Justineo Aug 25, 2026
674c733
fix: harden canvas typography and image variants
Justineo Aug 25, 2026
6a706fc
fix: harden canvas apply recovery
Justineo Aug 25, 2026
508d95b
docs: clarify component instance replacement
Justineo Aug 25, 2026
9d8cc91
fix: enforce precedent-backed icon roles
Justineo Aug 25, 2026
e9e1026
feat: evolve Figma canvas authoring
Justineo Sep 2, 2026
e3abaa7
feat: refine Figma authoring judgment
Justineo Sep 2, 2026
22a2afa
feat: refine canvas authoring and website experience
Justineo Sep 10, 2026
fa89985
fix: fingerprint extension sources in clean checkouts
Justineo Sep 10, 2026
eba4d56
refactor: use globby for runtime source discovery
Justineo Sep 10, 2026
f1d4993
fix(canvas): preserve references and runtime guarantees during reconc…
Justineo Sep 11, 2026
ac21ef2
fix(site): build workspace dependencies for Vercel deployments
Justineo Sep 11, 2026
70d21e0
feat: add agent design tasks and canvas feedback
Justineo Sep 15, 2026
bac6fe5
feat: improve Codex feedback and Tailwind variable output
Justineo Sep 15, 2026
203df7c
feat: queue Codex feedback natively and clarify canvas authoring
Justineo Sep 16, 2026
5f3d7ca
docs: clarify agent feedback and release workflows
Justineo Sep 17, 2026
fb33e0d
refactor: consolidate authoring and agent runtime workflows
Justineo Sep 17, 2026
1716495
refactor: split agent plugin targets and retain native Codex turns
Justineo Sep 18, 2026
5ccf298
feat: negotiate the extension bridge protocol instead of pinning it
Justineo Sep 18, 2026
453b97e
chore: declare the MIT license and publish MCP directly to latest
Justineo Sep 18, 2026
5a46991
chore: mark the shared package private and tighten the packing check
Justineo Sep 18, 2026
adfa9a3
refactor: parse hub frames once and share the process table
Justineo Sep 18, 2026
bae3cfd
feat: reserve the plugin deep link for the desktop app
Justineo Sep 18, 2026
8108cf9
fix: complete native feedback and release compatibility
Justineo Sep 20, 2026
ffc8626
fix: exclude generated plugin targets from commit formatters
Justineo Sep 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .agents/plugins/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "tempad-dev",
"source": {
"source": "local",
"path": "./agent-plugins/tempad-dev"
"path": "./agent-plugin/targets/codex"
},
"policy": {
"installation": "AVAILABLE",
Expand Down
6 changes: 3 additions & 3 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"owner": {
"name": "TemPad Dev"
},
"description": "Agent plugins for using TemPad Dev design evidence in coding workflows.",
"description": "Agent plugins for reading Figma evidence and authoring native designs with TemPad Dev.",
"plugins": [
{
"name": "tempad-dev",
"source": "./agent-plugins/tempad-dev",
"description": "Use selected Figma nodes as agent-ready evidence for project-consistent UI implementation.",
"source": "./agent-plugin/targets/claude",
"description": "Connect your coding agent to Figma. Create and edit native designs, inspect existing designs, and implement UI in your codebase.",
"category": "Design"
}
]
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Generated agent plugin targets: collapse them in diffs and reviews.
agent-plugin/targets/** linguist-generated=true
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ jobs:
- name: Install browser runtime
run: pnpm --filter @tempad-dev/extension test:setup

- name: Check agent plugins
run: >-
pnpm agent-plugin:build &&
test -z "$(git status --porcelain --untracked-files=all --
agent-plugin
.plugin/marketplace.json
.agents/plugins/marketplace.json
.claude-plugin/marketplace.json)"

- name: Check plugin installer compatibility
run: pnpm agent-plugin:check-installer

- name: Type check
run: pnpm typecheck

Expand All @@ -47,3 +59,6 @@ jobs:

- name: Build project
run: pnpm build

- name: Check bridge compatibility
run: pnpm mcp:check-bridge
16 changes: 15 additions & 1 deletion .github/workflows/publish-mcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: publish-mcp

on:
workflow_dispatch:
inputs:
tag:
description: npm dist-tag
required: true
default: latest
type: choice
options:
- latest
- next
- alpha

permissions:
contents: read
Expand Down Expand Up @@ -35,4 +45,8 @@ jobs:

- name: Publish
working-directory: packages/mcp-server
run: npm publish --access public
run: npm publish --access public --tag "${{ inputs.tag }}"

- name: Verify published version
working-directory: packages/mcp-server
run: npm view "@tempad-dev/mcp@$(node -p "require('./package.json').version")" version
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ stats-*.json
.wxt
web-ext.config.ts
dist
.dev/
coverage
.artifacts/
.vitest-attachments/
packages/*/coverage
packages/extension/tests/**/__screenshots__/

Expand Down
8 changes: 4 additions & 4 deletions .lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ pre-commit:
group:
piped: true
jobs:
- name: sync-agent-plugin
glob: '{skill/SKILL.md,agent-plugins/tempad-dev/skills/figma-design-to-code/SKILL.md}'
run: pnpm sync:agent-plugin
stage_fixed: true
- name: lint
glob: '*.{ts,js,mjs,cjs,mts,cts,vue}'
exclude: 'agent-plugin/targets/**'
run: pnpm exec eslint --fix {staged_files}
stage_fixed: true
- name: format
glob: '*.{ts,js,mjs,cjs,mts,cts,vue,json,md,yml,yaml,css}'
# Generated targets are excluded here rather than through .oxfmtignore, which also
# excludes packages/ and would leave this job with no files to format at all.
exclude: 'agent-plugin/targets/**'
run: pnpm exec oxfmt -c ./.oxfmtrc.json --ignore-path ./.gitignore {staged_files}
stage_fixed: true
- name: typecheck
Expand Down
3 changes: 3 additions & 0 deletions .oxfmtignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Package contents are formatted by package-level scripts.
packages/**

# Generated agent plugin targets. Format agent-plugin/src/ instead.
agent-plugin/targets/**

# Lockfile formatting is managed by pnpm.
pnpm-lock.yaml
13 changes: 13 additions & 0 deletions .plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "tempad-dev",
"owner": {
"name": "TemPad Dev"
},
"plugins": [
{
"name": "tempad-dev",
"source": "./agent-plugin/targets/plugins-cli",
"description": "Connect your coding agent to Figma. Create and edit native designs, inspect existing designs, and implement UI in your codebase."
}
]
}
258 changes: 140 additions & 118 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,121 +2,143 @@

## Purpose

Provide a single entry point for coding agents. This file links to package-level guides and highlights repo-wide constraints and workflows.

## Repo map (high level)

- `packages/extension/` — Figma plugin + MCP tools implementation
- `packages/mcp-server/` — MCP server runtime
- `packages/shared/` — shared types and contracts
- `packages/plugins/` — plugin-side code and transforms
- `agent-plugins/` — shared agent plugin bundles and platform manifests

## Start here

- `packages/extension/AGENTS.md`
- `packages/mcp-server/AGENTS.md`
- `packages/shared/AGENTS.md`
- `packages/plugins/AGENTS.md`

## Global conventions

- Package manager: `pnpm`
- Prefer repo-level scripts unless a package explicitly documents otherwise.
- When creating commits, use Conventional Commits (for example: `feat: ...`, `fix: ...`, `docs: ...`, `chore: ...`).

## Common commands

- Typecheck: `pnpm typecheck`
- Lint (and format): `pnpm lint:fix`
- Test (watch): `pnpm test`
- Test (run): `pnpm test:run`
- Test (coverage): `pnpm test:coverage`
- Extension node tests: `pnpm --filter @tempad-dev/extension test:node`
- Extension browser tests: `pnpm --filter @tempad-dev/extension test:browser`
- Extension browser setup: `pnpm --filter @tempad-dev/extension test:setup`

## Doc index

- `TESTING.md`
- `docs/testing/architecture.md`
- `docs/extension/mcp-get-code-requirements.md`
- `docs/extension/mcp-get-code-design.md`
- `docs/extension/mcp-browser-gateway-design.md`
- `docs/marketing-screenshots.md`

## Guardrails

- Keep changes minimal and consistent with existing style.
- Avoid adding new global dependencies unless explicitly requested or approved.
- Keep pull request descriptions concise. Do not include a validation section unless explicitly requested.

## Contributing & verification

### Tech stack (repo-wide)

- Package manager: `pnpm` (workspace scripts are commonly run as `pnpm -r ...`).
- Language: TypeScript.
- Extension: Vue 3 + WXT (Web Extension Toolkit).
- MCP server: Node.js 18+ + `@modelcontextprotocol/sdk` + WebSocket transport.
- Shared contracts: `zod` schemas.
- Build tool (non-extension packages): `tsdown`.

### Key scripts

Run these at repo root unless noted.

- Dev extension: `pnpm dev`
- Dev site: `pnpm dev:site`
- Build everything: `pnpm build`
- Build site: `pnpm build:site`
- Build extension: `pnpm build:ext`
- Build plugins: `pnpm build:plugins`
- Build MCP: `pnpm build:mcp`
- Typecheck all packages: `pnpm typecheck`
- Lint all packages: `pnpm lint` / auto-fix: `pnpm lint:fix`
- Test all packages: `pnpm test:run`
- Coverage report: `pnpm test:coverage`
- Format: `pnpm format`
- Zip extension artifact: `pnpm zip`

### Verification checklist (agent-driven changes)

Pick the checks that match your change.

1. Always

- `pnpm typecheck`
- `pnpm lint` (or `pnpm lint:fix`)
- `pnpm test:run`

2. Extension UI / codegen

- `pnpm dev`
- In Figma, open TemPad Dev panel and validate the impacted section (e.g. “Inspect → Code”).

3. Extension build / packaging

- `pnpm build:ext`
- `pnpm zip`

4. Rewrite subsystem

- `pnpm --filter @tempad-dev/extension build:rewrite`
- Optional: `pnpm --filter @tempad-dev/extension tsx scripts/check-rewrite.ts`
- Requires `FIGMA_EMAIL`, `FIGMA_PASSWORD`, `FIGMA_FILE_KEY`.

5. MCP schemas / tool behavior

- If you change tool schemas/contracts: update `packages/shared` first, then `packages/mcp-server`, then `packages/extension`.
- Re-check payload limits and omission rules; see `docs/extension/mcp-get-code-requirements.md` and `docs/extension/mcp-get-code-design.md`.

## Testing notes

- Testing runbook and required checks: `TESTING.md`.
- Testing architecture and coverage model: `docs/testing/architecture.md`.
- Root coverage scope is configured in `vitest.config.ts` as the single source of truth.
- Root coverage excludes build artifacts (`**/dist/**`, `**/.output/**`) to avoid polluted reports.
- Root coverage provider is `istanbul` to avoid V8 remap parse failures under Vite 8 dependency trees.
- Extension browser tests run in Playwright via `packages/extension/vitest.browser.config.ts`.
- Do not introduce jsdom-based tests in this repository.
Use this file as the repo-wide router and source of global invariants. Read only
the package guide and conditional runbook required by the task; do not preload
every linked document.

## Repository routing

| Work area | Read next | Responsibility |
| ---------------------- | ------------------------------- | -------------------------------------------------------------------------- |
| `packages/extension/` | `packages/extension/AGENTS.md` | Figma extension, UI, codegen, browser runtime, and MCP tool implementation |
| `packages/mcp-server/` | `packages/mcp-server/AGENTS.md` | MCP server, Hub, transport, and tool exposure |
| `packages/shared/` | `packages/shared/AGENTS.md` | Shared schemas, types, and contracts |
| `packages/plugins/` | `packages/plugins/AGENTS.md` | Plugin transforms and sandboxed plugin-side code |
| `agent-plugin/` | This guide | Agent skills, manifests, host extras, and marketplace metadata |

For a cross-package change, read the guides for every affected package. For a
repo-wide documentation, configuration, or release task, this root guide is the
default authority unless a routed document says otherwise.

## Repo-wide invariants

- Package manager: `pnpm`. Prefer repo-level scripts unless a package guide
explicitly requires a filtered command.
- Keep changes minimal and consistent with existing style. Do not add global
dependencies without explicit approval.
- When a tool schema or shared contract changes, update `packages/shared` first,
then `packages/mcp-server`, then `packages/extension`.
- Generated artifacts are not source. Follow the owning workflow and never edit
ignored or generated output to simulate a source change.
- Do not create or amend commits unless explicitly requested. When creating a
commit, use Conventional Commits.
- Keep pull request descriptions concise. Do not add a validation section unless
explicitly requested.
- Write repository documentation in English. Public Chinese documentation uses
the `.zh-Hans.md` suffix.

## Agent plugin invariants

- `agent-plugin/src/` is the only authored copy. Everything under
`agent-plugin/targets/` and `.dev/plugins/` is generated by `pnpm agent-plugin:build`;
never hand-edit it. The plugin is distributed through the Git marketplace, not npm.
- Every channel resolves directly from a Git ref, so each target is committed, and
each carries only what its own installer reads:

| Channel | Target | Carries |
| ------------------------------------------ | -------------------------------------- | ------------------------------------------ |
| Agent Plugins 1.0 consumers | `agent-plugin/targets/standard` | `plugin.json`, `mcp.json` |
| `npx plugins add` (Cursor, VS Code, …) | `agent-plugin/targets/plugins-cli` | `.plugin/plugin.json`, `.mcp.json` |
| `codex plugin marketplace add` | `agent-plugin/targets/codex` | `.codex-plugin/`, `.mcp.json` |
| `claude plugin marketplace add` | `agent-plugin/targets/claude` | `.claude-plugin/`, `.mcp.json`, `clients/` |
| `npx skills add` / `gemini skills install` | `agent-plugin/targets/standard/skills` | skills only |

- A target must not carry another channel's layout. A standard consumer projects
`plugin.json` onto the host itself, so a host layout beside it would be a second
source of truth for the same package; each host target likewise omits the standard
manifests and the other host's directory. Only Claude loads lifecycle hooks, so
only `targets/claude` carries `clients/`.
- The current `plugins` CLI reads `.plugin/marketplace.json` before the Claude
marketplace and does not read Agent Plugins 1.0 manifests. Generate that entry
to point at `targets/plugins-cli`; keep the compatibility layout separate from
`targets/standard`. Run `pnpm agent-plugin:check-installer` after packaging changes.
- `agent-plugin/src/plugin.json` and `mcp.json` own every shared manifest and MCP
field. Host-specific authored extras live under `agent-plugin/src/clients/`:
`claude/hooks.json`, `codex/interface.json` (Codex directory presentation), and
`shared/lifecycle.mjs`.
- Both skills are authored under `agent-plugin/src/skills/`. Icons, host manifests,
marketplace metadata, and every target copy are derived.
- `.dev/plugins/tempad-dev-dev/` is the one exception to the per-host split: an
ignored local build carrying both host layouts, pinned to this checkout's MCP
runtime, so one installed package can be exercised from either host while testing.
- Run `pnpm agent-plugin:build` after changing any input, inspect the tracked
generated output, and include it in the change. `agent-plugin/targets/` is marked as
generated for review; read `agent-plugin/src/` instead. Ordinary `pnpm build` must
not modify agent-plugin artifacts.
- Keep Codex and Claude development support equivalent. Both manifests must
launch the same working-tree MCP runtime.
- Release MCP configuration must use `@tempad-dev/mcp@latest`, never an alpha
tag, fixed version, or local path.
- Host integration must require only the normal TemPad Dev extension setup and
installation of the host plugin, including any host-required trust prompts.
The plugin/runtime owns connection discovery, conversation binding, and
reconnection. Manual control endpoints, environment edits, helper launches, or
agent instructions to configure the connection do not satisfy this requirement.
Do not claim full host support until feedback and host controls work through
that installation path against the actual host.
- Codex App uses MCP request metadata and native IPC for task identity, lifecycle,
comments, and interruption; do not register Codex hooks or add a hook fallback.
Claude may use installed hooks for lifecycle and Stop notices only.
Deliver comments through verified native conversation channels, never hooks. Clients
without native delivery do not expose feedback controls. Stop permanently cancels the current task independently of
host interruption and keeps its old lease fenced across ordinary reconnects.
Respect Stop without automatically replacing the task. Further design work may
explicitly begin a fresh task when necessary or requested by the user; no separate
Figma unlock or new user turn is required.
- Before preparing, running, reviewing, or asking the user to test an end-to-end
Figma authoring task, read `docs/testing/agent-authoring-evolution.md`. It is
the sole detailed runbook for runtime refresh, plugin replacement, clean-task
identity, evidence review, fix placement, and candidate promotion.

## Core commands

Run these from the repo root:

| Task | Command |
| ------------------------------ | ----------------------------- |
| Development | `pnpm dev` |
| Build all packages | `pnpm build` |
| Typecheck | `pnpm typecheck` |
| Lint / auto-fix | `pnpm lint` / `pnpm lint:fix` |
| Test once | `pnpm test:run` |
| Coverage | `pnpm test:coverage` |
| Format | `pnpm format` |
| Generate agent plugin packages | `pnpm agent-plugin:build` |

Use package-owned commands from the applicable package guide when a narrower
check is sufficient.

## Conditional documentation

| Task | Read first |
| ------------------------------------------------------- | --------------------------------------------------------------- |
| Test selection, required checks, or troubleshooting | `TESTING.md` |
| Test runtime or coverage architecture | `docs/testing/architecture.md` |
| Codex desktop IPC discovery, lifecycle, or feedback | `docs/engineering/codex-desktop-ipc.md` |
| End-to-end authoring evolution or live agent evaluation | `docs/testing/agent-authoring-evolution.md` |
| Extension implementation or MCP behavior | `packages/extension/AGENTS.md`, then its routed design document |
| Public agent-plugin installation or usage documentation | `agent-plugin/src/README.md` |
| Marketing screenshot work | `docs/marketing-screenshots.md` |

## Verification

Follow `TESTING.md` and every affected package guide. The default repository
checks are:

1. `pnpm typecheck`
2. `pnpm lint`
3. `pnpm test:run`

Add build, browser, packaging, rewrite, coverage, or live Figma checks only when
the routed guidance and change risk require them. Browser runtime tests must use
Playwright; do not introduce jsdom-based tests.
Loading
Loading