@agent-native/core 0.114.16 → 0.115.3

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 (476) hide show
  1. package/agent-native.eject.json +2 -0
  2. package/corpus/README.md +3 -3
  3. package/corpus/core/CHANGELOG.md +41 -0
  4. package/corpus/core/agent-native.eject.json +2 -0
  5. package/corpus/core/docs/content/agent-native-toolkit.mdx +16 -0
  6. package/corpus/core/docs/content/recurring-jobs.mdx +35 -6
  7. package/corpus/core/export-snapshot.json +4 -0
  8. package/corpus/core/package.json +5 -1
  9. package/corpus/core/src/action.ts +22 -1
  10. package/corpus/core/src/agent/production-agent.ts +122 -3
  11. package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +19 -2
  12. package/corpus/core/src/cli/templates-meta.ts +12 -0
  13. package/corpus/core/src/client/AssistantChat.tsx +53 -26
  14. package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +19 -0
  15. package/corpus/core/src/client/agent-page/use-jobs.ts +1 -0
  16. package/corpus/core/src/client/blocks/library/wireframe.tsx +3 -1
  17. package/corpus/core/src/client/chat/message-components.tsx +35 -1
  18. package/corpus/core/src/client/chat/tool-call-display.tsx +38 -3
  19. package/corpus/core/src/connections/catalog.ts +20 -1
  20. package/corpus/core/src/connections/reader.ts +65 -0
  21. package/corpus/core/src/dashboard-storage/index.ts +27 -0
  22. package/corpus/core/src/dashboard-storage/panel-source.ts +168 -0
  23. package/corpus/core/src/dashboard-storage/schema.ts +62 -0
  24. package/corpus/core/src/dashboard-storage/store.ts +333 -0
  25. package/corpus/core/src/deploy/build.ts +95 -16
  26. package/corpus/core/src/eject/provider-api-definitions.ts +1 -0
  27. package/corpus/core/src/eject/workspace-connections.ts +1 -0
  28. package/corpus/core/src/extensions/actions.ts +199 -73
  29. package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +2 -0
  30. package/corpus/core/src/jobs/scheduler.ts +71 -4
  31. package/corpus/core/src/jobs/tools.ts +31 -1
  32. package/corpus/core/src/localization/default-messages.ts +1 -0
  33. package/corpus/core/src/mcp-client/index.ts +6 -0
  34. package/corpus/core/src/provider-api/actions/provider-api.ts +1 -1
  35. package/corpus/core/src/provider-api/index.ts +190 -5
  36. package/corpus/core/src/secrets/register-framework-secrets.ts +8 -0
  37. package/corpus/core/src/server/agent-chat/context-tools.ts +9 -0
  38. package/corpus/core/src/server/agent-chat/framework-prompts.ts +2 -2
  39. package/corpus/core/src/server/agent-chat-plugin.ts +22 -2
  40. package/corpus/core/src/server/core-routes-plugin.ts +1 -0
  41. package/corpus/core/src/server/credential-provider.ts +9 -3
  42. package/corpus/core/src/server/workspace-provider-oauth.ts +181 -4
  43. package/corpus/core/src/styles/agent-native.css +45 -2
  44. package/corpus/core/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +27 -0
  45. package/corpus/core/src/templates/default/.agents/skills/app-branding/SKILL.md +159 -0
  46. package/corpus/core/src/templates/default/.agents/skills/app-permissions/SKILL.md +155 -0
  47. package/corpus/core/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +27 -0
  48. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +27 -0
  49. package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +31 -18
  50. package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +15 -0
  51. package/corpus/core/src/triggers/actions.ts +11 -2
  52. package/corpus/core/src/triggers/dispatcher.ts +20 -1
  53. package/corpus/core/src/triggers/types.ts +5 -0
  54. package/corpus/core/src/vite/action-types-plugin.ts +9 -1
  55. package/corpus/templates/analytics/.agents/skills/agent-native-docs/SKILL.md +115 -0
  56. package/corpus/templates/analytics/AGENTS.md +11 -11
  57. package/corpus/templates/analytics/_gitignore +39 -0
  58. package/corpus/templates/analytics/actions/query-dashboard-panel.ts +30 -0
  59. package/corpus/templates/analytics/actions/update-dashboard.ts +2 -1
  60. package/corpus/templates/analytics/app/lib/sql-query.ts +11 -25
  61. package/corpus/templates/analytics/changelog/2026-07-21-fixed-extension-updates-failing-before-changes-could-be-appl.md +6 -0
  62. package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +1 -0
  63. package/corpus/templates/analytics/server/lib/dashboard-panel-source-resolver.ts +51 -0
  64. package/corpus/templates/analytics/server/lib/prometheus.ts +1 -1
  65. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -1
  66. package/corpus/templates/assets/.agents/skills/agent-native-docs/SKILL.md +115 -0
  67. package/corpus/templates/brain/.agents/skills/agent-native-docs/SKILL.md +115 -0
  68. package/corpus/templates/calendar/.agents/skills/agent-native-docs/SKILL.md +115 -0
  69. package/corpus/templates/calendar/_gitignore +39 -0
  70. package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +27 -0
  71. package/corpus/templates/chat/AGENTS.md +1 -1
  72. package/corpus/templates/clips/.agents/skills/agent-native-docs/SKILL.md +115 -0
  73. package/corpus/templates/clips/AGENTS.md +7 -0
  74. package/corpus/templates/clips/actions/prepare-crm-call-evidence.ts +58 -0
  75. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +88 -11
  76. package/corpus/templates/clips/changelog/2026-07-21-crm-call-evidence-handoff.md +6 -0
  77. package/corpus/templates/clips/changelog/2026-07-21-recording-retries-and-restarts-keep-their-upload-session-so-.md +6 -0
  78. package/corpus/templates/clips/chrome-extension/src/background.ts +20 -5
  79. package/corpus/templates/clips/chrome-extension/src/native-recording-state.ts +19 -0
  80. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +8 -0
  81. package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +9 -0
  82. package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +54 -28
  83. package/corpus/templates/clips/server/plugins/agent-chat.ts +1 -0
  84. package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +115 -0
  85. package/corpus/templates/content/_gitignore +39 -0
  86. package/corpus/templates/content/learnings.defaults.md +5 -0
  87. package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +115 -0
  88. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +133 -0
  89. package/corpus/templates/crm/.agents/skills/crm/SKILL.md +128 -0
  90. package/corpus/templates/crm/.agents/skills/customizing-agent-native/SKILL.md +145 -0
  91. package/corpus/templates/crm/.agents/skills/feature-flags/SKILL.md +169 -0
  92. package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +100 -0
  93. package/corpus/templates/crm/.env.example +5 -0
  94. package/corpus/templates/crm/AGENTS.md +120 -0
  95. package/corpus/templates/crm/CHANGELOG.md +1 -0
  96. package/corpus/templates/crm/DEVELOPING.md +66 -0
  97. package/corpus/templates/crm/README.md +106 -0
  98. package/corpus/templates/crm/_gitignore +12 -0
  99. package/corpus/templates/crm/actions/_crm-action-utils.ts +87 -0
  100. package/corpus/templates/crm/actions/_crm-dashboard.ts +69 -0
  101. package/corpus/templates/crm/actions/_crm-signal-utils.ts +79 -0
  102. package/corpus/templates/crm/actions/apply-crm-proposals.ts +203 -0
  103. package/corpus/templates/crm/actions/attach-call-evidence.ts +170 -0
  104. package/corpus/templates/crm/actions/configure-crm-connection.ts +126 -0
  105. package/corpus/templates/crm/actions/configure-native-crm.ts +44 -0
  106. package/corpus/templates/crm/actions/create-crm-record.ts +148 -0
  107. package/corpus/templates/crm/actions/create-crm-signal-tracker.ts +58 -0
  108. package/corpus/templates/crm/actions/delete-staged-dataset.ts +14 -0
  109. package/corpus/templates/crm/actions/get-crm-automation-recipe.ts +36 -0
  110. package/corpus/templates/crm/actions/get-crm-dashboard-panel.ts +33 -0
  111. package/corpus/templates/crm/actions/get-crm-dashboard.ts +14 -0
  112. package/corpus/templates/crm/actions/get-crm-overview.ts +13 -0
  113. package/corpus/templates/crm/actions/get-crm-pipeline-data.ts +61 -0
  114. package/corpus/templates/crm/actions/get-crm-record.ts +75 -0
  115. package/corpus/templates/crm/actions/install-crm-pipeline-dashboard.ts +81 -0
  116. package/corpus/templates/crm/actions/list-crm-dashboard-revisions.ts +15 -0
  117. package/corpus/templates/crm/actions/list-crm-dashboards.ts +15 -0
  118. package/corpus/templates/crm/actions/list-crm-proposals.ts +31 -0
  119. package/corpus/templates/crm/actions/list-crm-records.ts +79 -0
  120. package/corpus/templates/crm/actions/list-crm-saved-views.ts +15 -0
  121. package/corpus/templates/crm/actions/list-crm-signal-hits.ts +43 -0
  122. package/corpus/templates/crm/actions/list-crm-signal-trackers.ts +32 -0
  123. package/corpus/templates/crm/actions/list-crm-tasks.ts +22 -0
  124. package/corpus/templates/crm/actions/list-staged-datasets.ts +14 -0
  125. package/corpus/templates/crm/actions/list-workspace-connections.ts +47 -0
  126. package/corpus/templates/crm/actions/manage-crm-signal-tracker.ts +87 -0
  127. package/corpus/templates/crm/actions/manage-crm-task.ts +132 -0
  128. package/corpus/templates/crm/actions/navigate.ts +63 -0
  129. package/corpus/templates/crm/actions/provider-api-catalog.ts +22 -0
  130. package/corpus/templates/crm/actions/provider-api-docs.ts +54 -0
  131. package/corpus/templates/crm/actions/provider-api-request.ts +92 -0
  132. package/corpus/templates/crm/actions/query-staged-dataset.ts +44 -0
  133. package/corpus/templates/crm/actions/record-crm-call-insight.ts +160 -0
  134. package/corpus/templates/crm/actions/record-crm-smart-signal.ts +150 -0
  135. package/corpus/templates/crm/actions/restore-crm-dashboard-revision.ts +23 -0
  136. package/corpus/templates/crm/actions/review-crm-signal.ts +31 -0
  137. package/corpus/templates/crm/actions/run-crm-saved-view-program.ts +103 -0
  138. package/corpus/templates/crm/actions/run-crm-signal-trackers.ts +275 -0
  139. package/corpus/templates/crm/actions/run.ts +11 -0
  140. package/corpus/templates/crm/actions/save-crm-dashboard.ts +51 -0
  141. package/corpus/templates/crm/actions/save-crm-saved-view.ts +119 -0
  142. package/corpus/templates/crm/actions/sync-crm.ts +146 -0
  143. package/corpus/templates/crm/actions/update-crm-record.ts +508 -0
  144. package/corpus/templates/crm/actions/view-screen.ts +218 -0
  145. package/corpus/templates/crm/agent-native.app-skill.json +58 -0
  146. package/corpus/templates/crm/app/components/crm/CreateCrmRecordDialog.tsx +158 -0
  147. package/corpus/templates/crm/app/components/crm/CrmDashboardPanel.tsx +83 -0
  148. package/corpus/templates/crm/app/components/crm/CrmSignalsPanel.tsx +225 -0
  149. package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +413 -0
  150. package/corpus/templates/crm/app/components/crm/RecordActions.tsx +510 -0
  151. package/corpus/templates/crm/app/components/crm/RecordGrid.tsx +134 -0
  152. package/corpus/templates/crm/app/components/crm/RecordWorkspace.tsx +367 -0
  153. package/corpus/templates/crm/app/components/crm/SavedViewDataProgram.tsx +92 -0
  154. package/corpus/templates/crm/app/components/crm/Surface.tsx +96 -0
  155. package/corpus/templates/crm/app/components/crm/WorkOverview.tsx +180 -0
  156. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +106 -0
  157. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +84 -0
  158. package/corpus/templates/crm/app/entry.client.tsx +16 -0
  159. package/corpus/templates/crm/app/entry.server.tsx +10 -0
  160. package/corpus/templates/crm/app/global.css +167 -0
  161. package/corpus/templates/crm/app/hooks/use-navigation-state.ts +60 -0
  162. package/corpus/templates/crm/app/i18n/en-US.ts +89 -0
  163. package/corpus/templates/crm/app/i18n/index.ts +34 -0
  164. package/corpus/templates/crm/app/lib/dashboard.ts +13 -0
  165. package/corpus/templates/crm/app/lib/navigation.ts +54 -0
  166. package/corpus/templates/crm/app/lib/tab-id.ts +1 -0
  167. package/corpus/templates/crm/app/lib/types.ts +172 -0
  168. package/corpus/templates/crm/app/lib/utils.ts +1 -0
  169. package/corpus/templates/crm/app/root.tsx +88 -0
  170. package/corpus/templates/crm/app/routes/_index.tsx +26 -0
  171. package/corpus/templates/crm/app/routes/accounts.tsx +41 -0
  172. package/corpus/templates/crm/app/routes/agent.tsx +5 -0
  173. package/corpus/templates/crm/app/routes/ask.tsx +53 -0
  174. package/corpus/templates/crm/app/routes/dashboard.tsx +118 -0
  175. package/corpus/templates/crm/app/routes/opportunities.tsx +41 -0
  176. package/corpus/templates/crm/app/routes/people.tsx +41 -0
  177. package/corpus/templates/crm/app/routes/proposals.tsx +266 -0
  178. package/corpus/templates/crm/app/routes/records.$recordId.tsx +35 -0
  179. package/corpus/templates/crm/app/routes/settings.tsx +63 -0
  180. package/corpus/templates/crm/app/routes/setup.tsx +308 -0
  181. package/corpus/templates/crm/app/routes/tasks.tsx +252 -0
  182. package/corpus/templates/crm/app/routes/views.tsx +333 -0
  183. package/corpus/templates/crm/app/routes.ts +17 -0
  184. package/corpus/templates/crm/app/vite-env.d.ts +6 -0
  185. package/corpus/templates/crm/changelog/2026-07-21-agent-native-crm.md +6 -0
  186. package/corpus/templates/crm/changelog/2026-07-21-clips-call-evidence-review-recipe.md +6 -0
  187. package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-find-and-review-evidence-grounded-call-signals-w.md +6 -0
  188. package/corpus/templates/crm/changelog/2026-07-21-crm-can-now-manage-keyword-and-smart-call-signal-trackers-fr.md +6 -0
  189. package/corpus/templates/crm/changelog/2026-07-21-delegated-local-crm-automation.md +6 -0
  190. package/corpus/templates/crm/changelog/2026-07-21-native-sql.md +6 -0
  191. package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboard.md +6 -0
  192. package/corpus/templates/crm/changelog/2026-07-21-pipeline-dashboards-now-install-correctly-from-the-crm-actio.md +6 -0
  193. package/corpus/templates/crm/changelog/2026-07-21-salesforce-connection.md +6 -0
  194. package/corpus/templates/crm/components.json +20 -0
  195. package/corpus/templates/crm/docs/architecture/crm-contract.md +180 -0
  196. package/corpus/templates/crm/learnings.defaults.md +5 -0
  197. package/corpus/templates/crm/package.json +59 -0
  198. package/corpus/templates/crm/public/favicon.svg +1 -0
  199. package/corpus/templates/crm/public/icon-180.svg +1 -0
  200. package/corpus/templates/crm/public/manifest.json +11 -0
  201. package/corpus/templates/crm/react-router.config.ts +7 -0
  202. package/corpus/templates/crm/server/crm/adapter.ts +32 -0
  203. package/corpus/templates/crm/server/crm/crm-field-firewall.ts +64 -0
  204. package/corpus/templates/crm/server/crm/crm-mirror.ts +711 -0
  205. package/corpus/templates/crm/server/crm/hubspot-adapter.ts +1143 -0
  206. package/corpus/templates/crm/server/crm/native-adapter.ts +1715 -0
  207. package/corpus/templates/crm/server/crm/read-through.ts +207 -0
  208. package/corpus/templates/crm/server/crm/salesforce-adapter.ts +1255 -0
  209. package/corpus/templates/crm/server/db/crm-store.ts +1170 -0
  210. package/corpus/templates/crm/server/db/index.ts +169 -0
  211. package/corpus/templates/crm/server/db/schema.ts +441 -0
  212. package/corpus/templates/crm/server/lib/intelligence/default-detectors.ts +65 -0
  213. package/corpus/templates/crm/server/lib/intelligence/evidence.ts +105 -0
  214. package/corpus/templates/crm/server/lib/intelligence/keyword-detector.ts +100 -0
  215. package/corpus/templates/crm/server/lib/intelligence/smart-detector.ts +144 -0
  216. package/corpus/templates/crm/server/lib/intelligence/summary.ts +141 -0
  217. package/corpus/templates/crm/server/lib/provider-api.ts +64 -0
  218. package/corpus/templates/crm/server/middleware/auth.ts +4 -0
  219. package/corpus/templates/crm/server/plugins/agent-chat.ts +68 -0
  220. package/corpus/templates/crm/server/plugins/auth.ts +14 -0
  221. package/corpus/templates/crm/server/plugins/core-routes.ts +17 -0
  222. package/corpus/templates/crm/server/plugins/db.ts +454 -0
  223. package/corpus/templates/crm/server/routes/[...page].get.ts +5 -0
  224. package/corpus/templates/crm/shared/crm-automation-recipes.ts +132 -0
  225. package/corpus/templates/crm/shared/crm-contract.ts +254 -0
  226. package/corpus/templates/crm/shared/crm-sales-config.ts +63 -0
  227. package/corpus/templates/crm/ssr-entry.ts +11 -0
  228. package/corpus/templates/crm/tsconfig.json +24 -0
  229. package/corpus/templates/crm/vite.config.ts +15 -0
  230. package/corpus/templates/crm/vitest.config.ts +5 -0
  231. package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +115 -0
  232. package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +115 -0
  233. package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +115 -0
  234. package/corpus/templates/forms/_gitignore +39 -0
  235. package/corpus/templates/forms/learnings.defaults.md +5 -0
  236. package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +115 -0
  237. package/corpus/templates/macros/_gitignore +39 -0
  238. package/corpus/templates/macros/learnings.defaults.md +5 -0
  239. package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +115 -0
  240. package/corpus/templates/mail/_gitignore +39 -0
  241. package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +115 -0
  242. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +19 -2
  243. package/corpus/templates/plan/AGENTS.md +10 -0
  244. package/corpus/templates/plan/actions/create-prototype-plan.ts +27 -3
  245. package/corpus/templates/plan/actions/get-plan-blocks.ts +1 -1
  246. package/corpus/templates/plan/actions/update-visual-plan.ts +3 -2
  247. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +18 -4
  248. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +10 -3
  249. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +3 -1
  250. package/corpus/templates/plan/app/i18n/en-US.ts +6 -0
  251. package/corpus/templates/plan/app/lib/create-plan-routing.ts +39 -0
  252. package/corpus/templates/plan/app/pages/PlansPage.tsx +31 -107
  253. package/corpus/templates/plan/changelog/2026-07-22-high-fidelity-mockup-requests-now-preserve-branded-css-use-d.md +6 -0
  254. package/corpus/templates/plan/shared/plan-content.ts +110 -2
  255. package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +115 -0
  256. package/corpus/templates/slides/_gitignore +39 -0
  257. package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +27 -0
  258. package/corpus/templates/tasks/_gitignore +39 -0
  259. package/corpus/toolkit/CHANGELOG.md +12 -0
  260. package/corpus/toolkit/README.md +30 -0
  261. package/corpus/toolkit/agent-native.eject.json +33 -0
  262. package/corpus/toolkit/package.json +15 -1
  263. package/corpus/toolkit/src/dashboard/DataTable.tsx +273 -0
  264. package/corpus/toolkit/src/dashboard/DateRangePicker.tsx +57 -0
  265. package/corpus/toolkit/src/dashboard/GenericChartPanel.tsx +461 -0
  266. package/corpus/toolkit/src/dashboard/MetricCard.tsx +54 -0
  267. package/corpus/toolkit/src/dashboard/StatsCard.tsx +49 -0
  268. package/corpus/toolkit/src/dashboard/dashboard-layout.ts +329 -0
  269. package/corpus/toolkit/src/dashboard/index.ts +6 -0
  270. package/corpus/toolkit/src/index.ts +1 -0
  271. package/corpus/toolkit/src/ui/calendar.tsx +8 -8
  272. package/corpus/toolkit/src/ui/date-picker.tsx +4 -1
  273. package/dist/action.d.ts +14 -1
  274. package/dist/action.d.ts.map +1 -1
  275. package/dist/action.js.map +1 -1
  276. package/dist/agent/production-agent.d.ts +3 -1
  277. package/dist/agent/production-agent.d.ts.map +1 -1
  278. package/dist/agent/production-agent.js +97 -3
  279. package/dist/agent/production-agent.js.map +1 -1
  280. package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
  281. package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
  282. package/dist/cli/skills-content/visual-plan-skill.js +19 -2
  283. package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
  284. package/dist/cli/templates-meta.d.ts.map +1 -1
  285. package/dist/cli/templates-meta.js +12 -0
  286. package/dist/cli/templates-meta.js.map +1 -1
  287. package/dist/client/AssistantChat.d.ts +4 -0
  288. package/dist/client/AssistantChat.d.ts.map +1 -1
  289. package/dist/client/AssistantChat.js +30 -17
  290. package/dist/client/AssistantChat.js.map +1 -1
  291. package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -1
  292. package/dist/client/agent-page/AgentJobsTab.js +3 -1
  293. package/dist/client/agent-page/AgentJobsTab.js.map +1 -1
  294. package/dist/client/agent-page/use-jobs.d.ts +1 -0
  295. package/dist/client/agent-page/use-jobs.d.ts.map +1 -1
  296. package/dist/client/agent-page/use-jobs.js.map +1 -1
  297. package/dist/client/blocks/library/wireframe.d.ts.map +1 -1
  298. package/dist/client/blocks/library/wireframe.js +3 -2
  299. package/dist/client/blocks/library/wireframe.js.map +1 -1
  300. package/dist/client/chat/message-components.d.ts +5 -0
  301. package/dist/client/chat/message-components.d.ts.map +1 -1
  302. package/dist/client/chat/message-components.js +17 -1
  303. package/dist/client/chat/message-components.js.map +1 -1
  304. package/dist/client/chat/tool-call-display.d.ts +3 -1
  305. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  306. package/dist/client/chat/tool-call-display.js +17 -7
  307. package/dist/client/chat/tool-call-display.js.map +1 -1
  308. package/dist/collab/routes.d.ts +1 -1
  309. package/dist/collab/struct-routes.d.ts +1 -1
  310. package/dist/connections/catalog.d.ts +17 -3
  311. package/dist/connections/catalog.d.ts.map +1 -1
  312. package/dist/connections/catalog.js +16 -1
  313. package/dist/connections/catalog.js.map +1 -1
  314. package/dist/connections/reader.d.ts +18 -0
  315. package/dist/connections/reader.d.ts.map +1 -1
  316. package/dist/connections/reader.js +41 -0
  317. package/dist/connections/reader.js.map +1 -1
  318. package/dist/dashboard-storage/index.d.ts +4 -0
  319. package/dist/dashboard-storage/index.d.ts.map +1 -0
  320. package/dist/dashboard-storage/index.js +4 -0
  321. package/dist/dashboard-storage/index.js.map +1 -0
  322. package/dist/dashboard-storage/panel-source.d.ts +68 -0
  323. package/dist/dashboard-storage/panel-source.d.ts.map +1 -0
  324. package/dist/dashboard-storage/panel-source.js +76 -0
  325. package/dist/dashboard-storage/panel-source.js.map +1 -0
  326. package/dist/dashboard-storage/schema.d.ts +562 -0
  327. package/dist/dashboard-storage/schema.d.ts.map +1 -0
  328. package/dist/dashboard-storage/schema.js +32 -0
  329. package/dist/dashboard-storage/schema.js.map +1 -0
  330. package/dist/dashboard-storage/store.d.ts +62 -0
  331. package/dist/dashboard-storage/store.d.ts.map +1 -0
  332. package/dist/dashboard-storage/store.js +227 -0
  333. package/dist/dashboard-storage/store.js.map +1 -0
  334. package/dist/deploy/build.d.ts +7 -0
  335. package/dist/deploy/build.d.ts.map +1 -1
  336. package/dist/deploy/build.js +78 -14
  337. package/dist/deploy/build.js.map +1 -1
  338. package/dist/eject/provider-api-definitions.d.ts +2 -1
  339. package/dist/eject/provider-api-definitions.d.ts.map +1 -1
  340. package/dist/eject/provider-api-definitions.js +1 -0
  341. package/dist/eject/provider-api-definitions.js.map +1 -1
  342. package/dist/eject/workspace-connections.d.ts.map +1 -1
  343. package/dist/eject/workspace-connections.js +1 -0
  344. package/dist/eject/workspace-connections.js.map +1 -1
  345. package/dist/extensions/actions.d.ts.map +1 -1
  346. package/dist/extensions/actions.js +165 -67
  347. package/dist/extensions/actions.js.map +1 -1
  348. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  349. package/dist/jobs/actions/list-recurring-jobs.d.ts +1 -0
  350. package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -1
  351. package/dist/jobs/actions/list-recurring-jobs.js +1 -0
  352. package/dist/jobs/actions/list-recurring-jobs.js.map +1 -1
  353. package/dist/jobs/scheduler.d.ts +17 -2
  354. package/dist/jobs/scheduler.d.ts.map +1 -1
  355. package/dist/jobs/scheduler.js +51 -2
  356. package/dist/jobs/scheduler.js.map +1 -1
  357. package/dist/jobs/tools.d.ts.map +1 -1
  358. package/dist/jobs/tools.js +32 -2
  359. package/dist/jobs/tools.js.map +1 -1
  360. package/dist/localization/default-messages.d.ts +1 -0
  361. package/dist/localization/default-messages.d.ts.map +1 -1
  362. package/dist/localization/default-messages.js +1 -0
  363. package/dist/localization/default-messages.js.map +1 -1
  364. package/dist/mcp-client/index.d.ts +2 -0
  365. package/dist/mcp-client/index.d.ts.map +1 -1
  366. package/dist/mcp-client/index.js +5 -0
  367. package/dist/mcp-client/index.js.map +1 -1
  368. package/dist/notifications/routes.d.ts +3 -3
  369. package/dist/progress/routes.d.ts +1 -1
  370. package/dist/provider-api/actions/custom-provider-registration.d.ts +8 -8
  371. package/dist/provider-api/actions/provider-api.d.ts +8 -6
  372. package/dist/provider-api/actions/provider-api.d.ts.map +1 -1
  373. package/dist/provider-api/actions/provider-api.js +1 -1
  374. package/dist/provider-api/actions/provider-api.js.map +1 -1
  375. package/dist/provider-api/index.d.ts +11 -7
  376. package/dist/provider-api/index.d.ts.map +1 -1
  377. package/dist/provider-api/index.js +143 -5
  378. package/dist/provider-api/index.js.map +1 -1
  379. package/dist/resources/handlers.d.ts +1 -1
  380. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  381. package/dist/secrets/register-framework-secrets.js +7 -0
  382. package/dist/secrets/register-framework-secrets.js.map +1 -1
  383. package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
  384. package/dist/server/agent-chat/context-tools.js +9 -0
  385. package/dist/server/agent-chat/context-tools.js.map +1 -1
  386. package/dist/server/agent-chat/framework-prompts.js +2 -2
  387. package/dist/server/agent-chat/framework-prompts.js.map +1 -1
  388. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  389. package/dist/server/agent-chat-plugin.js +18 -2
  390. package/dist/server/agent-chat-plugin.js.map +1 -1
  391. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  392. package/dist/server/core-routes-plugin.js +1 -0
  393. package/dist/server/core-routes-plugin.js.map +1 -1
  394. package/dist/server/credential-provider.d.ts +4 -3
  395. package/dist/server/credential-provider.d.ts.map +1 -1
  396. package/dist/server/credential-provider.js +9 -3
  397. package/dist/server/credential-provider.js.map +1 -1
  398. package/dist/server/workspace-provider-oauth.d.ts +6 -1
  399. package/dist/server/workspace-provider-oauth.d.ts.map +1 -1
  400. package/dist/server/workspace-provider-oauth.js +141 -4
  401. package/dist/server/workspace-provider-oauth.js.map +1 -1
  402. package/dist/styles/agent-native.css +45 -2
  403. package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +27 -0
  404. package/dist/templates/chat/AGENTS.md +1 -1
  405. package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +27 -0
  406. package/dist/templates/default/.agents/skills/app-branding/SKILL.md +159 -0
  407. package/dist/templates/default/.agents/skills/app-permissions/SKILL.md +155 -0
  408. package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +27 -0
  409. package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +27 -0
  410. package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +31 -18
  411. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +15 -0
  412. package/dist/triggers/actions.d.ts.map +1 -1
  413. package/dist/triggers/actions.js +10 -2
  414. package/dist/triggers/actions.js.map +1 -1
  415. package/dist/triggers/dispatcher.d.ts.map +1 -1
  416. package/dist/triggers/dispatcher.js +15 -0
  417. package/dist/triggers/dispatcher.js.map +1 -1
  418. package/dist/triggers/types.d.ts +5 -0
  419. package/dist/triggers/types.d.ts.map +1 -1
  420. package/dist/triggers/types.js.map +1 -1
  421. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  422. package/dist/vite/action-types-plugin.js +4 -1
  423. package/dist/vite/action-types-plugin.js.map +1 -1
  424. package/docs/content/agent-native-toolkit.mdx +16 -0
  425. package/docs/content/recurring-jobs.mdx +35 -6
  426. package/package.json +7 -3
  427. package/src/action.ts +22 -1
  428. package/src/agent/production-agent.ts +122 -3
  429. package/src/cli/skills-content/visual-plan-skill.ts +19 -2
  430. package/src/cli/templates-meta.ts +12 -0
  431. package/src/client/AssistantChat.tsx +53 -26
  432. package/src/client/agent-page/AgentJobsTab.tsx +19 -0
  433. package/src/client/agent-page/use-jobs.ts +1 -0
  434. package/src/client/blocks/library/wireframe.tsx +3 -1
  435. package/src/client/chat/message-components.tsx +35 -1
  436. package/src/client/chat/tool-call-display.tsx +38 -3
  437. package/src/connections/catalog.ts +20 -1
  438. package/src/connections/reader.ts +65 -0
  439. package/src/dashboard-storage/index.ts +27 -0
  440. package/src/dashboard-storage/panel-source.ts +168 -0
  441. package/src/dashboard-storage/schema.ts +62 -0
  442. package/src/dashboard-storage/store.ts +333 -0
  443. package/src/deploy/build.ts +95 -16
  444. package/src/eject/provider-api-definitions.ts +1 -0
  445. package/src/eject/workspace-connections.ts +1 -0
  446. package/src/extensions/actions.ts +199 -73
  447. package/src/jobs/actions/list-recurring-jobs.ts +2 -0
  448. package/src/jobs/scheduler.ts +71 -4
  449. package/src/jobs/tools.ts +31 -1
  450. package/src/localization/default-messages.ts +1 -0
  451. package/src/mcp-client/index.ts +6 -0
  452. package/src/provider-api/actions/provider-api.ts +1 -1
  453. package/src/provider-api/index.ts +190 -5
  454. package/src/secrets/register-framework-secrets.ts +8 -0
  455. package/src/server/agent-chat/context-tools.ts +9 -0
  456. package/src/server/agent-chat/framework-prompts.ts +2 -2
  457. package/src/server/agent-chat-plugin.ts +22 -2
  458. package/src/server/core-routes-plugin.ts +1 -0
  459. package/src/server/credential-provider.ts +9 -3
  460. package/src/server/workspace-provider-oauth.ts +181 -4
  461. package/src/styles/agent-native.css +45 -2
  462. package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +27 -0
  463. package/src/templates/chat/AGENTS.md +1 -1
  464. package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +27 -0
  465. package/src/templates/default/.agents/skills/app-branding/SKILL.md +159 -0
  466. package/src/templates/default/.agents/skills/app-permissions/SKILL.md +155 -0
  467. package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +27 -0
  468. package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +27 -0
  469. package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +31 -18
  470. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +15 -0
  471. package/src/triggers/actions.ts +11 -2
  472. package/src/triggers/dispatcher.ts +20 -1
  473. package/src/triggers/types.ts +5 -0
  474. package/src/vite/action-types-plugin.ts +9 -1
  475. package/corpus/templates/analytics/server/handlers/sql-query.ts +0 -36
  476. package/corpus/templates/analytics/server/routes/api/sql-query.post.ts +0 -1
