@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,221 @@
1
+ ---
2
+ name: create-skill
3
+ description: >-
4
+ How to create new skills for an agent-native app. Use when adding a new
5
+ skill, documenting a pattern the agent should follow, or creating reusable
6
+ guidance for the agent.
7
+ scope: dev
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Create a Skill
13
+
14
+ ## When to Use
15
+
16
+ Create a new skill when:
17
+
18
+ - There's a pattern the agent should follow repeatedly.
19
+ - A multi-step workflow needs reliable, step-by-step guidance.
20
+ - You want to scaffold files from a template.
21
+
22
+ Don't create a skill when:
23
+
24
+ - The guidance already exists in another skill — extend it instead.
25
+ - You're documenting something the agent already knows (e.g., how to write
26
+ TypeScript).
27
+ - It's a one-off — put it in `AGENTS.md` (for everyone) or `memory/MEMORY.md`
28
+ (personal, per-user). See **capture-learnings**.
29
+
30
+ ## Interview
31
+
32
+ Before writing the skill, answer these:
33
+
34
+ 1. **What should this skill enable?** — The core purpose in one sentence.
35
+ 2. **Which of the four areas does it serve?** — UI, actions, skills/instructions,
36
+ or application state (see the **adding-a-feature** skill). Most skills are
37
+ about how to touch one or more of these correctly.
38
+ 3. **When should it trigger?** — Describe the situations in natural language.
39
+ Be slightly pushy — over-triggering is better than under-triggering.
40
+ 4. **Does it involve context awareness?** — Does the agent need to know what the
41
+ user is looking at? If so, reference the `navigation` application-state key and
42
+ the `view-screen` action pattern. See the **context-awareness** skill.
43
+ 5. **What type of skill?** — Pattern, Workflow, or Generator (see below).
44
+ 6. **Does it need supporting files?** — References (read-only context) or none.
45
+ Keep it minimal; push depth into `references/`.
46
+
47
+ ## Skill Types and Templates
48
+
49
+ ### Pattern (architectural rule)
50
+
51
+ For documenting how things should be done:
52
+
53
+ ```markdown
54
+ ---
55
+ name: my-pattern
56
+ description: >-
57
+ [Under 40 words. What it covers AND when it should trigger.]
58
+ ---
59
+
60
+ # [Pattern Name]
61
+
62
+ ## Rule
63
+
64
+ [One sentence: what must be true]
65
+
66
+ ## Why
67
+
68
+ [Why this rule exists]
69
+
70
+ ## How
71
+
72
+ [How to follow it, with code examples]
73
+
74
+ ## Don't
75
+
76
+ [Common violations]
77
+
78
+ ## Related Skills
79
+
80
+ [Which skills compose with this one]
81
+ ```
82
+
83
+ ### Workflow (step-by-step)
84
+
85
+ For multi-step implementation tasks:
86
+
87
+ ```markdown
88
+ ---
89
+ name: my-workflow
90
+ description: >-
91
+ [Under 40 words. What it covers AND when it should trigger.]
92
+ ---
93
+
94
+ # [Workflow Name]
95
+
96
+ ## Prerequisites
97
+
98
+ [What must be in place first]
99
+
100
+ ## Steps
101
+
102
+ [Numbered steps with code examples]
103
+
104
+ ## Verification
105
+
106
+ [How to confirm it worked]
107
+
108
+ ## Troubleshooting
109
+
110
+ [Common issues and fixes]
111
+
112
+ ## Related Skills
113
+ ```
114
+
115
+ ### Generator (scaffolding)
116
+
117
+ For creating files from templates:
118
+
119
+ ```markdown
120
+ ---
121
+ name: my-generator
122
+ description: >-
123
+ [Under 40 words. What it covers AND when it should trigger.]
124
+ ---
125
+
126
+ # [Generator Name]
127
+
128
+ ## Usage
129
+
130
+ [How to invoke — what args/inputs are needed]
131
+
132
+ ## What Gets Created
133
+
134
+ [List of files and their purpose]
135
+
136
+ ## Template
137
+
138
+ [The template content with placeholders]
139
+
140
+ ## After Generation
141
+
142
+ [What to do next — wire up sync, add routes, register the action, etc.]
143
+
144
+ ## Related Skills
145
+ ```
146
+
147
+ ## Naming Conventions
148
+
149
+ - Hyphen-case only: `[a-z0-9-]`, max 64 characters.
150
+ - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`).
151
+ - Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
152
+ - The directory name must match the `name` in frontmatter.
153
+
154
+ ## Skill Scope (runtime vs dev)
155
+
156
+ An optional `scope` frontmatter field controls which agent loads the skill:
157
+
158
+ - `both` (default when omitted) — loaded by connected repo agents and the
159
+ in-app runtime agent. Use for any skill both audiences should follow.
160
+ - `runtime` — loaded only by the in-app runtime agent.
161
+ - `dev` — meant for the human's coding agent (e.g. Claude Code) only. **Excluded
162
+ from the runtime agent everywhere**: not in the system-prompt skills block and
163
+ not in `docs-search` results.
164
+
165
+ Use `scope: dev` for internal-only skills that should guide connected repo
166
+ agents such as Codex or Claude Code, but should not affect the deployed
167
+ production agent. Do not use `metadata.internal` for runtime visibility; that
168
+ field is catalog/package metadata and is intentionally not treated as
169
+ production exclusion.
170
+
171
+ ```markdown
172
+ ---
173
+ name: release-checklist
174
+ description: >-
175
+ Steps for cutting a release. Use when preparing or publishing a new version.
176
+ scope: dev
177
+ ---
178
+ ```
179
+
180
+ Leave `scope` off for normal skills — the default (`both`) keeps them loading at
181
+ runtime, so this is fully backward compatible. To make a dev-only skill visible
182
+ to your coding agent but hidden from the runtime agent, mark it `scope: dev` and
183
+ optionally mirror it under `.claude/skills/<name>/SKILL.md` (Claude Code reads
184
+ `.claude/skills/` independently of the runtime's `.agents/skills/`).
185
+
186
+ ## Tips
187
+
188
+ - **Keep descriptions under 40 words** — they load into context on every
189
+ conversation. State what the skill does AND when to trigger it.
190
+ - **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
191
+ `references/` files (progressive disclosure).
192
+ - **Use standard markdown headings** — no XML tags or custom formats.
193
+
194
+ ## Anti-Patterns
195
+
196
+ - **Inline LLM calls** — skills must not call LLMs directly. All AI work goes
197
+ through the agent chat (see **delegate-to-agent**).
198
+ - **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
199
+ - **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
200
+ `useActionQuery` so the UI updates (see **real-time-sync**).
201
+ - **Vague descriptions** — "Helps with development" won't trigger. Be specific
202
+ about _when_.
203
+ - **Pure documentation** — skills should guide action, not just explain concepts.
204
+
205
+ ## File Structure
206
+
207
+ ```
208
+ .agents/skills/my-skill/
209
+ ├── SKILL.md # Main skill (required)
210
+ └── references/ # Optional supporting context
211
+ └── detailed-guide.md
212
+ ```
213
+
214
+ ## Related Skills
215
+
216
+ - **adding-a-feature** — The four-area model every skill ultimately serves.
217
+ - **writing-agent-instructions** — How to write AGENTS.md and skills well for
218
+ apps and templates you ship to others.
219
+ - **capture-learnings** — When a learning graduates to reusable guidance, create
220
+ a skill; one-offs go to `AGENTS.md` or `memory/MEMORY.md`.
221
+ - **self-modifying-code** — The agent can create new skills (Tier 2 modification).
@@ -0,0 +1,263 @@
1
+ ---
2
+ name: delegate-to-agent
3
+ description: >-
4
+ How to delegate all AI work to the agent chat. Use when delegating AI work
5
+ from UI or scripts to the agent, when a user asks for agent behavior or
6
+ LLM-powered features, when tempted to add inline LLM calls, or when sending
7
+ messages to the agent from application code.
8
+ scope: dev
9
+ metadata:
10
+ internal: true
11
+ ---
12
+
13
+ # Delegate All AI to the Agent
14
+
15
+ ## Rule
16
+
17
+ The UI never calls an LLM directly. Product workflows are delegated to the
18
+ agent through the chat bridge so users can see, steer, and audit the work.
19
+ Server-side one-shot model calls are an explicit escape hatch for narrow text
20
+ transforms only; use `completeText()` from `@agent-native/core/server` when the
21
+ work intentionally does not need tools, chat history, or run state.
22
+
23
+ ## Why
24
+
25
+ The agent is the single AI interface. It has context about the full project, can read/write any file, and can run scripts. Inline LLM calls bypass this — they create a shadow AI that doesn't know what the agent knows and can't coordinate with it.
26
+
27
+ ## How
28
+
29
+ **From the UI (client):**
30
+
31
+ ```ts
32
+ import { sendToAgentChat } from "@agent-native/core/client";
33
+
34
+ sendToAgentChat({
35
+ message: "Generate a summary of this document",
36
+ context: documentContent, // optional hidden context (not shown in chat UI)
37
+ submit: true, // auto-submit to the agent
38
+ });
39
+ ```
40
+
41
+ **From the UI, in the background:**
42
+
43
+ ```ts
44
+ import { sendToAgentChat } from "@agent-native/core/client";
45
+
46
+ sendToAgentChat({
47
+ message: "Analyze this import and create any missing records",
48
+ context: `Import batch id: ${batchId}`,
49
+ submit: true,
50
+ newTab: true,
51
+ background: true,
52
+ openSidebar: false,
53
+ });
54
+ ```
55
+
56
+ This is still a full agent run: tools, actions, thread state, and run tracking
57
+ all remain active. It simply does not focus or open the sidebar.
58
+
59
+ **From scripts (Node):**
60
+
61
+ ```ts
62
+ import { agentChat } from "@agent-native/core";
63
+
64
+ agentChat.submit("Process the uploaded images and create thumbnails");
65
+ ```
66
+
67
+ **For narrow server-side text transforms:**
68
+
69
+ ```ts
70
+ import { completeText } from "@agent-native/core/server";
71
+
72
+ const result = await completeText({
73
+ systemPrompt: "Return exactly one sentiment label.",
74
+ input: messageBody,
75
+ maxOutputTokens: 12,
76
+ temperature: 0,
77
+ });
78
+ ```
79
+
80
+ Wrap user-facing uses in actions so the UI and agent share the same operation.
81
+ Do not call provider SDKs directly.
82
+
83
+ **From the UI, detecting when agent is done:**
84
+
85
+ ```ts
86
+ import { useAgentChatGenerating } from "@agent-native/core/client";
87
+
88
+ function MyComponent() {
89
+ const isGenerating = useAgentChatGenerating();
90
+ // Show loading state while agent is working
91
+ }
92
+ ```
93
+
94
+ ## `submit` vs Prefill
95
+
96
+ The `submit` option controls whether the message is sent automatically or placed in the chat input for user review:
97
+
98
+ | `submit` value | Behavior | Use when |
99
+ | -------------- | --------------------------------------- | ----------------------------------------------------------------------------------- |
100
+ | `true` | Auto-submits to the agent immediately | Routine operations the user has already approved |
101
+ | `false` | Prefills the chat input for user review | High-stakes operations (deleting data, modifying code, API calls with side effects) |
102
+ | omitted | Uses the project's default setting | General-purpose delegation |
103
+
104
+ ```ts
105
+ // Auto-submit: routine operation
106
+ sendToAgentChat({ message: "Update the project summary", submit: true });
107
+
108
+ // Prefill: let user review before sending
109
+ sendToAgentChat({
110
+ message: "Delete all projects older than 30 days",
111
+ submit: false,
112
+ });
113
+ ```
114
+
115
+ ## Capture user input first when generating from a prompt
116
+
117
+ Buttons that produce new content ("New Design", "Create Dashboard", "Make Deck", "Generate Form") need the user's prompt as input. **Never hardcode a generic message** — the result will be a generic generation the user didn't actually ask for.
118
+
119
+ **Bad** — auto-submits a placeholder message; the user never said what they wanted:
120
+
121
+ ```tsx
122
+ <Button
123
+ onClick={() =>
124
+ sendToAgentChat({ message: "make a design", submit: true })
125
+ }
126
+ >
127
+ New Design
128
+ </Button>
129
+ ```
130
+
131
+ **Good** — Popover anchored to the button captures the prompt, then submits it:
132
+
133
+ ```tsx
134
+ <Popover open={open} onOpenChange={setOpen}>
135
+ <PopoverTrigger asChild>
136
+ <Button>New Design</Button>
137
+ </PopoverTrigger>
138
+ <PopoverContent className="w-96">
139
+ <Textarea
140
+ autoFocus
141
+ value={prompt}
142
+ onChange={(e) => setPrompt(e.target.value)}
143
+ placeholder="What do you want to design?"
144
+ />
145
+ <Button
146
+ onClick={() => {
147
+ sendToAgentChat({ message: prompt, submit: true });
148
+ setOpen(false);
149
+ setPrompt("");
150
+ }}
151
+ >
152
+ Create
153
+ </Button>
154
+ </PopoverContent>
155
+ </Popover>
156
+ ```
157
+
158
+ **Always ask for input first when** the output depends on a prompt the user must provide — "design what?", "deck about what?", "dashboard for which metric?", "form for which use case?".
159
+
160
+ **Auto-submit without input is fine when intent is unambiguous:**
161
+
162
+ - "Try to fix" on a tool error — submits the error details with a clear fix instruction
163
+ - "Retry the last operation" after a transient failure
164
+ - Single-purpose buttons where there is nothing meaningful for the user to add
165
+
166
+ If you find yourself writing `submit: true` with a hardcoded creative verb (`"design a..."`, `"write a..."`, `"build a..."`), stop and add a Popover.
167
+
168
+ ## Delegating to a Sub-Agent (Agent Teams)
169
+
170
+ `sendToAgentChat()` delegates from app code _to_ the agent. The other axis of
171
+ delegation is the agent handing work _to a sub-agent_ through the Agent Teams
172
+ run-manager. The main chat stays the orchestrator: it spawns sub-agents, then
173
+ reads and integrates their results.
174
+
175
+ ### When to spawn a sub-agent vs do it yourself
176
+
177
+ - **Do it yourself** when the work is small, on the critical path, or tightly
178
+ coupled to what you're already doing. Sub-agent overhead and coordination risk
179
+ outweigh the benefit.
180
+ - **Spawn a sub-agent** for a self-contained unit of work that can run
181
+ independently — a disjoint investigation, an isolated implementation slice, a
182
+ long-running search — especially when it frees the main thread to keep
183
+ orchestrating.
184
+
185
+ ### Briefing contract
186
+
187
+ Every sub-agent brief must specify four things, or the sub-agent will guess:
188
+
189
+ - **Objective** — the one concrete outcome it owns, in a sentence.
190
+ - **Context** — the facts it needs (paths, prior findings, constraints) so it
191
+ doesn't re-derive them.
192
+ - **Output** — the exact shape you want back (a summary, a file edited, a list
193
+ of paths, a yes/no with rationale).
194
+ - **Boundaries** — what it must NOT touch (files, branches, side effects) and
195
+ when to stop and report rather than push forward.
196
+
197
+ ### Fan-out discipline
198
+
199
+ - **Default to a single sub-agent.** Most delegation is one focused task.
200
+ - **Spawn multiple only for genuinely independent units** that don't share state
201
+ or files. Never parallelize coupled work — if B needs A's output, run them in
202
+ sequence.
203
+ - **Cap parallel fan-out at ~3.** More sub-agents means more synthesis cost and
204
+ more chance of conflicting edits to the same area.
205
+
206
+ ### Synthesis discipline
207
+
208
+ - **Read every result** before concluding — don't act on the first one back.
209
+ - **Reconcile conflicts** between sub-agent findings explicitly; decide which is
210
+ right rather than averaging or ignoring.
211
+ - **Integrate into one answer.** The main thread produces the single coherent
212
+ result; it never just forwards raw sub-agent transcripts to the user.
213
+
214
+ Background sub-agents must use the core run-manager / Agent Teams infrastructure
215
+ rather than ad-hoc LLM calls.
216
+
217
+ ## Don't
218
+
219
+ - Don't `import Anthropic from "@anthropic-ai/sdk"` in client or server code
220
+ - Don't `import OpenAI from "openai"` in client or server code
221
+ - Don't make direct API calls to any LLM provider
222
+ - Don't use AI SDK functions like `generateText()`, `streamText()`, etc.
223
+ - Don't build "AI features" that bypass the agent chat
224
+ - Don't auto-submit a hardcoded prompt for generative actions — capture user input first (see above)
225
+ - Don't use `completeText()` for workflows that need tools, database writes,
226
+ auditability, user steering, or multi-step reasoning. Use the agent chat
227
+ instead, optionally with `background: true`.
228
+
229
+ ## Exception
230
+
231
+ Scripts may call external APIs (image generation, search, etc.) — but the AI
232
+ reasoning and orchestration still goes through the agent. A script is a tool
233
+ the agent uses, not a replacement for the agent.
234
+
235
+ `completeText()` is allowed for small server-side transforms such as
236
+ classification, extraction, rewriting a short string, or normalizing messy
237
+ provider text. It deliberately runs with `tools: []` and does not create chat
238
+ thread state.
239
+
240
+ ## When to Use A2A Instead
241
+
242
+ `sendToAgentChat()` delegates work to the **local** agent — the one running alongside your app. When the work should go to a **different** agent entirely (e.g., asking an analytics agent for data, or a calendar agent for availability), use the A2A (agent-to-agent) protocol instead.
243
+
244
+ ```ts
245
+ import { callAgent } from "@agent-native/core/a2a";
246
+
247
+ // Call a different agent — not the local agent chat
248
+ const stats = await callAgent(
249
+ "https://analytics.example.com",
250
+ "What were last week's signups?",
251
+ { apiKey: process.env.ANALYTICS_A2A_KEY },
252
+ );
253
+ ```
254
+
255
+ See the **a2a-protocol** skill for the full pattern.
256
+
257
+ ## Related Skills
258
+
259
+ - **a2a-protocol** — When the work goes to a different agent, not the local one
260
+ - **actions** — The agent invokes actions via `pnpm action <name>` to perform complex operations
261
+ - **self-modifying-code** — The agent operates through the chat bridge to make code changes
262
+ - **storing-data** — The agent writes results to the database after processing requests
263
+ - **real-time-sync** — The UI updates automatically when the agent writes data
@@ -0,0 +1,75 @@
1
+ # /efficient-fable
2
+
3
+ Use Claude Fable where it is worth paying for judgment.
4
+
5
+ `/efficient-fable` helps a Fable-class model orchestrate codebase-heavy work
6
+ without spending premium tokens on every scan, log, browser run, and bounded
7
+ edit. Fable keeps the hard calls: decomposition, architecture, product tradeoffs,
8
+ synthesis, risk, and final review. Lighter agents do the repeatable heavy
9
+ passes.
10
+
11
+ <picture>
12
+ <source media="(prefers-color-scheme: dark)" srcset="assets/fable-orchestrator-dark.png">
13
+ <source media="(prefers-color-scheme: light)" srcset="assets/fable-orchestrator.png">
14
+ <img alt="Fable orchestrator diagram" src="assets/fable-orchestrator.png">
15
+ </picture>
16
+
17
+ ## What It Does
18
+
19
+ - Splits large work into research, coding, and testing lanes.
20
+ - Tells Fable to choose the strategy, validation direction, and review bar.
21
+ - Encourages cheaper agents to scan repos, summarize docs, reduce logs, run
22
+ browser checks, and attempt bounded patches.
23
+ - Keeps evidence flowing back to Fable as files, commands, diffs, failures, and
24
+ uncertainties.
25
+ - Uses self-contained handoff packets so delegated agents can work without
26
+ hidden context from the orchestrator chat.
27
+ - Reminds Fable to verify important delegated claims before relying on them.
28
+
29
+ ## When To Use It
30
+
31
+ Use this when the task is too broad for one expensive model pass: unfamiliar
32
+ repos, long test output, multi-file changes, product/architecture ambiguity, or
33
+ validation work that can run in parallel.
34
+
35
+ Skip it for tiny fixes, highly coupled edits, or judgment-sensitive debugging
36
+ where delegating would create more coordination cost than it saves.
37
+
38
+ ## Testing Guidance
39
+
40
+ Fable should suggest the validation direction and name the scripts or browser
41
+ flows that matter. Lighter agents can run those checks, collect screenshots,
42
+ reduce logs, and report whether failures look real, flaky, or environmental.
43
+
44
+ The point is not to outsource responsibility. Fable still decides what signal is
45
+ trustworthy.
46
+
47
+ ## Delegation Quality
48
+
49
+ Good handoffs include the repo path, exact objective, in-scope and out-of-scope
50
+ areas, expected evidence, verification commands, and stop conditions. A lighter
51
+ agent should know when to stop and report instead of widening the task on its
52
+ own.
53
+
54
+ Fable should treat delegated reports as leads. For important decisions, it
55
+ reopens the cited files or logs and checks that the evidence really supports the
56
+ claim.
57
+
58
+ ## Diagram
59
+
60
+ Editable Excalidraw source:
61
+ [`assets/fable-orchestrator.excalidraw`](assets/fable-orchestrator.excalidraw)
62
+
63
+ Rendered PNGs:
64
+ [`assets/fable-orchestrator.png`](assets/fable-orchestrator.png)
65
+ and
66
+ [`assets/fable-orchestrator-dark.png`](assets/fable-orchestrator-dark.png)
67
+
68
+ ## Install
69
+
70
+ ```sh
71
+ npx @agent-native/skills@latest add --skill efficient-fable --update-instructions
72
+ ```
73
+
74
+ Use `--update-instructions` when you want the Fable delegation convention added
75
+ to `AGENTS.md` or `CLAUDE.md` automatically.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: efficient-fable
3
+ description: Use when running Claude Fable on codebase-heavy or token-heavy work and the user wants Fable to orchestrate research, coding, and testing while cheaper subagents do bounded heavy lifting.
4
+ ---
5
+
6
+ # Efficient Fable
7
+
8
+ Use Claude Fable as the orchestrator, architect, synthesizer, and final judge.
9
+ Use cheaper subagents for token-heavy research, coding, testing, and
10
+ summarization that do not require Fable's full judgment.
11
+
12
+ ## Where Fable Shines
13
+
14
+ Reserve Fable for:
15
+
16
+ - Decomposing ambiguous work into clean parallel slices.
17
+ - Architecture, product, and safety tradeoffs.
18
+ - Reading conflicting subagent reports and deciding what matters.
19
+ - Integrating partial implementations into one coherent plan.
20
+ - Final review, risk assessment, and user-facing synthesis.
21
+
22
+ ## Delegation Pattern
23
+
24
+ 1. Name the expensive-token risk: large repo search, long logs, broad docs, or
25
+ repetitive edits.
26
+ 2. Split independent work into subagents before reading everything yourself.
27
+ 3. Use cheaper models for research scans, inventory, search summaries, narrow
28
+ bug hunts, browser/testing passes, test output reduction, and bounded code
29
+ edits.
30
+ 4. Ask subagents for concise evidence: files, line references, commands run,
31
+ diffs, uncertainties, and stop conditions they hit.
32
+ 5. Spend Fable tokens on the decision layer: compare results, resolve conflicts,
33
+ choose the implementation path, and review the final patch.
34
+
35
+ Prefer parallel subagents when the slices do not depend on each other. Keep
36
+ blocking or highly coupled work local.
37
+
38
+ ## Handoff Packets
39
+
40
+ Write delegated prompts as if the subagent has no useful chat context. Include
41
+ only the context it needs:
42
+
43
+ - The repo path and exact objective.
44
+ - The files, packages, or surfaces in scope and anything explicitly out of
45
+ scope.
46
+ - The evidence format to return: files, line refs, commands, diffs, failures,
47
+ screenshots, and uncertainty.
48
+ - The verification commands or browser flows to run, plus what success should
49
+ look like when that is knowable.
50
+ - Stop conditions: if the code does not match the prompt, a command fails after
51
+ a reasonable retry, or the task needs out-of-scope files, stop and report
52
+ instead of improvising.
53
+
54
+ ## Vetting Delegated Work
55
+
56
+ Treat subagent reports as leads, not facts. Before using a high-impact finding,
57
+ opening a PR, or telling the user the work is done, Fable should reopen the
58
+ important cited files, confirm the relevant line refs or failures, and review
59
+ the final diff against the task. Let lighter agents gather signal; keep
60
+ truth-judgment with Fable.
61
+
62
+ ## Common Scenarios
63
+
64
+ Treat these as soft defaults, not rigid rules:
65
+
66
+ - Research: ask lighter agents to scan docs, prior art, APIs, and repo surfaces;
67
+ Fable decides what evidence changes the plan.
68
+ - Coding: give cheaper agents bounded edits or candidate patches; Fable owns
69
+ shared-file coordination, integration, and final review.
70
+ - Testing: have Fable suggest the validation direction and the scripts or
71
+ browser checks that matter. Let lighter agents run targeted tests, browser
72
+ flows, screenshots, and log reduction, then report exact commands, failures,
73
+ likely causes, and whether failures look flaky, environmental, or real.
74
+ - Debugging: use cheaper agents to cluster logs, reproduce issues, and try
75
+ small fixes; Fable decides which diagnosis is most trustworthy.
76
+
77
+ If a task is tiny or the validation itself needs delicate judgment, keep it
78
+ with Fable.
79
+
80
+ ## Diagram
81
+
82
+ Use `assets/fable-orchestrator.excalidraw` when a visual explanation helps.
83
+
84
+ ## Claims
85
+
86
+ For codebase-heavy work, it is reasonable to describe this as up to 3-5x more
87
+ cost-efficient and 2-4x faster when independent research, coding, or testing
88
+ slices can run in parallel. Treat those as workload-dependent estimates, not
89
+ guarantees.
90
+
91
+ Good launch copy:
92
+
93
+ > Make Claude Fable more efficient by using cheaper subagents for token-heavy
94
+ > research, coding, and testing, saving Fable for judgment, architecture,
95
+ > synthesis, and final review.