@agent-native/core 0.101.13 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +13 -0
- package/corpus/core/package.json +4 -2
- package/corpus/core/src/cli/create.ts +32 -10
- package/corpus/core/src/cli/templates-meta.ts +13 -0
- package/corpus/core/src/client/AgentPanel.tsx +61 -48
- package/corpus/core/src/client/chat/message-components.tsx +1 -0
- package/corpus/core/src/client/chat/tool-call-display.tsx +12 -2
- package/corpus/core/src/client/org/OrgSwitcher.tsx +2 -0
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +1 -1
- package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +1 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +1 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +1 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/clips/changelog/2026-07-15-public-clip-links-are-labeled-share-with-humans-for-clarity.md +6 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +59 -4
- package/corpus/templates/content/actions/prepare-builder-source-review.ts +9 -0
- package/corpus/templates/content/actions/preview-builder-source-review.ts +6 -4
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +4 -0
- package/corpus/templates/content/changelog/2026-07-15-selected-builder-reviews-now-load-only-the-chosen-rows-avoid.md +6 -0
- package/corpus/templates/content/shared/api.ts +1 -0
- package/corpus/templates/forms/actions/delete-form.ts +4 -0
- package/corpus/templates/forms/actions/patch-form-fields.ts +3 -0
- package/corpus/templates/forms/actions/restore-form.ts +3 -0
- package/corpus/templates/forms/actions/update-form.ts +3 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +2 -2
- package/corpus/templates/forms/changelog/2026-07-15-published-forms-now-reflect-field-updates-immediately-at-the.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-15-response-rows-now-keep-every-column-aligned-to-the-top-for-c.md +6 -0
- package/corpus/templates/forms/server/handlers/forms.ts +1 -0
- package/corpus/templates/forms/server/lib/public-form-ssr.ts +47 -4
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +189 -82
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -1
- package/corpus/templates/tasks/.agents/commands/visual-plan.md +9 -0
- package/corpus/templates/tasks/.agents/commands/visual-recap.md +8 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +492 -0
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/README.md +43 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +110 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/corpus/templates/tasks/.agents/skills/change-summary/SKILL.md +83 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +221 -0
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/corpus/templates/tasks/.agents/skills/efficient-fable/README.md +75 -0
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +95 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/README.md +53 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +73 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +112 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/README.md +41 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +114 -0
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/README.md +42 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +104 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/README.md +55 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +54 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/README.md +54 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +126 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/agents/openai.yaml +4 -0
- package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +280 -0
- package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/corpus/templates/tasks/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/README.md +61 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +83 -0
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/SKILL.md +547 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/agent-native-skill.json +12 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/canvas.md +121 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/document-quality.md +178 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/exemplar.md +62 -0
- package/corpus/templates/tasks/.agents/skills/visual-plan/references/wireframe.md +264 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/SKILL.md +634 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/agent-native-skill.json +12 -0
- package/corpus/templates/tasks/.agents/skills/visual-recap/references/wireframe.md +264 -0
- package/corpus/templates/tasks/.claude/commands/visual-plan.md +9 -0
- package/corpus/templates/tasks/.claude/commands/visual-recap.md +8 -0
- package/corpus/templates/tasks/.env.example +5 -0
- package/corpus/templates/tasks/.ignore +0 -0
- package/corpus/templates/tasks/.prettierrc +5 -0
- package/corpus/templates/tasks/AGENTS.md +158 -0
- package/corpus/templates/tasks/DEVELOPING.md +185 -0
- package/corpus/templates/tasks/README.md +16 -0
- package/corpus/templates/tasks/actions/bulk-delete-inbox-items.ts +24 -0
- package/corpus/templates/tasks/actions/bulk-delete-tasks.ts +21 -0
- package/corpus/templates/tasks/actions/bulk-mark-inbox-items-ready.ts +27 -0
- package/corpus/templates/tasks/actions/bulk-update-tasks.ts +35 -0
- package/corpus/templates/tasks/actions/create-custom-field.ts +22 -0
- package/corpus/templates/tasks/actions/create-inbox-item.ts +30 -0
- package/corpus/templates/tasks/actions/create-task.ts +33 -0
- package/corpus/templates/tasks/actions/delete-custom-field.ts +19 -0
- package/corpus/templates/tasks/actions/delete-inbox-item.ts +17 -0
- package/corpus/templates/tasks/actions/delete-task.ts +17 -0
- package/corpus/templates/tasks/actions/lib/boolean-query-param.ts +30 -0
- package/corpus/templates/tasks/actions/list-custom-fields.ts +18 -0
- package/corpus/templates/tasks/actions/list-inbox-items.ts +16 -0
- package/corpus/templates/tasks/actions/list-tasks.ts +52 -0
- package/corpus/templates/tasks/actions/list-visible-task-fields.ts +18 -0
- package/corpus/templates/tasks/actions/mark-inbox-item-ready.ts +31 -0
- package/corpus/templates/tasks/actions/navigate.ts +51 -0
- package/corpus/templates/tasks/actions/reorder-custom-fields.ts +27 -0
- package/corpus/templates/tasks/actions/reorder-inbox-items.ts +24 -0
- package/corpus/templates/tasks/actions/reorder-tasks.ts +29 -0
- package/corpus/templates/tasks/actions/run.ts +2 -0
- package/corpus/templates/tasks/actions/update-custom-field.ts +33 -0
- package/corpus/templates/tasks/actions/update-inbox-item.ts +24 -0
- package/corpus/templates/tasks/actions/update-task.ts +68 -0
- package/corpus/templates/tasks/actions/update-visible-task-fields.ts +27 -0
- package/corpus/templates/tasks/actions/view-screen-helpers.ts +68 -0
- package/corpus/templates/tasks/actions/view-screen.ts +207 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldCreateBar.tsx +121 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldListRow.tsx +116 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +225 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsListSkeleton.tsx +18 -0
- package/corpus/templates/tasks/app/components/custom-fields/FieldsPage.tsx +42 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/FieldEditorSidebar.tsx +69 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/FieldTitleSection.tsx +32 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/CurrencyConfigControl.tsx +49 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/FieldConfigControl.tsx +56 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/NumberConfigControl.tsx +52 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/PercentConfigControl.tsx +30 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/SelectConfigControl.tsx +135 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/select-colors.ts +23 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/config/utils.ts +52 -0
- package/corpus/templates/tasks/app/components/custom-fields/editor/types.ts +7 -0
- package/corpus/templates/tasks/app/components/dnd/SortableItem.tsx +72 -0
- package/corpus/templates/tasks/app/components/dnd/SortableList.tsx +136 -0
- package/corpus/templates/tasks/app/components/dnd/reorder-moving-items.ts +160 -0
- package/corpus/templates/tasks/app/components/dnd/sortable-drag-props.ts +60 -0
- package/corpus/templates/tasks/app/components/inbox/InboxList.tsx +222 -0
- package/corpus/templates/tasks/app/components/inbox/InboxListPage.tsx +39 -0
- package/corpus/templates/tasks/app/components/inbox/InboxListRow.tsx +122 -0
- package/corpus/templates/tasks/app/components/layout/Header.tsx +55 -0
- package/corpus/templates/tasks/app/components/layout/HeaderActions.tsx +84 -0
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +134 -0
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +211 -0
- package/corpus/templates/tasks/app/components/shared/AddListItemInput.tsx +57 -0
- package/corpus/templates/tasks/app/components/shared/AlertDialog.tsx +53 -0
- package/corpus/templates/tasks/app/components/shared/BulkDeleteDialog.tsx +76 -0
- package/corpus/templates/tasks/app/components/shared/ChipSelect.tsx +240 -0
- package/corpus/templates/tasks/app/components/shared/DeleteItemDialog.tsx +40 -0
- package/corpus/templates/tasks/app/components/shared/InlineEditable.tsx +166 -0
- package/corpus/templates/tasks/app/components/shared/ListEmptyState.tsx +13 -0
- package/corpus/templates/tasks/app/components/shared/ListErrorMessage.tsx +15 -0
- package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +75 -0
- package/corpus/templates/tasks/app/components/shared/PageHeader.tsx +25 -0
- package/corpus/templates/tasks/app/components/shared/RowActionsMenu.tsx +42 -0
- package/corpus/templates/tasks/app/components/shared/SidePanel.tsx +99 -0
- package/corpus/templates/tasks/app/components/shared/dnd/ListRowPreview.tsx +37 -0
- package/corpus/templates/tasks/app/components/shared/list/List.tsx +63 -0
- package/corpus/templates/tasks/app/components/shared/list/ListRow.tsx +159 -0
- package/corpus/templates/tasks/app/components/shared/list/ListRowDragHandle.tsx +52 -0
- package/corpus/templates/tasks/app/components/shared/list/ListSkeletonRows.tsx +11 -0
- package/corpus/templates/tasks/app/components/shared/list/SortableListItemShell.tsx +32 -0
- package/corpus/templates/tasks/app/components/shared/list/types.ts +1 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionBar.tsx +158 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionHeaderToggle.tsx +28 -0
- package/corpus/templates/tasks/app/components/shared/selection/ListSelectionToolbar.tsx +81 -0
- package/corpus/templates/tasks/app/components/shared/selection/get-list-row-selection-ui.ts +41 -0
- package/corpus/templates/tasks/app/components/shared/selection/use-list-selection.ts +196 -0
- package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +333 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListHeaderRow.tsx +46 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListPage.tsx +115 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.css +49 -0
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +307 -0
- package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +102 -0
- package/corpus/templates/tasks/app/components/tasks/fields/TaskTitleSection.tsx +27 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/DateValueControl.tsx +21 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/FieldValueControl.tsx +76 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/MultiSelectValueControl.tsx +52 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/NumberValueControl.tsx +56 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/RichTextValueControl.tsx +115 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/SingleSelectValueControl.tsx +61 -0
- package/corpus/templates/tasks/app/components/tasks/fields/controls/TextValueControl.tsx +20 -0
- package/corpus/templates/tasks/app/components/tasks/use-task-row-completion-animation.ts +181 -0
- package/corpus/templates/tasks/app/components/ui/accordion.tsx +56 -0
- package/corpus/templates/tasks/app/components/ui/alert-dialog.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/alert.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/aspect-ratio.tsx +5 -0
- package/corpus/templates/tasks/app/components/ui/avatar.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/badge.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/breadcrumb.tsx +115 -0
- package/corpus/templates/tasks/app/components/ui/button.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/calendar.tsx +70 -0
- package/corpus/templates/tasks/app/components/ui/card.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/carousel.tsx +260 -0
- package/corpus/templates/tasks/app/components/ui/chart.tsx +379 -0
- package/corpus/templates/tasks/app/components/ui/checkbox.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/collapsible.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/command.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/context-menu.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/dialog.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/drawer.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/form.tsx +177 -0
- package/corpus/templates/tasks/app/components/ui/hover-card.tsx +27 -0
- package/corpus/templates/tasks/app/components/ui/input-otp.tsx +69 -0
- package/corpus/templates/tasks/app/components/ui/input.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/label.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/menubar.tsx +254 -0
- package/corpus/templates/tasks/app/components/ui/navigation-menu.tsx +128 -0
- package/corpus/templates/tasks/app/components/ui/pagination.tsx +121 -0
- package/corpus/templates/tasks/app/components/ui/popover.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/progress.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/radio-group.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/resizable.tsx +43 -0
- package/corpus/templates/tasks/app/components/ui/scroll-area.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/select.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/separator.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sheet.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sidebar.tsx +782 -0
- package/corpus/templates/tasks/app/components/ui/skeleton.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/slider.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/sonner.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/spinner.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/switch.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/table.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/tabs.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/textarea.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toast.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toaster.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toggle-group.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/toggle.tsx +43 -0
- package/corpus/templates/tasks/app/components/ui/tooltip.tsx +1 -0
- package/corpus/templates/tasks/app/components/ui/use-toast.ts +3 -0
- package/corpus/templates/tasks/app/entry.client.tsx +19 -0
- package/corpus/templates/tasks/app/entry.server.tsx +10 -0
- package/corpus/templates/tasks/app/global.css +93 -0
- package/corpus/templates/tasks/app/hooks/cache.ts +31 -0
- package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +93 -0
- package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +196 -0
- package/corpus/templates/tasks/app/hooks/use-mobile.tsx +21 -0
- package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +40 -0
- package/corpus/templates/tasks/app/hooks/use-tasks.ts +276 -0
- package/corpus/templates/tasks/app/hooks/use-toast.ts +188 -0
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +140 -0
- package/corpus/templates/tasks/app/lib/app-config.ts +11 -0
- package/corpus/templates/tasks/app/lib/tab-id.ts +1 -0
- package/corpus/templates/tasks/app/lib/utils.ts +1 -0
- package/corpus/templates/tasks/app/root.tsx +130 -0
- package/corpus/templates/tasks/app/routes/_index.tsx +22 -0
- package/corpus/templates/tasks/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/templates/tasks/app/routes/extensions.$id.tsx +11 -0
- package/corpus/templates/tasks/app/routes/extensions._index.tsx +11 -0
- package/corpus/templates/tasks/app/routes/extensions.tsx +5 -0
- package/corpus/templates/tasks/app/routes/fields.tsx +16 -0
- package/corpus/templates/tasks/app/routes/inbox.tsx +16 -0
- package/corpus/templates/tasks/app/routes/tasks.tsx +17 -0
- package/corpus/templates/tasks/app/routes/team.tsx +17 -0
- package/corpus/templates/tasks/app/routes.ts +4 -0
- package/corpus/templates/tasks/app/vite-env.d.ts +6 -0
- package/corpus/templates/tasks/components.json +20 -0
- package/corpus/templates/tasks/data/sync-config.json +1 -0
- package/corpus/templates/tasks/docs/features/README.md +81 -0
- package/corpus/templates/tasks/docs/features/f1-tasks.mdx +67 -0
- package/corpus/templates/tasks/docs/features/f2-custom-fields.mdx +68 -0
- package/corpus/templates/tasks/docs/features/f3-projects.mdx +33 -0
- package/corpus/templates/tasks/docs/features/f4-inbox.mdx +55 -0
- package/corpus/templates/tasks/docs/features/f5-views.mdx +65 -0
- package/corpus/templates/tasks/docs/features/f6-search.mdx +43 -0
- package/corpus/templates/tasks/docs/features/f7-first-run.mdx +66 -0
- package/corpus/templates/tasks/docs/features/f8-chat.mdx +120 -0
- package/corpus/templates/tasks/e2e/global-setup.ts +42 -0
- package/corpus/templates/tasks/e2e/helpers/inbox.ts +71 -0
- package/corpus/templates/tasks/e2e/helpers/tasks.ts +99 -0
- package/corpus/templates/tasks/learnings.defaults.md +5 -0
- package/corpus/templates/tasks/netlify.toml +10 -0
- package/corpus/templates/tasks/package.json +104 -0
- package/corpus/templates/tasks/playwright.config.ts +34 -0
- package/corpus/templates/tasks/public/agent-native-icon-dark.svg +10 -0
- package/corpus/templates/tasks/public/agent-native-icon-light.svg +10 -0
- package/corpus/templates/tasks/public/agent-native-logo-dark.svg +21 -0
- package/corpus/templates/tasks/public/agent-native-logo-light.svg +21 -0
- package/corpus/templates/tasks/public/favicon.svg +1 -0
- package/corpus/templates/tasks/public/icon-180.svg +1 -0
- package/corpus/templates/tasks/public/icon-192.svg +1 -0
- package/corpus/templates/tasks/public/icon-512.svg +1 -0
- package/corpus/templates/tasks/public/manifest.json +21 -0
- package/corpus/templates/tasks/react-router.config.ts +7 -0
- package/corpus/templates/tasks/server/custom-fields/normalize.ts +163 -0
- package/corpus/templates/tasks/server/custom-fields/parse.ts +146 -0
- package/corpus/templates/tasks/server/custom-fields/schema.ts +147 -0
- package/corpus/templates/tasks/server/custom-fields/store.ts +425 -0
- package/corpus/templates/tasks/server/custom-fields/task-fields.ts +104 -0
- package/corpus/templates/tasks/server/custom-fields/types.ts +98 -0
- package/corpus/templates/tasks/server/custom-fields/validate.ts +210 -0
- package/corpus/templates/tasks/server/custom-fields/values/store.ts +386 -0
- package/corpus/templates/tasks/server/db/bulk-write.ts +30 -0
- package/corpus/templates/tasks/server/db/index.ts +5 -0
- package/corpus/templates/tasks/server/db/record-utils.ts +7 -0
- package/corpus/templates/tasks/server/db/schema.ts +67 -0
- package/corpus/templates/tasks/server/db/test-tasks-table.ts +76 -0
- package/corpus/templates/tasks/server/db/transaction.ts +6 -0
- package/corpus/templates/tasks/server/errors.ts +31 -0
- package/corpus/templates/tasks/server/inbox/store.ts +216 -0
- package/corpus/templates/tasks/server/middleware/auth.ts +15 -0
- package/corpus/templates/tasks/server/plugins/agent-chat.ts +46 -0
- package/corpus/templates/tasks/server/plugins/auth.ts +15 -0
- package/corpus/templates/tasks/server/plugins/db.ts +90 -0
- package/corpus/templates/tasks/server/routes/[...page].get.ts +5 -0
- package/corpus/templates/tasks/server/stored-items/store.ts +548 -0
- package/corpus/templates/tasks/server/tasks/store.ts +306 -0
- package/corpus/templates/tasks/server/user-config/store.ts +138 -0
- package/corpus/templates/tasks/shared/app-state-tabs.ts +15 -0
- package/corpus/templates/tasks/shared/boolean-param.ts +22 -0
- package/corpus/templates/tasks/shared/bulk-limits.ts +7 -0
- package/corpus/templates/tasks/shared/list-screen-snapshot.ts +90 -0
- package/corpus/templates/tasks/shared/navigation.ts +104 -0
- package/corpus/templates/tasks/shared/visible-task-fields.ts +2 -0
- package/corpus/templates/tasks/ssr-entry.ts +15 -0
- package/corpus/templates/tasks/tsconfig.json +24 -0
- package/corpus/templates/tasks/vite.config.ts +19 -0
- package/corpus/templates/tasks/vitest.config.ts +8 -0
- package/dist/cli/create.d.ts +5 -2
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +22 -11
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +13 -0
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +2 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +24 -13
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +1 -1
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +3 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +6 -5
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +2 -1
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +492 -0
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/dist/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
- package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +112 -0
- package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/dist/templates/chat/.agents/skills/security/SKILL.md +280 -0
- package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/chat/.env.example +5 -0
- package/dist/templates/chat/.ignore +0 -0
- package/dist/templates/chat/.oxfmtrc.json +8 -0
- package/dist/templates/chat/.react-router/types/+server-build.d.ts +18 -0
- package/dist/templates/chat/.react-router/types/app/+types/root.ts +68 -0
- package/dist/templates/chat/AGENTS.md +62 -0
- package/dist/templates/chat/CHANGELOG.md +10 -0
- package/dist/templates/chat/DEVELOPING.md +185 -0
- package/dist/templates/chat/README.md +32 -0
- package/dist/templates/chat/_gitignore +43 -0
- package/dist/templates/chat/actions/hello.ts +13 -0
- package/dist/templates/chat/actions/navigate.ts +41 -0
- package/dist/templates/chat/actions/run.ts +2 -0
- package/dist/templates/chat/actions/view-screen.ts +31 -0
- package/dist/templates/chat/app/components/layout/Header.tsx +59 -0
- package/dist/templates/chat/app/components/layout/Layout.tsx +184 -0
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +580 -0
- package/dist/templates/chat/app/components/ui/button.tsx +1 -0
- package/dist/templates/chat/app/components/ui/card.tsx +1 -0
- package/dist/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
- package/dist/templates/chat/app/components/ui/input.tsx +1 -0
- package/dist/templates/chat/app/components/ui/label.tsx +1 -0
- package/dist/templates/chat/app/components/ui/sheet.tsx +1 -0
- package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
- package/dist/templates/chat/app/components/ui/tooltip.tsx +1 -0
- package/dist/templates/chat/app/entry.client.tsx +19 -0
- package/dist/templates/chat/app/entry.server.tsx +10 -0
- package/dist/templates/chat/app/global.css +93 -0
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +111 -0
- package/dist/templates/chat/app/i18n/ar-SA.ts +68 -0
- package/dist/templates/chat/app/i18n/de-DE.ts +71 -0
- package/dist/templates/chat/app/i18n/en-US.ts +70 -0
- package/dist/templates/chat/app/i18n/es-ES.ts +71 -0
- package/dist/templates/chat/app/i18n/fr-FR.ts +71 -0
- package/dist/templates/chat/app/i18n/hi-IN.ts +69 -0
- package/dist/templates/chat/app/i18n/index.ts +34 -0
- package/dist/templates/chat/app/i18n/ja-JP.ts +70 -0
- package/dist/templates/chat/app/i18n/ko-KR.ts +70 -0
- package/dist/templates/chat/app/i18n/pt-BR.ts +71 -0
- package/dist/templates/chat/app/i18n/zh-CN.ts +67 -0
- package/dist/templates/chat/app/i18n/zh-TW.ts +67 -0
- package/dist/templates/chat/app/i18n-data.ts +556 -0
- package/dist/templates/chat/app/lib/agent-page.tsx +40 -0
- package/dist/templates/chat/app/lib/app-config.ts +11 -0
- package/dist/templates/chat/app/lib/tab-id.ts +1 -0
- package/dist/templates/chat/app/lib/utils.ts +1 -0
- package/dist/templates/chat/app/root.tsx +172 -0
- package/dist/templates/chat/app/routes/_index.tsx +91 -0
- package/dist/templates/chat/app/routes/agent.tsx +17 -0
- package/dist/templates/chat/app/routes/chat.$threadId.tsx +1 -0
- package/dist/templates/chat/app/routes/database.tsx +17 -0
- package/dist/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
- package/dist/templates/chat/app/routes/extensions.$id.tsx +11 -0
- package/dist/templates/chat/app/routes/extensions._index.tsx +11 -0
- package/dist/templates/chat/app/routes/extensions.tsx +5 -0
- package/dist/templates/chat/app/routes/observability.tsx +18 -0
- package/dist/templates/chat/app/routes/settings.tsx +88 -0
- package/dist/templates/chat/app/routes/team.tsx +11 -0
- package/dist/templates/chat/app/routes.ts +4 -0
- package/dist/templates/chat/app/vite-env.d.ts +6 -0
- package/dist/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/dist/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/dist/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/dist/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/dist/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/dist/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/dist/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/dist/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/dist/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/dist/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/dist/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/dist/templates/chat/components.json +20 -0
- package/dist/templates/chat/data/.gitkeep +0 -0
- package/dist/templates/chat/data/sync-config.json +1 -0
- package/dist/templates/chat/learnings.defaults.md +5 -0
- package/dist/templates/chat/netlify.toml +10 -0
- package/dist/templates/chat/package.json +92 -0
- package/dist/templates/chat/public/agent-native-icon-dark.svg +10 -0
- package/dist/templates/chat/public/agent-native-icon-light.svg +10 -0
- package/dist/templates/chat/public/agent-native-logo-dark.svg +21 -0
- package/dist/templates/chat/public/agent-native-logo-light.svg +21 -0
- package/dist/templates/chat/public/favicon.svg +1 -0
- package/dist/templates/chat/public/icon-180.svg +1 -0
- package/dist/templates/chat/public/icon-192.svg +1 -0
- package/dist/templates/chat/public/icon-512.svg +1 -0
- package/dist/templates/chat/public/manifest.json +21 -0
- package/dist/templates/chat/react-router.config.ts +7 -0
- package/dist/templates/chat/server/middleware/auth.ts +15 -0
- package/dist/templates/chat/server/plugins/agent-chat.ts +21 -0
- package/dist/templates/chat/server/plugins/auth.ts +17 -0
- package/dist/templates/chat/server/routes/[...page].get.ts +5 -0
- package/dist/templates/chat/ssr-entry.ts +15 -0
- package/dist/templates/chat/tsconfig.json +21 -0
- package/dist/templates/chat/vite.config.ts +19 -0
- package/package.json +2 -1
- package/src/templates/chat/.agents/skills/actions/SKILL.md +492 -0
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +76 -0
- package/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/src/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
- package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +112 -0
- package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/src/templates/chat/.agents/skills/security/SKILL.md +280 -0
- package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +106 -0
- package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +95 -0
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/chat/.env.example +5 -0
- package/src/templates/chat/.ignore +0 -0
- package/src/templates/chat/.oxfmtrc.json +8 -0
- package/src/templates/chat/.react-router/types/+server-build.d.ts +18 -0
- package/src/templates/chat/.react-router/types/app/+types/root.ts +68 -0
- package/src/templates/chat/AGENTS.md +62 -0
- package/src/templates/chat/CHANGELOG.md +10 -0
- package/src/templates/chat/DEVELOPING.md +185 -0
- package/src/templates/chat/README.md +32 -0
- package/src/templates/chat/_gitignore +43 -0
- package/src/templates/chat/actions/hello.spec.ts +23 -0
- package/src/templates/chat/actions/hello.ts +13 -0
- package/src/templates/chat/actions/navigate.spec.ts +68 -0
- package/src/templates/chat/actions/navigate.ts +41 -0
- package/src/templates/chat/actions/run.ts +2 -0
- package/src/templates/chat/actions/view-screen.spec.ts +40 -0
- package/src/templates/chat/actions/view-screen.ts +31 -0
- package/src/templates/chat/app/components/layout/Header.tsx +59 -0
- package/src/templates/chat/app/components/layout/Layout.tsx +184 -0
- package/src/templates/chat/app/components/layout/Sidebar.tsx +580 -0
- package/src/templates/chat/app/components/ui/button.tsx +1 -0
- package/src/templates/chat/app/components/ui/card.tsx +1 -0
- package/src/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
- package/src/templates/chat/app/components/ui/input.tsx +1 -0
- package/src/templates/chat/app/components/ui/label.tsx +1 -0
- package/src/templates/chat/app/components/ui/sheet.tsx +1 -0
- package/src/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
- package/src/templates/chat/app/components/ui/tooltip.tsx +1 -0
- package/src/templates/chat/app/entry.client.tsx +19 -0
- package/src/templates/chat/app/entry.server.tsx +10 -0
- package/src/templates/chat/app/global.css +93 -0
- package/src/templates/chat/app/hooks/use-navigation-state.ts +111 -0
- package/src/templates/chat/app/i18n/ar-SA.ts +68 -0
- package/src/templates/chat/app/i18n/de-DE.ts +71 -0
- package/src/templates/chat/app/i18n/en-US.ts +70 -0
- package/src/templates/chat/app/i18n/es-ES.ts +71 -0
- package/src/templates/chat/app/i18n/fr-FR.ts +71 -0
- package/src/templates/chat/app/i18n/hi-IN.ts +69 -0
- package/src/templates/chat/app/i18n/index.ts +34 -0
- package/src/templates/chat/app/i18n/ja-JP.ts +70 -0
- package/src/templates/chat/app/i18n/ko-KR.ts +70 -0
- package/src/templates/chat/app/i18n/pt-BR.ts +71 -0
- package/src/templates/chat/app/i18n/zh-CN.ts +67 -0
- package/src/templates/chat/app/i18n/zh-TW.ts +67 -0
- package/src/templates/chat/app/i18n-data.ts +556 -0
- package/src/templates/chat/app/lib/agent-page.spec.tsx +52 -0
- package/src/templates/chat/app/lib/agent-page.tsx +40 -0
- package/src/templates/chat/app/lib/app-config.ts +11 -0
- package/src/templates/chat/app/lib/tab-id.ts +1 -0
- package/src/templates/chat/app/lib/utils.ts +1 -0
- package/src/templates/chat/app/root.tsx +172 -0
- package/src/templates/chat/app/routes/_index.tsx +91 -0
- package/src/templates/chat/app/routes/agent.tsx +17 -0
- package/src/templates/chat/app/routes/chat.$threadId.tsx +1 -0
- package/src/templates/chat/app/routes/database.tsx +17 -0
- package/src/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
- package/src/templates/chat/app/routes/extensions.$id.tsx +11 -0
- package/src/templates/chat/app/routes/extensions._index.tsx +11 -0
- package/src/templates/chat/app/routes/extensions.tsx +5 -0
- package/src/templates/chat/app/routes/observability.tsx +18 -0
- package/src/templates/chat/app/routes/settings.tsx +88 -0
- package/src/templates/chat/app/routes/team.tsx +11 -0
- package/src/templates/chat/app/routes.ts +4 -0
- package/src/templates/chat/app/vite-env.d.ts +6 -0
- package/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/src/templates/chat/components.json +20 -0
- package/src/templates/chat/data/.gitkeep +0 -0
- package/src/templates/chat/data/sync-config.json +1 -0
- package/src/templates/chat/learnings.defaults.md +5 -0
- package/src/templates/chat/netlify.toml +10 -0
- package/src/templates/chat/package.json +92 -0
- package/src/templates/chat/public/agent-native-icon-dark.svg +10 -0
- package/src/templates/chat/public/agent-native-icon-light.svg +10 -0
- package/src/templates/chat/public/agent-native-logo-dark.svg +21 -0
- package/src/templates/chat/public/agent-native-logo-light.svg +21 -0
- package/src/templates/chat/public/favicon.svg +1 -0
- package/src/templates/chat/public/icon-180.svg +1 -0
- package/src/templates/chat/public/icon-192.svg +1 -0
- package/src/templates/chat/public/icon-512.svg +1 -0
- package/src/templates/chat/public/manifest.json +21 -0
- package/src/templates/chat/react-router.config.ts +7 -0
- package/src/templates/chat/server/middleware/auth.ts +15 -0
- package/src/templates/chat/server/plugins/agent-chat.ts +21 -0
- package/src/templates/chat/server/plugins/auth.ts +17 -0
- package/src/templates/chat/server/routes/[...page].get.ts +5 -0
- package/src/templates/chat/ssr-entry.ts +15 -0
- package/src/templates/chat/tsconfig.json +21 -0
- package/src/templates/chat/vite.config.ts +19 -0
|
@@ -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,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,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).
|