@@ -1,2 +1,2 @@
1
- export declare const VISUAL_PLANS_SKILL_MD = "---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n`/visual-plan` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n`/visual-plan` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work \u2014 typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence \u2014 and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing `actions/` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses \u2014 existing actions, schema,\n components, helpers \u2014 before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them \u2014 wire format, public ids,\n data-model shape, auth and ownership boundaries \u2014 and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it \u2014 explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call `create-visual-questions` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom `question-form` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step \u2014 do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with `update-visual-plan` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan \u2014 Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (`plan` server, or legacy `agent-native-plans`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (`plan.mdx`, optional `canvas.mdx` /\n`prototype.mdx`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip `/visual-plan` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content \u2014 no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the `plan` (or legacy `agent-native-plans`) tools are not visible,\ndiscover them through the host's `tool_search` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD `references/connection.md` in this skill directory \u2014 it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n`AGENT_NATIVE_PLANS_MODE=local-files` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call `get-plan-blocks` for the authoritative block catalog \u2014 do not author\n from memorized tags. Then call the mode-matched create tool:\n `create-visual-plan` for document-first plans (architecture, backend, data,\n refactor, API), `create-ui-plan` for UI-first plans, `create-prototype-plan`\n for prototype-first plans, `create-plan-design` for design-first plans,\n `create-visual-questions` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as `planText` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see `references/canvas.md` and `references/document-quality.md`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put `diagram`, `data-model`,\n `api-endpoint`, `diff`, `file-tree`, `code`, and `annotated-code` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (`diff`, `annotated-code`) and `tabs` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep `api-endpoint`, `openapi-spec`, `data-model`, `json-explorer`,\n `wireframe`, question, and `custom-html` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review \u2014 a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call `get-plan-feedback` before editing, after review,\n after any long pause,\n and before the final response. Treat `anchorDetails`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with `update-visual-plan`, preferring\n targeted `contentPatches`.\n Treat the top-level `content` payload as a full replacement, not a merge; do\n not send a partial `content` object to add a canvas or one block. If a full\n replacement or `replace-blocks` is unavoidable, call `get-visual-plan`\n immediately before the write, pass its `plan.updatedAt` as\n `expectedUpdatedAt`, and carry forward every existing block and visual\n surface. Never reuse a revision from an earlier read or feedback payload.\n For source-control friendly edits, use granular `patch-visual-plan-source`\n operations against the MDX files instead of regenerating the plan;\n `replace-file` is also destructive and requires the same fresh\n `expectedUpdatedAt` fence.\n7. After every hosted-plan write, call `get-visual-plan` again and compare the\n persisted text, block IDs/counts, canvas frames, and prototype with the\n intended result. A successful mutation response is not proof that unrelated\n content survived. If the edit addressed agent-targeted feedback, only after\n this verification call `resolve-plan-comment` for the thread and\n `consume-plan-feedback` for its comments; do both so addressed feedback is\n neither visibly open nor returned as pending work.\n8. For hosted plans, export with `export-visual-plan` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nThis adversarial self-review pass is opt-in, not default: run it only for\nhigh-stakes plans \u2014 irreversible migrations, security-sensitive work, or when\nthe user explicitly asks for extra rigor \u2014 and skip it otherwise. It roughly\ndoubles the cost of plan generation, so the default for small, UI-only,\nsingle-decision, or ordinary plans is to skip it, not to run it. Keep the pass\ncheap and non-blocking when it does run:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel \u2014 never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong \u2014 not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with `update-visual-plan`\n `contentPatches` \u2014 vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom `question-form` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with `targetId` plus `placement`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body `diagram`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in `content.canvas` and omit `content.prototype`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n `content.canvas`, add the aligned functional prototype in\n `content.prototype`, and rely on the top visual tabs to switch between them.\n When both surfaces are present, open the Wireframes tab by default; the\n prototype remains available as the interactive follow-up view.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use `create-prototype-plan`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe quality \u2014 read `references/wireframe.md`\n\nUI recap/plan wireframes must meet a strict quality bar \u2014 full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font\ntags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ\n`references/wireframe.md` in this skill directory \u2014 it is the single source of\ntruth for HTML wireframe quality, shared word for word with `/visual-plan`\nand `/visual-recap`. Do not author wireframes from memory.\n\n## Canvas \u2014 read `references/canvas.md`\n\nThe canvas is the single source of truth for static UI mockups: the `surface`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n`targetId`/`placement`, and edits are surgical `contentPatches`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n`references/canvas.md` in this skill directory \u2014 it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n`WireframeBlock` screens: author `<Screen surface=\"...\" html={...} />` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n`<FrameScreen>`, `<Card>`, `<Row>`, or `<Btn>` inside canvas `<Screen>` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality \u2014 read `references/document-quality.md`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom `question-form` and a pre-handoff visual check.\nBefore authoring the plan document, READ `references/document-quality.md` in this\nskill directory \u2014 it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar \u2014 read `references/exemplar.md`\n\nFor a worked example of the bar \u2014 a great UI-first plan and `/visual-plan`, plus\nthe anti-patterns to avoid \u2014 READ `references/exemplar.md` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- `create-visual-plan`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing `planText`; `content` may include no\n visual surface, canvas only, or canvas + prototype.\n- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.\n- `create-prototype-plan`: start a prototype-first plan with a functional top\n review surface.\n- `create-plan-design`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only when the user explicitly asks for a visual\n intake questionnaire, not as `/visual-plan` preflight.\n- `update-visual-plan`: revise content, status, or comments with targeted\n `contentPatches` (see Core Workflow steps 6-7). `replace-blocks` and full\n `content` replacement require `expectedUpdatedAt` from a fresh\n `get-visual-plan` call.\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id. Prefer those targeted\n operations; `replace-file` requires `expectedUpdatedAt` from a fresh\n `get-visual-plan` call.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: read the current structured plan, exported HTML,\n annotations, and `plan.updatedAt`; it also returns the MDX folder for source\n workflows. Re-read immediately before a destructive write for its concurrency\n fence and again after every write to verify persisted state.\n- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `get-plan-blocks`: resolve block tags before authoring \u2014 do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode \u2014 read `references/local-files.md`\n\nWhen the user wants no hosted Plan database writes \u2014 no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or `AGENT_NATIVE_PLANS_MODE=local-files` \u2014 do not call any hosted Plan\ntool except the schema-only `get-plan-blocks` catalog lookup. Author a local MDX\nfolder and\npreview it with `plan local check` / `plan local serve` / `plan local verify`.\nBefore using local-files mode, READ `references/local-files.md` in this skill\ndirectory \u2014 it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with `get-plan-feedback` /\n`update-visual-plan`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n`get-plan-feedback` returns rich anchors \u2014 read them before acting on any comment.\n\n- **Coordinate frames.** `targetX`/`targetY` are percentages *within* the\n element named by `targetSelector`/`targetKind`. Bare `x`/`y` are percentages\n of the whole plan document. `canvasX`/`canvasY` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include `targetNodeId` and\n `targetNodePath` (e.g. `card > list > listItem \"Acme Inc\"`) identifying the\n exact kit node. Use `targetNodeId` directly with wireframe node patch ops;\n use `data-design-id` values from design artboards with\n `update-design-element-style`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve `textQuote` against current prose using\n `contextBefore`/`contextAfter` for disambiguation. If `ambiguous: true`, ask\n the user \u2014 do not guess which occurrence is meant.\n- **Detached comments.** `get-plan-feedback` flags threads whose quoted text no\n longer exists as `detached` (in `detachedThreads`). Reconcile these against\n rewritten content \u2014 never silently drop them.\n- **Routing.** `resolutionTarget` is the only routing signal: act on `agent`,\n treat `human` as context only. `@mentions` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (`consumedCommentIds` on `update-visual-plan`). Set `status=resolved` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open. When an edit addresses feedback, first re-read the persisted plan and\n verify the requested change. Only then call `resolve-plan-comment` for the\n addressed thread and `consume-plan-feedback` for its comments; never mark\n addressed feedback along only one axis.\n\n## Visibility & Sharing\n\nUse `set-resource-visibility` to change who can see a plan (e.g. public, login,\nor org-scoped). Use `share-resource` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work \u2014 default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup \u2014 this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n```bash\nnpx @agent-native/core@latest skills add visual-plans\n```\n\nAfter that, `/visual-plan`, `/visual-recap`, and `/visualize-repo` are the\ninstalled slash commands. If you only need one command, use\n`skills add visual-plan`, `skills add visual-recap`, or\n`skills add visualize-repo` instead. The other planning modes\n(`create-ui-plan`, `create-prototype-plan`, `create-plan-design`,\n`create-visual-questions`) are MCP tools reachable from `/visual-plan`, not\nseparate slash commands. Pass `--no-connect` to register the connector without\nauthenticating, then run\n`npx @agent-native/core@latest connect https://plan.agent-native.com --client all`\nwhenever you are ready, or choose a narrower `--client`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n`npx @agent-native/core@latest visualize-repo --open` to create/update\n`agent-native.json`, seed `.agent-native/visual-docs/repo-overview`, and open\nthe local bridge.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`, do\nnot keep retrying it \u2014 stop and give the user the per-client reconnect step from\n`references/connection.md`, then continue once the connector is available.\n\nHosted default: connect `https://plan.agent-native.com/mcp`. Do\nnot put shared secrets in skill files.\n";
1
+ export declare const VISUAL_PLANS_SKILL_MD = "---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n`/visual-plan` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n`/visual-plan` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work \u2014 typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence \u2014 and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing `actions/` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses \u2014 existing actions, schema,\n components, helpers \u2014 before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them \u2014 wire format, public ids,\n data-model shape, auth and ownership boundaries \u2014 and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it \u2014 explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call `create-visual-questions` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom `question-form` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step \u2014 do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with `update-visual-plan` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan \u2014 Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (`plan` server, or legacy `agent-native-plans`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (`plan.mdx`, optional `canvas.mdx` /\n`prototype.mdx`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip `/visual-plan` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content \u2014 no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the `plan` (or legacy `agent-native-plans`) tools are not visible,\ndiscover them through the host's `tool_search` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD `references/connection.md` in this skill directory \u2014 it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n`AGENT_NATIVE_PLANS_MODE=local-files` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call `get-plan-blocks` for the authoritative block catalog \u2014 do not author\n from memorized tags. Then call the mode-matched create tool:\n `create-visual-plan` for document-first plans (architecture, backend, data,\n refactor, API), `create-ui-plan` for UI-first plans, `create-prototype-plan`\n for prototype-first plans, `create-plan-design` for design-first plans,\n `create-visual-questions` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as `planText` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see `references/canvas.md` and `references/document-quality.md`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put `diagram`, `data-model`,\n `api-endpoint`, `diff`, `file-tree`, `code`, and `annotated-code` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (`diff`, `annotated-code`) and `tabs` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep `api-endpoint`, `openapi-spec`, `data-model`, `json-explorer`,\n `wireframe`, question, and `custom-html` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review \u2014 a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call `get-plan-feedback` before editing, after review,\n after any long pause,\n and before the final response. Treat `anchorDetails`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with `update-visual-plan`, preferring\n targeted `contentPatches`.\n Treat the top-level `content` payload as a full replacement, not a merge; do\n not send a partial `content` object to add a canvas or one block. If a full\n replacement or `replace-blocks` is unavoidable, call `get-visual-plan`\n immediately before the write, pass its `plan.updatedAt` as\n `expectedUpdatedAt`, and carry forward every existing block and visual\n surface. Never reuse a revision from an earlier read or feedback payload.\n For source-control friendly edits, use granular `patch-visual-plan-source`\n operations against the MDX files instead of regenerating the plan;\n `replace-file` is also destructive and requires the same fresh\n `expectedUpdatedAt` fence.\n7. After every hosted-plan write, call `get-visual-plan` again and compare the\n persisted text, block IDs/counts, canvas frames, and prototype with the\n intended result. A successful mutation response is not proof that unrelated\n content survived. If the edit addressed agent-targeted feedback, only after\n this verification call `resolve-plan-comment` for the thread and\n `consume-plan-feedback` for its comments; do both so addressed feedback is\n neither visibly open nor returned as pending work.\n8. For hosted plans, export with `export-visual-plan` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nThis adversarial self-review pass is opt-in, not default: run it only for\nhigh-stakes plans \u2014 irreversible migrations, security-sensitive work, or when\nthe user explicitly asks for extra rigor \u2014 and skip it otherwise. It roughly\ndoubles the cost of plan generation, so the default for small, UI-only,\nsingle-decision, or ordinary plans is to skip it, not to run it. Keep the pass\ncheap and non-blocking when it does run:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel \u2014 never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong \u2014 not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with `update-visual-plan`\n `contentPatches` \u2014 vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom `question-form` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with `targetId` plus `placement`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body `diagram`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in `content.canvas` and omit `content.prototype`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n `content.canvas`, add the aligned functional prototype in\n `content.prototype`, and rely on the top visual tabs to switch between them.\n When both surfaces are present, open the Wireframes tab by default; the\n prototype remains available as the interactive follow-up view.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use `create-prototype-plan`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\nTreat \u201Chigher fidelity,\u201D \u201Cpixel-accurate,\u201D \u201Cpolished mockup,\u201D \u201Cproduction-like,\u201D\n\u201Creal design,\u201D and \u201Cnot a sketch/wireframe\u201D as design-first language even when\nthe request also says \u201Cmockup.\u201D For a new plan, use `create-plan-design`. For\nan existing plan, keep the same plan id and call `update-visual-plan` with a\n`set-visual-render-mode` patch using `renderMode: \"design\"` plus the upgraded\nscreen HTML/CSS in the same update. Ground the result in the real app shell,\ntokens, typography, spacing, and states, and add stable `data-design-id`\ntargets. Put scoped styles in each screen's `css` field, never in a `<style>`\ntag. The viewer-local Clean toggle only changes one browser's wireframe\npreference; it is not a fidelity upgrade. Do not create a duplicate plan to\nhandle a fidelity follow-up.\n\n## Wireframe quality \u2014 read `references/wireframe.md`\n\nUI recap/plan wireframes must meet a strict quality bar \u2014 full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font\ntags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ\n`references/wireframe.md` in this skill directory \u2014 it is the single source of\ntruth for HTML wireframe quality, shared word for word with `/visual-plan`\nand `/visual-recap`. Do not author wireframes from memory.\n\n## Canvas \u2014 read `references/canvas.md`\n\nThe canvas is the single source of truth for static UI mockups: the `surface`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n`targetId`/`placement`, and edits are surgical `contentPatches`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n`references/canvas.md` in this skill directory \u2014 it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n`WireframeBlock` screens: author `<Screen surface=\"...\" html={...} />` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n`<FrameScreen>`, `<Card>`, `<Row>`, or `<Btn>` inside canvas `<Screen>` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality \u2014 read `references/document-quality.md`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom `question-form` and a pre-handoff visual check.\nBefore authoring the plan document, READ `references/document-quality.md` in this\nskill directory \u2014 it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar \u2014 read `references/exemplar.md`\n\nFor a worked example of the bar \u2014 a great UI-first plan and `/visual-plan`, plus\nthe anti-patterns to avoid \u2014 READ `references/exemplar.md` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- `create-visual-plan`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing `planText`; `content` may include no\n visual surface, canvas only, or canvas + prototype.\n- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.\n- `create-prototype-plan`: start a prototype-first plan with a functional top\n review surface. If the interaction itself must also be high fidelity, set each\n screen's `renderMode` to `design` and pass scoped styles through `css`;\n otherwise use `create-plan-design` for design-first review.\n- `create-plan-design`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only when the user explicitly asks for a visual\n intake questionnaire, not as `/visual-plan` preflight.\n- `update-visual-plan`: revise content, status, or comments with targeted\n `contentPatches` (see Core Workflow steps 6-7). Use\n `set-visual-render-mode` with `renderMode: \"design\"` when promoting an\n existing plan to high fidelity, together with deliberate screen HTML/CSS;\n render mode alone only removes sketch treatment. `replace-blocks` and full\n `content` replacement require `expectedUpdatedAt` from a fresh\n `get-visual-plan` call.\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id. Prefer those targeted\n operations; `replace-file` requires `expectedUpdatedAt` from a fresh\n `get-visual-plan` call.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: read the current structured plan, exported HTML,\n annotations, and `plan.updatedAt`; it also returns the MDX folder for source\n workflows. Re-read immediately before a destructive write for its concurrency\n fence and again after every write to verify persisted state.\n- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `get-plan-blocks`: resolve block tags before authoring \u2014 do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode \u2014 read `references/local-files.md`\n\nWhen the user wants no hosted Plan database writes \u2014 no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or `AGENT_NATIVE_PLANS_MODE=local-files` \u2014 do not call any hosted Plan\ntool except the schema-only `get-plan-blocks` catalog lookup. Author a local MDX\nfolder and\npreview it with `plan local check` / `plan local serve` / `plan local verify`.\nBefore using local-files mode, READ `references/local-files.md` in this skill\ndirectory \u2014 it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with `get-plan-feedback` /\n`update-visual-plan`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n`get-plan-feedback` returns rich anchors \u2014 read them before acting on any comment.\n\n- **Coordinate frames.** `targetX`/`targetY` are percentages *within* the\n element named by `targetSelector`/`targetKind`. Bare `x`/`y` are percentages\n of the whole plan document. `canvasX`/`canvasY` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include `targetNodeId` and\n `targetNodePath` (e.g. `card > list > listItem \"Acme Inc\"`) identifying the\n exact kit node. Use `targetNodeId` directly with wireframe node patch ops;\n use `data-design-id` values from design artboards with\n `update-design-element-style`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve `textQuote` against current prose using\n `contextBefore`/`contextAfter` for disambiguation. If `ambiguous: true`, ask\n the user \u2014 do not guess which occurrence is meant.\n- **Detached comments.** `get-plan-feedback` flags threads whose quoted text no\n longer exists as `detached` (in `detachedThreads`). Reconcile these against\n rewritten content \u2014 never silently drop them.\n- **Routing.** `resolutionTarget` is the only routing signal: act on `agent`,\n treat `human` as context only. `@mentions` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (`consumedCommentIds` on `update-visual-plan`). Set `status=resolved` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open. When an edit addresses feedback, first re-read the persisted plan and\n verify the requested change. Only then call `resolve-plan-comment` for the\n addressed thread and `consume-plan-feedback` for its comments; never mark\n addressed feedback along only one axis.\n\n## Visibility & Sharing\n\nUse `set-resource-visibility` to change who can see a plan (e.g. public, login,\nor org-scoped). Use `share-resource` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work \u2014 default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup \u2014 this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n```bash\nnpx @agent-native/core@latest skills add visual-plans\n```\n\nAfter that, `/visual-plan`, `/visual-recap`, and `/visualize-repo` are the\ninstalled slash commands. If you only need one command, use\n`skills add visual-plan`, `skills add visual-recap`, or\n`skills add visualize-repo` instead. The other planning modes\n(`create-ui-plan`, `create-prototype-plan`, `create-plan-design`,\n`create-visual-questions`) are MCP tools reachable from `/visual-plan`, not\nseparate slash commands. Pass `--no-connect` to register the connector without\nauthenticating, then run\n`npx @agent-native/core@latest connect https://plan.agent-native.com --client all`\nwhenever you are ready, or choose a narrower `--client`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n`npx @agent-native/core@latest visualize-repo --open` to create/update\n`agent-native.json`, seed `.agent-native/visual-docs/repo-overview`, and open\nthe local bridge.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`, do\nnot keep retrying it \u2014 stop and give the user the per-client reconnect step from\n`references/connection.md`, then continue once the connector is available.\n\nHosted default: connect `https://plan.agent-native.com/mcp`. Do\nnot put shared secrets in skill files.\n";
2
2
  //# sourceMappingURL=visual-plan-skill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visual-plan-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,4s7BA4ejC,CAAC"}
