@agent-native/core 0.121.2 → 0.122.1

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 (588) hide show
  1. package/README.md +4 -12
  2. package/corpus/README.md +2 -2
  3. package/corpus/core/CHANGELOG.md +148 -0
  4. package/corpus/core/docs/content/actions.mdx +2 -2
  5. package/corpus/core/docs/content/agent-surfaces.mdx +1 -1
  6. package/corpus/core/docs/content/authentication.mdx +2 -0
  7. package/corpus/core/docs/content/deployment.mdx +36 -0
  8. package/corpus/core/docs/content/http-api.mdx +266 -0
  9. package/corpus/core/docs/content/syncing-template-changes.mdx +159 -0
  10. package/corpus/core/package.json +2 -1
  11. package/corpus/core/src/a2a/activity.ts +38 -27
  12. package/corpus/core/src/a2a/client.ts +57 -4
  13. package/corpus/core/src/agent/engine/builder-engine.ts +35 -4
  14. package/corpus/core/src/agent/run-manager.ts +20 -1
  15. package/corpus/core/src/agent/run-store.ts +4 -1
  16. package/corpus/core/src/agent/types.ts +28 -8
  17. package/corpus/core/src/chat-threads/store.ts +45 -0
  18. package/corpus/core/src/checkpoints/index.ts +2 -0
  19. package/corpus/core/src/checkpoints/route-match.ts +13 -0
  20. package/corpus/core/src/cli/create.ts +105 -17
  21. package/corpus/core/src/cli/index.ts +20 -0
  22. package/corpus/core/src/cli/template-baseline.ts +410 -0
  23. package/corpus/core/src/cli/template-sync.ts +1004 -0
  24. package/corpus/core/src/cli/templates-meta.ts +1 -0
  25. package/corpus/core/src/client/AssistantChat.tsx +38 -12
  26. package/corpus/core/src/client/NewWorkspaceAppFlow.tsx +75 -10
  27. package/corpus/core/src/client/chat/message-components.tsx +127 -66
  28. package/corpus/core/src/client/chat/tool-call-display.tsx +29 -5
  29. package/corpus/core/src/client/error-format.ts +18 -0
  30. package/corpus/core/src/client/org/OrgSwitcher.tsx +30 -8
  31. package/corpus/core/src/client/org/TeamPage.tsx +7 -6
  32. package/corpus/core/src/client/settings/SettingsPanel.tsx +9 -9
  33. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +12 -2
  34. package/corpus/core/src/client/sse-event-processor.ts +3 -0
  35. package/corpus/core/src/data-widgets/index.ts +41 -0
  36. package/corpus/core/src/deploy/build.ts +11 -9
  37. package/corpus/core/src/extensions/url-safety.ts +67 -4
  38. package/corpus/core/src/integrations/webhook-handler.ts +63 -9
  39. package/corpus/core/src/org/auto-join-domain.ts +4 -3
  40. package/corpus/core/src/org/context.ts +108 -39
  41. package/corpus/core/src/org/index.ts +5 -0
  42. package/corpus/core/src/org/service-identity.ts +60 -0
  43. package/corpus/core/src/provider-api/index.ts +22 -1
  44. package/corpus/core/src/scripts/docs/search.ts +12 -1
  45. package/corpus/core/src/server/agent-chat/context-tools.ts +9 -4
  46. package/corpus/core/src/server/agent-chat/framework-prompts.ts +38 -66
  47. package/corpus/core/src/server/agent-chat-plugin.ts +17 -10
  48. package/corpus/core/src/server/agents-bundle.ts +84 -5
  49. package/corpus/core/src/server/auth.ts +4 -3
  50. package/corpus/core/src/server/builder-browser.ts +47 -19
  51. package/corpus/core/src/server/core-routes-plugin.ts +2 -2
  52. package/corpus/core/src/server/credential-provider.ts +209 -68
  53. package/corpus/core/src/server/index.ts +3 -0
  54. package/corpus/core/src/server/prompts/framework-core-compact.ts +6 -13
  55. package/corpus/core/src/server/prompts/framework-core.ts +9 -21
  56. package/corpus/core/src/server/prompts/index.ts +0 -1
  57. package/corpus/core/src/server/prompts/shared-rules.ts +19 -11
  58. package/corpus/core/src/server/ssr-handler.ts +13 -2
  59. package/corpus/core/src/settings/user-settings.ts +13 -1
  60. package/corpus/core/src/shared/cache-control.ts +141 -0
  61. package/corpus/core/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  62. package/corpus/core/src/templates/chat/_gitignore +1 -0
  63. package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +0 -7
  64. package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  65. package/corpus/core/src/templates/default/app/root.tsx +1 -1
  66. package/corpus/core/src/templates/default/public/manifest.json +2 -2
  67. package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  68. package/corpus/core/src/templates/workspace-core/.agents/skills/performance/SKILL.md +19 -0
  69. package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  70. package/corpus/core/src/templates/workspace-core/.agents/skills/visual-answer/SKILL.md +1 -0
  71. package/corpus/core/src/vite/agents-bundle-plugin.ts +7 -6
  72. package/corpus/core/src/vite/client.ts +69 -3
  73. package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +4 -5
  74. package/corpus/templates/analytics/.agents/skills/admin-surfaces/SKILL.md +55 -0
  75. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +10 -0
  76. package/corpus/templates/analytics/.agents/skills/dashboard-management/references/template-catalog-and-demo.md +62 -0
  77. package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +85 -0
  78. package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +27 -2
  79. package/corpus/templates/analytics/.agents/skills/data-querying/references/inline-chart-embeds.md +139 -0
  80. package/corpus/templates/analytics/.agents/skills/monitoring/SKILL.md +77 -0
  81. package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  82. package/corpus/templates/analytics/AGENTS.md +91 -563
  83. package/corpus/templates/analytics/_gitignore +1 -0
  84. package/corpus/templates/analytics/actions/bigquery.ts +12 -4
  85. package/corpus/templates/analytics/actions/generate-chart.ts +5 -5
  86. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +30 -1
  87. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -23
  88. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +3 -0
  89. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
  90. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +1 -0
  91. package/corpus/templates/analytics/app/routes/_index.tsx +1 -1
  92. package/corpus/templates/analytics/changelog/2026-07-24-analytics-finds-saved-dashboards-and-queries-far-more-reliab.md +6 -0
  93. package/corpus/templates/analytics/changelog/2026-07-24-notion-access-errors-now-explain-that-a-page-needs-sharing-w.md +6 -0
  94. package/corpus/templates/analytics/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  95. package/corpus/templates/analytics/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  96. package/corpus/templates/analytics/package.json +1 -1
  97. package/corpus/templates/analytics/public/manifest.json +1 -1
  98. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +7 -0
  99. package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +191 -30
  100. package/corpus/templates/analytics/server/lib/bigquery.ts +11 -1
  101. package/corpus/templates/analytics/server/lib/notion.ts +15 -4
  102. package/corpus/templates/analytics/server/plugins/agent-chat.ts +10 -0
  103. package/corpus/templates/analytics/server/plugins/auth.ts +1 -1
  104. package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  105. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +0 -2
  106. package/corpus/templates/assets/app/routes/_index.tsx +1 -1
  107. package/corpus/templates/assets/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  108. package/corpus/templates/assets/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  109. package/corpus/templates/assets/server/plugins/auth.ts +1 -1
  110. package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  111. package/corpus/templates/brain/_gitignore +1 -0
  112. package/corpus/templates/brain/app/lib/brain.ts +0 -7
  113. package/corpus/templates/brain/app/routes/_index.tsx +1 -2
  114. package/corpus/templates/brain/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  115. package/corpus/templates/brain/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  116. package/corpus/templates/brain/package.json +1 -1
  117. package/corpus/templates/brain/public/manifest.json +1 -1
  118. package/corpus/templates/brain/server/plugins/auth.ts +1 -1
  119. package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  120. package/corpus/templates/calendar/_gitignore +1 -0
  121. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +0 -6
  122. package/corpus/templates/calendar/app/routes/_app._index.tsx +1 -1
  123. package/corpus/templates/calendar/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  124. package/corpus/templates/calendar/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  125. package/corpus/templates/calendar/package.json +1 -1
  126. package/corpus/templates/calendar/public/manifest.json +1 -1
  127. package/corpus/templates/calendar/server/plugins/auth.ts +1 -1
  128. package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  129. package/corpus/templates/chat/_gitignore +1 -0
  130. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +0 -7
  131. package/corpus/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  132. package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  133. package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +34 -0
  134. package/corpus/templates/clips/AGENTS.md +5 -4
  135. package/corpus/templates/clips/_gitignore +1 -0
  136. package/corpus/templates/clips/actions/cleanup-transcript.ts +5 -0
  137. package/corpus/templates/clips/actions/get-recording-insights.ts +44 -8
  138. package/corpus/templates/clips/actions/get-recording-player-data.ts +39 -70
  139. package/corpus/templates/clips/actions/import-loom-recording.ts +53 -98
  140. package/corpus/templates/clips/actions/lib/loom-import-job.ts +260 -0
  141. package/corpus/templates/clips/actions/list-clip-views.ts +2 -4
  142. package/corpus/templates/clips/actions/list-recordings.ts +69 -19
  143. package/corpus/templates/clips/actions/list-viewers.ts +5 -2
  144. package/corpus/templates/clips/actions/regenerate-summary.ts +5 -1
  145. package/corpus/templates/clips/actions/request-transcript.ts +28 -1
  146. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +21 -1
  147. package/corpus/templates/clips/app/components/library/library-layout.tsx +0 -7
  148. package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +14 -1
  149. package/corpus/templates/clips/app/components/player/insights-panel.tsx +8 -20
  150. package/corpus/templates/clips/app/components/player/recording-views-badge.tsx +335 -0
  151. package/corpus/templates/clips/app/components/player/video-player.tsx +13 -8
  152. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -1
  153. package/corpus/templates/clips/app/i18n/en-US.ts +13 -2
  154. package/corpus/templates/clips/app/lib/capture-permissions.ts +110 -0
  155. package/corpus/templates/clips/app/lib/recording-link.ts +32 -0
  156. package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
  157. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +27 -0
  158. package/corpus/templates/clips/app/routes/_index.tsx +1 -1
  159. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +52 -15
  160. package/corpus/templates/clips/app/routes/record.tsx +82 -31
  161. package/corpus/templates/clips/app/routes/share.$shareId.tsx +42 -31
  162. package/corpus/templates/clips/changelog/2026-07-24-clip-pages-now-show-a-view-count-with-viewer-avatars-next-to.md +6 -0
  163. package/corpus/templates/clips/changelog/2026-07-24-clip-summaries-read-like-a-description-you-d-write-yourself-.md +6 -0
  164. package/corpus/templates/clips/changelog/2026-07-24-clip-view-counts-now-separate-human-views-from-agent-views-s.md +6 -0
  165. package/corpus/templates/clips/changelog/2026-07-24-clips-actions-can-now-be-called-by-org-service-tokens-so-ext.md +6 -0
  166. package/corpus/templates/clips/changelog/2026-07-24-clips-no-longer-briefly-shows-a-dock-icon-while-launching.md +6 -0
  167. package/corpus/templates/clips/changelog/2026-07-24-fixed-owner-and-editor-share-links-redirecting-to-the-record.md +6 -0
  168. package/corpus/templates/clips/changelog/2026-07-24-meeting-and-note-recordings-now-start-as-a-compact-pill-on-t.md +6 -0
  169. package/corpus/templates/clips/changelog/2026-07-24-new-clips-now-copy-a-shareable-link-instead-of-the-owner-onl.md +6 -0
  170. package/corpus/templates/clips/changelog/2026-07-24-opening-a-share-link-as-the-clip-s-owner-now-goes-straight-t.md +6 -0
  171. package/corpus/templates/clips/changelog/2026-07-24-permissions-and-rewind-controls-now-use-compact-consistent-h.md +6 -0
  172. package/corpus/templates/clips/changelog/2026-07-24-quitting-the-desktop-app-no-longer-shows-a-false-macos-crash.md +6 -0
  173. package/corpus/templates/clips/changelog/2026-07-24-screen-recording-permission-errors-now-name-the-exact-app-to.md +6 -0
  174. package/corpus/templates/clips/changelog/2026-07-24-the-desktop-app-now-copies-a-new-clip-s-share-link-to-your-c.md +6 -0
  175. package/corpus/templates/clips/changelog/2026-07-24-the-recording-toolbar-now-stays-above-other-apps-including-o.md +6 -0
  176. package/corpus/templates/clips/changelog/2026-07-24-transcript-captions-now-use-real-speech-timings-instead-of-a.md +6 -0
  177. package/corpus/templates/clips/changelog/2026-07-24-video-playback-no-longer-stutters-and-replays-the-last-momen.md +6 -0
  178. package/corpus/templates/clips/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  179. package/corpus/templates/clips/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  180. package/corpus/templates/clips/chrome-extension/src/background.ts +17 -1
  181. package/corpus/templates/clips/desktop/package.json +2 -0
  182. package/corpus/templates/clips/desktop/src/app.tsx +89 -0
  183. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +9 -3
  184. package/corpus/templates/clips/desktop/src/lib/audio-meter.ts +51 -0
  185. package/corpus/templates/clips/desktop/src/lib/native-notification.ts +44 -0
  186. package/corpus/templates/clips/desktop/src/lib/recording-link.ts +67 -0
  187. package/corpus/templates/clips/desktop/src/overlays/live-audio-bars.tsx +35 -35
  188. package/corpus/templates/clips/desktop/src/overlays/live-transcript.tsx +3 -2
  189. package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +47 -46
  190. package/corpus/templates/clips/desktop/src/styles.css +127 -78
  191. package/corpus/templates/clips/desktop/src-tauri/Cargo.toml +7 -0
  192. package/corpus/templates/clips/desktop/src-tauri/Info.plist +6 -0
  193. package/corpus/templates/clips/desktop/src-tauri/capabilities/default.json +1 -0
  194. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +7 -3
  195. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +4 -1
  196. package/corpus/templates/clips/desktop/src-tauri/src/main.rs +8 -0
  197. package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +21 -10
  198. package/corpus/templates/clips/desktop/src-tauri/src/util.rs +40 -0
  199. package/corpus/templates/clips/server/db/schema.ts +27 -0
  200. package/corpus/templates/clips/server/lib/agent-views.ts +145 -0
  201. package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +2 -1
  202. package/corpus/templates/clips/server/lib/public-agent-context.ts +7 -0
  203. package/corpus/templates/clips/server/lib/recording-share-grant.ts +79 -0
  204. package/corpus/templates/clips/server/lib/recordings.ts +51 -3
  205. package/corpus/templates/clips/server/plugins/auth.ts +1 -1
  206. package/corpus/templates/clips/server/plugins/db.ts +31 -0
  207. package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +56 -3
  208. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +49 -17
  209. package/corpus/templates/clips/shared/recording-link.ts +43 -0
  210. package/corpus/templates/clips/shared/share-attribution.ts +4 -0
  211. package/corpus/templates/clips/shared/share-dashboard-redirect.ts +42 -0
  212. package/corpus/templates/clips/shared/view-analytics.ts +26 -0
  213. package/corpus/templates/content/.agents/skills/content/SKILL.md +5 -0
  214. package/corpus/templates/content/.agents/skills/content/references/local-file-mode.md +135 -0
  215. package/corpus/templates/content/.agents/skills/document-editing/SKILL.md +12 -0
  216. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +238 -0
  217. package/corpus/templates/content/.agents/skills/document-editing/references/document-behavior.md +91 -0
  218. package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  219. package/corpus/templates/content/AGENTS.md +62 -583
  220. package/corpus/templates/content/_gitignore +1 -0
  221. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -39
  222. package/corpus/templates/content/app/routes/_app._index.tsx +1 -2
  223. package/corpus/templates/content/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  224. package/corpus/templates/content/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  225. package/corpus/templates/content/package.json +1 -1
  226. package/corpus/templates/content/public/manifest.json +1 -1
  227. package/corpus/templates/content/server/plugins/auth.ts +1 -1
  228. package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +11 -0
  229. package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +50 -8
  230. package/corpus/templates/design/.agents/skills/design-generation/references/code-layers.md +81 -0
  231. package/corpus/templates/design/.agents/skills/design-generation/references/code-workspace.md +42 -0
  232. package/corpus/templates/design/.agents/skills/design-generation/references/editor-extensions.md +34 -0
  233. package/corpus/templates/design/.agents/skills/responsive-breakpoints/SKILL.md +4 -1
  234. package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  235. package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +17 -0
  236. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +8196 -0
  237. package/corpus/templates/design/.generated/bridge/embedded-wheel.generated.ts +265 -0
  238. package/corpus/templates/design/.generated/bridge/hit-test.generated.ts +642 -0
  239. package/corpus/templates/design/.generated/bridge/motion-preview.generated.ts +571 -0
  240. package/corpus/templates/design/.generated/bridge/nav.generated.ts +91 -0
  241. package/corpus/templates/design/.generated/bridge/sample.generated.ts +23 -0
  242. package/corpus/templates/design/.generated/bridge/shader-fill-preview.generated.ts +263 -0
  243. package/corpus/templates/design/.generated/bridge/shader-runtime.generated.ts +518 -0
  244. package/corpus/templates/design/.generated/bridge/tweak.generated.ts +20 -0
  245. package/corpus/templates/design/.generated/bridge/zoom.generated.ts +32 -0
  246. package/corpus/templates/design/AGENTS.md +88 -503
  247. package/corpus/templates/design/_gitignore +1 -0
  248. package/corpus/templates/design/app/components/layout/Sidebar.tsx +0 -2
  249. package/corpus/templates/design/app/routes/_index.tsx +1 -1
  250. package/corpus/templates/design/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  251. package/corpus/templates/design/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  252. package/corpus/templates/design/server/plugins/auth.ts +1 -1
  253. package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  254. package/corpus/templates/dispatch/_gitignore +1 -0
  255. package/corpus/templates/dispatch/app/dispatch-extensions.tsx +1 -10
  256. package/corpus/templates/dispatch/app/routes/overview.tsx +1 -1
  257. package/corpus/templates/dispatch/changelog/2026-07-24-signing-in-now-puts-you-in-your-companys-workspace.md +6 -0
  258. package/corpus/templates/dispatch/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  259. package/corpus/templates/dispatch/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  260. package/corpus/templates/dispatch/package.json +1 -1
  261. package/corpus/templates/dispatch/public/manifest.json +1 -1
  262. package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  263. package/corpus/templates/forms/_gitignore +1 -0
  264. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +0 -35
  265. package/corpus/templates/forms/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  266. package/corpus/templates/forms/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  267. package/corpus/templates/forms/package.json +1 -1
  268. package/corpus/templates/forms/public/manifest.json +1 -1
  269. package/corpus/templates/forms/server/lib/public-form-ssr.ts +2 -2
  270. package/corpus/templates/forms/server/plugins/auth.ts +1 -1
  271. package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  272. package/corpus/templates/macros/_gitignore +1 -0
  273. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -2
  274. package/corpus/templates/macros/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  275. package/corpus/templates/macros/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  276. package/corpus/templates/macros/package.json +1 -1
  277. package/corpus/templates/macros/server/plugins/auth.ts +2 -2
  278. package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  279. package/corpus/templates/mail/_gitignore +1 -0
  280. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +0 -39
  281. package/corpus/templates/mail/app/routes/$view.$threadId.tsx +1 -1
  282. package/corpus/templates/mail/app/routes/$view.tsx +1 -1
  283. package/corpus/templates/mail/app/routes/_index.tsx +1 -1
  284. package/corpus/templates/mail/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  285. package/corpus/templates/mail/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  286. package/corpus/templates/mail/package.json +1 -1
  287. package/corpus/templates/mail/public/manifest.json +1 -1
  288. package/corpus/templates/mail/server/plugins/auth.ts +1 -1
  289. package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  290. package/corpus/templates/plan/_gitignore +1 -0
  291. package/corpus/templates/plan/agent-native.app-skill.json +1 -1
  292. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +4 -9
  293. package/corpus/templates/plan/app/lib/app-config.ts +1 -1
  294. package/corpus/templates/plan/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  295. package/corpus/templates/plan/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  296. package/corpus/templates/plan/package.json +1 -1
  297. package/corpus/templates/plan/public/manifest.json +1 -1
  298. package/corpus/templates/plan/server/plugins/auth.ts +1 -1
  299. package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  300. package/corpus/templates/slides/_gitignore +1 -0
  301. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -2
  302. package/corpus/templates/slides/app/routes/_index.tsx +1 -1
  303. package/corpus/templates/slides/changelog/2026-07-25-app-branding-now-uses-the-product-name-without-the-agent-nat.md +6 -0
  304. package/corpus/templates/slides/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  305. package/corpus/templates/slides/package.json +1 -1
  306. package/corpus/templates/slides/public/manifest.json +1 -1
  307. package/corpus/templates/slides/server/plugins/auth.ts +1 -1
  308. package/corpus/templates/slides/server/plugins/db.ts +4 -0
  309. package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  310. package/corpus/templates/tasks/AGENTS.md +1 -1
  311. package/corpus/templates/tasks/_gitignore +1 -0
  312. package/dist/a2a/activity.d.ts +4 -1
  313. package/dist/a2a/activity.d.ts.map +1 -1
  314. package/dist/a2a/activity.js +27 -16
  315. package/dist/a2a/activity.js.map +1 -1
  316. package/dist/a2a/client.d.ts.map +1 -1
  317. package/dist/a2a/client.js +58 -4
  318. package/dist/a2a/client.js.map +1 -1
  319. package/dist/agent/engine/builder-engine.d.ts +1 -0
  320. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  321. package/dist/agent/engine/builder-engine.js +31 -4
  322. package/dist/agent/engine/builder-engine.js.map +1 -1
  323. package/dist/agent/run-manager.d.ts.map +1 -1
  324. package/dist/agent/run-manager.js +18 -1
  325. package/dist/agent/run-manager.js.map +1 -1
  326. package/dist/agent/run-store.d.ts +1 -0
  327. package/dist/agent/run-store.d.ts.map +1 -1
  328. package/dist/agent/run-store.js +2 -1
  329. package/dist/agent/run-store.js.map +1 -1
  330. package/dist/agent/types.d.ts +12 -1
  331. package/dist/agent/types.d.ts.map +1 -1
  332. package/dist/agent/types.js +21 -1
  333. package/dist/agent/types.js.map +1 -1
  334. package/dist/chat-threads/store.d.ts +10 -0
  335. package/dist/chat-threads/store.d.ts.map +1 -1
  336. package/dist/chat-threads/store.js +41 -0
  337. package/dist/chat-threads/store.js.map +1 -1
  338. package/dist/checkpoints/index.d.ts +1 -0
  339. package/dist/checkpoints/index.d.ts.map +1 -1
  340. package/dist/checkpoints/index.js +1 -0
  341. package/dist/checkpoints/index.js.map +1 -1
  342. package/dist/checkpoints/route-match.d.ts +8 -0
  343. package/dist/checkpoints/route-match.d.ts.map +1 -0
  344. package/dist/checkpoints/route-match.js +13 -0
  345. package/dist/checkpoints/route-match.js.map +1 -0
  346. package/dist/cli/create.d.ts +35 -4
  347. package/dist/cli/create.d.ts.map +1 -1
  348. package/dist/cli/create.js +69 -19
  349. package/dist/cli/create.js.map +1 -1
  350. package/dist/cli/index.js +19 -0
  351. package/dist/cli/index.js.map +1 -1
  352. package/dist/cli/template-baseline.d.ts +54 -0
  353. package/dist/cli/template-baseline.d.ts.map +1 -0
  354. package/dist/cli/template-baseline.js +334 -0
  355. package/dist/cli/template-baseline.js.map +1 -0
  356. package/dist/cli/template-sync.d.ts +57 -0
  357. package/dist/cli/template-sync.d.ts.map +1 -0
  358. package/dist/cli/template-sync.js +787 -0
  359. package/dist/cli/template-sync.js.map +1 -0
  360. package/dist/cli/templates-meta.d.ts.map +1 -1
  361. package/dist/cli/templates-meta.js +1 -0
  362. package/dist/cli/templates-meta.js.map +1 -1
  363. package/dist/client/AssistantChat.d.ts +2 -1
  364. package/dist/client/AssistantChat.d.ts.map +1 -1
  365. package/dist/client/AssistantChat.js +38 -10
  366. package/dist/client/AssistantChat.js.map +1 -1
  367. package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
  368. package/dist/client/NewWorkspaceAppFlow.js +32 -2
  369. package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
  370. package/dist/client/chat/message-components.d.ts +20 -0
  371. package/dist/client/chat/message-components.d.ts.map +1 -1
  372. package/dist/client/chat/message-components.js +81 -46
  373. package/dist/client/chat/message-components.js.map +1 -1
  374. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  375. package/dist/client/chat/tool-call-display.js +14 -6
  376. package/dist/client/chat/tool-call-display.js.map +1 -1
  377. package/dist/client/error-format.d.ts.map +1 -1
  378. package/dist/client/error-format.js +13 -0
  379. package/dist/client/error-format.js.map +1 -1
  380. package/dist/client/org/OrgSwitcher.d.ts +8 -1
  381. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  382. package/dist/client/org/OrgSwitcher.js +3 -2
  383. package/dist/client/org/OrgSwitcher.js.map +1 -1
  384. package/dist/client/org/TeamPage.d.ts.map +1 -1
  385. package/dist/client/org/TeamPage.js +1 -1
  386. package/dist/client/org/TeamPage.js.map +1 -1
  387. package/dist/client/settings/SettingsPanel.js +9 -9
  388. package/dist/client/settings/SettingsPanel.js.map +1 -1
  389. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  390. package/dist/client/settings/SettingsTabsPage.js +7 -4
  391. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  392. package/dist/client/sse-event-processor.d.ts.map +1 -1
  393. package/dist/client/sse-event-processor.js +3 -0
  394. package/dist/client/sse-event-processor.js.map +1 -1
  395. package/dist/collab/awareness.d.ts +2 -2
  396. package/dist/collab/awareness.d.ts.map +1 -1
  397. package/dist/collab/struct-routes.d.ts +1 -1
  398. package/dist/data-widgets/index.d.ts +3 -0
  399. package/dist/data-widgets/index.d.ts.map +1 -1
  400. package/dist/data-widgets/index.js +33 -0
  401. package/dist/data-widgets/index.js.map +1 -1
  402. package/dist/deploy/build.d.ts.map +1 -1
  403. package/dist/deploy/build.js +11 -7
  404. package/dist/deploy/build.js.map +1 -1
  405. package/dist/eject/provider-api-definitions.d.ts +1 -0
  406. package/dist/eject/provider-api-definitions.d.ts.map +1 -1
  407. package/dist/extensions/url-safety.d.ts +9 -16
  408. package/dist/extensions/url-safety.d.ts.map +1 -1
  409. package/dist/extensions/url-safety.js +48 -4
  410. package/dist/extensions/url-safety.js.map +1 -1
  411. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  412. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  413. package/dist/integrations/webhook-handler.js +46 -9
  414. package/dist/integrations/webhook-handler.js.map +1 -1
  415. package/dist/notifications/routes.d.ts +2 -2
  416. package/dist/observability/routes.d.ts +3 -3
  417. package/dist/org/auto-join-domain.d.ts +3 -2
  418. package/dist/org/auto-join-domain.d.ts.map +1 -1
  419. package/dist/org/auto-join-domain.js +1 -1
  420. package/dist/org/auto-join-domain.js.map +1 -1
  421. package/dist/org/context.d.ts.map +1 -1
  422. package/dist/org/context.js +84 -28
  423. package/dist/org/context.js.map +1 -1
  424. package/dist/org/index.d.ts +1 -0
  425. package/dist/org/index.d.ts.map +1 -1
  426. package/dist/org/index.js +1 -0
  427. package/dist/org/index.js.map +1 -1
  428. package/dist/org/service-identity.d.ts +43 -0
  429. package/dist/org/service-identity.d.ts.map +1 -0
  430. package/dist/org/service-identity.js +34 -0
  431. package/dist/org/service-identity.js.map +1 -0
  432. package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
  433. package/dist/provider-api/actions/provider-api.d.ts +13 -11
  434. package/dist/provider-api/actions/provider-api.d.ts.map +1 -1
  435. package/dist/provider-api/index.d.ts +4 -0
  436. package/dist/provider-api/index.d.ts.map +1 -1
  437. package/dist/provider-api/index.js +17 -1
  438. package/dist/provider-api/index.js.map +1 -1
  439. package/dist/scripts/docs/search.d.ts.map +1 -1
  440. package/dist/scripts/docs/search.js +12 -1
  441. package/dist/scripts/docs/search.js.map +1 -1
  442. package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
  443. package/dist/server/agent-chat/context-tools.js +3 -3
  444. package/dist/server/agent-chat/context-tools.js.map +1 -1
  445. package/dist/server/agent-chat/framework-prompts.d.ts +8 -3
  446. package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
  447. package/dist/server/agent-chat/framework-prompts.js +33 -62
  448. package/dist/server/agent-chat/framework-prompts.js.map +1 -1
  449. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  450. package/dist/server/agent-chat-plugin.js +16 -10
  451. package/dist/server/agent-chat-plugin.js.map +1 -1
  452. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  453. package/dist/server/agents-bundle.d.ts +18 -0
  454. package/dist/server/agents-bundle.d.ts.map +1 -1
  455. package/dist/server/agents-bundle.js +70 -4
  456. package/dist/server/agents-bundle.js.map +1 -1
  457. package/dist/server/auth.d.ts.map +1 -1
  458. package/dist/server/auth.js +4 -3
  459. package/dist/server/auth.js.map +1 -1
  460. package/dist/server/builder-browser.d.ts.map +1 -1
  461. package/dist/server/builder-browser.js +43 -19
  462. package/dist/server/builder-browser.js.map +1 -1
  463. package/dist/server/core-routes-plugin.js +2 -2
  464. package/dist/server/core-routes-plugin.js.map +1 -1
  465. package/dist/server/credential-provider.d.ts +38 -2
  466. package/dist/server/credential-provider.d.ts.map +1 -1
  467. package/dist/server/credential-provider.js +142 -64
  468. package/dist/server/credential-provider.js.map +1 -1
  469. package/dist/server/index.d.ts +1 -1
  470. package/dist/server/index.d.ts.map +1 -1
  471. package/dist/server/index.js +1 -1
  472. package/dist/server/index.js.map +1 -1
  473. package/dist/server/prompts/framework-core-compact.d.ts +1 -1
  474. package/dist/server/prompts/framework-core-compact.d.ts.map +1 -1
  475. package/dist/server/prompts/framework-core-compact.js +7 -13
  476. package/dist/server/prompts/framework-core-compact.js.map +1 -1
  477. package/dist/server/prompts/framework-core.d.ts +1 -1
  478. package/dist/server/prompts/framework-core.d.ts.map +1 -1
  479. package/dist/server/prompts/framework-core.js +10 -21
  480. package/dist/server/prompts/framework-core.js.map +1 -1
  481. package/dist/server/prompts/index.d.ts +1 -1
  482. package/dist/server/prompts/index.d.ts.map +1 -1
  483. package/dist/server/prompts/index.js +1 -1
  484. package/dist/server/prompts/index.js.map +1 -1
  485. package/dist/server/prompts/shared-rules.d.ts +16 -10
  486. package/dist/server/prompts/shared-rules.d.ts.map +1 -1
  487. package/dist/server/prompts/shared-rules.js +19 -10
  488. package/dist/server/prompts/shared-rules.js.map +1 -1
  489. package/dist/server/ssr-handler.d.ts +1 -1
  490. package/dist/server/ssr-handler.d.ts.map +1 -1
  491. package/dist/server/ssr-handler.js +10 -3
  492. package/dist/server/ssr-handler.js.map +1 -1
  493. package/dist/server/transcribe-voice.d.ts +1 -1
  494. package/dist/settings/user-settings.d.ts.map +1 -1
  495. package/dist/settings/user-settings.js +13 -1
  496. package/dist/settings/user-settings.js.map +1 -1
  497. package/dist/shared/cache-control.d.ts +52 -0
  498. package/dist/shared/cache-control.d.ts.map +1 -1
  499. package/dist/shared/cache-control.js +107 -0
  500. package/dist/shared/cache-control.js.map +1 -1
  501. package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  502. package/dist/templates/chat/_gitignore +1 -0
  503. package/dist/templates/chat/app/components/layout/Sidebar.tsx +0 -7
  504. package/dist/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  505. package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  506. package/dist/templates/default/app/root.tsx +1 -1
  507. package/dist/templates/default/public/manifest.json +2 -2
  508. package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  509. package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +19 -0
  510. package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  511. package/dist/templates/workspace-core/.agents/skills/visual-answer/SKILL.md +1 -0
  512. package/dist/vite/agents-bundle-plugin.d.ts.map +1 -1
  513. package/dist/vite/agents-bundle-plugin.js +8 -7
  514. package/dist/vite/agents-bundle-plugin.js.map +1 -1
  515. package/dist/vite/client.d.ts.map +1 -1
  516. package/dist/vite/client.js +66 -1
  517. package/dist/vite/client.js.map +1 -1
  518. package/docs/content/actions.mdx +2 -2
  519. package/docs/content/agent-surfaces.mdx +1 -1
  520. package/docs/content/authentication.mdx +2 -0
  521. package/docs/content/deployment.mdx +36 -0
  522. package/docs/content/http-api.mdx +266 -0
  523. package/docs/content/syncing-template-changes.mdx +159 -0
  524. package/package.json +4 -3
  525. package/src/a2a/activity.ts +38 -27
  526. package/src/a2a/client.ts +57 -4
  527. package/src/agent/engine/builder-engine.ts +35 -4
  528. package/src/agent/run-manager.ts +20 -1
  529. package/src/agent/run-store.ts +4 -1
  530. package/src/agent/types.ts +28 -8
  531. package/src/chat-threads/store.ts +45 -0
  532. package/src/checkpoints/index.ts +2 -0
  533. package/src/checkpoints/route-match.ts +13 -0
  534. package/src/cli/create.ts +105 -17
  535. package/src/cli/index.ts +20 -0
  536. package/src/cli/template-baseline.ts +410 -0
  537. package/src/cli/template-sync.ts +1004 -0
  538. package/src/cli/templates-meta.ts +1 -0
  539. package/src/client/AssistantChat.tsx +38 -12
  540. package/src/client/NewWorkspaceAppFlow.tsx +75 -10
  541. package/src/client/chat/message-components.tsx +127 -66
  542. package/src/client/chat/tool-call-display.tsx +29 -5
  543. package/src/client/error-format.ts +18 -0
  544. package/src/client/org/OrgSwitcher.tsx +30 -8
  545. package/src/client/org/TeamPage.tsx +7 -6
  546. package/src/client/settings/SettingsPanel.tsx +9 -9
  547. package/src/client/settings/SettingsTabsPage.tsx +12 -2
  548. package/src/client/sse-event-processor.ts +3 -0
  549. package/src/data-widgets/index.ts +41 -0
  550. package/src/deploy/build.ts +11 -9
  551. package/src/extensions/url-safety.ts +67 -4
  552. package/src/integrations/webhook-handler.ts +63 -9
  553. package/src/org/auto-join-domain.ts +4 -3
  554. package/src/org/context.ts +108 -39
  555. package/src/org/index.ts +5 -0
  556. package/src/org/service-identity.ts +60 -0
  557. package/src/provider-api/index.ts +22 -1
  558. package/src/scripts/docs/search.ts +12 -1
  559. package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +25 -36
  560. package/src/server/agent-chat/context-tools.ts +9 -4
  561. package/src/server/agent-chat/framework-prompts.ts +38 -66
  562. package/src/server/agent-chat-plugin.ts +17 -10
  563. package/src/server/agents-bundle.ts +84 -5
  564. package/src/server/auth.ts +4 -3
  565. package/src/server/builder-browser.ts +47 -19
  566. package/src/server/core-routes-plugin.ts +2 -2
  567. package/src/server/credential-provider.ts +209 -68
  568. package/src/server/index.ts +3 -0
  569. package/src/server/prompts/framework-core-compact.ts +6 -13
  570. package/src/server/prompts/framework-core.ts +9 -21
  571. package/src/server/prompts/index.ts +0 -1
  572. package/src/server/prompts/shared-rules.ts +19 -11
  573. package/src/server/ssr-handler.ts +13 -2
  574. package/src/settings/user-settings.ts +13 -1
  575. package/src/shared/cache-control.ts +141 -0
  576. package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  577. package/src/templates/chat/_gitignore +1 -0
  578. package/src/templates/chat/app/components/layout/Sidebar.tsx +0 -7
  579. package/src/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  580. package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  581. package/src/templates/default/app/root.tsx +1 -1
  582. package/src/templates/default/public/manifest.json +2 -2
  583. package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  584. package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +19 -0
  585. package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +24 -2
  586. package/src/templates/workspace-core/.agents/skills/visual-answer/SKILL.md +1 -0
  587. package/src/vite/agents-bundle-plugin.ts +7 -6
  588. package/src/vite/client.ts +69 -3
