@agent-native/core 0.137.2 → 0.137.4

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 (176) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  3. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +53 -1
  4. package/corpus/templates/analytics/actions/gong-calls.ts +37 -17
  5. package/corpus/templates/analytics/app/lib/data-sources.ts +1 -1
  6. package/corpus/templates/analytics/server/lib/gong.ts +51 -2
  7. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  8. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +53 -1
  9. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  10. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +53 -1
  11. package/corpus/templates/brain/app/routes/settings.tsx +1 -1
  12. package/corpus/templates/brain/server/register-secrets.ts +1 -1
  13. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  14. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +53 -1
  15. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  16. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +53 -1
  17. package/corpus/templates/chat/AGENTS.md +11 -0
  18. package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
  19. package/corpus/templates/chat/app/root.tsx +1 -1
  20. package/corpus/templates/chat/app/routes/agent.tsx +29 -13
  21. package/corpus/templates/chat/vite.config.ts +42 -0
  22. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  23. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +53 -1
  24. package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -3
  25. package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -6
  26. package/corpus/templates/clips/app/components/library/library-layout.tsx +2 -6
  27. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +1 -3
  28. package/corpus/templates/clips/app/routes/bug-report.tsx +1 -8
  29. package/corpus/templates/clips/app/routes/import.tsx +1 -3
  30. package/corpus/templates/clips/changelog/2026-08-04-recording-buttons-are-now-text-only-for-a-cleaner-clips-inte.md +6 -0
  31. package/corpus/templates/clips/changelog/2026-08-04-save-settings-now-matches-the-other-clips-settings-buttons.md +6 -0
  32. package/corpus/templates/clips/chrome-extension/src/styles.css +1 -0
  33. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  34. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +53 -1
  35. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  36. package/corpus/templates/crm/app/routes/settings.tsx +2 -2
  37. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  38. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +53 -1
  39. package/corpus/templates/design/actions/import-figma-clipboard.ts +1 -1
  40. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  41. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +53 -1
  42. package/corpus/templates/dispatch/changelog/2026-08-04-dispatch-keeps-connected-chats-out-of-local-history-by-defau.md +6 -0
  43. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  44. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +53 -1
  45. package/corpus/templates/factory/README.md +1 -1
  46. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  47. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +53 -1
  48. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  49. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +53 -1
  50. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  51. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +53 -1
  52. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +0 -2
  53. package/corpus/templates/mail/app/pages/SettingsPage.tsx +1 -1
  54. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  55. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +53 -1
  56. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  57. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +53 -1
  58. package/corpus/templates/slides/actions/generate-image-api.ts +15 -4
  59. package/corpus/templates/slides/actions/import-google-slides-reference.ts +83 -0
  60. package/corpus/templates/slides/actions/import-pptx.ts +134 -117
  61. package/corpus/templates/slides/app/components/editor/GoogleSlidesReferenceImport.tsx +387 -0
  62. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +78 -48
  63. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +377 -187
  64. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -1
  65. package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +20 -1
  66. package/corpus/templates/slides/app/i18n/en-US.ts +15 -0
  67. package/corpus/templates/slides/app/lib/new-deck-reference-selection.ts +22 -0
  68. package/corpus/templates/slides/app/pages/DeckEditor.tsx +4 -1
  69. package/corpus/templates/slides/app/pages/Index.tsx +172 -85
  70. package/corpus/templates/slides/server/lib/assets-image-delegation.ts +4 -2
  71. package/corpus/templates/slides/shared/api.ts +14 -1
  72. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  73. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +53 -1
  74. package/dist/chat-threads/schema.d.ts +57 -0
  75. package/dist/chat-threads/schema.js +3 -0
  76. package/dist/chat-threads/store.d.ts +26 -0
  77. package/dist/chat-threads/store.js +84 -6
  78. package/dist/client/AgentPanel.js +11 -5
  79. package/dist/client/ConnectBuilderCard.js +1 -1
  80. package/dist/client/agent-page/AgentEmptyState.d.ts +2 -1
  81. package/dist/client/agent-page/AgentEmptyState.js +6 -2
  82. package/dist/client/agent-page/AgentJobsTab.d.ts +3 -1
  83. package/dist/client/agent-page/AgentJobsTab.js +55 -44
  84. package/dist/client/agent-page/AgentTabFrame.d.ts +2 -1
  85. package/dist/client/agent-page/AgentTabFrame.js +4 -2
  86. package/dist/client/agent-page/AgentTabsPage.js +12 -8
  87. package/dist/client/agent-page/AgentWorkspaceContent.d.ts +10 -0
  88. package/dist/client/agent-page/AgentWorkspaceContent.js +110 -0
  89. package/dist/client/agent-page/AutomationDetailsDialog.js +1 -1
  90. package/dist/client/chat/run-recovery.js +3 -3
  91. package/dist/client/error-format.js +1 -1
  92. package/dist/client/integrations/IntegrationsPanel.d.ts +1 -0
  93. package/dist/client/integrations/IntegrationsPanel.js +149 -5
  94. package/dist/client/onboarding/FirstRunOnboarding.js +130 -15
  95. package/dist/client/onboarding/index.d.ts +1 -1
  96. package/dist/client/onboarding/index.js +1 -1
  97. package/dist/client/onboarding/use-onboarding.js +12 -2
  98. package/dist/client/onboarding/use-preview-mode.d.ts +4 -0
  99. package/dist/client/onboarding/use-preview-mode.js +9 -0
  100. package/dist/client/resources/BuiltinCapabilityDetail.js +2 -2
  101. package/dist/client/resources/ResourceTree.d.ts +4 -1
  102. package/dist/client/resources/ResourceTree.js +13 -8
  103. package/dist/client/resources/ResourcesPanel.js +7 -3
  104. package/dist/client/resources/mcp-integration-catalog.js +4 -4
  105. package/dist/client/resources/use-mcp-servers.js +6 -6
  106. package/dist/client/settings/AgentsSection.js +15 -16
  107. package/dist/client/settings/AutomationsSection.js +1 -1
  108. package/dist/client/settings/DemoModeSection.js +1 -1
  109. package/dist/client/settings/SettingsPanel.d.ts +3 -1
  110. package/dist/client/settings/SettingsPanel.js +284 -88
  111. package/dist/client/settings/SettingsRow.js +1 -1
  112. package/dist/client/settings/SettingsSection.d.ts +6 -4
  113. package/dist/client/settings/SettingsSection.js +6 -6
  114. package/dist/client/settings/SettingsTabsPage.js +47 -25
  115. package/dist/client/settings/VoiceTranscriptionSection.d.ts +3 -1
  116. package/dist/client/settings/VoiceTranscriptionSection.js +20 -8
  117. package/dist/client/settings/agent-settings-search.d.ts +1 -1
  118. package/dist/client/settings/agent-settings-search.js +8 -8
  119. package/dist/client/transcription/BuilderTranscriptionCta.js +2 -2
  120. package/dist/client/use-chat-threads.d.ts +9 -0
  121. package/dist/client/use-chat-threads.js +22 -6
  122. package/dist/collab/routes.d.ts +1 -1
  123. package/dist/integrations/google-docs-poller.js +9 -1
  124. package/dist/integrations/webhook-handler.js +11 -1
  125. package/dist/jobs/scheduler.d.ts +4 -1
  126. package/dist/jobs/scheduler.js +34 -9
  127. package/dist/localization/default-messages.js +40 -40
  128. package/dist/mcp-client/oauth-routes.js +1 -1
  129. package/dist/notifications/routes.d.ts +1 -1
  130. package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
  131. package/dist/provider-api/actions/provider-api.d.ts +15 -15
  132. package/dist/resources/handlers.d.ts +1 -1
  133. package/dist/secrets/onboarding.js +1 -1
  134. package/dist/secrets/routes.d.ts +9 -9
  135. package/dist/server/agent-chat/browser-team-tools.d.ts +1 -0
  136. package/dist/server/agent-chat/browser-team-tools.js +1 -0
  137. package/dist/server/agent-chat-plugin.js +14 -1
  138. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  139. package/dist/server/agent-teams.d.ts +2 -0
  140. package/dist/server/agent-teams.js +2 -0
  141. package/dist/server/workspace-provider-oauth.js +1 -1
  142. package/dist/setup-connections/onboarding.js +2 -2
  143. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  144. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +53 -1
  145. package/dist/templates/chat/AGENTS.md +11 -0
  146. package/dist/templates/chat/app/components/layout/Layout.tsx +1 -1
  147. package/dist/templates/chat/app/root.tsx +1 -1
  148. package/dist/templates/chat/app/routes/agent.tsx +29 -13
  149. package/dist/templates/chat/vite.config.ts +42 -0
  150. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  151. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +53 -1
  152. package/dist/templates/default/AGENTS.md +11 -0
  153. package/dist/templates/default/vite.config.ts +42 -0
  154. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  155. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  156. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +53 -1
  157. package/dist/templates/workspace-core/AGENTS.md +11 -0
  158. package/dist/templates/workspace-root/AGENTS.md +14 -0
  159. package/dist/vite/client.js +56 -0
  160. package/package.json +2 -2
  161. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  162. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +53 -1
  163. package/src/templates/chat/AGENTS.md +11 -0
  164. package/src/templates/chat/app/components/layout/Layout.tsx +1 -1
  165. package/src/templates/chat/app/root.tsx +1 -1
  166. package/src/templates/chat/app/routes/agent.tsx +29 -13
  167. package/src/templates/chat/vite.config.ts +42 -0
  168. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  169. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +53 -1
  170. package/src/templates/default/AGENTS.md +11 -0
  171. package/src/templates/default/vite.config.ts +42 -0
  172. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  173. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  174. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +53 -1
  175. package/src/templates/workspace-core/AGENTS.md +11 -0
  176. package/src/templates/workspace-root/AGENTS.md +14 -0
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -30,7 +30,7 @@ export function meta() {
30
30
  }
