@agent-native/core 0.38.0 → 0.39.0

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.
Files changed (156) hide show
  1. package/dist/cli/create.d.ts.map +1 -1
  2. package/dist/cli/create.js +8 -1
  3. package/dist/cli/create.js.map +1 -1
  4. package/dist/cli/skills.d.ts +5 -4
  5. package/dist/cli/skills.d.ts.map +1 -1
  6. package/dist/cli/skills.js +450 -125
  7. package/dist/cli/skills.js.map +1 -1
  8. package/dist/client/blocks/BlockView.d.ts +13 -4
  9. package/dist/client/blocks/BlockView.d.ts.map +1 -1
  10. package/dist/client/blocks/BlockView.js +34 -13
  11. package/dist/client/blocks/BlockView.js.map +1 -1
  12. package/dist/client/blocks/SchemaBlockEditor.d.ts.map +1 -1
  13. package/dist/client/blocks/SchemaBlockEditor.js +96 -3
  14. package/dist/client/blocks/SchemaBlockEditor.js.map +1 -1
  15. package/dist/client/blocks/index.d.ts +18 -1
  16. package/dist/client/blocks/index.d.ts.map +1 -1
  17. package/dist/client/blocks/index.js +26 -1
  18. package/dist/client/blocks/index.js.map +1 -1
  19. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts +6 -0
  20. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -0
  21. package/dist/client/blocks/library/AnnotatedCodeBlock.js +135 -0
  22. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -0
  23. package/dist/client/blocks/library/ApiEndpointBlock.d.ts +20 -0
  24. package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -0
  25. package/dist/client/blocks/library/ApiEndpointBlock.js +131 -0
  26. package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -0
  27. package/dist/client/blocks/library/DataModelBlock.d.ts +28 -0
  28. package/dist/client/blocks/library/DataModelBlock.d.ts.map +1 -0
  29. package/dist/client/blocks/library/DataModelBlock.js +222 -0
  30. package/dist/client/blocks/library/DataModelBlock.js.map +1 -0
  31. package/dist/client/blocks/library/DiffBlock.d.ts +6 -0
  32. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -0
  33. package/dist/client/blocks/library/DiffBlock.js +293 -0
  34. package/dist/client/blocks/library/DiffBlock.js.map +1 -0
  35. package/dist/client/blocks/library/FileTreeBlock.d.ts +23 -0
  36. package/dist/client/blocks/library/FileTreeBlock.d.ts.map +1 -0
  37. package/dist/client/blocks/library/FileTreeBlock.js +225 -0
  38. package/dist/client/blocks/library/FileTreeBlock.js.map +1 -0
  39. package/dist/client/blocks/library/JsonExplorerBlock.d.ts +19 -0
  40. package/dist/client/blocks/library/JsonExplorerBlock.d.ts.map +1 -0
  41. package/dist/client/blocks/library/JsonExplorerBlock.js +171 -0
  42. package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -0
  43. package/dist/client/blocks/library/MermaidBlock.d.ts +17 -0
  44. package/dist/client/blocks/library/MermaidBlock.d.ts.map +1 -0
  45. package/dist/client/blocks/library/MermaidBlock.js +131 -0
  46. package/dist/client/blocks/library/MermaidBlock.js.map +1 -0
  47. package/dist/client/blocks/library/OpenApiSpecBlock.d.ts +19 -0
  48. package/dist/client/blocks/library/OpenApiSpecBlock.d.ts.map +1 -0
  49. package/dist/client/blocks/library/OpenApiSpecBlock.js +494 -0
  50. package/dist/client/blocks/library/OpenApiSpecBlock.js.map +1 -0
  51. package/dist/client/blocks/library/annotated-code.config.d.ts +58 -0
  52. package/dist/client/blocks/library/annotated-code.config.d.ts.map +1 -0
  53. package/dist/client/blocks/library/annotated-code.config.js +53 -0
  54. package/dist/client/blocks/library/annotated-code.config.js.map +1 -0
  55. package/dist/client/blocks/library/api-endpoint.config.d.ts +71 -0
  56. package/dist/client/blocks/library/api-endpoint.config.d.ts.map +1 -0
  57. package/dist/client/blocks/library/api-endpoint.config.js +91 -0
  58. package/dist/client/blocks/library/api-endpoint.config.js.map +1 -0
  59. package/dist/client/blocks/library/checklist.d.ts.map +1 -1
  60. package/dist/client/blocks/library/checklist.js +3 -1
  61. package/dist/client/blocks/library/checklist.js.map +1 -1
  62. package/dist/client/blocks/library/code-tabs.js +1 -1
  63. package/dist/client/blocks/library/code-tabs.js.map +1 -1
  64. package/dist/client/blocks/library/data-model.config.d.ts +72 -0
  65. package/dist/client/blocks/library/data-model.config.d.ts.map +1 -0
  66. package/dist/client/blocks/library/data-model.config.js +59 -0
  67. package/dist/client/blocks/library/data-model.config.js.map +1 -0
  68. package/dist/client/blocks/library/dev-doc-ui.d.ts +49 -0
  69. package/dist/client/blocks/library/dev-doc-ui.d.ts.map +1 -0
  70. package/dist/client/blocks/library/dev-doc-ui.js +50 -0
  71. package/dist/client/blocks/library/dev-doc-ui.js.map +1 -0
  72. package/dist/client/blocks/library/diff.config.d.ts +41 -0
  73. package/dist/client/blocks/library/diff.config.d.ts.map +1 -0
  74. package/dist/client/blocks/library/diff.config.js +34 -0
  75. package/dist/client/blocks/library/diff.config.js.map +1 -0
  76. package/dist/client/blocks/library/file-tree.config.d.ts +59 -0
  77. package/dist/client/blocks/library/file-tree.config.d.ts.map +1 -0
  78. package/dist/client/blocks/library/file-tree.config.js +45 -0
  79. package/dist/client/blocks/library/file-tree.config.js.map +1 -0
  80. package/dist/client/blocks/library/html.d.ts.map +1 -1
  81. package/dist/client/blocks/library/html.js +4 -1
  82. package/dist/client/blocks/library/html.js.map +1 -1
  83. package/dist/client/blocks/library/json-explorer.config.d.ts +46 -0
  84. package/dist/client/blocks/library/json-explorer.config.d.ts.map +1 -0
  85. package/dist/client/blocks/library/json-explorer.config.js +28 -0
  86. package/dist/client/blocks/library/json-explorer.config.js.map +1 -0
  87. package/dist/client/blocks/library/mermaid.config.d.ts +32 -0
  88. package/dist/client/blocks/library/mermaid.config.d.ts.map +1 -0
  89. package/dist/client/blocks/library/mermaid.config.js +24 -0
  90. package/dist/client/blocks/library/mermaid.config.js.map +1 -0
  91. package/dist/client/blocks/library/openapi-spec.config.d.ts +49 -0
  92. package/dist/client/blocks/library/openapi-spec.config.d.ts.map +1 -0
  93. package/dist/client/blocks/library/openapi-spec.config.js +24 -0
  94. package/dist/client/blocks/library/openapi-spec.config.js.map +1 -0
  95. package/dist/client/blocks/library/server-specs.d.ts +35 -0
  96. package/dist/client/blocks/library/server-specs.d.ts.map +1 -0
  97. package/dist/client/blocks/library/server-specs.js +171 -0
  98. package/dist/client/blocks/library/server-specs.js.map +1 -0
  99. package/dist/client/blocks/library/specs.d.ts +29 -0
  100. package/dist/client/blocks/library/specs.d.ts.map +1 -0
  101. package/dist/client/blocks/library/specs.js +229 -0
  102. package/dist/client/blocks/library/specs.js.map +1 -0
  103. package/dist/client/blocks/library/table.d.ts.map +1 -1
  104. package/dist/client/blocks/library/table.js +3 -1
  105. package/dist/client/blocks/library/table.js.map +1 -1
  106. package/dist/client/blocks/library/tabs.js +1 -1
  107. package/dist/client/blocks/library/tabs.js.map +1 -1
  108. package/dist/client/blocks/registry.d.ts +8 -0
  109. package/dist/client/blocks/registry.d.ts.map +1 -1
  110. package/dist/client/blocks/registry.js +15 -0
  111. package/dist/client/blocks/registry.js.map +1 -1
  112. package/dist/client/blocks/server.d.ts +9 -0
  113. package/dist/client/blocks/server.d.ts.map +1 -1
  114. package/dist/client/blocks/server.js +16 -0
  115. package/dist/client/blocks/server.js.map +1 -1
  116. package/dist/client/blocks/types.d.ts +40 -0
  117. package/dist/client/blocks/types.d.ts.map +1 -1
  118. package/dist/client/blocks/types.js.map +1 -1
  119. package/dist/client/index.d.ts +2 -1
  120. package/dist/client/index.d.ts.map +1 -1
  121. package/dist/client/index.js +10 -1
  122. package/dist/client/index.js.map +1 -1
  123. package/dist/client/rich-markdown-editor/DragHandle.d.ts +52 -0
  124. package/dist/client/rich-markdown-editor/DragHandle.d.ts.map +1 -0
  125. package/dist/client/rich-markdown-editor/DragHandle.js +403 -0
  126. package/dist/client/rich-markdown-editor/DragHandle.js.map +1 -0
  127. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts +97 -0
  128. package/dist/client/rich-markdown-editor/RegistryBlockNode.d.ts.map +1 -0
  129. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +214 -0
  130. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -0
  131. package/dist/client/rich-markdown-editor/RunId.d.ts +28 -0
  132. package/dist/client/rich-markdown-editor/RunId.d.ts.map +1 -0
  133. package/dist/client/rich-markdown-editor/RunId.js +60 -0
  134. package/dist/client/rich-markdown-editor/RunId.js.map +1 -0
  135. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts +25 -1
  136. package/dist/client/rich-markdown-editor/SharedRichEditor.d.ts.map +1 -1
  137. package/dist/client/rich-markdown-editor/SharedRichEditor.js +14 -5
  138. package/dist/client/rich-markdown-editor/SharedRichEditor.js.map +1 -1
  139. package/dist/client/rich-markdown-editor/gfmDoc.d.ts +24 -0
  140. package/dist/client/rich-markdown-editor/gfmDoc.d.ts.map +1 -0
  141. package/dist/client/rich-markdown-editor/gfmDoc.js +83 -0
  142. package/dist/client/rich-markdown-editor/gfmDoc.js.map +1 -0
  143. package/dist/client/rich-markdown-editor/index.d.ts +5 -0
  144. package/dist/client/rich-markdown-editor/index.d.ts.map +1 -1
  145. package/dist/client/rich-markdown-editor/index.js +5 -0
  146. package/dist/client/rich-markdown-editor/index.js.map +1 -1
  147. package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts +46 -0
  148. package/dist/client/rich-markdown-editor/registrySlashCommands.d.ts.map +1 -0
  149. package/dist/client/rich-markdown-editor/registrySlashCommands.js +13 -0
  150. package/dist/client/rich-markdown-editor/registrySlashCommands.js.map +1 -0
  151. package/dist/client/rich-markdown-editor/useCollabReconcile.d.ts.map +1 -1
  152. package/dist/client/rich-markdown-editor/useCollabReconcile.js +33 -0
  153. package/dist/client/rich-markdown-editor/useCollabReconcile.js.map +1 -1
  154. package/docs/content/template-plan.md +19 -4
  155. package/docs/content/visual-plans.md +3 -1
  156. package/package.json +1 -1