@@ -1,11 +1,12 @@
1
1
  # Design — Agent Guide
2
2
 
3
- Design is an agent-native prototyping app. The agent creates and edits complete
4
- interactive HTML prototypes, design systems, variants, and handoff exports
5
- through actions against the shared SQL state.
3
+ Design is an agent-native prototyping app. The agent creates and edits
4
+ complete interactive HTML prototypes, design systems, variants, and handoff
5
+ exports through actions against the shared SQL state.
6
6
 
7
- Keep this file essential. Detailed generation, design-system, export, and UI
8
- patterns live in `.agents/skills/`.
7
+ Keep this file essential it is loaded into the agent's context every turn.
8
+ Real depth lives in `.agents/skills/`; read the relevant skill before deeper
9
+ work in that area.
9
10
 
10
11
  Before building common workspace or agent UI, read `agent-native-toolkit` to
11
12
  inventory existing public kits and installed package seams. Use
@@ -18,517 +19,101 @@ ladder.
18
19
  base64, `data:` URLs, images, video/audio, PDFs, ZIPs, screenshots,
19
20
  thumbnails, or replay chunks in app tables, `application_state`, `settings`,
20
21
  or `resources`; persist URLs, ids, or handles instead.
21
- - Never hardcode API keys, tokens, webhook URLs, signing secrets, private Builder/internal data, customer data, or credential-looking literals. Use secrets/OAuth/runtime configuration and obvious placeholders in examples.
22
+ - Never hardcode API keys, tokens, webhook URLs, signing secrets, private
23
+ Builder/internal data, customer data, or credential-looking literals. Use
24
+ secrets/OAuth/runtime configuration and obvious placeholders in examples.
22
25
  - Use the app actions for designs, files, versions, design systems, variants,
