@agent-native/core 0.44.3 → 0.45.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 (129) hide show
  1. package/dist/cli/connect.d.ts +2 -1
  2. package/dist/cli/connect.d.ts.map +1 -1
  3. package/dist/cli/connect.js +185 -5
  4. package/dist/cli/connect.js.map +1 -1
  5. package/dist/cli/index.js +27 -0
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/cli/plan-local.d.ts +43 -0
  8. package/dist/cli/plan-local.d.ts.map +1 -0
  9. package/dist/cli/plan-local.js +477 -0
  10. package/dist/cli/plan-local.js.map +1 -0
  11. package/dist/cli/pr-visual-recap-workflow.d.ts +1 -1
  12. package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
  13. package/dist/cli/pr-visual-recap-workflow.js +1 -1
  14. package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
  15. package/dist/cli/recap.d.ts +164 -0
  16. package/dist/cli/recap.d.ts.map +1 -1
  17. package/dist/cli/recap.js +657 -10
  18. package/dist/cli/recap.js.map +1 -1
  19. package/dist/cli/skills.d.ts +6 -2
  20. package/dist/cli/skills.d.ts.map +1 -1
  21. package/dist/cli/skills.js +440 -37
  22. package/dist/cli/skills.js.map +1 -1
  23. package/dist/client/blocks/library/AnnotatedCodeBlock.d.ts.map +1 -1
  24. package/dist/client/blocks/library/AnnotatedCodeBlock.js +18 -4
  25. package/dist/client/blocks/library/AnnotatedCodeBlock.js.map +1 -1
  26. package/dist/client/blocks/library/ApiEndpointBlock.d.ts.map +1 -1
  27. package/dist/client/blocks/library/ApiEndpointBlock.js +11 -7
  28. package/dist/client/blocks/library/ApiEndpointBlock.js.map +1 -1
  29. package/dist/client/blocks/library/DiffBlock.d.ts.map +1 -1
  30. package/dist/client/blocks/library/DiffBlock.js +90 -7
  31. package/dist/client/blocks/library/DiffBlock.js.map +1 -1
  32. package/dist/client/blocks/library/HighlightedCode.d.ts +2 -1
  33. package/dist/client/blocks/library/HighlightedCode.d.ts.map +1 -1
  34. package/dist/client/blocks/library/HighlightedCode.js +2 -2
  35. package/dist/client/blocks/library/HighlightedCode.js.map +1 -1
  36. package/dist/client/blocks/library/JsonExplorerBlock.d.ts.map +1 -1
  37. package/dist/client/blocks/library/JsonExplorerBlock.js +57 -13
  38. package/dist/client/blocks/library/JsonExplorerBlock.js.map +1 -1
  39. package/dist/client/blocks/library/annotation-rail.d.ts +15 -5
  40. package/dist/client/blocks/library/annotation-rail.d.ts.map +1 -1
  41. package/dist/client/blocks/library/annotation-rail.js +35 -24
  42. package/dist/client/blocks/library/annotation-rail.js.map +1 -1
  43. package/dist/client/blocks/library/code-filename-label.d.ts +8 -0
  44. package/dist/client/blocks/library/code-filename-label.d.ts.map +1 -0
  45. package/dist/client/blocks/library/code-filename-label.js +15 -0
  46. package/dist/client/blocks/library/code-filename-label.js.map +1 -0
  47. package/dist/client/blocks/library/code.d.ts.map +1 -1
  48. package/dist/client/blocks/library/code.js +28 -6
  49. package/dist/client/blocks/library/code.js.map +1 -1
  50. package/dist/client/blocks/library/columns.d.ts.map +1 -1
  51. package/dist/client/blocks/library/columns.js +11 -1
  52. package/dist/client/blocks/library/columns.js.map +1 -1
  53. package/dist/client/blocks/library/diff.config.d.ts +1 -1
  54. package/dist/client/blocks/library/diff.config.js.map +1 -1
  55. package/dist/client/blocks/library/narrow-container.d.ts +13 -0
  56. package/dist/client/blocks/library/narrow-container.d.ts.map +1 -0
  57. package/dist/client/blocks/library/narrow-container.js +32 -0
  58. package/dist/client/blocks/library/narrow-container.js.map +1 -0
  59. package/dist/client/blocks/library/question-form.d.ts.map +1 -1
  60. package/dist/client/blocks/library/question-form.js +8 -9
  61. package/dist/client/blocks/library/question-form.js.map +1 -1
  62. package/dist/client/blocks/library/tabs.d.ts.map +1 -1
  63. package/dist/client/blocks/library/tabs.js +11 -5
  64. package/dist/client/blocks/library/tabs.js.map +1 -1
  65. package/dist/client/blocks/types.d.ts +2 -0
  66. package/dist/client/blocks/types.d.ts.map +1 -1
  67. package/dist/client/blocks/types.js.map +1 -1
  68. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  69. package/dist/client/composer/TiptapComposer.js +4 -1
  70. package/dist/client/composer/TiptapComposer.js.map +1 -1
  71. package/dist/client/db-admin/TableEditor.d.ts.map +1 -1
  72. package/dist/client/db-admin/TableEditor.js +3 -1
  73. package/dist/client/db-admin/TableEditor.js.map +1 -1
  74. package/dist/db/client.d.ts +19 -0
  75. package/dist/db/client.d.ts.map +1 -1
  76. package/dist/db/client.js +43 -2
  77. package/dist/db/client.js.map +1 -1
  78. package/dist/db/migrations.d.ts.map +1 -1
  79. package/dist/db/migrations.js +9 -2
  80. package/dist/db/migrations.js.map +1 -1
  81. package/dist/deploy/build.d.ts.map +1 -1
  82. package/dist/deploy/build.js +8 -0
  83. package/dist/deploy/build.js.map +1 -1
  84. package/dist/extensions/html-shell.js +1 -1
  85. package/dist/extensions/html-shell.js.map +1 -1
  86. package/dist/jobs/scheduler.d.ts.map +1 -1
  87. package/dist/jobs/scheduler.js +5 -1
  88. package/dist/jobs/scheduler.js.map +1 -1
  89. package/dist/mcp/build-server.d.ts +1 -0
  90. package/dist/mcp/build-server.d.ts.map +1 -1
  91. package/dist/mcp/build-server.js +7 -3
  92. package/dist/mcp/build-server.js.map +1 -1
  93. package/dist/mcp/oauth-route.d.ts.map +1 -1
  94. package/dist/mcp/oauth-route.js +56 -19
  95. package/dist/mcp/oauth-route.js.map +1 -1
  96. package/dist/mcp/oauth-store.d.ts +1 -0
  97. package/dist/mcp/oauth-store.d.ts.map +1 -1
  98. package/dist/mcp/oauth-store.js +9 -0
  99. package/dist/mcp/oauth-store.js.map +1 -1
  100. package/dist/mcp/server.d.ts.map +1 -1
  101. package/dist/mcp/server.js +9 -4
  102. package/dist/mcp/server.js.map +1 -1
  103. package/dist/mcp-client/errors.js +3 -3
  104. package/dist/mcp-client/errors.js.map +1 -1
  105. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  106. package/dist/server/agent-chat-plugin.js +3 -1
  107. package/dist/server/agent-chat-plugin.js.map +1 -1
  108. package/dist/server/agent-teams.d.ts.map +1 -1
  109. package/dist/server/agent-teams.js +10 -2
  110. package/dist/server/agent-teams.js.map +1 -1
  111. package/dist/server/auth.d.ts.map +1 -1
  112. package/dist/server/auth.js +7 -3
  113. package/dist/server/auth.js.map +1 -1
  114. package/dist/server/recap-image-route.d.ts.map +1 -1
  115. package/dist/server/recap-image-route.js +3 -6
  116. package/dist/server/recap-image-route.js.map +1 -1
  117. package/dist/server/sentry.d.ts.map +1 -1
  118. package/dist/server/sentry.js +12 -5
  119. package/dist/server/sentry.js.map +1 -1
  120. package/dist/server/social-og-image.d.ts.map +1 -1
  121. package/dist/server/social-og-image.js +3 -1
  122. package/dist/server/social-og-image.js.map +1 -1
  123. package/dist/styles/blocks.css +36 -10
  124. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +22 -6
  125. package/docs/content/plan-plugin.md +18 -1
  126. package/docs/content/pr-visual-recap.md +37 -10
  127. package/docs/content/template-plan.md +45 -1
  128. package/package.json +1 -1
  129. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +22 -6
@@ -814,6 +814,37 @@ plan needs a richer review surface.
814
814
  update the plan with \`update-visual-plan\` rather than only changing course in
815
815
  chat, and re-read the approved plan before major steps.
816
816
 
817
+ ## Local-Files Privacy Mode
818
+
819
+ Use local-files privacy mode when the user explicitly asks for no DB writes,
820
+ no hosted Plan app, no Plan MCP publish, fully local files, offline/private
821
+ planning, or when \`AGENT_NATIVE_PLANS_MODE=local-files\` is set. In this mode the
822
+ plan data must never be sent to the Plan MCP server or Plan app action surface.
823
+
824
+ The local-files contract is:
825
+
826
+ - Read source context from local files and shell commands only.
827
+ - Write the plan as a local MDX folder under \`plans/<slug>/\`: \`plan.mdx\`,
828
+ optional \`canvas.mdx\`, optional \`prototype.mdx\`, and optional
829
+ \`.plan-state.json\`.
830
+ - Run \`agent-native plan local preview --dir plans/<slug> --kind plan\` after
831
+ writing or updating the folder. Report the returned local URL or the
832
+ \`/local-plans/<slug>\` route if the local Plan app is running with the same
833
+ \`PLAN_LOCAL_DIR\`.
834
+ - Do **not** call \`create-visual-plan\`, \`create-ui-plan\`,
835
+ \`create-prototype-plan\`, \`create-plan-design\`, \`import-visual-plan-source\`,
836
+ \`update-visual-plan\`, \`patch-visual-plan-source\`, \`get-plan-feedback\`,
837
+ \`export-visual-plan\`, or any hosted Plan tool for that plan.
838
+ - Treat feedback as file or chat feedback: update the MDX files directly, rerun
839
+ the local preview command, and summarize the new local URL/path. Hosted
840
+ comments, sharing, history, and publish/export receipts are unavailable until
841
+ the user explicitly opts into publishing.
842
+
843
+ Local-files mode prevents plan content from going to the Agent-Native Plan
844
+ database. It does not by itself make the coding agent's language model local;
845
+ for that stronger privacy boundary, the host agent/model must also be local or
846
+ otherwise approved by the user.
847
+
817
848
  ## Core Workflow
818
849
 
819
850
  1. Follow the host agent's normal planning flow: inspect the codebase, delegate
@@ -1466,6 +1497,41 @@ schema, API, file, and architecture changes become the same \`data-model\`,
1466
1497
  now they summarize work that exists. A reviewer scans the shape of the change
1467
1498
  before spending attention on the literal lines.
1468
1499
 
1500
+ ## Local-Files Privacy Mode Exception
1501
+
1502
+ Use local-files privacy mode when the user explicitly asks for no DB writes,
1503
+ no hosted Plan app, no Plan MCP publish, fully local files, offline/private
1504
+ recaps, or when \`AGENT_NATIVE_PLANS_MODE=local-files\` is set. This is the only
1505
+ exception to the hosted publish rule below.
1506
+
1507
+ In local-files mode:
1508
+
1509
+ - Read the diff/stat/source context from local files and shell commands only.
1510
+ The existing \`agent-native recap collect-diff\`, \`scan\`, and
1511
+ \`build-prompt --local-files\` helpers are safe to use because they operate on
1512
+ local files and do not write to the Plan database.
1513
+ - Write the recap as a local MDX folder under \`plans/<slug>/\`: \`plan.mdx\`,
1514
+ optional \`canvas.mdx\`, optional \`prototype.mdx\`, and optional
1515
+ \`.plan-state.json\`. Set \`kind: "recap"\` and \`localOnly: true\` in
1516
+ frontmatter/state when authoring the source.
1517
+ - Run \`agent-native plan local preview --dir plans/<slug> --kind recap\` after
1518
+ writing or updating the folder. Report the returned local URL or the
1519
+ \`/local-plans/<slug>\` route if the local Plan app is running with the same
1520
+ \`PLAN_LOCAL_DIR\`.
1521
+ - Do **not** call \`create-visual-recap\`, \`create-visual-plan\`,
1522
+ \`import-visual-plan-source\`, \`update-visual-plan\`,
1523
+ \`patch-visual-plan-source\`, \`get-plan-feedback\`, \`export-visual-plan\`,
1524
+ \`set-resource-visibility\`, or any hosted Plan tool for that recap.
1525
+ - Treat review feedback as file or chat feedback: update the MDX files directly,
1526
+ rerun the local preview command, and summarize the new local URL/path.
1527
+ Hosted comments, sharing, screenshots, usage attachment, and PR sticky comment
1528
+ publishing are unavailable until the user explicitly opts into publishing.
1529
+
1530
+ Local-files mode prevents recap content from going to the Agent-Native Plan
1531
+ database. It does not by itself make the coding agent's language model local;
1532
+ for that stronger privacy boundary, the host agent/model must also be local or
1533
+ otherwise approved by the user.
1534
+
1469
1535
  ## Always Publish As An Agent-Native Plan — Never Inline
1470
1536
 
1471
1537
  The deliverable is ALWAYS a published Agent-Native Plan, created with the
@@ -1476,7 +1542,8 @@ entire value is the hosted, interactive, annotatable plan; an inline summary is
1476
1542
  not a recap, it is the thing a recap replaces. The only supported output is to
1477
1543
  publish the plan and return its absolute URL.
1478
1544
 
1479
- If the \`plan\` MCP server's tools are not available, do NOT improvise an inline
1545
+ Except for the explicit local-files privacy mode above, if the \`plan\` MCP
1546
+ server's tools are not available, do NOT improvise an inline
1480
1547
  recap as a fallback. The usual cause is a connector that did not finish
1481
1548
  connecting this session (it registers zero tools), NOT necessarily an auth
1482
1549
  problem — so do not assume the user must authenticate. Stop and tell the user
@@ -1538,10 +1605,11 @@ evidence:
1538
1605
  - A \`file-tree\` of the changed files with each entry's \`change\` flag, so the
1539
1606
  reviewer sees the footprint of the work at a glance.
1540
1607
  - The split \`diff\` of the KEY changed files, grouped under a \`## Key changes\`
1541
- \`rich-text\` heading in a single vertical \`tabs\` block (file labels as the left
1542
- rail), with a one-line \`summary\` and a few \`annotations\` on each — so the
1543
- reviewer can drop from the high-altitude shape straight into the load-bearing
1544
- code.
1608
+ \`rich-text\` heading in a single horizontal \`tabs\` block (the default
1609
+ orientation, one file per tab), with a one-line \`summary\` and a few
1610
+ \`annotations\` on each — so the reviewer can drop from the high-altitude shape
1611
+ straight into the load-bearing code. Use horizontal file tabs, not a vertical
1612
+ side rail, so the selected file has enough width for the side-by-side diff.
1545
1613
 
1546
1614
  Skip the diff appendix only for a genuinely tiny change that reviews faster as
1547
1615
  plain diff (see "When To Use"); for any change worth recapping, the file-tree and
@@ -1585,7 +1653,226 @@ architecture boxes. The following bar is shared, word for word, with
1585
1653
  wireframe quality, and applies to a recap's standalone \`wireframe\` /
1586
1654
  \`WireframeBlock\` / \`<Screen>\` exactly as it applies to a plan's canvas artboard.
1587
1655
 
1588
- ${WIREFRAME_QUALITY_CORE}
1656
+ <!-- SHARED-CORE:wireframe-quality START -->
1657
+
1658
+ **A wireframe is an HTML mockup. The renderer owns the look; you write the
1659
+ content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
1660
+ screen and set \`data.surface\`. The renderer owns the surface footprint/aspect,
1661
+ the dark/light theme, the hand-drawn font, and the rough.js sketch overlay — you
1662
+ never write \`<html>\`/\`<body>\`/\`<script>\`/\`<style>\` tags, font-family, hex colors,
1663
+ or any width/height/coordinates. You write real HTML layout and real product
1664
+ content; the renderer styles and roughens it.
1665
+
1666
+ **A wireframe block's data is an HTML screen plus a surface:**
1667
+
1668
+ \`\`\`json
1669
+ {
1670
+ "surface": "browser",
1671
+ "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=\\"••••••••\\" /></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>"
1672
+ }
1673
+ \`\`\`
1674
+
1675
+ **Write PLAIN semantic HTML and let the renderer style it.** Bare elements
1676
+ (\`h1\`/\`h2\`/\`h3\`, \`p\`, \`button\`, \`input\`, \`<input type="checkbox">\`, \`a\`, \`hr\`)
1677
+ are auto-themed — no classes needed. Helper classes carry the rest:
1678
+
1679
+ - \`.wf-card\` / \`.wf-box\` — a bordered, padded container (a panel, a list item).
1680
+ - \`.wf-pill\` / \`.wf-chip\` — a rounded tag or filter; add \`.accent\`
1681
+ (\`<span class="wf-pill accent">\`) for the accent-filled variant.
1682
+ - \`.wf-muted\` — secondary/muted text (or use \`<small>\`).
1683
+ - \`button.primary\` or any element with \`[data-primary]\` — the accent-filled
1684
+ primary button.
1685
+
1686
+ **Use the \`--wf-*\` tokens for any custom color, never hex.** The renderer flips
1687
+ these on light/dark, so reading them is what keeps a mockup correct in both
1688
+ themes. For any inline border, background, or text color, reference a token:
1689
+ \`style="border:1.4px solid var(--wf-line)"\`. The tokens are \`--wf-ink\` (text),
1690
+ \`--wf-muted\` (secondary text), \`--wf-line\` (borders/dividers), \`--wf-paper\`
1691
+ (page background), \`--wf-card\` (raised surface), \`--wf-accent\` /
1692
+ \`--wf-accent-fg\` / \`--wf-accent-soft\` (brand action), \`--wf-warn\`, \`--wf-ok\`,
1693
+ and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
1694
+ renderer owns the sketch/clean font.
1695
+
1696
+ **Lay out with inline \`style\` flex/grid.** You write the real layout —
1697
+ \`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
1698
+ renderer never repositions anything. Compose the actual product: reproduce the
1699
+ current screen, then show the modification. Real labels, real counts, real dates,
1700
+ real button text grounded in the screen you read; not lorem or gray bars.
1701
+
1702
+ **Surface presets — match the real footprint, never default to desktop+mobile.**
1703
+ Pick the \`surface\` that matches what the user will actually see:
1704
+
1705
+ - \`browser\`: a web page that needs a browser chrome frame around it.
1706
+ - \`desktop\`: a full desktop app page or app shell.
1707
+ - \`mobile\`: a phone screen, only when the work is genuinely mobile.
1708
+ - \`popover\`: a small floating menu, dropdown, or inline popover.
1709
+ - \`panel\`: a side panel, inspector, or sidebar widget.
1710
+
1711
+ A sidebar popover renders as a small surface, not a desktop page and a phone
1712
+ frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
1713
+ actually changes the layout. For a component or widget, show one broader
1714
+ app-context frame only when placement affects understanding, then the focused
1715
+ component states.
1716
+
1717
+ **Model the actual component shell for small surfaces.** A rendered UI change
1718
+ belongs in a wireframe; reserve \`diagram\` for architecture, dependency, state,
1719
+ or data-flow relationships. Popovers, dropdown menus, command palettes, and
1720
+ context menus use \`surface: "popover"\` unless the surrounding page placement is
1721
+ the point of the change. Dialogs, sheets, inspectors, sidebars, and long
1722
+ property panels use the matching \`panel\` / \`desktop\` surface as appropriate.
1723
+ Show the real chrome: trigger or anchor when it matters, title/header row,
1724
+ top-right actions, separators, fields, options, selected states, body content,
1725
+ and footer actions that are visible in the workflow.
1726
+
1727
+ **Modify, don't redesign.** When the task changes an existing screen, reproduce
1728
+ the current screen's real layout and footprint FIRST, then change only the delta
1729
+ and call it out with a single annotation. Do not restack the page into a new
1730
+ layout. For net-new surfaces, compose from the real app shell.
1731
+
1732
+ **Classify mockup scope before implementation.** Before turning a plan mockup
1733
+ into source code, decide whether each artboard represents the whole page/app
1734
+ shell, a route body inside an existing shell, or a component/sub-surface. If an
1735
+ artboard includes navigation, sidebars, auth banners, or a signup/login form,
1736
+ map those pieces to the real shared shell/auth components instead of nesting the
1737
+ entire mockup inside the current page. When a mockup references the product's
1738
+ standard signup/login page, find and reuse that existing implementation; do not
1739
+ approximate it from the wireframe.
1740
+
1741
+ **Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
1742
+ popover, menu, dialog, toast), show the full screen once, then add a small
1743
+ separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
1744
+ the whole page around it, and do not scale a duplicate up. Pick the matching
1745
+ \`surface\` (e.g. \`popover\`) so the footprint is right; never widen a popover to
1746
+ page width.
1747
+
1748
+ **Loading / skeleton states.** Set \`data.skeleton: true\` on the wireframe and
1749
+ fill the \`html\` with neutral, textless placeholder geometry — boxes and bars
1750
+ built as \`<div>\`s with \`background:var(--wf-line)\` and explicit heights/widths,
1751
+ no labels or copy. The renderer drops borders, sketch, and color into the
1752
+ skeleton register automatically. Never escape to a \`custom-html\` document block
1753
+ to fake a loader.
1754
+
1755
+ **Editing an existing mockup.** To change one element, text, or color in an
1756
+ existing html mockup, do NOT regenerate the frame — call \`update-visual-plan\`
1757
+ with \`contentPatches: [{ op: "patch-wireframe-html", blockId, edits: [{ find,
1758
+ replace }] }]\`. Each \`find\` is a unique snippet of the current html (read it
1759
+ first with \`get-visual-plan\`); set \`all: true\` on an edit to replace every
1760
+ occurrence. The result is re-sanitized.
1761
+
1762
+ **Treat the wireframe border as part of the visible design.** Always wrap HTML
1763
+ wireframe content in a root container with real inner padding before drawing
1764
+ cards, fields, pills, labels, or controls. Use at least 14-16px of padding,
1765
+ \`box-sizing: border-box\`, \`height: 100%\`, and \`gap\` between child rows so the
1766
+ first row never sits flush against the screen border. Keep text away from
1767
+ borders: every container, field, button, menu item, and annotation needs enough
1768
+ padding and line-height to read cleanly in the rendered Plan view.
1769
+
1770
+ **Lay out children safely so they never collide.** Use HTML flex/grid with
1771
+ \`gap\`, \`min-width: 0\`, and sensible overflow. Avoid negative margins, absolute
1772
+ positioning, or fixed child widths that can collide when the renderer switches
1773
+ between light/dark, sketch/clean, or different zoom levels.
1774
+
1775
+ **Do not wrap intentionally single-line labels.** For toolbars, tab rails,
1776
+ breadcrumbs, chip/filter rows, branch and file names, file chips, and code
1777
+ filenames — any deliberately single-line row — do not let long text wrap. Put
1778
+ \`white-space: nowrap\` on the row (and \`overflow: hidden; text-overflow: ellipsis\`
1779
+ on the individual labels that can grow), so the wireframe demonstrates the actual
1780
+ layout behavior instead of producing ugly stacked or vertical text. Use
1781
+ horizontally scrollable or clipped rails for overflow.
1782
+
1783
+ **Fill the frame; keep labels short.** Each artboard is a fixed-size surface — 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 — shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).
1784
+
1785
+ **Persistent chrome bars span the full frame width.** Top bars, app headers,
1786
+ toolbars, and bottom tab/nav bars are full-width chrome, not centered content.
1787
+ Lay each one out as a single flex row that fills the frame
1788
+ (\`style="display:flex;align-items:center;width:100%"\`) and push trailing actions
1789
+ to the right edge with a flex spacer (\`<div style="flex:1"></div>\`) between the
1790
+ leading group and the trailing group — never center a bar inside a narrow,
1791
+ centered block, and never let it collapse to the width of its contents. In a
1792
+ Before/After pair the bar stays full-width in BOTH states even when one state has
1793
+ fewer controls; the spacer absorbs the difference so the remaining controls hold
1794
+ their edge alignment instead of sliding to the center.
1795
+
1796
+ **Pin bottom bars to the bottom of the frame.** For mobile tab bars, footers, and
1797
+ any persistent bottom action row, make the frame itself a flex column at
1798
+ \`height:100%\` (\`style="display:flex;flex-direction:column;height:100%"\`), give the
1799
+ scrolling body \`flex:1\` so it absorbs the slack, and place the bar as the LAST
1800
+ child of the frame (or set \`margin-top:auto\` on it). The bar then sits flush at
1801
+ the bottom of the surface instead of floating directly under the content with an
1802
+ empty band beneath it.
1803
+
1804
+ **Before / after must be comparable.** When showing a state change, preserve the
1805
+ unchanged controls in both states so the reviewer can see exactly what moved or
1806
+ appeared; do not show an added control as a generic box floating elsewhere in
1807
+ the surface. Place the new/changed affordance where the implementation puts it —
1808
+ for example, a new \`Edit with AI\` action in a popover header belongs in the
1809
+ top-right header slot, aligned with the title, not in the body or footer. Use
1810
+ the same frame size, scale, outer padding, border radius, and visual density on
1811
+ both sides unless the change itself alters those properties, and let the frame
1812
+ height fit the content rather than leaving a tall empty lower half.
1813
+
1814
+ **Name the states with the column header, never inside the frame.** Put the two
1815
+ states in a \`columns\` block and set each column's \`label\` to \`Before\` and
1816
+ \`After\` — the renderer draws that label as an \`h4\` heading above each frame. Do
1817
+ NOT bake a \`Before\`/\`After\` pill, title, or heading into the wireframe \`html\`: a
1818
+ label placed inside reads as part of the product UI, lands in a random corner,
1819
+ and clutters the comparison. The column header is the one and only place the
1820
+ state name belongs.
1821
+
1822
+ **Let the surface choose side-by-side vs. stacked.** The \`columns\` renderer lays
1823
+ narrow surfaces (\`mobile\`, \`popover\`, \`panel\`) out side by side, and
1824
+ automatically stacks wide surfaces (\`desktop\`, \`browser\`) vertically at full
1825
+ document width so a large frame is never crushed into a half-width column and
1826
+ cropped. Author both wireframes with the real \`surface\` and the matching
1827
+ \`Before\`/\`After\` column labels; do not hand-stack the pair into separate
1828
+ top-level wireframes or duplicate the state name as body content.
1829
+
1830
+ **Good example — a contacts list, surface \`browser\`.** A small, real screen
1831
+ composed from the helper classes and tokens, layout in inline flex, no fonts or
1832
+ hex colors:
1833
+
1834
+ \`\`\`html
1835
+ <div
1836
+ style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
1837
+ >
1838
+ <div style="display:flex;align-items:center;justify-content:space-between">
1839
+ <h1>Contacts</h1>
1840
+ <button class="primary">New contact</button>
1841
+ </div>
1842
+ <div style="display:flex;gap:6px">
1843
+ <span class="wf-pill accent">All 128</span>
1844
+ <span class="wf-pill">Favorites</span>
1845
+ <span class="wf-pill">Archived</span>
1846
+ </div>
1847
+ <div
1848
+ class="wf-card"
1849
+ style="display:flex;flex-direction:column;gap:0;padding:0"
1850
+ >
1851
+ <div
1852
+ style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)"
1853
+ >
1854
+ <div
1855
+ style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
1856
+ ></div>
1857
+ <div style="flex:1">
1858
+ <strong>Jane Cooper</strong><br /><small>jane@acme.co</small>
1859
+ </div>
1860
+ <span class="wf-pill">Lead</span>
1861
+ </div>
1862
+ <div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
1863
+ <div
1864
+ style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
1865
+ ></div>
1866
+ <div style="flex:1">
1867
+ <strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>
1868
+ </div>
1869
+ <span class="wf-pill">Customer</span>
1870
+ </div>
1871
+ </div>
1872
+ </div>
1873
+ \`\`\`
1874
+
1875
+ <!-- SHARED-CORE:wireframe-quality END -->
1589
1876
 
1590
1877
  Use the standard \`WireframeBlock\` / \`<Screen>\` format so the Plan viewer owns the
1591
1878
  surface frame, theme, and sketchy/clean toggle. HTML wireframes are appropriate
@@ -1602,6 +1889,11 @@ text-match screenshot is not enough; visually inspect the captured image.
1602
1889
 
1603
1890
  ## Open And Report The Recap
1604
1891
 
1892
+ In local-files privacy mode, report the local preview URL/path from
1893
+ \`agent-native plan local preview\` or the \`/local-plans/<slug>\` route for a local
1894
+ Plan app using the same \`PLAN_LOCAL_DIR\`. Do not invent a hosted URL and do not
1895
+ publish just to get an absolute Plan link.
1896
+
1605
1897
  After creating the recap, link the reviewer to the rendered plan with an
1606
1898
  **absolute URL on the origin whose database actually holds the plan**. That
1607
1899
  origin is the Plan MCP server you just created the recap through — NOT whatever
@@ -1645,7 +1937,9 @@ artifacts, not as the main way to open the recap.
1645
1937
  ## Diff → Block Mapping
1646
1938
 
1647
1939
  Map each kind of change to the block that carries it, derived mechanically from
1648
- the actual diff:
1940
+ the actual diff. The names below are the CONCEPTUAL block types, not the JSX
1941
+ tags — resolve every conceptual name to its exact tag + prop schema with the
1942
+ \`get-plan-blocks\` tool (see "Block reference" below) before authoring.
1649
1943
 
1650
1944
  - **Schema / migration change** → \`data-model\` for the resulting entities,
1651
1945
  fields, and relations. Flag what moved per field/entity with
@@ -1675,35 +1969,33 @@ the actual diff:
1675
1969
  pair that note with a split \`diff\` for the literal lines.
1676
1970
  - **Any meaningful code hunk** → \`diff\` with \`mode: "split"\`, carrying the real
1677
1971
  \`before\` / \`after\` text and the \`filename\` / \`language\`. Split mode is the
1678
- default for a recap because before/after legibility is the whole point. Give
1679
- every \`diff\` a one-line \`summary\` saying what the hunk changes and why; it
1680
- renders as a description above the code so the reviewer reads intent first.
1681
- Never leave a diff unlabeled.
1972
+ default for recap code review because before/after legibility is the point;
1973
+ use \`mode: "unified"\` only for a genuinely narrow standalone hunk where
1974
+ side-by-side would hide the code. Give every \`diff\` a one-line \`summary\`
1975
+ saying what the hunk changes and why; it renders as a description above the
1976
+ code so the reviewer reads intent first. Never leave a diff unlabeled.
1682
1977
  For the KEY changed files, attach \`annotations\` to the \`diff\` so the recap
1683
1978
  calls out what each important hunk does — this is the headline affordance for
1684
- annotating the key files updated. Each annotation is
1685
- \`{ side?: "before" | "after"; lines: "13" | "13-15"; label?: string; note }\`
1686
- and anchors to the AFTER-side line numbers by default (set \`side: "before"\` to
1687
- point at removed lines). Keep it to a few high-signal notes per file, not one
1688
- per line.
1979
+ annotating the key files updated. Each annotation anchors to the AFTER-side
1980
+ line numbers by default (set \`side: "before"\` to point at removed lines). Keep
1981
+ it to a few high-signal notes per file, not one per line.
1689
1982
  When several key files each need a substantial diff, introduce the group with a
1690
1983
  \`rich-text\` heading block whose markdown is \`## Key changes\`, then place the
1691
- \`diff\` blocks under it in a reusable \`tabs\` block with
1692
- \`orientation: "vertical"\` so file labels form a left rail and the selected
1693
- file's split diff renders on the right. Let that heading label the section — do
1694
- NOT also set a \`title\` on the \`tabs\` block. Keep each tab label to the file
1695
- path or a short basename plus directory hint.
1984
+ \`diff\` blocks under it in a reusable \`tabs\` block with horizontal orientation
1985
+ (the default — omit \`orientation\`) so the selected file's split diff gets the
1986
+ full document width. Let that heading label the section — do NOT also set a
1987
+ \`title\` on the \`tabs\` block. Keep each tab label to the file path or a short
1988
+ basename plus directory hint.
1696
1989
  If the recap ends with more than one supporting diff, that trailing diff
1697
- appendix should be one vertical \`tabs\` block under its own \`## Key changes\`
1990
+ appendix should be one horizontal \`tabs\` block under its own \`## Key changes\`
1698
1991
  heading, not a stack of separate \`diff\` blocks.
1699
1992
  - **Brand-new file or a substantial added block with no meaningful "before"** →
1700
1993
  \`annotated-code\` rather than a one-sided split \`diff\`. Carry the real new code
1701
1994
  with its \`filename\` / \`language\` and anchor a few high-signal notes to the lines
1702
- that matter (\`{ lines: "12" | "12-18"; label?; note }\`) so the reviewer reads
1703
- what the new code does, not code for code's sake. Keep split \`diff\` for true
1704
- before/after hunks where the removed lines still carry meaning, and group
1705
- several annotated walkthroughs in a vertical \`tabs\` block the same way diffs are
1706
- grouped.
1995
+ that matter so the reviewer reads what the new code does, not code for code's
1996
+ sake. Keep split \`diff\` for true before/after hunks where the removed lines
1997
+ still carry meaning, and group several annotated walkthroughs in a horizontal
1998
+ \`tabs\` block the same way diffs are grouped.
1707
1999
  - **Files added / removed / renamed** → \`file-tree\` with each entry's \`change\`
1708
2000
  flag (\`added\`, \`removed\`, \`modified\`, \`renamed\`) and a short \`note\`; attach a
1709
2001
  \`snippet\` only when one tells the reviewer something the path does not.
@@ -1713,14 +2005,13 @@ the actual diff:
1713
2005
  or a short state/flow sequence. Use realistic UI surfaces: for a popover
1714
2006
  change, show a popover with its title row, top-right actions, options/fields,
1715
2007
  and any opened prompt/menu anchored to the correct trigger. Keep the body lean:
1716
- the wireframe carries the UI story, while the file tree and split \`diff\`
2008
+ the wireframe carries the UI story, while the file tree and \`diff\`
1717
2009
  blocks carry implementation evidence.
1718
2010
  - **Architecture or data-flow shift** → \`diagram\` with \`data.html\` / \`data.css\`
1719
2011
  as a two-panel before/after, layered, or swimlane layout, or \`mermaid\` for a
1720
- quick graph. Use the two-dimensional layouts the Document Quality core
1721
- prescribes; do not reduce a structural change to a left-to-right chain.
1722
- Do not use \`diagram\` as a stand-in for rendered UI controls; UI changes need
1723
- \`wireframe\` blocks.
2012
+ quick graph. Use two-dimensional layouts; do not reduce a structural change to
2013
+ a left-to-right chain. Do not use \`diagram\` as a stand-in for rendered UI
2014
+ controls; UI changes need \`wireframe\` blocks.
1724
2015
  Diagram HTML/CSS should use renderer-owned primitives such as
1725
2016
  \`.diagram-panel\`, \`.diagram-card\`, \`.diagram-node\`, \`.diagram-box\`,
1726
2017
  \`.diagram-pill\`, \`.diagram-muted\`, and \`[data-rough]\`; these map to the plan's
@@ -1733,6 +2024,56 @@ the actual diff:
1733
2024
  the objective the diff served, the key decisions visible in it, and the risks a
1734
2025
  reviewer should weigh. This is the only place the model writes freely.
1735
2026
 
2027
+ ## Block reference — call \`get-plan-blocks\`, do not memorize tags
2028
+
2029
+ The conceptual block names above (\`api-endpoint\`, \`data-model\`, \`json-explorer\`,
2030
+ \`tabs\`, …) are NOT the JSX tags you author with, and the exact tags, required
2031
+ fields, and prop shapes change as the block library evolves. Do not author from
2032
+ memorized tags — they drift and silently produce a wrong tag (\`ApiEndpoint\`
2033
+ instead of \`Endpoint\`, \`JsonExplorer\` instead of \`Json\`, \`Tabs\` instead of
2034
+ \`TabsBlock\`) that errors on import.
2035
+
2036
+ **Before writing any structured plan content, call \`get-plan-blocks\` on the
2037
+ \`plan\` MCP server.** It returns the authoritative, always-current block
2038
+ vocabulary generated live from the app's own block registry — the same config
2039
+ the renderer and MDX round-trip use — so it can never be stale even if this
2040
+ SKILL.md is an old installed copy:
2041
+
2042
+ - \`get-plan-blocks\` (default \`format: "reference"\`) → a compact table of every
2043
+ block's runtime \`type\`, exact MDX \`<Tag>\`, placement, and key data fields.
2044
+ This is your map from each conceptual name above to its real tag and props.
2045
+ - \`get-plan-blocks\` with \`format: "schema"\` → the full per-block JSON Schema
2046
+ plus a worked example for each block, when you need exact field types,
2047
+ enums, or nesting (e.g. \`Diff.annotations\`, \`Endpoint.params[].in\`,
2048
+ \`DataModel.entities[].fields[]\`).
2049
+
2050
+ Author the recap source against the tags and schemas that call returns. The
2051
+ complete set of valid block-level tags is whatever \`get-plan-blocks\` lists;
2052
+ any other capitalized tag at the block level is rejected on import with an
2053
+ "Unknown plan block" / "did you mean" error. Lowercase HTML tags inside
2054
+ \`rich-text\`/markdown prose (\`<div>\`, \`<span>\`, \`<code>\`, \`<br>\`, …) are always
2055
+ fine — only capitalized component-style block tags are validated.
2056
+
2057
+ A few recap-specific authoring rules the registry table cannot encode:
2058
+
2059
+ - Every block takes a REQUIRED \`id\` (unique across the whole plan) plus the
2060
+ shared optional \`summary\` / \`editable\` envelope; give a block a heading by
2061
+ placing a \`rich-text\` block with a Markdown \`###\` heading directly above it
2062
+ (blocks no longer take a \`title\`).
2063
+ - \`Endpoint\`: prose \`description\` is the MDX **children** (body between the
2064
+ tags), not an attribute; for a WebSocket upgrade use \`method="GET"\`. Each
2065
+ request/response \`example\` is a JSON **string** (the renderer parses it into
2066
+ the JSON explorer), so keep it a single parseable JSON value.
2067
+ - \`TabsBlock\`: the whole \`tabs\` array (including nested child blocks) is ONE
2068
+ JSON \`tabs={[…]}\` prop — there is NO nested \`<Tab>\` element.
2069
+ - \`WireframeBlock\`: its body is a single \`<Screen surface ... html=… />\` subtree
2070
+ (nested MDX, not a flat prop); \`html\` must be a single-quoted string or static
2071
+ template literal, never a dynamic \`html={someVar}\` expression. See the
2072
+ Wireframe Quality core above for the HTML rules.
2073
+ - \`Diagram\`: the whole payload is one \`data={{ html?, css?, nodes?, edges?, … }}\`
2074
+ attribute and requires either \`html\` or at least one node; \`Mermaid\` is its
2075
+ own separate block (\`source\` text), not a \`Diagram\` prop.
2076
+
1736
2077
  ## Before / After Is The Headline
1737
2078
 
1738
2079
  The recap's center of gravity is the before/after comparison. For document-body
@@ -1744,8 +2085,11 @@ comparisons there are two primitives, and they cover the whole need together:
1744
2085
  shape against the new shape in one glance. This is the right primitive for
1745
2086
  "the schema went from X to Y" or "the endpoint contract changed like this."
1746
2087
  Do not use \`columns\` simply to compact or group a list of API endpoints.
1747
- - **\`diff\` with \`mode: "split"\`** — for **code**. The split renders the literal
1748
- removed and added lines side by side. Use it for the actual hunks.
2088
+ - **\`diff\`** — for **code**. It renders the literal removed and added lines. Use
2089
+ it for the actual hunks. Use split mode by default for recap code review;
2090
+ reserve \`mode: "unified"\` for genuinely narrow standalone hunks where
2091
+ side-by-side would hide the code. Key-file diff groups should use horizontal
2092
+ tabs so split diffs get the full document width.
1749
2093
 
1750
2094
  For UI diffs, wireframes are the visual comparison primitive. Use before/after
1751
2095
  wireframes when the comparison clarifies the change; use after-only or a state
@@ -1755,8 +2099,8 @@ explanation. The Wireframe Quality core owns the before/after layout choice —
1755
2099
  the \`columns\` renderer keeps narrow surfaces side by side and auto-stacks wide
1756
2100
  \`desktop\`/\`browser\` frames vertically; never hand-build a side-by-side
1757
2101
  wireframe layout in \`custom-html\`. For document-body
1758
- comparisons, there is no other multi-column primitive — \`columns\` plus split
1759
- \`diff\` are the whole comparison vocabulary. Do not hand-build side-by-side
2102
+ comparisons, there is no other multi-column primitive — \`columns\` plus the
2103
+ \`diff\` block are the whole comparison vocabulary. Do not hand-build side-by-side
1760
2104
  layouts in \`custom-html\`, and do not stack two \`data-model\` blocks vertically
1761
2105
  and call it a comparison when \`columns\` exists to put them side by side.
1762
2106
 
@@ -2032,6 +2376,10 @@ export const BUILT_IN_APP_SKILLS = {
2032
2376
  skillName: "visual-plan",
2033
2377
  extraSkills: {
2034
2378
  "visual-recap": VISUAL_RECAP_SKILL_MD,
2379
+ "visual-questions": VISUAL_QUESTIONS_SKILL_MD,
2380
+ "ui-plan": UI_PLAN_SKILL_MD,
2381
+ "prototype-plan": PROTOTYPE_PLAN_SKILL_MD,
2382
+ "plan-design": PLAN_DESIGN_SKILL_MD,
2035
2383
  },
2036
2384
  manifest: normalizeAppSkillManifest({
2037
2385
  schemaVersion: 1,
@@ -2045,7 +2393,7 @@ export const BUILT_IN_APP_SKILLS = {
2045
2393
  mcp: { serverName: "agent-native-plans" },
2046
2394
  auth: {
2047
2395
  mode: "oauth",
2048
- setup: "Install with the Agent-Native CLI to add the /visual-plan and /visual-recap skills plus the Plan MCP connector. Authenticate only for hosted/account-backed sharing.",
2396
+ setup: "Install with the Agent-Native CLI to add the /visual-plan, /visual-recap, /ui-plan, /prototype-plan, /plan-design, and /visual-questions skills plus the Plan MCP connector. Authenticate only for hosted/account-backed sharing.",
2049
2397
  },
2050
2398
  surfaces: [
2051
2399
  {
@@ -2060,6 +2408,30 @@ export const BUILT_IN_APP_SKILLS = {
2060
2408
  path: "/plans",
2061
2409
  description: "Create a visual recap plan from a PR, commit, branch, or git diff for high-altitude review.",
2062
2410
  },
2411
+ {
2412
+ id: "ui-plan",
2413
+ action: "create-ui-plan",
2414
+ path: "/plans",
2415
+ description: "Create a UI-first Agent-Native plan with an optional top pan/zoom wireframe canvas and a refined rich document below.",
2416
+ },
2417
+ {
2418
+ id: "prototype-plan",
2419
+ action: "create-prototype-plan",
2420
+ path: "/plans",
2421
+ description: "Create a prototype-first Agent-Native plan with a functional live prototype above the document.",
2422
+ },
2423
+ {
2424
+ id: "plan-design",
2425
+ action: "create-plan-design",
2426
+ path: "/plans",
2427
+ description: "Create a full-fidelity Agent-Native design plan with a Design canvas tab and optional matching Prototype tab.",
2428
+ },
2429
+ {
2430
+ id: "visual-questions",
2431
+ action: "create-visual-questions",
2432
+ path: "/plans",
2433
+ description: "Create a rich visual intake questionnaire for explicit /visual-questions workflows.",
2434
+ },
2063
2435
  ],
2064
2436
  skills: [
2065
2437
  {
@@ -2072,6 +2444,26 @@ export const BUILT_IN_APP_SKILLS = {
2072
2444
  visibility: "exported",
2073
2445
  exportAs: "visual-recap",
2074
2446
  },
2447
+ {
2448
+ path: "skills/visual-questions",
2449
+ visibility: "exported",
2450
+ exportAs: "visual-questions",
2451
+ },
2452
+ {
2453
+ path: "skills/ui-plan",
2454
+ visibility: "exported",
2455
+ exportAs: "ui-plan",
2456
+ },
2457
+ {
2458
+ path: "skills/prototype-plan",
2459
+ visibility: "exported",
2460
+ exportAs: "prototype-plan",
2461
+ },
2462
+ {
2463
+ path: "skills/plan-design",
2464
+ visibility: "exported",
2465
+ exportAs: "plan-design",
2466
+ },
2075
2467
  ],
2076
2468
  hostAdapters: [
2077
2469
  "codex-plugin",
@@ -2139,6 +2531,13 @@ const BUILT_IN_APP_SKILL_ALIASES = {
2139
2531
  "visual-recaps": "visual-plans",
2140
2532
  "code-review-recap": "visual-plans",
2141
2533
  "code-review-recaps": "visual-plans",
2534
+ "ui-plan": "visual-plans",
2535
+ "prototype-plan": "visual-plans",
2536
+ "plan-design": "visual-plans",
2537
+ "plan-designs": "visual-plans",
2538
+ "design-plan": "visual-plans",
2539
+ "design-plans": "visual-plans",
2540
+ "visual-questions": "visual-plans",
2142
2541
  "html-plan": "visual-plans",
2143
2542
  "plan-mode": "visual-plans",
2144
2543
  plannotate: "visual-plans",
@@ -2162,6 +2561,10 @@ const BUILT_IN_APP_SKILL_DISPLAY_ALIASES = {
2162
2561
  "visual-plan",
2163
2562
  "visual-recap",
2164
2563
  "code-review-recap",
2564
+ "ui-plan",
2565
+ "prototype-plan",
2566
+ "plan-design",
2567
+ "visual-questions",
2165
2568
  "html-plan",
2166
2569
  "plannotate",
2167
2570
  ],