1
+ {"version":3,"file":"visual-plan-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,y99BA6fjC,CAAC"}
@@ -301,6 +301,18 @@ and screen ids across both surfaces. The canvas is the inspectable static refere
301
301
  the prototype is the interactive version of that same flow, not a separate
302
302
  design direction.
303
303
 
304
+ Treat “higher fidelity,” “pixel-accurate,” “polished mockup,” “production-like,”
305
+ “real design,” and “not a sketch/wireframe” as design-first language even when
306
+ the request also says “mockup.” For a new plan, use \`create-plan-design\`. For
307
+ an existing plan, keep the same plan id and call \`update-visual-plan\` with a
308
+ \`set-visual-render-mode\` patch using \`renderMode: "design"\` plus the upgraded
309
+ screen HTML/CSS in the same update. Ground the result in the real app shell,
310
+ tokens, typography, spacing, and states, and add stable \`data-design-id\`
311
+ targets. Put scoped styles in each screen's \`css\` field, never in a \`<style>\`
312
+ tag. The viewer-local Clean toggle only changes one browser's wireframe
313
+ preference; it is not a fidelity upgrade. Do not create a duplicate plan to
314
+ handle a fidelity follow-up.
315
+
304
316
  ## Wireframe quality — read \`references/wireframe.md\`
305
317
 
306
318
  UI recap/plan wireframes must meet a strict quality bar — full-width chrome,
@@ -349,7 +361,9 @@ directory before authoring a plan.
349
361
  visual surface, canvas only, or canvas + prototype.
350
362
  - \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
351
363
  - \`create-prototype-plan\`: start a prototype-first plan with a functional top
352
- review surface.
364
+ review surface. If the interaction itself must also be high fidelity, set each
365
+ screen's \`renderMode\` to \`design\` and pass scoped styles through \`css\`;
366
+ otherwise use \`create-plan-design\` for design-first review.
353
367
  - \`create-plan-design\`: start a full-fidelity branded Design-tab plan with an
354
368
  optional matching Prototype tab.
355
369
  - \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
@@ -357,7 +371,10 @@ directory before authoring a plan.
357
371
  - \`create-visual-questions\`: use only when the user explicitly asks for a visual
358
372
  intake questionnaire, not as \`/visual-plan\` preflight.
359
373
  - \`update-visual-plan\`: revise content, status, or comments with targeted
360
- \`contentPatches\` (see Core Workflow steps 6-7). \`replace-blocks\` and full
374
+ \`contentPatches\` (see Core Workflow steps 6-7). Use
375
+ \`set-visual-render-mode\` with \`renderMode: "design"\` when promoting an
376
+ existing plan to high fidelity, together with deliberate screen HTML/CSS;
377
+ render mode alone only removes sketch treatment. \`replace-blocks\` and full
361
378
  \`content\` replacement require \`expectedUpdatedAt\` from a fresh
362
379
  \`get-visual-plan\` call.
363
380
  - \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
@@ -1 +1 @@
1
- {"version":3,"file":"visual-plan-skill.js","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4epC,CAAC","sourcesContent":["export const VISUAL_PLANS_SKILL_MD = `---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n\\`/visual-plan\\` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n\\`/visual-plan\\` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work — typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence — and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing \\`actions/\\` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses — existing actions, schema,\n components, helpers — before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them — wire format, public ids,\n data-model shape, auth and ownership boundaries — and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it — explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call \\`create-visual-questions\\` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom \\`question-form\\` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step — do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with \\`update-visual-plan\\` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan — Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (\\`plan\\` server, or legacy \\`agent-native-plans\\`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (\\`plan.mdx\\`, optional \\`canvas.mdx\\` /\n\\`prototype.mdx\\`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip \\`/visual-plan\\` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content — no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the \\`plan\\` (or legacy \\`agent-native-plans\\`) tools are not visible,\ndiscover them through the host's \\`tool_search\\` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD \\`references/connection.md\\` in this skill directory — it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n\\`AGENT_NATIVE_PLANS_MODE=local-files\\` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call \\`get-plan-blocks\\` for the authoritative block catalog — do not author\n from memorized tags. Then call the mode-matched create tool:\n \\`create-visual-plan\\` for document-first plans (architecture, backend, data,\n refactor, API), \\`create-ui-plan\\` for UI-first plans, \\`create-prototype-plan\\`\n for prototype-first plans, \\`create-plan-design\\` for design-first plans,\n \\`create-visual-questions\\` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as \\`planText\\` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see \\`references/canvas.md\\` and \\`references/document-quality.md\\`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put \\`diagram\\`, \\`data-model\\`,\n \\`api-endpoint\\`, \\`diff\\`, \\`file-tree\\`, \\`code\\`, and \\`annotated-code\\` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (\\`diff\\`, \\`annotated-code\\`) and \\`tabs\\` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep \\`api-endpoint\\`, \\`openapi-spec\\`, \\`data-model\\`, \\`json-explorer\\`,\n \\`wireframe\\`, question, and \\`custom-html\\` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review — a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call \\`get-plan-feedback\\` before editing, after review,\n after any long pause,\n and before the final response. Treat \\`anchorDetails\\`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with \\`update-visual-plan\\`, preferring\n targeted \\`contentPatches\\`.\n Treat the top-level \\`content\\` payload as a full replacement, not a merge; do\n not send a partial \\`content\\` object to add a canvas or one block. If a full\n replacement or \\`replace-blocks\\` is unavoidable, call \\`get-visual-plan\\`\n immediately before the write, pass its \\`plan.updatedAt\\` as\n \\`expectedUpdatedAt\\`, and carry forward every existing block and visual\n surface. Never reuse a revision from an earlier read or feedback payload.\n For source-control friendly edits, use granular \\`patch-visual-plan-source\\`\n operations against the MDX files instead of regenerating the plan;\n \\`replace-file\\` is also destructive and requires the same fresh\n \\`expectedUpdatedAt\\` fence.\n7. After every hosted-plan write, call \\`get-visual-plan\\` again and compare the\n persisted text, block IDs/counts, canvas frames, and prototype with the\n intended result. A successful mutation response is not proof that unrelated\n content survived. If the edit addressed agent-targeted feedback, only after\n this verification call \\`resolve-plan-comment\\` for the thread and\n \\`consume-plan-feedback\\` for its comments; do both so addressed feedback is\n neither visibly open nor returned as pending work.\n8. For hosted plans, export with \\`export-visual-plan\\` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nThis adversarial self-review pass is opt-in, not default: run it only for\nhigh-stakes plans — irreversible migrations, security-sensitive work, or when\nthe user explicitly asks for extra rigor — and skip it otherwise. It roughly\ndoubles the cost of plan generation, so the default for small, UI-only,\nsingle-decision, or ordinary plans is to skip it, not to run it. Keep the pass\ncheap and non-blocking when it does run:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel — never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong — not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with \\`update-visual-plan\\`\n \\`contentPatches\\` — vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom \\`question-form\\` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with \\`targetId\\` plus \\`placement\\`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body \\`diagram\\`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in \\`content.canvas\\` and omit \\`content.prototype\\`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n \\`content.canvas\\`, add the aligned functional prototype in\n \\`content.prototype\\`, and rely on the top visual tabs to switch between them.\n When both surfaces are present, open the Wireframes tab by default; the\n prototype remains available as the interactive follow-up view.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use \\`create-prototype-plan\\`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe quality — read \\`references/wireframe.md\\`\n\nUI recap/plan wireframes must meet a strict quality bar — full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n\\`surface\\` preset, \\`--wf-*\\` tokens instead of hex, and no \\`<html>\\`/\\`<style>\\`/font\ntags. Before authoring ANY wireframe / \\`<Screen>\\` / \\`WireframeBlock\\`, READ\n\\`references/wireframe.md\\` in this skill directory — it is the single source of\ntruth for HTML wireframe quality, shared word for word with \\`/visual-plan\\`\nand \\`/visual-recap\\`. Do not author wireframes from memory.\n\n## Canvas — read \\`references/canvas.md\\`\n\nThe canvas is the single source of truth for static UI mockups: the \\`surface\\`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n\\`targetId\\`/\\`placement\\`, and edits are surgical \\`contentPatches\\`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n\\`references/canvas.md\\` in this skill directory — it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n\\`WireframeBlock\\` screens: author \\`<Screen surface=\"...\" html={...} />\\` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n\\`<FrameScreen>\\`, \\`<Card>\\`, \\`<Row>\\`, or \\`<Btn>\\` inside canvas \\`<Screen>\\` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality — read \\`references/document-quality.md\\`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom \\`question-form\\` and a pre-handoff visual check.\nBefore authoring the plan document, READ \\`references/document-quality.md\\` in this\nskill directory — it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar — read \\`references/exemplar.md\\`\n\nFor a worked example of the bar — a great UI-first plan and \\`/visual-plan\\`, plus\nthe anti-patterns to avoid — READ \\`references/exemplar.md\\` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- \\`create-visual-plan\\`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing \\`planText\\`; \\`content\\` may include no\n visual surface, canvas only, or canvas + prototype.\n- \\`create-ui-plan\\`: start a UI-first plan when the work is primarily product UI.\n- \\`create-prototype-plan\\`: start a prototype-first plan with a functional top\n review surface.\n- \\`create-plan-design\\`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- \\`convert-visual-plan-to-prototype\\`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- \\`create-visual-questions\\`: use only when the user explicitly asks for a visual\n intake questionnaire, not as \\`/visual-plan\\` preflight.\n- \\`update-visual-plan\\`: revise content, status, or comments with targeted\n \\`contentPatches\\` (see Core Workflow steps 6-7). \\`replace-blocks\\` and full\n \\`content\\` replacement require \\`expectedUpdatedAt\\` from a fresh\n \\`get-visual-plan\\` call.\n- \\`read-visual-plan-source\\`: read the normalized plan as \\`plan.mdx\\`,\n optional \\`canvas.mdx\\`, optional \\`.plan-state.json\\`, and JSON.\n- \\`patch-visual-plan-source\\`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id. Prefer those targeted\n operations; \\`replace-file\\` requires \\`expectedUpdatedAt\\` from a fresh\n \\`get-visual-plan\\` call.\n- \\`import-visual-plan-source\\`: create or replace a plan from an MDX folder.\n- \\`get-visual-plan\\`: read the current structured plan, exported HTML,\n annotations, and \\`plan.updatedAt\\`; it also returns the MDX folder for source\n workflows. Re-read immediately before a destructive write for its concurrency\n fence and again after every write to verify persisted state.\n- \\`get-plan-feedback\\`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- \\`get-plan-blocks\\`: resolve block tags before authoring — do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- \\`export-visual-plan\\`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill — never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode — read \\`references/local-files.md\\`\n\nWhen the user wants no hosted Plan database writes — no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or \\`AGENT_NATIVE_PLANS_MODE=local-files\\` — do not call any hosted Plan\ntool except the schema-only \\`get-plan-blocks\\` catalog lookup. Author a local MDX\nfolder and\npreview it with \\`plan local check\\` / \\`plan local serve\\` / \\`plan local verify\\`.\nBefore using local-files mode, READ \\`references/local-files.md\\` in this skill\ndirectory — it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with \\`get-plan-feedback\\` /\n\\`update-visual-plan\\`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n\\`get-plan-feedback\\` returns rich anchors — read them before acting on any comment.\n\n- **Coordinate frames.** \\`targetX\\`/\\`targetY\\` are percentages *within* the\n element named by \\`targetSelector\\`/\\`targetKind\\`. Bare \\`x\\`/\\`y\\` are percentages\n of the whole plan document. \\`canvasX\\`/\\`canvasY\\` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include \\`targetNodeId\\` and\n \\`targetNodePath\\` (e.g. \\`card > list > listItem \"Acme Inc\"\\`) identifying the\n exact kit node. Use \\`targetNodeId\\` directly with wireframe node patch ops;\n use \\`data-design-id\\` values from design artboards with\n \\`update-design-element-style\\`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve \\`textQuote\\` against current prose using\n \\`contextBefore\\`/\\`contextAfter\\` for disambiguation. If \\`ambiguous: true\\`, ask\n the user — do not guess which occurrence is meant.\n- **Detached comments.** \\`get-plan-feedback\\` flags threads whose quoted text no\n longer exists as \\`detached\\` (in \\`detachedThreads\\`). Reconcile these against\n rewritten content — never silently drop them.\n- **Routing.** \\`resolutionTarget\\` is the only routing signal: act on \\`agent\\`,\n treat \\`human\\` as context only. \\`@mentions\\` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (\\`consumedCommentIds\\` on \\`update-visual-plan\\`). Set \\`status=resolved\\` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open. When an edit addresses feedback, first re-read the persisted plan and\n verify the requested change. Only then call \\`resolve-plan-comment\\` for the\n addressed thread and \\`consume-plan-feedback\\` for its comments; never mark\n addressed feedback along only one axis.\n\n## Visibility & Sharing\n\nUse \\`set-resource-visibility\\` to change who can see a plan (e.g. public, login,\nor org-scoped). Use \\`share-resource\\` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work — default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup — this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n\\`\\`\\`bash\nnpx @agent-native/core@latest skills add visual-plans\n\\`\\`\\`\n\nAfter that, \\`/visual-plan\\`, \\`/visual-recap\\`, and \\`/visualize-repo\\` are the\ninstalled slash commands. If you only need one command, use\n\\`skills add visual-plan\\`, \\`skills add visual-recap\\`, or\n\\`skills add visualize-repo\\` instead. The other planning modes\n(\\`create-ui-plan\\`, \\`create-prototype-plan\\`, \\`create-plan-design\\`,\n\\`create-visual-questions\\`) are MCP tools reachable from \\`/visual-plan\\`, not\nseparate slash commands. Pass \\`--no-connect\\` to register the connector without\nauthenticating, then run\n\\`npx @agent-native/core@latest connect https://plan.agent-native.com --client all\\`\nwhenever you are ready, or choose a narrower \\`--client\\`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up — you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n\\`npx @agent-native/core@latest visualize-repo --open\\` to create/update\n\\`agent-native.json\\`, seed \\`.agent-native/visual-docs/repo-overview\\`, and open\nthe local bridge.\n\nIf a Plans tool returns \\`needs auth\\`, \\`Unauthorized\\`, or \\`Session terminated\\`, do\nnot keep retrying it — stop and give the user the per-client reconnect step from\n\\`references/connection.md\\`, then continue once the connector is available.\n\nHosted default: connect \\`https://plan.agent-native.com/mcp\\`. Do\nnot put shared secrets in skill files.\n`;\n"]}
1
+ {"version":3,"file":"visual-plan-skill.js","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6fpC,CAAC","sourcesContent":["export const VISUAL_PLANS_SKILL_MD = `---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n\\`/visual-plan\\` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n\\`/visual-plan\\` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work — typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence — and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing \\`actions/\\` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses — existing actions, schema,\n components, helpers — before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them — wire format, public ids,\n data-model shape, auth and ownership boundaries — and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it — explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call \\`create-visual-questions\\` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom \\`question-form\\` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step — do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with \\`update-visual-plan\\` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan — Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (\\`plan\\` server, or legacy \\`agent-native-plans\\`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (\\`plan.mdx\\`, optional \\`canvas.mdx\\` /\n\\`prototype.mdx\\`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip \\`/visual-plan\\` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content — no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the \\`plan\\` (or legacy \\`agent-native-plans\\`) tools are not visible,\ndiscover them through the host's \\`tool_search\\` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD \\`references/connection.md\\` in this skill directory — it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n\\`AGENT_NATIVE_PLANS_MODE=local-files\\` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call \\`get-plan-blocks\\` for the authoritative block catalog — do not author\n from memorized tags. Then call the mode-matched create tool:\n \\`create-visual-plan\\` for document-first plans (architecture, backend, data,\n refactor, API), \\`create-ui-plan\\` for UI-first plans, \\`create-prototype-plan\\`\n for prototype-first plans, \\`create-plan-design\\` for design-first plans,\n \\`create-visual-questions\\` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as \\`planText\\` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see \\`references/canvas.md\\` and \\`references/document-quality.md\\`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put \\`diagram\\`, \\`data-model\\`,\n \\`api-endpoint\\`, \\`diff\\`, \\`file-tree\\`, \\`code\\`, and \\`annotated-code\\` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (\\`diff\\`, \\`annotated-code\\`) and \\`tabs\\` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep \\`api-endpoint\\`, \\`openapi-spec\\`, \\`data-model\\`, \\`json-explorer\\`,\n \\`wireframe\\`, question, and \\`custom-html\\` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review — a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call \\`get-plan-feedback\\` before editing, after review,\n after any long pause,\n and before the final response. Treat \\`anchorDetails\\`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with \\`update-visual-plan\\`, preferring\n targeted \\`contentPatches\\`.\n Treat the top-level \\`content\\` payload as a full replacement, not a merge; do\n not send a partial \\`content\\` object to add a canvas or one block. If a full\n replacement or \\`replace-blocks\\` is unavoidable, call \\`get-visual-plan\\`\n immediately before the write, pass its \\`plan.updatedAt\\` as\n \\`expectedUpdatedAt\\`, and carry forward every existing block and visual\n surface. Never reuse a revision from an earlier read or feedback payload.\n For source-control friendly edits, use granular \\`patch-visual-plan-source\\`\n operations against the MDX files instead of regenerating the plan;\n \\`replace-file\\` is also destructive and requires the same fresh\n \\`expectedUpdatedAt\\` fence.\n7. After every hosted-plan write, call \\`get-visual-plan\\` again and compare the\n persisted text, block IDs/counts, canvas frames, and prototype with the\n intended result. A successful mutation response is not proof that unrelated\n content survived. If the edit addressed agent-targeted feedback, only after\n this verification call \\`resolve-plan-comment\\` for the thread and\n \\`consume-plan-feedback\\` for its comments; do both so addressed feedback is\n neither visibly open nor returned as pending work.\n8. For hosted plans, export with \\`export-visual-plan\\` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nThis adversarial self-review pass is opt-in, not default: run it only for\nhigh-stakes plans — irreversible migrations, security-sensitive work, or when\nthe user explicitly asks for extra rigor — and skip it otherwise. It roughly\ndoubles the cost of plan generation, so the default for small, UI-only,\nsingle-decision, or ordinary plans is to skip it, not to run it. Keep the pass\ncheap and non-blocking when it does run:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel — never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong — not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with \\`update-visual-plan\\`\n \\`contentPatches\\` — vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom \\`question-form\\` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with \\`targetId\\` plus \\`placement\\`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body \\`diagram\\`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in \\`content.canvas\\` and omit \\`content.prototype\\`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n \\`content.canvas\\`, add the aligned functional prototype in\n \\`content.prototype\\`, and rely on the top visual tabs to switch between them.\n When both surfaces are present, open the Wireframes tab by default; the\n prototype remains available as the interactive follow-up view.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use \\`create-prototype-plan\\`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\nTreat “higher fidelity,” “pixel-accurate,” “polished mockup,” “production-like,”\n“real design,” and “not a sketch/wireframe” as design-first language even when\nthe request also says “mockup.” For a new plan, use \\`create-plan-design\\`. For\nan existing plan, keep the same plan id and call \\`update-visual-plan\\` with a\n\\`set-visual-render-mode\\` patch using \\`renderMode: \"design\"\\` plus the upgraded\nscreen HTML/CSS in the same update. Ground the result in the real app shell,\ntokens, typography, spacing, and states, and add stable \\`data-design-id\\`\ntargets. Put scoped styles in each screen's \\`css\\` field, never in a \\`<style>\\`\ntag. The viewer-local Clean toggle only changes one browser's wireframe\npreference; it is not a fidelity upgrade. Do not create a duplicate plan to\nhandle a fidelity follow-up.\n\n## Wireframe quality — read \\`references/wireframe.md\\`\n\nUI recap/plan wireframes must meet a strict quality bar — full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n\\`surface\\` preset, \\`--wf-*\\` tokens instead of hex, and no \\`<html>\\`/\\`<style>\\`/font\ntags. Before authoring ANY wireframe / \\`<Screen>\\` / \\`WireframeBlock\\`, READ\n\\`references/wireframe.md\\` in this skill directory — it is the single source of\ntruth for HTML wireframe quality, shared word for word with \\`/visual-plan\\`\nand \\`/visual-recap\\`. Do not author wireframes from memory.\n\n## Canvas — read \\`references/canvas.md\\`\n\nThe canvas is the single source of truth for static UI mockups: the \\`surface\\`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n\\`targetId\\`/\\`placement\\`, and edits are surgical \\`contentPatches\\`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n\\`references/canvas.md\\` in this skill directory — it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n\\`WireframeBlock\\` screens: author \\`<Screen surface=\"...\" html={...} />\\` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n\\`<FrameScreen>\\`, \\`<Card>\\`, \\`<Row>\\`, or \\`<Btn>\\` inside canvas \\`<Screen>\\` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality — read \\`references/document-quality.md\\`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom \\`question-form\\` and a pre-handoff visual check.\nBefore authoring the plan document, READ \\`references/document-quality.md\\` in this\nskill directory — it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar — read \\`references/exemplar.md\\`\n\nFor a worked example of the bar — a great UI-first plan and \\`/visual-plan\\`, plus\nthe anti-patterns to avoid — READ \\`references/exemplar.md\\` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- \\`create-visual-plan\\`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing \\`planText\\`; \\`content\\` may include no\n visual surface, canvas only, or canvas + prototype.\n- \\`create-ui-plan\\`: start a UI-first plan when the work is primarily product UI.\n- \\`create-prototype-plan\\`: start a prototype-first plan with a functional top\n review surface. If the interaction itself must also be high fidelity, set each\n screen's \\`renderMode\\` to \\`design\\` and pass scoped styles through \\`css\\`;\n otherwise use \\`create-plan-design\\` for design-first review.\n- \\`create-plan-design\\`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- \\`convert-visual-plan-to-prototype\\`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- \\`create-visual-questions\\`: use only when the user explicitly asks for a visual\n intake questionnaire, not as \\`/visual-plan\\` preflight.\n- \\`update-visual-plan\\`: revise content, status, or comments with targeted\n \\`contentPatches\\` (see Core Workflow steps 6-7). Use\n \\`set-visual-render-mode\\` with \\`renderMode: \"design\"\\` when promoting an\n existing plan to high fidelity, together with deliberate screen HTML/CSS;\n render mode alone only removes sketch treatment. \\`replace-blocks\\` and full\n \\`content\\` replacement require \\`expectedUpdatedAt\\` from a fresh\n \\`get-visual-plan\\` call.\n- \\`read-visual-plan-source\\`: read the normalized plan as \\`plan.mdx\\`,\n optional \\`canvas.mdx\\`, optional \\`.plan-state.json\\`, and JSON.\n- \\`patch-visual-plan-source\\`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id. Prefer those targeted\n operations; \\`replace-file\\` requires \\`expectedUpdatedAt\\` from a fresh\n \\`get-visual-plan\\` call.\n- \\`import-visual-plan-source\\`: create or replace a plan from an MDX folder.\n- \\`get-visual-plan\\`: read the current structured plan, exported HTML,\n annotations, and \\`plan.updatedAt\\`; it also returns the MDX folder for source\n workflows. Re-read immediately before a destructive write for its concurrency\n fence and again after every write to verify persisted state.\n- \\`get-plan-feedback\\`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- \\`get-plan-blocks\\`: resolve block tags before authoring — do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- \\`export-visual-plan\\`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill — never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode — read \\`references/local-files.md\\`\n\nWhen the user wants no hosted Plan database writes — no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or \\`AGENT_NATIVE_PLANS_MODE=local-files\\` — do not call any hosted Plan\ntool except the schema-only \\`get-plan-blocks\\` catalog lookup. Author a local MDX\nfolder and\npreview it with \\`plan local check\\` / \\`plan local serve\\` / \\`plan local verify\\`.\nBefore using local-files mode, READ \\`references/local-files.md\\` in this skill\ndirectory — it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with \\`get-plan-feedback\\` /\n\\`update-visual-plan\\`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n\\`get-plan-feedback\\` returns rich anchors — read them before acting on any comment.\n\n- **Coordinate frames.** \\`targetX\\`/\\`targetY\\` are percentages *within* the\n element named by \\`targetSelector\\`/\\`targetKind\\`. Bare \\`x\\`/\\`y\\` are percentages\n of the whole plan document. \\`canvasX\\`/\\`canvasY\\` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include \\`targetNodeId\\` and\n \\`targetNodePath\\` (e.g. \\`card > list > listItem \"Acme Inc\"\\`) identifying the\n exact kit node. Use \\`targetNodeId\\` directly with wireframe node patch ops;\n use \\`data-design-id\\` values from design artboards with\n \\`update-design-element-style\\`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve \\`textQuote\\` against current prose using\n \\`contextBefore\\`/\\`contextAfter\\` for disambiguation. If \\`ambiguous: true\\`, ask\n the user — do not guess which occurrence is meant.\n- **Detached comments.** \\`get-plan-feedback\\` flags threads whose quoted text no\n longer exists as \\`detached\\` (in \\`detachedThreads\\`). Reconcile these against\n rewritten content — never silently drop them.\n- **Routing.** \\`resolutionTarget\\` is the only routing signal: act on \\`agent\\`,\n treat \\`human\\` as context only. \\`@mentions\\` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (\\`consumedCommentIds\\` on \\`update-visual-plan\\`). Set \\`status=resolved\\` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open. When an edit addresses feedback, first re-read the persisted plan and\n verify the requested change. Only then call \\`resolve-plan-comment\\` for the\n addressed thread and \\`consume-plan-feedback\\` for its comments; never mark\n addressed feedback along only one axis.\n\n## Visibility & Sharing\n\nUse \\`set-resource-visibility\\` to change who can see a plan (e.g. public, login,\nor org-scoped). Use \\`share-resource\\` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work — default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup — this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n\\`\\`\\`bash\nnpx @agent-native/core@latest skills add visual-plans\n\\`\\`\\`\n\nAfter that, \\`/visual-plan\\`, \\`/visual-recap\\`, and \\`/visualize-repo\\` are the\ninstalled slash commands. If you only need one command, use\n\\`skills add visual-plan\\`, \\`skills add visual-recap\\`, or\n\\`skills add visualize-repo\\` instead. The other planning modes\n(\\`create-ui-plan\\`, \\`create-prototype-plan\\`, \\`create-plan-design\\`,\n\\`create-visual-questions\\`) are MCP tools reachable from \\`/visual-plan\\`, not\nseparate slash commands. Pass \\`--no-connect\\` to register the connector without\nauthenticating, then run\n\\`npx @agent-native/core@latest connect https://plan.agent-native.com --client all\\`\nwhenever you are ready, or choose a narrower \\`--client\\`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up — you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n\\`npx @agent-native/core@latest visualize-repo --open\\` to create/update\n\\`agent-native.json\\`, seed \\`.agent-native/visual-docs/repo-overview\\`, and open\nthe local bridge.\n\nIf a Plans tool returns \\`needs auth\\`, \\`Unauthorized\\`, or \\`Session terminated\\`, do\nnot keep retrying it — stop and give the user the per-client reconnect step from\n\\`references/connection.md\\`, then continue once the connector is available.\n\nHosted default: connect \\`https://plan.agent-native.com/mcp\\`. Do\nnot put shared secrets in skill files.\n`;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"templates-meta.d.ts","sourceRoot":"","sources":["../../src/cli/templates-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,YAAY;IAC3B,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK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AAC;IACb,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC7B,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gEAAgE;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,wEAAwE;IACxE,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,SAAS,EAAE,YAAY,EA0MnC,CAAC;AAEF,yEAAyE;AACzE,wBAAgB,gBAAgB,IAAI,YAAY,EAAE,CAEjD;AAED,gFAAgF;AAChF,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAE9C;AAED,2DAA2D;AAC3D,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAQlE;AAED,gEAAgE;AAChE,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAE3C"}
@@ -192,6 +192,18 @@ export const TEMPLATES = [
192
192
  hidden: true,
193
193
  core: false,
194
194
  },
195
+ {
196
+ name: "crm",
197
+ label: "CRM",
198
+ hint: "Agent-native CRM companion with scoped HubSpot intelligence, workflows, and write proposals",
199
+ icon: "Users",
200
+ color: "#2563EB",
201
+ colorRgb: "37 99 235",
202
+ devPort: 8107,
203
+ hidden: true,
204
+ defaultMode: "dev",
205
+ core: false,
206
+ },
195
207
  {
196
208
  name: "macros",
197
209
  label: "Macros",
@@ -1 +1 @@
1
- {"version":3,"file":"templates-meta.js","sourceRoot":"","sources":["../../src/cli/templates-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqCH,MAAM,CAAC,MAAM,SAAS,GAAmB;IACvC;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,wEAAwE;QAC9E,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,WAAW;QACrB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,mCAAmC;QAC5C,WAAW,EAAE,MAAM;QACnB,gBAAgB,EAAE,CAAC,YAAY,CAAC;QAChC,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,sEAAsE;QAC5E,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE,MAAM;QACnB,gBAAgB,EAAE,CAAC,kBAAkB,CAAC;QACtC,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,uGAAuG;QAC7G,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,IAA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tC,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC9D,IAAI,GAAG,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,cAAc;QAAE,IAAI,GAAG,MAAM,CAAC;IACnE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,gBAAgB;IAC9B,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/**\n * First-party template metadata used by the `agent-native` CLI.\n *\n * This file is intentionally inlined here (rather than imported from a\n * separate workspace package) so that the published `@agent-native/core`\n * has no `workspace:*` runtime dependencies. Without this inlining, `npx\n * @agent-native/core create ...` fails on a fresh machine with:\n *\n * npm error code EUNSUPPORTEDPROTOCOL\n * npm error Unsupported URL Type \"workspace:\": workspace:*\n *\n * Keep this list in sync with `packages/shared-app-config/templates.ts`,\n * which serves the same metadata to the desktop / mobile / frame packages\n * that always run inside the workspace. Duplication is intentional: the\n * CLI must remain installable outside the monorepo.\n */\n\nexport interface TemplateMeta {\n /** Directory name under templates/ and package name */\n name: string;\n /** Display name in pickers */\n label: string;\n /** One-line description shown in the picker */\n hint: string;\n /** Longer description (optional) */\n description?: string;\n /** Tabler icon name used in the desktop sidebar */\n icon: string;\n /** Hex accent color */\n color: string;\n /** CSS-safe RGB triplet (e.g. \"59 130 246\") */\n colorRgb: string;\n /** Dev server port for desktop `pnpm dev` */\n devPort: number;\n /** Production URL when running as a first-party app on agent-native.com */\n prodUrl?: string;\n /** Default URL path when deployed in a workspace (defaults to \"/<name>\") */\n prodPath?: string;\n /** Default mode when added to desktop app */\n defaultMode?: \"dev\" | \"prod\";\n /** Hide from pickers but still scaffoldable via explicit --template */\n hidden?: boolean;\n /** Include as a built-in connected A2A agent even when hidden from pickers */\n defaultAgent?: boolean;\n /** Always scaffold without prompting (e.g. chat as fallback) */\n alwaysAvailable?: boolean;\n /** Internal workspace packages this template depends on (e.g. \"scheduling\") */\n requiredPackages?: string[];\n /** Core app — featured in the CLI picker, homepage, and docs gallery */\n core?: boolean;\n}\n\nexport const TEMPLATES: TemplateMeta[] = [\n {\n name: \"calendar\",\n label: \"Calendar\",\n hint: \"Agent-native Google Calendar — manage events, sync, and public booking\",\n icon: \"CalendarDays\",\n color: \"#00B5FF\",\n colorRgb: \"0 181 255\",\n devPort: 8082,\n prodUrl: \"https://calendar.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"scheduling\"],\n core: true,\n },\n {\n name: \"content\",\n label: \"Content\",\n hint: \"Open-source Obsidian for MDX — edit local docs with agent assistance\",\n icon: \"FileText\",\n color: \"#10B981\",\n colorRgb: \"16 185 129\",\n devPort: 8083,\n prodUrl: \"https://content.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"creative-context\"],\n core: true,\n },\n {\n name: \"plan\",\n label: \"Plan\",\n hint: \"Structured visual plans and PR recaps with diagrams, wireframes, prototypes, annotations, and sharing\",\n icon: \"FileText\",\n color: \"#52525B\",\n colorRgb: \"82 82 91\",\n devPort: 8105,\n prodUrl: \"https://plan.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"slides\",\n label: \"Slides\",\n hint: \"Agent-native Google Slides — generate and edit React presentations\",\n icon: \"GalleryHorizontal\",\n color: \"#EC4899\",\n colorRgb: \"236 72 153\",\n devPort: 8086,\n prodUrl: \"https://slides.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"pinpoint\", \"creative-context\"],\n core: true,\n },\n {\n name: \"analytics\",\n label: \"Analytics\",\n hint: \"Agent-native Amplitude/Mixpanel — connect data sources, prompt for charts\",\n icon: \"BarChart2\",\n color: \"#F59E0B\",\n colorRgb: \"245 158 11\",\n devPort: 8088,\n prodUrl: \"https://analytics.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"mail\",\n label: \"Mail\",\n hint: \"Agent-native Superhuman — email client with keyboard shortcuts and AI triage\",\n icon: \"Mail\",\n color: \"#3B82F6\",\n colorRgb: \"59 130 246\",\n devPort: 8085,\n prodUrl: \"https://mail.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"dispatch\",\n label: \"Dispatch\",\n hint: \"Central Slack/Telegram router with jobs, memory, approvals, and A2A delegation\",\n icon: \"MessageCircle\",\n color: \"#14B8A6\",\n colorRgb: \"20 184 166\",\n devPort: 8092,\n prodUrl: \"https://dispatch.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"forms\",\n label: \"Forms\",\n hint: \"Agent-native form builder — create, edit, and manage forms\",\n icon: \"ClipboardList\",\n color: \"#06B6D4\",\n colorRgb: \"6 182 212\",\n devPort: 8084,\n prodUrl: \"https://forms.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"chat\",\n label: \"Chat\",\n hint: \"Minimal chat-first app with durable threads, actions, and the app-agent loop\",\n icon: \"MessageCircle\",\n color: \"#18181B\",\n colorRgb: \"24 24 27\",\n devPort: 8089,\n prodUrl: \"https://chat.agent-native.com\",\n defaultMode: \"prod\",\n alwaysAvailable: true,\n core: true,\n },\n {\n name: \"clips\",\n label: \"Clips\",\n hint: \"Screen recording, meeting notes, and voice dictation — all with AI\",\n icon: \"ScreenShare\",\n color: \"#0EA5E9\",\n colorRgb: \"14 165 233\",\n devPort: 8094,\n prodUrl: \"https://clips.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"brain\",\n label: \"Brain\",\n hint: \"Cited company knowledge from Slack, meetings, transcripts, and decisions\",\n icon: \"Brain\",\n color: \"#8B5CF6\",\n colorRgb: \"139 92 246\",\n devPort: 8102,\n prodUrl: \"https://brain.agent-native.com\",\n defaultMode: \"prod\",\n defaultAgent: true,\n core: true,\n },\n {\n name: \"design\",\n label: \"Design\",\n hint: \"Agent-native design tool — create and edit visual designs with agent assistance\",\n icon: \"Brush\",\n color: \"#F472B6\",\n colorRgb: \"244 114 182\",\n devPort: 8099,\n prodUrl: \"https://design.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"pinpoint\", \"embedding\", \"creative-context\"],\n core: true,\n },\n {\n name: \"assets\",\n label: \"Assets\",\n hint: \"Digital asset manager — upload, organize, search, and generate on-brand images and videos\",\n icon: \"Photo\",\n color: \"#0F766E\",\n colorRgb: \"15 118 110\",\n devPort: 8100,\n prodUrl: \"https://assets.agent-native.com\",\n defaultMode: \"prod\",\n defaultAgent: true,\n requiredPackages: [\"embedding\", \"creative-context\"],\n core: true,\n },\n {\n name: \"tasks\",\n label: \"Tasks\",\n hint: \"Task-list-first workspace — inbox capture, custom fields, and drag-and-drop ordering\",\n icon: \"ListCheck\",\n color: \"#6366F1\",\n colorRgb: \"99 102 241\",\n devPort: 8091,\n prodUrl: \"https://tasks.agent-native.com\",\n defaultMode: \"prod\",\n hidden: true,\n core: false,\n },\n {\n name: \"macros\",\n label: \"Macros\",\n hint: \"Internal template — not shown in pickers\",\n icon: \"Code\",\n color: \"#71717A\",\n colorRgb: \"113 113 122\",\n devPort: 8093,\n prodUrl: \"https://macros.agent-native.com\",\n hidden: true,\n defaultMode: \"dev\",\n },\n];\n\n/** Return templates visible in user-facing pickers (excludes hidden). */\nexport function visibleTemplates(): TemplateMeta[] {\n return TEMPLATES.filter((t) => !t.hidden);\n}\n\n/** Return core templates — the featured set shown in CLI pickers by default. */\nexport function coreTemplates(): TemplateMeta[] {\n return TEMPLATES.filter((t) => t.core);\n}\n\n/** Lookup by name. Returns undefined for unknown names. */\nexport function getTemplate(name: string): TemplateMeta | undefined {\n // Tolerate legacy / renamed aliases.\n if (name === \"starter\") name = \"chat\";\n if (name === \"image\" || name === \"images\" || name === \"asset\") {\n name = \"assets\";\n }\n if (name === \"contracts\" || name === \"visual-plans\") name = \"plan\";\n return TEMPLATES.find((t) => t.name === name);\n}\n\n/** Names of all templates (including hidden) for validation. */\nexport function allTemplateNames(): string[] {\n return TEMPLATES.map((t) => t.name);\n}\n"]}
1
+ {"version":3,"file":"templates-meta.js","sourceRoot":"","sources":["../../src/cli/templates-meta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqCH,MAAM,CAAC,MAAM,SAAS,GAAmB;IACvC;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,IAAI,EAAE,wEAAwE;QAC9E,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,WAAW;QACrB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,mCAAmC;QAC5C,WAAW,EAAE,MAAM;QACnB,gBAAgB,EAAE,CAAC,YAAY,CAAC;QAChC,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,sEAAsE;QAC5E,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE,MAAM;QACnB,gBAAgB,EAAE,CAAC,kBAAkB,CAAC;QACtC,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,uGAAuG;QAC7G,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,+BAA+B;QACxC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,IAAI;KACX;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,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AAa;IAC3B,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,qCAAqC;IACrC,IAAI,IAAI,KAAK,SAAS;QAAE,IAAI,GAAG,MAAM,CAAC;IACtC,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QAC9D,IAAI,GAAG,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,cAAc;QAAE,IAAI,GAAG,MAAM,CAAC;IACnE,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAChD,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,gBAAgB;IAC9B,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC","sourcesContent":["/**\n * First-party template metadata used by the `agent-native` CLI.\n *\n * This file is intentionally inlined here (rather than imported from a\n * separate workspace package) so that the published `@agent-native/core`\n * has no `workspace:*` runtime dependencies. Without this inlining, `npx\n * @agent-native/core create ...` fails on a fresh machine with:\n *\n * npm error code EUNSUPPORTEDPROTOCOL\n * npm error Unsupported URL Type \"workspace:\": workspace:*\n *\n * Keep this list in sync with `packages/shared-app-config/templates.ts`,\n * which serves the same metadata to the desktop / mobile / frame packages\n * that always run inside the workspace. Duplication is intentional: the\n * CLI must remain installable outside the monorepo.\n */\n\nexport interface TemplateMeta {\n /** Directory name under templates/ and package name */\n name: string;\n /** Display name in pickers */\n label: string;\n /** One-line description shown in the picker */\n hint: string;\n /** Longer description (optional) */\n description?: string;\n /** Tabler icon name used in the desktop sidebar */\n icon: string;\n /** Hex accent color */\n color: string;\n /** CSS-safe RGB triplet (e.g. \"59 130 246\") */\n colorRgb: string;\n /** Dev server port for desktop `pnpm dev` */\n devPort: number;\n /** Production URL when running as a first-party app on agent-native.com */\n prodUrl?: string;\n /** Default URL path when deployed in a workspace (defaults to \"/<name>\") */\n prodPath?: string;\n /** Default mode when added to desktop app */\n defaultMode?: \"dev\" | \"prod\";\n /** Hide from pickers but still scaffoldable via explicit --template */\n hidden?: boolean;\n /** Include as a built-in connected A2A agent even when hidden from pickers */\n defaultAgent?: boolean;\n /** Always scaffold without prompting (e.g. chat as fallback) */\n alwaysAvailable?: boolean;\n /** Internal workspace packages this template depends on (e.g. \"scheduling\") */\n requiredPackages?: string[];\n /** Core app — featured in the CLI picker, homepage, and docs gallery */\n core?: boolean;\n}\n\nexport const TEMPLATES: TemplateMeta[] = [\n {\n name: \"calendar\",\n label: \"Calendar\",\n hint: \"Agent-native Google Calendar — manage events, sync, and public booking\",\n icon: \"CalendarDays\",\n color: \"#00B5FF\",\n colorRgb: \"0 181 255\",\n devPort: 8082,\n prodUrl: \"https://calendar.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"scheduling\"],\n core: true,\n },\n {\n name: \"content\",\n label: \"Content\",\n hint: \"Open-source Obsidian for MDX — edit local docs with agent assistance\",\n icon: \"FileText\",\n color: \"#10B981\",\n colorRgb: \"16 185 129\",\n devPort: 8083,\n prodUrl: \"https://content.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"creative-context\"],\n core: true,\n },\n {\n name: \"plan\",\n label: \"Plan\",\n hint: \"Structured visual plans and PR recaps with diagrams, wireframes, prototypes, annotations, and sharing\",\n icon: \"FileText\",\n color: \"#52525B\",\n colorRgb: \"82 82 91\",\n devPort: 8105,\n prodUrl: \"https://plan.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"slides\",\n label: \"Slides\",\n hint: \"Agent-native Google Slides — generate and edit React presentations\",\n icon: \"GalleryHorizontal\",\n color: \"#EC4899\",\n colorRgb: \"236 72 153\",\n devPort: 8086,\n prodUrl: \"https://slides.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"pinpoint\", \"creative-context\"],\n core: true,\n },\n {\n name: \"analytics\",\n label: \"Analytics\",\n hint: \"Agent-native Amplitude/Mixpanel — connect data sources, prompt for charts\",\n icon: \"BarChart2\",\n color: \"#F59E0B\",\n colorRgb: \"245 158 11\",\n devPort: 8088,\n prodUrl: \"https://analytics.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"mail\",\n label: \"Mail\",\n hint: \"Agent-native Superhuman — email client with keyboard shortcuts and AI triage\",\n icon: \"Mail\",\n color: \"#3B82F6\",\n colorRgb: \"59 130 246\",\n devPort: 8085,\n prodUrl: \"https://mail.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"dispatch\",\n label: \"Dispatch\",\n hint: \"Central Slack/Telegram router with jobs, memory, approvals, and A2A delegation\",\n icon: \"MessageCircle\",\n color: \"#14B8A6\",\n colorRgb: \"20 184 166\",\n devPort: 8092,\n prodUrl: \"https://dispatch.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"forms\",\n label: \"Forms\",\n hint: \"Agent-native form builder — create, edit, and manage forms\",\n icon: \"ClipboardList\",\n color: \"#06B6D4\",\n colorRgb: \"6 182 212\",\n devPort: 8084,\n prodUrl: \"https://forms.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"chat\",\n label: \"Chat\",\n hint: \"Minimal chat-first app with durable threads, actions, and the app-agent loop\",\n icon: \"MessageCircle\",\n color: \"#18181B\",\n colorRgb: \"24 24 27\",\n devPort: 8089,\n prodUrl: \"https://chat.agent-native.com\",\n defaultMode: \"prod\",\n alwaysAvailable: true,\n core: true,\n },\n {\n name: \"clips\",\n label: \"Clips\",\n hint: \"Screen recording, meeting notes, and voice dictation — all with AI\",\n icon: \"ScreenShare\",\n color: \"#0EA5E9\",\n colorRgb: \"14 165 233\",\n devPort: 8094,\n prodUrl: \"https://clips.agent-native.com\",\n defaultMode: \"prod\",\n core: true,\n },\n {\n name: \"brain\",\n label: \"Brain\",\n hint: \"Cited company knowledge from Slack, meetings, transcripts, and decisions\",\n icon: \"Brain\",\n color: \"#8B5CF6\",\n colorRgb: \"139 92 246\",\n devPort: 8102,\n prodUrl: \"https://brain.agent-native.com\",\n defaultMode: \"prod\",\n defaultAgent: true,\n core: true,\n },\n {\n name: \"design\",\n label: \"Design\",\n hint: \"Agent-native design tool — create and edit visual designs with agent assistance\",\n icon: \"Brush\",\n color: \"#F472B6\",\n colorRgb: \"244 114 182\",\n devPort: 8099,\n prodUrl: \"https://design.agent-native.com\",\n defaultMode: \"prod\",\n requiredPackages: [\"pinpoint\", \"embedding\", \"creative-context\"],\n core: true,\n },\n {\n name: \"assets\",\n label: \"Assets\",\n hint: \"Digital asset manager — upload, organize, search, and generate on-brand images and videos\",\n icon: \"Photo\",\n color: \"#0F766E\",\n colorRgb: \"15 118 110\",\n devPort: 8100,\n prodUrl: \"https://assets.agent-native.com\",\n defaultMode: \"prod\",\n defaultAgent: true,\n requiredPackages: [\"embedding\", \"creative-context\"],\n core: true,\n },\n {\n name: \"tasks\",\n label: \"Tasks\",\n hint: \"Task-list-first workspace — inbox capture, custom fields, and drag-and-drop ordering\",\n icon: \"ListCheck\",\n color: \"#6366F1\",\n colorRgb: \"99 102 241\",\n devPort: 8091,\n prodUrl: \"https://tasks.agent-native.com\",\n defaultMode: \"prod\",\n hidden: true,\n core: false,\n },\n {\n name: \"crm\",\n label: \"CRM\",\n hint: \"Agent-native CRM companion with scoped HubSpot intelligence, workflows, and write proposals\",\n icon: \"Users\",\n color: \"#2563EB\",\n colorRgb: \"37 99 235\",\n devPort: 8107,\n hidden: true,\n defaultMode: \"dev\",\n core: false,\n },\n {\n name: \"macros\",\n label: \"Macros\",\n hint: \"Internal template — not shown in pickers\",\n icon: \"Code\",\n color: \"#71717A\",\n colorRgb: \"113 113 122\",\n devPort: 8093,\n prodUrl: \"https://macros.agent-native.com\",\n hidden: true,\n defaultMode: \"dev\",\n },\n];\n\n/** Return templates visible in user-facing pickers (excludes hidden). */\nexport function visibleTemplates(): TemplateMeta[] {\n return TEMPLATES.filter((t) => !t.hidden);\n}\n\n/** Return core templates — the featured set shown in CLI pickers by default. */\nexport function coreTemplates(): TemplateMeta[] {\n return TEMPLATES.filter((t) => t.core);\n}\n\n/** Lookup by name. Returns undefined for unknown names. */\nexport function getTemplate(name: string): TemplateMeta | undefined {\n // Tolerate legacy / renamed aliases.\n if (name === \"starter\") name = \"chat\";\n if (name === \"image\" || name === \"images\" || name === \"asset\") {\n name = \"assets\";\n }\n if (name === \"contracts\" || name === \"visual-plans\") name = \"plan\";\n return TEMPLATES.find((t) => t.name === name);\n}\n\n/** Names of all templates (including hidden) for validation. */\nexport function allTemplateNames(): string[] {\n return TEMPLATES.map((t) => t.name);\n}\n"]}
@@ -89,6 +89,10 @@ export declare function shouldShowGlobalRunningStatus({ showRunningInUI, running
89
89
  latestMessage: unknown;
90
90
  reconnectContent: readonly ContentPart[];
91
91
  }): boolean;
92
+ export declare function assistantChatAutoscrollStatusKey({ showGlobalRunningStatus, runningStatusLabel, }: {
93
+ showGlobalRunningStatus: boolean;
94
+ runningStatusLabel: string;
95
+ }): string;
92
96
  type QueuedMessage = {
93
97
  id: string;
94
98
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantChat.d.ts","sourceRoot":"","sources":["../../src/client/AssistantChat.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAY5F,OAAO,KAAK,EAEV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAC;AAW7B,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAarE,OAAO,EAEL,KAAK,oBAAoB,EAC1B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GG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,gBAAgB,CAAC;IAC3E;;;;;OAKG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAC;IACxE,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;OAMG;IACH,eAAe,CAAC,EAAE;QAChB,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;QACvC,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;KAC/C,CAAC;CACH;AAED,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAsDjD,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,QAI9C;AAkDD,OAAO,EACL,iBAAiB,EAElB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAsE7B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,YAAY,EAAE,OAAO,GACpB;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,MAAM,IAAI,CAAA;CAAE,CA2D1D;AAq9GD,eAAO,MAAM,aAAa,gGA2GxB,CAAC"}
@@ -1018,10 +1018,20 @@ export function shouldShowGlobalRunningStatus({ showRunningInUI, runningActivity
1018
1018
  contentHasUnresolvedToolCall(reconnectContent))) {
1019
1019
  return false;
1020
1020
  }
1021
+ // The reasoning cell already owns the generic Thinking state. Activity
1022
+ // events can briefly reassert that same label between reasoning deltas;
1023
+ // rendering both makes a second Thinking row flash beneath the thought.
1024
+ if (runningActivityLabel === "Thinking" &&
1025
+ (latestMessageHasReasoning || contentHasVisibleReasoning(reconnectContent))) {
1026
+ return false;
1027
+ }
1021
1028
  if (runningActivityLabel)
1022
1029
  return true;
1023
1030
  return (!latestMessageHasReasoning && !contentHasVisibleReasoning(reconnectContent));
1024
1031
  }
1032
+ export function assistantChatAutoscrollStatusKey({ showGlobalRunningStatus, runningStatusLabel, }) {
1033
+ return showGlobalRunningStatus ? runningStatusLabel : "idle";
1034
+ }
1025
1035
  export function queuedMessageImageSources(message) {
1026
1036
  const sources = (message.attachments ?? []).flatMap((attachment) => attachment.content.flatMap((part) => part.type === "image" &&
1027
1037
  "image" in part &&
@@ -3551,11 +3561,27 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
3551
3561
  suppressToolRepeats: adapterHandoffPending,
3552
3562
  trimTailTextOverlap: adapterHandoffPending || reconnectTailOnlyRef.current,
3553
3563
  });
3564
+ const latestMessage = messages[messages.length - 1];
3565
+ const reconnectStatusContent = visibleReconnectContent.length > 0
3566
+ ? visibleReconnectContent
3567
+ : reconnectContent.length === 0
3568
+ ? reconnectActivityContent
3569
+ : [];
3570
+ const showGlobalRunningStatus = shouldShowGlobalRunningStatus({
3571
+ showRunningInUI,
3572
+ runningActivityLabel,
3573
+ runningActivityTool,
3574
+ latestMessage,
3575
+ reconnectContent: reconnectStatusContent,
3576
+ });
3554
3577
  const autoscrollFollowKey = [
3555
3578
  messages.map(messageFollowKey).join(";"),
3556
3579
  `q:${queuedMessages.map(queuedMessageFollowKey).join("|")}`,
3557
3580
  `r:${reconnectContentFollowKey(visibleReconnectContent)}`,
3558
- `status:${showRunningInUI ? runningStatusLabel : "idle"}`,
3581
+ `status:${assistantChatAutoscrollStatusKey({
3582
+ showGlobalRunningStatus,
3583
+ runningStatusLabel,
3584
+ })}`,
3559
3585
  ].join(";;");
3560
3586
  const { scrollRef, isNearBottomRef, showScrollToBottom, scrollToBottom, scrollToBottomAfterPaint, resumeFollowing, } = useNearBottomAutoscroll({
3561
3587
  followKey: autoscrollFollowKey,
@@ -3615,20 +3641,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
3615
3641
  return getRunErrorMetadata(last);
3616
3642
  }, [messages]);
3617
3643
  const lastUserText = useMemo(() => latestNonRecoveryUserMessageText(messages), [messages]);
3618
- const latestMessage = messages[messages.length - 1];
3619
3644
  const latestMessageRole = latestMessage?.role;
3620
- const reconnectStatusContent = visibleReconnectContent.length > 0
3621
- ? visibleReconnectContent
3622
- : reconnectContent.length === 0
3623
- ? reconnectActivityContent
3624
- : [];
3625
- const showGlobalRunningStatus = shouldShowGlobalRunningStatus({
3626
- showRunningInUI,
3627
- runningActivityLabel,
3628
- runningActivityTool,
3629
- latestMessage,
3630
- reconnectContent: reconnectStatusContent,
3631
- });
3632
3645
  const latestAssistantWasPlan = latestMessageRole === "assistant" &&
3633
3646
  getRequestModeMetadata(latestMessage) === "plan";
3634
3647
  const showMissingKeySetup = missingApiKey && !authError;
@@ -3832,9 +3845,9 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
3832
3845
  : {}), className: "h-auto items-stretch justify-stretch bg-transparent" }) })), composerError && (_jsxs("div", { role: "alert", className: "shrink-0 mx-3 mb-1.5 flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: [_jsx(IconAlertTriangle, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), _jsx("span", { className: "flex-1 leading-snug", children: composerError }), _jsx("button", { type: "button", "aria-label": "Dismiss error", onClick: () => setComposerError(null), className: "shrink-0 opacity-70 hover:opacity-100", children: _jsx(IconX, { className: "h-3 w-3" }) })] })), _jsxs("div", { className: "agent-composer-stack", "data-agent-composer-adjacent-ui": hasComposerAccessoryAboveStack ? "true" : undefined, children: [_jsx(SelectionAttachedPill, {}), showPlanModeCallout && (_jsx(PlanModeCallout, { canImplementPlan: canImplementPlan, onImplementPlan: handleImplementPlan, onSwitchToAct: handleSwitchToAct })), _jsxs(Popover, { open: showMissingKeySetup && missingKeySetupOpen, onOpenChange: setMissingKeySetupOpen, children: [_jsx(AgentComposerFrame, { layoutVariant: composerLayoutVariant, className: cn(composerAreaClassName, isComposerDisabled &&
3833
3846
  !showMissingKeySetup &&
3834
3847
  "opacity-70"), rootClassName: cn(showMissingKeySetup &&
3835
- "agent-composer-root--missing-key"), children: showMissingKeySetup ? (_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "agent-composer-missing-key-trigger", "aria-label": "Connect AI to start chatting", children: _jsxs("span", { className: "agent-composer-missing-key-copy", children: [_jsx("span", { className: "agent-composer-missing-key-title", children: missingApiKeySetupLayout === "sidebar"
3836
- ? "Connect AI to chat"
3837
- : "Connect AI to start chatting" }), missingApiKeySetupLayout !== "sidebar" ? (_jsx("span", { className: "agent-composer-missing-key-description", children: "Builder.io includes free credits, or use your own API key." })) : null] }) }) })) : (_jsxs(_Fragment, { children: [_jsx(ComposerAttachmentPreviewStrip, {}), _jsx(TiptapComposer, { focusRef: tiptapRef, onTextChange: isActiveComposer
3848
+ "agent-composer-root--missing-key"), children: showMissingKeySetup ? (_jsx(PopoverTrigger, { asChild: true, children: _jsx("button", { type: "button", className: "agent-composer-missing-key-trigger", "aria-label": "Connect AI to start chatting", children: _jsxs("span", { className: "agent-composer-missing-key-content", children: [_jsxs("span", { className: "agent-composer-missing-key-copy", children: [_jsx("span", { className: "agent-composer-missing-key-title", children: missingApiKeySetupLayout === "sidebar"
3849
+ ? "Connect AI to chat"
3850
+ : "Connect AI to start chatting" }), missingApiKeySetupLayout !== "sidebar" ? (_jsx("span", { className: "agent-composer-missing-key-description", children: "Builder.io includes free credits, or use your own API key." })) : null] }), _jsx("span", { className: "agent-composer-missing-key-cta", children: "Connect AI" })] }) }) })) : (_jsxs(_Fragment, { children: [_jsx(ComposerAttachmentPreviewStrip, {}), _jsx(TiptapComposer, { focusRef: tiptapRef, onTextChange: isActiveComposer
3838
3851
  ? handleComposerTextChange
3839
3852
  : undefined, disabled: isComposerDisabled, placeholder: missingApiKey
3840
3853
  ? "Connect AI to start chatting..."