23
26
  export, and sharing. Do not write design rows directly with SQL.
24
- - A message beginning with `[Reprompt selection]` is preview-only. Call
27
+ - A message beginning with `[Reprompt selection]` is preview-only: call
25
28
  `propose-node-rewrite` with its exact `repromptId`, target, and base hash;
26
- never call `edit-design`, `update-design`, `update-file`, `generate-design`,
27
- `apply-visual-edit`, or another content writer. Only the frontend-only
28
- `resolve-node-rewrite` action may persist an explicitly accepted proposal.
29
- - A message beginning with `[Selection question]` is read-only. Answer about
30
- the captured element and subtree without calling content-writing actions.
31
- - When a user wants an established public system as a starting point, call
32
- `create-design-system` with `templateId: material-3`, `carbon-white`, or
33
- `primer-light`. These are source-linked, versioned token snapshots with
34
- system-specific generation guidance; preserve that data instead of
35
- reconstructing a lookalike palette.
36
- - Treat provider-specific actions as shortcuts, not capability limits. Use
37
- `provider-api-catalog`, `provider-api-docs`, and `provider-api-request` for
38
- open-ended GitHub and Figma API questions. Auth resolves from the saved,
39
- user-scoped `GITHUB_TOKEN` or `FIGMA_ACCESS_TOKEN` and never exposes secret
40
- values. Stage large reads with `stageAs` and analyze them through
41
- `query-staged-dataset`. Figma REST can read files, nodes, components, styles,
42
- images, comments, versions, and Enterprise variables, but it cannot create
43
- arbitrary canvas layers; non-read Figma requests require human approval.
44
- - In dev, call actions with `pnpm action <name>`; in production, call the native
45
- tool. The action schema is the source of truth for parameters.
29
+ never call a content writer (`edit-design`, `generate-design`,
30
+ `apply-visual-edit`, ...) only the frontend-only `resolve-node-rewrite`
31
+ persists an accepted proposal (see `visual-edit`'s "Select And Reprompt").
32
+ `[Selection question]` is read-only: answer about the captured element and
33
+ subtree without calling content-writing actions.
46
34
  - Call `view-screen` before editing a specific design if the current design or
47
35
  selected file is not already clear from context.
48
- - For shared prototype feedback, use the persisted review actions
49
- (`list-review-comments`, `get-review-feedback`, `create-review-comment`,
50
- `reply-review-comment`, `resolve-review-thread`, `consume-review-feedback`,
51
- `send-review-thread-to-agent`, and `set-review-status`). Work one thread at a time, prefer its stable node
52
- anchor, verify saved edits before resolving, and read
53
- `.agents/skills/design-review-feedback/SKILL.md` for the full loop.
54
- - Generated files must be complete, standalone HTML unless the user asks for a
55
- different export format. They should render in the iframe without a build step.
56
- - For design generation, ground the work in a concrete audience, primary job,
57
- and visual thesis before writing. For existing products, inspect current
58
- screens, linked design systems, tokens, and component language before
59
- inventing a new direction. Use realistic content/copy and one signature choice
60
- per direction; avoid lorem ipsum, generic SaaS filler, and decorative
61
- placeholders. Include expected responsive/accessibility states, run
62
- `run-design-audit`, and call `take-design-screenshot` on each changed screen
63
- before calling it ready — see the `design-generation` skill's Phase 5.
64
- - For editable reusable building blocks inside Design, use
65
- `list-design-native-assets` first, then `insert-design-native-asset` with the
66
- chosen kind. These are Design-native HTML primitives/components, not external
67
- media, so prefer them when the user asks for a Figma Assets-style library that
68
- supports our own primitives.
69
- - For raster image generation, restyling, or editing existing screenshots/photos,
70
- use the available first-party Assets MCP tool such as `generate-asset` instead
71
- of placeholders or generic stock imagery. Default to `tier: "fast"` (the cheap
72
- Gemini flash "nanobanana"-class model) unless the user explicitly asks for
73
- best quality; pass `aspectRatio` matching the layout slot (e.g. `21:9` hero,
74
- `4:3` card, `1:1` avatar); include the linked design system's
75
- `imageStyle.styleDescription` in the prompt when one is linked; and always
76
- pass `callerAppId: "design"`. When the Assets picker returns a
77
- selected asset, preserve `assetId`, `runId`, and URLs verbatim; if a design is
78
- open, call `insert-asset` with the chosen URL/id, then refine placement with
79
- `get-design-snapshot` and `edit-design` as needed. If no Assets MCP tool is
80
- available, use the first-party Assets app via `call-agent` with agent
81
- `"assets"` when available. If the user attached an image, use its hosted
82
- chat-attachment URL or call `upload-image` to create one before delegating. If
83
- no image/upload provider is configured, say that specific setup is needed and
84
- continue any non-image Design work separately.
85
- - For reusable Figma library components, use `list-figma-library-assets` with a
86
- Figma file URL or file key. It returns components/component sets with
87
- thumbnails, rendered insert URLs, and Figma provenance. Insert with
88
- `insert-figma-library-asset`, preserving `fileKey`, `nodeId`, `componentKey`,
89
- `sourceUrl`, and the rendered URL. This path requires the saved
90
- `FIGMA_ACCESS_TOKEN` secret; never ask the user to paste that token into chat
91
- or pass it as an action parameter. Token setup needs `current_user:read` for
92
- validation and `file_content:read` for frame/node import; add library or
93
- Enterprise variable scopes only when needed. Figma styles and variables are
94
- design-system inputs, not draggable media assets; route reusable system
95
- extraction through Builder-backed indexing.
96
- - To import a Figma frame/screen as a real, editable Design screen (not a
97
- rendered image), use `import-figma-frame` with a `figmaUrl` (or
98
- `fileKey`/`nodeId`) — it maps supported position, auto-layout, text,
99
- fills/gradients, strokes, corner radii, effects, opacity, and blend modes,
100
- falling back to a rendered PNG for masks, vector/boolean geometry,
101
- lines/arcs, advanced strokes/text, transformed image crops, and unsupported
102
- node types, then saves the result as a new screen. Read the returned
103
- `fidelityReport` (`approximated`, `imageFallbacks`) back to the user when
104
- non-trivial. Use `get-figma-styles` for a file's published style names (not
105
- the Enterprise Variables API; full token extraction still routes through
106
- Builder-backed indexing). Never claim universal lossless import/export:
107
- consult `FIGMA_INTEROPERABILITY.md` for the feature-level fidelity contract,
108
- fallback rules, scale limits, and real-file golden corpus. See the
109
- `design-systems` skill's "Import from Figma" section.
110
- - Uploading a raw `.fig` file in the Design editor's Import panel decodes the
111
- container/Kiwi document locally into editable screens — no Builder
112
- connection needed — and accepts an optional Figma frame URL alongside the
113
- file. When the URL contains a `node-id`, only that frame or its containing
114
- top-level frame is imported; a mismatch falls back to all frames. This path
115
- uses no Figma REST API quota and is scoped to screens only; it never creates
116
- or updates a design system. This is separate from uploading `.fig` on the
117
- Design System Setup page, which still indexes tokens/brand-kit data through
118
- Builder and does not parse `.fig` locally. See the `design-systems` skill
119
- for both paths.
120
- - A current Figma Cmd+C clipboard includes exact selected node ids in
121
- `figmeta.selectedNodeData`; `import-figma-clipboard` uses those before any
122
- heuristic matching and supports multi-selection. Clipboard metadata is not a
123
- public Figma contract, so a copied frame link remains the stable exact path
124
- if Figma changes that field. Without a token, `import-figma-clipboard` falls
125
- back to a local Kiwi binary decode: geometry, auto-layout, text, solid fills,
126
- and strokes are editable immediately; image fills become annotated
127
- placeholders (`data-figma-image-ref="<sha1>"`) that can be filled in later two
128
- ways. (1) Token-free: upload the original `.fig` — the paste-result dialog's
129
- "Fill images from .fig" option, or `hydrateFileIds` on the `.fig` upload route
130
- (`/api/import-design-file`) — which matches each placeholder's SHA-1 hash to
131
- the `.fig`'s embedded `images/` bytes, mirrors them to durable storage, and
132
- needs no Figma API. (2) With a token: `hydrate-figma-paste-images` resolves the
133
- same placeholders through Figma's REST image endpoint. This is not a
134
- full-fidelity import — report which image fills are still unresolved and offer
135
- to hydrate them. Clipboard paste is the fast no-quota path; the original `.fig`
136
- is what carries the real image bytes for both upload and paste-hydration.
137
- - For "what's in this Figma file/frame?" or "show me a screenshot of this
138
- frame" without importing anything, use `get-figma-design-context` — no
139
- `nodeId` lists pages/top-level frames (like the official Figma MCP's
140
- `get_metadata`), a `nodeId`/node-id link returns a depth-limited structural
141
- summary (box, fills/strokes/effects, auto-layout, text/style,
142
- component/instance identity) plus a rendered screenshot URL. It never
143
- creates a screen; use `import-figma-frame` for that. It also surfaces local,
144
- unpublished components/instances that `list-figma-library-assets` cannot see
145
- (that action's REST source only returns library-published components). For
146
- variables, `get-figma-design-context` and `get-figma-styles` are honest
147
- fallbacks, not the Enterprise Variables API — say so plainly rather than
148
- guessing when no connected Figma MCP/Enterprise access is available. See the
149
- `design-systems` skill's "Reading a Figma file/frame without importing"
150
- section.
151
- - Use Alpine.js and Tailwind CDN for interactive prototypes. Prefer Alpine
152
- directives over raw inline event handlers.
153
- - Navigate between prototype screens with Alpine state (`x-show`), a
154
- `data-screen="file.html"` attribute, or `#` anchors — never real/relative
155
- URLs, which would navigate the preview iframe to the app itself.
156
- - To refine an existing design, make the smallest change: read it with
157
- `get-design-snapshot`, then use `edit-design` (search/replace). Reserve
158
- `generate-design` for new files. For broad rewrites of an existing selected
159
- file, use `edit-design` with `mode: "replace-file"` and the exact `fileId`;
160
- never resend files you aren't changing.
161
- - When the user references a template, prior design, or past work, call both
162
- `list-design-templates` and `list-designs` before generating so the existing
163
- starting point is resolved instead of recreated. Use
164
- `save-design-as-template` to snapshot an editable inline design, including
165
- its screens, canvas dimensions, defaults, and locked layers. Use
166
- `create-design-from-template` to instantiate a normal design. If the user
167
- supplies a prompt, call `get-design-snapshot` once and refine the copied
168
- files with `edit-design`; never regenerate the template from scratch.
169
- Read the `design-templates` skill for the complete copy/adaptation workflow.
170
- - Treat `data-agent-native-locked="true"` as an authoritative template
171
- boundary. Locked backgrounds, logos, and their descendants must remain
172
- byte-for-byte unchanged during agent edits. The server rejects attempts to
173
- change or remove them; ask the user to unlock the layer in the Layers panel
174
- if they explicitly want it changed.
175
- - When the user asks to add tweak controls, preserve existing useful tweaks,
176
- add or update the requested `tweaks` definitions, and make sure each control
177
- is backed by a CSS custom property the rendered file actually uses. If source
178
- edits are needed, use `get-design-snapshot` first and persist the complete
179
- updated tweak definition list through `generate-design`.
180
- - Design editor extensions render in the right inspector slot
181
- `design.editor.inspector`. When creating an extension for that panel, call
182
- `create-extension`, then `add-extension-slot-target` with that slot id, then
183
- `install-extension` so it appears inline. Extensions receive
184
- `window.slotContext` with the current design id, active screen, selected
185
- element, zoom, mode, tool, and tweak values. For AI-driven style/artboard
186
- changes, extension HTML should call `agentNative.chat.send(...)` with the
187
- selected element selector/sourceId and request; the agent should call
188
- `view-screen` first, prefer `apply-visual-edit` for element style/class/text
189
- changes, and use `update-design` or `generate-design` with `canvasFrames` for
190
- overview artboard placement changes. If creating the extension opens the
191
- standalone extension editor, return to the same design with `navigate` and
192
- `inspectorTab: "extensions"` after installing it.
193
- - Follow linked design-system tokens and `customInstructions` whenever present;
194
- explicit user instructions in the current turn still win.
195
- - Before generation, follow the creative-context reuse ladder in
196
- `.agents/skills/creative-context/SKILL.md`: explicit request and current
197
- design first, then a pinned/current pack, then narrow library search. Respect
198
- `creative-context.contextMode: "off"` without silently restoring a pack.
199
- - To submit a design to a governed Creative Context, use the Context tab or
200
- `manage-context-membership`; it captures one immutable live design snapshot.
201
- Reuse only a returned opaque native clone reference through the Design clone action.
202
- Use `operation="submit-latest"` with a Library membership id when its native
203
- update status reports `update-available`.
204
- - For reusable design-system setup from Figma, connected code/GitHub, local
205
- code/design files, or optional `design.md`, use Builder-backed DSI indexing
206
- through `index-design-system-with-builder` or the Design System Setup `.fig`
207
- upload.
208
- Pass readable `design.md` content as `designMd`, use the returned local design
209
- system id in Design flows, and call `get-design-system` before generation to
210
- hydrate Builder docs/tokens when available. Do not create a duplicate local
211
- design system from raw Figma/code sources.
212
- - When a user wants one-off tokens from design.md, CSS, theme/tokens JSON,
213
- Tailwind config, local files, or the current design, call
214
- `import-design-tokens` and preserve its `tokens`, `filesAnalyzed`, and
215
- provenance in your answer. Manual `apply-design-token-edit` / one-by-one
216
- token entry is the fallback for a small one-off token, not the primary import
217
- workflow.
36
+ - Generated files must be complete, standalone HTML (Alpine.js + Tailwind CDN)
37
+ that renders in the iframe without a build step. See `design-generation` for
38
+ the full generation workflow — phases, the aesthetic quality bar, and the
39
+ audit/screenshot pass required before calling a design "ready".
40
+ - Treat `data-agent-native-locked="true"` as authoritative: locked elements
41
+ and descendants stay byte-for-byte unchanged (server-enforced). Ask the user
42
+ to unlock the layer in the Layers panel if they want it changed.
43
+ - Figma import/read/paste and design-system/token workflows
44
+ (`import-figma-frame`, `get-figma-design-context`, `list-figma-library-assets`,
45
+ clipboard paste, `.fig` upload) are fully covered in `design-systems` — read
46
+ it before guessing the calling convention. Never claim universal lossless
47
+ Figma import/export; consult `FIGMA_INTEROPERABILITY.md` for the real
48
+ fidelity contract. For open-ended GitHub/Figma API questions, use
49
+ `provider-api-catalog`/`provider-api-docs`/`provider-api-request` rather than
50
+ treating provider actions as a capability ceiling; non-read Figma requests
51
+ need human approval.
218
52
  - Persist useful work early: create/update the design and files as soon as a
219
53
  coherent candidate exists, then iterate.
220
- - For a brief or ambiguous _new_ design prompt, ask before generating:
221
- create/open the design shell, call `show-design-questions` with a small
222
- tailored set, stop while the main canvas shows the questions, then continue
223
- from the user's answers. Skip asking when the prompt is already specific,
224
- it's a tweak/edit to an existing design, the user already answered a
225
- question set for this design and is now iterating, or they say "decide for
226
- me"/"surprise me"/"just build it" see the `design-generation` skill for
227
- how to size and word the questions.
228
- - For multiple screens/states, call `generate-screens` first. It opens the
229
- infinite screen overview and returns target filenames plus `canvasFrame`
230
- placements. Then call `generate-design` with those files and pass the matching
231
- `canvasFrames` entries so screens appear in the overview instead of only in
232
- the file list.
233
- - After generation or broad updates, leave the user in the screen overview when
234
- the work involves multiple screens or artboard placement. Overview is the
235
- primary editing surface: users can select screens, move/resize/drop static
236
- frames and canvas primitives, edit layers in place, and use the frame's
237
- Interact button to enter focused editing.
238
- - To move the user's editor, call `navigate` with `view: "editor"` and
239
- `editorView: "overview"` for the screen overview, or `editorView: "single"`
240
- plus `fileId`, `filename`, or `screen` to focus one screen.
241
- - Single-screen mode is for scrolling, interacting with prototype behavior, and
242
- editing the DOM/code layers inside one screen. Do not use it as the default
243
- landing mode for multi-screen generation unless the user asks to focus a
244
- specific screen.
245
- - The layers panel shows screens as top-level frames and nests DOM/code layers
246
- beneath the active screen. Rename DOM/code layers by safely editing source to
247
- set `data-agent-native-layer-name`; this is the stable human-readable layer
248
- name. `data-code-layer-id` and similar ids are for selection stability, not
249
- display naming.
250
- - For inline/Alpine screens, stamp and preserve unique
251
- `data-agent-native-node-id` attributes on selectable DOM nodes. Treat
252
- generated CSS selectors as a compatibility fallback only. For localhost React
253
- screens, resolve through build-time source/debug metadata (stable generated
254
- ids, component name, file, and line) before falling back to selectors.
255
- - For inline/Alpine motion, use `get-motion-timeline` to inspect the active
256
- file's saved or CSS-recovered timeline, then call `apply-motion-edit` with the
257
- same `sourceRef`/`fileId` to update it. Motion edits persist as durable
258
- managed keyframes in `<style data-agent-native-motion>` plus editable timeline
259
- metadata; it is not a one-way export. Real CSS module or `motion/react`
260
- write-back remains a localhost/fusion follow-up capability.
261
- - For multi-variant work, use `present-design-variants` so every candidate is
262
- saved as a normal overview-board screen and the user gets one inline chat
263
- button per screen name. Keep each variant compact: prefer concise labels,
264
- descriptions, accent colors, and feature bullets, and omit full HTML when it
265
- would make the tool input too large. The action can render representative
266
- screens from direction data. After the user picks, delete the unchosen
267
- variant screens before continuing from the kept screen.
268
- - Use framework sharing actions for design and design-system visibility/grants.
269
- - `/visual-edit` is a public entry route and public `/design/:id` links may
270
- render read-only public designs without a session. Do not open anonymous write
271
- actions: save, share, generation, localhost connection, and screen persistence
272
- should send signed-out visitors through `/_agent-native/sign-in?return=...`,
273
- then save or copy the design into the authenticated account before sharing.
274
- - When the user asks to download/export, use export actions or point to the
275
- editor download menu.
276
- - Design source modes are `inline`, `localhost`, and `fusion`. Inline is the
277
- current SQL-backed prototype mode. Localhost connections come from
278
- `npx @agent-native/core@latest design connect` and are persisted with
279
- `connect-localhost`; list them with `list-localhost-connections` before
280
- creating or resolving local-code artboards. Fusion designs are full-app
281
- designs backed by a running Builder Fusion container, created via
282
- `create-fusion-app` when the `full-app-building` feature flag is enabled;
283
- preserve the
284
- design's `fusionApp` linkage data whenever present and never invent it.
285
- - Localhost route manifests are scaffolding for URL-backed Flow Canvas
286
- artboards. Use `add-localhost-screens` to place routes or path/query states as
287
- iframe screens in overview mode. Preserve route ids, paths, `sourceType`,
288
- bridge URL, and snapshot/state references when moving between actions so later
289
- flow-edge derivation has stable anchors.
54
+ - In dev, call actions with `pnpm action <name>`; in production, call the
55
+ native tool.
56
+ - For shared prototype feedback, use the persisted review actions
57
+ (`get-review-feedback`, `create-review-comment`, `resolve-review-thread`, ...)
58
+ read `design-review-feedback` for the one-thread-at-a-time loop.
59
+ - Follow linked design-system tokens and `customInstructions` whenever
60
+ present; explicit user instructions in the current turn still win. Before
61
+ generation, follow the `creative-context` reuse ladder and respect
62
+ `contextMode: "off"` without silently restoring a pack.
63
+ - When the user references a template or prior design, call
64
+ `list-design-templates`/`list-designs`; use `create-design-from-template` and
65
+ `get-design-snapshot` before `edit-design`.
66
+ - Design source modes are `inline` (current SQL-backed default), `localhost`
67
+ (`visual-edit`), and `fusion` (flag-gated, `full-app-build`). Preserve a
68
+ design's `fusionApp`/localhost connection data verbatim; never invent it.
69
+ Public `/visual-edit` and `/design/:id` links can render read-only without a
70
+ session never run anonymous write actions (save/share/generate/localhost
71
+ connect); send signed-out visitors through
72
+ `/_agent-native/sign-in?return=...` first.
73
+ - For multi-variant exploration, use `present-design-variants` (2-5 variants,
74
+ three by default) see `design-generation` Phase 2 for the full
75
+ pick → delete-unchosen refine flow; never call `generate-design` after a
76
+ variant pick.
77
+ - When the user asks to download/export, use the export actions or point to
78
+ the editor download menu — see `export-handoff`.
290
79
 
291
80
  ## Application State
292
81
 
293
- - `navigation` tells you the current view, design id, file id, and related UI
294
- state.
295
- - `navigate` moves the UI and is auto-deleted after the client consumes it.
296
- - `design-selection` includes active screen, selected element, overview mode,
82
+ - `navigation` current view, design id, file id, and related UI state.
83
+ - `navigate` — moves the UI; auto-deleted after the client consumes it.
84
+ - `design-selection` active screen, selected element, overview mode,
297
85
  inspector tab, zoom, and screen list for the current tab.
298
- - `design-generation-session:<designId>` contains agent-facing multi-screen
299
- generation planning state created by `generate-screens` (canvas region
300
- assignments and per-frame instructions consumed by `generate-design` and
301
- `view-screen`; not rendered as canvas overlays).
302
- - `design-reprompt-pending:<designId>:<fileId>` is the client-captured source
303
- selection, instruction, base hash, and authoritative current request id for
304
- a scoped regenerate request. The frontend starts requests through the
305
- compare-and-set `begin-node-rewrite-request` action and must not overwrite a
306
- `resolving` acceptance reservation.
307
- - `design-reprompt-proposal:<designId>:<fileId>:<repromptId>` is one
308
- request-specific preview-only subtree proposal. Candidate payloads have a
309
- 256 KiB aggregate serialized limit. Proposal publication, resolution, and
310
- cancellation use atomic multi-key compare-and-set transitions. Acceptance
311
- reserves its matching pending request before writing design content, so a
312
- newer request and an older acceptance cannot both win.
313
- `view-screen` lists only proposals paired to the current pending request as
314
- `pendingCandidateReviews`.
315
- - `show-design-questions` opens focused pre-generation questions in the main
316
- design canvas (`show-questions` application state).
317
- - `guided-questions` may contain a one-click chat choice for the current
318
- variant set. Variants themselves are normal design files with `canvasFrames`
319
- and `screenMetadata`.
320
-
321
- ## Code Layers
322
-
323
- - `get-code-layer-projection` reads inline HTML/JSX and returns selectable layer
324
- nodes, selectors, names, and edit intents for agent and UI workflows.
325
- - `apply-visual-edit` supports deterministic local edits for HTML-backed code
326
- layers: text, classes, styles, attributes, source order, and small structural
327
- changes. Use it for selected-element edits before falling back to full
328
- `update-design` / `generate-design` rewrites.
329
- - For localhost JSX/TSX, `apply-visual-edit` also supports a narrow deterministic
330
- slice: single-instance leaf text, literal `className`/`class`, and flat literal
331
- `style={{ ... }}` properties. Pass `source.kind: "local-file"`, `designId`,
332
- `connectionId`, the verified project-relative `path`, and
333
- `intent.target.sourceAnchor`. Call once without `persist` and inspect
334
- `proposedDiff`; call again with `persist: true` only when it is exact. The
335
- action reads the current bridge version and writes through `write-local-file`,
336
- so human consent and compare-and-swap remain mandatory.
337
- - For localhost React/TSX screens, treat compiler/debug metadata (project-relative
338
- source file, line, column, component, and runtime multiplicity) as evidence
339
- for locating source, not as permission to run a generic AST transform.
340
- Compiler tooling may verify an anchor, classify a literal edit, and validate
341
- syntax. Reparenting, grouping/ungrouping, wrappers, dynamic expressions,
342
- repeated `.map()` instances, shared components, and cross-file changes must
343
- be handed to the coding agent with both runtime relationships and exact
344
- source anchors so it can inspect the surrounding program semantics.
345
- - A localhost React handoff must read each source file first, write with the
346
- exact returned `versionHash` as `expectedVersionHash` with
347
- `requireExpectedVersionHash: true`, re-read and re-plan on conflict, and leave the
348
- optimistic canvas preview in place until the dev server/HMR confirms the
349
- runtime result. Never report a semantic canvas change as persisted merely
350
- because it was submitted to the coding agent.
351
- - Prefer `data-agent-native-layer-name="Readable name"` on meaningful elements.
352
- The projection uses it before semantic/text fallbacks, and layer renames should
353
- persist by updating that attribute.
354
- - Inline/Alpine screens continue to use deterministic HTML code-layer edits.
355
- Localhost React/TSX screens use the semantic coding-agent handoff above;
356
- deterministic direct React writes remain intentionally limited to the leaf
357
- literal slice above and never include generic structural transforms,
358
- breakpoint writes, dynamic expressions, repeated renders, shared component
359
- definitions, generated/out-of-root paths, or remote URLs.
360
-
361
- ## Code Workspace
362
-
363
- - The editor left rail has a wide `code` panel: a VS Code-style workbench
364
- (`app/components/design/code-workbench/`) with an explorer, workspace search,
365
- editor tabs, quick open (⌘P), a command palette (⇧⌘P), and a status bar. Open
366
- it with `navigate --view editor --designId <id> --leftPanel code` and
367
- optionally pass `fileId`, `filename`, or `screen` to focus a file.
368
- - The explorer shows one root per workspace source: the design's SQL-backed
369
- files (`designfs://<designId>/`, backend `virtual-inline`) always, plus one
370
- root per localhost connection referenced by the design's screens
371
- (`list-local-files` / `read-local-file` proxy the `design connect` bridge;
372
- writes go through `write-local-file` and its user-approved consent grant).
373
- - Inline design files are auto-formatted with Prettier the first time they are
374
- opened in the workbench and the formatted result is persisted; local files
375
- are never auto-formatted.
376
- - Use `list-source-files` to inspect the inline source workspace and
377
- `read-source-file` for file contents; preserve its `versionHash` before
378
- writing. Do not return full file content from `view-screen`; it reports only
379
- active code file metadata and dirty state.
380
- - Use `preview-source-edit` to show a diff without saving, then
381
- `apply-source-edit` with the prior `versionHash` to save either a full replace
382
- or exact replace. These actions update the same inline file state as the UI;
383
- agent edits show up live in open workbench buffers.
384
- - Use `resolve-selection-source` when the user has a canvas element selected and
385
- you need the best matching inline file location/snippet.
386
- - The workbench session (open tabs, active file, sidebar layout) persists per
387
- design in application state under `code-workbench:<designId>`.
388
-
389
- ## Localhost Source Actions
390
-
391
- - `connect-localhost`: registers or refreshes a localhost source connection
392
- emitted by `npx @agent-native/core@latest design connect`. Pass
393
- `devServerUrl`, optional `bridgeUrl`, optional `rootPath`, and either `routes`
394
- or a full `routeManifest`.
395
- - `list-localhost-connections`: lists the current user's saved localhost
396
- connections and route manifests. Use this before referring to local-code
397
- artboards.
398
- - `add-localhost-screens`: creates or refreshes URL-backed iframe screens from
399
- the latest localhost connection or a specific `connectionId`. Pass `routes`
400
- with `path`/`url` when visualizing a flow; pass `paths` for a concise route
401
- list. Then call `navigate --view editor --designId <id> --editorView overview`.
402
- - `write-local-file`: writes/patches a local file through the bridge, but only
403
- when a user-approved write-consent grant exists. Granting is human-only
404
- (`grant-localhost-write-consent` is hidden from agents), so you cannot approve
405
- it yourself.
406
- - `request-localhost-write-consent`: call this when `write-local-file` fails
407
- with "no write-consent grant". It opens the write-consent dialog in the
408
- editor (or reports `alreadyGranted`). Tell the user to click "Allow writes",
409
- then retry `write-local-file`. Do not keep retrying blindly — the write stays
410
- blocked until the user approves.
411
-
412
- ## Review, Breakpoints, Screen States & Components
413
-
414
- - **Review**: `run-design-audit` runs a read-only accessibility audit over a
415
- design's rendered HTML (missing alt/labels, tap-target size,
416
- focus-visibility, reduced-motion coverage, a contrast hint) and returns
417
- `A11yFinding[]`. `apply-a11y-fix` applies one deterministic inline fix for a
418
- finding (contrast, tap-target size, focus ring) when `fixAvailable: true`.
419
- `get-design-review` compares two design snapshots/branches and returns a
420
- file-level visual diff (added/removed/modified). See the `design-generation`
421
- skill's Phase 5 for when to run these.
422
- - **Breakpoints**: `add-breakpoint`, `remove-breakpoint`, and
423
- `set-active-breakpoint` manage the design's device-width frame set and which
424
- frame new edits target. Breakpoint frames are one document with a
425
- Framer-style cascade (base = widest frame; narrower-frame edits persist as
426
- width-scoped overrides via `apply-visual-edit` + `activeFrameWidthPx`).
427
- `set-active-breakpoint.editScope` is `cascade-smaller` by default; use
428
- `only` when the user explicitly wants a bounded, breakpoint-only override.
429
- Read the `responsive-breakpoints` skill before responsive edits.
430
- - **Design states**: `create-design-state`, `apply-design-state`,
431
- `capture-design-state`, `list-design-states`, and `delete-design-state`
432
- manage named DOM/Alpine states (Loading/Empty/Error), static data fixtures,
433
- and live app captures. See the same skill section.
434
- - **Components**: `create-component` promotes a selected element into a
435
- recognised reusable component; `index-components` scans a design's HTML for
436
- existing component annotations; `list-design-components` scans all HTML
437
- screens for swap targets; `get-component-details`,
438
- `preview-component-prop-edit`, `apply-component-prop-edit`, and
439
- `open-component-source` inspect, preview, persist, and navigate to a
440
- component instance. Use `go-to-main-component` to select the earliest known
441
- instance, `swap-component-instance` to replace an inline/Alpine instance
442
- while preserving same-named prop overrides, and
443
- `detach-component-instance` to turn an instance into plain editable markup.
444
- See the `design-generation` skill's "Component reuse" section — promote a
445
- 3+ times repeated pattern instead of inventing another near-duplicate.
446
- - **Suggested auto layout**: for an absolute/freeform container, first measure
447
- its direct children and present the proposed direction, visual order, gap,
448
- four-side padding, alignment, and sizing. Do not mutate source until the user
449
- applies the preview. Inline HTML/Alpine applies the reviewed proposal through
450
- one `apply-visual-edit`-backed content transaction so undo restores the exact
451
- prior structure. Local React uses the semantic source handoff (never generic
452
- AST rewriting), preserves nested absolute descendants and responsive logic,
453
- and applies the approved proposal as one reversible source edit.
454
-
455
- ## Full App Building
456
-
457
- Flag-gated by `FULL_APP_BUILDING` in `shared/full-app.ts` (key
458
- `full-app-building`, default off) and requires Builder connected. See
459
- `full-app-build` skill for the full flow.
460
-
461
- - `create-fusion-app`: creates the app branch via the Builder cloud agent; one
462
- branch per design; returns existing linkage if already created.
463
- - `sync-fusion-app`: boots/attaches the container; poll while building; on
464
- ready, updates `previewUrl` and upserts URL-backed screens.
465
- - `add-fusion-screens`: places more routes as screens once `previewUrl` is
466
- known.
467
- - `queue-fusion-edit`: queues one edit intent against a fusion screen.
468
- - `list-fusion-edits`: inspects the queued edits.
469
- - `apply-fusion-edits`: batches pending edits into one prompt for the app's
470
- in-container agent (fire-and-forget); marks them "sent".
471
- - `send-fusion-message`: relays a freeform request to the app's coding agent.
472
- - `push-fusion-app`: pushes the branch's code to its git remote.
473
- - `deploy-fusion-app`: reserves `<slug>.builder.cloud` and triggers a deploy.
474
- - `get-fusion-deploy-status`: polls deploy status until live/failed/canceled.
475
- - Fusion screens are URL-backed iframes, same model as localhost screens.
476
- Never inline-edit a fusion screen's HTML or use `generate-design` /
477
- `edit-design` / `apply-visual-edit` on it — queue and dispatch edits
478
- instead. When not configured, actions return a connect CTA like
479
- `migrate-inline-design-to-app`; never throw or invent `fusionApp` data.
480
-
481
- ## App-Backed Skill Distribution
482
-
483
- - The preferred hosted install path is
484
- `npx @agent-native/core@latest skills add design-exploration`,
485
- `npx @agent-native/core@latest skills add visual-edit`, or `design` for the
486
- full Design bundle. It installs the exported Design instructions and registers
487
- the hosted Design MCP connector together.
488
- - The open Skills CLI path
489
- `npx skills@latest add BuilderIO/agent-native --skill visual-edit` installs
490
- exported instructions only.
491
- - For local-code visual editing, `/visual-edit` should run the target app dev
492
- server, run
493
- `npx @agent-native/core@latest design connect --url http://localhost:<port> --root .`,
494
- register that manifest with `connect-localhost`, call `add-localhost-screens`,
495
- and open the editor in overview mode.
496
- - For human-in-the-loop UI exploration, create a design shell, call
497
- `present-design-variants` with 2-5 concise directions (three by default),
498
- wait for the user to pick one in chat, delete each other generated variant
499
- screen with `delete-file` at most once, call `get-design-snapshot` exactly
500
- once with the selected screen's `fileId`, then call `edit-design` exactly once
501
- on that same `fileId` for follow-up refinement. The kept variant screen is a
502
- representative direction, not the final deliverable: use `mode:
503
- "replace-file"` to replace it with the actual requested app/product UI in the
504
- chosen visual style. Keep the replacement complete but compact: prioritize
505
- the primary workflow, and if the requested feature list is too large for one
506
- reliable edit, represent secondary details as visible controls, states, or
507
- affordances instead of expanding the action input. Do not leave a direction
508
- board, variant brief, summary card, or prose description as the final screen.
509
- Do not repeat delete/snapshot cycles, and do not call `generate-design` after
510
- a variant pick.
511
- - If inline chat choice buttons are unavailable, the user can tell you the
512
- preferred screen name. Do not show a separate variant picker or ask them to
513
- paste a copyable handoff summary.
86
+ - `design-generation-session:<designId>` multi-screen generation planning
87
+ state from `generate-screens` (canvas region assignments, per-frame
88
+ instructions consumed by `generate-design`).
89
+ - `design-reprompt-pending:<designId>:<fileId>` /
90
+ `design-reprompt-proposal:<designId>:<fileId>:<repromptId>` the
91
+ compare-and-set reprompt request/proposal pair; see `visual-edit`'s
92
+ "Select And Reprompt" for the full lifecycle.
93
+ - `show-design-questions` opens pre-generation questions in the main canvas
94
+ (`show-questions` state). `guided-questions` may hold a one-click chat
95
+ choice for the current variant set.
514
96
 