@@ -15,7 +15,7 @@ const HELP = `agent-native skills
15
15
 
16
16
  Usage:
17
17
  agent-native skills list
18
- agent-native skills add assets|design-exploration|visual-plan|visual-questions|ui-plan|visualize-plan|context-xray [--client codex|claude-code|claude-code-cli|cowork|all] [--scope user|project] [--mcp-url <url>] [--no-connect] [--yes] [--dry-run] [--json]
18
+ agent-native skills add assets|design-exploration|visual-plan|visual-questions|ui-plan|prototype-plan|visualize-plan|context-xray [--client codex|claude-code|claude-code-cli|cowork|all] [--scope user|project] [--mcp-url <url>] [--no-connect] [--yes] [--dry-run] [--json]
19
19
  agent-native skills add <manifest-or-app-dir> [--client ...] [--yes]
20
20
 
21
21
  Examples:
@@ -196,7 +196,7 @@ iteration, or a human-in-the-loop choice among design directions.
196
196
  `;
197
197
  /**
198
198
  * Shared setup/auth block for every Plans skill (`/visual-plan`, `/ui-plan`,
199
- * `/visual-questions`, `/visualize-plan`). Interpolated into each skill markdown
199
+ * `/prototype-plan`, `/visual-questions`, `/visualize-plan`). Interpolated into each skill markdown
200
200
  * so the install + one-step authenticate instructions never drift between them.
201
201
  * Keep this in sync with the copies under `templates/plan/.agents/skills/*` and
202
202
  * top-level `skills/*` (this skill's SKILL.md is triplicated with no sync test).
@@ -214,8 +214,8 @@ intended), so the first tool call does not hit an OAuth wall:
214
214
  agent-native skills add visual-plan
215
215
  \`\`\`
216
216
 
217
- After that, \`/visual-plan\` (and \`/ui-plan\`, \`/visual-questions\`,
218
- \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
217
+ After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
218
+ \`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
219
219
  register the connector without authenticating, then run
220
220
  \`agent-native connect https://plan.agent-native.com\` whenever you are ready.
221
221
 
@@ -252,12 +252,13 @@ metadata:
252
252
 
253
253
  Agent-Native Plans is structured visual planning mode for coding agents. Build
254
254
  the plan you would normally write in Markdown, but as a scannable document with
255
- editable blocks mixed in: an optional pan/zoom wireframe canvas on top and a
256
- Notion-like technical document below. The user reacts to visuals first and reads
257
- prose only where it helps.
255
+ editable blocks mixed in: an optional top visual review area (wireframe canvas,
256
+ live prototype, or both in tabs) and a Notion-like technical document below. The
257
+ user reacts to visuals first and reads prose only where it helps.
258
258
 
259
259
  \`/visual-plan\` is the canonical command and the main entry point. Use \`/ui-plan\`
260
260
  when the work is primarily product UI and review should start with the screens.
261
+ Use \`/prototype-plan\` when review should start with a functional live prototype.
261
262
  Use \`/visual-questions\` only when the user explicitly wants a visual intake form
262
263
  before planning. Use \`/visualize-plan\` to turn an existing Codex, Claude Code,
263
264
  Markdown, or pasted plan into a visual companion.
@@ -286,9 +287,10 @@ direction before you implement.
286
287
  approach and options in the plan. Ask a clarifying question only when an
287
288
  ambiguity would change the design and you cannot resolve it from the code; use
288
289
  the host agent's normal ask-user-question flow and batch 2-4 high-leverage
289
- questions before finalizing. Do not create visual questions from \`/visual-plan\`.
290
- Otherwise state the assumption explicitly and proceed, and put anything
291
- unresolved in an open-questions block.
290
+ questions before finalizing. Do not call \`create-visual-questions\` from
291
+ \`/visual-plan\`; keep any answerable follow-up inside the plan itself as a
292
+ bottom \`question-form\` Open Questions block. Otherwise state the assumption
293
+ explicitly and proceed, and put anything unresolved in an open-questions block.
292
294
  - **The plan is the approval gate.** After surfacing it, ask the user to review
293
295
  and approve before you write code, and name which files/areas the work touches.
294
296
  Presenting the plan and requesting sign-off is the approval step — do not ask a
@@ -302,19 +304,22 @@ direction before you implement.
302
304
  1. Follow the host agent's normal planning flow: inspect the codebase, delegate
303
305
  wide exploration when useful, gather the info needed, and ask native
304
306
  clarifying questions as needed before generating the plan.
305
- 2. Call \`create-visual-plan\` with the title, brief, source, repo path, and
306
- structured \`content\` blocks.
307
- 3. Compose the canvas from the kit and write the document with native blocks
308
- (see the two cores below). Keep the document close to the Markdown plan the
309
- agent would normally output; add diagrams, wireframes, and visual callouts
310
- only where they clarify the plan. Skip the canvas for non-visual work.
307
+ 2. Decide the top visual surface with the rules below, then call
308
+ \`create-visual-plan\` with the title, brief, source, repo path, and structured \`content\` blocks.
309
+ 3. Compose any top visual surface from the kit and write the document with
310
+ native blocks (see the cores below). Keep the document close to the Markdown
311
+ plan the agent would normally output; add diagrams, wireframes, prototypes,
312
+ and visual callouts only where they clarify the plan. Skip the top visual
313
+ surface for non-visual work.
311
314
  4. Surface the returned Plans link or inline MCP App and ask the user to review.
312
315
  Always include the actual URL in chat so the next step is a click in CLI or
313
316
  other text-only hosts. When the host exposes an embedded browser/preview panel
314
317
  and a tool can open arbitrary URLs there, open the returned plan URL
315
318
  automatically for convenient review; do not rely on this as the only handoff.
316
319
  5. Call \`get-plan-feedback\` before editing, after review, after any long pause,
317
- and before the final response.
320
+ and before the final response. Treat \`anchorDetails\`, resolver intent, recent
321
+ review events, and any focused screenshots from browser handoff as the source
322
+ of truth for exactly what changed and exactly what each comment points at.
318
323
  6. Apply changes with \`update-visual-plan\`, preferring targeted \`contentPatches\`.
319
324
  When the user wants source-control friendly edits, use
320
325
  \`patch-visual-plan-source\` against the MDX files instead of regenerating the
@@ -322,6 +327,31 @@ direction before you implement.
322
327
  7. Export with \`export-visual-plan\` only when the user wants a shareable receipt
323
328
  or repo-check-in artifacts.
324
329
 
330
+ ## Visual Surface Choice
331
+
332
+ Choose the surface before creating the plan. Do not add visual chrome by
333
+ default:
334
+
335
+ - **No visual surface** for architecture-only, backend-only, data migration,
336
+ copy-only, or otherwise non-visual plans. Use a strong document with diagrams
337
+ only when relationships need a visual explanation.
338
+ - **Canvas only** for one static screen, a before/after comparison, a component
339
+ state, a small popover, or a visual direction that does not require clicking.
340
+ Put those wireframes in \`content.canvas\` and omit \`content.prototype\`.
341
+ - **Canvas + prototype** for multi-step UI flows, onboarding, wizards,
342
+ review/approval flows, navigation changes, or anything where the reviewer
343
+ needs to operate the behavior. Keep the static wireframes in
344
+ \`content.canvas\`, add the aligned functional prototype in
345
+ \`content.prototype\`, and rely on the top visual tabs to switch between them.
346
+ - **Prototype-first** when the user explicitly asks for \`/prototype-plan\`, asks
347
+ to operate the UI, or when interaction is the main question. Use
348
+ \`create-prototype-plan\`, which still preserves static mocks where useful.
349
+
350
+ For mixed canvas + prototype plans, reuse the same real labels, app statuses,
351
+ and screen ids across both surfaces. The canvas is the inspectable static reference;
352
+ the prototype is the interactive version of that same flow, not a separate
353
+ design direction.
354
+
325
355
  <!-- SHARED-CORE:wireframe-canvas START -->
326
356
 
327
357
  ## Wireframe & Canvas Core
@@ -482,13 +512,18 @@ hex colors:
482
512
  </div>
483
513
  \`\`\`
484
514
 
485
- **Mockups belong on the canvas.** When the user asks for a mockup, UI state,
486
- loading state, prototype, layout, screen, or visual comparison, make the top
487
- canvas the primary home for that visual. Document blocks can explain, compare,
488
- or map implementation, but they should not host the primary mockup just because
489
- \`custom-html\`, screenshots, or prose are easier to produce. If the canvas cannot
490
- represent the requested fidelity, still keep a canvas artboard and call out or
491
- extend the needed canvas renderer capability.
515
+ **Mockups belong in the top visual review area.** Static visuals live on the
516
+ canvas; multi-step flows get both canvas wireframes and a prototype. When the
517
+ user asks for a mockup, UI state, loading state, layout, screen, or visual
518
+ comparison, make the canvas the primary home for that static visual. When the
519
+ user asks for a prototype or the plan contains a sequence the reviewer must
520
+ feel, keep the canvas artboards and add \`content.prototype\` so the top surface
521
+ shows Wireframes / Prototype tabs. Document blocks can explain, compare, or map
522
+ implementation, but they should not host the primary mockup or prototype just
523
+ because \`custom-html\`, screenshots, or prose are easier to produce. If the
524
+ canvas/prototype surface cannot represent the requested fidelity, still keep the
525
+ closest top-surface representation and call out or extend the needed renderer
526
+ capability.
492
527
 
493
528
  **Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
494
529
  nodes instead of \`html\`; the renderer still accepts and displays it, but new
@@ -520,12 +555,14 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
520
555
  work." No hero art, gradients, logos, nav bars, slogans, value props, giant
521
556
  landing-page headings, or marketing cards unless the user explicitly asks.
522
557
 
523
- **Canvas and document never duplicate each other.** The UI story lives on the
524
- canvas with on-canvas annotations; the document carries the technical depth the
525
- canvas cannot show concrete file/symbol maps, API and data contracts, code
526
- snippets, migration or implementation phases, risks, and validation. Repeat a
527
- wireframe in the document only for a genuinely new detail view or comparison.
528
- Skip the canvas entirely for non-visual work and write a clean rich document.
558
+ **Top visuals and document never duplicate each other.** The UI story lives in
559
+ the top visual surface: canvas artboards for static inspection, plus prototype
560
+ tabs when the flow should be functional. The document carries the technical depth
561
+ the visuals cannot show concrete file/symbol maps, API and data contracts,
562
+ code snippets, migration or implementation phases, risks, and validation. Repeat
563
+ a wireframe in the document only for a genuinely new detail view or comparison.
564
+ Skip the visual surface entirely for non-visual work and write a clean rich
565
+ document.
529
566
 
530
567
  **Use the right block, and make it carry substance.** For the authoritative,
531
568
  machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
@@ -548,9 +585,14 @@ so you never emit a block the editor cannot render or round-trip:
548
585
  visual unless the tab is intentionally document-only.
549
586
  - \`table\`, \`checklist\`, \`callout\` for scannable structure.
550
587
 
551
- **Open questions are callouts, not buried prose.** Surface anything unresolved in
552
- a dedicated open-questions / needs-clarification block. Never put a
553
- questions/decisions wall inside the plan narrative.
588
+ **Open questions live at the bottom as a form when answers would change the
589
+ plan.** Surface answerable unresolved decisions in a final \`question-form\`
590
+ block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
591
+ \`freeform\` for constraints, \`recommended: true\` for the default you would pick,
592
+ and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
593
+ Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
594
+ relevant section. Never bury a questions/decisions wall inside the plan
595
+ narrative.
554
596
 
555
597
  **\`custom-html\` is a bounded escape hatch only** — a single complete fragment
556
598
  inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
@@ -582,22 +624,31 @@ designer notes sit spaced off the frame, pointing only at the controls that need
582
624
  explanation. Below it, a Claude/Codex-grade document: objective and
583
625
  done-criteria, an \`implementation-map\` naming the real components and actions
584
626
  with short highlighted snippets, a \`decision\` card weighing two real approaches,
585
- and a validation step — none of it repeating the canvas. This is the bar.
627
+ and a validation step — none of it repeating the canvas. If the task also
628
+ changes a multi-step completion flow, the same top area includes a Prototype tab
629
+ whose screens use the same labels and states as the canvas artboards, with
630
+ \`data-goto\` controls for the sequence. This is the bar.
586
631
 
587
632
  **BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
588
633
  pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
589
634
  frame; a forced desktop + mobile pair for a popover; floating bordered
590
635
  annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
591
- instead of \`html\`; a mockup escaped into a document \`custom-html\` block; and a
592
- marketing-style document with a hero heading and value props that just restates
593
- what the canvas already shows. Never produce this.
636
+ instead of \`html\`; a multi-step UI flow with only static frames and no prototype
637
+ tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
638
+ document with a hero heading and value props that just restates what the canvas
639
+ already shows. Never produce this.
594
640
 
595
641
  <!-- SHARED-CORE:exemplar END -->
596
642
 
597
643
  ## Tool Guidance
598
644
 
599
- - \`create-visual-plan\`: start one structured visual plan per agent task/run.
645
+ - \`create-visual-plan\`: start one structured visual plan per agent task/run;
646
+ \`content\` may include no visual surface, canvas only, or canvas + prototype.
600
647
  - \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
648
+ - \`create-prototype-plan\`: start a prototype-first plan with a functional top
649
+ review surface.
650
+ - \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
651
+ into a prototype plan.
601
652
  - \`create-visual-questions\`: use only for the explicit \`/visual-questions\`
602
653
  command, not as \`/visual-plan\` preflight.
603
654
  - \`visualize-plan\`: build a visual companion from an existing text plan.
@@ -610,7 +661,9 @@ what the canvas already shows. Never produce this.
610
661
  - \`import-visual-plan-source\`: create or replace a plan from an MDX folder.
611
662
  - \`get-visual-plan\`: read the current structured plan, exported HTML, and
612
663
  annotations; it also returns the MDX folder for source workflows.
613
- - \`get-plan-feedback\`: read unconsumed human feedback. Use it frequently.
664
+ - \`get-plan-feedback\`: read unconsumed human feedback. Use it frequently; it
665
+ returns grouped threads, exact anchor details, expected resolver, and recent
666
+ review-event payloads so agents can act only on the comments meant for them.
614
667
  - \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
615
668
  files for repo check-in.
616
669
 
@@ -630,8 +683,8 @@ intended), so the first tool call does not hit an OAuth wall:
630
683
  agent-native skills add visual-plan
631
684
  \`\`\`
632
685
 
633
- After that, \`/visual-plan\` (and \`/ui-plan\`, \`/visual-questions\`,
634
- \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
686
+ After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
687
+ \`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
635
688
  register the connector without authenticating, then run
636
689
  \`agent-native connect https://plan.agent-native.com\` whenever you are ready.
637
690
 
@@ -668,14 +721,15 @@ metadata:
668
721
  # UI Plan
669
722
 
670
723
  Use \`/ui-plan\` when the task is primarily about product UI, user flows,
671
- interaction states, component layout, or visual direction. The reviewable UI
724
+ interaction details, component layout, or visual direction. The reviewable UI
672
725
  comes first; implementation detail comes after the user has something concrete to
673
726
  react to.
674
727
 
675
728
  \`/visual-plan\` remains the general command for architecture, backend, refactors,
676
- and mixed work. Use \`/visual-questions\` only when the user explicitly wants
677
- visual intake before planning, and \`/visualize-plan\` when a text plan already
678
- exists.
729
+ and mixed work. Use \`/prototype-plan\` when the UI review needs a functional live
730
+ prototype instead of static screens. Use \`/visual-questions\` only when the user
731
+ explicitly wants visual intake before planning, and \`/visualize-plan\` when a text
732
+ plan already exists.
679
733
 
680
734
  ## Plan Discipline
681
735
 
@@ -691,9 +745,10 @@ exists.
691
745
  - **Clarify vs. assume.** Do not ask how to build the UI — present the direction
692
746
  and options as mockups and tabs. Ask a clarifying question only when an
693
747
  ambiguity would change the design; use the host agent's normal
694
- ask-user-question flow and batch 2-4 before finalizing. Do not create visual
695
- questions from \`/ui-plan\`. Otherwise state the assumption in the plan and
696
- proceed.
748
+ ask-user-question flow and batch 2-4 before finalizing. Do not call
749
+ \`create-visual-questions\` from \`/ui-plan\`; keep answerable follow-up inside
750
+ the same plan as a bottom \`question-form\` Open Questions block. Otherwise
751
+ state the assumption in the plan and proceed.
697
752
  - **The plan is the approval gate.** Ask the user to review and approve the UI
698
753
  direction before you write code, and name the files/areas the work touches.
699
754
 
@@ -711,10 +766,13 @@ exists.
711
766
  Markdown plan the agent would normally output — not a second copy of the
712
767
  canvas — covering concrete files, contracts, phases, risks, and validation.
713
768
  5. Call \`get-plan-feedback\` before implementation, after review, after a long
714
- pause, and before the final response. Apply changes with \`update-visual-plan\`,
715
- preferring \`contentPatches\` for one frame, annotation, node, tab, or block. When the user
716
- wants source-control friendly edits, use \`patch-visual-plan-source\` against
717
- the MDX files instead of regenerating the plan.
769
+ pause, and before the final response. Treat \`anchorDetails\`, resolver intent,
770
+ recent review events, and any focused screenshots from browser handoff as the
771
+ source of truth for exactly what changed and exactly what each UI comment
772
+ points at. Apply changes with \`update-visual-plan\`, preferring
773
+ \`contentPatches\` for one frame, annotation, node, tab, or block. When the
774
+ user wants source-control friendly edits, use \`patch-visual-plan-source\`
775
+ against the MDX files instead of regenerating the plan.
718
776
 
719
777
  ## Agent Handoff
720
778
 
@@ -883,13 +941,18 @@ hex colors:
883
941
  </div>
884
942
  \`\`\`
885
943
 
886
- **Mockups belong on the canvas.** When the user asks for a mockup, UI state,
887
- loading state, prototype, layout, screen, or visual comparison, make the top
888
- canvas the primary home for that visual. Document blocks can explain, compare,
889
- or map implementation, but they should not host the primary mockup just because
890
- \`custom-html\`, screenshots, or prose are easier to produce. If the canvas cannot
891
- represent the requested fidelity, still keep a canvas artboard and call out or
892
- extend the needed canvas renderer capability.
944
+ **Mockups belong in the top visual review area.** Static visuals live on the
945
+ canvas; multi-step flows get both canvas wireframes and a prototype. When the
946
+ user asks for a mockup, UI state, loading state, layout, screen, or visual
947
+ comparison, make the canvas the primary home for that static visual. When the
948
+ user asks for a prototype or the plan contains a sequence the reviewer must
949
+ feel, keep the canvas artboards and add \`content.prototype\` so the top surface
950
+ shows Wireframes / Prototype tabs. Document blocks can explain, compare, or map
951
+ implementation, but they should not host the primary mockup or prototype just
952
+ because \`custom-html\`, screenshots, or prose are easier to produce. If the
953
+ canvas/prototype surface cannot represent the requested fidelity, still keep the
954
+ closest top-surface representation and call out or extend the needed renderer
955
+ capability.
893
956
 
894
957
  **Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
895
958
  nodes instead of \`html\`; the renderer still accepts and displays it, but new
@@ -921,12 +984,14 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
921
984
  work." No hero art, gradients, logos, nav bars, slogans, value props, giant
922
985
  landing-page headings, or marketing cards unless the user explicitly asks.
923
986
 
924
- **Canvas and document never duplicate each other.** The UI story lives on the
925
- canvas with on-canvas annotations; the document carries the technical depth the
926
- canvas cannot show concrete file/symbol maps, API and data contracts, code
927
- snippets, migration or implementation phases, risks, and validation. Repeat a
928
- wireframe in the document only for a genuinely new detail view or comparison.
929
- Skip the canvas entirely for non-visual work and write a clean rich document.
987
+ **Top visuals and document never duplicate each other.** The UI story lives in
988
+ the top visual surface: canvas artboards for static inspection, plus prototype
989
+ tabs when the flow should be functional. The document carries the technical depth
990
+ the visuals cannot show concrete file/symbol maps, API and data contracts,
991
+ code snippets, migration or implementation phases, risks, and validation. Repeat
992
+ a wireframe in the document only for a genuinely new detail view or comparison.
993
+ Skip the visual surface entirely for non-visual work and write a clean rich
994
+ document.
930
995
 
931
996
  **Use the right block, and make it carry substance.** For the authoritative,
932
997
  machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
@@ -949,9 +1014,14 @@ so you never emit a block the editor cannot render or round-trip:
949
1014
  visual unless the tab is intentionally document-only.
950
1015
  - \`table\`, \`checklist\`, \`callout\` for scannable structure.
951
1016
 
952
- **Open questions are callouts, not buried prose.** Surface anything unresolved in
953
- a dedicated open-questions / needs-clarification block. Never put a
954
- questions/decisions wall inside the plan narrative.
1017
+ **Open questions live at the bottom as a form when answers would change the
1018
+ plan.** Surface answerable unresolved decisions in a final \`question-form\`
1019
+ block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
1020
+ \`freeform\` for constraints, \`recommended: true\` for the default you would pick,
1021
+ and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
1022
+ Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
1023
+ relevant section. Never bury a questions/decisions wall inside the plan
1024
+ narrative.
955
1025
 
956
1026
  **\`custom-html\` is a bounded escape hatch only** — a single complete fragment
957
1027
  inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
@@ -983,21 +1053,29 @@ designer notes sit spaced off the frame, pointing only at the controls that need
983
1053
  explanation. Below it, a Claude/Codex-grade document: objective and
984
1054
  done-criteria, an \`implementation-map\` naming the real components and actions
985
1055
  with short highlighted snippets, a \`decision\` card weighing two real approaches,
986
- and a validation step — none of it repeating the canvas. This is the bar.
1056
+ and a validation step — none of it repeating the canvas. If the task also
1057
+ changes a multi-step completion flow, the same top area includes a Prototype tab
1058
+ whose screens use the same labels and states as the canvas artboards, with
1059
+ \`data-goto\` controls for the sequence. This is the bar.
987
1060
 
988
1061
  **BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
989
1062
  pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
990
1063
  frame; a forced desktop + mobile pair for a popover; floating bordered
991
1064
  annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
992
- instead of \`html\`; a mockup escaped into a document \`custom-html\` block; and a
993
- marketing-style document with a hero heading and value props that just restates
994
- what the canvas already shows. Never produce this.
1065
+ instead of \`html\`; a multi-step UI flow with only static frames and no prototype
1066
+ tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
1067
+ document with a hero heading and value props that just restates what the canvas
1068
+ already shows. Never produce this.
995
1069
 
996
1070
  <!-- SHARED-CORE:exemplar END -->
997
1071
 
998
1072
  ## Tool Guidance
999
1073
 
1000
1074
  - \`create-ui-plan\`: create the UI-first structured visual plan.
1075
+ - \`create-prototype-plan\`: create a prototype-first plan when UI review needs a
1076
+ functional live prototype.
1077
+ - \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
1078
+ into a prototype plan.
1001
1079
  - \`create-visual-questions\`: use only for the explicit \`/visual-questions\`
1002
1080
  command, not as \`/ui-plan\` preflight.
1003
1081
  - \`update-visual-plan\`: revise content, mockups, comments, or handoff notes;
@@ -1009,7 +1087,9 @@ what the canvas already shows. Never produce this.
1009
1087
  - \`import-visual-plan-source\`: create or replace a plan from an MDX folder.
1010
1088
  - \`get-visual-plan\`: inspect the current structured plan, exported HTML, and
1011
1089
  annotations; it also returns the MDX folder for source workflows.
1012
- - \`get-plan-feedback\`: read unconsumed reviewer comments before coding.
1090
+ - \`get-plan-feedback\`: read unconsumed reviewer comments before coding; it
1091
+ returns grouped threads, exact anchor details, expected resolver, and recent
1092
+ review-event payloads so agents can act only on the comments meant for them.
1013
1093
  - \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
1014
1094
  files for repo check-in.
1015
1095
 
@@ -1029,8 +1109,8 @@ intended), so the first tool call does not hit an OAuth wall:
1029
1109
  agent-native skills add visual-plan
1030
1110
  \`\`\`
1031
1111
 
1032
- After that, \`/visual-plan\` (and \`/ui-plan\`, \`/visual-questions\`,
1033
- \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
1112
+ After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
1113
+ \`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
1034
1114
  register the connector without authenticating, then run
1035
1115
  \`agent-native connect https://plan.agent-native.com\` whenever you are ready.
1036
1116
 
@@ -1054,6 +1134,165 @@ is available.
1054
1134
  Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
1055
1135
  not put shared secrets in skill files.
1056
1136
  `;
1137
+ export const PROTOTYPE_PLAN_SKILL_MD = `---
1138
+ name: prototype-plan
1139
+ description: >-
1140
+ Use Agent-Native Plans for /prototype-plan when work needs a functional
1141
+ prototype-first plan, static mocks, comments, review toggles, or conversion
1142
+ from a visual plan.
1143
+ metadata:
1144
+ visibility: exported
1145
+ ---
1146
+
1147
+ # Prototype Plan
1148
+
1149
+ \`/prototype-plan\` creates a plan whose primary review surface is a live,
1150
+ functional prototype above the document. Use it when the user needs to feel a
1151
+ flow, operate basic UI state, or comment on interaction before implementation
1152
+ hardens the decision.
1153
+
1154
+ ## Rule
1155
+
1156
+ Make the prototype answer a concrete question. The plan should say what is being
1157
+ tested, show the functional prototype first, then keep static mocks and implementation
1158
+ notes in the document below.
1159
+
1160
+ ## When To Use
1161
+
1162
+ Use \`/prototype-plan\` when the user asks for a prototype, wants to click through
1163
+ and operate UI states, needs design review before code, wants comments pinned to
1164
+ live screens, or asks to move a visual plan into a prototype.
1165
+
1166
+ Prefer \`/visual-plan\` for architecture, data flow, or non-interactive planning.
1167
+ Prefer \`/ui-plan\` when static screen review is enough. Use \`/visualize-plan\`
1168
+ first only when the user hands you an existing Markdown/Codex/Claude plan that
1169
+ needs a visual companion before becoming interactive.
1170
+
1171
+ ## Core Workflow
1172
+
1173
+ 1. Inspect the real codebase and decide the question the prototype should
1174
+ answer. Good examples: "Does this onboarding flow feel short enough?" or
1175
+ "Which dashboard density should we implement?"
1176
+ 2. Call \`create-prototype-plan\` with a title, brief, and screen HTML. Default to
1177
+ one functional prototype screen when local UI behavior is enough; use 2-4
1178
+ screens only for true routes, steps, or materially different contexts. The
1179
+ returned plan opens with the prototype viewer on top and static mocks, flow
1180
+ diagram, implementation map, and verification below.
1181
+ 3. Make controls actually work. Use the renderer's safe Alpine-like directives:
1182
+ \`x-data\`, \`x-model\`, \`x-for\`, \`x-text\`, \`x-show\`, \`:class\`, \`@click\`, and
1183
+ \`@keydown.enter\`. Use safe helper verbs such as \`remove(list, item)\`,
1184
+ \`setAll(list, 'done', true)\`, \`removeWhere(list, 'done', true)\`, and counters
1185
+ such as \`count(list)\`, \`countWhere(list, 'done', true)\`, and
1186
+ \`remaining(list, 'done')\` when they help. Use \`data-goto="screen-id"\` only
1187
+ for true screen/route changes, not for every button press.
1188
+ 4. Show important app feedback inside the prototype itself: selected filters,
1189
+ checked rows, typed drafts, validation messages, permissions, progress, or
1190
+ empty states.
1191
+ 5. Surface the returned Plans link and ask the user to click through, comment on
1192
+ the prototype or static mocks, and approve the direction before code changes.
1193
+ 6. Before implementing or revising, call \`get-plan-feedback\`. Treat prototype
1194
+ anchors, screenshots, and resolver intent as the source of truth.
1195
+ 7. Update with \`update-visual-plan\` content patches. Use
1196
+ \`patch-prototype-html\`, \`update-prototype-screen\`, or \`set-prototype\` for
1197
+ targeted prototype edits instead of regenerating the whole plan.
1198
+
1199
+ ## Converting A Visual Plan
1200
+
1201
+ When a visual plan already has HTML canvas wireframes, call
1202
+ \`convert-visual-plan-to-prototype\` with the plan id. This derives prototype
1203
+ screens from the canvas frames, preserves the canvas/static mocks by default,
1204
+ and changes the top review surface to the prototype viewer.
1205
+
1206
+ Use \`removeCanvas: true\` only when the user explicitly wants the old canvas
1207
+ gone. Otherwise keep static mocks available for source export and detailed
1208
+ review.
1209
+
1210
+ ## Prototype Screen HTML
1211
+
1212
+ Write bounded semantic HTML fragments only:
1213
+
1214
+ \`\`\`html
1215
+ <div style="display:flex;flex-direction:column;gap:14px;padding:18px;height:100%">
1216
+ <header style="display:flex;justify-content:space-between;gap:12px">
1217
+ <div>
1218
+ <h1>Launch checklist</h1>
1219
+ <p class="wf-muted">Reviewer can add, complete, filter, and remove tasks.</p>
1220
+ </div>
1221
+ <span class="wf-pill accent">Live prototype</span>
1222
+ </header>
1223
+ <section
1224
+ class="wf-card"
1225
+ x-data="{ draft: '', filter: 'all', todos: [{ text: 'Check copy', done: false }, { text: 'Confirm owner', done: true }] }"
1226
+ style="display:flex;flex-direction:column;gap:10px"
1227
+ >
1228
+ <div style="display:flex;gap:8px">
1229
+ <input x-model="draft" @keydown.enter="draft && todos.push({ text: draft, done: false }); draft = ''" placeholder="Add task" />
1230
+ <button class="primary" @click="draft && todos.push({ text: draft, done: false }); draft = ''">Add</button>
1231
+ </div>
1232
+ <div style="display:flex;gap:8px">
1233
+ <button @click="filter = 'all'" :class="{ primary: filter === 'all' }">All</button>
1234
+ <button @click="filter = 'done'" :class="{ primary: filter === 'done' }">Done</button>
1235
+ <button @click="setAll(todos, 'done', true)">Mark all done</button>
1236
+ </div>
1237
+ <p class="wf-muted"><span x-text="remaining(todos, 'done')"></span> open / <span x-text="count(todos)"></span> total</p>
1238
+ <div
1239
+ class="wf-box"
1240
+ x-for="todo in todos"
1241
+ x-show="filter === 'all' || (filter === 'done' && todo.done)"
1242
+ :class="{ 'is-done': todo.done }"
1243
+ style="display:flex;justify-content:space-between;gap:10px"
1244
+ >
1245
+ <label style="display:flex;gap:8px"><input type="checkbox" x-model="todo.done" /><span x-text="todo.text"></span></label>
1246
+ <button @click="remove(todos, todo)">Remove</button>
1247
+ </div>
1248
+ <button @click="removeWhere(todos, 'done', true)">Clear completed</button>
1249
+ </section>
1250
+ </div>
1251
+ \`\`\`
1252
+
1253
+ Use real labels, counts, dates, and controls grounded in the target app. Keep
1254
+ surfaces honest: \`browser\` for web pages, \`desktop\` for app shells, \`mobile\`
1255
+ only for real mobile work, \`panel\` for side panels, and \`popover\` for menus.
1256
+
1257
+ Do not include \`<html>\`, \`<body>\`, \`<script>\`, \`<style>\`, browser \`on*\`
1258
+ handler attributes such as \`onclick\`, fake APIs, raw secrets, or customer data.
1259
+ The renderer owns sketchy/clean mode, theme, surface sizing, rough outlines, and
1260
+ comment overlays.
1261
+
1262
+ ## Review Surface
1263
+
1264
+ Prototype plans support:
1265
+
1266
+ - real local controls through safe prototype directives
1267
+ - optional screen/route transitions from \`data-goto\`
1268
+ - rough vs clean mode through the shared wireframe toggle
1269
+ - dark vs light mode through the shared theme toggle
1270
+ - comment visibility from the prototype toolbar
1271
+ - Figma-style comments pinned directly on live prototype screens
1272
+ - a popout URL with \`?prototype=1\` for focused browser review
1273
+ - static wireframe mocks in the document body where they help implementation
1274
+
1275
+ ## Source Files
1276
+
1277
+ Runtime JSON is canonical. Source export uses:
1278
+
1279
+ - \`plan.mdx\` for document blocks
1280
+ - \`prototype.mdx\` for \`<Prototype>\`, \`<PrototypeScreen>\`, and
1281
+ \`<PrototypeTransition>\`
1282
+ - \`canvas.mdx\` for static mocks when a canvas is present
1283
+ - \`.plan-state.json\` for persisted viewport state
1284
+
1285
+ Patch source with \`patch-visual-plan-source\` only when the user wants
1286
+ source-control friendly edits. Patch runtime content when the user is simply
1287
+ reviewing and iterating.
1288
+
1289
+ ## Related Skills
1290
+
1291
+ - \`visual-plan\`
1292
+ - \`ui-plan\`
1293
+ - \`visualize-plan\`
1294
+ - \`visual-questions\`
1295
+ `;
1057
1296
  export const VISUAL_QUESTIONS_SKILL_MD = `---
1058
1297
  name: visual-questions
1059
1298
  description: >-
@@ -1069,8 +1308,8 @@ metadata:
1069
1308
  Use \`/visual-questions\` when the next best step is not a plan yet, but a
1070
1309
  reviewable visual intake: single-choice chips, multi-select chips, freeform
1071
1310
  notes, mockup choices, sketch diagrams, and a generated answer summary that feeds
1072
- the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`, and
1073
- \`/visualize-plan\`.
1311
+ the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`,
1312
+ \`/prototype-plan\`, and \`/visualize-plan\`.
1074
1313
 
1075
1314
  ## When To Use
1076
1315
 
@@ -1081,11 +1320,11 @@ the next planning prompt. It composes with \`/visual-plan\`, \`/ui-plan\`, and
1081
1320
  than answering text-only prompts.
1082
1321
 
1083
1322
  Gate hard: skip this for tiny, unambiguous changes. If the agent can reasonably
1084
- infer the answer, prefer \`/ui-plan\` or \`/visual-plan\` directly and put
1323
+ infer the answer, prefer \`/ui-plan\`, \`/prototype-plan\`, or \`/visual-plan\` directly and put
1085
1324
  assumptions in the plan.
1086
1325
 
1087
1326
  Visual questions are an explicit intake command, not an automatic preflight for
1088
- \`/visual-plan\` or \`/ui-plan\`.
1327
+ \`/visual-plan\`, \`/ui-plan\`, or \`/prototype-plan\`.
1089
1328
 
1090
1329
  ## Workflow
1091
1330
 
@@ -1094,10 +1333,11 @@ Visual questions are an explicit intake command, not an automatic preflight for
1094
1333
  2. Omit \`questions\` for the default UI intake. Provide a custom \`questions\` array
1095
1334
  only when the task has domain-specific choices.
1096
1335
  3. Surface the returned Plans link and ask the user to answer visually.
1097
- 4. The generated summary drives the next step: \`create-ui-plan\` for UI flows,
1336
+ 4. The generated summary drives the next step: \`create-ui-plan\` for static UI
1337
+ review, \`create-prototype-plan\` for click-through UI flows,
1098
1338
  \`create-visual-plan\` for general plans, \`visualize-plan\` when a text plan
1099
- already exists, or \`update-visual-plan\` with targeted \`contentPatches\` to fold
1100
- answers into an active plan.
1339
+ already exists, or \`update-visual-plan\` with targeted \`contentPatches\` to
1340
+ fold answers into an active plan.
1101
1341
  5. If the user leaves comments, call \`get-plan-feedback\` before using the answers.
1102
1342
 
1103
1343
  ## Question Types
@@ -1132,6 +1372,8 @@ desktop/mobile pair for a popover, panel, or component.
1132
1372
  - \`get-visual-plan\`: inspect the current visual question plan.
1133
1373
  - \`get-plan-feedback\`: read comments before creating or updating the next plan.
1134
1374
  - \`create-ui-plan\`: create a UI-first plan from the answers.
1375
+ - \`create-prototype-plan\`: create a prototype-first plan from the answers when
1376
+ interaction feel matters.
1135
1377
  - \`create-visual-plan\`: create a general visual plan from the answers.
1136
1378
  - \`visualize-plan\`: enrich an existing text plan after answers are gathered.
1137
1379
  - \`export-visual-plan\`: export answer plans as HTML, Markdown fallback,
@@ -1152,8 +1394,8 @@ intended), so the first tool call does not hit an OAuth wall:
1152
1394
  agent-native skills add visual-plan
1153
1395
  \`\`\`
1154
1396
 
1155
- After that, \`/visual-plan\` (and \`/ui-plan\`, \`/visual-questions\`,
1156
- \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
1397
+ After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
1398
+ \`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
1157
1399
  register the connector without authenticating, then run
1158
1400
  \`agent-native connect https://plan.agent-native.com\` whenever you are ready.
1159
1401
 
@@ -1181,8 +1423,8 @@ export const VISUALIZE_PLAN_SKILL_MD = `---
1181
1423
  name: visualize-plan
1182
1424
  description: >-
1183
1425
  Convert an existing Codex, Claude Code, Markdown, or pasted plan into an
1184
- Agent-Native Plans visual companion with diagrams, wireframes, annotations, and
1185
- feedback.
1426
+ Agent-Native Plans visual companion with diagrams, wireframes, prototypes,
1427
+ annotations, and feedback.
1186
1428
  metadata:
1187
1429
  visibility: exported
1188
1430
  ---
@@ -1192,8 +1434,14 @@ metadata:
1192
1434
  Use \`/visualize-plan\` when a plan already exists and the user wants it easier to
1193
1435
  review. The native Codex or Claude Code plan can stay where it is; Agent-Native
1194
1436
  Plans creates a structured visual companion beside it — diagrams, wireframes,
1195
- state sketches, option cards, and comment prompts instead of a wall of text. It
1196
- still reads like a plan, not a marketing page.
1437
+ state sketches, functional prototypes, option cards, and comment prompts instead
1438
+ of a wall of text. It still reads like a plan, not a marketing page.
1439
+
1440
+ Use \`/prototype-plan\` instead when the user wants a functional prototype as the first
1441
+ artifact and there is no text plan to preserve. When a text plan already exists,
1442
+ \`/visualize-plan\` should decide whether it needs no visual surface, canvas only,
1443
+ or canvas + prototype; call \`convert-visual-plan-to-prototype\` after
1444
+ visualization when its HTML wireframes should drive a prototype review.
1197
1445
 
1198
1446
  ## Plan Discipline
1199
1447
 
@@ -1205,30 +1453,66 @@ still reads like a plan, not a marketing page.
1205
1453
  edits while building or reviewing the companion.
1206
1454
  - **The companion is the approval gate.** Ask the user to review and approve the
1207
1455
  direction before you write code, and name which files/areas the work touches.
1208
- Carry unresolved assumptions and open questions into a clear block instead of
1209
- guessing silently.
1456
+ Carry answerable unresolved assumptions and open questions into a bottom
1457
+ \`question-form\` block instead of guessing silently.
1210
1458
 
1211
1459
  ## Workflow
1212
1460
 
1213
1461
  1. Gather the existing plan text from the user's paste, a referenced file, or
1214
1462
  recent visible agent context. Do not invent the source plan. If no plan text
1215
- exists and the work is UI-heavy, use \`/ui-plan\` instead.
1463
+ exists and the work is UI-heavy, use \`/ui-plan\` or \`/prototype-plan\` instead.
1216
1464
  2. Call \`visualize-plan\` with \`planText\`, \`title\`, \`brief\`, \`source\`, and
1217
1465
  \`repoPath\` when available.
1218
1466
  3. Surface the returned Plans link or inline MCP App.
1219
- 4. Enrich the import with \`update-visual-plan\` (prefer targeted \`contentPatches\`):
1220
- add a canvas with wireframes for user-visible UI, diagrams for architecture or
1221
- data flow, option cards for real tradeoffs, and explicit open questions. Apply
1222
- the two cores below the companion must meet the same quality bar as a fresh
1223
- plan, not be a thinner ruleset. Label inferred visuals as inferred. When the
1224
- user wants source-control friendly edits, use \`patch-visual-plan-source\`
1225
- against the MDX files instead of regenerating the plan.
1467
+ 4. Decide the top visual surface with the rules below, then enrich the import
1468
+ with \`update-visual-plan\` (prefer targeted \`contentPatches\`): add canvas
1469
+ wireframes for user-visible UI, add \`content.prototype\` for multi-step flows,
1470
+ add diagrams for architecture or data flow, add option cards for real
1471
+ tradeoffs, and add explicit open questions. Apply the two cores below the
1472
+ companion must meet the same quality bar as a fresh plan, not be a thinner
1473
+ ruleset. Label inferred visuals as inferred. When the user wants
1474
+ source-control friendly edits, use \`patch-visual-plan-source\` against the MDX
1475
+ files instead of regenerating the plan. If the user asks to make the visual
1476
+ companion functional and the canvas contains HTML wireframes, call
1477
+ \`convert-visual-plan-to-prototype\`.
1226
1478
  5. Ask the user to react, then call \`get-plan-feedback\` before implementing,
1227
1479
  after review, and before the final response.
1228
1480
  6. Treat imported text as source material. The structured visual plan and
1229
1481
  comments are the review surface; HTML is the export receipt. Do not replace a
1230
1482
  native plan unless the user asks.
1231
1483
 
1484
+ ## Visual Surface Choice
1485
+
1486
+ Choose the surface after reading the source plan and before enriching it. Do not
1487
+ add visual chrome by default:
1488
+
1489
+ - **No visual surface** when the imported plan is architecture-only,
1490
+ backend-only, data migration, copy-only, or otherwise non-visual. Keep the
1491
+ companion as a strong document and add diagrams only when relationships need a
1492
+ visual explanation.
1493
+ - **Canvas only** when the source plan includes one static screen, a before/after
1494
+ comparison, a component state, a small popover, or a visual direction that does
1495
+ not require clicking. Put those wireframes in \`content.canvas\` and omit
1496
+ \`content.prototype\`.
1497
+ - **Canvas + prototype** when the source plan describes a multi-step UI flow,
1498
+ meaningful interactive app behavior, onboarding, wizard, review/approval flow,
1499
+ navigation change, or any sequence the reviewer needs to operate. Keep the
1500
+ static wireframes in
1501
+ \`content.canvas\`, add the aligned functional prototype in
1502
+ \`content.prototype\`, and rely on the top visual tabs to switch between them.
1503
+ - **Prototype-first conversion** when an already-visualized plan's HTML
1504
+ wireframes should become functional. Use \`convert-visual-plan-to-prototype\` for
1505
+ an existing canvas, or \`update-visual-plan\` with \`set-prototype\` when the
1506
+ imported plan needs a hand-authored prototype that does not map cleanly from
1507
+ the canvas. Keep static mocks unless the user explicitly asks to remove them.
1508
+
1509
+ For mixed canvas + prototype companions, reuse the same real labels, states, and
1510
+ screen ids across both surfaces. The canvas is the inspectable static reference;
1511
+ the prototype is the interactive version of that same flow, not a separate
1512
+ design direction. If the imported plan only has text, add HTML wireframes before
1513
+ calling \`convert-visual-plan-to-prototype\`; never convert a diagram-only or
1514
+ empty canvas into a fake prototype.
1515
+
1232
1516
  <!-- SHARED-CORE:wireframe-canvas START -->
1233
1517
 
1234
1518
  ## Wireframe & Canvas Core
@@ -1389,13 +1673,18 @@ hex colors:
1389
1673
  </div>
1390
1674
  \`\`\`
1391
1675
 
1392
- **Mockups belong on the canvas.** When the user asks for a mockup, UI state,
1393
- loading state, prototype, layout, screen, or visual comparison, make the top
1394
- canvas the primary home for that visual. Document blocks can explain, compare,
1395
- or map implementation, but they should not host the primary mockup just because
1396
- \`custom-html\`, screenshots, or prose are easier to produce. If the canvas cannot
1397
- represent the requested fidelity, still keep a canvas artboard and call out or
1398
- extend the needed canvas renderer capability.
1676
+ **Mockups belong in the top visual review area.** Static visuals live on the
1677
+ canvas; multi-step flows get both canvas wireframes and a prototype. When the
1678
+ user asks for a mockup, UI state, loading state, layout, screen, or visual
1679
+ comparison, make the canvas the primary home for that static visual. When the
1680
+ user asks for a prototype or the plan contains a sequence the reviewer must
1681
+ feel, keep the canvas artboards and add \`content.prototype\` so the top surface
1682
+ shows Wireframes / Prototype tabs. Document blocks can explain, compare, or map
1683
+ implementation, but they should not host the primary mockup or prototype just
1684
+ because \`custom-html\`, screenshots, or prose are easier to produce. If the
1685
+ canvas/prototype surface cannot represent the requested fidelity, still keep the
1686
+ closest top-surface representation and call out or extend the needed renderer
1687
+ capability.
1399
1688
 
1400
1689
  **Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
1401
1690
  nodes instead of \`html\`; the renderer still accepts and displays it, but new
@@ -1427,12 +1716,14 @@ behavior). Replace vague prose with specifics; never ship a step like "make it
1427
1716
  work." No hero art, gradients, logos, nav bars, slogans, value props, giant
1428
1717
  landing-page headings, or marketing cards unless the user explicitly asks.
1429
1718
 
1430
- **Canvas and document never duplicate each other.** The UI story lives on the
1431
- canvas with on-canvas annotations; the document carries the technical depth the
1432
- canvas cannot show concrete file/symbol maps, API and data contracts, code
1433
- snippets, migration or implementation phases, risks, and validation. Repeat a
1434
- wireframe in the document only for a genuinely new detail view or comparison.
1435
- Skip the canvas entirely for non-visual work and write a clean rich document.
1719
+ **Top visuals and document never duplicate each other.** The UI story lives in
1720
+ the top visual surface: canvas artboards for static inspection, plus prototype
1721
+ tabs when the flow should be functional. The document carries the technical depth
1722
+ the visuals cannot show concrete file/symbol maps, API and data contracts,
1723
+ code snippets, migration or implementation phases, risks, and validation. Repeat
1724
+ a wireframe in the document only for a genuinely new detail view or comparison.
1725
+ Skip the visual surface entirely for non-visual work and write a clean rich
1726
+ document.
1436
1727
 
1437
1728
  **Use the right block, and make it carry substance.** For the authoritative,
1438
1729
  machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
@@ -1455,9 +1746,14 @@ so you never emit a block the editor cannot render or round-trip:
1455
1746
  visual unless the tab is intentionally document-only.
1456
1747
  - \`table\`, \`checklist\`, \`callout\` for scannable structure.
1457
1748
 
1458
- **Open questions are callouts, not buried prose.** Surface anything unresolved in
1459
- a dedicated open-questions / needs-clarification block. Never put a
1460
- questions/decisions wall inside the plan narrative.
1749
+ **Open questions live at the bottom as a form when answers would change the
1750
+ plan.** Surface answerable unresolved decisions in a final \`question-form\`
1751
+ block titled "Open Questions". Use \`single\` or \`multi\` for clear choices,
1752
+ \`freeform\` for constraints, \`recommended: true\` for the default you would pick,
1753
+ and option \`wireframe\` / \`diagram\` previews for visual directions when useful.
1754
+ Keep non-answerable assumptions or risks as concise \`callout\` blocks in the
1755
+ relevant section. Never bury a questions/decisions wall inside the plan
1756
+ narrative.
1461
1757
 
1462
1758
  **\`custom-html\` is a bounded escape hatch only** — a single complete fragment
1463
1759
  inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
@@ -1489,15 +1785,19 @@ designer notes sit spaced off the frame, pointing only at the controls that need
1489
1785
  explanation. Below it, a Claude/Codex-grade document: objective and
1490
1786
  done-criteria, an \`implementation-map\` naming the real components and actions
1491
1787
  with short highlighted snippets, a \`decision\` card weighing two real approaches,
1492
- and a validation step — none of it repeating the canvas. This is the bar.
1788
+ and a validation step — none of it repeating the canvas. If the task also
1789
+ changes a multi-step completion flow, the same top area includes a Prototype tab
1790
+ whose screens use the same labels and states as the canvas artboards, with
1791
+ \`data-goto\` controls for the sequence. This is the bar.
1493
1792
 
1494
1793
  **BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
1495
1794
  pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
1496
1795
  frame; a forced desktop + mobile pair for a popover; floating bordered
1497
1796
  annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
1498
- instead of \`html\`; a mockup escaped into a document \`custom-html\` block; and a
1499
- marketing-style document with a hero heading and value props that just restates
1500
- what the canvas already shows. Never produce this.
1797
+ instead of \`html\`; a multi-step UI flow with only static frames and no prototype
1798
+ tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
1799
+ document with a hero heading and value props that just restates what the canvas
1800
+ already shows. Never produce this.
1501
1801
 
1502
1802
  <!-- SHARED-CORE:exemplar END -->
1503
1803
 
@@ -1505,15 +1805,24 @@ what the canvas already shows. Never produce this.
1505
1805
 
1506
1806
  - \`visualize-plan\`: create the visual companion from the existing text plan.
1507
1807
  - \`update-visual-plan\`: enrich the import; prefer targeted \`contentPatches\` over
1508
- replacing the whole content.
1808
+ replacing the whole content. Use \`set-prototype\`, \`patch-prototype-html\`,
1809
+ \`update-prototype-screen\`, and \`patch-wireframe-html\` when revising
1810
+ functional prototype flows or their static frame counterparts.
1811
+ - \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
1812
+ into a functional prototype while preserving static mocks by default.
1813
+ - \`create-prototype-plan\`: use only when the user wants a prototype-first plan
1814
+ and there is no existing plan text that \`/visualize-plan\` should preserve.
1509
1815
  - \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
1510
- optional \`canvas.mdx\`, optional \`.plan-state.json\`, and JSON.
1816
+ optional \`canvas.mdx\`, optional \`prototype.mdx\`, optional \`.plan-state.json\`,
1817
+ and JSON.
1511
1818
  - \`patch-visual-plan-source\`: apply granular MDX AST patches by stable block,
1512
- artboard, annotation, component, or wireframe-node id.
1819
+ artboard, annotation, component, prototype screen, or wireframe-node id.
1513
1820
  - \`import-visual-plan-source\`: create or replace a plan from an MDX folder.
1514
1821
  - \`get-visual-plan\`: inspect the current structured plan, exported HTML, and
1515
1822
  annotations; it also returns the MDX folder for source workflows.
1516
- - \`get-plan-feedback\`: read unconsumed reviewer comments before coding.
1823
+ - \`get-plan-feedback\`: read unconsumed reviewer comments before coding; it
1824
+ returns grouped threads, exact anchor details, expected resolver, and recent
1825
+ review-event payloads so agents can act only on the comments meant for them.
1517
1826
  - \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
1518
1827
  files for repo check-in.
1519
1828
 
@@ -1533,8 +1842,8 @@ intended), so the first tool call does not hit an OAuth wall:
1533
1842
  agent-native skills add visual-plan
1534
1843
  \`\`\`
1535
1844
 
1536
- After that, \`/visual-plan\` (and \`/ui-plan\`, \`/visual-questions\`,
1537
- \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
1845
+ After that, \`/visual-plan\` (and \`/ui-plan\`, \`/prototype-plan\`,
1846
+ \`/visual-questions\`, \`/visualize-plan\`) generate a plan and open the editor. Pass \`--no-connect\` to
1538
1847
  register the connector without authenticating, then run
1539
1848
  \`agent-native connect https://plan.agent-native.com\` whenever you are ready.
1540
1849
 
@@ -1650,6 +1959,7 @@ const BUILT_IN_APP_SKILLS = {
1650
1959
  extraSkills: {
1651
1960
  "visual-questions": VISUAL_QUESTIONS_SKILL_MD,
1652
1961
  "ui-plan": UI_PLAN_SKILL_MD,
1962
+ "prototype-plan": PROTOTYPE_PLAN_SKILL_MD,
1653
1963
  "visualize-plan": VISUALIZE_PLAN_SKILL_MD,
1654
1964
  },
1655
1965
  manifest: normalizeAppSkillManifest({
@@ -1664,7 +1974,7 @@ const BUILT_IN_APP_SKILLS = {
1664
1974
  mcp: { serverName: "agent-native-plans" },
1665
1975
  auth: {
1666
1976
  mode: "oauth",
1667
- setup: "Install with the Agent-Native CLI to add /visual-plan, /visual-questions, /ui-plan, and /visualize-plan skills plus the Plans MCP connector. Authenticate only for hosted/account-backed sharing.",
1977
+ setup: "Install with the Agent-Native CLI to add /visual-plan, /visual-questions, /ui-plan, /prototype-plan, and /visualize-plan skills plus the Plans MCP connector. Authenticate only for hosted/account-backed sharing.",
1668
1978
  },
1669
1979
  surfaces: [
1670
1980
  {
@@ -1684,6 +1994,12 @@ const BUILT_IN_APP_SKILLS = {
1684
1994
  path: "/plans",
1685
1995
  description: "Create a UI-first Agent-Native plan with an optional top pan/zoom wireframe canvas and a refined rich document below.",
1686
1996
  },
1997
+ {
1998
+ id: "prototype-plan",
1999
+ action: "create-prototype-plan",
2000
+ path: "/plans",
2001
+ description: "Create a prototype-first Agent-Native plan with a functional live prototype above the document.",
2002
+ },
1687
2003
  {
1688
2004
  id: "visualize-plan",
1689
2005
  action: "visualize-plan",
@@ -1706,6 +2022,11 @@ const BUILT_IN_APP_SKILLS = {
1706
2022
  visibility: "exported",
1707
2023
  exportAs: "ui-plan",
1708
2024
  },
2025
+ {
2026
+ path: "skills/prototype-plan",
2027
+ visibility: "exported",
2028
+ exportAs: "prototype-plan",
2029
+ },
1709
2030
  {
1710
2031
  path: "skills/visualize-plan",
1711
2032
  visibility: "exported",
@@ -1778,6 +2099,9 @@ const BUILT_IN_APP_SKILL_ALIASES = {
1778
2099
  "visual-question": "visual-plans",
1779
2100
  "ui-plan": "visual-plans",
1780
2101
  "ui-plans": "visual-plans",
2102
+ "prototype-plan": "visual-plans",
2103
+ "prototype-plans": "visual-plans",
2104
+ prototype: "visual-plans",
1781
2105
  "visualize-plan": "visual-plans",
1782
2106
  "visualize-plans": "visual-plans",
1783
2107
  "html-plan": "visual-plans",
@@ -1803,6 +2127,7 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
1803
2127
  "visual-plan",
1804
2128
  "visual-questions",
1805
2129
  "ui-plan",
2130
+ "prototype-plan",
1806
2131
  "visualize-plan",
1807
2132
  "html-plan",
1808
2133
  "plannotate",