@agent-native/core 0.101.14 → 0.102.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/cli/templates-meta.ts +13 -0
  5. package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +1 -1
  6. package/corpus/core/src/client/org/OrgSwitcher.tsx +2 -0
  7. package/corpus/templates/analytics/changelog/2026-07-15-fixed-the-agent-discarding-a-successful-dashboard-edit-and-r.md +6 -0
  8. package/corpus/templates/analytics/server/lib/real-data-actions.ts +30 -1
  9. package/corpus/templates/analytics/server/plugins/agent-chat.ts +15 -0
  10. package/corpus/templates/content/actions/_database-source-utils.ts +59 -4
  11. package/corpus/templates/content/actions/prepare-builder-source-review.ts +9 -0
  12. package/corpus/templates/content/actions/preview-builder-source-review.ts +6 -4
  13. package/corpus/templates/content/app/components/editor/DescriptionField.tsx +10 -2
  14. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +4 -0
  15. package/corpus/templates/content/changelog/2026-07-15-page-and-database-descriptions-now-use-a-clean-single-line-f.md +6 -0
  16. package/corpus/templates/content/changelog/2026-07-15-selected-builder-reviews-now-load-only-the-chosen-rows-avoid.md +6 -0
  17. package/corpus/templates/content/shared/api.ts +1 -0
  18. package/corpus/templates/tasks/.agents/commands/visual-plan.md +9 -0
  19. package/corpus/templates/tasks/.agents/commands/visual-recap.md +8 -0
  20. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +492 -0
  21. package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +189 -0
  22. package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +76 -0
  23. package/corpus/templates/tasks/.agents/skills/agent-watchdog/README.md +43 -0
  24. package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +110 -0
  25. package/corpus/templates/tasks/.agents/skills/agent-watchdog/agents/openai.yaml +4 -0
  26. package/corpus/templates/tasks/.agents/skills/capture-learnings/SKILL.md +89 -0
  27. package/corpus/templates/tasks/.agents/skills/change-summary/SKILL.md +83 -0
  28. package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +221 -0
  29. package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +263 -0
  30. package/corpus/templates/tasks/.agents/skills/efficient-fable/README.md +75 -0
  31. package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +95 -0
  32. package/corpus/templates/tasks/.agents/skills/efficient-frontier/README.md +53 -0
  33. package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +73 -0
  34. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +112 -0
  35. package/corpus/templates/tasks/.agents/skills/plan-arbiter/README.md +41 -0
  36. package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +114 -0
  37. package/corpus/templates/tasks/.agents/skills/plan-arbiter/agents/openai.yaml +4 -0
  38. package/corpus/templates/tasks/.agents/skills/plow-ahead/README.md +42 -0
  39. package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +104 -0
  40. package/corpus/templates/tasks/.agents/skills/plow-ahead/agents/openai.yaml +4 -0
  41. package/corpus/templates/tasks/.agents/skills/quick-recap/README.md +55 -0
  42. package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +54 -0
  43. package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/README.md +54 -0
  44. package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +126 -0
  45. package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/agents/openai.yaml +4 -0
  46. package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +232 -0
  47. package/corpus/templates/tasks/.agents/skills/security/SKILL.md +280 -0
  48. package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +106 -0
  49. package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +95 -0
  50. package/corpus/templates/tasks/.agents/skills/stay-within-limits/README.md +61 -0
  51. package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +83 -0
  52. package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  53. package/corpus/templates/tasks/.agents/skills/visual-plan/SKILL.md +547 -0
  54. package/corpus/templates/tasks/.agents/skills/visual-plan/agent-native-skill.json +12 -0
  55. package/corpus/templates/tasks/.agents/skills/visual-plan/references/canvas.md +121 -0
  56. package/corpus/templates/tasks/.agents/skills/visual-plan/references/document-quality.md +178 -0
  57. package/corpus/templates/tasks/.agents/skills/visual-plan/references/exemplar.md +62 -0
  58. package/corpus/templates/tasks/.agents/skills/visual-plan/references/wireframe.md +264 -0
  59. package/corpus/templates/tasks/.agents/skills/visual-recap/SKILL.md +634 -0
  60. package/corpus/templates/tasks/.agents/skills/visual-recap/agent-native-skill.json +12 -0
  61. package/corpus/templates/tasks/.agents/skills/visual-recap/references/wireframe.md +264 -0
  62. package/corpus/templates/tasks/.claude/commands/visual-plan.md +9 -0
  63. package/corpus/templates/tasks/.claude/commands/visual-recap.md +8 -0
  64. package/corpus/templates/tasks/.env.example +5 -0
  65. package/corpus/templates/tasks/.ignore +0 -0
  66. package/corpus/templates/tasks/.prettierrc +5 -0
  67. package/corpus/templates/tasks/AGENTS.md +158 -0
  68. package/corpus/templates/tasks/DEVELOPING.md +185 -0
  69. package/corpus/templates/tasks/README.md +16 -0
  70. package/corpus/templates/tasks/actions/bulk-delete-inbox-items.ts +24 -0
  71. package/corpus/templates/tasks/actions/bulk-delete-tasks.ts +21 -0
  72. package/corpus/templates/tasks/actions/bulk-mark-inbox-items-ready.ts +27 -0
  73. package/corpus/templates/tasks/actions/bulk-update-tasks.ts +35 -0
  74. package/corpus/templates/tasks/actions/create-custom-field.ts +22 -0
  75. package/corpus/templates/tasks/actions/create-inbox-item.ts +30 -0
  76. package/corpus/templates/tasks/actions/create-task.ts +33 -0
  77. package/corpus/templates/tasks/actions/delete-custom-field.ts +19 -0
  78. package/corpus/templates/tasks/actions/delete-inbox-item.ts +17 -0
  79. package/corpus/templates/tasks/actions/delete-task.ts +17 -0
  80. package/corpus/templates/tasks/actions/lib/boolean-query-param.ts +30 -0
  81. package/corpus/templates/tasks/actions/list-custom-fields.ts +18 -0
  82. package/corpus/templates/tasks/actions/list-inbox-items.ts +16 -0
  83. package/corpus/templates/tasks/actions/list-tasks.ts +52 -0
  84. package/corpus/templates/tasks/actions/list-visible-task-fields.ts +18 -0
  85. package/corpus/templates/tasks/actions/mark-inbox-item-ready.ts +31 -0
  86. package/corpus/templates/tasks/actions/navigate.ts +51 -0
  87. package/corpus/templates/tasks/actions/reorder-custom-fields.ts +27 -0
  88. package/corpus/templates/tasks/actions/reorder-inbox-items.ts +24 -0
  89. package/corpus/templates/tasks/actions/reorder-tasks.ts +29 -0
  90. package/corpus/templates/tasks/actions/run.ts +2 -0
  91. package/corpus/templates/tasks/actions/update-custom-field.ts +33 -0
  92. package/corpus/templates/tasks/actions/update-inbox-item.ts +24 -0
  93. package/corpus/templates/tasks/actions/update-task.ts +68 -0
  94. package/corpus/templates/tasks/actions/update-visible-task-fields.ts +27 -0
  95. package/corpus/templates/tasks/actions/view-screen-helpers.ts +68 -0
  96. package/corpus/templates/tasks/actions/view-screen.ts +207 -0
  97. package/corpus/templates/tasks/app/components/custom-fields/FieldCreateBar.tsx +121 -0
  98. package/corpus/templates/tasks/app/components/custom-fields/FieldListRow.tsx +116 -0
  99. package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +225 -0
  100. package/corpus/templates/tasks/app/components/custom-fields/FieldsListSkeleton.tsx +18 -0
  101. package/corpus/templates/tasks/app/components/custom-fields/FieldsPage.tsx +42 -0
  102. package/corpus/templates/tasks/app/components/custom-fields/editor/FieldEditorSidebar.tsx +69 -0
  103. package/corpus/templates/tasks/app/components/custom-fields/editor/FieldTitleSection.tsx +32 -0
  104. package/corpus/templates/tasks/app/components/custom-fields/editor/config/CurrencyConfigControl.tsx +49 -0
  105. package/corpus/templates/tasks/app/components/custom-fields/editor/config/FieldConfigControl.tsx +56 -0
  106. package/corpus/templates/tasks/app/components/custom-fields/editor/config/NumberConfigControl.tsx +52 -0
  107. package/corpus/templates/tasks/app/components/custom-fields/editor/config/PercentConfigControl.tsx +30 -0
  108. package/corpus/templates/tasks/app/components/custom-fields/editor/config/SelectConfigControl.tsx +135 -0
  109. package/corpus/templates/tasks/app/components/custom-fields/editor/config/select-colors.ts +23 -0
  110. package/corpus/templates/tasks/app/components/custom-fields/editor/config/utils.ts +52 -0
  111. package/corpus/templates/tasks/app/components/custom-fields/editor/types.ts +7 -0
  112. package/corpus/templates/tasks/app/components/dnd/SortableItem.tsx +72 -0
  113. package/corpus/templates/tasks/app/components/dnd/SortableList.tsx +136 -0
  114. package/corpus/templates/tasks/app/components/dnd/reorder-moving-items.ts +160 -0
  115. package/corpus/templates/tasks/app/components/dnd/sortable-drag-props.ts +60 -0
  116. package/corpus/templates/tasks/app/components/inbox/InboxList.tsx +222 -0
  117. package/corpus/templates/tasks/app/components/inbox/InboxListPage.tsx +39 -0
  118. package/corpus/templates/tasks/app/components/inbox/InboxListRow.tsx +122 -0
  119. package/corpus/templates/tasks/app/components/layout/Header.tsx +55 -0
  120. package/corpus/templates/tasks/app/components/layout/HeaderActions.tsx +84 -0
  121. package/corpus/templates/tasks/app/components/layout/Layout.tsx +134 -0
  122. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +211 -0
  123. package/corpus/templates/tasks/app/components/shared/AddListItemInput.tsx +57 -0
  124. package/corpus/templates/tasks/app/components/shared/AlertDialog.tsx +53 -0
  125. package/corpus/templates/tasks/app/components/shared/BulkDeleteDialog.tsx +76 -0
  126. package/corpus/templates/tasks/app/components/shared/ChipSelect.tsx +240 -0
  127. package/corpus/templates/tasks/app/components/shared/DeleteItemDialog.tsx +40 -0
  128. package/corpus/templates/tasks/app/components/shared/InlineEditable.tsx +166 -0
  129. package/corpus/templates/tasks/app/components/shared/ListEmptyState.tsx +13 -0
  130. package/corpus/templates/tasks/app/components/shared/ListErrorMessage.tsx +15 -0
  131. package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +75 -0
  132. package/corpus/templates/tasks/app/components/shared/PageHeader.tsx +25 -0
  133. package/corpus/templates/tasks/app/components/shared/RowActionsMenu.tsx +42 -0
  134. package/corpus/templates/tasks/app/components/shared/SidePanel.tsx +99 -0
  135. package/corpus/templates/tasks/app/components/shared/dnd/ListRowPreview.tsx +37 -0
  136. package/corpus/templates/tasks/app/components/shared/list/List.tsx +63 -0
  137. package/corpus/templates/tasks/app/components/shared/list/ListRow.tsx +159 -0
  138. package/corpus/templates/tasks/app/components/shared/list/ListRowDragHandle.tsx +52 -0
  139. package/corpus/templates/tasks/app/components/shared/list/ListSkeletonRows.tsx +11 -0
  140. package/corpus/templates/tasks/app/components/shared/list/SortableListItemShell.tsx +32 -0
  141. package/corpus/templates/tasks/app/components/shared/list/types.ts +1 -0
  142. package/corpus/templates/tasks/app/components/shared/selection/ListSelectionBar.tsx +158 -0
  143. package/corpus/templates/tasks/app/components/shared/selection/ListSelectionHeaderToggle.tsx +28 -0
  144. package/corpus/templates/tasks/app/components/shared/selection/ListSelectionToolbar.tsx +81 -0
  145. package/corpus/templates/tasks/app/components/shared/selection/get-list-row-selection-ui.ts +41 -0
  146. package/corpus/templates/tasks/app/components/shared/selection/use-list-selection.ts +196 -0
  147. package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +333 -0
  148. package/corpus/templates/tasks/app/components/tasks/TaskListHeaderRow.tsx +46 -0
  149. package/corpus/templates/tasks/app/components/tasks/TaskListPage.tsx +115 -0
  150. package/corpus/templates/tasks/app/components/tasks/TaskListRow.css +49 -0
  151. package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +307 -0
  152. package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +102 -0
  153. package/corpus/templates/tasks/app/components/tasks/fields/TaskTitleSection.tsx +27 -0
  154. package/corpus/templates/tasks/app/components/tasks/fields/controls/DateValueControl.tsx +21 -0
  155. package/corpus/templates/tasks/app/components/tasks/fields/controls/FieldValueControl.tsx +76 -0
  156. package/corpus/templates/tasks/app/components/tasks/fields/controls/MultiSelectValueControl.tsx +52 -0
  157. package/corpus/templates/tasks/app/components/tasks/fields/controls/NumberValueControl.tsx +56 -0
  158. package/corpus/templates/tasks/app/components/tasks/fields/controls/RichTextValueControl.tsx +115 -0
  159. package/corpus/templates/tasks/app/components/tasks/fields/controls/SingleSelectValueControl.tsx +61 -0
  160. package/corpus/templates/tasks/app/components/tasks/fields/controls/TextValueControl.tsx +20 -0
  161. package/corpus/templates/tasks/app/components/tasks/use-task-row-completion-animation.ts +181 -0
  162. package/corpus/templates/tasks/app/components/ui/accordion.tsx +56 -0
  163. package/corpus/templates/tasks/app/components/ui/alert-dialog.tsx +1 -0
  164. package/corpus/templates/tasks/app/components/ui/alert.tsx +1 -0
  165. package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +5 -0
  166. package/corpus/templates/tasks/app/components/ui/avatar.tsx +1 -0
  167. package/corpus/templates/tasks/app/components/ui/badge.tsx +1 -0
  168. package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +115 -0
  169. package/corpus/templates/tasks/app/components/ui/button.tsx +1 -0
  170. package/corpus/templates/tasks/app/components/ui/calendar.tsx +70 -0
  171. package/corpus/templates/tasks/app/components/ui/card.tsx +1 -0
  172. package/corpus/templates/tasks/app/components/ui/carousel.tsx +260 -0
  173. package/corpus/templates/tasks/app/components/ui/chart.tsx +379 -0
  174. package/corpus/templates/tasks/app/components/ui/checkbox.tsx +1 -0
  175. package/corpus/templates/tasks/app/components/ui/collapsible.tsx +1 -0
  176. package/corpus/templates/tasks/app/components/ui/command.tsx +1 -0
  177. package/corpus/templates/tasks/app/components/ui/context-menu.tsx +1 -0
  178. package/corpus/templates/tasks/app/components/ui/dialog.tsx +1 -0
  179. package/corpus/templates/tasks/app/components/ui/drawer.tsx +1 -0
  180. package/corpus/templates/tasks/app/components/ui/dropdown-menu.tsx +1 -0
  181. package/corpus/templates/tasks/app/components/ui/form.tsx +177 -0
  182. package/corpus/templates/tasks/app/components/ui/hover-card.tsx +27 -0
  183. package/corpus/templates/tasks/app/components/ui/input-otp.tsx +69 -0
  184. package/corpus/templates/tasks/app/components/ui/input.tsx +1 -0
  185. package/corpus/templates/tasks/app/components/ui/label.tsx +1 -0
  186. package/corpus/templates/tasks/app/components/ui/menubar.tsx +254 -0
  187. package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +128 -0
  188. package/corpus/templates/tasks/app/components/ui/pagination.tsx +121 -0
  189. package/corpus/templates/tasks/app/components/ui/popover.tsx +1 -0
  190. package/corpus/templates/tasks/app/components/ui/progress.tsx +1 -0
  191. package/corpus/templates/tasks/app/components/ui/radio-group.tsx +1 -0
  192. package/corpus/templates/tasks/app/components/ui/resizable.tsx +43 -0
  193. package/corpus/templates/tasks/app/components/ui/scroll-area.tsx +1 -0
  194. package/corpus/templates/tasks/app/components/ui/select.tsx +1 -0
  195. package/corpus/templates/tasks/app/components/ui/separator.tsx +1 -0
  196. package/corpus/templates/tasks/app/components/ui/sheet.tsx +1 -0
  197. package/corpus/templates/tasks/app/components/ui/sidebar.tsx +782 -0
  198. package/corpus/templates/tasks/app/components/ui/skeleton.tsx +1 -0
  199. package/corpus/templates/tasks/app/components/ui/slider.tsx +1 -0
  200. package/corpus/templates/tasks/app/components/ui/sonner.tsx +1 -0
  201. package/corpus/templates/tasks/app/components/ui/spinner.tsx +1 -0
  202. package/corpus/templates/tasks/app/components/ui/switch.tsx +1 -0
  203. package/corpus/templates/tasks/app/components/ui/table.tsx +1 -0
  204. package/corpus/templates/tasks/app/components/ui/tabs.tsx +1 -0
  205. package/corpus/templates/tasks/app/components/ui/textarea.tsx +1 -0
  206. package/corpus/templates/tasks/app/components/ui/toast.tsx +1 -0
  207. package/corpus/templates/tasks/app/components/ui/toaster.tsx +1 -0
  208. package/corpus/templates/tasks/app/components/ui/toggle-group.tsx +1 -0
  209. package/corpus/templates/tasks/app/components/ui/toggle.tsx +43 -0
  210. package/corpus/templates/tasks/app/components/ui/tooltip.tsx +1 -0
  211. package/corpus/templates/tasks/app/components/ui/use-toast.ts +3 -0
  212. package/corpus/templates/tasks/app/entry.client.tsx +19 -0
  213. package/corpus/templates/tasks/app/entry.server.tsx +10 -0
  214. package/corpus/templates/tasks/app/global.css +93 -0
  215. package/corpus/templates/tasks/app/hooks/cache.ts +31 -0
  216. package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +93 -0
  217. package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +196 -0
  218. package/corpus/templates/tasks/app/hooks/use-mobile.tsx +21 -0
  219. package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +40 -0
  220. package/corpus/templates/tasks/app/hooks/use-tasks.ts +276 -0
  221. package/corpus/templates/tasks/app/hooks/use-toast.ts +188 -0
  222. package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +140 -0
  223. package/corpus/templates/tasks/app/lib/app-config.ts +11 -0
  224. package/corpus/templates/tasks/app/lib/tab-id.ts +1 -0
  225. package/corpus/templates/tasks/app/lib/utils.ts +1 -0
  226. package/corpus/templates/tasks/app/root.tsx +130 -0
  227. package/corpus/templates/tasks/app/routes/_index.tsx +22 -0
  228. package/corpus/templates/tasks/app/routes/extensions.$id.$slug.tsx +2 -0
  229. package/corpus/templates/tasks/app/routes/extensions.$id.tsx +11 -0
  230. package/corpus/templates/tasks/app/routes/extensions._index.tsx +11 -0
  231. package/corpus/templates/tasks/app/routes/extensions.tsx +5 -0
  232. package/corpus/templates/tasks/app/routes/fields.tsx +16 -0
  233. package/corpus/templates/tasks/app/routes/inbox.tsx +16 -0
  234. package/corpus/templates/tasks/app/routes/tasks.tsx +17 -0
  235. package/corpus/templates/tasks/app/routes/team.tsx +17 -0
  236. package/corpus/templates/tasks/app/routes.ts +4 -0
  237. package/corpus/templates/tasks/app/vite-env.d.ts +6 -0
  238. package/corpus/templates/tasks/components.json +20 -0
  239. package/corpus/templates/tasks/data/sync-config.json +1 -0
  240. package/corpus/templates/tasks/docs/features/README.md +81 -0
  241. package/corpus/templates/tasks/docs/features/f1-tasks.mdx +67 -0
  242. package/corpus/templates/tasks/docs/features/f2-custom-fields.mdx +68 -0
  243. package/corpus/templates/tasks/docs/features/f3-projects.mdx +33 -0
  244. package/corpus/templates/tasks/docs/features/f4-inbox.mdx +55 -0
  245. package/corpus/templates/tasks/docs/features/f5-views.mdx +65 -0
  246. package/corpus/templates/tasks/docs/features/f6-search.mdx +43 -0
  247. package/corpus/templates/tasks/docs/features/f7-first-run.mdx +66 -0
  248. package/corpus/templates/tasks/docs/features/f8-chat.mdx +120 -0
  249. package/corpus/templates/tasks/e2e/global-setup.ts +42 -0
  250. package/corpus/templates/tasks/e2e/helpers/inbox.ts +71 -0
  251. package/corpus/templates/tasks/e2e/helpers/tasks.ts +99 -0
  252. package/corpus/templates/tasks/learnings.defaults.md +5 -0
  253. package/corpus/templates/tasks/netlify.toml +10 -0
  254. package/corpus/templates/tasks/package.json +104 -0
  255. package/corpus/templates/tasks/playwright.config.ts +34 -0
  256. package/corpus/templates/tasks/public/agent-native-icon-dark.svg +10 -0
  257. package/corpus/templates/tasks/public/agent-native-icon-light.svg +10 -0
  258. package/corpus/templates/tasks/public/agent-native-logo-dark.svg +21 -0
  259. package/corpus/templates/tasks/public/agent-native-logo-light.svg +21 -0
  260. package/corpus/templates/tasks/public/favicon.svg +1 -0
  261. package/corpus/templates/tasks/public/icon-180.svg +1 -0
  262. package/corpus/templates/tasks/public/icon-192.svg +1 -0
  263. package/corpus/templates/tasks/public/icon-512.svg +1 -0
  264. package/corpus/templates/tasks/public/manifest.json +21 -0
  265. package/corpus/templates/tasks/react-router.config.ts +7 -0
  266. package/corpus/templates/tasks/server/custom-fields/normalize.ts +163 -0
  267. package/corpus/templates/tasks/server/custom-fields/parse.ts +146 -0
  268. package/corpus/templates/tasks/server/custom-fields/schema.ts +147 -0
  269. package/corpus/templates/tasks/server/custom-fields/store.ts +425 -0
  270. package/corpus/templates/tasks/server/custom-fields/task-fields.ts +104 -0
  271. package/corpus/templates/tasks/server/custom-fields/types.ts +98 -0
  272. package/corpus/templates/tasks/server/custom-fields/validate.ts +210 -0
  273. package/corpus/templates/tasks/server/custom-fields/values/store.ts +386 -0
  274. package/corpus/templates/tasks/server/db/bulk-write.ts +30 -0
  275. package/corpus/templates/tasks/server/db/index.ts +5 -0
  276. package/corpus/templates/tasks/server/db/record-utils.ts +7 -0
  277. package/corpus/templates/tasks/server/db/schema.ts +67 -0
  278. package/corpus/templates/tasks/server/db/test-tasks-table.ts +76 -0
  279. package/corpus/templates/tasks/server/db/transaction.ts +6 -0
  280. package/corpus/templates/tasks/server/errors.ts +31 -0
  281. package/corpus/templates/tasks/server/inbox/store.ts +216 -0
  282. package/corpus/templates/tasks/server/middleware/auth.ts +15 -0
  283. package/corpus/templates/tasks/server/plugins/agent-chat.ts +46 -0
  284. package/corpus/templates/tasks/server/plugins/auth.ts +15 -0
  285. package/corpus/templates/tasks/server/plugins/db.ts +90 -0
  286. package/corpus/templates/tasks/server/routes/[...page].get.ts +5 -0
  287. package/corpus/templates/tasks/server/stored-items/store.ts +548 -0
  288. package/corpus/templates/tasks/server/tasks/store.ts +306 -0
  289. package/corpus/templates/tasks/server/user-config/store.ts +138 -0
  290. package/corpus/templates/tasks/shared/app-state-tabs.ts +15 -0
  291. package/corpus/templates/tasks/shared/boolean-param.ts +22 -0
  292. package/corpus/templates/tasks/shared/bulk-limits.ts +7 -0
  293. package/corpus/templates/tasks/shared/list-screen-snapshot.ts +90 -0
  294. package/corpus/templates/tasks/shared/navigation.ts +104 -0
  295. package/corpus/templates/tasks/shared/visible-task-fields.ts +2 -0
  296. package/corpus/templates/tasks/ssr-entry.ts +15 -0
  297. package/corpus/templates/tasks/tsconfig.json +24 -0
  298. package/corpus/templates/tasks/vite.config.ts +19 -0
  299. package/corpus/templates/tasks/vitest.config.ts +8 -0
  300. package/dist/cli/templates-meta.d.ts.map +1 -1
  301. package/dist/cli/templates-meta.js +13 -0
  302. package/dist/cli/templates-meta.js.map +1 -1
  303. package/dist/client/agent-page/AgentTabsPage.js +1 -1
  304. package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
  305. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  306. package/dist/client/org/OrgSwitcher.js +2 -1
  307. package/dist/client/org/OrgSwitcher.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/notifications/routes.d.ts +2 -2
  311. package/dist/observability/routes.d.ts +5 -5
  312. package/dist/resources/handlers.d.ts +3 -3
  313. package/dist/secrets/routes.d.ts +9 -9
  314. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  315. package/dist/server/transcribe-voice.d.ts +1 -1
  316. package/package.json +1 -1
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: adding-a-feature
3
+ description: >-
4
+ The four-area checklist every new feature must complete. Use when adding any
5
+ feature, integration, or capability to ensure the agent and UI stay in parity.
6
+ scope: dev
7
+ metadata:
8
+ internal: true
9
+ ---
10
+
11
+ # Adding a Feature — The Four-Area Checklist
12
+
13
+ ## Rule
14
+
15
+ Every new feature MUST update all four areas. Skipping any one breaks the agent-native contract — the agent and UI must always be equal partners.
16
+
17
+ ## Why
18
+
19
+ Agent-native apps are defined by parity: everything the UI can do, the agent can do, and vice versa. A feature that only has UI is invisible to the agent. A feature that only has scripts is invisible to the user. A feature without app-state sync means the agent is blind to what the user is doing.
20
+
21
+ ## The Checklist
22
+
23
+ When you add a new feature, work through these four areas in order:
24
+
25
+ ### 1. UI Component
26
+
27
+ Build the user-facing interface — a page, component, dialog, or route. Use `useActionQuery` and `useActionMutation` from `@agent-native/core/client` to call actions for data fetching and mutations. Do not create a custom REST endpoint just so React can call action-backed data; the action endpoint already exists.
28
+
29
+ **Auto-refresh on agent writes is non-negotiable** — when the agent mutates data, the UI must reflect the change without a manual refresh. There are two paths, and you must pick the right one:
30
+
31
+ - **`useActionQuery` / `useActionMutation`** — covered automatically. The framework's `useDbSync` invalidates `["action"]` on every change event, so every `useActionQuery` hook refetches on agent activity. No extra wiring required. **Prefer this path.**
32
+ - **Raw `useQuery` with custom keys** — needs explicit wiring. Fold `useChangeVersions([<source>, "action"])` from `@agent-native/core/client` into the `queryKey` and set `placeholderData: (prev) => prev`. The `action` source is the reliable signal (the agent runner emits it after every successful tool call); the resource-specific source (`"dashboards"`, `"analyses"`, `"settings"`, etc.) is bonus when emitted. Without this wiring, agent writes will be invisible until manual refresh — that breaks the framework's #1 promise.
33
+
34
+ ```tsx
35
+ import { useChangeVersions } from "@agent-native/core/client";
36
+ import { useQuery } from "@tanstack/react-query";
37
+
38
+ const v = useChangeVersions(["dashboards", "action"]);
39
+ useQuery({
40
+ queryKey: ["dashboard", id, v],
41
+ queryFn: () => fetchDashboard(id),
42
+ placeholderData: (prev) => prev, // no flicker on refetch
43
+ });
44
+ ```
45
+
46
+ See the `real-time-sync` skill for the full pattern and source catalog.
47
+
48
+ ### 2. Action
49
+
50
+ Create an action in `actions/` using `defineAction`. This serves double duty: the agent calls it as a tool, and the UI calls it through `useActionQuery` / `useActionMutation` while the framework owns the HTTP transport. Set `http: { method: "GET" }` for read actions, leave default for writes, or set `http: false` for agent-only actions like `navigate` and `view-screen`.
51
+
52
+ Before adding a new route or endpoint, inspect the existing actions. Reuse an
53
+ action if it already covers the business operation, extend it if the shared
54
+ contract is incomplete, or create a new `defineAction` if the agent and UI both
55
+ need the capability. Do not add pass-through `/api/*` routes that re-export
56
+ actions. If client code needs a new framework/app route, expose a named helper
57
+ or hook first and use that helper from components and docs.
58
+
59
+ For provider-backed analysis/query/reporting integrations, do not turn every
60
+ provider endpoint or filter into a rigid action. Prefer the shared
61
+ `provider-api-catalog` / `provider-api-docs` / `provider-api-request` pattern
62
+ from `@agent-native/core/provider-api`, then add narrow convenience actions only
63
+ for workflows that truly deserve a first-class shortcut. Treat this as a
64
+ capability requirement, not a nice-to-have: convenience actions must not become
65
+ the ceiling of what the agent can ask the provider to do. Pair broad provider
66
+ access with staging or sandboxed code execution when responses may be too large
67
+ for chat context. If provider credentials live on resource/share rows, add the
68
+ scoped resolver first so broad access preserves the same ownership boundary as
69
+ the app UI.
70
+
71
+ If the feature needs credentials, design the credential path in the same change.
72
+ Never hardcode API keys, tokens, webhook URLs, signing secrets, private
73
+ Builder/internal data, or customer data in the action, UI, seed data, fixtures,
74
+ docs, prompts, or generated extension/app content. Register required secrets,
75
+ use OAuth helpers, or read scoped values from the vault/credential store.
76
+
77
+ If the feature involves attachments, images, recordings, screenshots, exports,
78
+ or other file-like payloads, design the upload path in the same change:
79
+ provider upload first, then URL/id/blob handle in SQL. Do not add base64/binary
80
+ columns or stuff files into `application_state`.
81
+
82
+ **If the action produces or lists a navigable resource**, add a `link` builder that returns `{ url: buildDeepLink({ app, view, params }), label }`. External coding agents and MCP hosts (Claude / ChatGPT / Claude Code / Cowork / Codex, over MCP/A2A) then surface an "Open in … →" deep link that drops the user back into the running UI focused on the record — for free. If a compatible MCP host should render an inline review/edit surface, also add `mcpApp` with `embedApp()` so the action embeds the real React app route instead of a one-off HTML UI. The `link` builder and `mcpApp` metadata must be pure and synchronous (no I/O). Any external-agent read/ingest action must be `http: { method: "GET" }` + `readOnly: true` + `publicAgent: { expose: true, readOnly: true, requiresAuth: true }`. See the `external-agents` skill.
83
+
84
+ ### 3. Skills / Instructions
85
+
86
+ Update `AGENTS.md` and/or create a skill in `.agents/skills/` if the feature introduces patterns the agent needs to know. At minimum, add the new actions to the action table in the template's `AGENTS.md`.
87
+
88
+ Reusable actions are part of the app contract, not just implementation detail. When an action is useful outside one screen, update agent instructions in the same change so app agents know when to call it, which arguments matter, and what output to preserve. If the capability is workflow-heavy, cross-app, provider-backed, or has a non-obvious sequence of actions, add or update a skill instead of burying the behavior in one long `AGENTS.md` paragraph.
89
+
90
+ Instruction examples may name secret keys like `SLACK_WEBHOOK`, but must use
91
+ placeholders such as `${keys.SLACK_WEBHOOK}` or `<SLACK_WEBHOOK>`. Do not paste
92
+ real keys, internal data, or customer data into instructions as examples.
93
+
94
+ If the feature adds or changes visible UI copy, prompts, toasts, labels, empty
95
+ states, or formatting, read `internationalization` and update the app's i18n
96
+ catalogs in the same change.
97
+
98
+ For app-backed skills, declare skill visibility in the app-skill manifest:
99
+
100
+ - `internal` — only the app's own agents should use it.
101
+ - `exported` — marketplace installs receive it, but the app does not need it loaded internally.
102
+ - `both` — shared between the app's internal agents and exported marketplace bundles.
103
+
104
+ ### 4. Application State Sync
105
+
106
+ Expose navigation and selection state so the agent knows what the user is looking at. Write to the `navigation` app-state key on route changes. Update the `view-screen` action to fetch relevant data for the new feature. Add a `navigate` command if the agent needs to open the new view.
107
+
108
+ ## Examples
109
+
110
+ ### Adding "compose email" to a mail app
111
+
112
+ | Area | What to build |
113
+ | --------------- | ---------------------------------------------------------------------------------------- |
114
+ | UI | Compose panel with tabs, to/cc/bcc fields, body editor. Use `useActionQuery`/`useActionMutation` for data. |
115
+ | Action | `manage-draft` action (create/update/delete drafts), `send-email` action |
116
+ | Skills/AGENTS | Document compose state shape, draft lifecycle, action args in AGENTS.md |
117
+ | App-state sync | `compose-{id}` keys for each draft tab, `navigation` includes compose state |
118
+
119
+ ### Adding "create form" to a forms app
120
+
121
+ | Area | What to build |
122
+ | --------------- | ---------------------------------------------------------------------------------------- |
123
+ | UI | Form builder page with drag-and-drop fields, preview, settings. Use `useActionQuery` for lists. |
124
+ | Action | `create-form` action, `update-form` action, `list-forms` action (GET) |
125
+ | Skills/AGENTS | Document form schema shape, field types, validation rules in AGENTS.md |
126
+ | App-state sync | `navigation` includes `{ view: "form-builder", formId: "..." }`, `view-screen` fetches form data |
127
+
128
+ ### Adding "chart type" to an analytics app
129
+
130
+ | Area | What to build |
131
+ | --------------- | ---------------------------------------------------------------------------------------- |
132
+ | UI | New chart component, chart type selector in dashboard |
133
+ | Action | `create-chart` or `update-dashboard` action that sets chart type and config |
134
+ | Skills/AGENTS | Document supported chart types, config options, data requirements |
135
+ | App-state sync | `navigation` includes selected chart/dashboard, `view-screen` returns chart config |
136
+
137
+ ## Adding a new route
138
+
139
+ Templates are single-page apps with client-side routing. The app shell (AgentSidebar + top-level nav) MUST persist across navigation — it is mounted once, either in `root.tsx` around `<Outlet />` or via a pathless `_app.tsx` layout route that all authed routes nest under.
140
+
141
+ **Never wrap each new route in its own `<AppLayout>` / `<Layout>`.** That causes React to unmount the entire app shell on every navigation, reloading the agent sidebar and destroying in-progress work.
142
+
143
+ - If the template has `<AppLayout>` in `root.tsx` — just render page content in your new route file, nothing else.
144
+ - If the template has `app/routes/_app.tsx` (pathless layout) — name your new route `_app.<segment>.tsx` to inherit the shell, or bare `<segment>.tsx` for public routes that should NOT have the shell.
145
+ - If a page needs per-route data (e.g. highlighting the active item in the sidebar), read it in the layout from `useParams()` / `useLocation()`. Don't pass it as a prop through every route file.
146
+
147
+ See the "Client-Side Routing" section in the root `CLAUDE.md` for full details.
148
+
149
+ ## Anti-Patterns
150
+
151
+ - **Per-route `<AppLayout>` wrappers** — Every route file wraps its content in `<AppLayout>` or `<Layout>`. React sees a different component at the outlet on each nav and unmounts the whole shell, causing the agent sidebar to reload on every click. Mount the shell once above `<Outlet />` (root.tsx or `_app.tsx` pathless layout).
152
+ - **UI without actions** — The user can create forms but the agent cannot. The agent says "I don't have access to that" when it should be able to do it.
153
+ - **Actions without AGENTS.md** — The actions exist but the agent doesn't know about them because they're not documented. The agent reinvents solutions instead of using the actions.
154
+ - **Duplicate API routes** — Creating `/api/` routes for operations that actions already handle, including pass-through routes that just call or repackage an action. Use `useActionQuery`/`useActionMutation` instead.
155
+ - **Raw client route calls** — Teaching or adding `fetch("/_agent-native/...")`,
156
+ `fetch(agentNativePath(...))`, or template `/api/*` calls in components for
157
+ normal app work. Add a named client helper/hook and call that instead.
158
+ - **Features without app-state** — The agent cannot see that the user is looking at a specific form, email, or chart. It asks "which one?" instead of acting on the current selection.
159
+ - **Actions without UI** — The agent can do something the user cannot. This is less common but still breaks parity.
160
+
161
+ ## Verification
162
+
163
+ After completing all four areas, verify:
164
+
165
+ 1. Can the user perform the operation from the UI?
166
+ 2. Can the agent perform the same operation via actions?
167
+ 3. Does `pnpm action view-screen` show the relevant state when the user is using the feature?
168
+ 4. Can the agent navigate to the feature view via the `navigate` action?
169
+ 5. Is the feature documented in AGENTS.md with action names and args?
170
+ 6. Are credentials and sensitive data supplied only through approved runtime
171
+ channels, with no hardcoded real keys, tokens, webhook URLs, Builder/internal
172
+ data, or customer data?
173
+
174
+ ## One more area — sharing
175
+
176
+ If the feature stores **user-authored resources** (documents, dashboards, forms, decks, etc.), make them ownable so they get private-by-default semantics and a share dialog for free. See the `sharing` skill.
177
+
178
+ TL;DR: spread `ownableColumns()` into the resource table, pair it with `createSharesTable(...)`, call `registerShareableResource(...)`, wrap list/read queries with `accessFilter`, guard writes with `assertAccess`, and drop `<ShareButton>` in the resource header. The `share-resource`, `unshare-resource`, `list-resource-shares`, and `set-resource-visibility` actions are auto-mounted framework-wide.
179
+
180
+ ## Related Skills
181
+
182
+ - **sharing** — How to make a new resource ownable (private by default, share with users/orgs/public)
183
+ - **context-awareness** — How to expose UI state to the agent (area 4 in detail)
184
+ - **actions** — How to create actions with `defineAction` and the `http` option (area 2 in detail)
185
+ - **external-agents** — Add a `link` builder so external agents (MCP/A2A) get an "Open in … →" deep link
186
+ - **create-skill** — How to create skills for new patterns (area 3 in detail)
187
+ - **storing-data** — Where to store the feature's data
188
+ - **real-time-sync** — How the UI stays in sync when the agent writes data
189
+ - **internationalization** — How to update localized UI copy and catalogs
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: agent-native-docs
3
+ description: >-
4
+ How to find version-matched Agent Native framework docs and source bundled in
5
+ node_modules. Use before implementing or answering questions about
6
+ @agent-native/core APIs, generated apps, workspaces, templates, or advanced
7
+ features.
8
+ scope: dev
9
+ metadata:
10
+ internal: true
11
+ ---
12
+
13
+ # Agent Native Docs Lookup
14
+
15
+ ## Rule
16
+
17
+ Before implementing or explaining non-trivial Agent Native behavior, read the
18
+ version-matched docs installed with `@agent-native/core`. When examples,
19
+ imports, or implementation details matter, inspect the packaged source corpus
20
+ too.
21
+
22
+ ## Why
23
+
24
+ Generated apps and workspaces may be on a different framework version than the
25
+ public docs or model memory. The installed package is the source that matches
26
+ the app in front of you. It also includes a source-only corpus of core and
27
+ first-party templates so agents can replicate current best-practice patterns
28
+ without needing the framework monorepo checkout.
29
+
30
+ ## How
31
+
32
+ From a generated app directory:
33
+
34
+ ```bash
35
+ pnpm action docs-search --query "<feature>"
36
+ pnpm action docs-search --slug <slug>
37
+ pnpm action docs-search --list
38
+ pnpm action source-search --query "<pattern>"
39
+ pnpm action source-search --path templates/plan/AGENTS.md
40
+ pnpm action source-search --list
41
+ ```
42
+
43
+ The headless `pnpm agent` loop and built-in app agent also expose a read-only
44
+ `docs-search` tool with the same `query`, `slug`, and `list` options, plus a
45
+ read-only `source-search` tool with `query`, `path`, and `list`.
46
+
47
+ If the action runner is unavailable, search the package directly:
48
+
49
+ ```bash
50
+ rg -n "actions|automations|a2a|sharing" node_modules/@agent-native/core/docs
51
+ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
52
+ ```
53
+
54
+ Then read `node_modules/@agent-native/core/docs/AGENTS.md` or the matching file
55
+ under `node_modules/@agent-native/core/docs/content/`. For source examples,
56
+ read files under `node_modules/@agent-native/core/corpus/core/` or
57
+ `node_modules/@agent-native/core/corpus/templates/`.
58
+
59
+ ## Useful Slugs
60
+
61
+ | Need | Slugs |
62
+ | --- | --- |
63
+ | Actions and typed client calls | `actions`, `client` |
64
+ | SQL, auth, access, sharing | `database`, `authentication`, `security`, `sharing` |
65
+ | UI state visible to the agent | `context-awareness` |
66
+ | Headless and chat-first apps | `pure-agent-apps`, `agent-surfaces`, `using-your-agent` |
67
+ | Automations and schedules | `automations`, `recurring-jobs` |
68
+ | Cross-app and external agents | `a2a-protocol`, `external-agents`, `mcp-protocol`, `mcp-apps` |
69
+ | Skills and instructions | `skills-guide`, `writing-agent-instructions` |
70
+
71
+ ## Don't
72
+
73
+ - Do not rely on memory for framework APIs when package docs are present.
74
+ - Do not add custom REST wrappers for app data before reading `actions`.
75
+ - Do not add inline LLM calls before reading `using-your-agent` and
76
+ `agent-surfaces`.
@@ -0,0 +1,43 @@
1
+ # /agent-watchdog
2
+
3
+ Audit another agent's work from a session, transcript, PR, branch, or run
4
+ summary.
5
+
6
+ `/agent-watchdog` is for the common handoff where one agent needs to watch
7
+ another agent finish, then check whether the work actually matches what was
8
+ asked.
9
+
10
+ ## What It Does
11
+
12
+ - Resolves Codex, Claude Code, PR, branch, transcript, or pasted run artifacts.
13
+ - Waits for completion when the user asks to watch.
14
+ - Reconstructs the original request and later scope changes.
15
+ - Checks the agent's claims against diffs, files, tests, CI, screenshots, and
16
+ review state.
17
+ - Reports gaps, weak verification, scope drift, and residual risk.
18
+ - Makes narrow fixes when the user explicitly authorizes repair.
19
+
20
+ ## When To Use It
21
+
22
+ Use it when a user says things like:
23
+
24
+ - "Watch this session until done and audit it."
25
+ - "Claude finished, check what it did and fix gaps."
26
+ - "Compare these two agents' work."
27
+ - "Babysit this PR and make sure the agent actually handled the feedback."
28
+
29
+ Skip it for normal code review when there is no other agent session or run to
30
+ audit.
31
+
32
+ ## Modes
33
+
34
+ - Watch only: monitor and report, no edits.
35
+ - Audit: inspect the work and produce a gap report, no edits.
36
+ - Audit and fix: repair clear gaps with targeted validation.
37
+ - Compare: evaluate multiple sessions against the same request.
38
+
39
+ ## Install
40
+
41
+ ```sh
42
+ npx @agent-native/skills@latest add --skill agent-watchdog
43
+ ```
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: agent-watchdog
3
+ description: Use when asked to watch, babysit, audit, review, compare, or fix another agent's work from a Codex session ID, Claude Code session/transcript, chat/thread link, PR, branch, log, or pasted run summary. Monitor until the other agent is done or blocked, reconstruct what the user asked, inspect what the agent actually changed and verified, report gaps, and optionally make scoped fixes when the user authorizes repair.
4
+ ---
5
+
6
+ # Agent Watchdog
7
+
8
+ Watch another agent's work like a reviewer with a pager: wait for completion
9
+ when needed, reconstruct the request, verify the evidence, and close the gap
10
+ between what was asked and what actually happened.
11
+
12
+ ## Choose The Mode
13
+
14
+ Infer the mode from the user's wording:
15
+
16
+ - **Watch only:** monitor a session, PR, branch, CI run, or transcript until it
17
+ reaches a terminal state. Do not edit files.
18
+ - **Audit:** read the prompt, transcript, diff, tests, CI, comments, screenshots,
19
+ or final claims and return a gap report. Do not edit files.
20
+ - **Audit and fix:** audit first, then make narrow fixes for clear gaps. Avoid
21
+ broad rewrites, branch movement, or speculative changes.
22
+ - **Compare:** when given multiple sessions or agents, compare their work against
23
+ the same original request and reconcile the important differences.
24
+
25
+ If authority is unclear, default to audit-only and say what you would fix.
26
+
27
+ ## Resolve The Target
28
+
29
+ 1. Identify every artifact the user supplied: session ID, transcript path,
30
+ thread URL, PR, branch, commit, CI run, issue, Slack link, or pasted summary.
31
+ 2. Use the host's native thread/history tools, local transcript files, repo
32
+ logs, GitHub tools, or pasted content to resolve the artifact. Prefer the
33
+ most direct source over summaries.
34
+ 3. If the artifact is still running and the user asked to watch, poll at a
35
+ reasonable interval until it is done, blocked, stale, or clearly waiting on a
36
+ human/external system.
37
+ 4. If the artifact cannot be resolved, ask for the missing identifier or path.
38
+
39
+ ## Reconstruct The Contract
40
+
41
+ Build a compact contract before judging the work:
42
+
43
+ - Original user request and any later changes in scope.
44
+ - Explicit constraints: branch rules, no-edit requests, deadlines, package
45
+ versions, validation expectations, design requirements, or security/privacy
46
+ limits.
47
+ - Implied acceptance criteria: user-visible behavior, tests, CI, docs, deploys,
48
+ screenshots, review replies, or status updates.
49
+ - The other agent's final claims and any "could not do" caveats.
50
+
51
+ Treat the user's request as the source of truth, not the other agent's summary.
52
+
53
+ ## Audit The Evidence
54
+
55
+ Inspect evidence, not vibes:
56
+
57
+ - Read changed files and relevant unchanged files around the touched paths.
58
+ - Check git status/diff without reverting unrelated work.
59
+ - Compare commands the agent claimed to run with actual output when available.
60
+ - Inspect failed or skipped tests, CI logs, browser screenshots, review
61
+ comments, deploy output, and error traces.
62
+ - For PR/review work, verify unresolved threads and CI state from the source
63
+ system when tools are available.
64
+ - For UI work, prefer screenshots or browser checks over prose claims.
65
+
66
+ Classify each issue as:
67
+
68
+ - **Gap:** requested behavior is missing or incomplete.
69
+ - **Bug:** the implementation likely fails or regresses behavior.
70
+ - **Verification miss:** the work may be right but the evidence is weak.
71
+ - **Scope drift:** the agent changed something unrelated or skipped a constraint.
72
+ - **No issue:** the concern is already handled, with evidence.
73
+
74
+ ## Fix Narrowly
75
+
76
+ When the user authorized repair:
77
+
78
+ 1. Fix only gaps with clear evidence.
79
+ 2. Preserve unrelated local changes and do not move branches unless explicitly
80
+ asked for that branch operation.
81
+ 3. Use existing repo patterns and targeted tests.
82
+ 4. Re-run the smallest useful validation after each meaningful fix.
83
+ 5. If a fix would require a product decision, credential, destructive action, or
84
+ broad rewrite, stop and report the decision instead of guessing.
85
+
86
+ ## Report
87
+
88
+ Lead with the outcome. Keep the report short enough to scan:
89
+
90
+ ```md
91
+ Status
92
+ - Done, blocked, stale, or still running.
93
+
94
+ Requested
95
+ - What the user asked the watched agent to do.
96
+
97
+ Observed
98
+ - What the watched agent changed, claimed, and verified.
99
+
100
+ Gaps
101
+ - Missing behavior, bugs, weak verification, or scope drift.
102
+
103
+ Fixes made
104
+ - Files changed and validation run. Omit this section for audit-only work.
105
+
106
+ Remaining risk
107
+ - Anything still unverified or waiting on CI/review/deploy/human input.
108
+ ```
109
+
110
+ Name exact files, commands, PRs, or thread IDs when they matter.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Agent Watchdog"
3
+ short_description: "Audit another agent session and fix gaps."
4
+ default_prompt: "Use $agent-watchdog to watch or audit an agent session, then report or fix gaps."
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: capture-learnings
3
+ description: >-
4
+ Capture and apply accumulated knowledge via structured memory. Use when the
5
+ user gives feedback, shares preferences, corrects a mistake, or when you
6
+ discover something worth remembering for future conversations.
7
+ user-invocable: false
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Capture Learnings
13
+
14
+ This is background knowledge, not a slash command. **Organization learnings and your personal memory index are loaded at the start of every conversation, including Slack/integration turns.** Capture durable context proactively when you learn something worth remembering.
15
+
16
+ ## How to Read & Write Memories
17
+
18
+ Memories are stored as **resources** in the SQL database, not as files on disk.
19
+
20
+ - **Team/organization knowledge:** shared `LEARNINGS.md`. Read it first, merge the new fact, then write the full updated file with the `resources` tool using `scope: "shared"`. Shared scope resolves to the active organization; it must never leak to another organization in the same deployment.
21
+ - **Personal knowledge:** `memory/MEMORY.md` plus `memory/<name>.md`, written with `save-memory`.
22
+
23
+ - **Save a memory:** `save-memory --name <name> --type <type> --description "..." --content "..."`
24
+ - **Read a memory:** `resource-read --path memory/<name>.md`
25
+ - **Delete a memory:** `delete-memory --name <name>`
26
+ - **List all memories:** `resource-list --prefix memory/`
27
+
28
+ ## Memory Types
29
+
30
+ | Type | Use for |
31
+ |------|---------|
32
+ | `user` | Preferences, role, personal context, contacts |
33
+ | `feedback` | Corrections, confirmed approaches, things to avoid or repeat |
34
+ | `project` | Ongoing work context, decisions, deadlines, status |
35
+ | `reference` | Pointers to external systems, URLs, API details |
36
+
37
+ ## When to Capture
38
+
39
+ ### Team and organization knowledge (`LEARNINGS.md`, shared scope)
40
+ - Canonical destinations and workflows (for example, which Content database receives a type of Slack request)
41
+ - Required intake fields, ownership, prioritization conventions, metric definitions, and approved terminology
42
+ - Durable external references that the whole team needs, including the canonical page/database URL
43
+ - Corrections or decisions that should affect every organization member's future Slack and app conversations
44
+
45
+ Store the fact and a concise provenance link when available. Do not paste full private conversations, customer data, credentials, or secrets into learnings. Put stable always-on policy in shared `AGENTS.md`; put learned facts and evolving conventions in shared `LEARNINGS.md`.
46
+
47
+ ### User Preferences & Memory (`user`)
48
+ - **Tone and style** — "I prefer casual tone", "don't use emojis", "keep replies short"
49
+ - **Personal context** — contacts, relationships, habits ("my wife's email is...", "I'm in PST timezone")
50
+ - **Workflow preferences** — "always CC my assistant", "I like to review before sending"
51
+ - **Role and expertise** — "I'm a data scientist", "new to React"
52
+
53
+ ### Feedback & Corrections (`feedback`)
54
+ - **Corrections** — user says "no, do it this way" → capture the right way
55
+ - **Confirmed approaches** — user validates a non-obvious choice ("yes, that's perfect")
56
+ - **Repeated friction** — you hit the same issue twice; save it
57
+
58
+ ### Project Context (`project`)
59
+ - **Ongoing work** — who is doing what, why, by when
60
+ - **Decisions** — why something is done a certain way
61
+ - **Status** — current state of initiatives
62
+
63
+ ### References (`reference`)
64
+ - **External systems** — "bugs are tracked in Linear project INGEST"
65
+ - **URLs** — dashboards, documentation, tools
66
+ - **API quirks** — undocumented behavior, version-specific gotchas
67
+
68
+ ### Don't Capture
69
+ - Things obvious from reading the code
70
+ - Standard language/framework behavior
71
+ - Temporary debugging notes
72
+ - Anything already in AGENTS.md, shared LEARNINGS.md, or skills
73
+ - Ephemeral task details (use tasks/plans instead)
74
+
75
+ ## Key Rules
76
+
77
+ 1. **Save proactively — don't ask permission.** When you learn something durable, save it immediately at the correct scope.
78
+ 2. **Choose scope by audience.** Organization workflow or reference → shared `LEARNINGS.md`; one person's preference/context → personal memory.
79
+ 3. **One memory per topic** — e.g. `coding-style`, `project-alpha`, not one giant dump
80
+ 4. **Read before updating** — if a memory exists, read it first and merge, don't overwrite
81
+ 5. **Keep descriptions concise** — the index is loaded every conversation
82
+ 6. **Memories are SQL-backed** — they persist across sessions and are not in git; still minimize sensitive content
83
+
84
+ ## Graduation
85
+
86
+ When a memory is referenced repeatedly, it may belong in AGENTS.md or a skill:
87
+ - Saving a personal memory is lightweight (auto-apply, personal scope)
88
+ - Shared LEARNINGS.md is the lightweight organization knowledge layer
89
+ - Updating AGENTS.md or a skill is heavier (affects all users/agents)
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: change-summary
3
+ description: >-
4
+ End agent responses that include code changes with a Change summary table
5
+ (Code / Tests / Config / Docs) and per-file line counts from git diff.
6
+ metadata:
7
+ internal: true
8
+ ---
9
+
10
+ # Change Summary
11
+
12
+ When you modify this repo, **end every response that includes code changes** with a **Change summary** section.
13
+
14
+ ## Required format
15
+
16
+ Split the summary into four buckets. Omit a bucket only when nothing changed in it.
17
+
18
+ ```md
19
+ ## Change summary
20
+
21
+ ### Code
22
+ | File | + | − |
23
+ |------|---|---|
24
+ | `path/to/file.ts` | 12 | 3 |
25
+
26
+ **Subtotal:** +N −M across K files
27
+
28
+ ### Tests
29
+ | File | + | − |
30
+ |------|---|---|
31
+ | `path/to/file.test.ts` | 4 | 1 |
32
+
33
+ **Subtotal:** +N −M across K files
34
+
35
+ ### Config
36
+ | File | + | − |
37
+ |------|---|---|
38
+ | `server/plugins/db.ts` | 1 | 1 |
39
+
40
+ **Subtotal:** +N −M across K files
41
+
42
+ ### Docs
43
+ | File | + | − |
44
+ |------|---|---|
45
+ | `AGENTS.md` | 2 | 2 |
46
+
47
+ **Subtotal:** +N −M across K files
48
+
49
+ **Total:** +N −M across K files
50
+ ```
51
+
52
+ ## How to classify files
53
+
54
+ | Bucket | Include |
55
+ |--------|---------|
56
+ | **Code** | `actions/*.ts` (non-test), `app/**`, `server/**` except test-only helpers |
57
+ | **Tests** | `**/*.test.ts`, `**/test-*.ts`, in-memory test DB SQL in `server/db/test-tasks-table.ts` |
58
+ | **Config** | DB migrations and table defs (`server/plugins/db.ts`, `server/db/schema.ts`), `package.json`, `tsconfig*.json`, `vite.config.*`, CI/workflow YAML, env templates |
59
+ | **Docs** | `*.md`, skill files under `.agents/skills/` and `.claude/skills/` |
60
+
61
+ New untracked files: list under the right bucket with **+lines 0** (all lines are additions).
62
+
63
+ Renames/deletes: show the old path with deletions and the new path with additions, or one row with net +/−.
64
+
65
+ ## How to compute counts
66
+
67
+ Prefer git over guessing:
68
+
69
+ ```bash
70
+ git diff --numstat
71
+ git status --short # for untracked files
72
+ wc -l <new-file> # line count for new files
73
+ ```
74
+
75
+ Use line counts from `git diff --numstat` (added, removed). Do not approximate from memory.
76
+
77
+ ## When to include it
78
+
79
+ - Always after implementation, refactor, or fix commits in the working tree.
80
+ - Skip only for pure Q&A with **no** file edits.
81
+ - If the user asked only for a review with no changes, skip the summary.
82
+
83
+ Place the change summary **before** the final 🟢/🟡/🔴 status line.