515
97
  ## Skills
516
98
 
517
99
  Read the relevant skill before deeper work:
518
100
 
519
- - `design-generation` for creating/editing prototype HTML and variant flows.
520
- - `design-templates` for resolving, saving, copying, and adapting templates or
521
- prior Design work without fresh generation.
522
- - `responsive-breakpoints` for Framer-style breakpoint editing (single DOM,
523
- cascading width-scoped overrides, the managed breakpoints media block).
524
- - `design-systems` for tokens, brand extraction, and linked systems.
525
- - `creative-context` for cross-app source reuse, pinned packs, provenance, and
526
- context opt-out.
527
- - `export-handoff` for HTML/PNG/SVG/ZIP/code handoff.
528
- - `full-app-build` for flag-gated fusion-backed full app building.
529
- - `shader-fills` for code-backed GLSL shader fills/effects (editable source
530
- in screen HTML, uniform knobs, preset library, and the picker's "Create a
531
- custom shader fill." prompt).
532
- - `frontend-design` and `shadcn-ui` for app UI changes.
533
- - `actions`, `delegate-to-agent`, `security`, and `self-modifying-code` for
534
- framework patterns.
101
+ - `design-generation` 5-phase generation flow, aesthetic quality bar, code
102
+ layers/code workspace, editor extensions, breakpoints/screen
103
+ states/components, motion, imagery.
104
+ - `design-templates` resolving, saving, copying, adapting templates or prior
105
+ Design work without fresh generation.
106
+ - `responsive-breakpoints` Framer-style breakpoint editing.
107
+ - `design-systems` tokens, brand extraction, and Figma import/read.
108
+ - `creative-context` — cross-app source reuse, pinned packs, provenance,
109
+ context opt-out, submitting a design to a governed Context.
110
+ - `design-review-feedback` persisted, element-anchored review comments to a
111
+ verified close.
112
+ - `export-handoff` HTML/PNG/SVG/ZIP/code and coding-handoff export.
113
+ - `visual-edit` editing a real local app visually (localhost bridge, Code
114
+ tab, reprompt write boundary).
115
+ - `full-app-build` flag-gated fusion-backed full app building.
116
+ - `shader-fills` — code-backed GLSL shader fills/effects.
117
+ - `sharing` — design and design-system visibility/grants.
118
+ - `frontend-design`, `shadcn-ui` for UI; `actions`, `delegate-to-agent`,
119
+ `security`, `self-modifying-code` for framework patterns.
@@ -44,3 +44,4 @@ learnings.md
44
44
  /e2e/.auth/
45
45
  data/e2e.db
46
46
  data/e2e.db-*
47
+ .agent-native/