@agent-native/core 0.40.0 → 0.40.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/skills.d.ts +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +0 -1
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/blocks/index.d.ts +0 -2
- package/dist/client/blocks/index.d.ts.map +1 -1
- package/dist/client/blocks/index.js +0 -2
- package/dist/client/blocks/index.js.map +1 -1
- package/dist/client/blocks/library/dev-doc-ui.d.ts +1 -2
- package/dist/client/blocks/library/dev-doc-ui.d.ts.map +1 -1
- package/dist/client/blocks/library/dev-doc-ui.js +1 -2
- package/dist/client/blocks/library/dev-doc-ui.js.map +1 -1
- package/dist/client/blocks/library/server-specs.d.ts.map +1 -1
- package/dist/client/blocks/library/server-specs.js +0 -10
- package/dist/client/blocks/library/server-specs.js.map +1 -1
- package/dist/client/blocks/library/specs.d.ts +1 -1
- package/dist/client/blocks/library/specs.d.ts.map +1 -1
- package/dist/client/blocks/library/specs.js +2 -28
- package/dist/client/blocks/library/specs.js.map +1 -1
- package/dist/client/blocks/server.d.ts +0 -1
- package/dist/client/blocks/server.d.ts.map +1 -1
- package/dist/client/blocks/server.js +0 -1
- package/dist/client/blocks/server.js.map +1 -1
- package/dist/client/blocks/types.d.ts +1 -1
- package/dist/client/blocks/types.js.map +1 -1
- package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts.map +1 -1
- package/dist/client/rich-markdown-editor/registrySlashCommands.js +0 -1
- package/dist/client/rich-markdown-editor/registrySlashCommands.js.map +1 -1
- package/dist/deploy/build.js +68 -0
- package/dist/deploy/build.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +0 -6
- package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +0 -1
- package/dist/client/blocks/library/AnnotatedCodeBlock.js +0 -135
- package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +0 -1
- package/dist/client/blocks/library/annotated-code.config.d.ts +0 -58
- package/dist/client/blocks/library/annotated-code.config.d.ts.map +0 -1
- package/dist/client/blocks/library/annotated-code.config.js +0 -53
- package/dist/client/blocks/library/annotated-code.config.js.map +0 -1
package/dist/cli/skills.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* command handles the common "install Assets for my agent" path in one step.
|
|
5
5
|
*/
|
|
6
6
|
import { type ClientId } from "./mcp-config-writers.js";
|
|
7
|
-
export declare const VISUAL_PLANS_SKILL_MD = "---\nname: visual-plan\ndescription: >-\n Use Agent-Native Plans when coding-agent work needs an interactive structured\n plan document with inline diagrams, implementation maps, optional UI/product\n wireframes or prototypes, annotations, and comments.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, implementation maps, code previews,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture, backend, data, and refactor plans\nusually start in the document with local diagrams near each claim. UI and product\nplans should still start with the top canvas/prototype when screens or behavior\nare what the user needs to review.\n\n`/visual-plan` is the canonical command and the main entry point. Use `/ui-plan`\nwhen the work is primarily product UI and review should start with the screens.\nUse `/prototype-plan` when review should start with a functional live prototype.\nUse `/plan-design` when review should start with full-fidelity branded design.\nUse `/visual-questions` only when the user explicitly wants a visual intake form\nbefore planning. When a Codex, Claude Code, Markdown, or pasted plan already\nexists, `/visual-plan` uses that source plan as the starting point and builds\nthe review surface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan when work is multi-file, ambiguous, long-running,\nrisky, or UI-heavy, when architecture / data flow / UI direction / options /\nopen questions would benefit from inline diagrams or structured blocks, when the\nuser needs to react to a direction before you implement, or when an existing text\nplan needs a richer review surface.\n\n## Plan Discipline\n\n- **Gate hard.** A polished visual plan is the most expensive plan form; only\n invest when a wrong direction is costly. Skip it for trivial, unambiguous work\n \u2014 typos, one-line fixes, a single well-specified function, anything whose diff\n you could describe in one sentence \u2014 and just make the change. Never pad a plan\n with filler and never ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing `actions/` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n- **Preserve existing plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material. Preserve its\n intent, do not invent codebase facts, label inferred visuals as inferred, and\n build the visual review structure around the plan the user already has.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it \u2014 explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call `create-visual-questions` from\n `/visual-plan`; keep any answerable follow-up inside the plan itself as a\n bottom `question-form` Open Questions block. Otherwise state the assumption\n explicitly and proceed, and put anything unresolved in an open-questions block.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step \u2014 do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with `update-visual-plan` rather than only changing course in\n chat, and re-read the approved plan before major steps.\n\n## Core Workflow\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Decide whether the plan needs a top visual surface with the rules below, then call\n `create-visual-plan` with the title, brief, source, repo path, and structured\n `content` blocks. When a source plan already exists, pass it as `planText`\n and preserve the original plan's intent while adding structured review\n content.\n3. Compose or enrich any top UI/product visual surface from the kit and write the\n document with native blocks (see the cores below). Keep the document close to\n the Markdown plan the agent would normally output, or to the existing plan\n when one was provided. For architecture, backend, refactor, API, data-model,\n migration, or code plans, usually omit `content.canvas` and\n `content.prototype`; put `diagram`, `mermaid`, `api-endpoint`,\n `openapi-spec`, `data-model`, `diff`, `file-tree`, `json-explorer`,\n `annotated-code`,\n `implementation-map` and `code-tabs` blocks directly next\n to the relevant prose. Skip the top visual surface for non-visual work.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review; do not rely on this as the only handoff.\n Treat that browser open as a convenience and smoke test, not as the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand.\n5. Call `get-plan-feedback` before editing, after review, after any long pause,\n and before the final response. Treat `anchorDetails`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. Apply changes with `update-visual-plan`, preferring targeted `contentPatches`.\n When the user wants source-control friendly edits, use\n `patch-visual-plan-source` against the MDX files instead of regenerating the\n plan.\n7. Export with `export-visual-plan` only when the user wants a shareable receipt\n or repo-check-in artifacts.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in `content.canvas` and omit `content.prototype`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n `content.canvas`, add the aligned functional prototype in\n `content.prototype`, and rely on the top visual tabs to switch between them.\n- **Prototype-first** when the user explicitly asks for `/prototype-plan`, asks\n to operate the UI, or when interaction is the main question. Use\n `create-prototype-plan`, which still preserves static mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe & Canvas Core\n\nThis section is shared by `/visual-plan` and `/ui-plan`, and is the single\nsource of truth for how wireframes and the canvas work. The wireframe-quality\nrules below are additionally shared, word for word, with `/visual-recap`; the\ncanvas/artboard mechanics apply only to `/visual-plan` and `/ui-plan`. Do not\nparaphrase any of it per command.\n\n<!-- SHARED-CORE:wireframe-quality START -->\n\n**A wireframe is an HTML mockup. The renderer owns the look; you write the\ncontent.** Set `data.html` to a self-contained, semantic HTML fragment of the\nscreen and set `data.surface`. The renderer owns the surface footprint/aspect,\nthe dark/light theme, the hand-drawn font, and the rough.js sketch overlay \u2014 you\nnever write `<html>`/`<body>`/`<script>`/`<style>` tags, font-family, hex colors,\nor any width/height/coordinates. You write real HTML layout and real product\ncontent; the renderer styles and roughens it.\n\n**A wireframe block's data is an HTML screen plus a surface:**\n\n```json\n{\n \"surface\": \"browser\",\n \"html\": \"<div style=\\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\\"><h1>Sign in</h1><p class=\\\"wf-muted\\\">Use your work email to continue.</p><div class=\\\"wf-card\\\" style=\\\"display:flex;flex-direction:column;gap:10px\\\"><label>Email<input value=\\\"jane@acme.co\\\" /></label><label>Password<input value=\\\"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\\\" /></label><label style=\\\"display:flex;align-items:center;gap:8px\\\"><input type=\\\"checkbox\\\" checked /> Remember me</label><button class=\\\"primary\\\">Sign in</button></div><a href=\\\"#\\\">Forgot password?</a></div>\"\n}\n```\n\n**Write PLAIN semantic HTML and let the renderer style it.** Bare elements\n(`h1`/`h2`/`h3`, `p`, `button`, `input`, `<input type=\"checkbox\">`, `a`, `hr`)\nare auto-themed \u2014 no classes needed. Helper classes carry the rest:\n\n- `.wf-card` / `.wf-box` \u2014 a bordered, padded container (a panel, a list item).\n- `.wf-pill` / `.wf-chip` \u2014 a rounded tag or filter; add `.accent`\n (`<span class=\"wf-pill accent\">`) for the accent-filled variant.\n- `.wf-muted` \u2014 secondary/muted text (or use `<small>`).\n- `button.primary` or any element with `[data-primary]` \u2014 the accent-filled\n primary button.\n\n**Use the `--wf-*` tokens for any custom color, never hex.** The renderer flips\nthese on light/dark, so reading them is what keeps a mockup correct in both\nthemes. For any inline border, background, or text color, reference a token:\n`style=\"border:1.4px solid var(--wf-line)\"`. The tokens are `--wf-ink` (text),\n`--wf-muted` (secondary text), `--wf-line` (borders/dividers), `--wf-paper`\n(page background), `--wf-card` (raised surface), `--wf-accent` /\n`--wf-accent-fg` / `--wf-accent-soft` (brand action), `--wf-warn`, `--wf-ok`,\nand `--wf-radius`. Never hard-code a hex color and never set `font-family` \u2014 the\nrenderer owns the sketch/clean font.\n\n**Lay out with inline `style` flex/grid.** You write the real layout \u2014\n`display:flex; flex-direction:column; gap:10px; padding:16px` and so on \u2014 and the\nrenderer never repositions anything. Compose the actual product: reproduce the\ncurrent screen, then show the modification. Real labels, real counts, real dates,\nreal button text grounded in the screen you read; not lorem or gray bars.\n\n**Surface presets \u2014 match the real footprint, never default to desktop+mobile.**\nPick the `surface` that matches what the user will actually see:\n\n- `browser`: a web page that needs a browser chrome frame around it.\n- `desktop`: a full desktop app page or app shell.\n- `mobile`: a phone screen, only when the work is genuinely mobile.\n- `popover`: a small floating menu, dropdown, or inline popover.\n- `panel`: a side panel, inspector, or sidebar widget.\n\nA sidebar popover renders as a small surface, not a desktop page and a phone\nframe. Do not emit `desktop` + `mobile` variants unless responsive behavior\nactually changes the layout. For a component or widget, show one broader\napp-context frame only when placement affects understanding, then the focused\ncomponent states.\n\n**Model the actual component shell for small surfaces.** A rendered UI change\nbelongs in a wireframe; reserve `diagram` for architecture, dependency, state,\nor data-flow relationships. Popovers, dropdown menus, command palettes, and\ncontext menus use `surface: \"popover\"` unless the surrounding page placement is\nthe point of the change. Dialogs, sheets, inspectors, sidebars, and long\nproperty panels use the matching `panel` / `desktop` surface as appropriate.\nShow the real chrome: trigger or anchor when it matters, title/header row,\ntop-right actions, separators, fields, options, selected states, body content,\nand footer actions that are visible in the workflow.\n\n**Modify, don't redesign.** When the task changes an existing screen, reproduce\nthe current screen's real layout and footprint FIRST, then change only the delta\nand call it out with a single annotation. Do not restack the page into a new\nlayout. For net-new surfaces, compose from the real app shell.\n\n**Classify mockup scope before implementation.** Before turning a plan mockup\ninto source code, decide whether each artboard represents the whole page/app\nshell, a route body inside an existing shell, or a component/sub-surface. If an\nartboard includes navigation, sidebars, auth banners, or a signup/login form,\nmap those pieces to the real shared shell/auth components instead of nesting the\nentire mockup inside the current page. When a mockup references the product's\nstandard signup/login page, find and reuse that existing implementation; do not\napproximate it from the wireframe.\n\n**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a\npopover, menu, dialog, toast), show the full screen once, then add a small\nseparate artboard whose `html` contains ONLY that sub-surface \u2014 do not re-draw\nthe whole page around it, and do not scale a duplicate up. Pick the matching\n`surface` (e.g. `popover`) so the footprint is right; never widen a popover to\npage width.\n\n**Loading / skeleton states.** Set `data.skeleton: true` on the wireframe and\nfill the `html` with neutral, textless placeholder geometry \u2014 boxes and bars\nbuilt as `<div>`s with `background:var(--wf-line)` and explicit heights/widths,\nno labels or copy. The renderer drops borders, sketch, and color into the\nskeleton register automatically. Never escape to a `custom-html` document block\nto fake a loader.\n\n**Editing an existing mockup.** To change one element, text, or color in an\nexisting html mockup, do NOT regenerate the frame \u2014 call `update-visual-plan`\nwith `contentPatches: [{ op: \"patch-wireframe-html\", blockId, edits: [{ find,\nreplace }] }]`. Each `find` is a unique snippet of the current html (read it\nfirst with `get-visual-plan`); set `all: true` on an edit to replace every\noccurrence. The result is re-sanitized.\n\n**Treat the wireframe border as part of the visible design.** Always wrap HTML\nwireframe content in a root container with real inner padding before drawing\ncards, fields, pills, labels, or controls. Use at least 14-16px of padding,\n`box-sizing: border-box`, `height: 100%`, and `gap` between child rows so the\nfirst row never sits flush against the screen border. Keep text away from\nborders: every container, field, button, menu item, and annotation needs enough\npadding and line-height to read cleanly in the rendered Plan view.\n\n**Lay out children safely so they never collide.** Use HTML flex/grid with\n`gap`, `min-width: 0`, and sensible overflow. Avoid negative margins, absolute\npositioning, or fixed child widths that can collide when the renderer switches\nbetween light/dark, sketch/clean, or different zoom levels.\n\n**Do not wrap intentionally single-line labels.** For tab rails, breadcrumbs,\nfile chips, code filenames, and other deliberately single-line labels, do not\nlet long text wrap. It is acceptable and usually preferable to use\n`white-space: nowrap`, `overflow: hidden`, and `text-overflow: ellipsis` (or\nabstract bars) so the wireframe demonstrates the actual layout behavior instead\nof producing ugly vertical text. Use horizontally scrollable or clipped rails\nfor overflow.\n\n**Fill the frame; keep labels short.** Each artboard is a fixed-size surface \u2014 compose enough realistic HTML to fill it top to bottom with even vertical rhythm; never leave a large empty band. On desktop/app-shell sidebars, let the nav stack flex to fill (`flex:1`) and add any persistent bottom action/status after it so the rail reads complete in taller frames. On mobile especially, flow real rows down the whole screen (status bar, header, then list/detail content) rather than a header floating above a gap. Keep every label short enough to sit on one line within its column \u2014 shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).\n\n**Before / after must be comparable.** When showing a state change, preserve the\nunchanged controls in both states so the reviewer can see exactly what moved or\nappeared; do not show an added control as a generic box floating elsewhere in\nthe surface. Place the new/changed affordance where the implementation puts it \u2014\nfor example, a new `Edit with AI` action in a popover header belongs in the\ntop-right header slot, aligned with the title, not in the body or footer. Use\nthe same frame size, scale, outer padding, border radius, and visual density on\nboth sides unless the change itself alters those properties, and let the frame\nheight fit the content rather than leaving a tall empty lower half. Choose the\nbefore/after layout by geometry: use a `columns` block labeled `Before`/`After`\nwhen each state stays legible side by side; stack `Before` then `After`\nvertically in normal document flow when the surface is very wide, when\nfull-width scanning matters, or when columns would shrink or crop the detail.\nLabel each state visibly (for example, a header pill) so cropped screenshots\nstay unambiguous.\n\n**Good example \u2014 a contacts list, surface `browser`.** A small, real screen\ncomposed from the helper classes and tokens, layout in inline flex, no fonts or\nhex colors:\n\n```html\n<div\n style=\"display:flex;flex-direction:column;gap:12px;padding:16px;height:100%\"\n>\n <div style=\"display:flex;align-items:center;justify-content:space-between\">\n <h1>Contacts</h1>\n <button class=\"primary\">New contact</button>\n </div>\n <div style=\"display:flex;gap:6px\">\n <span class=\"wf-pill accent\">All 128</span>\n <span class=\"wf-pill\">Favorites</span>\n <span class=\"wf-pill\">Archived</span>\n </div>\n <div\n class=\"wf-card\"\n style=\"display:flex;flex-direction:column;gap:0;padding:0\"\n >\n <div\n style=\"display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)\"\n >\n <div\n style=\"width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)\"\n ></div>\n <div style=\"flex:1\">\n <strong>Jane Cooper</strong><br /><small>jane@acme.co</small>\n </div>\n <span class=\"wf-pill\">Lead</span>\n </div>\n <div style=\"display:flex;align-items:center;gap:10px;padding:10px 12px\">\n <div\n style=\"width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)\"\n ></div>\n <div style=\"flex:1\">\n <strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>\n </div>\n <span class=\"wf-pill\">Customer</span>\n </div>\n </div>\n</div>\n```\n\n<!-- SHARED-CORE:wireframe-quality END -->\n\n<!-- SHARED-CORE:canvas-surface START -->\n\n**Artboard placement is locked by the `surface`, not by coordinates.** The\nsurface locks the footprint and aspect; never set artboard width/height and\nnever use coordinates inside the wireframe HTML. Let canvas auto-placement\nhandle simple one-row boards. For mixed-footprint canvases, board-level artboard\n`x`/`y` is allowed and expected when it creates clear lanes.\n\n**Lay out mixed canvases in lanes.** When a canvas contains broad browser /\ndesktop frames plus compact `mobile`, `popover`, or `panel` surfaces, do not put\neverything in one horizontal strip. Use board-level artboard `x`/`y` to reserve\nlanes with generous empty space: main flow on one row, compact surfaces in their\nown column or row, and loading/error states in a lower row. Keep at least 96px\nbetween rendered artboard rectangles plus room for annotation gutters. Connect\nonly neighboring steps; never draw a long connector that skips across unrelated\nframes. Before handoff, inspect the top canvas at default zoom and move any\nframe whose label, connector, or annotation crosses another frame.\n\n**Canvas annotations are designer notes on the artboard.** When a top canvas is\npresent, sprinkle Figma-style notes near the frames they explain: a short\nheading, supporting text, and bullets \u2014 plain text layers, never bordered or\nshadowed cards, and never a box around a frame. The renderer spaces notes away\nfrom frames, so place each note by the frame it describes. Use an arrow only to\npoint at one specific control or transition; for a broad frame-level note, write\ntext beside the frame with no connector. Connectors are for real sequences only \u2014\nnever fake \"Step 1 \u2192 Step 2\" lines between independent states.\n\n**Do not create overlapping annotations.** Anchor each ordinary note to the\nframe it explains with `targetId` + `placement` (top/right/bottom/left), and\nomit `type` or use `type: \"note\"`. The renderer parks notes in a gutter beside\nthe frame and lays them out automatically. Do not use `type: \"callout\"`,\n`type: \"text\"`, `type: \"arrow\"`, x/y, or points for ordinary notes; those are\nfreeform review-markup layers and must be reserved for intentional markup in\nopen canvas space. Reserve arrows for a note that must point at one specific\ncontrol inside a frame; a note that simply sits beside its frame needs no arrow.\n\n**Patching.** Edit one wireframe, canvas annotation, diagram, or block with targeted `contentPatches`\n(for example `patch-wireframe-html`, `patch-diagram-html`, `update-block`,\n`replace-blocks`, `update-canvas-annotation`) rather\nthan regenerating the whole plan. `contentPatches` are part of the public MCP\naction schema, so Claude Code, Codex, Cursor, and other hosts can make surgical\nedits. If an agent is working from exported source files, use\n`read-visual-plan-source` / `patch-visual-plan-source`: `plan.mdx` holds\nfrontmatter plus markdown/document blocks, `canvas.mdx` holds\n`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>`, and the\npatch action normalizes the MDX back into the same JSON runtime model. JSON is\nthe canonical runtime shape; MDX is the repo-friendly authoring/export surface.\nIn the browser, humans edit `rich-text` prose inline; agents should still use\n`update-rich-text` content patches or source patches for prose, and use\ncomments/structured patches for canvas, artboard, wireframe, and diagram edits.\n\n**Never emit a titled artboard with no interior wireframe content.** Every artboard\nyou place on the canvas must carry an `html` wireframe or reference a wireframe\nblock via `blockId`; when using `blockId`, the referenced `wireframe` /\n`legacy-wireframe` block must remain in the plan. If you remove a duplicate\nwireframe from the document body, first move its `data` inline onto the\ncorresponding `content.canvas.frames[*].wireframe` / `legacyWireframe`. A\nlabel-only frame or a frame pointing at a deleted block renders empty and is\nrejected at parse time. If you only have a title, write it as a section header or\nannotation, not an empty artboard.\n\n**UI mockups belong in the top visual review area.** Static UI/product visuals\nlive on the canvas; multi-step UI flows get both canvas wireframes and a\nprototype. When the user asks for a mockup, UI state, loading state, layout,\nscreen, or visual comparison, make the canvas the primary home for that static\nvisual. When the user asks for a prototype or the plan contains a sequence the\nreviewer must feel, keep the canvas artboards and add `content.prototype` so the\ntop surface shows Wireframes / Prototype tabs. Architecture/code diagrams are\ndifferent: keep them inline in the document, close to the recommendation they\nsupport, unless the user explicitly asks for a spatial board. Document blocks\ncan explain, compare, or map implementation, but they should not host the\nprimary UI mockup or prototype just because `custom-html`, screenshots, or prose\nare easier to produce. If the canvas/prototype surface cannot represent the\nrequested UI fidelity, still keep the closest top-surface representation and\ncall out or extend the needed renderer capability. A skeleton/loading mockup\nalso lives in a canvas artboard \u2014 never move a mockup out of the canvas.\n\n**Legacy kit tree.** Older plans set a `screen` array of `{ el, ...props }` kit\nnodes instead of `html`; the renderer still accepts and displays it, but new\nplans emit `html`. Do not author fresh kit-tree screens - write the HTML mockup\ninstead. Likewise, old or imported plans may carry coordinate-based regions or\nfree-float x/y on notes; those are legacy escape hatches the renderer still\nshows but you must never produce. The `surface` drives each artboard's aspect\nand footprint, and the gutter parks notes by `targetId` + `placement`. The only\nnew-plan coordinate exception is deliberate board-level artboard `x`/`y` for\nmulti-lane mixed-surface canvases; never supply artboard width/height, note\ncoordinates, or wireframe-internal coordinates.\n\n<!-- SHARED-CORE:canvas-surface END -->\n\n## Document Quality Core\n\nThis section is shared, word for word, by `/visual-plan` and `/ui-plan`. It is\nthe single source of truth for the document below the canvas. Do not paraphrase\nit per command.\n\n<!-- SHARED-CORE:document-quality START -->\n\n**The document is a serious technical plan, not marketing.** Write it the way a\nstrong Claude or Codex implementation plan reads: outcome-first, prose-first,\nself-contained, and specific. State the objective and what \"done\" means, the\nscope and non-goals, the proposed approach with the key decisions and their\nrationale, ordered steps that name real files, symbols, actions, and data\nshapes, the risks, and a closing verification step (tests, build, or a checkable\nbehavior). Replace vague prose with specifics; never ship a step like \"make it\nwork.\" No hero art, gradients, logos, nav bars, slogans, value props, giant\nlanding-page headings, or marketing cards unless the user explicitly asks.\n\n**When top visuals exist, they and the document never duplicate each other.**\nFor UI work, the UI story lives in the top visual surface: canvas artboards for\nstatic inspection, plus prototype tabs when the flow should be functional. The\ndocument carries the technical depth the visuals cannot show \u2014 concrete\nfile/symbol maps, API and data contracts, code snippets, migration or\nimplementation phases, risks, and validation. For architecture/code reviews,\ninvert that: the document is the visual surface, and each recommendation should\ncarry its own nearby inline `diagram` / `data-model` block plus file evidence\nand terse Problem/Solution/Why text. For architecture/code diagrams, prefer\nstandard two-dimensional layouts: paired before/after panels, layered diagrams,\nswimlanes, dependency maps, matrices, or grouped regions. Do not default to\nleft-to-right chains; use a line only when the relationship is truly a sequence.\nUse native `diagram` blocks with `data.html` / `data.css` for these richer\nlayouts; the fragment may use semantic HTML and inline SVG, and the renderer\napplies the viewer's sketch/clean style. Leave room for the sketch font: keep\nlabels short, give nodes generous width, and place boundary/annotation labels in\nunused space instead of over nodes. For small text/SVG changes to an existing\nHTML diagram, use `patch-diagram-html` with a unique `find`/`replace` snippet\ninstead of resending the whole `data.html` string. Legacy `nodes` / `edges` are\nonly for tiny previews or genuinely linear step flows. Repeat a wireframe in the document only\nfor a genuinely new detail view or comparison. Skip the visual surface entirely\nfor non-visual work and write a clean rich document. For a simple binary UI\nvisual choice, show the two directions in the canvas only; do not repeat the\nsame options as body wireframes, a `decision` block, or prose. Put the actual\nchoice in the bottom \"Open Questions\" form.\n\n**Use the right block, and make it carry substance.** For the authoritative,\nmachine-checked list of block types and their data schemas, call `get-plan-blocks`\n\u2014 it returns the live registry vocabulary (type, MDX tag, placement, key fields)\nso you never emit a block the editor cannot render or round-trip:\n\n- `rich-text` for plan prose with real bold/italic/code/links and nested lists.\n- `implementation-map` / `code-tabs` for the file map: file path, the\n symbols/components to touch, the reason, risk/coordination notes, and a\n concise syntax-highlighted snippet of the code shape in every file tab \u2014\n never the whole file, never a prose-only file list. If the exact code is not\n known yet, include the smallest plausible planned shape or a short comment\n stub that names what needs to be filled in.\n- `decision` for two or three option cards with consequences. These are static\n records; do not style them like clickable tabs or chips unless the renderer\n truly supports changing the selection.\n- `columns` for side-by-side before/after or current/target comparisons where\n each side needs real nested blocks; label the columns clearly and avoid\n stacking comparison blocks vertically when parallel reading is the point.\n- `diagram` for two-dimensional architecture, dependency, data-flow, or state\n relationships, only when it clarifies something real. For architecture/code\n diagrams, prefer `data.html` / `data.css` with semantic HTML and inline SVG so\n the diagram can use panels, layers, matrices, arrows, annotations, and\n responsive layout directly. Author diagram HTML with renderer-owned primitives\n like `.diagram-panel`, `.diagram-card`, `.diagram-node`, `.diagram-box`,\n `.diagram-pill`, `.diagram-muted`, and `[data-rough]`; they map to the plan's\n Tailwind theme variables through `--wf-ink`, `--wf-muted`, `--wf-line`,\n `--wf-paper`, `--wf-card`, `--wf-accent`, `--wf-accent-soft`, `--wf-warn`, and\n `--wf-ok`, and switch to Virgil plus rough.js outlines in sketchy mode. Do not\n set `font-family` and do not hard-code hex, rgb, or hsl colors in diagram HTML\n or CSS. Use legacy `nodes` / `edges` only for small previews or truly\n sequential flows. In architecture/code plans, prefer a repeated section rhythm:\n recommendation title, confidence and category badges, code-path evidence, a\n local before/after or current/target spatial diagram, then concise\n Problem/Solution/Why text. Labels must not overlap nodes, connectors, or each\n other.\n- `tabs` for multiple states, directions, or comparisons. A tab that reveals\n only prose usually means the plan is under-specified \u2014 include a relevant\n visual unless the tab is intentionally document-only.\n- `table`, `checklist`, `callout` for scannable structure.\n\n**Open questions live at the bottom as a form when answers would change the\nplan.** Surface answerable unresolved decisions in a final `question-form`\nblock titled \"Open Questions\" so the renderer presents it as a distinct section.\nUse `single` or `multi` for clear choices, `freeform` for constraints,\n`recommended: true` for the default you would pick, and option `wireframe` /\n`diagram` previews only when the options are not already visible in the top\ncanvas. Keep non-answerable assumptions or risks as concise `callout` blocks in\nthe relevant section. Never bury a questions/decisions wall inside the plan\nnarrative, and never ask the same question in both a `decision` block and a\n`question-form`.\n\n**`custom-html` is a bounded escape hatch only** \u2014 a single complete fragment\ninside a block, never `html`/`head`/`body`/`script` tags, never a generic\nplaceholder, density demo, or proof that custom HTML works. Prefer the native\nblocks for normal plans. For architecture/code reviews, use `diagram`\n`data.html` / `data.css` for rich local HTML/SVG diagrams instead of\n`custom-html`. For UI/product work, `custom-html` is never the primary home for a\nrequested mockup, UI state, or visual comparison. If UI fidelity requires\nHTML/CSS, image capture, or real React/CSS, the product fix is canvas support\nfor that artifact type, not moving the mockup into the document.\n\n**Before handoff, open the plan and check it.** Fix overlap, excessive\nwhitespace, clipped fragments, misleading inactive controls, poor contrast, and\nunreadable diagrams before asking for approval.\n\n<!-- SHARED-CORE:document-quality END -->\n\n## Good vs. Bad Exemplar\n\n<!-- SHARED-CORE:exemplar START -->\n\n**GOOD.** A `/ui-plan` for a todo app: a canvas with a `desktop` artboard whose\n`data.html` is a real flex layout \u2014 a sidebar of links (`Inbox 12`, `Today 4`,\n`Done`), a main column with an `<h1>Today</h1>`, accent `.wf-pill`s for the\nfilters, a muted section label `OVERDUE`, and `.wf-card` task rows carrying real\ntitles, due dates, and a primary `button.primary` \u2014 styled only through bare\nelements, helper classes, and `--wf-*` tokens, so the renderer applies the\ncorrect desktop footprint, theme, and one subtle whole-frame wobble. Plain-text\ndesigner notes sit spaced off the frame, pointing only at the controls that need\nexplanation. Below it, a Claude/Codex-grade document: objective and\ndone-criteria, an `implementation-map` naming the real components and actions\nwith short highlighted snippets, a `decision` card weighing two real approaches,\nand a validation step \u2014 none of it repeating the canvas. If the task also\nchanges a multi-step completion flow, the same top area includes a Prototype tab\nwhose screens use the same labels and states as the canvas artboards, with\n`data-goto` controls for the sequence. This is the bar.\n\n**GOOD.** A `/visual-plan` for a backend architecture review: no top canvas.\nThe document opens with context and a legend, then repeats recommendation cards:\ntitle, confidence/category badges, a monospace grid of real file paths, one\ninline two-dimensional before/after or layered architecture diagram, and terse\nProblem/Solution/Why bullets using the codebase's vocabulary. The diagram uses\nspace to show boundaries, layers, and ownership; it is not a default\nleft-to-right chain. The plan ends with a top recommendation and a bottom\nquestion-form only if the next architecture direction is genuinely open. This is\nbetter than a top canvas because each diagram is local to the claim it supports.\n\n**BAD.** A `data.html` with hard-coded hex colors, a `font-family`, or fixed\npixel width/height; gray placeholder bars \"insinuating\" text on a non-skeleton\nframe; a forced desktop + mobile pair for a popover; floating bordered\nannotation cards hugging the frames; a fresh hand-authored kit-tree `screen`\ninstead of `html`; a multi-step UI flow with only static frames and no prototype\ntab; a mockup escaped into a document `custom-html` block; and a marketing-style\ndocument with a hero heading and value props that just restates what the canvas\nalready shows. Also bad: an architecture-only plan forced into a top canvas of\nlabeled boxes with overlapping text, where the actual code evidence and\nrecommendations live elsewhere. Never produce this.\n\n<!-- SHARED-CORE:exemplar END -->\n\n## Tool Guidance\n\n- `create-visual-plan`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing `planText`; `content` may include no\n visual surface, canvas only, or canvas + prototype.\n- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.\n- `create-prototype-plan`: start a prototype-first plan with a functional top\n review surface.\n- `create-plan-design`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only for the explicit `/visual-questions`\n command, not as `/visual-plan` preflight.\n- `update-visual-plan`: revise content, status, or comments; prefer\n `contentPatches` over regenerating the whole plan.\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: read the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and\nauthenticates it in the same step (a one-time browser sign-in at setup \u2014 this is\nintended), so the first tool call does not hit an OAuth wall:\n\n```bash\nagent-native skills add visual-plan\n```\n\nAfter that, `/visual-plan` (and `/visual-recap`, `/ui-plan`,\n`/prototype-plan`, `/plan-design`, `/visual-questions`) generate a plan and open\nthe editor. Pass `--no-connect` to\nregister the connector without authenticating, then run\n`agent-native connect https://plan.agent-native.com` whenever you are ready.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`,\ndo not keep retrying the tool. Authenticate the connector with\n`agent-native connect https://plan.agent-native.com` (OAuth-capable hosts can\ninstead re-run /mcp and choose Authenticate), then continue once the connector\nis available.\n\nHosted default: connect `https://plan.agent-native.com/_agent-native/mcp`. Do\nnot put shared secrets in skill files.\n";
|
|
7
|
+
export declare const VISUAL_PLANS_SKILL_MD = "---\nname: visual-plan\ndescription: >-\n Use Agent-Native Plans when coding-agent work needs an interactive structured\n plan document with inline diagrams, implementation maps, optional UI/product\n wireframes or prototypes, annotations, and comments.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, implementation maps, code previews,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture, backend, data, and refactor plans\nusually start in the document with local diagrams near each claim. UI and product\nplans should still start with the top canvas/prototype when screens or behavior\nare what the user needs to review.\n\n`/visual-plan` is the canonical command and the main entry point. Use `/ui-plan`\nwhen the work is primarily product UI and review should start with the screens.\nUse `/prototype-plan` when review should start with a functional live prototype.\nUse `/plan-design` when review should start with full-fidelity branded design.\nUse `/visual-questions` only when the user explicitly wants a visual intake form\nbefore planning. When a Codex, Claude Code, Markdown, or pasted plan already\nexists, `/visual-plan` uses that source plan as the starting point and builds\nthe review surface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan when work is multi-file, ambiguous, long-running,\nrisky, or UI-heavy, when architecture / data flow / UI direction / options /\nopen questions would benefit from inline diagrams or structured blocks, when the\nuser needs to react to a direction before you implement, or when an existing text\nplan needs a richer review surface.\n\n## Plan Discipline\n\n- **Gate hard.** A polished visual plan is the most expensive plan form; only\n invest when a wrong direction is costly. Skip it for trivial, unambiguous work\n \u2014 typos, one-line fixes, a single well-specified function, anything whose diff\n you could describe in one sentence \u2014 and just make the change. Never pad a plan\n with filler and never ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing `actions/` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n- **Preserve existing plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material. Preserve its\n intent, do not invent codebase facts, label inferred visuals as inferred, and\n build the visual review structure around the plan the user already has.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it \u2014 explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call `create-visual-questions` from\n `/visual-plan`; keep any answerable follow-up inside the plan itself as a\n bottom `question-form` Open Questions block. Otherwise state the assumption\n explicitly and proceed, and put anything unresolved in an open-questions block.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step \u2014 do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with `update-visual-plan` rather than only changing course in\n chat, and re-read the approved plan before major steps.\n\n## Core Workflow\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Decide whether the plan needs a top visual surface with the rules below, then call\n `create-visual-plan` with the title, brief, source, repo path, and structured\n `content` blocks. When a source plan already exists, pass it as `planText`\n and preserve the original plan's intent while adding structured review\n content.\n3. Compose or enrich any top UI/product visual surface from the kit and write the\n document with native blocks (see the cores below). Keep the document close to\n the Markdown plan the agent would normally output, or to the existing plan\n when one was provided. For architecture, backend, refactor, API, data-model,\n migration, or code plans, usually omit `content.canvas` and\n `content.prototype`; put `diagram`, `mermaid`, `api-endpoint`,\n `openapi-spec`, `data-model`, `diff`, `file-tree`, `json-explorer`,\n `implementation-map` and `code-tabs` blocks directly next\n to the relevant prose. Skip the top visual surface for non-visual work.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review; do not rely on this as the only handoff.\n Treat that browser open as a convenience and smoke test, not as the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand.\n5. Call `get-plan-feedback` before editing, after review, after any long pause,\n and before the final response. Treat `anchorDetails`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. Apply changes with `update-visual-plan`, preferring targeted `contentPatches`.\n When the user wants source-control friendly edits, use\n `patch-visual-plan-source` against the MDX files instead of regenerating the\n plan.\n7. Export with `export-visual-plan` only when the user wants a shareable receipt\n or repo-check-in artifacts.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in `content.canvas` and omit `content.prototype`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n `content.canvas`, add the aligned functional prototype in\n `content.prototype`, and rely on the top visual tabs to switch between them.\n- **Prototype-first** when the user explicitly asks for `/prototype-plan`, asks\n to operate the UI, or when interaction is the main question. Use\n `create-prototype-plan`, which still preserves static mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe & Canvas Core\n\nThis section is shared by `/visual-plan` and `/ui-plan`, and is the single\nsource of truth for how wireframes and the canvas work. The wireframe-quality\nrules below are additionally shared, word for word, with `/visual-recap`; the\ncanvas/artboard mechanics apply only to `/visual-plan` and `/ui-plan`. Do not\nparaphrase any of it per command.\n\n<!-- SHARED-CORE:wireframe-quality START -->\n\n**A wireframe is an HTML mockup. The renderer owns the look; you write the\ncontent.** Set `data.html` to a self-contained, semantic HTML fragment of the\nscreen and set `data.surface`. The renderer owns the surface footprint/aspect,\nthe dark/light theme, the hand-drawn font, and the rough.js sketch overlay \u2014 you\nnever write `<html>`/`<body>`/`<script>`/`<style>` tags, font-family, hex colors,\nor any width/height/coordinates. You write real HTML layout and real product\ncontent; the renderer styles and roughens it.\n\n**A wireframe block's data is an HTML screen plus a surface:**\n\n```json\n{\n \"surface\": \"browser\",\n \"html\": \"<div style=\\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\\"><h1>Sign in</h1><p class=\\\"wf-muted\\\">Use your work email to continue.</p><div class=\\\"wf-card\\\" style=\\\"display:flex;flex-direction:column;gap:10px\\\"><label>Email<input value=\\\"jane@acme.co\\\" /></label><label>Password<input value=\\\"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\\\" /></label><label style=\\\"display:flex;align-items:center;gap:8px\\\"><input type=\\\"checkbox\\\" checked /> Remember me</label><button class=\\\"primary\\\">Sign in</button></div><a href=\\\"#\\\">Forgot password?</a></div>\"\n}\n```\n\n**Write PLAIN semantic HTML and let the renderer style it.** Bare elements\n(`h1`/`h2`/`h3`, `p`, `button`, `input`, `<input type=\"checkbox\">`, `a`, `hr`)\nare auto-themed \u2014 no classes needed. Helper classes carry the rest:\n\n- `.wf-card` / `.wf-box` \u2014 a bordered, padded container (a panel, a list item).\n- `.wf-pill` / `.wf-chip` \u2014 a rounded tag or filter; add `.accent`\n (`<span class=\"wf-pill accent\">`) for the accent-filled variant.\n- `.wf-muted` \u2014 secondary/muted text (or use `<small>`).\n- `button.primary` or any element with `[data-primary]` \u2014 the accent-filled\n primary button.\n\n**Use the `--wf-*` tokens for any custom color, never hex.** The renderer flips\nthese on light/dark, so reading them is what keeps a mockup correct in both\nthemes. For any inline border, background, or text color, reference a token:\n`style=\"border:1.4px solid var(--wf-line)\"`. The tokens are `--wf-ink` (text),\n`--wf-muted` (secondary text), `--wf-line` (borders/dividers), `--wf-paper`\n(page background), `--wf-card` (raised surface), `--wf-accent` /\n`--wf-accent-fg` / `--wf-accent-soft` (brand action), `--wf-warn`, `--wf-ok`,\nand `--wf-radius`. Never hard-code a hex color and never set `font-family` \u2014 the\nrenderer owns the sketch/clean font.\n\n**Lay out with inline `style` flex/grid.** You write the real layout \u2014\n`display:flex; flex-direction:column; gap:10px; padding:16px` and so on \u2014 and the\nrenderer never repositions anything. Compose the actual product: reproduce the\ncurrent screen, then show the modification. Real labels, real counts, real dates,\nreal button text grounded in the screen you read; not lorem or gray bars.\n\n**Surface presets \u2014 match the real footprint, never default to desktop+mobile.**\nPick the `surface` that matches what the user will actually see:\n\n- `browser`: a web page that needs a browser chrome frame around it.\n- `desktop`: a full desktop app page or app shell.\n- `mobile`: a phone screen, only when the work is genuinely mobile.\n- `popover`: a small floating menu, dropdown, or inline popover.\n- `panel`: a side panel, inspector, or sidebar widget.\n\nA sidebar popover renders as a small surface, not a desktop page and a phone\nframe. Do not emit `desktop` + `mobile` variants unless responsive behavior\nactually changes the layout. For a component or widget, show one broader\napp-context frame only when placement affects understanding, then the focused\ncomponent states.\n\n**Model the actual component shell for small surfaces.** A rendered UI change\nbelongs in a wireframe; reserve `diagram` for architecture, dependency, state,\nor data-flow relationships. Popovers, dropdown menus, command palettes, and\ncontext menus use `surface: \"popover\"` unless the surrounding page placement is\nthe point of the change. Dialogs, sheets, inspectors, sidebars, and long\nproperty panels use the matching `panel` / `desktop` surface as appropriate.\nShow the real chrome: trigger or anchor when it matters, title/header row,\ntop-right actions, separators, fields, options, selected states, body content,\nand footer actions that are visible in the workflow.\n\n**Modify, don't redesign.** When the task changes an existing screen, reproduce\nthe current screen's real layout and footprint FIRST, then change only the delta\nand call it out with a single annotation. Do not restack the page into a new\nlayout. For net-new surfaces, compose from the real app shell.\n\n**Classify mockup scope before implementation.** Before turning a plan mockup\ninto source code, decide whether each artboard represents the whole page/app\nshell, a route body inside an existing shell, or a component/sub-surface. If an\nartboard includes navigation, sidebars, auth banners, or a signup/login form,\nmap those pieces to the real shared shell/auth components instead of nesting the\nentire mockup inside the current page. When a mockup references the product's\nstandard signup/login page, find and reuse that existing implementation; do not\napproximate it from the wireframe.\n\n**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a\npopover, menu, dialog, toast), show the full screen once, then add a small\nseparate artboard whose `html` contains ONLY that sub-surface \u2014 do not re-draw\nthe whole page around it, and do not scale a duplicate up. Pick the matching\n`surface` (e.g. `popover`) so the footprint is right; never widen a popover to\npage width.\n\n**Loading / skeleton states.** Set `data.skeleton: true` on the wireframe and\nfill the `html` with neutral, textless placeholder geometry \u2014 boxes and bars\nbuilt as `<div>`s with `background:var(--wf-line)` and explicit heights/widths,\nno labels or copy. The renderer drops borders, sketch, and color into the\nskeleton register automatically. Never escape to a `custom-html` document block\nto fake a loader.\n\n**Editing an existing mockup.** To change one element, text, or color in an\nexisting html mockup, do NOT regenerate the frame \u2014 call `update-visual-plan`\nwith `contentPatches: [{ op: \"patch-wireframe-html\", blockId, edits: [{ find,\nreplace }] }]`. Each `find` is a unique snippet of the current html (read it\nfirst with `get-visual-plan`); set `all: true` on an edit to replace every\noccurrence. The result is re-sanitized.\n\n**Treat the wireframe border as part of the visible design.** Always wrap HTML\nwireframe content in a root container with real inner padding before drawing\ncards, fields, pills, labels, or controls. Use at least 14-16px of padding,\n`box-sizing: border-box`, `height: 100%`, and `gap` between child rows so the\nfirst row never sits flush against the screen border. Keep text away from\nborders: every container, field, button, menu item, and annotation needs enough\npadding and line-height to read cleanly in the rendered Plan view.\n\n**Lay out children safely so they never collide.** Use HTML flex/grid with\n`gap`, `min-width: 0`, and sensible overflow. Avoid negative margins, absolute\npositioning, or fixed child widths that can collide when the renderer switches\nbetween light/dark, sketch/clean, or different zoom levels.\n\n**Do not wrap intentionally single-line labels.** For tab rails, breadcrumbs,\nfile chips, code filenames, and other deliberately single-line labels, do not\nlet long text wrap. It is acceptable and usually preferable to use\n`white-space: nowrap`, `overflow: hidden`, and `text-overflow: ellipsis` (or\nabstract bars) so the wireframe demonstrates the actual layout behavior instead\nof producing ugly vertical text. Use horizontally scrollable or clipped rails\nfor overflow.\n\n**Fill the frame; keep labels short.** Each artboard is a fixed-size surface \u2014 compose enough realistic HTML to fill it top to bottom with even vertical rhythm; never leave a large empty band. On desktop/app-shell sidebars, let the nav stack flex to fill (`flex:1`) and add any persistent bottom action/status after it so the rail reads complete in taller frames. On mobile especially, flow real rows down the whole screen (status bar, header, then list/detail content) rather than a header floating above a gap. Keep every label short enough to sit on one line within its column \u2014 shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).\n\n**Before / after must be comparable.** When showing a state change, preserve the\nunchanged controls in both states so the reviewer can see exactly what moved or\nappeared; do not show an added control as a generic box floating elsewhere in\nthe surface. Place the new/changed affordance where the implementation puts it \u2014\nfor example, a new `Edit with AI` action in a popover header belongs in the\ntop-right header slot, aligned with the title, not in the body or footer. Use\nthe same frame size, scale, outer padding, border radius, and visual density on\nboth sides unless the change itself alters those properties, and let the frame\nheight fit the content rather than leaving a tall empty lower half. Choose the\nbefore/after layout by geometry: use a `columns` block labeled `Before`/`After`\nwhen each state stays legible side by side; stack `Before` then `After`\nvertically in normal document flow when the surface is very wide, when\nfull-width scanning matters, or when columns would shrink or crop the detail.\nLabel each state visibly (for example, a header pill) so cropped screenshots\nstay unambiguous.\n\n**Good example \u2014 a contacts list, surface `browser`.** A small, real screen\ncomposed from the helper classes and tokens, layout in inline flex, no fonts or\nhex colors:\n\n```html\n<div\n style=\"display:flex;flex-direction:column;gap:12px;padding:16px;height:100%\"\n>\n <div style=\"display:flex;align-items:center;justify-content:space-between\">\n <h1>Contacts</h1>\n <button class=\"primary\">New contact</button>\n </div>\n <div style=\"display:flex;gap:6px\">\n <span class=\"wf-pill accent\">All 128</span>\n <span class=\"wf-pill\">Favorites</span>\n <span class=\"wf-pill\">Archived</span>\n </div>\n <div\n class=\"wf-card\"\n style=\"display:flex;flex-direction:column;gap:0;padding:0\"\n >\n <div\n style=\"display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)\"\n >\n <div\n style=\"width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)\"\n ></div>\n <div style=\"flex:1\">\n <strong>Jane Cooper</strong><br /><small>jane@acme.co</small>\n </div>\n <span class=\"wf-pill\">Lead</span>\n </div>\n <div style=\"display:flex;align-items:center;gap:10px;padding:10px 12px\">\n <div\n style=\"width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)\"\n ></div>\n <div style=\"flex:1\">\n <strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>\n </div>\n <span class=\"wf-pill\">Customer</span>\n </div>\n </div>\n</div>\n```\n\n<!-- SHARED-CORE:wireframe-quality END -->\n\n<!-- SHARED-CORE:canvas-surface START -->\n\n**Artboard placement is locked by the `surface`, not by coordinates.** The\nsurface locks the footprint and aspect; never set artboard width/height and\nnever use coordinates inside the wireframe HTML. Let canvas auto-placement\nhandle simple one-row boards. For mixed-footprint canvases, board-level artboard\n`x`/`y` is allowed and expected when it creates clear lanes.\n\n**Lay out mixed canvases in lanes.** When a canvas contains broad browser /\ndesktop frames plus compact `mobile`, `popover`, or `panel` surfaces, do not put\neverything in one horizontal strip. Use board-level artboard `x`/`y` to reserve\nlanes with generous empty space: main flow on one row, compact surfaces in their\nown column or row, and loading/error states in a lower row. Keep at least 96px\nbetween rendered artboard rectangles plus room for annotation gutters. Connect\nonly neighboring steps; never draw a long connector that skips across unrelated\nframes. Before handoff, inspect the top canvas at default zoom and move any\nframe whose label, connector, or annotation crosses another frame.\n\n**Canvas annotations are designer notes on the artboard.** When a top canvas is\npresent, sprinkle Figma-style notes near the frames they explain: a short\nheading, supporting text, and bullets \u2014 plain text layers, never bordered or\nshadowed cards, and never a box around a frame. The renderer spaces notes away\nfrom frames, so place each note by the frame it describes. Use an arrow only to\npoint at one specific control or transition; for a broad frame-level note, write\ntext beside the frame with no connector. Connectors are for real sequences only \u2014\nnever fake \"Step 1 \u2192 Step 2\" lines between independent states.\n\n**Do not create overlapping annotations.** Anchor each ordinary note to the\nframe it explains with `targetId` + `placement` (top/right/bottom/left), and\nomit `type` or use `type: \"note\"`. The renderer parks notes in a gutter beside\nthe frame and lays them out automatically. Do not use `type: \"callout\"`,\n`type: \"text\"`, `type: \"arrow\"`, x/y, or points for ordinary notes; those are\nfreeform review-markup layers and must be reserved for intentional markup in\nopen canvas space. Reserve arrows for a note that must point at one specific\ncontrol inside a frame; a note that simply sits beside its frame needs no arrow.\n\n**Patching.** Edit one wireframe, canvas annotation, diagram, or block with targeted `contentPatches`\n(for example `patch-wireframe-html`, `patch-diagram-html`, `update-block`,\n`replace-blocks`, `update-canvas-annotation`) rather\nthan regenerating the whole plan. `contentPatches` are part of the public MCP\naction schema, so Claude Code, Codex, Cursor, and other hosts can make surgical\nedits. If an agent is working from exported source files, use\n`read-visual-plan-source` / `patch-visual-plan-source`: `plan.mdx` holds\nfrontmatter plus markdown/document blocks, `canvas.mdx` holds\n`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>`, and the\npatch action normalizes the MDX back into the same JSON runtime model. JSON is\nthe canonical runtime shape; MDX is the repo-friendly authoring/export surface.\nIn the browser, humans edit `rich-text` prose inline; agents should still use\n`update-rich-text` content patches or source patches for prose, and use\ncomments/structured patches for canvas, artboard, wireframe, and diagram edits.\n\n**Never emit a titled artboard with no interior wireframe content.** Every artboard\nyou place on the canvas must carry an `html` wireframe or reference a wireframe\nblock via `blockId`; when using `blockId`, the referenced `wireframe` /\n`legacy-wireframe` block must remain in the plan. If you remove a duplicate\nwireframe from the document body, first move its `data` inline onto the\ncorresponding `content.canvas.frames[*].wireframe` / `legacyWireframe`. A\nlabel-only frame or a frame pointing at a deleted block renders empty and is\nrejected at parse time. If you only have a title, write it as a section header or\nannotation, not an empty artboard.\n\n**UI mockups belong in the top visual review area.** Static UI/product visuals\nlive on the canvas; multi-step UI flows get both canvas wireframes and a\nprototype. When the user asks for a mockup, UI state, loading state, layout,\nscreen, or visual comparison, make the canvas the primary home for that static\nvisual. When the user asks for a prototype or the plan contains a sequence the\nreviewer must feel, keep the canvas artboards and add `content.prototype` so the\ntop surface shows Wireframes / Prototype tabs. Architecture/code diagrams are\ndifferent: keep them inline in the document, close to the recommendation they\nsupport, unless the user explicitly asks for a spatial board. Document blocks\ncan explain, compare, or map implementation, but they should not host the\nprimary UI mockup or prototype just because `custom-html`, screenshots, or prose\nare easier to produce. If the canvas/prototype surface cannot represent the\nrequested UI fidelity, still keep the closest top-surface representation and\ncall out or extend the needed renderer capability. A skeleton/loading mockup\nalso lives in a canvas artboard \u2014 never move a mockup out of the canvas.\n\n**Legacy kit tree.** Older plans set a `screen` array of `{ el, ...props }` kit\nnodes instead of `html`; the renderer still accepts and displays it, but new\nplans emit `html`. Do not author fresh kit-tree screens - write the HTML mockup\ninstead. Likewise, old or imported plans may carry coordinate-based regions or\nfree-float x/y on notes; those are legacy escape hatches the renderer still\nshows but you must never produce. The `surface` drives each artboard's aspect\nand footprint, and the gutter parks notes by `targetId` + `placement`. The only\nnew-plan coordinate exception is deliberate board-level artboard `x`/`y` for\nmulti-lane mixed-surface canvases; never supply artboard width/height, note\ncoordinates, or wireframe-internal coordinates.\n\n<!-- SHARED-CORE:canvas-surface END -->\n\n## Document Quality Core\n\nThis section is shared, word for word, by `/visual-plan` and `/ui-plan`. It is\nthe single source of truth for the document below the canvas. Do not paraphrase\nit per command.\n\n<!-- SHARED-CORE:document-quality START -->\n\n**The document is a serious technical plan, not marketing.** Write it the way a\nstrong Claude or Codex implementation plan reads: outcome-first, prose-first,\nself-contained, and specific. State the objective and what \"done\" means, the\nscope and non-goals, the proposed approach with the key decisions and their\nrationale, ordered steps that name real files, symbols, actions, and data\nshapes, the risks, and a closing verification step (tests, build, or a checkable\nbehavior). Replace vague prose with specifics; never ship a step like \"make it\nwork.\" No hero art, gradients, logos, nav bars, slogans, value props, giant\nlanding-page headings, or marketing cards unless the user explicitly asks.\n\n**When top visuals exist, they and the document never duplicate each other.**\nFor UI work, the UI story lives in the top visual surface: canvas artboards for\nstatic inspection, plus prototype tabs when the flow should be functional. The\ndocument carries the technical depth the visuals cannot show \u2014 concrete\nfile/symbol maps, API and data contracts, code snippets, migration or\nimplementation phases, risks, and validation. For architecture/code reviews,\ninvert that: the document is the visual surface, and each recommendation should\ncarry its own nearby inline `diagram` / `data-model` block plus file evidence\nand terse Problem/Solution/Why text. For architecture/code diagrams, prefer\nstandard two-dimensional layouts: paired before/after panels, layered diagrams,\nswimlanes, dependency maps, matrices, or grouped regions. Do not default to\nleft-to-right chains; use a line only when the relationship is truly a sequence.\nUse native `diagram` blocks with `data.html` / `data.css` for these richer\nlayouts; the fragment may use semantic HTML and inline SVG, and the renderer\napplies the viewer's sketch/clean style. Leave room for the sketch font: keep\nlabels short, give nodes generous width, and place boundary/annotation labels in\nunused space instead of over nodes. For small text/SVG changes to an existing\nHTML diagram, use `patch-diagram-html` with a unique `find`/`replace` snippet\ninstead of resending the whole `data.html` string. Legacy `nodes` / `edges` are\nonly for tiny previews or genuinely linear step flows. Repeat a wireframe in the document only\nfor a genuinely new detail view or comparison. Skip the visual surface entirely\nfor non-visual work and write a clean rich document. For a simple binary UI\nvisual choice, show the two directions in the canvas only; do not repeat the\nsame options as body wireframes, a `decision` block, or prose. Put the actual\nchoice in the bottom \"Open Questions\" form.\n\n**Use the right block, and make it carry substance.** For the authoritative,\nmachine-checked list of block types and their data schemas, call `get-plan-blocks`\n\u2014 it returns the live registry vocabulary (type, MDX tag, placement, key fields)\nso you never emit a block the editor cannot render or round-trip:\n\n- `rich-text` for plan prose with real bold/italic/code/links and nested lists.\n- `implementation-map` / `code-tabs` for the file map: file path, the\n symbols/components to touch, the reason, risk/coordination notes, and a\n concise syntax-highlighted snippet of the code shape in every file tab \u2014\n never the whole file, never a prose-only file list. If the exact code is not\n known yet, include the smallest plausible planned shape or a short comment\n stub that names what needs to be filled in.\n- `decision` for two or three option cards with consequences. These are static\n records; do not style them like clickable tabs or chips unless the renderer\n truly supports changing the selection.\n- `columns` for side-by-side before/after or current/target comparisons where\n each side needs real nested blocks; label the columns clearly and avoid\n stacking comparison blocks vertically when parallel reading is the point.\n- `diagram` for two-dimensional architecture, dependency, data-flow, or state\n relationships, only when it clarifies something real. For architecture/code\n diagrams, prefer `data.html` / `data.css` with semantic HTML and inline SVG so\n the diagram can use panels, layers, matrices, arrows, annotations, and\n responsive layout directly. Author diagram HTML with renderer-owned primitives\n like `.diagram-panel`, `.diagram-card`, `.diagram-node`, `.diagram-box`,\n `.diagram-pill`, `.diagram-muted`, and `[data-rough]`; they map to the plan's\n Tailwind theme variables through `--wf-ink`, `--wf-muted`, `--wf-line`,\n `--wf-paper`, `--wf-card`, `--wf-accent`, `--wf-accent-soft`, `--wf-warn`, and\n `--wf-ok`, and switch to Virgil plus rough.js outlines in sketchy mode. Do not\n set `font-family` and do not hard-code hex, rgb, or hsl colors in diagram HTML\n or CSS. Use legacy `nodes` / `edges` only for small previews or truly\n sequential flows. In architecture/code plans, prefer a repeated section rhythm:\n recommendation title, confidence and category badges, code-path evidence, a\n local before/after or current/target spatial diagram, then concise\n Problem/Solution/Why text. Labels must not overlap nodes, connectors, or each\n other.\n- `tabs` for multiple states, directions, or comparisons. A tab that reveals\n only prose usually means the plan is under-specified \u2014 include a relevant\n visual unless the tab is intentionally document-only.\n- `table`, `checklist`, `callout` for scannable structure.\n\n**Open questions live at the bottom as a form when answers would change the\nplan.** Surface answerable unresolved decisions in a final `question-form`\nblock titled \"Open Questions\" so the renderer presents it as a distinct section.\nUse `single` or `multi` for clear choices, `freeform` for constraints,\n`recommended: true` for the default you would pick, and option `wireframe` /\n`diagram` previews only when the options are not already visible in the top\ncanvas. Keep non-answerable assumptions or risks as concise `callout` blocks in\nthe relevant section. Never bury a questions/decisions wall inside the plan\nnarrative, and never ask the same question in both a `decision` block and a\n`question-form`.\n\n**`custom-html` is a bounded escape hatch only** \u2014 a single complete fragment\ninside a block, never `html`/`head`/`body`/`script` tags, never a generic\nplaceholder, density demo, or proof that custom HTML works. Prefer the native\nblocks for normal plans. For architecture/code reviews, use `diagram`\n`data.html` / `data.css` for rich local HTML/SVG diagrams instead of\n`custom-html`. For UI/product work, `custom-html` is never the primary home for a\nrequested mockup, UI state, or visual comparison. If UI fidelity requires\nHTML/CSS, image capture, or real React/CSS, the product fix is canvas support\nfor that artifact type, not moving the mockup into the document.\n\n**Before handoff, open the plan and check it.** Fix overlap, excessive\nwhitespace, clipped fragments, misleading inactive controls, poor contrast, and\nunreadable diagrams before asking for approval.\n\n<!-- SHARED-CORE:document-quality END -->\n\n## Good vs. Bad Exemplar\n\n<!-- SHARED-CORE:exemplar START -->\n\n**GOOD.** A `/ui-plan` for a todo app: a canvas with a `desktop` artboard whose\n`data.html` is a real flex layout \u2014 a sidebar of links (`Inbox 12`, `Today 4`,\n`Done`), a main column with an `<h1>Today</h1>`, accent `.wf-pill`s for the\nfilters, a muted section label `OVERDUE`, and `.wf-card` task rows carrying real\ntitles, due dates, and a primary `button.primary` \u2014 styled only through bare\nelements, helper classes, and `--wf-*` tokens, so the renderer applies the\ncorrect desktop footprint, theme, and one subtle whole-frame wobble. Plain-text\ndesigner notes sit spaced off the frame, pointing only at the controls that need\nexplanation. Below it, a Claude/Codex-grade document: objective and\ndone-criteria, an `implementation-map` naming the real components and actions\nwith short highlighted snippets, a `decision` card weighing two real approaches,\nand a validation step \u2014 none of it repeating the canvas. If the task also\nchanges a multi-step completion flow, the same top area includes a Prototype tab\nwhose screens use the same labels and states as the canvas artboards, with\n`data-goto` controls for the sequence. This is the bar.\n\n**GOOD.** A `/visual-plan` for a backend architecture review: no top canvas.\nThe document opens with context and a legend, then repeats recommendation cards:\ntitle, confidence/category badges, a monospace grid of real file paths, one\ninline two-dimensional before/after or layered architecture diagram, and terse\nProblem/Solution/Why bullets using the codebase's vocabulary. The diagram uses\nspace to show boundaries, layers, and ownership; it is not a default\nleft-to-right chain. The plan ends with a top recommendation and a bottom\nquestion-form only if the next architecture direction is genuinely open. This is\nbetter than a top canvas because each diagram is local to the claim it supports.\n\n**BAD.** A `data.html` with hard-coded hex colors, a `font-family`, or fixed\npixel width/height; gray placeholder bars \"insinuating\" text on a non-skeleton\nframe; a forced desktop + mobile pair for a popover; floating bordered\nannotation cards hugging the frames; a fresh hand-authored kit-tree `screen`\ninstead of `html`; a multi-step UI flow with only static frames and no prototype\ntab; a mockup escaped into a document `custom-html` block; and a marketing-style\ndocument with a hero heading and value props that just restates what the canvas\nalready shows. Also bad: an architecture-only plan forced into a top canvas of\nlabeled boxes with overlapping text, where the actual code evidence and\nrecommendations live elsewhere. Never produce this.\n\n<!-- SHARED-CORE:exemplar END -->\n\n## Tool Guidance\n\n- `create-visual-plan`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing `planText`; `content` may include no\n visual surface, canvas only, or canvas + prototype.\n- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.\n- `create-prototype-plan`: start a prototype-first plan with a functional top\n review surface.\n- `create-plan-design`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only for the explicit `/visual-questions`\n command, not as `/visual-plan` preflight.\n- `update-visual-plan`: revise content, status, or comments; prefer\n `contentPatches` over regenerating the whole plan.\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: read the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and\nauthenticates it in the same step (a one-time browser sign-in at setup \u2014 this is\nintended), so the first tool call does not hit an OAuth wall:\n\n```bash\nagent-native skills add visual-plan\n```\n\nAfter that, `/visual-plan` (and `/visual-recap`, `/ui-plan`,\n`/prototype-plan`, `/plan-design`, `/visual-questions`) generate a plan and open\nthe editor. Pass `--no-connect` to\nregister the connector without authenticating, then run\n`agent-native connect https://plan.agent-native.com` whenever you are ready.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`,\ndo not keep retrying the tool. Authenticate the connector with\n`agent-native connect https://plan.agent-native.com` (OAuth-capable hosts can\ninstead re-run /mcp and choose Authenticate), then continue once the connector\nis available.\n\nHosted default: connect `https://plan.agent-native.com/_agent-native/mcp`. Do\nnot put shared secrets in skill files.\n";
|
|
8
8
|
export declare const UI_PLAN_SKILL_MD = "---\nname: ui-plan\ndescription: >-\n Use Agent-Native Plans for UI-first planning with an optional top pan/zoom\n wireframe canvas, a refined Notion-like document, rich tabs, diagrams,\n comments, drawing, and agent handoff.\nmetadata:\n visibility: exported\n---\n\n# UI Plan\n\nUse `/ui-plan` when the task is primarily about product UI, user flows,\ninteraction details, component layout, or visual direction. The reviewable UI\ncomes first; implementation detail comes after the user has something concrete to\nreact to.\n\n`/visual-plan` remains the general command for architecture, backend, refactors,\nand mixed work. Use `/prototype-plan` when the UI review needs a functional live\nprototype instead of static screens. Use `/plan-design` when polish, brand, or\nvisual fidelity are material to the decision. Use `/visual-questions` only when\nthe user explicitly wants visual intake before planning. Use `/visual-plan` when\na text plan already exists and should become the source material for the review.\n\n## Plan Discipline\n\n- **Gate hard.** Use a UI plan when the surface is new, ambiguous, spans several\n screens or states, or the direction needs agreement before coding. Skip it for\n cosmetic one-liners \u2014 a color, a label, a spacing tweak \u2014 and just make the\n change. Never ship a single-step or filler plan.\n- **Research before you draft.** Read the real components, routes, and design\n tokens first; ground every mockup and the file map in actual files and symbols.\n Delegate wide exploration to a sub-agent when the surface is large.\n- **Planning is read-only.** Make no source edits while building or reviewing.\n Start editing only after the user approves the UI direction.\n- **Clarify vs. assume.** Do not ask how to build the UI \u2014 present the direction\n and options as mockups and tabs. Ask a clarifying question only when an\n ambiguity would change the design; use the host agent's normal\n ask-user-question flow and batch 2-4 before finalizing. Do not call\n `create-visual-questions` from `/ui-plan`; keep answerable follow-up inside\n the same plan as a bottom `question-form` Open Questions block. Otherwise\n state the assumption in the plan and proceed.\n- **The plan is the approval gate.** Ask the user to review and approve the UI\n direction before you write code, and name the files/areas the work touches.\n\n## UI-First Workflow\n\n1. Follow the host agent's normal planning flow: inspect the codebase, gather\n the UI/component context needed, and ask native clarifying questions as needed\n before generating the plan.\n2. Call `create-ui-plan` with a UI-specific title, brief, source, repo path, and\n structured `content`. The canvas comes first, the document second.\n3. Compose the top canvas from the kit (see the cores below): the key artboards\n with real product content, designer notes, and connectors only for real\n sequences. Skip the canvas when wireframes would not clarify the work.\n4. Continue below as a concise technical document that stays close to the\n Markdown plan the agent would normally output \u2014 not a second copy of the\n canvas \u2014 covering concrete files, contracts, phases, risks, and validation.\n5. Call `get-plan-feedback` before implementation, after review, after a long\n pause, and before the final response. Treat `anchorDetails`, resolver intent,\n recent review events, and any focused screenshots from browser handoff as the\n source of truth for exactly what changed and exactly what each UI comment\n points at. Apply changes with `update-visual-plan`, preferring\n `contentPatches` for one frame, annotation, node, tab, or block. When the\n user wants source-control friendly edits, use `patch-visual-plan-source`\n against the MDX files instead of regenerating the plan.\n\n## Agent Handoff\n\nAfter the canvas and document, add a short handoff that names the chosen UI\ndirection, unresolved visual questions, and feedback that must be read before\ncode changes. Never claim feedback has been applied until `get-plan-feedback` or\nthe user has supplied it.\n\n## Wireframe & Canvas Core\n\nThis section is shared by `/visual-plan` and `/ui-plan`, and is the single\nsource of truth for how wireframes and the canvas work. The wireframe-quality\nrules below are additionally shared, word for word, with `/visual-recap`; the\ncanvas/artboard mechanics apply only to `/visual-plan` and `/ui-plan`. Do not\nparaphrase any of it per command.\n\n<!-- SHARED-CORE:wireframe-quality START -->\n\n**A wireframe is an HTML mockup. The renderer owns the look; you write the\ncontent.** Set `data.html` to a self-contained, semantic HTML fragment of the\nscreen and set `data.surface`. The renderer owns the surface footprint/aspect,\nthe dark/light theme, the hand-drawn font, and the rough.js sketch overlay \u2014 you\nnever write `<html>`/`<body>`/`<script>`/`<style>` tags, font-family, hex colors,\nor any width/height/coordinates. You write real HTML layout and real product\ncontent; the renderer styles and roughens it.\n\n**A wireframe block's data is an HTML screen plus a surface:**\n\n```json\n{\n \"surface\": \"browser\",\n \"html\": \"<div style=\\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\\"><h1>Sign in</h1><p class=\\\"wf-muted\\\">Use your work email to continue.</p><div class=\\\"wf-card\\\" style=\\\"display:flex;flex-direction:column;gap:10px\\\"><label>Email<input value=\\\"jane@acme.co\\\" /></label><label>Password<input value=\\\"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\\\" /></label><label style=\\\"display:flex;align-items:center;gap:8px\\\"><input type=\\\"checkbox\\\" checked /> Remember me</label><button class=\\\"primary\\\">Sign in</button></div><a href=\\\"#\\\">Forgot password?</a></div>\"\n}\n```\n\n**Write PLAIN semantic HTML and let the renderer style it.** Bare elements\n(`h1`/`h2`/`h3`, `p`, `button`, `input`, `<input type=\"checkbox\">`, `a`, `hr`)\nare auto-themed \u2014 no classes needed. Helper classes carry the rest:\n\n- `.wf-card` / `.wf-box` \u2014 a bordered, padded container (a panel, a list item).\n- `.wf-pill` / `.wf-chip` \u2014 a rounded tag or filter; add `.accent`\n (`<span class=\"wf-pill accent\">`) for the accent-filled variant.\n- `.wf-muted` \u2014 secondary/muted text (or use `<small>`).\n- `button.primary` or any element with `[data-primary]` \u2014 the accent-filled\n primary button.\n\n**Use the `--wf-*` tokens for any custom color, never hex.** The renderer flips\nthese on light/dark, so reading them is what keeps a mockup correct in both\nthemes. For any inline border, background, or text color, reference a token:\n`style=\"border:1.4px solid var(--wf-line)\"`. The tokens are `--wf-ink` (text),\n`--wf-muted` (secondary text), `--wf-line` (borders/dividers), `--wf-paper`\n(page background), `--wf-card` (raised surface), `--wf-accent` /\n`--wf-accent-fg` / `--wf-accent-soft` (brand action), `--wf-warn`, `--wf-ok`,\nand `--wf-radius`. Never hard-code a hex color and never set `font-family` \u2014 the\nrenderer owns the sketch/clean font.\n\n**Lay out with inline `style` flex/grid.** You write the real layout \u2014\n`display:flex; flex-direction:column; gap:10px; padding:16px` and so on \u2014 and the\nrenderer never repositions anything. Compose the actual product: reproduce the\ncurrent screen, then show the modification. Real labels, real counts, real dates,\nreal button text grounded in the screen you read; not lorem or gray bars.\n\n**Surface presets \u2014 match the real footprint, never default to desktop+mobile.**\nPick the `surface` that matches what the user will actually see:\n\n- `browser`: a web page that needs a browser chrome frame around it.\n- `desktop`: a full desktop app page or app shell.\n- `mobile`: a phone screen, only when the work is genuinely mobile.\n- `popover`: a small floating menu, dropdown, or inline popover.\n- `panel`: a side panel, inspector, or sidebar widget.\n\nA sidebar popover renders as a small surface, not a desktop page and a phone\nframe. Do not emit `desktop` + `mobile` variants unless responsive behavior\nactually changes the layout. For a component or widget, show one broader\napp-context frame only when placement affects understanding, then the focused\ncomponent states.\n\n**Model the actual component shell for small surfaces.** A rendered UI change\nbelongs in a wireframe; reserve `diagram` for architecture, dependency, state,\nor data-flow relationships. Popovers, dropdown menus, command palettes, and\ncontext menus use `surface: \"popover\"` unless the surrounding page placement is\nthe point of the change. Dialogs, sheets, inspectors, sidebars, and long\nproperty panels use the matching `panel` / `desktop` surface as appropriate.\nShow the real chrome: trigger or anchor when it matters, title/header row,\ntop-right actions, separators, fields, options, selected states, body content,\nand footer actions that are visible in the workflow.\n\n**Modify, don't redesign.** When the task changes an existing screen, reproduce\nthe current screen's real layout and footprint FIRST, then change only the delta\nand call it out with a single annotation. Do not restack the page into a new\nlayout. For net-new surfaces, compose from the real app shell.\n\n**Classify mockup scope before implementation.** Before turning a plan mockup\ninto source code, decide whether each artboard represents the whole page/app\nshell, a route body inside an existing shell, or a component/sub-surface. If an\nartboard includes navigation, sidebars, auth banners, or a signup/login form,\nmap those pieces to the real shared shell/auth components instead of nesting the\nentire mockup inside the current page. When a mockup references the product's\nstandard signup/login page, find and reuse that existing implementation; do not\napproximate it from the wireframe.\n\n**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a\npopover, menu, dialog, toast), show the full screen once, then add a small\nseparate artboard whose `html` contains ONLY that sub-surface \u2014 do not re-draw\nthe whole page around it, and do not scale a duplicate up. Pick the matching\n`surface` (e.g. `popover`) so the footprint is right; never widen a popover to\npage width.\n\n**Loading / skeleton states.** Set `data.skeleton: true` on the wireframe and\nfill the `html` with neutral, textless placeholder geometry \u2014 boxes and bars\nbuilt as `<div>`s with `background:var(--wf-line)` and explicit heights/widths,\nno labels or copy. The renderer drops borders, sketch, and color into the\nskeleton register automatically. Never escape to a `custom-html` document block\nto fake a loader.\n\n**Editing an existing mockup.** To change one element, text, or color in an\nexisting html mockup, do NOT regenerate the frame \u2014 call `update-visual-plan`\nwith `contentPatches: [{ op: \"patch-wireframe-html\", blockId, edits: [{ find,\nreplace }] }]`. Each `find` is a unique snippet of the current html (read it\nfirst with `get-visual-plan`); set `all: true` on an edit to replace every\noccurrence. The result is re-sanitized.\n\n**Treat the wireframe border as part of the visible design.** Always wrap HTML\nwireframe content in a root container with real inner padding before drawing\ncards, fields, pills, labels, or controls. Use at least 14-16px of padding,\n`box-sizing: border-box`, `height: 100%`, and `gap` between child rows so the\nfirst row never sits flush against the screen border. Keep text away from\nborders: every container, field, button, menu item, and annotation needs enough\npadding and line-height to read cleanly in the rendered Plan view.\n\n**Lay out children safely so they never collide.** Use HTML flex/grid with\n`gap`, `min-width: 0`, and sensible overflow. Avoid negative margins, absolute\npositioning, or fixed child widths that can collide when the renderer switches\nbetween light/dark, sketch/clean, or different zoom levels.\n\n**Do not wrap intentionally single-line labels.** For tab rails, breadcrumbs,\nfile chips, code filenames, and other deliberately single-line labels, do not\nlet long text wrap. It is acceptable and usually preferable to use\n`white-space: nowrap`, `overflow: hidden`, and `text-overflow: ellipsis` (or\nabstract bars) so the wireframe demonstrates the actual layout behavior instead\nof producing ugly vertical text. Use horizontally scrollable or clipped rails\nfor overflow.\n\n**Fill the frame; keep labels short.** Each artboard is a fixed-size surface \u2014 compose enough realistic HTML to fill it top to bottom with even vertical rhythm; never leave a large empty band. On desktop/app-shell sidebars, let the nav stack flex to fill (`flex:1`) and add any persistent bottom action/status after it so the rail reads complete in taller frames. On mobile especially, flow real rows down the whole screen (status bar, header, then list/detail content) rather than a header floating above a gap. Keep every label short enough to sit on one line within its column \u2014 shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).\n\n**Before / after must be comparable.** When showing a state change, preserve the\nunchanged controls in both states so the reviewer can see exactly what moved or\nappeared; do not show an added control as a generic box floating elsewhere in\nthe surface. Place the new/changed affordance where the implementation puts it \u2014\nfor example, a new `Edit with AI` action in a popover header belongs in the\ntop-right header slot, aligned with the title, not in the body or footer. Use\nthe same frame size, scale, outer padding, border radius, and visual density on\nboth sides unless the change itself alters those properties, and let the frame\nheight fit the content rather than leaving a tall empty lower half. Choose the\nbefore/after layout by geometry: use a `columns` block labeled `Before`/`After`\nwhen each state stays legible side by side; stack `Before` then `After`\nvertically in normal document flow when the surface is very wide, when\nfull-width scanning matters, or when columns would shrink or crop the detail.\nLabel each state visibly (for example, a header pill) so cropped screenshots\nstay unambiguous.\n\n**Good example \u2014 a contacts list, surface `browser`.** A small, real screen\ncomposed from the helper classes and tokens, layout in inline flex, no fonts or\nhex colors:\n\n```html\n<div\n style=\"display:flex;flex-direction:column;gap:12px;padding:16px;height:100%\"\n>\n <div style=\"display:flex;align-items:center;justify-content:space-between\">\n <h1>Contacts</h1>\n <button class=\"primary\">New contact</button>\n </div>\n <div style=\"display:flex;gap:6px\">\n <span class=\"wf-pill accent\">All 128</span>\n <span class=\"wf-pill\">Favorites</span>\n <span class=\"wf-pill\">Archived</span>\n </div>\n <div\n class=\"wf-card\"\n style=\"display:flex;flex-direction:column;gap:0;padding:0\"\n >\n <div\n style=\"display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)\"\n >\n <div\n style=\"width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)\"\n ></div>\n <div style=\"flex:1\">\n <strong>Jane Cooper</strong><br /><small>jane@acme.co</small>\n </div>\n <span class=\"wf-pill\">Lead</span>\n </div>\n <div style=\"display:flex;align-items:center;gap:10px;padding:10px 12px\">\n <div\n style=\"width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)\"\n ></div>\n <div style=\"flex:1\">\n <strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>\n </div>\n <span class=\"wf-pill\">Customer</span>\n </div>\n </div>\n</div>\n```\n\n<!-- SHARED-CORE:wireframe-quality END -->\n\n<!-- SHARED-CORE:canvas-surface START -->\n\n**Artboard placement is locked by the `surface`, not by coordinates.** The\nsurface locks the footprint and aspect; never set artboard width/height and\nnever use coordinates inside the wireframe HTML. Let canvas auto-placement\nhandle simple one-row boards. For mixed-footprint canvases, board-level artboard\n`x`/`y` is allowed and expected when it creates clear lanes.\n\n**Lay out mixed canvases in lanes.** When a canvas contains broad browser /\ndesktop frames plus compact `mobile`, `popover`, or `panel` surfaces, do not put\neverything in one horizontal strip. Use board-level artboard `x`/`y` to reserve\nlanes with generous empty space: main flow on one row, compact surfaces in their\nown column or row, and loading/error states in a lower row. Keep at least 96px\nbetween rendered artboard rectangles plus room for annotation gutters. Connect\nonly neighboring steps; never draw a long connector that skips across unrelated\nframes. Before handoff, inspect the top canvas at default zoom and move any\nframe whose label, connector, or annotation crosses another frame.\n\n**Canvas annotations are designer notes on the artboard.** When a top canvas is\npresent, sprinkle Figma-style notes near the frames they explain: a short\nheading, supporting text, and bullets \u2014 plain text layers, never bordered or\nshadowed cards, and never a box around a frame. The renderer spaces notes away\nfrom frames, so place each note by the frame it describes. Use an arrow only to\npoint at one specific control or transition; for a broad frame-level note, write\ntext beside the frame with no connector. Connectors are for real sequences only \u2014\nnever fake \"Step 1 \u2192 Step 2\" lines between independent states.\n\n**Do not create overlapping annotations.** Anchor each ordinary note to the\nframe it explains with `targetId` + `placement` (top/right/bottom/left), and\nomit `type` or use `type: \"note\"`. The renderer parks notes in a gutter beside\nthe frame and lays them out automatically. Do not use `type: \"callout\"`,\n`type: \"text\"`, `type: \"arrow\"`, x/y, or points for ordinary notes; those are\nfreeform review-markup layers and must be reserved for intentional markup in\nopen canvas space. Reserve arrows for a note that must point at one specific\ncontrol inside a frame; a note that simply sits beside its frame needs no arrow.\n\n**Patching.** Edit one wireframe, canvas annotation, diagram, or block with targeted `contentPatches`\n(for example `patch-wireframe-html`, `patch-diagram-html`, `update-block`,\n`replace-blocks`, `update-canvas-annotation`) rather\nthan regenerating the whole plan. `contentPatches` are part of the public MCP\naction schema, so Claude Code, Codex, Cursor, and other hosts can make surgical\nedits. If an agent is working from exported source files, use\n`read-visual-plan-source` / `patch-visual-plan-source`: `plan.mdx` holds\nfrontmatter plus markdown/document blocks, `canvas.mdx` holds\n`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>`, and the\npatch action normalizes the MDX back into the same JSON runtime model. JSON is\nthe canonical runtime shape; MDX is the repo-friendly authoring/export surface.\nIn the browser, humans edit `rich-text` prose inline; agents should still use\n`update-rich-text` content patches or source patches for prose, and use\ncomments/structured patches for canvas, artboard, wireframe, and diagram edits.\n\n**Never emit a titled artboard with no interior wireframe content.** Every artboard\nyou place on the canvas must carry an `html` wireframe or reference a wireframe\nblock via `blockId`; when using `blockId`, the referenced `wireframe` /\n`legacy-wireframe` block must remain in the plan. If you remove a duplicate\nwireframe from the document body, first move its `data` inline onto the\ncorresponding `content.canvas.frames[*].wireframe` / `legacyWireframe`. A\nlabel-only frame or a frame pointing at a deleted block renders empty and is\nrejected at parse time. If you only have a title, write it as a section header or\nannotation, not an empty artboard.\n\n**UI mockups belong in the top visual review area.** Static UI/product visuals\nlive on the canvas; multi-step UI flows get both canvas wireframes and a\nprototype. When the user asks for a mockup, UI state, loading state, layout,\nscreen, or visual comparison, make the canvas the primary home for that static\nvisual. When the user asks for a prototype or the plan contains a sequence the\nreviewer must feel, keep the canvas artboards and add `content.prototype` so the\ntop surface shows Wireframes / Prototype tabs. Architecture/code diagrams are\ndifferent: keep them inline in the document, close to the recommendation they\nsupport, unless the user explicitly asks for a spatial board. Document blocks\ncan explain, compare, or map implementation, but they should not host the\nprimary UI mockup or prototype just because `custom-html`, screenshots, or prose\nare easier to produce. If the canvas/prototype surface cannot represent the\nrequested UI fidelity, still keep the closest top-surface representation and\ncall out or extend the needed renderer capability. A skeleton/loading mockup\nalso lives in a canvas artboard \u2014 never move a mockup out of the canvas.\n\n**Legacy kit tree.** Older plans set a `screen` array of `{ el, ...props }` kit\nnodes instead of `html`; the renderer still accepts and displays it, but new\nplans emit `html`. Do not author fresh kit-tree screens - write the HTML mockup\ninstead. Likewise, old or imported plans may carry coordinate-based regions or\nfree-float x/y on notes; those are legacy escape hatches the renderer still\nshows but you must never produce. The `surface` drives each artboard's aspect\nand footprint, and the gutter parks notes by `targetId` + `placement`. The only\nnew-plan coordinate exception is deliberate board-level artboard `x`/`y` for\nmulti-lane mixed-surface canvases; never supply artboard width/height, note\ncoordinates, or wireframe-internal coordinates.\n\n<!-- SHARED-CORE:canvas-surface END -->\n\n## Document Quality Core\n\nThis section is shared, word for word, by `/visual-plan` and `/ui-plan`. It is\nthe single source of truth for the document below the canvas. Do not paraphrase\nit per command.\n\n<!-- SHARED-CORE:document-quality START -->\n\n**The document is a serious technical plan, not marketing.** Write it the way a\nstrong Claude or Codex implementation plan reads: outcome-first, prose-first,\nself-contained, and specific. State the objective and what \"done\" means, the\nscope and non-goals, the proposed approach with the key decisions and their\nrationale, ordered steps that name real files, symbols, actions, and data\nshapes, the risks, and a closing verification step (tests, build, or a checkable\nbehavior). Replace vague prose with specifics; never ship a step like \"make it\nwork.\" No hero art, gradients, logos, nav bars, slogans, value props, giant\nlanding-page headings, or marketing cards unless the user explicitly asks.\n\n**When top visuals exist, they and the document never duplicate each other.**\nFor UI work, the UI story lives in the top visual surface: canvas artboards for\nstatic inspection, plus prototype tabs when the flow should be functional. The\ndocument carries the technical depth the visuals cannot show \u2014 concrete\nfile/symbol maps, API and data contracts, code snippets, migration or\nimplementation phases, risks, and validation. For architecture/code reviews,\ninvert that: the document is the visual surface, and each recommendation should\ncarry its own nearby inline `diagram` / `data-model` block plus file evidence\nand terse Problem/Solution/Why text. For architecture/code diagrams, prefer\nstandard two-dimensional layouts: paired before/after panels, layered diagrams,\nswimlanes, dependency maps, matrices, or grouped regions. Do not default to\nleft-to-right chains; use a line only when the relationship is truly a sequence.\nUse native `diagram` blocks with `data.html` / `data.css` for these richer\nlayouts; the fragment may use semantic HTML and inline SVG, and the renderer\napplies the viewer's sketch/clean style. Leave room for the sketch font: keep\nlabels short, give nodes generous width, and place boundary/annotation labels in\nunused space instead of over nodes. For small text/SVG changes to an existing\nHTML diagram, use `patch-diagram-html` with a unique `find`/`replace` snippet\ninstead of resending the whole `data.html` string. Legacy `nodes` / `edges` are\nonly for tiny previews or genuinely linear step flows. Repeat a wireframe in the document only\nfor a genuinely new detail view or comparison. Skip the visual surface entirely\nfor non-visual work and write a clean rich document. For a simple binary UI\nvisual choice, show the two directions in the canvas only; do not repeat the\nsame options as body wireframes, a `decision` block, or prose. Put the actual\nchoice in the bottom \"Open Questions\" form.\n\n**Use the right block, and make it carry substance.** For the authoritative,\nmachine-checked list of block types and their data schemas, call `get-plan-blocks`\n\u2014 it returns the live registry vocabulary (type, MDX tag, placement, key fields)\nso you never emit a block the editor cannot render or round-trip:\n\n- `rich-text` for plan prose with real bold/italic/code/links and nested lists.\n- `implementation-map` / `code-tabs` for the file map: file path, the\n symbols/components to touch, the reason, risk/coordination notes, and a\n concise syntax-highlighted snippet of the code shape in every file tab \u2014\n never the whole file, never a prose-only file list. If the exact code is not\n known yet, include the smallest plausible planned shape or a short comment\n stub that names what needs to be filled in.\n- `decision` for two or three option cards with consequences. These are static\n records; do not style them like clickable tabs or chips unless the renderer\n truly supports changing the selection.\n- `columns` for side-by-side before/after or current/target comparisons where\n each side needs real nested blocks; label the columns clearly and avoid\n stacking comparison blocks vertically when parallel reading is the point.\n- `diagram` for two-dimensional architecture, dependency, data-flow, or state\n relationships, only when it clarifies something real. For architecture/code\n diagrams, prefer `data.html` / `data.css` with semantic HTML and inline SVG so\n the diagram can use panels, layers, matrices, arrows, annotations, and\n responsive layout directly. Author diagram HTML with renderer-owned primitives\n like `.diagram-panel`, `.diagram-card`, `.diagram-node`, `.diagram-box`,\n `.diagram-pill`, `.diagram-muted`, and `[data-rough]`; they map to the plan's\n Tailwind theme variables through `--wf-ink`, `--wf-muted`, `--wf-line`,\n `--wf-paper`, `--wf-card`, `--wf-accent`, `--wf-accent-soft`, `--wf-warn`, and\n `--wf-ok`, and switch to Virgil plus rough.js outlines in sketchy mode. Do not\n set `font-family` and do not hard-code hex, rgb, or hsl colors in diagram HTML\n or CSS. Use legacy `nodes` / `edges` only for small previews or truly\n sequential flows. In architecture/code plans, prefer a repeated section rhythm:\n recommendation title, confidence and category badges, code-path evidence, a\n local before/after or current/target spatial diagram, then concise\n Problem/Solution/Why text. Labels must not overlap nodes, connectors, or each\n other.\n- `tabs` for multiple states, directions, or comparisons. A tab that reveals\n only prose usually means the plan is under-specified \u2014 include a relevant\n visual unless the tab is intentionally document-only.\n- `table`, `checklist`, `callout` for scannable structure.\n\n**Open questions live at the bottom as a form when answers would change the\nplan.** Surface answerable unresolved decisions in a final `question-form`\nblock titled \"Open Questions\" so the renderer presents it as a distinct section.\nUse `single` or `multi` for clear choices, `freeform` for constraints,\n`recommended: true` for the default you would pick, and option `wireframe` /\n`diagram` previews only when the options are not already visible in the top\ncanvas. Keep non-answerable assumptions or risks as concise `callout` blocks in\nthe relevant section. Never bury a questions/decisions wall inside the plan\nnarrative, and never ask the same question in both a `decision` block and a\n`question-form`.\n\n**`custom-html` is a bounded escape hatch only** \u2014 a single complete fragment\ninside a block, never `html`/`head`/`body`/`script` tags, never a generic\nplaceholder, density demo, or proof that custom HTML works. Prefer the native\nblocks for normal plans. For architecture/code reviews, use `diagram`\n`data.html` / `data.css` for rich local HTML/SVG diagrams instead of\n`custom-html`. For UI/product work, `custom-html` is never the primary home for a\nrequested mockup, UI state, or visual comparison. If UI fidelity requires\nHTML/CSS, image capture, or real React/CSS, the product fix is canvas support\nfor that artifact type, not moving the mockup into the document.\n\n**Before handoff, open the plan and check it.** Fix overlap, excessive\nwhitespace, clipped fragments, misleading inactive controls, poor contrast, and\nunreadable diagrams before asking for approval.\n\n<!-- SHARED-CORE:document-quality END -->\n\n## Good vs. Bad Exemplar\n\n<!-- SHARED-CORE:exemplar START -->\n\n**GOOD.** A `/ui-plan` for a todo app: a canvas with a `desktop` artboard whose\n`data.html` is a real flex layout \u2014 a sidebar of links (`Inbox 12`, `Today 4`,\n`Done`), a main column with an `<h1>Today</h1>`, accent `.wf-pill`s for the\nfilters, a muted section label `OVERDUE`, and `.wf-card` task rows carrying real\ntitles, due dates, and a primary `button.primary` \u2014 styled only through bare\nelements, helper classes, and `--wf-*` tokens, so the renderer applies the\ncorrect desktop footprint, theme, and one subtle whole-frame wobble. Plain-text\ndesigner notes sit spaced off the frame, pointing only at the controls that need\nexplanation. Below it, a Claude/Codex-grade document: objective and\ndone-criteria, an `implementation-map` naming the real components and actions\nwith short highlighted snippets, a `decision` card weighing two real approaches,\nand a validation step \u2014 none of it repeating the canvas. If the task also\nchanges a multi-step completion flow, the same top area includes a Prototype tab\nwhose screens use the same labels and states as the canvas artboards, with\n`data-goto` controls for the sequence. This is the bar.\n\n**GOOD.** A `/visual-plan` for a backend architecture review: no top canvas.\nThe document opens with context and a legend, then repeats recommendation cards:\ntitle, confidence/category badges, a monospace grid of real file paths, one\ninline two-dimensional before/after or layered architecture diagram, and terse\nProblem/Solution/Why bullets using the codebase's vocabulary. The diagram uses\nspace to show boundaries, layers, and ownership; it is not a default\nleft-to-right chain. The plan ends with a top recommendation and a bottom\nquestion-form only if the next architecture direction is genuinely open. This is\nbetter than a top canvas because each diagram is local to the claim it supports.\n\n**BAD.** A `data.html` with hard-coded hex colors, a `font-family`, or fixed\npixel width/height; gray placeholder bars \"insinuating\" text on a non-skeleton\nframe; a forced desktop + mobile pair for a popover; floating bordered\nannotation cards hugging the frames; a fresh hand-authored kit-tree `screen`\ninstead of `html`; a multi-step UI flow with only static frames and no prototype\ntab; a mockup escaped into a document `custom-html` block; and a marketing-style\ndocument with a hero heading and value props that just restates what the canvas\nalready shows. Also bad: an architecture-only plan forced into a top canvas of\nlabeled boxes with overlapping text, where the actual code evidence and\nrecommendations live elsewhere. Never produce this.\n\n<!-- SHARED-CORE:exemplar END -->\n\n## Tool Guidance\n\n- `create-ui-plan`: create the UI-first structured visual plan.\n- `create-prototype-plan`: create a prototype-first plan when UI review needs a\n functional live prototype.\n- `create-plan-design`: create a full-fidelity branded design plan when polish,\n brand, and detailed visual direction are primary review inputs.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only for the explicit `/visual-questions`\n command, not as `/ui-plan` preflight.\n- `update-visual-plan`: revise content, mockups, comments, or handoff notes;\n prefer targeted `contentPatches`.\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: inspect the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- `get-plan-feedback`: read unconsumed reviewer comments before coding; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and\nauthenticates it in the same step (a one-time browser sign-in at setup \u2014 this is\nintended), so the first tool call does not hit an OAuth wall:\n\n```bash\nagent-native skills add visual-plan\n```\n\nAfter that, `/visual-plan` (and `/visual-recap`, `/ui-plan`,\n`/prototype-plan`, `/plan-design`, `/visual-questions`) generate a plan and open\nthe editor. Pass `--no-connect` to\nregister the connector without authenticating, then run\n`agent-native connect https://plan.agent-native.com` whenever you are ready.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`,\ndo not keep retrying the tool. Authenticate the connector with\n`agent-native connect https://plan.agent-native.com` (OAuth-capable hosts can\ninstead re-run /mcp and choose Authenticate), then continue once the connector\nis available.\n\nHosted default: connect `https://plan.agent-native.com/_agent-native/mcp`. Do\nnot put shared secrets in skill files.\n";
|
|
9
9
|
export declare const PROTOTYPE_PLAN_SKILL_MD = "---\nname: prototype-plan\ndescription: >-\n Use Agent-Native Plans for /prototype-plan when work needs a functional\n prototype-first plan, static mocks, comments, review toggles, or conversion\n from a visual plan.\nmetadata:\n visibility: exported\n---\n\n# Prototype Plan\n\n`/prototype-plan` creates a plan whose primary review surface is a live,\nfunctional prototype above the document. Use it when the user needs to feel a\nflow, operate basic UI state, or comment on interaction before implementation\nhardens the decision.\n\n## Rule\n\nMake the prototype answer a concrete question. The plan should say what is being\ntested, show the functional prototype first, then keep static mocks and implementation\nnotes in the document below.\n\n## When To Use\n\nUse `/prototype-plan` when the user asks for a prototype, wants to click through\nand operate UI states, needs design review before code, wants comments pinned to\nlive screens, or asks to move a visual plan into a prototype.\n\nPrefer `/visual-plan` for architecture, data flow, or non-interactive planning.\nPrefer `/ui-plan` when static screen review is enough. Use `/visual-plan` first\nwhen the user hands you an existing Markdown/Codex/Claude plan that needs a\nvisual companion before becoming interactive.\n\n## Core Workflow\n\n1. Inspect the real codebase and decide the question the prototype should\n answer. Good examples: \"Does this onboarding flow feel short enough?\" or\n \"Which dashboard density should we implement?\"\n2. Call `create-prototype-plan` with a title, brief, and screen HTML. Default to\n one functional prototype screen when local UI behavior is enough; use 2-4\n screens only for true routes, steps, or materially different contexts. The\n returned plan opens with the prototype viewer on top and static mocks, flow\n diagram, implementation map, and verification below.\n3. Make controls actually work. Use the renderer's safe Alpine-like directives:\n `x-data`, `x-model`, `x-for`, `x-text`, `x-show`, `:class`, `@click`, and\n `@keydown.enter`. Use safe helper verbs such as `remove(list, item)`,\n `setAll(list, 'done', true)`, `removeWhere(list, 'done', true)`, and counters\n such as `count(list)`, `countWhere(list, 'done', true)`, and\n `remaining(list, 'done')` when they help. Use `data-goto=\"screen-id\"` only\n for true screen/route changes, not for every button press.\n4. Show important app feedback inside the prototype itself: selected filters,\n checked rows, typed drafts, validation messages, permissions, progress, or\n empty states.\n5. Surface the returned Plans link and ask the user to click through, comment on\n the prototype or static mocks, and approve the direction before code changes.\n6. Before implementing or revising, call `get-plan-feedback`. Treat prototype\n anchors, screenshots, and resolver intent as the source of truth.\n7. Update with `update-visual-plan` content patches. Use\n `patch-prototype-html`, `update-prototype-screen`, or `set-prototype` for\n targeted prototype edits instead of regenerating the whole plan.\n\n## Converting A Visual Plan\n\nWhen a visual plan already has HTML canvas wireframes, call\n`convert-visual-plan-to-prototype` with the plan id. This derives prototype\nscreens from the canvas frames, preserves the canvas/static mocks by default,\nand changes the top review surface to the prototype viewer.\n\nUse `removeCanvas: true` only when the user explicitly wants the old canvas\ngone. Otherwise keep static mocks available for source export and detailed\nreview.\n\n## Prototype Screen HTML\n\nWrite bounded semantic HTML fragments only:\n\n```html\n<div style=\"display:flex;flex-direction:column;gap:14px;padding:18px;height:100%\">\n <header style=\"display:flex;justify-content:space-between;gap:12px\">\n <div>\n <h1>Launch checklist</h1>\n <p class=\"wf-muted\">Reviewer can add, complete, filter, and remove tasks.</p>\n </div>\n <span class=\"wf-pill accent\">Live prototype</span>\n </header>\n <section\n class=\"wf-card\"\n x-data=\"{ draft: '', filter: 'all', todos: [{ text: 'Check copy', done: false }, { text: 'Confirm owner', done: true }] }\"\n style=\"display:flex;flex-direction:column;gap:10px\"\n >\n <div style=\"display:flex;gap:8px\">\n <input x-model=\"draft\" @keydown.enter=\"draft && todos.push({ text: draft, done: false }); draft = ''\" placeholder=\"Add task\" />\n <button class=\"primary\" @click=\"draft && todos.push({ text: draft, done: false }); draft = ''\">Add</button>\n </div>\n <div style=\"display:flex;gap:8px\">\n <button @click=\"filter = 'all'\" :class=\"{ primary: filter === 'all' }\">All</button>\n <button @click=\"filter = 'done'\" :class=\"{ primary: filter === 'done' }\">Done</button>\n <button @click=\"setAll(todos, 'done', true)\">Mark all done</button>\n </div>\n <p class=\"wf-muted\"><span x-text=\"remaining(todos, 'done')\"></span> open / <span x-text=\"count(todos)\"></span> total</p>\n <div\n class=\"wf-box\"\n x-for=\"todo in todos\"\n x-show=\"filter === 'all' || (filter === 'done' && todo.done)\"\n :class=\"{ 'is-done': todo.done }\"\n style=\"display:flex;justify-content:space-between;gap:10px\"\n >\n <label style=\"display:flex;gap:8px\"><input type=\"checkbox\" x-model=\"todo.done\" /><span x-text=\"todo.text\"></span></label>\n <button @click=\"remove(todos, todo)\">Remove</button>\n </div>\n <button @click=\"removeWhere(todos, 'done', true)\">Clear completed</button>\n </section>\n</div>\n```\n\nUse real labels, counts, dates, and controls grounded in the target app. Keep\nsurfaces honest: `browser` for web pages, `desktop` for app shells, `mobile`\nonly for real mobile work, `panel` for side panels, and `popover` for menus.\n\nDo not include `<html>`, `<body>`, `<script>`, `<style>`, browser `on*`\nhandler attributes such as `onclick`, fake APIs, raw secrets, or customer data.\nThe renderer owns sketchy/clean mode, theme, surface sizing, rough outlines, and\ncomment overlays.\n\n## Review Surface\n\nPrototype plans support:\n\n- real local controls through safe prototype directives\n- optional screen/route transitions from `data-goto`\n- rough vs clean mode through the shared wireframe toggle\n- dark vs light mode through the shared theme toggle\n- comment visibility from the prototype toolbar\n- Figma-style comments pinned directly on live prototype screens\n- a popout URL with `?prototype=1` for focused browser review\n- static wireframe mocks in the document body where they help implementation\n\n## Source Files\n\nRuntime JSON is canonical. Source export uses:\n\n- `plan.mdx` for document blocks\n- `prototype.mdx` for `<Prototype>`, `<PrototypeScreen>`, and\n `<PrototypeTransition>`\n- `canvas.mdx` for static mocks when a canvas is present\n- `.plan-state.json` for persisted viewport state\n\nPatch source with `patch-visual-plan-source` only when the user wants\nsource-control friendly edits. Patch runtime content when the user is simply\nreviewing and iterating.\n\n## Related Skills\n\n- `visual-plan`\n- `ui-plan`\n- `visual-questions`\n";
|
|
10
10
|
export declare const PLAN_DESIGN_SKILL_MD = "---\nname: plan-design\ndescription: >-\n Use Agent-Native Plans for full-fidelity UI design planning with a Design\n canvas tab and optional interactive Prototype tab before implementation.\nmetadata:\n visibility: exported\n---\n\n# Plan Design\n\nUse `/plan-design` when the user needs a high-fidelity product design before\nimplementation: polished branded screens, realistic content, visual direction,\nand interaction review. It is the full-fidelity companion to `/visual-plan` and\n`/prototype-plan`: the top review surface should show `Design` and, when the\nflow needs interaction, `Prototype`.\n\n## When To Use\n\nUse this for UI-heavy work where brand, visual hierarchy, polished layout, or\ninteraction feel are material to the decision. Skip it for small copy, spacing,\nor obvious component changes.\n\n## Research First\n\nBefore creating the plan:\n\n1. Inspect the real app shell, routes, components, CSS variables, Tailwind\n tokens, theme files, and any relevant screenshots.\n2. If `design.md` exists, treat it as the primary design brief and pass its\n important content into `create-plan-design.designMd`.\n3. If a `.fig` local-copy file or parsed brand kit is available, use the\n Design/brand-kit parsing actions from the app or shared tooling first, then\n pass the extracted token summary into `brandKit`.\n4. Parse existing codebase style info when possible: CSS custom properties,\n Tailwind config, global CSS, font declarations, spacing/radius tokens, and\n component conventions. Pass the compact evidence into `codebaseStyles`.\n5. Ground every screen in actual product content. Avoid lorem ipsum, generic\n marketing filler, and placeholder gray boxes unless designing an explicit\n loading state.\n\n## Create The Plan\n\nCall `create-plan-design` with:\n\n- `title`, `brief`, `repoPath`, and any `implementationNotes`.\n- `designMd`, `brandKit`, `codebaseStyles`, or `designNotes` when available.\n- `screens`: one to six full-fidelity HTML/CSS screen fragments. Each screen\n must include a bounded `html` fragment, optional scoped `css`, a `surface`,\n and stable `data-design-id` attributes on elements a reviewer might edit.\n- `transitions` only when the Prototype tab should support true screen/step\n navigation. Use `data-goto=\"screen-id\"` in the screen HTML for those controls.\n\nThe Design tab is the visual source of truth. The Prototype tab is for behavior\nand should reuse the same visual styling where practical. Do not create a\nseparate design direction in the prototype.\n\n## Full-Fidelity HTML Rules\n\n- Write bounded fragments only: no `<html>`, `<head>`, `<body>`, `<script>`,\n `<style>`, external imports, iframes, SVG, or executable URLs.\n- Put CSS in the screen `css` field. The renderer scopes it to the artboard.\n- Use real CSS and CSS variables. Tailwind-like class names are fine only when\n the provided `css` defines them or the classes are harmless semantic hooks.\n- Use `renderMode: \"design\"` on design screen data when authoring full\n structured content directly.\n- Add `data-design-id=\"meaningful-name\"` to editable elements such as hero\n panels, key buttons, cards, nav items, pricing rows, chart panels, and state\n chips. Keep ids stable and descriptive.\n- Keep the design responsive within the selected surface. Text must not clip,\n overlap, or rely on viewport-sized type.\n\n## Targeted Style Edits\n\nWhen a reviewer selects an element in the Design tab or asks for a specific\nstyle change, avoid regenerating the whole plan. Use:\n\n```json\n{\n \"op\": \"update-design-element-style\",\n \"frameId\": \"frame-overview\",\n \"elementId\": \"primary-cta\",\n \"styles\": {\n \"background-color\": \"#0f766e\",\n \"border-radius\": \"10px\"\n }\n}\n```\n\nUse `frameId` for inline canvas designs or `blockId` for a referenced wireframe\nblock. Set a style value to `null` to remove it. Use `patch-wireframe-html` or\n`patch-prototype-html` for text/content changes inside a fragment.\n\n## Document Handoff\n\nBelow the visual surface, keep the document concise and implementation-oriented:\nactual files and symbols, state/actions/contracts, open questions, risks, and\nverification. The document should not repeat the same screens in prose.\n\nBefore implementation, call `get-plan-feedback` and treat comments, selected\nelement details, and recent review events as the source of truth.\n\n## Related Skills\n\n- `visual-plan`\n- `ui-plan`\n- `prototype-plan`\n- `frontend-design`\n";
|
package/dist/cli/skills.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAwqBjE,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/cli/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyBH,OAAO,EAAW,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAwqBjE,eAAO,MAAM,qBAAqB,8rvCA6OjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,+0lCAqK5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,oiOA6JnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,46IA4GhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,i10BA0QjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,u7LAkIrC,CAAC;AA4UF,KAAK,aAAa,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAWD,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACzC;AAED,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC;IAC9B,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,CACd,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,CACb,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,CACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE,iBAAiB,KACxB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED,UAAU,yBAAyB;IACjC,cAAc,EAAE,QAAQ,EAAE,CAAC;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClE;AAED,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChE;AAwJD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAmEhE;AA2SD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,gBAAgB,EACxB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAqK1B;AAgBD,wBAAsB,SAAS,CAC7B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAuHf"}
|
package/dist/cli/skills.js
CHANGED
|
@@ -770,7 +770,6 @@ plan needs a richer review surface.
|
|
|
770
770
|
migration, or code plans, usually omit \`content.canvas\` and
|
|
771
771
|
\`content.prototype\`; put \`diagram\`, \`mermaid\`, \`api-endpoint\`,
|
|
772
772
|
\`openapi-spec\`, \`data-model\`, \`diff\`, \`file-tree\`, \`json-explorer\`,
|
|
773
|
-
\`annotated-code\`,
|
|
774
773
|
\`implementation-map\` and \`code-tabs\` blocks directly next
|
|
775
774
|
to the relevant prose. Skip the top visual surface for non-visual work.
|
|
776
775
|
4. Surface the returned Plans link or inline MCP App and ask the user to review.
|