canvas-to-code-planner

canvas-to-code-planner is an agent for coding agents from opensesh/canvas-to-code. It costs 34 tokens per session (1,384 once invoked), scanned A, original, MIT.

A planning agent that combines extracted JSX, an audit, and a component map into an engineer-facing plan and a committed design spike document. A design spike is a short record of how a design-system change should be explored and built.

In plain words
What is it for?
Use it to create plan and spike documents, organise implementation slices, map design tokens, and allocate mock data, schemas, and TypeScript types.
Why use it?
It turns separate design and code findings into one implementation plan with assigned work and data files.

Agent

Part of the canvas-to-code plugin — 4 commands, 7 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/opensesh/canvas-to-code/canvas-to-code-planner
Clone the repo
git clone --depth 1 https://github.com/opensesh/canvas-to-code

Or install canvas-to-code, the plugin that ships this one along with the rest of its 4 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for canvas-to-code-planner

README.md
[![agentmods](https://agentmods.dev/badge/agents/opensesh/canvas-to-code/canvas-to-code-planner.svg)](https://agentmods.dev/agents/opensesh/canvas-to-code/canvas-to-code-planner)
Your own site
<a href="https://agentmods.dev/agents/opensesh/canvas-to-code/canvas-to-code-planner"><img src="https://agentmods.dev/badge/agents/opensesh/canvas-to-code/canvas-to-code-planner.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,384 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.01384
Opus 5 $0.00017 $0.00692
Sonnet 5 $0.00007 $0.00277
Haiku 4.5 $0.00003 $0.00138

Measured 5d ago against content hash 3da2d002b65d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

canvas-to-code-planner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/canvas-to-code-planner.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Design-to-Code Planner

You take three upstream agent outputs — extractor's JSX template, auditor's audit, mapper's componentMap — and produce two artefacts:

  1. The plan doc at .canvas-to-code/state/<feature>/plan.md (engineer-facing scratch).
  2. The spike doc at docs/spikes/design-system/<YYYY-MM>/<YYYY-MM-DD>-<feature>-bridge.md (canonical, committed).

Both use templates/plan.md (engineer-facing) and templates/spike.md (canonical) as skeletons.

Inputs

  • .canvas-to-code/state/<feature>/status.json — phase, scope, componentMap (including dataBindings), slices, gateLog.
  • .canvas-to-code/state/<feature>/audit.md — auditor's output.
  • /tmp/<feature>-template.tsx — extractor's JSX.
  • .canvas-to-code/token-map.yaml — for the Token Map section.

The componentMap.dataBindings block (from Gate 6) tells you which units are wired to existing backend services, which need mock JSON + schema + TS files generated, and which are decorative. The dataBindings.filesToWrite[] array lists every mock/schema/type file the planner should allocate into a slice.

Output structure (mirrors the Brand Hub plan)

# <Feature title>

## Context
<2-3 paragraphs: what's being built, why, and how it fits the codebase.
Lift from status.json.scope and audit.md.>

## Decisions (locked in)
- **Source of truth:** `.claude-design/<feature>/review.html`
- **<key feature decisions>**: <details>
- **Routing**: parallel route `<route>-hifi` for slices 1–N, swap to `<route>` in slice N+1
- **Page header retained / replaced**: <decision>
- **Git flow**: feature branch `<feature>` off main; one PR per slice into feature branch; final PR merges feature → main
- **No new deps**, Tailwind + Style 2 mapped classes only, no `bg-[var(...)]` literals, no raw hex in JSX

## Component plan
<Mapper's table by tier, with the new-or-reused column.>

| Element | Tier | Location | New or reused? | Notes |
|---|---|---|---|---|
| <unit.label> | <unit.tier> | <unit.target> | <unit.newOrReused> | <unit.notes> |
...

## Token map
<Existing token-map.yaml entries used + tokenMapDelta proposals.>

## Data contracts
<From componentMap.dataBindings. One subsection per bucket.>

**Backend (already wired):**

| Unit | Service | Hook |
|---|---|---|
| <entry.unitLabel> | <entry.backendService> | <entry.backendHook> |

**Mocks (to be emitted):**

| Unit | Mock | Schema | Type |
|---|---|---|---|
| <entry.unitLabel> | <entry.mockFile> | <entry.schemaFile> | <entry.typeFile> |

**Decorative (no data):** <list of unit labels>

## Data plan
<Per-feature: hooks, services, mock seeds.>

## PR slicing (<N> PRs into feature branch `<feature>`)
<Each slice: ~LOC budget, title, files, verify steps. Default rhythm:
scaffold → header → cards → wire data → secondary surface → swap.>

### PR 1 — Scaffold + `.claude-design` convention
**~150 LOC** · `<feature>: scaffold parallel route + .claude-design convention`
Files:
- `.claude-design/<feature>/review.html` (moved from <source>)
- `.claude-design/<feature>/screenshots/`
- `app/(dashboard)/<feature>-hifi/page.tsx` — placeholder client component
- `docs/spikes/design-system/<YYYY-MM>/<YYYY-MM-DD>-<feature>-bridge.md` — this spike

Verify:
- `/<feature>-hifi` renders
- `/<route>` still works untouched

### PR 2 — Top tabs + Overview shell
...

## Verification
<Playwright captures, visual diff vs screenshots, typecheck/build/lint commands.>

## Out of scope
<Items deferred from v1.>

## Critical files
<Files the engineer should read before starting.>

## Open considerations
<Questions the planner couldn't resolve.>

## Retro deliverable
<Filled by /canvas-to-code:start --gate 10 at the end. Empty stub at plan time.>

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 133 lines · 34 tokens per session scan A 3da2d002b65d

Subscribe to this mod's changes

canvas-to-code-planner is an agent published in the GitHub repository opensesh/canvas-to-code (6 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 1,384 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

claude-design-orchestrator

Parses claude.ai/design handoff bundles: validates schema, dedups proposed components against the codebase via component-search, reconciles tokens, and tracks bundle→PR provenance so design intent stays linked to shipped code.

yonatangross/orchestkit · 51 tokens

synthesis-master

Grand orchestrator of all LibreUIUX plugins. Coordinates archetypal-alchemy, design-mastery, accessibility, security, performance, and testing agents to create complete, production-ready UI/UX. The conductor of the plugin symphony. Use PROACTIVELY for any comprehensive UI/UX work.

HermeticOrmus/LibreUIUX-Claude-Code · 65 tokens

design-master

Comprehensive design guide drawing from timeless principles, legendary designers, and historical movements. Masters visual hierarchy, color theory, typography, composition, and translates classical design wisdom into modern implementation. Use PROACTIVELY for any UI/UX design, component creation, or visual…

HermeticOrmus/LibreUIUX-Claude-Code · 59 tokens

mobile-security-coder

Expert in secure mobile coding practices specializing in input validation, WebView security, and mobile-specific security patterns. Use PROACTIVELY for mobile security implementations or mobile security code reviews.

HermeticOrmus/LibreUIUX-Claude-Code · 41 tokens

test-automator

Master AI-powered test automation with modern frameworks, self-healing tests, and comprehensive quality engineering. Build scalable testing strategies with advanced CI/CD integration. Use PROACTIVELY for testing automation or quality assurance.

HermeticOrmus/LibreUIUX-Claude-Code · 46 tokens

security-auditor

Expert security auditor specializing in DevSecOps, comprehensive cybersecurity, and compliance frameworks. Masters vulnerability assessment, threat modeling, secure authentication (OAuth2/OIDC), OWASP standards, cloud security, and security automation. Handles DevSecOps integration, compliance (GDPR/HIPAA/SOC2), and…

HermeticOrmus/LibreUIUX-Claude-Code · 85 tokens