31
31
 
32
32
  /**
33
- * `/settings/<section>` deep links. `connections` is the shared workspace tab
33
+ * `/settings/<section>` deep links. `integrations` is the shared workspace tab
34
34
  * and `connection` is the CRM one, so the segment is matched exactly rather
35
35
  * than by substring.
36
36
  */
@@ -45,7 +45,7 @@ const SETTINGS_SECTIONS: readonly string[] = [
45
45
 
46
46
  function sectionFromPath(pathname: string): string {
47
47
  const section = pathname.split("/settings/")[1]?.split("/")[0] ?? "";
48
- return SETTINGS_SECTIONS.includes(section) ? section : "general";
48
+ return SETTINGS_SECTIONS.includes(section) ? section : "integrations";
49
49
  }
50
50
 
51
51
  export default function SettingsRoute() {
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -34,7 +34,7 @@ const AMBIGUOUS_GUIDANCE =
34
34
  'Couldn\'t confidently match this paste to specific Figma nodes, so nothing was imported from the API. Paste a frame LINK instead (copy the frame in Figma, then "Copy link to selection") for an exact node import — or continue with the clipboard preview below.';
35
35
 
36
36
  const KEY_MISSING_GUIDANCE =
37
- "Connect your Figma access token (Settings > Connections > Figma access token) to import this paste as exact, editable Figma nodes.";
37
+ "Connect your Figma access token (Settings > Integrations > API keys) to import this paste as exact, editable Figma nodes.";
38
38
  const SELECTION_TRUNCATED_GUIDANCE =
39
39
  "Figma copied more than 100 selected nodes. Imported the first 100; split larger selections into smaller pastes so every layer is included.";
40
40
 
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-08-04
4
+ ---
5
+
6
+ Dispatch keeps connected chats out of local history by default and lets you show all sources on demand.
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -35,7 +35,7 @@ finds that existing organization and seeds its organization-owned automations.
35
35
  If Dispatch synced the vault into a different organization, set
36
36
  `AGENT_VAULT_ORG_ID` to that existing org id instead of creating a new org.
37
37
 
38
- Connect Slack in Dispatch or in Settings -> Connections. Factory resolves
38
+ Connect Slack in Dispatch or in Settings -> Integrations. Factory resolves
39
39
  Slack, GitHub, Sentry, and Builder credentials from the shared workspace vault
40
40
  and only uses matching deployment env vars as a last-resort fallback. All apps
41
41
  that read shared `app_secrets` rows must use the same
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI: