@agent-native/core 0.96.0 → 0.98.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/README.md +6 -0
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +71 -0
- package/corpus/core/docs/content/audit-log.mdx +2 -1
- package/corpus/core/docs/content/authentication.mdx +3 -3
- package/corpus/core/docs/content/automations.mdx +7 -7
- package/corpus/core/docs/content/creating-templates.mdx +1 -1
- package/corpus/core/docs/content/doctor.mdx +170 -0
- package/corpus/core/docs/content/external-agents.mdx +8 -7
- package/corpus/core/docs/content/internationalization.mdx +2 -1
- package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ar-SA/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ar-SA/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/ar-SA/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/ar-SA/security.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/de-DE/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +22 -0
- package/corpus/core/docs/content/locales/de-DE/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/de-DE/security.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/es-ES/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/es-ES/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +22 -0
- package/corpus/core/docs/content/locales/es-ES/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/es-ES/security.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/fr-FR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/fr-FR/sandbox-adapters.mdx +19 -8
- package/corpus/core/docs/content/locales/fr-FR/security.mdx +10 -0
- package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/hi-IN/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/hi-IN/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +20 -0
- package/corpus/core/docs/content/locales/hi-IN/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/hi-IN/security.mdx +10 -0
- package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ja-JP/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ja-JP/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/ja-JP/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/ja-JP/security.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/ko-KR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/ko-KR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +20 -0
- package/corpus/core/docs/content/locales/ko-KR/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/ko-KR/security.mdx +10 -0
- package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/pt-BR/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/pt-BR/getting-started.mdx +7 -1
- package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +21 -0
- package/corpus/core/docs/content/locales/pt-BR/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/pt-BR/security.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-CN/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/zh-CN/getting-started.mdx +6 -4
- package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/zh-CN/sandbox-adapters.mdx +17 -6
- package/corpus/core/docs/content/locales/zh-CN/security.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +2 -1
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +2 -2
- package/corpus/core/docs/content/locales/zh-TW/automations.mdx +7 -7
- package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +8 -7
- package/corpus/core/docs/content/locales/zh-TW/getting-started.mdx +6 -4
- package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +19 -0
- package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.mdx +18 -7
- package/corpus/core/docs/content/locales/zh-TW/security.mdx +10 -0
- package/corpus/core/docs/content/mcp-protocol.mdx +1 -1
- package/corpus/core/docs/content/package-lifecycle.mdx +51 -0
- package/corpus/core/docs/content/sandbox-adapters.mdx +16 -5
- package/corpus/core/docs/content/security.mdx +2 -0
- package/corpus/core/package.json +13 -2
- package/corpus/core/scripts/finalize-build.mjs +63 -3
- package/corpus/core/scripts/materialize-source-corpus.mjs +101 -15
- package/corpus/core/src/a2a/auth-policy.ts +33 -0
- package/corpus/core/src/action.ts +42 -0
- package/corpus/core/src/agent/durable-background.ts +15 -7
- package/corpus/core/src/agent/engine/builder-engine.ts +3 -0
- package/corpus/core/src/agent/engine/context-directives-transform.ts +69 -0
- package/corpus/core/src/agent/engine/continuation-dispatch-retry.ts +168 -0
- package/corpus/core/src/agent/engine/tool-call-journal-seed.ts +85 -0
- package/corpus/core/src/agent/production-agent.ts +129 -244
- package/corpus/core/src/agent/run-store.ts +13 -4
- package/corpus/core/src/audit/actions/export-audit-events.ts +162 -0
- package/corpus/core/src/audit/store.ts +8 -3
- package/corpus/core/src/audit/types.ts +3 -0
- package/corpus/core/src/cli/doctor.ts +402 -0
- package/corpus/core/src/cli/index.ts +56 -0
- package/corpus/core/src/cli/info.ts +3 -3
- package/corpus/core/src/cli/package-lifecycle.ts +821 -0
- package/corpus/core/src/cli/plan-local.ts +10 -2
- package/corpus/core/src/cli/skills-content/assets-skill.ts +83 -0
- package/corpus/core/src/cli/skills-content/canvas.ts +153 -0
- package/corpus/core/src/cli/skills-content/connection.ts +52 -0
- package/corpus/core/src/cli/skills-content/content-skill.ts +109 -0
- package/corpus/core/src/cli/skills-content/design-exploration-skill.ts +118 -0
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +228 -0
- package/corpus/core/src/cli/skills-content/document-quality.ts +196 -0
- package/corpus/core/src/cli/skills-content/exemplar.ts +69 -0
- package/corpus/core/src/cli/skills-content/help.ts +77 -0
- package/corpus/core/src/cli/skills-content/index.ts +22 -0
- package/corpus/core/src/cli/skills-content/local-files.ts +95 -0
- package/corpus/core/src/cli/skills-content/plan-setup-auth.ts +80 -0
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +470 -0
- package/corpus/core/src/cli/skills-content/visual-recap-skill.ts +547 -0
- package/corpus/core/src/cli/skills-content/visualize-repo-skill.ts +93 -0
- package/corpus/core/src/cli/skills-content/wireframe.ts +349 -0
- package/corpus/core/src/cli/skills.ts +27 -2733
- package/corpus/core/src/client/AgentPanel.tsx +6 -5
- package/corpus/core/src/client/CommandMenu.tsx +16 -5
- package/corpus/core/src/client/FeedbackButton.tsx +2 -2
- package/corpus/core/src/client/agent-chat-adapter.ts +9 -9
- package/corpus/core/src/client/app-providers.tsx +18 -5
- package/corpus/core/src/client/chat/tool-call-display.tsx +3 -3
- package/corpus/core/src/client/composer/PastedTextChip.tsx +1 -1
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +143 -45
- package/corpus/core/src/client/composer/TiptapComposer.tsx +1 -1
- package/corpus/core/src/client/composer/VoiceButton.tsx +21 -5
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +107 -10
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +5 -2
- package/corpus/core/src/client/extensions/ExtensionEditor.tsx +37 -4
- package/corpus/core/src/client/extensions/ExtensionQueryErrorState.tsx +47 -0
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +39 -10
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +44 -6
- package/corpus/core/src/client/extensions/ExtensionsListPage.tsx +12 -3
- package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +49 -11
- package/corpus/core/src/client/index.ts +0 -13
- package/corpus/core/src/client/progress/RunsTray.tsx +10 -3
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +7 -0
- package/corpus/core/src/client/settings/useBuilderStatus.ts +6 -0
- package/corpus/core/src/client/tool-cells/EditCell.tsx +19 -16
- package/corpus/core/src/client/tool-cells/FilesChangedSummary.tsx +26 -23
- package/corpus/core/src/client/tool-cells/WriteCell.tsx +19 -16
- package/corpus/core/src/client/visual-style-controls.tsx +1 -1
- package/corpus/core/src/deploy/build.ts +36 -14
- package/corpus/core/src/guards/db-tool-scoping.ts +129 -0
- package/corpus/core/src/guards/index.ts +23 -0
- package/corpus/core/src/guards/no-drizzle-push.ts +116 -0
- package/corpus/core/src/guards/no-env-credentials.ts +229 -0
- package/corpus/core/src/guards/no-env-mutation.ts +114 -0
- package/corpus/core/src/guards/no-localhost-fallback.ts +124 -0
- package/corpus/core/src/guards/no-unscoped-credentials.ts +227 -0
- package/corpus/core/src/guards/no-unscoped-queries.ts +834 -0
- package/corpus/core/src/guards/scan-utils.ts +105 -0
- package/corpus/core/src/guards/types.ts +30 -0
- package/corpus/core/src/integrations/google-docs-poller.ts +23 -2
- package/corpus/core/src/integrations/plugin.ts +10 -0
- package/corpus/core/src/integrations/webhook-handler.ts +27 -2
- package/corpus/core/src/jobs/scheduler.ts +28 -2
- package/corpus/core/src/localization/default-messages.ts +8 -1
- package/corpus/core/src/mcp/oauth-token.ts +6 -1
- package/corpus/core/src/observability/routes.ts +36 -0
- package/corpus/core/src/observability/sentiment.ts +261 -0
- package/corpus/core/src/observability/store.ts +23 -0
- package/corpus/core/src/observability/traces.ts +49 -63
- package/corpus/core/src/observability/tracking-identity.ts +55 -0
- package/corpus/core/src/observability/types.ts +13 -0
- package/corpus/core/src/org/accept-pending.ts +9 -1
- package/corpus/core/src/org/migrations.ts +41 -0
- package/corpus/core/src/package-lifecycle/index.ts +1 -0
- package/corpus/core/src/package-lifecycle/manifest.ts +120 -0
- package/corpus/core/src/provider-api/custom-registry.ts +56 -0
- package/corpus/core/src/provider-api/index.ts +2 -0
- package/corpus/core/src/secrets/storage.ts +114 -30
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +199 -0
- package/corpus/core/src/server/agent-chat/browser-team-tools.ts +510 -0
- package/corpus/core/src/server/agent-chat/context-tools.ts +595 -0
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +470 -0
- package/corpus/core/src/server/agent-chat/lazy-fs.ts +11 -0
- package/corpus/core/src/server/agent-chat/mcp-glue.ts +91 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +350 -0
- package/corpus/core/src/server/agent-chat/process-run-failure.ts +62 -0
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +688 -0
- package/corpus/core/src/server/agent-chat/recurring-jobs-runtime.ts +80 -0
- package/corpus/core/src/server/agent-chat/request-surface.ts +71 -0
- package/corpus/core/src/server/agent-chat/run-code-tools.ts +67 -0
- package/corpus/core/src/server/agent-chat/script-entries.ts +779 -0
- package/corpus/core/src/server/agent-chat/shared-thread.ts +301 -0
- package/corpus/core/src/server/agent-chat/skill-frontmatter.ts +41 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +403 -4179
- package/corpus/core/src/server/agent-teams.ts +26 -3
- package/corpus/core/src/server/auth.ts +55 -57
- package/corpus/core/src/server/core-routes-plugin.ts +30 -14
- package/corpus/core/src/server/credential-provider.ts +22 -25
- package/corpus/core/src/server/csrf.ts +24 -5
- package/corpus/core/src/server/edge.ts +1 -0
- package/corpus/core/src/server/framework-request-handler.ts +34 -0
- package/corpus/core/src/server/google-realtime-session.ts +1 -36
- package/corpus/core/src/server/onboarding-html.ts +1 -16
- package/corpus/core/src/server/poll.ts +24 -2
- package/corpus/core/src/server/realtime-voice.ts +49 -5
- package/corpus/core/src/server/request-origin.ts +67 -0
- package/corpus/core/src/server/ssr-handler.ts +55 -2
- package/corpus/core/src/server/transcribe-voice.ts +1 -50
- package/corpus/core/src/sharing/access.ts +155 -11
- package/corpus/core/src/sharing/registry.ts +7 -0
- package/corpus/core/src/styles/agent-native.css +15 -14
- package/corpus/core/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/corpus/core/src/templates/default/package.json +2 -2
- package/corpus/core/src/templates/headless/package.json +0 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/corpus/core/src/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/corpus/core/src/templates/workspace-core/package.json +0 -1
- package/corpus/core/src/templates/workspace-core/src/server/index.ts +4 -2
- package/corpus/core/src/templates/workspace-root/package.json +0 -1
- package/corpus/core/src/testing.ts +26 -0
- package/corpus/core/src/triggers/actions.ts +11 -3
- package/corpus/core/src/triggers/dispatcher.ts +23 -2
- package/corpus/core/src/triggers/types.ts +7 -1
- package/corpus/core/src/vite/client.ts +126 -2
- package/corpus/core/tsconfig.cli.json +1 -1
- package/corpus/core/tsconfig.json +5 -1
- package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +2 -2
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/analytics/AGENTS.md +19 -6
- package/corpus/templates/analytics/actions/compose-dashboard.ts +65 -37
- package/corpus/templates/analytics/actions/install-dashboard-template.ts +79 -43
- package/corpus/templates/analytics/actions/list-explorer-dashboards.ts +3 -3
- package/corpus/templates/analytics/actions/list-sql-dashboards.ts +8 -3
- package/corpus/templates/analytics/actions/mutate-dashboard.ts +73 -24
- package/corpus/templates/analytics/actions/rename-analysis.ts +8 -2
- package/corpus/templates/analytics/actions/rename-dashboard.ts +8 -7
- package/corpus/templates/analytics/actions/reorder-dashboard-panels.ts +16 -13
- package/corpus/templates/analytics/actions/update-dashboard.ts +53 -42
- package/corpus/templates/analytics/actions/view-screen.ts +4 -23
- package/corpus/templates/analytics/app/components/ResourceLoadError.tsx +42 -0
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +85 -70
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +107 -89
- package/corpus/templates/analytics/app/components/layout/SidebarLoadError.tsx +24 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +15 -5
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/analytics/app/i18n-data.ts +40 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +6 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +36 -20
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +34 -20
- package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +42 -41
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +43 -36
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +11 -2
- package/corpus/templates/analytics/app/root.tsx +13 -1
- package/corpus/templates/analytics/app/routes/_index.tsx +14 -2
- package/corpus/templates/analytics/changelog/2026-07-03-agent-llm-observability-dashboard.md +1 -1
- package/corpus/templates/analytics/changelog/2026-07-10-dashboard-edits-from-the-agent-and-the-ui-at-the-same-time-n.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-10-timed-out-bigquery-jobs-are-now-cancelled-so-they-stop-consu.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-agent-feedback-sentiment-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-chats-now-start-faster-by-loading-metric-definitio.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-command-and-sql-previews-now-respond-without-lag.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-command-search-now-reports-loading-failures-and-lets-you-ret.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-dashboard-navigation-now-loads-faster-and-reports-request-fa.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-inferred-message-sentiment-dashboard.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-microphone-settings-from-realtime-voice-mode-now-open-the-vo.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-more-dashboard-edit-paths-are-now-safe-against-simultaneous-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-renaming-a-dashboard-is-now-safe-against-simultaneous-agent-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-renaming-an-analysis-is-now-safe-against-simultaneous-edits.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-workspace-mounted-analytics-now-opens-ask-reliably-and-route.md +6 -0
- package/corpus/templates/analytics/docs/schemas/first-party-analytics.md +37 -3
- package/corpus/templates/analytics/package.json +1 -2
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +339 -1
- package/corpus/templates/analytics/server/lib/bigquery.ts +3 -2
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -24
- package/corpus/templates/analytics/server/lib/dashboard-seeds.ts +0 -5
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +443 -31
- package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +106 -34
- package/corpus/templates/analytics/server/lib/demo-dashboards.ts +4 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -39
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +30 -4
- package/corpus/templates/assets/app/routes/library.tsx +49 -5
- package/corpus/templates/assets/changelog/2026-07-11-library-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/assets/package.json +1 -2
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/brain/package.json +1 -2
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/calendar/.env.example +5 -0
- package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +2 -2
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +37 -1
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +20 -3
- package/corpus/templates/calendar/changelog/2026-07-11-booking-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-11-event-cards-give-subtle-press-feedback-and-smoother-hover.md +6 -0
- package/corpus/templates/calendar/package.json +1 -2
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/chat/package.json +1 -2
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/clips/actions/decline-invite.ts +8 -0
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +209 -187
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +2 -2
- package/corpus/templates/clips/app/components/player/reactions-tray.tsx +17 -5
- package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -3
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +119 -95
- package/corpus/templates/clips/app/global.css +45 -0
- package/corpus/templates/clips/app/root.tsx +4 -0
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +23 -2
- package/corpus/templates/clips/app/routes/_app.trash.tsx +24 -2
- package/corpus/templates/clips/changelog/2026-07-10-atomic-view-tracking.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-controls-and-folders-now-move-more-smoothly.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-declining-an-invitation-now-requires-being-its-recipient.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-recording-overlays-are-lighter-weight-and-no-longer-cause-pa.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-workspace-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/clips/chrome-extension/package.json +3 -2
- package/corpus/templates/clips/chrome-extension/src/overlay.css +34 -5
- package/corpus/templates/clips/chrome-extension/src/styles.css +2 -2
- package/corpus/templates/clips/desktop/package.json +6 -4
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +26 -13
- package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +4 -1
- package/corpus/templates/clips/desktop/src/styles.css +71 -26
- package/corpus/templates/clips/package.json +1 -2
- package/corpus/templates/clips/server/db/schema.ts +29 -17
- package/corpus/templates/clips/server/plugins/db.ts +8 -0
- package/corpus/templates/clips/server/routes/api/view-event.post.ts +260 -105
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/notion-integration/SKILL.md +16 -0
- package/corpus/templates/content/AGENTS.md +72 -62
- package/corpus/templates/content/actions/_content-database-source-adapters.ts +84 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +206 -96
- package/corpus/templates/content/actions/_notion-database-source-adapter.ts +216 -0
- package/corpus/templates/content/actions/_position-utils.ts +76 -0
- package/corpus/templates/content/actions/_property-utils.ts +31 -20
- package/corpus/templates/content/actions/add-database-item.ts +52 -39
- package/corpus/templates/content/actions/attach-content-database-source.ts +95 -11
- package/corpus/templates/content/actions/change-content-database-source-role.ts +24 -1
- package/corpus/templates/content/actions/configure-document-property.ts +36 -27
- package/corpus/templates/content/actions/create-content-database.ts +40 -30
- package/corpus/templates/content/actions/create-document.ts +39 -32
- package/corpus/templates/content/actions/duplicate-document-property.ts +37 -28
- package/corpus/templates/content/actions/list-notion-database-sources.ts +80 -0
- package/corpus/templates/content/actions/move-document.ts +93 -61
- package/corpus/templates/content/actions/refresh-content-database-source.ts +42 -3
- package/corpus/templates/content/actions/share-local-file-document.ts +36 -27
- package/corpus/templates/content/actions/suggest-source-join-key.ts +39 -16
- package/corpus/templates/content/app/components/QueryErrorState.tsx +39 -0
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +323 -1467
- package/corpus/templates/content/app/components/editor/database/GalleryView.tsx +368 -0
- package/corpus/templates/content/app/components/editor/database/ListView.tsx +353 -0
- package/corpus/templates/content/app/components/editor/database/TimelineView.tsx +580 -0
- package/corpus/templates/content/app/components/editor/database/settings.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +11 -2
- package/corpus/templates/content/app/global.css +19 -19
- package/corpus/templates/content/app/hooks/use-content-database.ts +18 -1
- package/corpus/templates/content/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/content/app/i18n-data.ts +40 -0
- package/corpus/templates/content/app/root.tsx +2 -2
- package/corpus/templates/content/app/routes/_app._index.tsx +11 -1
- package/corpus/templates/content/changelog/2026-07-10-failed-row-creation-and-source-attach-now-show-an-error-inst.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-items-added-at-the-same-time-no-longer-end-up-with-identical.md +6 -0
- package/corpus/templates/content/changelog/2026-07-10-notion-databases-can-add-read-only-details-to-content-tables.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-document-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-editor-toggle-feedback-now-feels-more-responsive.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-moving-documents-at-the-same-time-no-longer-scrambles-their-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-public-document-chats-now-start-faster-while-keeping-full-do.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-reopening-a-comment-now-uses-consistent-permissions-everywhe.md +6 -0
- package/corpus/templates/content/changelog/2026-07-11-sidebar-resizing-now-tracks-your-cursor-instantly-instead-of.md +6 -0
- package/corpus/templates/content/package.json +1 -2
- package/corpus/templates/content/parity/matrix.md +25 -25
- package/corpus/templates/content/parity/matrix.ts +1 -0
- package/corpus/templates/content/server/lib/public-documents.ts +47 -10
- package/corpus/templates/content/server/routes/api/comments/[id].patch.ts +24 -24
- package/corpus/templates/content/server/routes/api/documents/[id]/move.patch.ts +43 -26
- package/corpus/templates/content/shared/api.ts +16 -1
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +8 -4
- package/corpus/templates/design/AGENTS.md +12 -2
- package/corpus/templates/design/DEVELOPING.md +10 -6
- package/corpus/templates/design/actions/apply-visual-edit.ts +191 -6
- package/corpus/templates/design/actions/duplicate-design.ts +31 -25
- package/corpus/templates/design/app/components/QueryErrorState.tsx +24 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +1 -1
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +5 -2
- package/corpus/templates/design/app/components/design/EditPanel.tsx +326 -319
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +198 -193
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +11 -4
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +1 -1
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignSystems.tsx +7 -1
- package/corpus/templates/design/app/pages/Index.tsx +14 -2
- package/corpus/templates/design/app/pages/Present.tsx +16 -3
- package/corpus/templates/design/app/pages/Templates.tsx +10 -4
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +484 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +378 -0
- package/corpus/templates/design/app/pages/design-editor/design-data-geometry-utils.ts +138 -0
- package/corpus/templates/design/app/pages/design-editor/dom-utils.ts +15 -0
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +180 -0
- package/corpus/templates/design/app/pages/design-editor/html-layer-positioning.ts +226 -0
- package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +5 -1
- package/corpus/templates/design/app/pages/design-editor/png-export-render.ts +348 -0
- package/corpus/templates/design/app/pages/design-editor/screen-command-utils.ts +160 -0
- package/corpus/templates/design/app/pages/design-editor/text-edit-utils.ts +238 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +23 -1
- package/corpus/templates/design/app/pages/design-editor/types.ts +25 -0
- package/corpus/templates/design/app/root.tsx +10 -1
- package/corpus/templates/design/changelog/2026-07-10-duplicating-a-design-can-no-longer-produce-a-copy-with-missi.md +6 -0
- package/corpus/templates/design/changelog/2026-07-10-local-visual-edits-can-now-save-safe-leaf-text-class-and.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-canvas-context-menus-now-open-without-motion-jitter.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-design-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/design/changelog/2026-07-11-inspector-tooltips-appear-instantly-as-you-sweep-across-icon.md +6 -0
- package/corpus/templates/design/package.json +1 -1
- package/corpus/templates/design/shared/local-jsx-visual-edit.ts +388 -0
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +10 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +123 -0
- package/corpus/templates/dispatch/app/routes/integrations.tsx +163 -144
- package/corpus/templates/dispatch/changelog/2026-07-11-dispatch-mcp-connections-now-start-with-safer-app-access-and.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-11-overview-and-chat-now-share-a-cleaner-more-stable-flow.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-11-query-errors-now-show-a-retry-option.md +6 -0
- package/corpus/templates/dispatch/package.json +1 -2
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/forms/actions/patch-form-fields.ts +82 -44
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/forms/app/root.tsx +34 -8
- package/corpus/templates/forms/changelog/2026-07-10-simultaneous-edits-to-different-form-fields-no-longer-overwr.md +6 -0
- package/corpus/templates/forms/package.json +1 -2
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +25 -5
- package/corpus/templates/macros/app/components/QueryErrorState.tsx +31 -0
- package/corpus/templates/macros/app/components/WeightTracker.tsx +5 -1
- package/corpus/templates/macros/app/components/ui/button.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/progress.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/tabs.tsx +1 -1
- package/corpus/templates/macros/app/i18n/ar-SA.ts +2 -0
- package/corpus/templates/macros/app/i18n/de-DE.ts +2 -0
- package/corpus/templates/macros/app/i18n/en-US.ts +2 -0
- package/corpus/templates/macros/app/i18n/es-ES.ts +2 -0
- package/corpus/templates/macros/app/i18n/fr-FR.ts +2 -0
- package/corpus/templates/macros/app/i18n/hi-IN.ts +2 -0
- package/corpus/templates/macros/app/i18n/ja-JP.ts +2 -0
- package/corpus/templates/macros/app/i18n/ko-KR.ts +2 -0
- package/corpus/templates/macros/app/i18n/pt-BR.ts +2 -0
- package/corpus/templates/macros/app/i18n/zh-CN.ts +2 -0
- package/corpus/templates/macros/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/macros/app/routes/_index.tsx +22 -12
- package/corpus/templates/macros/app/routes/analytics.tsx +31 -10
- package/corpus/templates/macros/changelog/2026-07-11-daily-tracking-now-loads-and-updates-more-quickly.md +6 -0
- package/corpus/templates/macros/changelog/2026-07-11-data-load-failures-now-show-a-clear-error-with-a-retry-actio.md +6 -0
- package/corpus/templates/macros/package.json +1 -2
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/mail/.env.example +16 -11
- package/corpus/templates/mail/actions/list-emails.ts +39 -35
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +58 -6
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +35 -2
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +3 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +113 -104
- package/corpus/templates/mail/app/root.tsx +8 -10
- package/corpus/templates/mail/changelog/2026-07-10-fixed-calendar-rsvp-buttons-in-emails-firing-duplicate-respo.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-compose-and-navigation-motion-now-feel-faster-and-smoother.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-swipe-to-archive-or-snooze-now-responds-to-quick-flicks-not-.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-11-the-assistant-now-sees-the-same-inbox-you-do-snoozed-mail-st.md +6 -0
- package/corpus/templates/mail/package.json +1 -2
- package/corpus/templates/mail/server/handlers/emails.ts +25 -69
- package/corpus/templates/mail/server/lib/list-inbox-emails.ts +169 -0
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/plan/.env.example +4 -0
- package/corpus/templates/plan/actions/create-plan-design.ts +89 -81
- package/corpus/templates/plan/actions/create-prototype-plan.ts +72 -59
- package/corpus/templates/plan/actions/create-ui-plan.ts +70 -55
- package/corpus/templates/plan/actions/create-visual-plan.ts +65 -51
- package/corpus/templates/plan/actions/restore-plan-version.ts +126 -96
- package/corpus/templates/plan/actions/update-local-plan-folder.ts +43 -30
- package/corpus/templates/plan/actions/update-visual-plan.ts +81 -64
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +17 -0
- package/corpus/templates/plan/app/components/ui/tabs.tsx +1 -1
- package/corpus/templates/plan/app/i18n/ar-SA.ts +10 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +10 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +10 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +10 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +10 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +10 -0
- package/corpus/templates/plan/app/i18n/ja-JP.ts +10 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +10 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +10 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +10 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +10 -0
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +80 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +152 -4
- package/corpus/templates/plan/app/root.tsx +11 -0
- package/corpus/templates/plan/changelog/2026-07-10-restoring-a-plan-version-can-no-longer-leave-a-plan-half-res.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-local-plans-now-explain-and-recover-from-browser-permission-.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-plan-edits-now-save-atomically-and-can-no-longer-partially-a.md +6 -0
- package/corpus/templates/plan/changelog/2026-07-11-plan-lists-now-show-a-clear-error-with-a-retry-action-when-t.md +6 -0
- package/corpus/templates/plan/package.json +1 -2
- package/corpus/templates/plan/server/plans.ts +9 -2
- package/corpus/templates/plan/shared/plan-content.ts +546 -260
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +1 -1
- package/corpus/templates/slides/actions/delete-slide-comment.ts +49 -0
- package/corpus/templates/slides/actions/list-decks.ts +28 -0
- package/corpus/templates/slides/actions/update-slide-comment.ts +93 -0
- package/corpus/templates/slides/actions/view-screen.ts +14 -6
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +33 -10
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +41 -26
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +4 -8
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +3 -5
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +5 -9
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +5 -12
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -2
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +3 -6
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -6
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +2 -5
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +4 -2
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +4 -3
- package/corpus/templates/slides/app/context/DeckContext.tsx +56 -4
- package/corpus/templates/slides/app/i18n/ar-SA.ts +6 -0
- package/corpus/templates/slides/app/i18n/de-DE.ts +6 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +6 -0
- package/corpus/templates/slides/app/i18n/es-ES.ts +6 -0
- package/corpus/templates/slides/app/i18n/fr-FR.ts +6 -0
- package/corpus/templates/slides/app/i18n/hi-IN.ts +6 -0
- package/corpus/templates/slides/app/i18n/ja-JP.ts +6 -0
- package/corpus/templates/slides/app/i18n/ko-KR.ts +6 -0
- package/corpus/templates/slides/app/i18n/pt-BR.ts +6 -0
- package/corpus/templates/slides/app/i18n/zh-CN.ts +5 -0
- package/corpus/templates/slides/app/i18n/zh-TW.ts +5 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +11 -30
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +23 -2
- package/corpus/templates/slides/app/pages/Index.tsx +31 -4
- package/corpus/templates/slides/app/root.tsx +0 -5
- package/corpus/templates/slides/changelog/2026-07-10-deck-lists-load-much-faster-and-no-longer-re-download-slide-.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-comment-load-failures-now-show-a-retry-action-instead-of-say.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-comment-pins-now-clear-with-a-faster-smoother-confirmation.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-deck-and-design-system-load-failures-now-show-a-retry-action.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-editor-toggles-and-toolbar-menus-now-animate-smoothly.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-the-assistant-can-now-resolve-reopen-and-delete-slide-commen.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-11-viewing-slides-no-longer-loads-every-deck-s-full-contents-in.md +6 -0
- package/corpus/templates/slides/package.json +1 -2
- package/corpus/templates/slides/server/routes/api/comments/[id].delete.ts +29 -48
- package/corpus/templates/slides/server/routes/api/comments/[id].patch.ts +29 -65
- package/dist/a2a/auth-policy.d.ts +19 -0
- package/dist/a2a/auth-policy.d.ts.map +1 -1
- package/dist/a2a/auth-policy.js +32 -0
- package/dist/a2a/auth-policy.js.map +1 -1
- package/dist/action.d.ts +23 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +13 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/durable-background.d.ts +8 -5
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +15 -8
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +3 -0
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/context-directives-transform.d.ts +25 -0
- package/dist/agent/engine/context-directives-transform.d.ts.map +1 -0
- package/dist/agent/engine/context-directives-transform.js +53 -0
- package/dist/agent/engine/context-directives-transform.js.map +1 -0
- package/dist/agent/engine/continuation-dispatch-retry.d.ts +40 -0
- package/dist/agent/engine/continuation-dispatch-retry.d.ts.map +1 -0
- package/dist/agent/engine/continuation-dispatch-retry.js +109 -0
- package/dist/agent/engine/continuation-dispatch-retry.js.map +1 -0
- package/dist/agent/engine/tool-call-journal-seed.d.ts +46 -0
- package/dist/agent/engine/tool-call-journal-seed.d.ts.map +1 -0
- package/dist/agent/engine/tool-call-journal-seed.js +60 -0
- package/dist/agent/engine/tool-call-journal-seed.js.map +1 -0
- package/dist/agent/production-agent.d.ts +7 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +102 -222
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +9 -4
- package/dist/agent/run-store.js.map +1 -1
- package/dist/audit/actions/export-audit-events.d.ts +27 -0
- package/dist/audit/actions/export-audit-events.d.ts.map +1 -0
- package/dist/audit/actions/export-audit-events.js +144 -0
- package/dist/audit/actions/export-audit-events.js.map +1 -0
- package/dist/audit/store.d.ts +1 -0
- package/dist/audit/store.d.ts.map +1 -1
- package/dist/audit/store.js +8 -3
- package/dist/audit/store.js.map +1 -1
- package/dist/audit/types.d.ts +3 -0
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js.map +1 -1
- package/dist/cli/doctor.d.ts +83 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +281 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/info.js +3 -3
- package/dist/cli/info.js.map +1 -1
- package/dist/cli/package-lifecycle.d.ts +50 -0
- package/dist/cli/package-lifecycle.d.ts.map +1 -0
- package/dist/cli/package-lifecycle.js +560 -0
- package/dist/cli/package-lifecycle.js.map +1 -0
- package/dist/cli/plan-local.d.ts.map +1 -1
- package/dist/cli/plan-local.js +8 -2
- package/dist/cli/plan-local.js.map +1 -1
- package/dist/cli/skills-content/assets-skill.d.ts +2 -0
- package/dist/cli/skills-content/assets-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/assets-skill.js +84 -0
- package/dist/cli/skills-content/assets-skill.js.map +1 -0
- package/dist/cli/skills-content/canvas.d.ts +4 -0
- package/dist/cli/skills-content/canvas.d.ts.map +1 -0
- package/dist/cli/skills-content/canvas.js +152 -0
- package/dist/cli/skills-content/canvas.js.map +1 -0
- package/dist/cli/skills-content/connection.d.ts +2 -0
- package/dist/cli/skills-content/connection.d.ts.map +1 -0
- package/dist/cli/skills-content/connection.js +53 -0
- package/dist/cli/skills-content/connection.js.map +1 -0
- package/dist/cli/skills-content/content-skill.d.ts +2 -0
- package/dist/cli/skills-content/content-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/content-skill.js +110 -0
- package/dist/cli/skills-content/content-skill.js.map +1 -0
- package/dist/cli/skills-content/design-exploration-skill.d.ts +2 -0
- package/dist/cli/skills-content/design-exploration-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/design-exploration-skill.js +119 -0
- package/dist/cli/skills-content/design-exploration-skill.js.map +1 -0
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +2 -0
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/design-visual-edit-skill.js +229 -0
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -0
- package/dist/cli/skills-content/document-quality.d.ts +4 -0
- package/dist/cli/skills-content/document-quality.d.ts.map +1 -0
- package/dist/cli/skills-content/document-quality.js +195 -0
- package/dist/cli/skills-content/document-quality.js.map +1 -0
- package/dist/cli/skills-content/exemplar.d.ts +4 -0
- package/dist/cli/skills-content/exemplar.d.ts.map +1 -0
- package/dist/cli/skills-content/exemplar.js +68 -0
- package/dist/cli/skills-content/exemplar.js.map +1 -0
- package/dist/cli/skills-content/help.d.ts +2 -0
- package/dist/cli/skills-content/help.d.ts.map +1 -0
- package/dist/cli/skills-content/help.js +78 -0
- package/dist/cli/skills-content/help.js.map +1 -0
- package/dist/cli/skills-content/index.d.ts +23 -0
- package/dist/cli/skills-content/index.d.ts.map +1 -0
- package/dist/cli/skills-content/index.js +23 -0
- package/dist/cli/skills-content/index.js.map +1 -0
- package/dist/cli/skills-content/local-files.d.ts +2 -0
- package/dist/cli/skills-content/local-files.d.ts.map +1 -0
- package/dist/cli/skills-content/local-files.js +96 -0
- package/dist/cli/skills-content/local-files.js.map +1 -0
- package/dist/cli/skills-content/plan-setup-auth.d.ts +9 -0
- package/dist/cli/skills-content/plan-setup-auth.d.ts.map +1 -0
- package/dist/cli/skills-content/plan-setup-auth.js +81 -0
- package/dist/cli/skills-content/plan-setup-auth.js.map +1 -0
- package/dist/cli/skills-content/visual-plan-skill.d.ts +2 -0
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visual-plan-skill.js +471 -0
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -0
- package/dist/cli/skills-content/visual-recap-skill.d.ts +2 -0
- package/dist/cli/skills-content/visual-recap-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visual-recap-skill.js +548 -0
- package/dist/cli/skills-content/visual-recap-skill.js.map +1 -0
- package/dist/cli/skills-content/visualize-repo-skill.d.ts +2 -0
- package/dist/cli/skills-content/visualize-repo-skill.d.ts.map +1 -0
- package/dist/cli/skills-content/visualize-repo-skill.js +94 -0
- package/dist/cli/skills-content/visualize-repo-skill.js.map +1 -0
- package/dist/cli/skills-content/wireframe.d.ts +4 -0
- package/dist/cli/skills-content/wireframe.d.ts.map +1 -0
- package/dist/cli/skills-content/wireframe.js +347 -0
- package/dist/cli/skills-content/wireframe.js.map +1 -0
- package/dist/cli/skills.d.ts +2 -10
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +2 -2710
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +4 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +15 -3
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/FeedbackButton.js +2 -2
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/agent-chat-adapter.js +7 -3
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/app-providers.d.ts +13 -5
- package/dist/client/app-providers.d.ts.map +1 -1
- package/dist/client/app-providers.js +9 -6
- package/dist/client/app-providers.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +4 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +3 -3
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/composer/PastedTextChip.js +1 -1
- package/dist/client/composer/PastedTextChip.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +3 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +35 -14
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts +2 -0
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +9 -3
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +5 -0
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +91 -12
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +4 -1
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/extensions/ExtensionEditor.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionEditor.js +15 -5
- package/dist/client/extensions/ExtensionEditor.js.map +1 -1
- package/dist/client/extensions/ExtensionQueryErrorState.d.ts +8 -0
- package/dist/client/extensions/ExtensionQueryErrorState.d.ts.map +1 -0
- package/dist/client/extensions/ExtensionQueryErrorState.js +11 -0
- package/dist/client/extensions/ExtensionQueryErrorState.js.map +1 -0
- package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +17 -7
- package/dist/client/extensions/ExtensionSlot.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +17 -7
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsListPage.js +5 -3
- package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionsSidebarSection.js +21 -8
- package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
- package/dist/client/index.d.ts +0 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +0 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +7 -3
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
- package/dist/client/settings/SettingsTabsPage.js +4 -0
- package/dist/client/settings/SettingsTabsPage.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +2 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +4 -0
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/tool-cells/EditCell.d.ts.map +1 -1
- package/dist/client/tool-cells/EditCell.js +2 -1
- package/dist/client/tool-cells/EditCell.js.map +1 -1
- package/dist/client/tool-cells/FilesChangedSummary.d.ts.map +1 -1
- package/dist/client/tool-cells/FilesChangedSummary.js +2 -1
- package/dist/client/tool-cells/FilesChangedSummary.js.map +1 -1
- package/dist/client/tool-cells/WriteCell.d.ts.map +1 -1
- package/dist/client/tool-cells/WriteCell.js +2 -1
- package/dist/client/tool-cells/WriteCell.js.map +1 -1
- package/dist/client/visual-style-controls.js +1 -1
- package/dist/client/visual-style-controls.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +36 -14
- package/dist/deploy/build.js.map +1 -1
- package/dist/guards/db-tool-scoping.d.ts +38 -0
- package/dist/guards/db-tool-scoping.d.ts.map +1 -0
- package/dist/guards/db-tool-scoping.js +114 -0
- package/dist/guards/db-tool-scoping.js.map +1 -0
- package/dist/guards/index.d.ts +23 -0
- package/dist/guards/index.d.ts.map +1 -0
- package/dist/guards/index.js +19 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/guards/no-drizzle-push.d.ts +14 -0
- package/dist/guards/no-drizzle-push.d.ts.map +1 -0
- package/dist/guards/no-drizzle-push.js +97 -0
- package/dist/guards/no-drizzle-push.js.map +1 -0
- package/dist/guards/no-env-credentials.d.ts +36 -0
- package/dist/guards/no-env-credentials.d.ts.map +1 -0
- package/dist/guards/no-env-credentials.js +204 -0
- package/dist/guards/no-env-credentials.js.map +1 -0
- package/dist/guards/no-env-mutation.d.ts +23 -0
- package/dist/guards/no-env-mutation.d.ts.map +1 -0
- package/dist/guards/no-env-mutation.js +90 -0
- package/dist/guards/no-env-mutation.js.map +1 -0
- package/dist/guards/no-localhost-fallback.d.ts +30 -0
- package/dist/guards/no-localhost-fallback.d.ts.map +1 -0
- package/dist/guards/no-localhost-fallback.js +105 -0
- package/dist/guards/no-localhost-fallback.js.map +1 -0
- package/dist/guards/no-unscoped-credentials.d.ts +28 -0
- package/dist/guards/no-unscoped-credentials.d.ts.map +1 -0
- package/dist/guards/no-unscoped-credentials.js +199 -0
- package/dist/guards/no-unscoped-credentials.js.map +1 -0
- package/dist/guards/no-unscoped-queries.d.ts +32 -0
- package/dist/guards/no-unscoped-queries.d.ts.map +1 -0
- package/dist/guards/no-unscoped-queries.js +720 -0
- package/dist/guards/no-unscoped-queries.js.map +1 -0
- package/dist/guards/scan-utils.d.ts +28 -0
- package/dist/guards/scan-utils.d.ts.map +1 -0
- package/dist/guards/scan-utils.js +92 -0
- package/dist/guards/scan-utils.js.map +1 -0
- package/dist/guards/types.d.ts +28 -0
- package/dist/guards/types.d.ts.map +1 -0
- package/dist/guards/types.js +11 -0
- package/dist/guards/types.js.map +1 -0
- package/dist/integrations/google-docs-poller.d.ts +7 -0
- package/dist/integrations/google-docs-poller.d.ts.map +1 -1
- package/dist/integrations/google-docs-poller.js +13 -3
- package/dist/integrations/google-docs-poller.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +10 -0
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/webhook-handler.d.ts +11 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +16 -4
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +12 -0
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +13 -3
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +7 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +8 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/oauth-token.d.ts +1 -1
- package/dist/mcp/oauth-token.d.ts.map +1 -1
- package/dist/mcp/oauth-token.js +6 -1
- package/dist/mcp/oauth-token.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts.map +1 -1
- package/dist/observability/routes.js +32 -0
- package/dist/observability/routes.js.map +1 -1
- package/dist/observability/sentiment.d.ts +42 -0
- package/dist/observability/sentiment.d.ts.map +1 -0
- package/dist/observability/sentiment.js +196 -0
- package/dist/observability/sentiment.js.map +1 -0
- package/dist/observability/store.d.ts +5 -0
- package/dist/observability/store.d.ts.map +1 -1
- package/dist/observability/store.js +17 -0
- package/dist/observability/store.js.map +1 -1
- package/dist/observability/traces.d.ts +2 -0
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +42 -57
- package/dist/observability/traces.js.map +1 -1
- package/dist/observability/tracking-identity.d.ts +3 -0
- package/dist/observability/tracking-identity.d.ts.map +1 -0
- package/dist/observability/tracking-identity.js +51 -0
- package/dist/observability/tracking-identity.js.map +1 -0
- package/dist/observability/types.d.ts +10 -0
- package/dist/observability/types.d.ts.map +1 -1
- package/dist/observability/types.js +3 -0
- package/dist/observability/types.js.map +1 -1
- package/dist/org/accept-pending.d.ts.map +1 -1
- package/dist/org/accept-pending.js +9 -1
- package/dist/org/accept-pending.js.map +1 -1
- package/dist/org/migrations.d.ts +7 -2
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +41 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/package-lifecycle/index.d.ts +2 -0
- package/dist/package-lifecycle/index.d.ts.map +1 -0
- package/dist/package-lifecycle/index.js +2 -0
- package/dist/package-lifecycle/index.js.map +1 -0
- package/dist/package-lifecycle/manifest.d.ts +24 -0
- package/dist/package-lifecycle/manifest.d.ts.map +1 -0
- package/dist/package-lifecycle/manifest.js +81 -0
- package/dist/package-lifecycle/manifest.js.map +1 -0
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/provider-api/custom-registry.d.ts +32 -1
- package/dist/provider-api/custom-registry.d.ts.map +1 -1
- package/dist/provider-api/custom-registry.js +41 -1
- package/dist/provider-api/custom-registry.js.map +1 -1
- package/dist/provider-api/index.d.ts +1 -1
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +1 -1
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/storage.d.ts +6 -0
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +105 -29
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +4 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +50 -0
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -0
- package/dist/server/agent-chat/action-filters-a2a.js +127 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -0
- package/dist/server/agent-chat/browser-team-tools.d.ts +21 -0
- package/dist/server/agent-chat/browser-team-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/browser-team-tools.js +417 -0
- package/dist/server/agent-chat/browser-team-tools.js.map +1 -0
- package/dist/server/agent-chat/context-tools.d.ts +33 -0
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/context-tools.js +520 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -0
- package/dist/server/agent-chat/framework-prompts.d.ts +65 -0
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -0
- package/dist/server/agent-chat/framework-prompts.js +403 -0
- package/dist/server/agent-chat/framework-prompts.js.map +1 -0
- package/dist/server/agent-chat/lazy-fs.d.ts +2 -0
- package/dist/server/agent-chat/lazy-fs.d.ts.map +1 -0
- package/dist/server/agent-chat/lazy-fs.js +11 -0
- package/dist/server/agent-chat/lazy-fs.js.map +1 -0
- package/dist/server/agent-chat/mcp-glue.d.ts +9 -0
- package/dist/server/agent-chat/mcp-glue.d.ts.map +1 -0
- package/dist/server/agent-chat/mcp-glue.js +63 -0
- package/dist/server/agent-chat/mcp-glue.js.map +1 -0
- package/dist/server/agent-chat/plugin-options.d.ts +322 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -0
- package/dist/server/agent-chat/plugin-options.js +2 -0
- package/dist/server/agent-chat/plugin-options.js.map +1 -0
- package/dist/server/agent-chat/process-run-failure.d.ts +12 -0
- package/dist/server/agent-chat/process-run-failure.d.ts.map +1 -0
- package/dist/server/agent-chat/process-run-failure.js +24 -0
- package/dist/server/agent-chat/process-run-failure.js.map +1 -0
- package/dist/server/agent-chat/prompt-resources.d.ts +28 -0
- package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -0
- package/dist/server/agent-chat/prompt-resources.js +514 -0
- package/dist/server/agent-chat/prompt-resources.js.map +1 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +5 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts.map +1 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.js +53 -0
- package/dist/server/agent-chat/recurring-jobs-runtime.js.map +1 -0
- package/dist/server/agent-chat/request-surface.d.ts +8 -0
- package/dist/server/agent-chat/request-surface.d.ts.map +1 -0
- package/dist/server/agent-chat/request-surface.js +56 -0
- package/dist/server/agent-chat/request-surface.js.map +1 -0
- package/dist/server/agent-chat/run-code-tools.d.ts +17 -0
- package/dist/server/agent-chat/run-code-tools.d.ts.map +1 -0
- package/dist/server/agent-chat/run-code-tools.js +55 -0
- package/dist/server/agent-chat/run-code-tools.js.map +1 -0
- package/dist/server/agent-chat/script-entries.d.ts +47 -0
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -0
- package/dist/server/agent-chat/script-entries.js +633 -0
- package/dist/server/agent-chat/script-entries.js.map +1 -0
- package/dist/server/agent-chat/shared-thread.d.ts +33 -0
- package/dist/server/agent-chat/shared-thread.d.ts.map +1 -0
- package/dist/server/agent-chat/shared-thread.js +242 -0
- package/dist/server/agent-chat/shared-thread.js.map +1 -0
- package/dist/server/agent-chat/skill-frontmatter.d.ts +7 -0
- package/dist/server/agent-chat/skill-frontmatter.d.ts.map +1 -0
- package/dist/server/agent-chat/skill-frontmatter.js +26 -0
- package/dist/server/agent-chat/skill-frontmatter.js.map +1 -0
- package/dist/server/agent-chat-plugin.d.ts +45 -486
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +217 -3015
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-teams.d.ts +10 -0
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +13 -3
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +50 -52
- package/dist/server/auth.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +23 -12
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +22 -21
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/csrf.d.ts.map +1 -1
- package/dist/server/csrf.js +18 -5
- package/dist/server/csrf.js.map +1 -1
- package/dist/server/edge.d.ts +1 -0
- package/dist/server/edge.d.ts.map +1 -1
- package/dist/server/edge.js +1 -0
- package/dist/server/edge.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +34 -0
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/google-realtime-session.d.ts.map +1 -1
- package/dist/server/google-realtime-session.js +2 -34
- package/dist/server/google-realtime-session.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +1 -16
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +24 -2
- package/dist/server/poll.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +3 -0
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +38 -5
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/server/request-origin.d.ts +10 -0
- package/dist/server/request-origin.d.ts.map +1 -0
- package/dist/server/request-origin.js +63 -0
- package/dist/server/request-origin.js.map +1 -0
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +47 -2
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts.map +1 -1
- package/dist/server/transcribe-voice.js +2 -48
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/sharing/access.d.ts +63 -3
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +53 -15
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/registry.d.ts +7 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/agent-native.css +15 -14
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/default/app/i18n/ar-SA.ts +6 -0
- package/dist/templates/default/app/i18n/de-DE.ts +6 -0
- package/dist/templates/default/app/i18n/en-US.ts +6 -0
- package/dist/templates/default/app/i18n/es-ES.ts +6 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +6 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +6 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +6 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +6 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +6 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +6 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +6 -0
- package/dist/templates/default/package.json +2 -2
- package/dist/templates/headless/package.json +0 -1
- package/dist/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/dist/templates/workspace-core/package.json +0 -1
- package/dist/templates/workspace-core/src/server/index.ts +4 -2
- package/dist/templates/workspace-root/package.json +0 -1
- package/dist/testing.d.ts +16 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +16 -0
- package/dist/testing.js.map +1 -0
- package/dist/triggers/actions.d.ts.map +1 -1
- package/dist/triggers/actions.js +8 -3
- package/dist/triggers/actions.js.map +1 -1
- package/dist/triggers/dispatcher.d.ts +7 -0
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +13 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/triggers/types.d.ts +7 -1
- package/dist/triggers/types.d.ts.map +1 -1
- package/dist/triggers/types.js.map +1 -1
- package/dist/vite/client.d.ts +16 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +105 -2
- package/dist/vite/client.js.map +1 -1
- package/docs/content/audit-log.mdx +2 -1
- package/docs/content/authentication.mdx +3 -3
- package/docs/content/automations.mdx +7 -7
- package/docs/content/creating-templates.mdx +1 -1
- package/docs/content/doctor.mdx +170 -0
- package/docs/content/external-agents.mdx +8 -7
- package/docs/content/internationalization.mdx +2 -1
- package/docs/content/locales/ar-SA/audit-log.mdx +2 -1
- package/docs/content/locales/ar-SA/authentication.mdx +2 -2
- package/docs/content/locales/ar-SA/automations.mdx +7 -7
- package/docs/content/locales/ar-SA/external-agents.mdx +8 -7
- package/docs/content/locales/ar-SA/getting-started.mdx +7 -1
- package/docs/content/locales/ar-SA/internationalization.mdx +1 -1
- package/docs/content/locales/ar-SA/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ar-SA/package-lifecycle.mdx +19 -0
- package/docs/content/locales/ar-SA/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/ar-SA/security.mdx +10 -0
- package/docs/content/locales/de-DE/audit-log.mdx +2 -1
- package/docs/content/locales/de-DE/authentication.mdx +1 -1
- package/docs/content/locales/de-DE/automations.mdx +7 -7
- package/docs/content/locales/de-DE/external-agents.mdx +8 -7
- package/docs/content/locales/de-DE/getting-started.mdx +7 -1
- package/docs/content/locales/de-DE/internationalization.mdx +1 -1
- package/docs/content/locales/de-DE/mcp-protocol.mdx +1 -1
- package/docs/content/locales/de-DE/package-lifecycle.mdx +22 -0
- package/docs/content/locales/de-DE/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/de-DE/security.mdx +10 -0
- package/docs/content/locales/es-ES/audit-log.mdx +2 -1
- package/docs/content/locales/es-ES/authentication.mdx +2 -2
- package/docs/content/locales/es-ES/automations.mdx +7 -7
- package/docs/content/locales/es-ES/external-agents.mdx +8 -7
- package/docs/content/locales/es-ES/getting-started.mdx +7 -1
- package/docs/content/locales/es-ES/internationalization.mdx +1 -1
- package/docs/content/locales/es-ES/mcp-protocol.mdx +1 -1
- package/docs/content/locales/es-ES/package-lifecycle.mdx +22 -0
- package/docs/content/locales/es-ES/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/es-ES/security.mdx +10 -0
- package/docs/content/locales/fr-FR/audit-log.mdx +2 -1
- package/docs/content/locales/fr-FR/authentication.mdx +1 -1
- package/docs/content/locales/fr-FR/automations.mdx +7 -7
- package/docs/content/locales/fr-FR/external-agents.mdx +8 -7
- package/docs/content/locales/fr-FR/getting-started.mdx +7 -1
- package/docs/content/locales/fr-FR/internationalization.mdx +1 -1
- package/docs/content/locales/fr-FR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/fr-FR/package-lifecycle.mdx +21 -0
- package/docs/content/locales/fr-FR/sandbox-adapters.mdx +19 -8
- package/docs/content/locales/fr-FR/security.mdx +10 -0
- package/docs/content/locales/hi-IN/audit-log.mdx +2 -1
- package/docs/content/locales/hi-IN/authentication.mdx +2 -2
- package/docs/content/locales/hi-IN/automations.mdx +7 -7
- package/docs/content/locales/hi-IN/external-agents.mdx +8 -7
- package/docs/content/locales/hi-IN/getting-started.mdx +7 -1
- package/docs/content/locales/hi-IN/internationalization.mdx +1 -1
- package/docs/content/locales/hi-IN/mcp-protocol.mdx +1 -1
- package/docs/content/locales/hi-IN/package-lifecycle.mdx +20 -0
- package/docs/content/locales/hi-IN/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/hi-IN/security.mdx +10 -0
- package/docs/content/locales/ja-JP/audit-log.mdx +2 -1
- package/docs/content/locales/ja-JP/authentication.mdx +2 -2
- package/docs/content/locales/ja-JP/automations.mdx +7 -7
- package/docs/content/locales/ja-JP/external-agents.mdx +8 -7
- package/docs/content/locales/ja-JP/getting-started.mdx +7 -1
- package/docs/content/locales/ja-JP/internationalization.mdx +1 -1
- package/docs/content/locales/ja-JP/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ja-JP/package-lifecycle.mdx +21 -0
- package/docs/content/locales/ja-JP/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/ja-JP/security.mdx +10 -0
- package/docs/content/locales/ko-KR/audit-log.mdx +2 -1
- package/docs/content/locales/ko-KR/authentication.mdx +2 -2
- package/docs/content/locales/ko-KR/automations.mdx +7 -7
- package/docs/content/locales/ko-KR/external-agents.mdx +8 -7
- package/docs/content/locales/ko-KR/getting-started.mdx +7 -1
- package/docs/content/locales/ko-KR/internationalization.mdx +1 -1
- package/docs/content/locales/ko-KR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/ko-KR/package-lifecycle.mdx +20 -0
- package/docs/content/locales/ko-KR/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/ko-KR/security.mdx +10 -0
- package/docs/content/locales/pt-BR/audit-log.mdx +2 -1
- package/docs/content/locales/pt-BR/authentication.mdx +2 -2
- package/docs/content/locales/pt-BR/automations.mdx +7 -7
- package/docs/content/locales/pt-BR/external-agents.mdx +8 -7
- package/docs/content/locales/pt-BR/getting-started.mdx +7 -1
- package/docs/content/locales/pt-BR/internationalization.mdx +1 -1
- package/docs/content/locales/pt-BR/mcp-protocol.mdx +1 -1
- package/docs/content/locales/pt-BR/package-lifecycle.mdx +21 -0
- package/docs/content/locales/pt-BR/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/pt-BR/security.mdx +10 -0
- package/docs/content/locales/zh-CN/audit-log.mdx +2 -1
- package/docs/content/locales/zh-CN/authentication.mdx +2 -2
- package/docs/content/locales/zh-CN/automations.mdx +7 -7
- package/docs/content/locales/zh-CN/external-agents.mdx +8 -7
- package/docs/content/locales/zh-CN/getting-started.mdx +6 -4
- package/docs/content/locales/zh-CN/internationalization.mdx +1 -1
- package/docs/content/locales/zh-CN/mcp-protocol.mdx +1 -1
- package/docs/content/locales/zh-CN/package-lifecycle.mdx +19 -0
- package/docs/content/locales/zh-CN/sandbox-adapters.mdx +17 -6
- package/docs/content/locales/zh-CN/security.mdx +10 -0
- package/docs/content/locales/zh-TW/audit-log.mdx +2 -1
- package/docs/content/locales/zh-TW/authentication.mdx +2 -2
- package/docs/content/locales/zh-TW/automations.mdx +7 -7
- package/docs/content/locales/zh-TW/external-agents.mdx +8 -7
- package/docs/content/locales/zh-TW/getting-started.mdx +6 -4
- package/docs/content/locales/zh-TW/internationalization.mdx +1 -1
- package/docs/content/locales/zh-TW/mcp-protocol.mdx +1 -1
- package/docs/content/locales/zh-TW/package-lifecycle.mdx +19 -0
- package/docs/content/locales/zh-TW/sandbox-adapters.mdx +18 -7
- package/docs/content/locales/zh-TW/security.mdx +10 -0
- package/docs/content/mcp-protocol.mdx +1 -1
- package/docs/content/package-lifecycle.mdx +51 -0
- package/docs/content/sandbox-adapters.mdx +16 -5
- package/docs/content/security.mdx +2 -0
- package/package.json +14 -3
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/src/templates/default/app/i18n/en-US.ts +6 -0
- package/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/src/templates/default/package.json +2 -2
- package/src/templates/headless/package.json +0 -1
- package/src/templates/workspace-core/.agents/skills/audit-log/SKILL.md +3 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +27 -29
- package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +2 -1
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +25 -0
- package/src/templates/workspace-core/package.json +0 -1
- package/src/templates/workspace-core/src/server/index.ts +4 -2
- package/src/templates/workspace-root/package.json +0 -1
- package/corpus/core/src/client/ProductionAgentPanel.tsx +0 -9
- package/corpus/core/src/client/auth-redirect-url.ts +0 -23
- package/corpus/core/src/client/useProductionAgent.ts +0 -253
- package/corpus/core/src/shared/auth-redirect-url.ts +0 -1
- package/corpus/templates/analytics/app/pages/Index.tsx +0 -16
- package/corpus/templates/analytics/seeds/dashboards/agent-observability-llm.json +0 -173
- package/corpus/templates/slides/app/components/ui/toast.tsx +0 -1
- package/corpus/templates/slides/app/components/ui/toaster.tsx +0 -1
- package/corpus/templates/slides/app/hooks/use-toast.ts +0 -1
- package/dist/client/ProductionAgentPanel.d.ts +0 -6
- package/dist/client/ProductionAgentPanel.d.ts.map +0 -1
- package/dist/client/ProductionAgentPanel.js +0 -6
- package/dist/client/ProductionAgentPanel.js.map +0 -1
- package/dist/client/auth-redirect-url.d.ts +0 -2
- package/dist/client/auth-redirect-url.d.ts.map +0 -1
- package/dist/client/auth-redirect-url.js +0 -19
- package/dist/client/auth-redirect-url.js.map +0 -1
- package/dist/client/useProductionAgent.d.ts +0 -24
- package/dist/client/useProductionAgent.d.ts.map +0 -1
- package/dist/client/useProductionAgent.js +0 -179
- package/dist/client/useProductionAgent.js.map +0 -1
- package/dist/shared/auth-redirect-url.d.ts +0 -2
- package/dist/shared/auth-redirect-url.d.ts.map +0 -1
- package/dist/shared/auth-redirect-url.js +0 -2
- package/dist/shared/auth-redirect-url.js.map +0 -1
|
@@ -31,2741 +31,35 @@ import {
|
|
|
31
31
|
import { CLIENTS, type ClientId } from "./mcp-config-writers.js";
|
|
32
32
|
import { PR_VISUAL_RECAP_SETUP, writePrVisualRecapWorkflow } from "./recap.js";
|
|
33
33
|
import { setupAgentSymlinks } from "./setup-agents.js";
|
|
34
|
+
import {
|
|
35
|
+
ASSETS_SKILL_MD,
|
|
36
|
+
CANVAS_REFERENCE_MD,
|
|
37
|
+
CONNECTION_REFERENCE_MD,
|
|
38
|
+
CONTENT_SKILL_MD,
|
|
39
|
+
DESIGN_EXPLORATION_SKILL_MD,
|
|
40
|
+
DESIGN_VISUAL_EDIT_SKILL_MD,
|
|
41
|
+
DOCUMENT_QUALITY_REFERENCE_MD,
|
|
42
|
+
EXEMPLAR_REFERENCE_MD,
|
|
43
|
+
HELP,
|
|
44
|
+
LOCAL_FILES_REFERENCE_MD,
|
|
45
|
+
VISUAL_PLANS_SKILL_MD,
|
|
46
|
+
VISUAL_RECAP_SKILL_MD,
|
|
47
|
+
VISUALIZE_REPO_SKILL_MD,
|
|
48
|
+
WIREFRAME_REFERENCE_MD,
|
|
49
|
+
} from "./skills-content/index.js";
|
|
34
50
|
import { createCliTelemetry, type CliTelemetry } from "./telemetry.js";
|
|
35
51
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
npx @agent-native/core@latest skills add content --mode local-files
|
|
48
|
-
npx @agent-native/core@latest skills add design-exploration
|
|
49
|
-
npx @agent-native/core@latest skills add visual-edit
|
|
50
|
-
npx @agent-native/core@latest skills add visual-plan
|
|
51
|
-
npx @agent-native/core@latest skills add visual-recap
|
|
52
|
-
npx @agent-native/core@latest skills add visualize-repo
|
|
53
|
-
npx @agent-native/core@latest skills add visual-recap --with-github-action
|
|
54
|
-
npx @agent-native/core@latest skills add visual-plan --mode local-files
|
|
55
|
-
npx @agent-native/core@latest skills add visual-plan --mode self-hosted --mcp-url https://my-plan-app.example.com
|
|
56
|
-
npx @agent-native/core@latest skills status visual-plan
|
|
57
|
-
npx @agent-native/core@latest skills update visual-plan
|
|
58
|
-
npx @agent-native/core@latest skills update scaffold --project
|
|
59
|
-
npx @agent-native/core@latest skills add visual-plan --no-connect
|
|
60
|
-
npx @agent-native/core@latest skills add context-xray --client all
|
|
61
|
-
npx @agent-native/core@latest skills add assets --client claude-code
|
|
62
|
-
npx @agent-native/core@latest skills add assets --mcp-url https://my-app.ngrok-free.dev
|
|
63
|
-
npx @agent-native/core@latest skills add ./dist/assets-skill --client codex
|
|
64
|
-
npx @agent-native/core@latest skills add BuilderIO/skills --client codex --scope project
|
|
65
|
-
npx @agent-native/core@latest skills add BuilderIO/skills --with-github-action
|
|
66
|
-
|
|
67
|
-
The add command installs the SKILL.md instructions, registers the app-backed
|
|
68
|
-
MCP connector, and then authenticates it in one step so you do not hit an OAuth
|
|
69
|
-
wall on the first tool call. Hosted installs can configure Claude Code, Codex,
|
|
70
|
-
Claude Cowork, Cursor, OpenCode, and GitHub Copilot / VS Code; local-files
|
|
71
|
-
instruction installs target the shared .agents skill path used by Codex, Pi,
|
|
72
|
-
Cursor, OpenCode, Copilot, and similar agents, plus Claude Code's native skill
|
|
73
|
-
path when selected. Pass --client to narrow it. Authentication reuses
|
|
74
|
-
"npx @agent-native/core@latest connect": OAuth-capable clients (Claude Code,
|
|
75
|
-
Cursor, OpenCode, GitHub Copilot / VS Code) get URL-only entries and authenticate
|
|
76
|
-
inside that host, while Codex / Cowork run the browser device-code flow. In a
|
|
77
|
-
non-interactive shell or CI the auth step is skipped and the exact
|
|
78
|
-
"npx @agent-native/core@latest connect <url> --client all" command is printed instead.
|
|
79
|
-
|
|
80
|
-
Running "npx @agent-native/skills@latest add ..." uses this same shared install
|
|
81
|
-
flow with the broader BuilderIO skills catalog enabled. Pass --no-connect to
|
|
82
|
-
register MCP where possible without authenticating (leave auth to the host or run
|
|
83
|
-
"npx @agent-native/core@latest connect" later). Pass --mcp-url to register that connector against
|
|
84
|
-
a custom origin (an ngrok tunnel, a local dev server, or a self-hosted
|
|
85
|
-
deployment) instead of the built-in hosted default — a bare origin gets the
|
|
86
|
-
standard /_agent-native/mcp path appended. Use app-skill pack for marketplace
|
|
87
|
-
bundles and custom adapter output.
|
|
88
|
-
|
|
89
|
-
When installing visual-plan, visual-recap, or visualize-repo interactively, the
|
|
90
|
-
CLI asks where Plans artifacts should live: hosted Plans for shareable
|
|
91
|
-
links/comments, local files for "No sharing, all local.", or a
|
|
92
|
-
self-hosted/custom Plan app URL.
|
|
93
|
-
Pass --mode to choose directly. Local-files mode skips MCP registration and
|
|
94
|
-
auth and installs instructions that default to a no-auth block catalog fetch,
|
|
95
|
-
MDX folders, and the localhost bridge viewer.
|
|
96
|
-
|
|
97
|
-
When installing content with --mode local-files, the CLI installs Content
|
|
98
|
-
instructions and writes or updates agent-native.json with repo-backed Markdown /
|
|
99
|
-
MDX roots for docs, blog, content, and resources. Use a local Content app, Agent
|
|
100
|
-
Native Desktop, or another trusted local bridge for Content actions to read and
|
|
101
|
-
write those files.
|
|
102
|
-
|
|
103
|
-
When installing visual-recap interactively, the CLI offers to add the optional PR
|
|
104
|
-
Visual Recap GitHub Action. Pass --with-github-action to write it directly, then
|
|
105
|
-
run "npx @agent-native/core@latest recap setup" / "npx @agent-native/core@latest recap doctor" to configure and
|
|
106
|
-
verify GitHub Actions. Docs: https://www.agent-native.com/docs/pr-visual-recap.
|
|
107
|
-
|
|
108
|
-
The status/update commands inspect copied Agent Native skill folders and refresh
|
|
109
|
-
their instruction files from the current @agent-native/core package. In generated
|
|
110
|
-
apps/workspaces, "skills update scaffold --project" refreshes the framework
|
|
111
|
-
skills copied into the scaffold and repairs AGENTS.md / CLAUDE.md and
|
|
112
|
-
.agents/skills / .claude/skills compatibility links.`;
|
|
113
|
-
|
|
114
|
-
const ASSETS_SKILL_MD = `---
|
|
115
|
-
name: assets
|
|
116
|
-
description: >-
|
|
117
|
-
Use Assets for image or video generation requests, brand-safe media,
|
|
118
|
-
human picker UI, search/list/export actions, and cross-app asset selection.
|
|
119
|
-
Prefer this over generic image tools when installed.
|
|
120
|
-
metadata:
|
|
121
|
-
visibility: exported
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
# Assets
|
|
125
|
-
|
|
126
|
-
Use the Assets app when a workflow needs reusable brand media, a human picker,
|
|
127
|
-
or generated image/video assets that another app can reference by ID and URL.
|
|
128
|
-
When this skill is available, route plain image-generation requests here instead
|
|
129
|
-
of using a generic image generator.
|
|
130
|
-
|
|
131
|
-
## Choose The Path
|
|
132
|
-
|
|
133
|
-
- Use \`open-asset-picker\` when a person should browse, search, generate, and
|
|
134
|
-
select an asset in UI. Pass \`mediaType: "image"\` by default, or
|
|
135
|
-
\`mediaType: "video"\` for video libraries. When the user asks to create a
|
|
136
|
-
specific image and choose the best option, pass \`prompt\`,
|
|
137
|
-
\`autoGenerate: true\`, and \`count: 3\` so the picker opens with candidates
|
|
138
|
-
to preview and select.
|
|
139
|
-
- Use unattended actions when the agent already knows what to do:
|
|
140
|
-
\`search-assets\`, \`list-assets\`, \`generate-image\`,
|
|
141
|
-
\`generate-image-batch\`, \`generate-video\`,
|
|
142
|
-
\`refresh-generation-run\`, and \`export-asset\`.
|
|
143
|
-
- Use browser/deep-link fallback when the host cannot render MCP Apps inline.
|
|
144
|
-
Surface the returned picker link. If it opens in a normal browser tab, have
|
|
145
|
-
the user select an asset there and paste back the copied handoff summary.
|
|
146
|
-
Treat Codex, Claude Code, and Claude Desktop Code as link-out hosts; do not
|
|
147
|
-
promise inline MCP App rendering there.
|
|
148
|
-
If the skill instructions are available but the MCP tool namespace has not
|
|
149
|
-
appeared yet, use the Assets browser fallback URL shape instead of switching
|
|
150
|
-
to a generic generator:
|
|
151
|
-
\`https://assets.agent-native.com/library?mediaType=image&prompt=...&autoGenerate=1&count=3\`.
|
|
152
|
-
When reporting the final selected image in Codex or Claude Code, include the
|
|
153
|
-
asset link and, if an inline preview is important, download the selected
|
|
154
|
-
\`previewUrl\`/\`downloadUrl\` to a local temp image and embed that absolute
|
|
155
|
-
local path. Remote CDN markdown images can fail to render in code-editor chat
|
|
156
|
-
surfaces.
|
|
157
|
-
|
|
158
|
-
## Image And Video Workflows
|
|
159
|
-
|
|
160
|
-
1. Pick or match the library with \`list-libraries\` or \`match-library\`.
|
|
161
|
-
2. For images, call \`generate-image\` or \`generate-image-batch\`. Image
|
|
162
|
-
actions are synchronous: one batch call should return the finished image
|
|
163
|
-
candidates, so do not poll or regenerate unless a returned slot failed.
|
|
164
|
-
3. For videos, call \`generate-video\` and poll \`refresh-generation-run\`
|
|
165
|
-
until the run completes.
|
|
166
|
-
4. Preserve returned \`assetId\`, \`runId\`, \`previewUrl\`, \`downloadUrl\`,
|
|
167
|
-
media type, and dimensions so the caller can attach or embed the result.
|
|
168
|
-
|
|
169
|
-
## Cross-App Use
|
|
170
|
-
|
|
171
|
-
- Hosted default: connect \`https://assets.agent-native.com/_agent-native/mcp\`.
|
|
172
|
-
Do not put shared secrets in skill files.
|
|
173
|
-
- For CLI/code-editor clients, keep any \`npx @agent-native/core@latest connect\` command
|
|
174
|
-
running until browser authorization finishes. Stopping it early can leave the
|
|
175
|
-
browser approved but the local MCP config unwritten. Restart or reload the
|
|
176
|
-
agent client after installing or connecting if Assets tools do not appear in
|
|
177
|
-
the live session.
|
|
178
|
-
- Local customization: use \`npx @agent-native/core@latest app-skill launch --local\` from an
|
|
179
|
-
Assets app-skill manifest, or pass \`--into <path>\` for editable source.
|
|
180
|
-
- Do not call image/video providers directly from another app. Assets owns
|
|
181
|
-
generation, picker UI, search/list/export, and asset context.
|
|
182
|
-
- If an Assets tool call returns \`Session terminated\`, \`needs auth\`, or
|
|
183
|
-
another connector/session error, do not keep retrying the tool. Stop and give
|
|
184
|
-
the user the reconnect step: in Claude Code run \`/mcp\` and choose
|
|
185
|
-
Authenticate/Reconnect for the Assets connector; from any terminal run
|
|
186
|
-
\`npx -y @agent-native/core@latest reconnect https://assets.agent-native.com\` — this
|
|
187
|
-
re-authenticates WITHOUT reinstalling. Never reinstall from scratch just to fix
|
|
188
|
-
auth. Continue once the connector is available.
|
|
189
|
-
- Do not hand-roll MCP HTTP requests with curl from the agent session. Use the
|
|
190
|
-
host-exposed Assets tools after restart/reload, or use the returned
|
|
191
|
-
browser/deep-link fallback.
|
|
192
|
-
- If a batch image generation request times out in browser fallback, retry with
|
|
193
|
-
\`count: 1\` only after telling the user the multi-candidate request timed out.
|
|
194
|
-
- If you inspect local MCP config, redact \`Authorization\`, \`http_headers\`,
|
|
195
|
-
and token values. Never paste bearer tokens into chat or logs.
|
|
196
|
-
`;
|
|
197
|
-
|
|
198
|
-
const CONTENT_SKILL_MD = `---
|
|
199
|
-
name: content
|
|
200
|
-
description: >-
|
|
201
|
-
Use Content for repo-backed Markdown/MDX docs, blogs, resources, rich
|
|
202
|
-
document editing, local components, shareable copies, and Content local-file
|
|
203
|
-
workspaces. Prefer Content actions over raw filesystem writes when available.
|
|
204
|
-
metadata:
|
|
205
|
-
visibility: exported
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
# Content
|
|
209
|
-
|
|
210
|
-
Use the Content app when a workflow is about authoring, editing, reviewing, or
|
|
211
|
-
publishing Markdown/MDX documents: docs sites, blogs, resource libraries,
|
|
212
|
-
marketing pages, internal notes, and local MDX components. Content gives the
|
|
213
|
-
agent a document tree, a rich editor, normal document actions, and optional
|
|
214
|
-
local-file source of truth.
|
|
215
|
-
|
|
216
|
-
## Choose The Path
|
|
217
|
-
|
|
218
|
-
- Use Content actions when the Content MCP/action tools are available:
|
|
219
|
-
\`list-documents\`, \`search-documents\`, \`get-document\`,
|
|
220
|
-
\`pull-document\`, \`create-document\`, \`edit-document\`,
|
|
221
|
-
\`update-document\`, \`delete-document\`, \`share-local-file-document\`,
|
|
222
|
-
\`list-local-component-files\`, and \`write-local-component-file\`.
|
|
223
|
-
- Use \`pull-document\` or \`get-document\` before editing a page. Use
|
|
224
|
-
\`edit-document\` for precise find/replace changes and \`update-document\`
|
|
225
|
-
for full rewrites or new content.
|
|
226
|
-
- In Local File Mode, Content actions read and write the repo files declared in
|
|
227
|
-
\`agent-native.json\`; SQL remains cache/history/search glue, not the source of
|
|
228
|
-
truth for those pages.
|
|
229
|
-
- If Content tools are not visible and no local Content app or Desktop bridge is
|
|
230
|
-
running, treat this skill as repo-editing guidance. Edit configured
|
|
231
|
-
\`.md\`/\`.mdx\` files directly, preserve frontmatter and MDX imports, and tell
|
|
232
|
-
the user the Content action surface was not available.
|
|
233
|
-
|
|
234
|
-
## Action Examples
|
|
235
|
-
|
|
236
|
-
Prefer JSON input for action calls:
|
|
237
|
-
|
|
238
|
-
\`\`\`bash
|
|
239
|
-
pnpm action list-documents
|
|
240
|
-
pnpm action get-document '{"id":"local-file:..."}'
|
|
241
|
-
pnpm action edit-document '{"id":"local-file:...","find":"old copy","replace":"new copy"}'
|
|
242
|
-
pnpm action update-document '{"id":"local-file:...","content":"# Updated\\n\\nBody"}'
|
|
243
|
-
pnpm action share-local-file-document '{"id":"local-file:..."}'
|
|
244
|
-
\`\`\`
|
|
245
|
-
|
|
246
|
-
Run \`refresh-list\` after create/update/delete operations when you need the
|
|
247
|
-
open Content UI sidebar to repaint immediately.
|
|
248
|
-
|
|
249
|
-
## Local File Mode
|
|
250
|
-
|
|
251
|
-
Install into an existing repo with:
|
|
252
|
-
|
|
253
|
-
\`\`\`bash
|
|
254
|
-
npx @agent-native/core@latest skills add content --mode local-files --scope project
|
|
255
|
-
\`\`\`
|
|
256
|
-
|
|
257
|
-
The installer copies this skill and writes or updates \`agent-native.json\` with
|
|
258
|
-
Content roots for \`docs/\`, \`blog/\`, \`content/\`, and \`resources/\`, plus a
|
|
259
|
-
\`components/\` folder for local MDX components. A typical manifest looks like:
|
|
260
|
-
|
|
261
|
-
\`\`\`json
|
|
262
|
-
{
|
|
263
|
-
"version": 1,
|
|
264
|
-
"apps": {
|
|
265
|
-
"content": {
|
|
266
|
-
"mode": "local-files",
|
|
267
|
-
"roots": [
|
|
268
|
-
{ "name": "Docs", "path": "docs", "kind": "docs", "extensions": [".md", ".mdx"] },
|
|
269
|
-
{ "name": "Blog", "path": "blog", "kind": "blog", "extensions": [".md", ".mdx"] },
|
|
270
|
-
{ "name": "Content", "path": "content", "kind": "content", "extensions": [".md", ".mdx"] },
|
|
271
|
-
{ "name": "Resources", "path": "resources", "kind": "resources", "extensions": [".md", ".mdx"] }
|
|
272
|
-
],
|
|
273
|
-
"components": "components",
|
|
274
|
-
"extensions": "extensions",
|
|
275
|
-
"hide": ["**/_*.md", "**/_*.mdx"]
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
\`\`\`
|
|
280
|
-
|
|
281
|
-
Local File Mode does not make the host language model local, and the hosted
|
|
282
|
-
Content app cannot read private repo files by itself. File access requires a
|
|
283
|
-
local Content app, Agent Native Desktop, or another trusted local bridge.
|
|
284
|
-
|
|
285
|
-
## MDX And Components
|
|
286
|
-
|
|
287
|
-
- Preserve frontmatter keys you do not understand. Preserve MDX imports,
|
|
288
|
-
exports, JSX, and expression props unless the user explicitly asks to change
|
|
289
|
-
them.
|
|
290
|
-
- Use local components from the configured \`components\` folder. Components
|
|
291
|
-
should be PascalCase exports from \`.tsx\` files; simple editable input metadata
|
|
292
|
-
can live next to them as \`ComponentNameInputs\`.
|
|
293
|
-
- Use \`list-local-component-files\` and \`write-local-component-file\` for
|
|
294
|
-
component source changes when Content tools are available. Otherwise edit the
|
|
295
|
-
component files directly like normal repo source.
|
|
296
|
-
|
|
297
|
-
## Boundaries
|
|
298
|
-
|
|
299
|
-
- Moving, renaming, and reordering local-file pages are not first-class Content
|
|
300
|
-
UI operations yet. Use normal file operations when the user asks for those,
|
|
301
|
-
then let Content rediscover the file tree.
|
|
302
|
-
- Do not push/pull Notion, Builder.io, or other provider-backed content unless
|
|
303
|
-
the user explicitly asks for provider sync.
|
|
304
|
-
- Do not paste secrets, private provider data, or credential-looking values into
|
|
305
|
-
docs, generated pages, frontmatter, examples, or local components.
|
|
306
|
-
`;
|
|
307
|
-
|
|
308
|
-
const DESIGN_EXPLORATION_SKILL_MD = `---
|
|
309
|
-
name: design-exploration
|
|
310
|
-
description: >-
|
|
311
|
-
Use Design for UI/UX exploration, side-by-side design directions,
|
|
312
|
-
interactive prototype previews, user selection, iteration, and design-to-code
|
|
313
|
-
handoff through the hosted Design MCP app.
|
|
314
|
-
metadata:
|
|
315
|
-
visibility: exported
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
# Design Exploration
|
|
319
|
-
|
|
320
|
-
Use the Design app when a workflow needs visual UI exploration, prototype
|
|
321
|
-
iteration, or a human-in-the-loop choice among design directions.
|
|
322
|
-
|
|
323
|
-
## Choose The Path
|
|
324
|
-
|
|
325
|
-
- Use \`create-design\` first to create a project shell. Do not report the
|
|
326
|
-
design as ready until it has renderable HTML.
|
|
327
|
-
- For open-ended UX exploration, generate distinct, compact, complete HTML
|
|
328
|
-
directions (2-5, three by default) and call \`present-design-variants\`. Each
|
|
329
|
-
direction should be one representative screen or directional snapshot, not a
|
|
330
|
-
full app per variant. Design saves every option as a normal screen on the
|
|
331
|
-
overview board and renders an inline chat choice with one button per screen
|
|
332
|
-
name. After the user picks, delete the unchosen variant screens and continue
|
|
333
|
-
from the kept screen by first calling \`get-design-snapshot\` with that
|
|
334
|
-
screen's \`fileId\`, then calling \`edit-design\` on that same \`fileId\` in a
|
|
335
|
-
bounded single-file pass. Use \`mode: "replace-file"\` when expanding the
|
|
336
|
-
representative placeholder into the full chosen direction. Do not call
|
|
337
|
-
\`generate-design\` after a variant pick.
|
|
338
|
-
- If the chat choice buttons are not available in the host, ask the user to
|
|
339
|
-
tell you the screen name they prefer. The variants are already real screens
|
|
340
|
-
on the board, so do not ask them to paste HTML or copy a generated handoff
|
|
341
|
-
summary.
|
|
342
|
-
- For direct refinements to an already chosen direction, call
|
|
343
|
-
\`get-design-snapshot\`, edit from the current tuned HTML, and use
|
|
344
|
-
\`edit-design\` for surgical changes or \`mode: "replace-file"\` for a bounded
|
|
345
|
-
selected-file replacement. Use \`generate-design\` for new files only.
|
|
346
|
-
- Use \`export-coding-handoff\` when the user wants to implement the chosen
|
|
347
|
-
design in a codebase.
|
|
348
|
-
|
|
349
|
-
## Exploration Defaults
|
|
350
|
-
|
|
351
|
-
1. Default to three variants unless the user asks for a different count
|
|
352
|
-
(\`present-design-variants\` accepts 2-5; three is the sweet spot).
|
|
353
|
-
2. Make variants structurally and stylistically distinct, not just color swaps.
|
|
354
|
-
3. Each variant must be a compact, complete standalone HTML document that
|
|
355
|
-
renders without a build step.
|
|
356
|
-
4. For product UI redesigns, prefer cleaner hierarchy, progressive disclosure,
|
|
357
|
-
and realistic controls over decorative mockups.
|
|
358
|
-
5. After \`present-design-variants\`, wait for the user's pick before
|
|
359
|
-
generating the next version. Keep the chosen screen, delete the other
|
|
360
|
-
variant screens, call \`get-design-snapshot\` with \`fileId\` for the kept
|
|
361
|
-
screen, then call \`edit-design\` on that same \`fileId\` in a bounded pass.
|
|
362
|
-
Use \`mode: "replace-file"\` when expanding the representative placeholder
|
|
363
|
-
into the full chosen direction. Do not call \`generate-design\` after a
|
|
364
|
-
variant pick. Stop after the first successful \`edit-design\` save.
|
|
365
|
-
|
|
366
|
-
## Design Quality Bar
|
|
367
|
-
|
|
368
|
-
Generic "AI slop" comes from letting one prompt set taste, explore, and emit code
|
|
369
|
-
at once — so the model returns the training-average (Inter, an indigo/violet
|
|
370
|
-
gradient, a centered hero, three rounded cards). The variant flow above exists to
|
|
371
|
-
separate those jobs; use it, and hold this bar:
|
|
372
|
-
|
|
373
|
-
- Before generating, name the concrete audience, the screen's primary job, and
|
|
374
|
-
the visual thesis. If the brief is vague, make a reasonable choice and state
|
|
375
|
-
it instead of producing a generic dashboard/landing-page default.
|
|
376
|
-
- Refuse the defaults, and pair every "don't" with a "do" (banning Inter alone
|
|
377
|
-
just makes you reach for Roboto). Avoid Inter/Roboto/system fonts, the
|
|
378
|
-
indigo/violet slop palette (\`#6366F1\`/\`#8B5CF6\`/\`#A855F7\`) and purple-on-white
|
|
379
|
-
gradients, and centered-hero + three-icon-card layouts; instead pick a
|
|
380
|
-
distinctive font pairing, one non-default palette family with a single decisive
|
|
381
|
-
accent, and an asymmetric layout with a clear focal point.
|
|
382
|
-
- Make each direction distinct in structure and behavior, not just palette.
|
|
383
|
-
Give every variant one memorable signature choice, then keep the surrounding
|
|
384
|
-
chrome disciplined. Even your creative picks converge (Space Grotesk
|
|
385
|
-
everywhere) — vary deliberately so two directions never share a fingerprint.
|
|
386
|
-
- For existing products, inspect the current screen, design system, tokens, and
|
|
387
|
-
component language before inventing a new direction. Treat any drift back to a
|
|
388
|
-
default as a missing token to pin, and vary layout per screen so on-brand does
|
|
389
|
-
not become same-in-your-colors.
|
|
390
|
-
- Treat copy, data, and imagery as design material. Use realistic domain
|
|
391
|
-
content and first-party/generated assets when images matter; avoid lorem
|
|
392
|
-
ipsum, vague SaaS filler, and decorative placeholder boxes.
|
|
393
|
-
- Build to a quiet quality floor: responsive desktop/mobile layout, visible
|
|
394
|
-
keyboard focus, useful loading/empty/error states for app UI, and reduced
|
|
395
|
-
motion support when custom motion is present.
|
|
396
|
-
- After broad generation or refinement, inspect the rendered Design surface or
|
|
397
|
-
a screenshot-capable host before calling it ready. Fix obvious hierarchy,
|
|
398
|
-
overflow, contrast, broken interaction, and placeholder-content issues first.
|
|
399
|
-
|
|
400
|
-
## Cross-App Use
|
|
401
|
-
|
|
402
|
-
- Hosted default: connect \`https://design.agent-native.com/_agent-native/mcp\`.
|
|
403
|
-
Do not put shared secrets in skill files.
|
|
404
|
-
- For CLI/code-editor clients, keep any \`npx @agent-native/core@latest connect\` command
|
|
405
|
-
running until browser authorization finishes. Stopping it early can leave the
|
|
406
|
-
browser approved but the local MCP config unwritten. Restart or reload the
|
|
407
|
-
agent client after installing or connecting if Design tools do not appear in
|
|
408
|
-
the live session.
|
|
409
|
-
- Dispatch can expose Design alongside other apps. Use Design for UI/UX design
|
|
410
|
-
tasks, Assets for image/media selection, Slides for decks, and so on.
|
|
411
|
-
- Keep the loop visual: surface the inline MCP App or the returned "Open
|
|
412
|
-
design" link instead of pasting large HTML blobs into chat.
|
|
413
|
-
- If a Design tool call returns \`Session terminated\`, \`needs auth\`, or
|
|
414
|
-
another connector/session error, do not keep retrying the tool. Stop and give
|
|
415
|
-
the user the reconnect step: in Claude Code run \`/mcp\` and choose
|
|
416
|
-
Authenticate/Reconnect for the Design connector; from any terminal run
|
|
417
|
-
\`npx -y @agent-native/core@latest reconnect https://design.agent-native.com\` — this
|
|
418
|
-
re-authenticates WITHOUT reinstalling. Never reinstall from scratch just to fix
|
|
419
|
-
auth. Continue once the connector is available.
|
|
420
|
-
- Do not hand-roll MCP HTTP requests with curl from the agent session. Use the
|
|
421
|
-
host-exposed Design tools after restart/reload, or use the returned
|
|
422
|
-
browser/deep-link fallback.
|
|
423
|
-
- If you inspect local MCP config, redact \`Authorization\`, \`http_headers\`,
|
|
424
|
-
and token values. Never paste bearer tokens into chat or logs.
|
|
425
|
-
`;
|
|
426
|
-
|
|
427
|
-
const DESIGN_VISUAL_EDIT_SKILL_MD = `---
|
|
428
|
-
name: visual-edit
|
|
429
|
-
description: >-
|
|
430
|
-
Open a running local app in Design overview mode as URL-backed iframe screens
|
|
431
|
-
for visual editing, flow review, duplication, and route-state exploration.
|
|
432
|
-
Use when the user asks to inspect, compare, or edit a real local app visually
|
|
433
|
-
in Design.
|
|
434
|
-
metadata:
|
|
435
|
-
visibility: exported
|
|
436
|
-
---
|
|
437
|
-
|
|
438
|
-
# Visual Edit
|
|
439
|
-
|
|
440
|
-
Use \`/visual-edit\` when the user wants to inspect or edit a real local app
|
|
441
|
-
visually instead of generating standalone Alpine HTML. The source of truth is
|
|
442
|
-
the running localhost app plus its route URLs. Design shows those routes as
|
|
443
|
-
iframe-backed screens on the infinite canvas.
|
|
444
|
-
|
|
445
|
-
## Core Model
|
|
446
|
-
|
|
447
|
-
- Each screen is a URL-backed iframe, not copied HTML.
|
|
448
|
-
- Each screen keeps URL metadata: \`connectionId\`, \`routeId\`, \`path\`,
|
|
449
|
-
\`url\`, \`bridgeUrl\`, title, and viewport size.
|
|
450
|
-
- Start in Design's screen overview mode. In overview, screens are static
|
|
451
|
-
design frames; full-screen focus is for scrolling and app interaction.
|
|
452
|
-
- Alt-drag duplicates a screen. For localhost screens, duplication copies the
|
|
453
|
-
iframe frame and URL metadata; change the copy's path/query for a new state.
|
|
454
|
-
- Flow visualization is multiple URL states: \`/checkout?step=shipping\`,
|
|
455
|
-
\`/checkout?step=payment\`, \`/checkout?step=done\`, etc.
|
|
456
|
-
- When the user gives a named flow or numbered screen list, preserve that order
|
|
457
|
-
and create one screen per URL/path. Shorthand like
|
|
458
|
-
\`localhost:1234/onboarding/1\` means
|
|
459
|
-
\`http://localhost:1234/onboarding/1\`.
|
|
460
|
-
|
|
461
|
-
## Review Quality
|
|
462
|
-
|
|
463
|
-
- Treat the running app as the truth. Preserve its component language, tokens,
|
|
464
|
-
route state, and real content unless the user explicitly asks for a new visual
|
|
465
|
-
direction.
|
|
466
|
-
- Use multiple URL states to reveal meaningful UX moments: empty/loading/error
|
|
467
|
-
states, focused panels, modals, responsive breakpoints, and completed flow
|
|
468
|
-
steps when those matter to the review.
|
|
469
|
-
- For visual edits, compare before/after at the relevant viewport sizes and
|
|
470
|
-
check key hover/focus/scroll states when the app exposes them.
|
|
471
|
-
|
|
472
|
-
## Account And Sharing Model
|
|
473
|
-
|
|
474
|
-
- The \`/visual-edit\` entry route can open before the viewer signs in. Public
|
|
475
|
-
\`/design/:id\` editor links can also render read-only public designs without a
|
|
476
|
-
session.
|
|
477
|
-
- Prefer links returned by Design actions or \`/_agent-native/open\` deep links.
|
|
478
|
-
Do not surface URLs with \`_session=\` tokens. Query sessions are only a
|
|
479
|
-
fallback after normal cookie resolution, so an existing browser session can
|
|
480
|
-
still open the design as a different user and show "Design not found".
|
|
481
|
-
- Do not attempt anonymous write actions. Bridge registration, design creation,
|
|
482
|
-
screen placement, generation, saving, and sharing are account-backed. If a
|
|
483
|
-
signed-out visitor wants to save or share, send them through the framework
|
|
484
|
-
sign-in return flow, then save or copy the design into that account before
|
|
485
|
-
opening the share dialog.
|
|
486
|
-
|
|
487
|
-
## Required Local Bridge
|
|
488
|
-
|
|
489
|
-
The live-edit bridge is unlocked by a shared secret (the "bridge token") that
|
|
490
|
-
must match on two sides: the local bridge process, and the user's connection row
|
|
491
|
-
in Design (which the browser reads to authorize \`/live-edit-bridge\`,
|
|
492
|
-
\`/read-file\`, \`/write-file\`). Get them to match by letting the
|
|
493
|
-
**authenticated** \`open-visual-edit\` action mint the token, then starting the
|
|
494
|
-
bridge with it. This is the only ordering that works for the remote-MCP flow —
|
|
495
|
-
the bridge cannot push its own token to the server without a CLI auth token, so
|
|
496
|
-
the server mints instead and the bridge adopts.
|
|
497
|
-
|
|
498
|
-
From the target app repo, make sure its dev server is running, then:
|
|
499
|
-
|
|
500
|
-
**1. Discover routes without starting a durable bridge** (one-shot, exits):
|
|
501
|
-
|
|
502
|
-
\`\`\`bash
|
|
503
|
-
npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --json
|
|
504
|
-
\`\`\`
|
|
505
|
-
|
|
506
|
-
This prints the manifest (routes + capabilities). Parse it to build
|
|
507
|
-
\`routeManifest\` for the next step. (Skip this if the user already gave explicit
|
|
508
|
-
paths/URLs to place.)
|
|
509
|
-
|
|
510
|
-
**2. Call \`open-visual-edit\`** (see Action Flow below) with NO \`bridgeToken\`.
|
|
511
|
-
The server mints one, stores it on the user's connection row, copies it into the
|
|
512
|
-
placed screens' metadata, and returns it to you as \`bridgeToken\`. Capture it.
|
|
513
|
-
|
|
514
|
-
**3. Start the persistent bridge adopting that token** (single line; prefer the
|
|
515
|
-
env var so the secret does not appear in \`ps\`):
|
|
516
|
-
|
|
517
|
-
\`\`\`bash
|
|
518
|
-
AGENT_NATIVE_BRIDGE_TOKEN="<bridgeToken from step 2>" npx @agent-native/core@latest design connect --url http://localhost:5173 --root . --daemon
|
|
519
|
-
\`\`\`
|
|
520
|
-
|
|
521
|
-
(Equivalently, pass \`--bridge-token <token>\`.) This starts a detached bridge on
|
|
522
|
-
\`http://127.0.0.1:7331\`, adopts the server-minted token — so bridge and row
|
|
523
|
-
agree and live-edit authorizes with no self-registration — and stays alive after
|
|
524
|
-
the command exits.
|
|
525
|
-
|
|
526
|
-
For a manual health/manifest check on the running bridge:
|
|
527
|
-
|
|
528
|
-
\`\`\`bash
|
|
529
|
-
curl http://127.0.0.1:7331/manifest.json
|
|
530
|
-
\`\`\`
|
|
531
|
-
|
|
532
|
-
Only use \`--json\` for the step-1 route probe. Never use \`--json\`, \`--once\`,
|
|
533
|
-
or \`--dry-run\` for the durable step-3 bridge: they print the manifest and exit,
|
|
534
|
-
so Design falls back to a non-editable live iframe.
|
|
535
|
-
|
|
536
|
-
## Action Flow
|
|
537
|
-
|
|
538
|
-
Prefer the single authenticated \`open-visual-edit\` action. It registers or
|
|
539
|
-
refreshes the localhost bridge connection, mints and stores the bridge token,
|
|
540
|
-
creates or reuses a Design project, places URL-backed screens, stores the active
|
|
541
|
-
visual-edit context, and navigates to overview mode in one call. This avoids
|
|
542
|
-
creating a private design under a synthetic CLI user and then handing the browser
|
|
543
|
-
a tokenized URL that may be shadowed by an existing session.
|
|
544
|
-
|
|
545
|
-
Call it BEFORE starting the durable bridge (step 3 above): it does not contact
|
|
546
|
-
the bridge, so the bridge need not be running yet, and you need its returned
|
|
547
|
-
\`bridgeToken\` to start the bridge with a matching secret. Omit \`bridgeToken\`
|
|
548
|
-
on the call so the server mints one.
|
|
549
|
-
|
|
550
|
-
\`\`\`bash
|
|
551
|
-
pnpm action open-visual-edit '{
|
|
552
|
-
"title": "Docs homepage visual edit",
|
|
553
|
-
"devServerUrl": "http://localhost:5173",
|
|
554
|
-
"bridgeUrl": "http://127.0.0.1:7331",
|
|
555
|
-
"rootPath": "/absolute/path/to/app",
|
|
556
|
-
"routeManifest": { "...": "from /manifest.json" },
|
|
557
|
-
"paths": ["/", "/pricing", "/checkout?step=payment"]
|
|
558
|
-
}'
|
|
559
|
-
\`\`\`
|
|
560
|
-
|
|
561
|
-
The action returns \`designId\`, \`connectionId\`, \`bridgeToken\`, \`screens\`,
|
|
562
|
-
\`urlPath\`, and \`openUrl\`. Keep \`designId\`/\`connectionId\` in the chat context
|
|
563
|
-
for follow-ups, and pass \`bridgeToken\` to \`design connect\` (step 3) to start
|
|
564
|
-
the bridge. On follow-up calls reusing an existing \`connectionId\`, the same
|
|
565
|
-
token is returned (it is minted once and reused), so the running bridge stays
|
|
566
|
-
valid.
|
|
567
|
-
|
|
568
|
-
For a numbered flow the user describes in chat, keep the labels and order:
|
|
569
|
-
|
|
570
|
-
\`\`\`bash
|
|
571
|
-
pnpm action open-visual-edit '{
|
|
572
|
-
"designId": "<existing-design-id>",
|
|
573
|
-
"connectionId": "<existing-connection-id>",
|
|
574
|
-
"devServerUrl": "http://localhost:1234",
|
|
575
|
-
"routes": [
|
|
576
|
-
{ "url": "localhost:1234/onboarding/1", "title": "Screen 1" },
|
|
577
|
-
{ "url": "localhost:1234/onboarding/2", "title": "Screen 2" },
|
|
578
|
-
{ "url": "localhost:1234/onboarding/3", "title": "Screen 3" }
|
|
579
|
-
]
|
|
580
|
-
}'
|
|
581
|
-
\`\`\`
|
|
582
|
-
|
|
583
|
-
For responsive follow-ups, call \`open-visual-edit\` again with the same
|
|
584
|
-
\`designId\` and \`connectionId\`, plus explicit viewport dimensions:
|
|
585
|
-
|
|
586
|
-
\`\`\`bash
|
|
587
|
-
pnpm action open-visual-edit '{
|
|
588
|
-
"designId": "<existing-design-id>",
|
|
589
|
-
"connectionId": "<existing-connection-id>",
|
|
590
|
-
"devServerUrl": "http://localhost:5173",
|
|
591
|
-
"paths": ["/"],
|
|
592
|
-
"defaultWidth": 390,
|
|
593
|
-
"defaultHeight": 844,
|
|
594
|
-
"startX": 1600,
|
|
595
|
-
"startY": 0
|
|
596
|
-
}'
|
|
597
|
-
\`\`\`
|
|
598
|
-
|
|
599
|
-
If no \`routes\` or \`paths\` are supplied, \`open-visual-edit\` uses every route
|
|
600
|
-
from the localhost manifest.
|
|
601
|
-
|
|
602
|
-
Fallback, only when \`open-visual-edit\` is unavailable:
|
|
603
|
-
|
|
604
|
-
1. Register or refresh the bridge with \`connect-localhost\`, passing the
|
|
605
|
-
\`/manifest.json\` result as \`routeManifest\` and \`capabilities\`.
|
|
606
|
-
2. Create or reuse a Design project with \`create-design\`.
|
|
607
|
-
3. Place URL-backed screens with \`add-localhost-screens\`.
|
|
608
|
-
4. Navigate to overview mode with \`navigate\`.
|
|
609
|
-
|
|
610
|
-
## Open The Design Surface
|
|
611
|
-
|
|
612
|
-
- Use the \`link\`, \`deepLink\`, or MCP App embed returned by Design actions so
|
|
613
|
-
the user sees the canvas. In Codex Desktop or VS Code, prefer opening that
|
|
614
|
-
Design URL in the available preview/webview panel; otherwise surface the
|
|
615
|
-
"Open design" link.
|
|
616
|
-
- Return or open the \`openUrl\` / action link, not a hand-built
|
|
617
|
-
\`/design/:id?_session=...\` URL.
|
|
618
|
-
- If the user is working in VS Code, the Agent Native extension can open the
|
|
619
|
-
same URL via
|
|
620
|
-
\`vscode://builder.agent-native/open?url=<encoded-design-url>\`. Its
|
|
621
|
-
\`Agent Native: Open Design Canvas\` command also starts the local bridge and
|
|
622
|
-
opens hosted Design in the VS Code side panel.
|
|
623
|
-
- After \`add-localhost-screens\`, confirm the Design editor is in overview mode
|
|
624
|
-
with the requested URL-backed frames visible. Do not stop at "screens added"
|
|
625
|
-
when the user asked to inspect or edit visually.
|
|
626
|
-
|
|
627
|
-
## Editing URLs
|
|
628
|
-
|
|
629
|
-
Keep localhost screens as URL files plus \`screenMetadata[fileId]\`. Do not
|
|
630
|
-
replace them with copied \`srcdoc\` HTML unless the user explicitly asks for a
|
|
631
|
-
frozen snapshot. To change a state, rerun \`add-localhost-screens\` with the new
|
|
632
|
-
path/query or duplicate the screen and update the copy's URL metadata.
|
|
633
|
-
|
|
634
|
-
## React Source Writeback
|
|
635
|
-
|
|
636
|
-
- Use compiler/debug provenance (project-relative file, line, column,
|
|
637
|
-
component, and runtime multiplicity) to locate React/TSX source. Treat it as
|
|
638
|
-
evidence, not as permission for a generic AST structural transform.
|
|
639
|
-
- Reparenting, grouping/ungrouping, wrappers, dynamic expressions, repeated
|
|
640
|
-
\`.map()\` instances, shared components, and cross-file changes go through the
|
|
641
|
-
coding agent with exact subject/target anchors and their runtime
|
|
642
|
-
relationship.
|
|
643
|
-
- Before each write, read the file and pass its exact \`versionHash\` to
|
|
644
|
-
\`write-local-file\` with \`requireExpectedVersionHash: true\`; on conflict,
|
|
645
|
-
re-read and re-plan. Keep the optimistic preview until HMR/runtime confirms
|
|
646
|
-
the result. Human write consent remains mandatory and agents cannot grant it.
|
|
647
|
-
|
|
648
|
-
## Verification
|
|
649
|
-
|
|
650
|
-
- \`list-localhost-connections\` returns the expected connection and routes.
|
|
651
|
-
- The Design editor opens in overview mode.
|
|
652
|
-
- Every requested screen renders the intended localhost URL.
|
|
653
|
-
- Alt-dragging a screen copies the URL-backed frame, not an inline HTML clone.
|
|
654
|
-
`;
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Setup/auth block for the `/visual-plan` skill. Interpolated into
|
|
658
|
-
* `VISUAL_PLANS_SKILL_MD` below so the install + one-step authenticate
|
|
659
|
-
* instructions are single-sourced. The materialized SKILL.md copies under
|
|
660
|
-
* `templates/plan/.agents/skills/*`, top-level `skills/*`, and
|
|
661
|
-
* `.agents/skills/*` are guarded byte-identical by `skills.sync.spec.ts`.
|
|
662
|
-
*/
|
|
663
|
-
const PLAN_SETUP_AUTH_MD = `## Setup & Authentication
|
|
664
|
-
|
|
665
|
-
There are two ways into Plans.
|
|
666
|
-
|
|
667
|
-
**Coding agent (CLI).** Install once with the Agent-Native CLI. The command
|
|
668
|
-
installs the Plans skills, registers the hosted Plans MCP connector, and runs
|
|
669
|
-
auth/setup for the selected local client(s) in the same step (a one-time browser
|
|
670
|
-
sign-in at setup — this is intended), so the first tool call in that client does
|
|
671
|
-
not hit an OAuth wall:
|
|
672
|
-
|
|
673
|
-
\`\`\`bash
|
|
674
|
-
npx @agent-native/core@latest skills add visual-plans
|
|
675
|
-
\`\`\`
|
|
676
|
-
|
|
677
|
-
After that, \`/visual-plan\`, \`/visual-recap\`, and \`/visualize-repo\` are the
|
|
678
|
-
installed slash commands. If you only need one command, use
|
|
679
|
-
\`skills add visual-plan\`, \`skills add visual-recap\`, or
|
|
680
|
-
\`skills add visualize-repo\` instead. The other planning modes
|
|
681
|
-
(\`create-ui-plan\`, \`create-prototype-plan\`, \`create-plan-design\`,
|
|
682
|
-
\`create-visual-questions\`) are MCP tools reachable from \`/visual-plan\`, not
|
|
683
|
-
separate slash commands. Pass \`--no-connect\` to register the connector without
|
|
684
|
-
authenticating, then run
|
|
685
|
-
\`npx @agent-native/core@latest connect https://plan.agent-native.com --client all\`
|
|
686
|
-
whenever you are ready, or choose a narrower \`--client\`. Auth and MCP tool
|
|
687
|
-
loading are per client config/session.
|
|
688
|
-
|
|
689
|
-
**Local-only / text installs.** If the user wants no sharing and all local files,
|
|
690
|
-
install with \`--mode local-files\`:
|
|
691
|
-
|
|
692
|
-
\`\`\`bash
|
|
693
|
-
npx @agent-native/core@latest skills add visual-plans --mode local-files
|
|
694
|
-
\`\`\`
|
|
695
|
-
|
|
696
|
-
This mode does not register the Plan MCP connector. Before authoring structured
|
|
697
|
-
MDX, fetch the no-auth, schema-only block catalog with
|
|
698
|
-
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\`, read that file,
|
|
699
|
-
write the MDX folder locally, run \`plan local check\`, then run \`plan local serve\`.
|
|
700
|
-
For repo-wide visual docs, run
|
|
701
|
-
\`npx @agent-native/core@latest visualize-repo --open\` to create/update
|
|
702
|
-
\`agent-native.json\`, seed \`.agent-native/visual-docs/repo-overview\`, and open
|
|
703
|
-
the local bridge.
|
|
704
|
-
Plain text skill
|
|
705
|
-
installs (Vercel Skills CLI, copied GitHub files, etc.) can follow that same
|
|
706
|
-
local flow if \`@agent-native/core\` is available. Text alone cannot register
|
|
707
|
-
MCP tools; hosted/shareable Plans still need the Agent-Native CLI
|
|
708
|
-
install/reconnect step above.
|
|
709
|
-
|
|
710
|
-
**Browser (people you share with).** Open the Plans editor and create & edit
|
|
711
|
-
with no sign-up — you work as a guest. Sign in only when you want to save or
|
|
712
|
-
share; signing in claims the plans you made as a guest into your account.
|
|
713
|
-
|
|
714
|
-
Sharing and commenting require an account: public/shared plans are viewable by
|
|
715
|
-
anyone with the link, but commenting on them needs an agent-native account.
|
|
716
|
-
|
|
717
|
-
For no-account, no-DB plan storage, use local-files mode and the local bridge
|
|
718
|
-
command. The optional \`plan blocks\` lookup reads only public schema metadata.
|
|
719
|
-
If network access is unavailable, use the bundled references and a local Plan
|
|
720
|
-
app/runtime for validation.
|
|
721
|
-
|
|
722
|
-
If a Plans tool returns \`needs auth\`, \`Unauthorized\`, or \`Session terminated\`,
|
|
723
|
-
do not keep retrying the tool. Stop and give the user the reconnect step for the
|
|
724
|
-
client they are using: Codex/Codex Desktop should run
|
|
725
|
-
\`npx -y @agent-native/core@latest reconnect https://plan.agent-native.com --client codex\`
|
|
726
|
-
and start a new Codex session; Claude Code should run \`/mcp\` and choose
|
|
727
|
-
Authenticate/Reconnect for the plan connector, or run the reconnect command with
|
|
728
|
-
\`--client claude-code\` and restart Claude. To refresh every local client config
|
|
729
|
-
that already has the Plan entry, use \`--client all\`, then restart/reload each
|
|
730
|
-
client. Reconnect re-authenticates WITHOUT reinstalling and finds the entry by
|
|
731
|
-
URL regardless of connector name. Never reinstall from scratch just to fix auth.
|
|
732
|
-
Continue once the connector is available.
|
|
733
|
-
|
|
734
|
-
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
|
|
735
|
-
not put shared secrets in skill files.`;
|
|
736
|
-
|
|
737
|
-
// Single-source shared cores. Each partial is a heading-less BODY string that
|
|
738
|
-
// begins and ends with its own SHARED-CORE marker comment, so the marker-region
|
|
739
|
-
// sync guard can extract and compare it across the skills that consume it. The
|
|
740
|
-
// skill constants below interpolate these partials at module-eval time; the
|
|
741
|
-
// distributed artifact stays a flat string, so distribution is unchanged.
|
|
742
|
-
//
|
|
743
|
-
// Consumers:
|
|
744
|
-
// WIREFRAME_QUALITY_CORE — visual-plan, visual-recap (surface-agnostic)
|
|
745
|
-
// CANVAS_SURFACE_CORE — visual-plan modes (canvas/artboard mechanics)
|
|
746
|
-
// DOCUMENT_QUALITY_CORE — visual-plan
|
|
747
|
-
// EXEMPLAR_CORE — visual-plan
|
|
748
|
-
|
|
749
|
-
// Surface-agnostic HTML wireframe quality rules. Applies equally to a standalone
|
|
750
|
-
// WireframeBlock/<Screen> (visual-recap) and to a canvas artboard (visual-plan).
|
|
751
|
-
// Do not put canvas/artboard placement mechanics here.
|
|
752
|
-
const WIREFRAME_QUALITY_CORE = `<!-- SHARED-CORE:wireframe-quality START -->
|
|
753
|
-
|
|
754
|
-
**A wireframe is an HTML mockup. The renderer owns the look; you write the
|
|
755
|
-
content.** Set \`data.html\` to a self-contained, semantic HTML fragment of the
|
|
756
|
-
screen and set \`data.surface\`. The renderer owns the surface footprint/aspect,
|
|
757
|
-
the dark/light theme, the hand-drawn font, and the rough.js sketch overlay — you
|
|
758
|
-
never write \`<html>\`/\`<body>\`/\`<script>\`/\`<style>\` tags or any
|
|
759
|
-
width/height/coordinates. You write real HTML layout and real product
|
|
760
|
-
content; the renderer styles and roughens it.
|
|
761
|
-
|
|
762
|
-
**A wireframe block's data is an HTML screen plus a surface:**
|
|
763
|
-
|
|
764
|
-
\`\`\`json
|
|
765
|
-
{
|
|
766
|
-
"surface": "browser",
|
|
767
|
-
"html": "<div style=\\"display:flex;flex-direction:column;gap:10px;padding:16px;height:100%\\"><h1>Sign in</h1><p class=\\"wf-muted\\">Use your work email to continue.</p><div class=\\"wf-card\\" style=\\"display:flex;flex-direction:column;gap:10px\\"><label>Email<input value=\\"jane@acme.co\\" /></label><label>Password<input value=\\"••••••••\\" /></label><label style=\\"display:flex;align-items:center;gap:8px\\"><input type=\\"checkbox\\" checked /> Remember me</label><button class=\\"primary\\">Sign in</button></div><a href=\\"#\\">Forgot password?</a></div>"
|
|
768
|
-
}
|
|
769
|
-
\`\`\`
|
|
770
|
-
|
|
771
|
-
**Write PLAIN semantic HTML and let the renderer style it.** Bare elements
|
|
772
|
-
(\`h1\`/\`h2\`/\`h3\`, \`p\`, \`button\`, \`input\`, \`<input type="checkbox">\`, \`a\`, \`hr\`)
|
|
773
|
-
are auto-themed — no classes needed. Helper classes carry the rest:
|
|
774
|
-
|
|
775
|
-
- \`.wf-card\` / \`.wf-box\` — a bordered, padded container (a panel, a list item).
|
|
776
|
-
- \`.wf-pill\` / \`.wf-chip\` — a rounded tag or filter; add \`.accent\`
|
|
777
|
-
(\`<span class="wf-pill accent">\`) for the accent-filled variant.
|
|
778
|
-
- \`.wf-muted\` — secondary/muted text (or use \`<small>\`).
|
|
779
|
-
- \`button.primary\` or any element with \`[data-primary]\` — the accent-filled
|
|
780
|
-
primary button.
|
|
781
|
-
|
|
782
|
-
**No decorative shadows around mockups.** Do not put \`box-shadow\`, \`filter:
|
|
783
|
-
drop-shadow(...)\`, Tailwind \`shadow-*\` classes, or other fake depth effects on a
|
|
784
|
-
wireframe frame, root container, \`.wf-card\` / \`.wf-box\`, or canvas artboard.
|
|
785
|
-
Mockups should read as flat, bordered surfaces; use spacing, borders, labels,
|
|
786
|
-
and annotations for separation. Only show a shadow when the real product UI
|
|
787
|
-
already has that shadow and it is essential to the change being reviewed.
|
|
788
|
-
|
|
789
|
-
**Use renderer icons, not visible icon words.** For icon-only buttons or leading
|
|
790
|
-
icons inside fields, chips, menu items, and toolbars, write an empty marker such
|
|
791
|
-
as \`<span data-icon="mail" aria-label="Email"></span>\` or
|
|
792
|
-
\`<i data-icon="lock"></i>\`. The renderer replaces it with a Tabler-style SVG and
|
|
793
|
-
the \`.wf-icon\` class sizes it to the surrounding text. Supported names and
|
|
794
|
-
aliases: \`mail\`/\`email\`, \`lock\`/\`password\`, \`search\`, \`plus\`/\`add\`, \`x\`/\`close\`,
|
|
795
|
-
\`check\`, \`chevronDown\`, \`chevronUp\`, \`chevronLeft\`, \`chevronRight\`, \`dots\`/\`more\`,
|
|
796
|
-
\`chevron\`/\`caret\`/\`dropdown\` (down chevron), \`user\`, \`settings\`, \`calendar\`,
|
|
797
|
-
\`bell\`, \`send\`, \`edit\`, \`arrowLeft\`, and \`arrowRight\`. Do not put visible words
|
|
798
|
-
like "email", "lock", "search", "chevron", or "more" where the product UI would
|
|
799
|
-
show an icon; use text only when it is a real label a user would read.
|
|
800
|
-
|
|
801
|
-
**Use the \`--wf-*\` tokens for any custom color, never hex.** The renderer flips
|
|
802
|
-
these on light/dark, so reading them is what keeps a mockup correct in both
|
|
803
|
-
themes. For any inline border, background, or text color, reference a token:
|
|
804
|
-
\`style="border:1.4px solid var(--wf-line)"\`. The tokens are \`--wf-ink\` (text),
|
|
805
|
-
\`--wf-muted\` (secondary text), \`--wf-line\` (borders/dividers), \`--wf-paper\`
|
|
806
|
-
(page background), \`--wf-card\` (container surface), \`--wf-accent\` /
|
|
807
|
-
\`--wf-accent-fg\` / \`--wf-accent-soft\` (brand action), \`--wf-warn\`, \`--wf-ok\`,
|
|
808
|
-
and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
|
|
809
|
-
renderer owns the sketch/clean font.
|
|
810
|
-
|
|
811
|
-
**Never use host/Tailwind theme classes in wireframe HTML.** Classes such as
|
|
812
|
-
\`bg-white\`, \`bg-zinc-50\`, \`bg-slate-950\`, \`text-zinc-950\`,
|
|
813
|
-
\`text-slate-400\`, \`border-zinc-200\`, \`hover:bg-slate-800\`, \`shadow-xl\`,
|
|
814
|
-
or arbitrary color utilities like \`bg-[#fff]\` leak the host app's CSS into the
|
|
815
|
-
mockup and can make dark-mode canvas frames unreadable. Use bare semantic
|
|
816
|
-
elements, \`.wf-*\` helper classes, and \`--wf-*\` color tokens instead. Before
|
|
817
|
-
publishing, scan every wireframe \`class\` and \`style\` attribute: if a class sets
|
|
818
|
-
background, text, border, ring, fill, stroke, gradient, placeholder, decoration,
|
|
819
|
-
or shadow color, rewrite it to renderer tokens or remove it. Layout-only classes
|
|
820
|
-
are still discouraged; inline flex/grid styles are safer and easier to review.
|
|
821
|
-
|
|
822
|
-
**Keep Rough.js sparse.** The renderer sketches the outer frame, standard
|
|
823
|
-
\`.wf-*\` primitives, controls, and inline border dividers by default. Do not add
|
|
824
|
-
\`data-rough\` to broad root wrappers, dialog shells, page panels, grid cells, or
|
|
825
|
-
nested containers unless that single container is the visual point. Use
|
|
826
|
-
\`data-rough\` only for a deliberate one-off shape. If a mockup starts looking
|
|
827
|
-
like stacked/overlapping sketch lines, remove rough targets from parent
|
|
828
|
-
containers and let backgrounds plus spacing separate the surfaces.
|
|
829
|
-
|
|
830
|
-
**Use literal CSS lengths for spacing.** The \`--wf-*\` tokens are for colors and
|
|
831
|
-
renderer-owned visual styling, not layout spacing. Do not use guessed spacing
|
|
832
|
-
tokens such as \`var(--wf-space-4)\`, Tailwind spacing classes, or theme spacing
|
|
833
|
-
variables inside wireframe HTML; if a token is unavailable in the Plan renderer,
|
|
834
|
-
padding collapses and content hugs the border. Use explicit CSS lengths for
|
|
835
|
-
layout: \`padding:16px\`, \`gap:12px\`, \`margin-top:18px\`, \`minmax(0,1fr)\`.
|
|
836
|
-
|
|
837
|
-
**Lay out with inline \`style\` flex/grid.** You write the real layout —
|
|
838
|
-
\`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
|
|
839
|
-
renderer never repositions anything. Compose the actual product: reproduce the
|
|
840
|
-
current screen, then show the modification. Real labels, real counts, real dates,
|
|
841
|
-
real button text grounded in the screen you read; not lorem or gray bars.
|
|
842
|
-
|
|
843
|
-
**Surface presets — match the real footprint, never default to desktop+mobile.**
|
|
844
|
-
Pick the \`surface\` that matches what the user will actually see:
|
|
845
|
-
|
|
846
|
-
- \`browser\`: a web page that needs a browser chrome frame around it.
|
|
847
|
-
- \`desktop\`: a full desktop app page or app shell.
|
|
848
|
-
- \`mobile\`: a phone screen, only when the work is genuinely mobile.
|
|
849
|
-
- \`popover\`: a small floating menu, dropdown, or inline popover.
|
|
850
|
-
- \`panel\`: a side panel, inspector, or sidebar widget.
|
|
851
|
-
|
|
852
|
-
A sidebar popover renders as a small surface, not a desktop page and a phone
|
|
853
|
-
frame. Do not emit \`desktop\` + \`mobile\` variants unless responsive behavior
|
|
854
|
-
actually changes the layout. For a component or widget, show one broader
|
|
855
|
-
app-context frame only when placement affects understanding, then the focused
|
|
856
|
-
component states.
|
|
857
|
-
|
|
858
|
-
**Model the actual component shell for small surfaces.** A rendered UI change
|
|
859
|
-
belongs in a wireframe; reserve \`diagram\` for architecture, dependency, state,
|
|
860
|
-
or data-flow relationships. Popovers, dropdown menus, command palettes, and
|
|
861
|
-
context menus use \`surface: "popover"\` unless the surrounding page placement is
|
|
862
|
-
the point of the change. Dialogs, sheets, inspectors, sidebars, and long
|
|
863
|
-
property panels use the matching \`panel\` / \`desktop\` surface as appropriate.
|
|
864
|
-
Show the real chrome: trigger or anchor when it matters, title/header row,
|
|
865
|
-
top-right actions, separators, fields, options, selected states, body content,
|
|
866
|
-
and footer actions that are visible in the workflow.
|
|
867
|
-
|
|
868
|
-
**Modify, don't redesign.** When the task changes an existing screen, reproduce
|
|
869
|
-
the current screen's real layout and footprint FIRST, then change only the delta
|
|
870
|
-
and call it out with a single annotation. Do not restack the page into a new
|
|
871
|
-
layout. For net-new surfaces, compose from the real app shell. Inspect the
|
|
872
|
-
actual app components before drawing an existing product: sidebar density,
|
|
873
|
-
toolbar actions, overflow menus, property panels, and framework chrome should
|
|
874
|
-
match the product unless the plan intentionally changes them.
|
|
875
|
-
|
|
876
|
-
**Keep product screens pure.** A product wireframe shows the app state a user
|
|
877
|
-
would actually see. Do not embed file contracts, architecture arrows, repo pills,
|
|
878
|
-
mode explanations, or implementation callouts inside the screen just to explain
|
|
879
|
-
the plan. Put those in canvas annotations, a separate diagram, or the document
|
|
880
|
-
body. Secondary UI such as properties, history, sync, export, or agent controls
|
|
881
|
-
should appear where the real product would put them: an overflow popover, sheet,
|
|
882
|
-
panel, or separate framework sidebar state, not a generic permanent right
|
|
883
|
-
inspector unless that inspector is the actual design.
|
|
884
|
-
|
|
885
|
-
**Classify mockup scope before implementation.** Before turning a plan mockup
|
|
886
|
-
into source code, decide whether each artboard represents the whole page/app
|
|
887
|
-
shell, a route body inside an existing shell, or a component/sub-surface. If an
|
|
888
|
-
artboard includes navigation, sidebars, auth banners, or a signup/login form,
|
|
889
|
-
map those pieces to the real shared shell/auth components instead of nesting the
|
|
890
|
-
entire mockup inside the current page. When a mockup references the product's
|
|
891
|
-
standard signup/login page, find and reuse that existing implementation; do not
|
|
892
|
-
approximate it from the wireframe.
|
|
893
|
-
|
|
894
|
-
**Zoom in on sub-surfaces, don't redraw the page.** For a small sub-surface (a
|
|
895
|
-
popover, menu, dialog, toast), show the full screen once, then add a small
|
|
896
|
-
separate artboard whose \`html\` contains ONLY that sub-surface — do not re-draw
|
|
897
|
-
the whole page around it, and do not scale a duplicate up. Pick the matching
|
|
898
|
-
\`surface\` (e.g. \`popover\`) so the footprint is right; never widen a popover to
|
|
899
|
-
page width.
|
|
900
|
-
|
|
901
|
-
**Loading / skeleton states.** Set \`data.skeleton: true\` on the wireframe and
|
|
902
|
-
fill the \`html\` with neutral, textless placeholder geometry — boxes and bars
|
|
903
|
-
built as \`<div>\`s with \`background:var(--wf-line)\` and explicit heights/widths,
|
|
904
|
-
no labels or copy. The renderer drops borders, sketch, and color into the
|
|
905
|
-
skeleton register automatically. Never escape to a \`custom-html\` document block
|
|
906
|
-
to fake a loader.
|
|
907
|
-
|
|
908
|
-
**Editing an existing mockup.** In hosted mode, to change one element, text, or
|
|
909
|
-
color in an existing html mockup, do not regenerate the frame — call
|
|
910
|
-
\`update-visual-plan\` with
|
|
911
|
-
\`contentPatches: [{ op: "patch-wireframe-html", blockId, edits: [{ find,
|
|
912
|
-
replace }] }]\`. Each \`find\` is a unique snippet of the current html (read it
|
|
913
|
-
first with \`get-visual-plan\`); set \`all: true\` on an edit to replace every
|
|
914
|
-
occurrence. The result is re-sanitized. In local-files privacy mode, do not call
|
|
915
|
-
hosted Plan tools; edit the local MDX source directly and rerun the local
|
|
916
|
-
check/serve or verify command for \`<plan-dir>\`.
|
|
917
|
-
|
|
918
|
-
**Choose the outer frame deliberately.** Wireframe and diagram data accept
|
|
919
|
-
\`frame: "auto" | "show" | "hide"\` in block data (\`<Screen frame="hide">\` in
|
|
920
|
-
MDX wireframes, \`<Diagram frame="hide">\` for MDX diagrams). Leave it unset or
|
|
921
|
-
\`auto\` when the host context should decide: Plan and recap surfaces default to a
|
|
922
|
-
drawn outer frame; docs surfaces default to no outer frame. Use \`show\` for
|
|
923
|
-
standalone product screens, before/after recap comparisons, screenshot-like
|
|
924
|
-
artifacts, and visuals that need containment from surrounding prose. Use \`hide\`
|
|
925
|
-
when a docs page, tab, column, card, canvas artboard, or the visual's own
|
|
926
|
-
internal chrome already supplies the boundary. Do not use \`hide\` to compensate
|
|
927
|
-
for cramped content; fix the layout instead.
|
|
928
|
-
|
|
929
|
-
**Inner padding and borders still matter.** Always wrap HTML wireframe content
|
|
930
|
-
in a root container with real inner padding before drawing cards, fields, pills,
|
|
931
|
-
labels, or controls. Use at least 14-16px of padding, \`box-sizing: border-box\`,
|
|
932
|
-
\`height: 100%\`, and \`gap\` between child rows on the root node itself so the
|
|
933
|
-
first row never sits flush against the screen edge. Do not rely on padding on a
|
|
934
|
-
nested page section as the first visible inset; the outermost element must
|
|
935
|
-
create the breathing room. Keep text away from borders: every container, field,
|
|
936
|
-
button, menu item, and annotation needs enough padding and line-height to read
|
|
937
|
-
cleanly in the rendered Plan view.
|
|
938
|
-
|
|
939
|
-
**For feature-cloud or abundance visuals, optimize the composition over line-by-line
|
|
940
|
-
reading.** Some marketing/product sections need to feel like a large surface area
|
|
941
|
-
of capability rather than a precise app workflow. In those cases, use one padded
|
|
942
|
-
root with a short headline and a dense, aesthetic cloud of short feature labels,
|
|
943
|
-
chips, rings, or columns. Vary scale and opacity with tokens, cluster by meaning,
|
|
944
|
-
and let many labels be glanceable rather than individually essential. Do not
|
|
945
|
-
force dozens of features into equal cards with long wrapped sentences; that
|
|
946
|
-
usually creates a messy unreadable mockup.
|
|
947
|
-
|
|
948
|
-
**Lay out children safely so they never collide.** Use HTML flex/grid with
|
|
949
|
-
\`gap\`, \`min-width: 0\`, and sensible overflow. Avoid negative margins, absolute
|
|
950
|
-
positioning, or fixed child widths that can collide when the renderer switches
|
|
951
|
-
between light/dark, sketch/clean, or different zoom levels.
|
|
952
|
-
|
|
953
|
-
**Do not wrap intentionally single-line labels.** For toolbars, tab rails,
|
|
954
|
-
breadcrumbs, chip/filter rows, branch and file names, file chips, and code
|
|
955
|
-
filenames — any deliberately single-line row — do not let long text wrap. Put
|
|
956
|
-
\`white-space: nowrap\` on the row (and \`overflow: hidden; text-overflow: ellipsis\`
|
|
957
|
-
on the individual labels that can grow), so the wireframe demonstrates the actual
|
|
958
|
-
layout behavior instead of producing ugly stacked or vertical text. Use
|
|
959
|
-
horizontally scrollable or clipped rails for overflow.
|
|
960
|
-
|
|
961
|
-
**Fill the frame; keep labels short.** Each artboard is a fixed-size surface — compose enough realistic HTML to fill it top to bottom with even vertical rhythm; never leave a large empty band. On desktop/app-shell sidebars, let the nav stack flex to fill (\`flex:1\`) and add any persistent bottom action/status after it so the rail reads complete in taller frames. On mobile especially, flow real rows down the whole screen (status bar, header, then list/detail content) rather than a header floating above a gap. Keep every label short enough to sit on one line within its column — shorten the copy rather than relying on the frame to absorb it (long labels wrap or clip).
|
|
962
|
-
|
|
963
|
-
**Persistent chrome bars span the full frame width.** Top bars, app headers,
|
|
964
|
-
toolbars, and bottom tab/nav bars are full-width chrome, not centered content.
|
|
965
|
-
Lay each one out as a single flex row that fills the frame
|
|
966
|
-
(\`style="display:flex;align-items:center;width:100%"\`) and push trailing actions
|
|
967
|
-
to the right edge with a flex spacer (\`<div style="flex:1"></div>\`) between the
|
|
968
|
-
leading group and the trailing group — never center a bar inside a narrow,
|
|
969
|
-
centered block, and never let it collapse to the width of its contents. In a
|
|
970
|
-
Before/After pair the bar stays full-width in BOTH states even when one state has
|
|
971
|
-
fewer controls; the spacer absorbs the difference so the remaining controls hold
|
|
972
|
-
their edge alignment instead of sliding to the center.
|
|
973
|
-
|
|
974
|
-
**Pin bottom bars to the bottom of the frame.** For mobile tab bars, footers, and
|
|
975
|
-
any persistent bottom action row, make the frame itself a flex column at
|
|
976
|
-
\`height:100%\` (\`style="display:flex;flex-direction:column;height:100%"\`), give the
|
|
977
|
-
scrolling body \`flex:1\` so it absorbs the slack, and place the bar as the LAST
|
|
978
|
-
child of the frame (or set \`margin-top:auto\` on it). The bar then sits flush at
|
|
979
|
-
the bottom of the surface instead of floating directly under the content with an
|
|
980
|
-
empty band beneath it.
|
|
981
|
-
|
|
982
|
-
**Before / after must be comparable.** When showing a state change, preserve the
|
|
983
|
-
unchanged controls in both states so the reviewer can see exactly what moved or
|
|
984
|
-
appeared; do not show an added control as a generic box floating elsewhere in
|
|
985
|
-
the surface. Place the new/changed affordance where the implementation puts it —
|
|
986
|
-
for example, a new \`Edit with AI\` action in a popover header belongs in the
|
|
987
|
-
top-right header slot, aligned with the title, not in the body or footer. Use
|
|
988
|
-
the same frame size, scale, outer padding, border radius, and visual density on
|
|
989
|
-
both sides unless the change itself alters those properties, and let the frame
|
|
990
|
-
height fit the content rather than leaving a tall empty lower half.
|
|
991
|
-
|
|
992
|
-
**Name the states with the column header, never inside the frame.** For
|
|
993
|
-
document-body wireframes (recaps), put the two
|
|
994
|
-
states in a \`columns\` block and set each column's \`label\` to \`Before\` and
|
|
995
|
-
\`After\` — the renderer draws that label as an \`h4\` heading above each frame. Do
|
|
996
|
-
NOT bake a \`Before\`/\`After\` pill, title, or heading into the wireframe \`html\`: a
|
|
997
|
-
label placed inside reads as part of the product UI, lands in a random corner,
|
|
998
|
-
and clutters the comparison. The column header is the one and only place the
|
|
999
|
-
state name belongs. On a canvas, place the two state artboards as neighbors with
|
|
1000
|
-
frame labels — never encode Before/After inside the html.
|
|
1001
|
-
|
|
1002
|
-
**Let the surface choose side-by-side vs. stacked.** For document-body
|
|
1003
|
-
wireframes (recaps), the \`columns\` renderer lays
|
|
1004
|
-
narrow surfaces (\`mobile\`, \`popover\`, \`panel\`) out side by side, and
|
|
1005
|
-
automatically stacks wide surfaces (\`desktop\`, \`browser\`) vertically at full
|
|
1006
|
-
document width so a large frame is never crushed into a half-width column and
|
|
1007
|
-
cropped. Author both wireframes with the real \`surface\` and the matching
|
|
1008
|
-
\`Before\`/\`After\` column labels; do not hand-stack the pair into separate
|
|
1009
|
-
top-level wireframes or duplicate the state name as body content.
|
|
1010
|
-
|
|
1011
|
-
**Good example — a contacts list, surface \`browser\`.** A small, real screen
|
|
1012
|
-
composed from the helper classes and tokens, layout in inline flex, no fonts or
|
|
1013
|
-
hex colors:
|
|
1014
|
-
|
|
1015
|
-
\`\`\`html
|
|
1016
|
-
<div
|
|
1017
|
-
style="display:flex;flex-direction:column;gap:12px;padding:16px;height:100%"
|
|
1018
|
-
>
|
|
1019
|
-
<div style="display:flex;align-items:center;justify-content:space-between">
|
|
1020
|
-
<h1>Contacts</h1>
|
|
1021
|
-
<button class="primary">New contact</button>
|
|
1022
|
-
</div>
|
|
1023
|
-
<div style="display:flex;gap:6px">
|
|
1024
|
-
<span class="wf-pill accent">All 128</span>
|
|
1025
|
-
<span class="wf-pill">Favorites</span>
|
|
1026
|
-
<span class="wf-pill">Archived</span>
|
|
1027
|
-
</div>
|
|
1028
|
-
<div
|
|
1029
|
-
class="wf-card"
|
|
1030
|
-
style="display:flex;flex-direction:column;gap:0;padding:0"
|
|
1031
|
-
>
|
|
1032
|
-
<div
|
|
1033
|
-
style="display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1.4px solid var(--wf-line)"
|
|
1034
|
-
>
|
|
1035
|
-
<div
|
|
1036
|
-
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
1037
|
-
></div>
|
|
1038
|
-
<div style="flex:1">
|
|
1039
|
-
<strong>Jane Cooper</strong><br /><small>jane@acme.co</small>
|
|
1040
|
-
</div>
|
|
1041
|
-
<span class="wf-pill">Lead</span>
|
|
1042
|
-
</div>
|
|
1043
|
-
<div style="display:flex;align-items:center;gap:10px;padding:10px 12px">
|
|
1044
|
-
<div
|
|
1045
|
-
style="width:32px;height:32px;border-radius:999px;background:var(--wf-accent-soft)"
|
|
1046
|
-
></div>
|
|
1047
|
-
<div style="flex:1">
|
|
1048
|
-
<strong>Marcus Lee</strong><br /><small>marcus@globex.io</small>
|
|
1049
|
-
</div>
|
|
1050
|
-
<span class="wf-pill">Customer</span>
|
|
1051
|
-
</div>
|
|
1052
|
-
</div>
|
|
1053
|
-
</div>
|
|
1054
|
-
\`\`\`
|
|
1055
|
-
|
|
1056
|
-
<!-- SHARED-CORE:wireframe-quality END -->`;
|
|
1057
|
-
|
|
1058
|
-
// Progressive-disclosure reference file. `WIREFRAME_QUALITY_CORE` is the single
|
|
1059
|
-
// source of truth for HTML wireframe quality; it is materialized verbatim into a
|
|
1060
|
-
// sibling `references/wireframe.md` in EVERY plan skill dir (visual-plan and
|
|
1061
|
-
// visual-recap), instead of being interpolated inline into each SKILL.md body.
|
|
1062
|
-
// The SKILL.md bodies carry only `WIREFRAME_REFERENCE_POINTER`, which tells the
|
|
1063
|
-
// agent to read this file before authoring any wireframe. Keeping the reference
|
|
1064
|
-
// body byte-identical to the core (markers included) lets the sync guard assert
|
|
1065
|
-
// the on-disk copies never drift from the canonical constant.
|
|
1066
|
-
export const WIREFRAME_REFERENCE_MD = `# HTML wireframe quality — single source of truth
|
|
1067
|
-
|
|
1068
|
-
This file is the canonical quality bar for HTML wireframes / \`<Screen>\` /
|
|
1069
|
-
\`WireframeBlock\` content, shared word for word by \`/visual-plan\` and
|
|
1070
|
-
\`/visual-recap\`. Read it in full before authoring ANY wireframe; do not
|
|
1071
|
-
author wireframes from memory or paraphrase these rules per command.
|
|
1072
|
-
|
|
1073
|
-
${WIREFRAME_QUALITY_CORE}
|
|
1074
|
-
`;
|
|
1075
|
-
|
|
1076
|
-
// Short pointer that replaces the inline wireframe-quality core in each SKILL.md
|
|
1077
|
-
// body. Authoring quality lives in the sibling reference file so the SKILL.md
|
|
1078
|
-
// stays lean (progressive disclosure); the agent loads the detail on demand.
|
|
1079
|
-
const WIREFRAME_REFERENCE_POINTER = `UI recap/plan wireframes must meet a strict quality bar — full-width chrome,
|
|
1080
|
-
pinned bottom bars, real product content, before/after comparability, the right
|
|
1081
|
-
\`surface\` preset, \`--wf-*\` tokens instead of hex, and no \`<html>\`/\`<style>\`/font
|
|
1082
|
-
tags. Before authoring ANY wireframe / \`<Screen>\` / \`WireframeBlock\`, READ
|
|
1083
|
-
\`references/wireframe.md\` in this skill directory — it is the single source of
|
|
1084
|
-
truth for HTML wireframe quality, shared word for word with \`/visual-plan\`
|
|
1085
|
-
and \`/visual-recap\`. Do not author wireframes from memory.`;
|
|
1086
|
-
|
|
1087
|
-
// Canvas/artboard placement mechanics. Used only by visual-plan modes
|
|
1088
|
-
// (visual-recap renders standalone wireframes, not a canvas).
|
|
1089
|
-
const CANVAS_SURFACE_CORE = `<!-- SHARED-CORE:canvas-surface START -->
|
|
1090
|
-
|
|
1091
|
-
**The coordinate rule.** The \`surface\` locks each artboard's footprint and
|
|
1092
|
-
aspect — never set artboard width/height and never use coordinates inside the
|
|
1093
|
-
wireframe HTML; board-level artboard \`x\`/\`y\` IS allowed when it creates clear
|
|
1094
|
-
lanes. Let canvas auto-placement handle simple one-row boards.
|
|
1095
|
-
|
|
1096
|
-
**Lay out mixed canvases in lanes.** When a canvas contains broad browser /
|
|
1097
|
-
desktop frames plus compact \`mobile\`, \`popover\`, or \`panel\` surfaces, do not put
|
|
1098
|
-
everything in one horizontal strip. Use board-level artboard \`x\`/\`y\` to reserve
|
|
1099
|
-
lanes with generous empty space: main flow on one row, compact surfaces in their
|
|
1100
|
-
own column or row, and loading/error states in a lower row. Keep at least 96px
|
|
1101
|
-
between rendered artboard rectangles plus room for annotation gutters; when a
|
|
1102
|
-
broad browser/desktop frame sits beside a compact panel/popover, leave at least
|
|
1103
|
-
160px so frame borders, labels, and hover controls never touch. Connect only
|
|
1104
|
-
neighboring steps; never draw a long connector that skips across unrelated
|
|
1105
|
-
frames. Connector labels must sit in open canvas space. If the label would touch
|
|
1106
|
-
or cross either artboard, remove the label and explain the transition with a
|
|
1107
|
-
nearby annotation instead. Before handoff, inspect the top canvas at default zoom
|
|
1108
|
-
and move any frame whose label, connector, or annotation crosses another frame.
|
|
1109
|
-
|
|
1110
|
-
**Board-unit spacing defaults.** The canvas coordinate system uses approximately 2 board units per screen pixel. \`browser\` frames occupy roughly 700 × 600 board units; \`desktop\` frames roughly 900 × 700 board units. Apply these minimum x/y gaps when placing frames explicitly — any less and frames will touch or overlap:
|
|
1111
|
-
|
|
1112
|
-
- x-gap between \`browser\` frames: **≥ 1100** (700-unit frame + 400-unit gutter)
|
|
1113
|
-
- x-gap between \`desktop\` frames: **≥ 1300** (900-unit frame + 400-unit gutter)
|
|
1114
|
-
- y-gap between rows of any surface: **≥ 1400** (includes frame height + section header + buffer)
|
|
1115
|
-
|
|
1116
|
-
When in doubt, use larger values — the canvas auto-zooms to fit everything.
|
|
1117
|
-
|
|
1118
|
-
**Canvas annotations are designer notes on the artboard.** When a top canvas is
|
|
1119
|
-
present, sprinkle design-review notes near the frames they explain: a short
|
|
1120
|
-
heading, supporting text, and bullets — plain text layers, never bordered or
|
|
1121
|
-
shadowed cards, and never a box around a frame. The renderer spaces notes away
|
|
1122
|
-
from frames, so place each note by the frame it describes. Use an arrow only to
|
|
1123
|
-
point at one specific control or transition; for a broad frame-level note, write
|
|
1124
|
-
text beside the frame with no connector. Connectors are for real sequences only —
|
|
1125
|
-
never fake "Step 1 → Step 2" lines between independent states.
|
|
1126
|
-
|
|
1127
|
-
**Do not create overlapping annotations.** Anchor each ordinary note to the
|
|
1128
|
-
frame it explains with \`targetId\` + \`placement\` (top/right/bottom/left), and
|
|
1129
|
-
omit \`type\` or use \`type: "note"\`. The renderer parks notes in a gutter beside
|
|
1130
|
-
the frame and lays them out automatically. Do not use \`type: "callout"\`,
|
|
1131
|
-
\`type: "text"\`, \`type: "arrow"\`, x/y, or points for ordinary notes; those are
|
|
1132
|
-
freeform review-markup layers and must be reserved for intentional markup in
|
|
1133
|
-
open canvas space. Reserve arrows for a note that must point at one specific
|
|
1134
|
-
control inside a frame; a note that simply sits beside its frame needs no arrow.
|
|
1135
|
-
|
|
1136
|
-
**Patching.** Edit one wireframe, canvas annotation, diagram, or block with targeted \`contentPatches\`
|
|
1137
|
-
(for example \`patch-wireframe-html\`, \`patch-diagram-html\`, \`update-block\`,
|
|
1138
|
-
\`replace-blocks\`, \`update-canvas-annotation\`) rather
|
|
1139
|
-
than regenerating the whole plan. \`contentPatches\` are part of the public MCP
|
|
1140
|
-
action schema, so Claude Code, Codex, Cursor, and other hosts can make surgical
|
|
1141
|
-
edits. If an agent is working from exported source files, use
|
|
1142
|
-
\`read-visual-plan-source\` / \`patch-visual-plan-source\`: \`plan.mdx\` holds
|
|
1143
|
-
frontmatter plus markdown/document blocks, \`canvas.mdx\` holds
|
|
1144
|
-
\`<DesignBoard>/<Section>/<Artboard>/<Screen>/<Annotation>/<Connector>\`, and the
|
|
1145
|
-
patch action normalizes the MDX back into the same JSON runtime model. JSON is
|
|
1146
|
-
the canonical runtime shape; MDX is the repo-friendly authoring/export surface.
|
|
1147
|
-
In the browser, humans edit \`rich-text\` prose inline; agents should still use
|
|
1148
|
-
\`update-rich-text\` content patches or source patches for prose, and use
|
|
1149
|
-
comments/structured patches for canvas, artboard, wireframe, and diagram edits.
|
|
1150
|
-
Never send a partial top-level \`content\` object as a shortcut to add a canvas,
|
|
1151
|
-
frame, or block: \`content\` is a full structured replacement, so omitted blocks
|
|
1152
|
-
or surfaces can disappear. If a full replacement is truly unavoidable, read the
|
|
1153
|
-
complete source/JSON first, include every existing block and surface in the new
|
|
1154
|
-
payload, and verify the source/export immediately after the update.
|
|
1155
|
-
|
|
1156
|
-
**Never emit a titled artboard with no interior wireframe content.** Every artboard
|
|
1157
|
-
you place on the canvas must carry an \`html\` wireframe or reference a wireframe
|
|
1158
|
-
block via \`blockId\`; when using \`blockId\`, the referenced \`wireframe\` /
|
|
1159
|
-
\`legacy-wireframe\` block must remain in the plan. If you remove a duplicate
|
|
1160
|
-
wireframe from the document body, first move its \`data\` inline onto the
|
|
1161
|
-
corresponding \`content.canvas.frames[*].wireframe\` / \`legacyWireframe\`. A
|
|
1162
|
-
label-only frame or a frame pointing at a deleted block renders empty and is
|
|
1163
|
-
rejected at parse time. If you only have a title, write it as a section header or
|
|
1164
|
-
annotation, not an empty artboard.
|
|
1165
|
-
|
|
1166
|
-
**UI mockups belong in the top visual review area.** Static UI/product visuals
|
|
1167
|
-
live on the canvas; multi-step UI flows get both canvas wireframes and a
|
|
1168
|
-
prototype. When the user asks for a mockup, UI state, loading state, layout,
|
|
1169
|
-
screen, or visual comparison, make the canvas the primary home for that static
|
|
1170
|
-
visual. When the user asks for a prototype or the plan contains a sequence the
|
|
1171
|
-
reviewer must feel, keep the canvas artboards and add \`content.prototype\` so the
|
|
1172
|
-
top surface shows Wireframes / Prototype tabs. Architecture/code diagrams stay
|
|
1173
|
-
inline in the document (the SKILL.md Visual Surface Choice section owns that
|
|
1174
|
-
rule) unless the user explicitly asks for a spatial board. Document blocks
|
|
1175
|
-
can explain, compare, or map implementation, but they should not host the
|
|
1176
|
-
primary UI mockup or prototype just because \`custom-html\`, screenshots, or prose
|
|
1177
|
-
are easier to produce. If the canvas/prototype surface cannot represent the
|
|
1178
|
-
requested UI fidelity, still keep the closest top-surface representation and
|
|
1179
|
-
call out or extend the needed renderer capability. A skeleton/loading mockup
|
|
1180
|
-
also lives in a canvas artboard — never move a mockup out of the canvas.
|
|
1181
|
-
|
|
1182
|
-
**Storyboards are canvas artifacts, not document diagrams.** When the requested
|
|
1183
|
-
output is a product flow, onboarding journey, "light storyboard", or canvas
|
|
1184
|
-
wireframe, author the flow as multiple top-canvas artboards with real screen
|
|
1185
|
-
content and neighboring connectors. Keep document-body \`diagram\` blocks for
|
|
1186
|
-
architecture and mechanics that are not themselves user-visible screens. A
|
|
1187
|
-
storyboard made from a single inline HTML diagram is the wrong surface.
|
|
1188
|
-
|
|
1189
|
-
For abstract product concepts, use the canvas to create the first "I get it"
|
|
1190
|
-
moment: one real app state near the top showing how the concept appears to a
|
|
1191
|
-
user, followed by separate annotations or diagrams for mechanics. Do not make
|
|
1192
|
-
the first artboard a hybrid of app UI and architecture notes; the app screen
|
|
1193
|
-
should be inspectable as product UI on its own.
|
|
1194
|
-
|
|
1195
|
-
**Legacy kit tree.** Older plans set a \`screen\` array of \`{ el, ...props }\` kit
|
|
1196
|
-
nodes instead of \`html\`; the renderer still accepts and displays it so saved
|
|
1197
|
-
plans round-trip, but new plans emit \`html\`. Do not author fresh kit-tree
|
|
1198
|
-
screens, and do not put nested kit components such as \`<FrameScreen>\`, \`<Card>\`,
|
|
1199
|
-
\`<Row>\`, \`<Title>\`, or \`<Btn>\` inside a canvas \`<Screen>\`. A new canvas artboard
|
|
1200
|
-
with kit-tree children is a defect: replace it with
|
|
1201
|
-
\`<Screen surface="..." html={...} />\` using the HTML wireframe rules. The HTML
|
|
1202
|
-
path is the one that gets the renderer-owned surface sizing, theme tokens,
|
|
1203
|
-
sketch/clean toggle, and safe text layout used by good document-body
|
|
1204
|
-
wireframes. Likewise, old or imported plans may carry coordinate-based regions
|
|
1205
|
-
or free-float x/y on notes; those are legacy escape hatches the renderer still
|
|
1206
|
-
shows but you must never produce. The gutter parks notes by \`targetId\` +
|
|
1207
|
-
\`placement\`, and the coordinate rule at the top of this file governs all
|
|
1208
|
-
new-plan placement.
|
|
1209
|
-
|
|
1210
|
-
<!-- SHARED-CORE:canvas-surface END -->`;
|
|
1211
|
-
|
|
1212
|
-
const DOCUMENT_QUALITY_CORE = `<!-- SHARED-CORE:document-quality START -->
|
|
1213
|
-
|
|
1214
|
-
**The document is a serious technical plan, not marketing.** Write it the way a
|
|
1215
|
-
strong Claude or Codex implementation plan reads: outcome-first, prose-first,
|
|
1216
|
-
self-contained, and specific. State the objective and what "done" means, the
|
|
1217
|
-
scope and non-goals, the proposed approach with the key decisions and their
|
|
1218
|
-
rationale, ordered steps that name real files, symbols, actions, and data
|
|
1219
|
-
shapes, the risks, and a closing verification step (tests, build, or a checkable
|
|
1220
|
-
behavior). Replace vague prose with specifics; never ship a step like "make it
|
|
1221
|
-
work." No hero art, gradients, logos, nav bars, slogans, value props, giant
|
|
1222
|
-
landing-page headings, or marketing cards unless the user explicitly asks.
|
|
1223
|
-
|
|
1224
|
-
**Every published plan must stand alone.** Even when the agent is revising an
|
|
1225
|
-
existing plan, the output is a plan to do the work, not a changelog of the
|
|
1226
|
-
conversation. Do not write phrases like "preserve the previous plan", "do not
|
|
1227
|
-
drop the old idea", "as discussed above", "this revision", "unlike the prior
|
|
1228
|
-
version", or "correction from the earlier plan". Fold the right decisions into
|
|
1229
|
-
the plan as normal objective, architecture, scope, and roadmap prose. A reviewer
|
|
1230
|
-
who opens the plan from a link with no chat history should understand it. Avoid
|
|
1231
|
-
negative framing that only makes sense against absent context ("not the old
|
|
1232
|
-
mode", "not just X") unless the contrast is defined in the plan and genuinely
|
|
1233
|
-
helps; state the positive model directly.
|
|
1234
|
-
|
|
1235
|
-
**Make abstract plans instantly legible.** If the idea is broad, strategic, or
|
|
1236
|
-
intended for a third-party reviewer, put one concrete product snapshot near the
|
|
1237
|
-
top before dense architecture, mode tables, manifests, or roadmaps. For
|
|
1238
|
-
UI-capable concepts, that snapshot is usually a top-canvas app state plus a
|
|
1239
|
-
short paragraph that says what the user sees and what changes under the hood.
|
|
1240
|
-
Then put mechanics, data flow, sync boundaries, and implementation detail in
|
|
1241
|
-
separate diagrams or document sections.
|
|
1242
|
-
|
|
1243
|
-
**Preserve the user's level of abstraction.** A motivating use case is not
|
|
1244
|
-
automatically the architecture. When the prompt describes a broader framework,
|
|
1245
|
-
product mode, or reusable primitive, separate the reusable core from specific
|
|
1246
|
-
apps, providers, customers, scripts, or launch examples. Use the concrete
|
|
1247
|
-
example to make the plan understandable, then make clear which parts are core,
|
|
1248
|
-
which are app-specific adapters, and which are future examples.
|
|
1249
|
-
|
|
1250
|
-
**When top visuals exist, they and the document never duplicate each other.**
|
|
1251
|
-
For UI work, the UI story lives in the top visual surface: canvas artboards for
|
|
1252
|
-
static inspection, plus prototype tabs when the flow should be functional. The
|
|
1253
|
-
document carries the technical depth the visuals cannot show — concrete
|
|
1254
|
-
file/symbol maps, API and data contracts, code snippets, migration or
|
|
1255
|
-
implementation phases, risks, and validation. For architecture/code reviews,
|
|
1256
|
-
invert that: the document is the visual surface, and each recommendation
|
|
1257
|
-
carries its own nearby inline \`diagram\` / \`data-model\` block plus file
|
|
1258
|
-
evidence (the \`diagram\` bullet below owns how to author those diagrams).
|
|
1259
|
-
Repeat a wireframe in the document only for a genuinely new detail view or
|
|
1260
|
-
comparison. Skip the visual surface entirely for non-visual work and write a
|
|
1261
|
-
clean rich document. For a simple binary UI visual choice, show the two
|
|
1262
|
-
directions in the canvas only; do not repeat the same options as body
|
|
1263
|
-
wireframes or prose. Put the actual choice in the bottom "Open Questions" form.
|
|
1264
|
-
|
|
1265
|
-
**Use the right block, and make it carry substance.** For the authoritative,
|
|
1266
|
-
machine-checked list of block types and their data schemas, call \`get-plan-blocks\`
|
|
1267
|
-
— it returns the live registry vocabulary (type, MDX tag, placement, key fields)
|
|
1268
|
-
so you never emit a block the editor cannot render or round-trip:
|
|
1269
|
-
|
|
1270
|
-
- \`rich-text\` for plan prose with real bold/italic/code/links and nested lists.
|
|
1271
|
-
- \`annotated-code\` for the file map: when a load-bearing file is worth
|
|
1272
|
-
highlighting, prefer the annotated walkthrough over a bare \`code\` block — carry
|
|
1273
|
-
the real, syntax-highlighted code AND anchor short margin notes to the lines
|
|
1274
|
-
that actually change (the new action, the changed schema, the wiring point), so
|
|
1275
|
-
the reader sees what matters and why instead of code for code's sake. Each
|
|
1276
|
-
annotation is \`{ lines: "12" | "12-18"; label?; note }\`; keep a few high-signal
|
|
1277
|
-
notes per file, not one per line. Highlight only the files worth reading; never
|
|
1278
|
-
an exhaustive list of every touched file, and never a prose-only description of
|
|
1279
|
-
a file. Drop to a plain \`code\` block only for a throwaway snippet with nothing
|
|
1280
|
-
to call out. When more than one file matters, group the blocks in a vertical
|
|
1281
|
-
\`tabs\` block (the standard tab primitive) rather than a bespoke container. If
|
|
1282
|
-
the exact code is unknown, show the smallest plausible planned shape or a
|
|
1283
|
-
commented stub naming what to fill in. (\`code-tabs\` and \`implementation-map\`
|
|
1284
|
-
are legacy: their renderers stay for old plans, but do not author new ones.)
|
|
1285
|
-
- For a decision: if the reviewer must still pick between a genuinely-open
|
|
1286
|
-
either/or, put it in the bottom Open Questions \`question-form\` as a \`single\`
|
|
1287
|
-
question — one option per real alternative, each with a short detail and
|
|
1288
|
-
\`recommended: true\` on the one you would choose; do not also restate the same
|
|
1289
|
-
choice elsewhere. If you have already committed to an approach, state it as
|
|
1290
|
-
settled prose or a \`callout\` with \`tone="decision"\`, optionally with a
|
|
1291
|
-
\`columns\` block for a side-by-side comparison of the options you weighed — not
|
|
1292
|
-
as a confusing mid-document form for a question you have already answered.
|
|
1293
|
-
- \`columns\` for side-by-side before/after or current/target comparisons where
|
|
1294
|
-
each side needs real nested blocks; label the columns clearly and avoid
|
|
1295
|
-
stacking comparison blocks vertically when parallel reading is the point.
|
|
1296
|
-
- \`diagram\` for two-dimensional architecture, dependency, data-flow, or state
|
|
1297
|
-
relationships, only when it clarifies something real. Prefer standard
|
|
1298
|
-
two-dimensional layouts — paired before/after panels, layered diagrams,
|
|
1299
|
-
swimlanes, dependency maps, matrices, or grouped regions; do not default to
|
|
1300
|
-
left-to-right chains, and use a line only when the relationship is truly a
|
|
1301
|
-
sequence. Do not use a body \`diagram\` as the primary artifact for a requested
|
|
1302
|
-
product canvas, light storyboard, UI flow, screen flow, or wireframe; those
|
|
1303
|
-
belong in the top canvas as artboards with \`Screen\` wireframes first. Use
|
|
1304
|
-
diagrams below that canvas only for architecture, data flow, or implementation
|
|
1305
|
-
mechanics. For architecture/code
|
|
1306
|
-
diagrams, prefer \`data.html\` / \`data.css\` with semantic HTML and inline SVG so
|
|
1307
|
-
the diagram can use panels, layers, matrices, arrows, annotations, and
|
|
1308
|
-
responsive layout directly. Author diagram HTML with renderer-owned primitives
|
|
1309
|
-
like \`.diagram-panel\`, \`.diagram-card\`, \`.diagram-node\`, \`.diagram-box\`,
|
|
1310
|
-
\`.diagram-pill\`, \`.diagram-muted\`, and \`[data-rough]\`; they map to the plan's
|
|
1311
|
-
Tailwind theme variables through \`--wf-ink\`, \`--wf-muted\`, \`--wf-line\`,
|
|
1312
|
-
\`--wf-paper\`, \`--wf-card\`, \`--wf-accent\`, \`--wf-accent-soft\`, \`--wf-warn\`, and
|
|
1313
|
-
\`--wf-ok\`, and switch to Excalifont plus rough.js outlines in sketchy mode. Do not
|
|
1314
|
-
set \`font-family\` and do not hard-code hex, rgb, or hsl colors in diagram HTML
|
|
1315
|
-
or CSS. Choose the outer \`frame\` intentionally: use \`show\` when the diagram
|
|
1316
|
-
stands alone in a recap, comparison, or prose section; use \`hide\` when the
|
|
1317
|
-
diagram sits inside docs chrome, columns, tabs, cards, a canvas surface, or
|
|
1318
|
-
already has visible \`.diagram-panel\` / \`.diagram-box\` structure. Leave room
|
|
1319
|
-
for the sketch font: keep labels short, give nodes generous width, and place
|
|
1320
|
-
boundary/annotation labels in unused space instead of over nodes; labels must
|
|
1321
|
-
not overlap nodes, connectors, or each other. For small text/SVG changes to an
|
|
1322
|
-
existing HTML diagram, use \`patch-diagram-html\` with a unique
|
|
1323
|
-
\`find\`/\`replace\` snippet instead of resending the whole \`data.html\` string.
|
|
1324
|
-
Use legacy \`nodes\` / \`edges\` only for small previews or truly
|
|
1325
|
-
sequential flows. In architecture/code plans, prefer a repeated section rhythm:
|
|
1326
|
-
recommendation title, confidence and category badges, code-path evidence, a
|
|
1327
|
-
local before/after or current/target spatial diagram, then concise
|
|
1328
|
-
Problem/Solution/Why text.
|
|
1329
|
-
- \`tabs\` for multiple states, directions, or comparisons. A tab that reveals
|
|
1330
|
-
only prose usually means the plan is under-specified — include a relevant
|
|
1331
|
-
visual unless the tab is intentionally document-only.
|
|
1332
|
-
- \`table\`, \`checklist\`, \`callout\` for scannable structure.
|
|
1333
|
-
|
|
1334
|
-
**Open questions live at the bottom as a form when answers would change the
|
|
1335
|
-
plan.** Surface answerable unresolved decisions in a final \`question-form\`
|
|
1336
|
-
block titled "Open Questions" so the renderer presents it as a distinct section.
|
|
1337
|
-
That bottom form is the ONLY place that enumerates the open questions: never add
|
|
1338
|
-
a second "Open Questions" heading, list, or recap of the same questions earlier
|
|
1339
|
-
in the document. A one-line pointer in the overview prose ("a few decisions are
|
|
1340
|
-
still open — see Open Questions below") is fine, but do not reproduce the
|
|
1341
|
-
question list or a parallel questions/decisions section above it.
|
|
1342
|
-
Use \`single\` or \`multi\` for clear choices, \`freeform\` for constraints,
|
|
1343
|
-
\`recommended: true\` for the default you would pick, and option \`wireframe\` /
|
|
1344
|
-
\`diagram\` previews only when the options are not already visible in the top
|
|
1345
|
-
canvas. \`single\` and \`multi\` questions always render a write-in field so a
|
|
1346
|
-
reviewer can answer with a custom option — never add an explicit "Other" option
|
|
1347
|
-
yourself; set \`allowOther: false\` only when a free-text answer makes no sense.
|
|
1348
|
-
Keep non-answerable assumptions or risks as concise \`callout\` blocks in
|
|
1349
|
-
the relevant section. Never bury a questions/decisions wall inside the plan
|
|
1350
|
-
narrative, and never ask the same question twice.
|
|
1351
|
-
|
|
1352
|
-
For complex plans, do not end without an open-question audit. If architecture,
|
|
1353
|
-
scope, UX, data shape, rollout, provider mapping, or ownership still depends on
|
|
1354
|
-
a choice, either commit to a recommendation with rationale or add it to the
|
|
1355
|
-
bottom form with a recommended default. A complex plan with no open questions is
|
|
1356
|
-
fine only when every meaningful decision has been explicitly made.
|
|
1357
|
-
|
|
1358
|
-
**Verification must exercise the real workflow.** The final verification section
|
|
1359
|
-
should go beyond typecheck/unit tests when the plan changes UI, local files,
|
|
1360
|
-
sync, providers, browser behavior, or multi-app flows. Include at least one
|
|
1361
|
-
end-to-end smoke that matches the user journey, such as a fresh repo/folder,
|
|
1362
|
-
real manifest or data fixture, browser interaction, save/sync action, and an
|
|
1363
|
-
on-disk or database assertion. Name the command or manual browser path when it
|
|
1364
|
-
is known.
|
|
1365
|
-
|
|
1366
|
-
**\`custom-html\` is a bounded escape hatch only** — a single complete fragment
|
|
1367
|
-
inside a block, never \`html\`/\`head\`/\`body\`/\`script\` tags, never a generic
|
|
1368
|
-
placeholder, density demo, or proof that custom HTML works. Prefer the native
|
|
1369
|
-
blocks for normal plans. For architecture/code reviews, use \`diagram\`
|
|
1370
|
-
\`data.html\` / \`data.css\` for rich local HTML/SVG diagrams instead of
|
|
1371
|
-
\`custom-html\`. For UI/product work, \`custom-html\` is never the primary home for a
|
|
1372
|
-
requested mockup, UI state, or visual comparison. If UI fidelity requires
|
|
1373
|
-
HTML/CSS, image capture, or real React/CSS, the product fix is canvas support
|
|
1374
|
-
for that artifact type, not moving the mockup into the document.
|
|
1375
|
-
When \`custom-html\` is genuinely needed, author it against the sandbox-provided
|
|
1376
|
-
theme tokens (\`--wf-paper\`, \`--wf-card\`, \`--wf-ink\`, \`--wf-muted\`,
|
|
1377
|
-
\`--wf-line\`, \`--wf-radius\`, and the matching \`--plan-*\` aliases). Do not hardcode
|
|
1378
|
-
hex/rgb/hsl light palettes such as white cards with dark ink; the same fragment
|
|
1379
|
-
must read in dark mode without a plan-specific patch.
|
|
1380
|
-
|
|
1381
|
-
**Before handoff, open the plan and check it.** Fix overlap, excessive
|
|
1382
|
-
whitespace, clipped fragments, misleading inactive controls, poor contrast, and
|
|
1383
|
-
unreadable diagrams before asking for approval. Check the top canvas in the
|
|
1384
|
-
current Plan theme, especially dark mode: white mockup panels, low-contrast
|
|
1385
|
-
muted text, or invisible controls are defects. If a frame only works in one
|
|
1386
|
-
theme, rewrite the HTML with \`--wf-*\` tokens and semantic helper classes before
|
|
1387
|
-
surfacing the plan.
|
|
1388
|
-
|
|
1389
|
-
<!-- SHARED-CORE:document-quality END -->`;
|
|
1390
|
-
|
|
1391
|
-
const EXEMPLAR_CORE = `<!-- SHARED-CORE:exemplar START -->
|
|
1392
|
-
|
|
1393
|
-
**GOOD.** A UI-first plan for a todo app: a canvas with a \`desktop\` artboard whose
|
|
1394
|
-
\`data.html\` is a real flex layout — a sidebar of links (\`Inbox 12\`, \`Today 4\`,
|
|
1395
|
-
\`Done\`), a main column with an \`<h1>Today</h1>\`, accent \`.wf-pill\`s for the
|
|
1396
|
-
filters, a muted section label \`OVERDUE\`, and \`.wf-card\` task rows carrying real
|
|
1397
|
-
titles, due dates, and a primary \`button.primary\` — styled only through bare
|
|
1398
|
-
elements, helper classes, and \`--wf-*\` tokens, so the renderer applies the
|
|
1399
|
-
correct desktop footprint, theme, and one subtle whole-frame wobble. Plain-text
|
|
1400
|
-
designer notes sit spaced off the frame, pointing only at the controls that need
|
|
1401
|
-
explanation. Below it, a Claude/Codex-grade document: objective and
|
|
1402
|
-
done-criteria, a few \`code\` blocks (grouped in a vertical \`tabs\` block when
|
|
1403
|
-
more than one) showing the real shape of the load-bearing files, a \`callout\`
|
|
1404
|
-
with \`tone="decision"\` stating the chosen approach with a \`columns\` block
|
|
1405
|
-
weighing the two real options behind it,
|
|
1406
|
-
and a validation step — none of it repeating the canvas. If the task also
|
|
1407
|
-
changes a multi-step completion flow, the same top area includes a Prototype tab
|
|
1408
|
-
whose screens use the same labels and states as the canvas artboards, with
|
|
1409
|
-
\`data-goto\` controls for the sequence. This is the bar.
|
|
1410
|
-
|
|
1411
|
-
**GOOD.** A broad product-architecture plan opens with a plain recommendation
|
|
1412
|
-
and one concrete app state before the abstraction. The first canvas artboard is
|
|
1413
|
-
pure product UI that matches the current app shell; nearby notes explain the
|
|
1414
|
-
user-visible delta. A separate diagram below shows the mechanics, such as file
|
|
1415
|
-
or data flow. The document then separates the reusable core from app/provider
|
|
1416
|
-
adapters and examples, covers contracts, folder or schema shape, sync
|
|
1417
|
-
boundaries, roadmap, non-goals, a bottom Open Questions form for unresolved
|
|
1418
|
-
decisions, and a verification section with at least one realistic end-to-end
|
|
1419
|
-
smoke. A reviewer who was not in the chat gets the idea from the top snapshot
|
|
1420
|
-
before reading the technical plan.
|
|
1421
|
-
|
|
1422
|
-
**GOOD.** A \`/visual-plan\` for a backend architecture review: no top canvas.
|
|
1423
|
-
The document opens with context and a legend, then repeats recommendation cards:
|
|
1424
|
-
title, confidence/category badges, a monospace grid of real file paths, one
|
|
1425
|
-
inline two-dimensional before/after or layered architecture diagram, and terse
|
|
1426
|
-
Problem/Solution/Why bullets using the codebase's vocabulary. The diagram uses
|
|
1427
|
-
space to show boundaries, layers, and ownership; it is not a default
|
|
1428
|
-
left-to-right chain. The plan ends with a top recommendation and a bottom
|
|
1429
|
-
question-form only if the next architecture direction is genuinely open. This is
|
|
1430
|
-
better than a top canvas because each diagram is local to the claim it supports.
|
|
1431
|
-
|
|
1432
|
-
**BAD.** A \`data.html\` with hard-coded hex colors, a \`font-family\`, or fixed
|
|
1433
|
-
pixel width/height; gray placeholder bars "insinuating" text on a non-skeleton
|
|
1434
|
-
frame; a forced desktop + mobile pair for a popover; floating bordered
|
|
1435
|
-
annotation cards hugging the frames; a fresh hand-authored kit-tree \`screen\`
|
|
1436
|
-
instead of \`html\`; a multi-step UI flow with only static frames and no prototype
|
|
1437
|
-
tab; a mockup escaped into a document \`custom-html\` block; and a marketing-style
|
|
1438
|
-
document with a hero heading and value props that just restates what the canvas
|
|
1439
|
-
already shows. Also bad: an architecture-only plan forced into a top canvas of
|
|
1440
|
-
labeled boxes with overlapping text, where the actual code evidence and
|
|
1441
|
-
recommendations live elsewhere; a product wireframe that mixes a real screen
|
|
1442
|
-
with repo names, file-contract arrows, architecture explanations, or a made-up
|
|
1443
|
-
permanent inspector; and a plan that describes itself as a revision of a prior
|
|
1444
|
-
conversation instead of a standalone proposal. Never produce this.
|
|
1445
|
-
|
|
1446
|
-
<!-- SHARED-CORE:exemplar END -->`;
|
|
1447
|
-
|
|
1448
|
-
// Progressive-disclosure reference files. Like `WIREFRAME_REFERENCE_MD`, each of
|
|
1449
|
-
// the canvas / document-quality / exemplar cores is the single source of truth
|
|
1450
|
-
// for its topic and is materialized verbatim into a sibling `references/*.md`
|
|
1451
|
-
// file in the visual-plan skill dir instead of being interpolated inline into
|
|
1452
|
-
// the SKILL.md body. The body carries only the matching `*_REFERENCE_POINTER`.
|
|
1453
|
-
// Keeping each reference body byte-identical to its core (markers included) lets
|
|
1454
|
-
// the sync guard assert the on-disk copies never drift from the constant.
|
|
1455
|
-
export const CANVAS_REFERENCE_MD = `# Canvas & artboard placement — single source of truth
|
|
1456
|
-
|
|
1457
|
-
This file is the canonical guide for how the visual-plan canvas works: artboard
|
|
1458
|
-
placement, lane layout, annotations, patching, and the legacy kit tree. Read it
|
|
1459
|
-
in full before authoring or editing any canvas/artboard content; do not author
|
|
1460
|
-
canvas layouts from memory or paraphrase these rules per mode.
|
|
1461
|
-
|
|
1462
|
-
${CANVAS_SURFACE_CORE}
|
|
1463
|
-
`;
|
|
1464
|
-
|
|
1465
|
-
export const DOCUMENT_QUALITY_REFERENCE_MD = `# Plan document quality — single source of truth
|
|
1466
|
-
|
|
1467
|
-
This file is the canonical quality bar for the plan document below the canvas:
|
|
1468
|
-
how it reads, which blocks to use, how open questions are surfaced, and the
|
|
1469
|
-
pre-handoff check. Read it in full before authoring the plan document; it is the
|
|
1470
|
-
quality bar. Do not write the document from memory or paraphrase these rules per
|
|
1471
|
-
mode.
|
|
1472
|
-
|
|
1473
|
-
${DOCUMENT_QUALITY_CORE}
|
|
1474
|
-
`;
|
|
1475
|
-
|
|
1476
|
-
export const EXEMPLAR_REFERENCE_MD = `# Good vs. bad exemplar — single source of truth
|
|
1477
|
-
|
|
1478
|
-
This file is the canonical worked example of a great plan (and the anti-patterns
|
|
1479
|
-
to avoid). Read it alongside the document-quality and canvas references before
|
|
1480
|
-
authoring a plan; it is the bar these plans must clear.
|
|
1481
|
-
|
|
1482
|
-
${EXEMPLAR_CORE}
|
|
1483
|
-
`;
|
|
1484
|
-
|
|
1485
|
-
// Short pointers that replace the inline canvas / document-quality / exemplar
|
|
1486
|
-
// cores in the SKILL.md body. Authoring detail lives in the sibling reference
|
|
1487
|
-
// files so the SKILL.md stays lean (progressive disclosure); the agent loads the
|
|
1488
|
-
// detail on demand.
|
|
1489
|
-
const CANVAS_REFERENCE_POINTER = `The canvas is the single source of truth for static UI mockups: the \`surface\`
|
|
1490
|
-
locks each artboard's footprint, mixed surfaces lay out
|
|
1491
|
-
in lanes, annotations are plain-text designer notes anchored by
|
|
1492
|
-
\`targetId\`/\`placement\`, and edits are surgical \`contentPatches\`. Before
|
|
1493
|
-
authoring or editing ANY canvas, artboard, or annotation, READ
|
|
1494
|
-
\`references/canvas.md\` in this skill directory — it is the single source of truth
|
|
1495
|
-
for canvas/artboard mechanics. Do not author canvas layouts from memory.`;
|
|
1496
|
-
|
|
1497
|
-
const DOCUMENT_QUALITY_REFERENCE_POINTER = `The document is a serious technical plan, not marketing: outcome-first,
|
|
1498
|
-
prose-first, self-contained, built from the right native blocks, with open
|
|
1499
|
-
questions in a single bottom \`question-form\` and a pre-handoff visual check.
|
|
1500
|
-
Before authoring the plan document, READ \`references/document-quality.md\` in this
|
|
1501
|
-
skill directory — it is the single source of truth for the document quality bar.
|
|
1502
|
-
Do not write the document from memory.`;
|
|
1503
|
-
|
|
1504
|
-
const EXEMPLAR_REFERENCE_POINTER = `For a worked example of the bar — a great UI-first plan and \`/visual-plan\`, plus
|
|
1505
|
-
the anti-patterns to avoid — READ \`references/exemplar.md\` in this skill
|
|
1506
|
-
directory before authoring a plan.`;
|
|
1507
|
-
|
|
1508
|
-
export const CONNECTION_REFERENCE_MD = `# Connecting & publishing — single source of truth
|
|
1509
|
-
|
|
1510
|
-
This file is the canonical rule for the never-inline deliverable, finding the
|
|
1511
|
-
Plan MCP connector, and restoring it when its tools are missing. It is shared
|
|
1512
|
-
word for word by \`/visual-plan\` and \`/visual-recap\`. Read it when you are about
|
|
1513
|
-
to publish, or whenever a connector or auth error appears; do not improvise an
|
|
1514
|
-
inline fallback from memory.
|
|
1515
|
-
|
|
1516
|
-
<!-- SHARED-CORE:connection START -->
|
|
1517
|
-
|
|
1518
|
-
**The deliverable is ALWAYS a published Agent-Native Plan, never inline chat
|
|
1519
|
-
content.** Do not hand the plan or recap to the user as Markdown prose, an ASCII
|
|
1520
|
-
sketch, a table, a fenced "wireframe", or a "here's the summary" paragraph. The
|
|
1521
|
-
entire value is the hosted, interactive, annotatable Plan; an inline summary is
|
|
1522
|
-
the thing a Plan replaces, not a degraded version of one. The only supported
|
|
1523
|
-
output is to publish through the Plan MCP connector and return its absolute URL.
|
|
1524
|
-
Local-files privacy mode (\`references/local-files.md\`) is the one exception.
|
|
1525
|
-
|
|
1526
|
-
**The connector is usually the \`plan\` server**, but older installed agents may
|
|
1527
|
-
expose the same hosted connector as \`agent-native-plans\` — both names are valid,
|
|
1528
|
-
so never report the connector as missing just because it is named
|
|
1529
|
-
\`agent-native-plans\` instead of \`plan\`. Some clients also lazy-load connector
|
|
1530
|
-
tools through a deferred tool registry instead of showing the namespace upfront.
|
|
1531
|
-
Before declaring the connector missing, search/load tools with the host's
|
|
1532
|
-
discovery surface (\`tool_search\` when available) for \`create_visual_plan\`,
|
|
1533
|
-
\`create_visual_recap\`, or \`get_plan_blocks\`, then use the tools it exposes.
|
|
1534
|
-
|
|
1535
|
-
**If the tools are still missing after discovery, do NOT fall back to inline
|
|
1536
|
-
output.** The usual cause is a connector that did not finish connecting this
|
|
1537
|
-
session (it registers zero tools), NOT necessarily an auth problem — so do not
|
|
1538
|
-
assume the user must re-authenticate. Stop and give the user the exact restore
|
|
1539
|
-
step for their current client:
|
|
1540
|
-
|
|
1541
|
-
- **Codex / Codex Desktop:** run
|
|
1542
|
-
\`npx -y @agent-native/core@latest reconnect https://plan.agent-native.com --client codex\`
|
|
1543
|
-
and start a new Codex session.
|
|
1544
|
-
- **Claude Code:** run \`/mcp\` and choose Authenticate/Reconnect, or run the same
|
|
1545
|
-
reconnect command with \`--client claude-code\` and restart Claude.
|
|
1546
|
-
|
|
1547
|
-
The same applies when a Plan tool returns \`needs auth\`, \`Unauthorized\`, or
|
|
1548
|
-
\`Session terminated\`: stop retrying the tool and give the reconnect step instead.
|
|
1549
|
-
|
|
1550
|
-
Auth is stored per client config/session, so one client's reconnect does not make
|
|
1551
|
-
another running client load tools. \`--client all\` refreshes every local client
|
|
1552
|
-
config that already has the Plan entry, but each running client still has to
|
|
1553
|
-
reload its MCP tools afterward. Reconnect re-authenticates WITHOUT reinstalling
|
|
1554
|
-
and finds the entry by URL regardless of connector name — never reinstall from
|
|
1555
|
-
scratch just to fix auth. Publish once the tool is reachable. Falling back to
|
|
1556
|
-
inline content is a defect, not a degraded mode.
|
|
1557
|
-
|
|
1558
|
-
<!-- SHARED-CORE:connection END -->
|
|
1559
|
-
`;
|
|
1560
|
-
|
|
1561
|
-
export const LOCAL_FILES_REFERENCE_MD = `# Local-files privacy mode — single source of truth
|
|
1562
|
-
|
|
1563
|
-
This file is the canonical contract for fully local, no-database planning and
|
|
1564
|
-
recaps. It is shared word for word by \`/visual-plan\` and \`/visual-recap\`. Read it
|
|
1565
|
-
in full before using local-files mode; do not call any hosted Plan tool for a
|
|
1566
|
-
local plan/recap except the schema-only block-catalog lookup described below.
|
|
1567
|
-
|
|
1568
|
-
<!-- SHARED-CORE:local-files START -->
|
|
1569
|
-
|
|
1570
|
-
**When to use it.** Use local-files privacy mode when the user explicitly asks
|
|
1571
|
-
for no DB writes, no hosted Plan database writes, no Plan MCP publish, fully local
|
|
1572
|
-
files, offline/private work, or repo-owned/source-controlled artifacts, or when
|
|
1573
|
-
\`AGENT_NATIVE_PLANS_MODE=local-files\` is set. Also use it when a user or repo
|
|
1574
|
-
policy says the work must stay under their own brand, domain, source control, or
|
|
1575
|
-
infrastructure. In this mode the plan/recap data must never be sent to the Plan
|
|
1576
|
-
MCP server or the Plan app action surface. This is the only exception to the
|
|
1577
|
-
always-publish rule in \`references/connection.md\`.
|
|
1578
|
-
|
|
1579
|
-
The local-files contract:
|
|
1580
|
-
|
|
1581
|
-
- **Read context locally.** Read source, diff, and stat context from local files
|
|
1582
|
-
and shell commands only. For recaps, the
|
|
1583
|
-
\`npx @agent-native/core@latest recap collect-diff\`, \`scan\`, and
|
|
1584
|
-
\`build-prompt --local-files\` helpers are safe — they operate on local files and
|
|
1585
|
-
do not write to the Plan database.
|
|
1586
|
-
- **Fetch the block catalog first** (it sends no plan content). Use the MCP
|
|
1587
|
-
\`get-plan-blocks\` tool if it is already available, or run
|
|
1588
|
-
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read that
|
|
1589
|
-
file before authoring MDX; it calls the public no-auth \`get-plan-blocks\` route.
|
|
1590
|
-
Use \`--format schema\` when you need exact nested fields. If network access is
|
|
1591
|
-
unavailable, use the bundled \`references/*.md\` and rely on \`plan local check\` to
|
|
1592
|
-
catch invalid tags. Copy the catalog examples verbatim for the fields the
|
|
1593
|
-
registry table cannot encode: \`checklist\` items need \`id\` and \`label\`;
|
|
1594
|
-
\`question-form\` questions need \`id\`, \`title\`, and \`mode\`, and each option needs
|
|
1595
|
-
\`id\` and \`label\`; and \`Code\` / \`AnnotatedCode\` / \`Diff\` are whitespace-sensitive
|
|
1596
|
-
— encode multiline code as JSON string attributes such as \`code={"const x =\\n y"}\`
|
|
1597
|
-
(a static template literal is accepted only when it has no \`\${...}\`
|
|
1598
|
-
interpolation). \`plan local check\` is a quick OFFLINE lint (a subset of the
|
|
1599
|
-
renderer schema), so a green \`check\` does not guarantee the plan renders;
|
|
1600
|
-
\`plan local verify\` is the authoritative validation against the real renderer
|
|
1601
|
-
schema.
|
|
1602
|
-
- **Write a local MDX folder.** Use \`plans/<slug>/\` to check the artifact into the
|
|
1603
|
-
repo, or a repo-ignored/temporary folder such as \`.agent-native/plans/<slug>/\`
|
|
1604
|
-
or \`/tmp/agent-native-plans/<slug>/\` when it should not be checked in. The
|
|
1605
|
-
folder holds \`plan.mdx\`, optional \`canvas.mdx\`, optional \`prototype.mdx\`, and
|
|
1606
|
-
optional \`.plan-state.json\`. For a recap, set \`kind: "recap"\` and
|
|
1607
|
-
\`localOnly: true\` in the frontmatter/state. Use that exact folder as
|
|
1608
|
-
\`<plan-dir>\` in every command below.
|
|
1609
|
-
- **Check, then serve.** Run
|
|
1610
|
-
\`npx @agent-native/core@latest plan local check --dir <plan-dir>\` before any
|
|
1611
|
-
preview, then
|
|
1612
|
-
\`npx @agent-native/core@latest plan local serve --dir <plan-dir> --kind <plan|recap> --open\`
|
|
1613
|
-
(use \`--kind plan\` for plans, \`--kind recap\` for recaps). Report the local
|
|
1614
|
-
bridge URL from stdout or \`<plan-dir>/.plan-url\`; treat \`.plan-url\` as a local
|
|
1615
|
-
token file and do not commit it. The URL opens the hosted Plan UI but reads from
|
|
1616
|
-
the localhost bridge on this machine, so it is not shareable across machines. On
|
|
1617
|
-
macOS \`--open\` prefers Chromium browsers; if Safari opens, switch to
|
|
1618
|
-
Chrome/Chromium because Safari can block the hosted HTTPS page from fetching the
|
|
1619
|
-
HTTP localhost bridge. If the Plan app itself is running locally with the same
|
|
1620
|
-
\`PLAN_LOCAL_DIR\`, the \`/local-plans/<slug>\` route is also valid. In a truly
|
|
1621
|
-
offline environment, hand off the \`<plan-dir>\` path after \`plan local check\` and
|
|
1622
|
-
note that interactive preview requires network access to the hosted Plan UI or a
|
|
1623
|
-
running local Plan app.
|
|
1624
|
-
- **Headless verify.** Run
|
|
1625
|
-
\`npx @agent-native/core@latest plan local verify --dir <plan-dir> --kind <plan|recap>\`.
|
|
1626
|
-
It starts the bridge, checks the private-network preflight and JSON payload, AND
|
|
1627
|
-
validates the content against the real renderer schema via the Plan app's
|
|
1628
|
-
\`validate-local-plan-source\` action. A non-\`ok\` result with
|
|
1629
|
-
\`validation.valid: false\` lists the renderer's exact schema-path issues (e.g.
|
|
1630
|
-
\`blocks[1].data.tabs[0]...\`); fix those before handing off. If \`validation.ran\`
|
|
1631
|
-
is \`false\`, the Plan app did not expose the validate endpoint (older/unreachable
|
|
1632
|
-
deploy) — point \`--app-url\` at a current Plan app (e.g. a local
|
|
1633
|
-
\`http://localhost:8096\`) for the authoritative check. If the browser hangs on
|
|
1634
|
-
"Loading plan", fetch the \`bridgeUrl\` from the verify/serve JSON to read the
|
|
1635
|
-
concrete validation error.
|
|
1636
|
-
- **Never call hosted tools for that plan/recap.** Do not call
|
|
1637
|
-
\`create-visual-plan\`, \`create-ui-plan\`, \`create-prototype-plan\`,
|
|
1638
|
-
\`create-plan-design\`, \`create-visual-recap\`, \`create-visual-questions\`,
|
|
1639
|
-
\`import-visual-plan-source\`, \`update-visual-plan\`, \`patch-visual-plan-source\`,
|
|
1640
|
-
\`get-plan-feedback\`, \`export-visual-plan\`, \`set-resource-visibility\`, or any
|
|
1641
|
-
other hosted Plan tool — except the schema-only block-catalog lookup above.
|
|
1642
|
-
- **Feedback is file/chat feedback.** Update the MDX files directly, rerun
|
|
1643
|
-
\`plan local check\`, and rerun \`serve\` or \`verify\` when that preview path is
|
|
1644
|
-
available. Summarize the new local URL when one exists; otherwise summarize the
|
|
1645
|
-
checked \`<plan-dir>\` path. Hosted comments, sharing, screenshots, history, usage
|
|
1646
|
-
attachment, and publish/export receipts are unavailable until the user
|
|
1647
|
-
explicitly opts into publishing.
|
|
1648
|
-
|
|
1649
|
-
Local-files mode only prevents plan/recap content from reaching the Agent-Native
|
|
1650
|
-
Plan database. It does not by itself make the coding agent's language model local;
|
|
1651
|
-
for that stronger boundary the host agent/model must also be local or otherwise
|
|
1652
|
-
approved by the user.
|
|
1653
|
-
|
|
1654
|
-
<!-- SHARED-CORE:local-files END -->
|
|
1655
|
-
`;
|
|
1656
|
-
|
|
1657
|
-
export const VISUAL_PLANS_SKILL_MD = `---
|
|
1658
|
-
name: visual-plan
|
|
1659
|
-
description: >-
|
|
1660
|
-
Turn ordinary text plans into rich interactive visual plans with diagrams,
|
|
1661
|
-
file maps, annotated code, open questions, and UI/prototype review when
|
|
1662
|
-
useful.
|
|
1663
|
-
metadata:
|
|
1664
|
-
visibility: exported
|
|
1665
|
-
---
|
|
1666
|
-
|
|
1667
|
-
# Agent-Native Plans
|
|
1668
|
-
|
|
1669
|
-
Agent-Native Plans is structured visual planning mode for coding agents. Build
|
|
1670
|
-
the plan you would normally write in Markdown, but as a scannable document with
|
|
1671
|
-
editable blocks mixed in: inline diagrams, code snippets,
|
|
1672
|
-
open questions, and an optional top visual review area (wireframe canvas, live
|
|
1673
|
-
prototype, or both in tabs). Architecture and backend plans stay document-only;
|
|
1674
|
-
UI and product plans start with the top canvas/prototype (the Visual Surface
|
|
1675
|
-
Choice section owns that rule).
|
|
1676
|
-
|
|
1677
|
-
\`/visual-plan\` is the packaged command and main entry point. Choose the review
|
|
1678
|
-
mode from the task: UI-first when the work is primarily product UI and review
|
|
1679
|
-
should start with screens, prototype-first when review should start with a
|
|
1680
|
-
functional live prototype, design-first when review needs full-fidelity branded
|
|
1681
|
-
screens, or visual-intake when the user explicitly wants a questionnaire before
|
|
1682
|
-
planning. When a Codex, Claude Code, Markdown, or pasted plan already exists,
|
|
1683
|
-
\`/visual-plan\` uses that source plan as the starting point and builds the review
|
|
1684
|
-
surface from it instead of starting over.
|
|
1685
|
-
|
|
1686
|
-
## When To Use
|
|
1687
|
-
|
|
1688
|
-
Create or adapt a visual plan whenever the plan would be better as a reviewable
|
|
1689
|
-
artifact than a chat paragraph. This includes modest work such as a single UI
|
|
1690
|
-
surface with states, a small workflow, a before/after product change, or a
|
|
1691
|
-
component/API/data-shape decision that needs alignment, plus larger multi-file,
|
|
1692
|
-
ambiguous, long-running, risky, or UI-heavy work. Use it when architecture /
|
|
1693
|
-
data flow / UI direction / options / open questions would benefit from inline
|
|
1694
|
-
diagrams or structured blocks, when the user needs to react to a direction
|
|
1695
|
-
before you implement, or when an existing text plan needs a richer review
|
|
1696
|
-
surface.
|
|
1697
|
-
|
|
1698
|
-
## Plan Discipline
|
|
1699
|
-
|
|
1700
|
-
- **Gate thoughtfully.** A visual plan is a richer review surface, not only a
|
|
1701
|
-
tool for giant projects. Use it when the user needs to see, compare, comment
|
|
1702
|
-
on, or approve a direction before code, even for a modest UI/state/workflow
|
|
1703
|
-
change. Skip it for truly trivial, unambiguous work — typos, one-line fixes, a
|
|
1704
|
-
single well-specified function, anything whose diff you could describe in one
|
|
1705
|
-
sentence — and just make the change. Never pad a plan with filler and never
|
|
1706
|
-
ship a single-step plan.
|
|
1707
|
-
- **Research before you draft.** Read the real files, actions, schema, and
|
|
1708
|
-
patterns first; name actual files, symbols, and data shapes instead of
|
|
1709
|
-
inventing them. Check existing \`actions/\` before proposing endpoints and prefer
|
|
1710
|
-
named client helpers over raw fetch. Delegate wide exploration to a sub-agent.
|
|
1711
|
-
Lead with reuse: for each step, name what it reuses — existing actions, schema,
|
|
1712
|
-
components, helpers — before what it adds, so the plan explains the genuinely new
|
|
1713
|
-
delta instead of redescribing what already exists.
|
|
1714
|
-
- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API
|
|
1715
|
-
work, sketch where the feature is headed, then call out the decisions that are
|
|
1716
|
-
expensive to undo once data or callers depend on them — wire format, public ids,
|
|
1717
|
-
data-model shape, auth and ownership boundaries — and get those right in the plan
|
|
1718
|
-
even if most of the feature ships later. Then scope to the smallest first cut that
|
|
1719
|
-
proves the approach without foreclosing it, stating both what is in and what is
|
|
1720
|
-
explicitly deferred.
|
|
1721
|
-
- **Keep examples at the right altitude.** When the user's idea is a broad
|
|
1722
|
-
framework, product, or operating-model change, do not collapse it into the
|
|
1723
|
-
first concrete example, provider, or sync path they mention. Separate the core
|
|
1724
|
-
abstraction from motivating examples and app/provider adapters. Use examples
|
|
1725
|
-
to make the plan legible, but label them as examples unless they are the whole
|
|
1726
|
-
requested scope.
|
|
1727
|
-
- **Publish standalone plans.** If the user pasted, referenced, or already has a
|
|
1728
|
-
Codex / Claude Code / Markdown plan, treat it as source material, but rewrite
|
|
1729
|
-
the published plan as a clean standalone proposal. Preserve the source plan's
|
|
1730
|
-
useful intent and codebase facts, label inferred visuals as inferred, and avoid
|
|
1731
|
-
revision language such as "preserve the prior plan", "do not drop the old
|
|
1732
|
-
idea", "unlike the previous version", or "this revision changes...". A reader
|
|
1733
|
-
who never saw the chat or earlier drafts should understand the plan.
|
|
1734
|
-
- **Make the first read concrete.** If the plan is meant to be shared with
|
|
1735
|
-
someone outside the chat, or if the concept is abstract, lead near the top with
|
|
1736
|
-
one concrete product example before mode tables, architecture, or roadmaps. For
|
|
1737
|
-
UI-capable concepts, that usually means a top-canvas app state that shows the
|
|
1738
|
-
real user workflow in product terms. Do not rely on phrases that only make
|
|
1739
|
-
sense in conversation, and do not frame the plan as "not the old idea"; state
|
|
1740
|
-
the positive model directly.
|
|
1741
|
-
- **Planning is read-only.** Make no source edits while building or reviewing the
|
|
1742
|
-
plan. Start editing only after the user approves the direction.
|
|
1743
|
-
- **Clarify vs. assume.** Do not ask how to build it — explore and present the
|
|
1744
|
-
approach and options in the plan. Ask a clarifying question only when an
|
|
1745
|
-
ambiguity would change the design and you cannot resolve it from the code; use
|
|
1746
|
-
the host agent's normal ask-user-question flow and batch 2-4 high-leverage
|
|
1747
|
-
questions before finalizing. Do not call \`create-visual-questions\` for
|
|
1748
|
-
ordinary clarification or preflight; reserve it for the visual-intake mode when
|
|
1749
|
-
the user explicitly asks for a visual intake questionnaire. Otherwise state the
|
|
1750
|
-
assumption explicitly and proceed, and keep anything unresolved in the plan's
|
|
1751
|
-
single bottom \`question-form\` Open Questions block. For complex plans, do a
|
|
1752
|
-
final open-question pass before handoff: if a decision would affect
|
|
1753
|
-
architecture, scope, UX, data shape, or rollout, either decide it in the plan
|
|
1754
|
-
with rationale or put it in that bottom form with a recommended default.
|
|
1755
|
-
- **The plan is the approval gate.** After surfacing it, ask the user to review
|
|
1756
|
-
and approve before you write code, and name which files/areas the work touches.
|
|
1757
|
-
Presenting the plan and requesting sign-off is the approval step — do not ask a
|
|
1758
|
-
separate "does this look good?" question.
|
|
1759
|
-
- **The document is the source of truth, not the chat.** When scope shifts,
|
|
1760
|
-
update the plan with \`update-visual-plan\` rather than only changing course in
|
|
1761
|
-
chat, and make the updated document stand alone. Do not describe the update as
|
|
1762
|
-
a correction to an earlier draft inside the plan itself. Re-read the approved
|
|
1763
|
-
plan before major steps.
|
|
1764
|
-
|
|
1765
|
-
## Create A Structured Agent-Native Plan — Never Inline
|
|
1766
|
-
|
|
1767
|
-
The deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.
|
|
1768
|
-
The hosted Plan MCP connector (\`plan\` server, or legacy \`agent-native-plans\`) is
|
|
1769
|
-
the default collaboration and commenting surface; it is not a reason to reject
|
|
1770
|
-
the planning pattern as an external dependency or rented layer. Plans are
|
|
1771
|
-
portable source artifacts (\`plan.mdx\`, optional \`canvas.mdx\` /
|
|
1772
|
-
\`prototype.mdx\`, JSON, and HTML export), and ownership-sensitive workflows can
|
|
1773
|
-
use local-files mode or a self-hosted/custom Plan app URL without abandoning the
|
|
1774
|
-
skill's review discipline. Do not advise the user to skip \`/visual-plan\` because
|
|
1775
|
-
the default surface is hosted; choose the right Plan mode for the user's
|
|
1776
|
-
ownership, privacy, sharing, and branding needs.
|
|
1777
|
-
|
|
1778
|
-
By default, create the plan via the Plan MCP connector and NEVER hand it over as
|
|
1779
|
-
inline chat content — no Markdown prose, ASCII sketch, table, or fenced
|
|
1780
|
-
wireframe. If the \`plan\` (or legacy \`agent-native-plans\`) tools are not visible,
|
|
1781
|
-
discover them through the host's \`tool_search\` first; if they are still missing,
|
|
1782
|
-
STOP and give the user the client-specific reconnect step rather than improvising
|
|
1783
|
-
an inline plan. Before publishing, or whenever a connector or auth error appears,
|
|
1784
|
-
READ \`references/connection.md\` in this skill directory — it is the single source
|
|
1785
|
-
of truth for the never-inline rule, connector discovery, and the per-client
|
|
1786
|
-
reconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.
|
|
1787
|
-
|
|
1788
|
-
## Core Workflow
|
|
1789
|
-
|
|
1790
|
-
This section describes the default hosted Plan MCP workflow. If
|
|
1791
|
-
\`AGENT_NATIVE_PLANS_MODE=local-files\` is set, or the user asks for fully local
|
|
1792
|
-
files/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry
|
|
1793
|
-
forward only the code-research and plan-composition guidance here.
|
|
1794
|
-
|
|
1795
|
-
1. Follow the host agent's normal planning flow: inspect the codebase, delegate
|
|
1796
|
-
wide exploration when useful, gather the info needed, and ask native
|
|
1797
|
-
clarifying questions as needed before generating the plan. If a source plan
|
|
1798
|
-
already exists, gather its exact text from the user's paste, a referenced
|
|
1799
|
-
file, or recent visible agent context; do not invent source text.
|
|
1800
|
-
2. Call \`get-plan-blocks\` for the authoritative block catalog — do not author
|
|
1801
|
-
from memorized tags. Then call the mode-matched create tool:
|
|
1802
|
-
\`create-visual-plan\` for document-first plans (architecture, backend, data,
|
|
1803
|
-
refactor, API), \`create-ui-plan\` for UI-first plans, \`create-prototype-plan\`
|
|
1804
|
-
for prototype-first plans, \`create-plan-design\` for design-first plans,
|
|
1805
|
-
\`create-visual-questions\` only when the user explicitly asks for a visual
|
|
1806
|
-
intake questionnaire. When a source plan already exists,
|
|
1807
|
-
pass it as \`planText\` and preserve the original plan's useful intent while
|
|
1808
|
-
producing a standalone plan document, not a revision memo.
|
|
1809
|
-
3. For UI/product plans, compose the top canvas first with the primary
|
|
1810
|
-
wireframes and annotated states, then write the document with native blocks
|
|
1811
|
-
(see \`references/canvas.md\` and \`references/document-quality.md\`). For
|
|
1812
|
-
broad product architecture plans with a user-facing implication, add a
|
|
1813
|
-
concrete "what this looks like in the app" visual before the abstract
|
|
1814
|
-
architecture or mode tables. Keep the document close to the standalone
|
|
1815
|
-
Markdown plan the agent would normally output. If an existing plan was
|
|
1816
|
-
provided, carry forward the right facts and decisions without referring to
|
|
1817
|
-
the previous draft or explaining how this version differs. For non-visual
|
|
1818
|
-
plans, skip the top visual surface (Visual Surface Choice below owns the rule)
|
|
1819
|
-
and put \`diagram\`, \`data-model\`,
|
|
1820
|
-
\`api-endpoint\`, \`diff\`, \`file-tree\`, \`code\`, and \`annotated-code\` blocks
|
|
1821
|
-
directly next to the relevant prose.
|
|
1822
|
-
Wide document layout is renderer-owned and intentionally allowlisted: only
|
|
1823
|
-
literal code-review surfaces (\`diff\`, \`annotated-code\`) and \`tabs\` blocks
|
|
1824
|
-
with vertical orientation or diff-like children break out wider than prose.
|
|
1825
|
-
Keep \`api-endpoint\`, \`openapi-spec\`, \`data-model\`, \`json-explorer\`,
|
|
1826
|
-
\`wireframe\`, question, and \`custom-html\` blocks in normal document flow unless
|
|
1827
|
-
their own renderer says otherwise.
|
|
1828
|
-
4. Surface the returned Plans link or inline MCP App and ask the user to review.
|
|
1829
|
-
Always include the actual URL in chat so the next step is a click in CLI or
|
|
1830
|
-
other text-only hosts. When the host exposes an embedded browser/preview panel
|
|
1831
|
-
and a tool can open arbitrary URLs there, open the returned plan URL
|
|
1832
|
-
automatically for convenient review — a convenience and smoke test, never the
|
|
1833
|
-
only handoff or the access
|
|
1834
|
-
model. Plans should load out of the box for the local agent and local browser
|
|
1835
|
-
session; if a signed-in embedded browser cannot read a local plan that an
|
|
1836
|
-
anonymous/tool check can read, fix the app/action ownership or access path
|
|
1837
|
-
rather than patching one plan by hand. For high-stakes plans (architecture,
|
|
1838
|
-
backend, data, multi-file, or risky), also kick off the self-review pass in
|
|
1839
|
-
**Self-Review Before Handoff** while the user reads, instead of blocking the
|
|
1840
|
-
handoff on it.
|
|
1841
|
-
5. For hosted plans, call \`get-plan-feedback\` before editing, after review,
|
|
1842
|
-
after any long pause,
|
|
1843
|
-
and before the final response. Treat \`anchorDetails\`, resolver intent, recent
|
|
1844
|
-
review events, and any focused screenshots from browser handoff as the source
|
|
1845
|
-
of truth for exactly what changed and exactly what each comment points at.
|
|
1846
|
-
6. For hosted plans, apply changes with \`update-visual-plan\`, preferring
|
|
1847
|
-
targeted \`contentPatches\`.
|
|
1848
|
-
Treat the top-level \`content\` payload as a full replacement, not a merge; do
|
|
1849
|
-
not send a partial \`content\` object to add a canvas or one block. If a full
|
|
1850
|
-
replacement is unavoidable, first read the complete plan source/content, carry
|
|
1851
|
-
forward every existing block and visual surface, and verify the source/export
|
|
1852
|
-
afterward so the document body was not truncated. When the user wants
|
|
1853
|
-
source-control friendly edits, use \`patch-visual-plan-source\` against the MDX
|
|
1854
|
-
files instead of regenerating the plan.
|
|
1855
|
-
7. For hosted plans, export with \`export-visual-plan\` only when the user wants a
|
|
1856
|
-
shareable receipt or repo-check-in artifacts.
|
|
1857
|
-
|
|
1858
|
-
## Self-Review Before Handoff
|
|
1859
|
-
|
|
1860
|
-
For high-stakes plans — architecture, backend, data-model, migration, multi-file,
|
|
1861
|
-
or otherwise risky work — run one adversarial self-review pass before treating the
|
|
1862
|
-
plan as final. Skip it for small, UI-only, or single-decision plans where the cost
|
|
1863
|
-
outweighs the value. Keep the pass cheap and non-blocking:
|
|
1864
|
-
|
|
1865
|
-
- **Surface the plan first, review concurrently.** Post the link and let the user
|
|
1866
|
-
start reading, then run the review in parallel — never make the user wait on it.
|
|
1867
|
-
- **Review the written plan; do not re-research.** Critique the plan text and its
|
|
1868
|
-
own blocks. The grounding was already done while drafting, so the review checks
|
|
1869
|
-
the output instead of re-exploring the repo.
|
|
1870
|
-
- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,
|
|
1871
|
-
or wrong — not to praise. Point it at: hard-to-reverse decisions made implicitly
|
|
1872
|
-
or not at all (wire format, public ids, data-model shape, auth, ownership); steps
|
|
1873
|
-
not anchored in real files or symbols; a menu of options where the plan should
|
|
1874
|
-
commit to one; obvious missing decisions ("what happens when X?", "why not Y?");
|
|
1875
|
-
and padding or single-step filler.
|
|
1876
|
-
- **Fix vs. ask.** Apply clear-cut fixes yourself with \`update-visual-plan\`
|
|
1877
|
-
\`contentPatches\` — vague non-goals, unanchored claims, an obvious missing
|
|
1878
|
-
decision. Route genuine judgment calls back to the user instead: add them to the
|
|
1879
|
-
bottom \`question-form\` Open Questions block or batch them into the normal
|
|
1880
|
-
ask-user-question flow. Do not silently decide them.
|
|
1881
|
-
- **Do not surprise the user mid-read.** On a large plan, apply the patches before
|
|
1882
|
-
the editor loads; otherwise note briefly that a self-review is running so the
|
|
1883
|
-
plan changing under them is expected. When you next respond, summarize what the
|
|
1884
|
-
review changed and what it surfaced for the user to decide.
|
|
1885
|
-
|
|
1886
|
-
## Visual Surface Choice
|
|
1887
|
-
|
|
1888
|
-
Choose the surface before creating the plan or after reading the source plan. Do
|
|
1889
|
-
not add visual chrome by default:
|
|
1890
|
-
|
|
1891
|
-
For UI/product plans, the top canvas is usually the primary review surface. Put
|
|
1892
|
-
the first meaningful wireframes there, not buried as document-body blocks. Use
|
|
1893
|
-
multiple canvas artboards when states matter, such as the default view, an
|
|
1894
|
-
overflow menu or popover, a side panel, loading, or error. Put short annotations
|
|
1895
|
-
beside frames with \`targetId\` plus \`placement\`; keep implementation details,
|
|
1896
|
-
tradeoffs, file maps, data contracts, risks, and verification in the document
|
|
1897
|
-
body below the canvas.
|
|
1898
|
-
|
|
1899
|
-
When the user asks for a flow, storyboard, journey, wireframe, canvas, or "what
|
|
1900
|
-
this looks like", treat that as a canvas-first request. Make one artboard per
|
|
1901
|
-
user-visible state, connect only adjacent transitions, and use short canvas
|
|
1902
|
-
annotations for the product notes. Do not substitute a document-body \`diagram\`
|
|
1903
|
-
block for the requested storyboard just because HTML diagrams are faster to
|
|
1904
|
-
write; diagrams belong below the canvas for backend mechanics, architecture, or
|
|
1905
|
-
data-flow explanation.
|
|
1906
|
-
|
|
1907
|
-
Keep product wireframes and explanatory/meta diagrams separate. Start with pure
|
|
1908
|
-
screens that look like the app state under discussion, without callout prose or
|
|
1909
|
-
architecture notes embedded inside the UI. Put arrows, labels, contracts, data
|
|
1910
|
-
flow, and mode explanations in separate annotations, separate canvas diagrams,
|
|
1911
|
-
or the document body.
|
|
1912
|
-
|
|
1913
|
-
When the plan touches an existing app, inspect the current shell/components
|
|
1914
|
-
before drawing. The first artboard should look like the real app at the same
|
|
1915
|
-
density: existing sidebars, toolbar placement, overflow menus, app chrome, and
|
|
1916
|
-
framework agent chrome stay in their real places. Model secondary surfaces as
|
|
1917
|
-
separate states, such as a top-right overflow popover, sheet, panel, loading
|
|
1918
|
-
state, or separate AgentSidebar, rather than inventing a permanent inspector or
|
|
1919
|
-
folding framework chrome into the product UI.
|
|
1920
|
-
|
|
1921
|
-
- **No visual surface** for architecture-only, backend-only, data migration,
|
|
1922
|
-
copy-only, or otherwise non-visual plans. Do not use the top canvas for
|
|
1923
|
-
architecture diagrams, dependency maps, file plans, API contracts, or
|
|
1924
|
-
data-flow-only reviews. Use a strong document with local inline diagrams
|
|
1925
|
-
only when relationships need a visual explanation, usually one spatial diagram
|
|
1926
|
-
per recommendation or decision. Prefer grouped regions, layers, quadrants,
|
|
1927
|
-
matrices, or before/after panels over a single-axis chain unless the
|
|
1928
|
-
relationship is truly sequential.
|
|
1929
|
-
- **Canvas only** for one static screen, a before/after comparison, a component
|
|
1930
|
-
state, a small popover, or a visual direction that does not require clicking.
|
|
1931
|
-
Put those wireframes in \`content.canvas\` and omit \`content.prototype\`.
|
|
1932
|
-
- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,
|
|
1933
|
-
review/approval flows, navigation changes, or anything where the reviewer
|
|
1934
|
-
needs to operate the behavior. Keep the static wireframes in
|
|
1935
|
-
\`content.canvas\`, add the aligned functional prototype in
|
|
1936
|
-
\`content.prototype\`, and rely on the top visual tabs to switch between them.
|
|
1937
|
-
- **Prototype-first** when the user asks to operate the UI or when interaction is
|
|
1938
|
-
the main question. Use \`create-prototype-plan\`, which still preserves static
|
|
1939
|
-
mocks where useful.
|
|
1940
|
-
|
|
1941
|
-
For mixed canvas + prototype plans, reuse the same real labels, app statuses,
|
|
1942
|
-
and screen ids across both surfaces. The canvas is the inspectable static reference;
|
|
1943
|
-
the prototype is the interactive version of that same flow, not a separate
|
|
1944
|
-
design direction.
|
|
1945
|
-
|
|
1946
|
-
## Wireframe quality — read \`references/wireframe.md\`
|
|
1947
|
-
|
|
1948
|
-
UI recap/plan wireframes must meet a strict quality bar — full-width chrome,
|
|
1949
|
-
pinned bottom bars, real product content, before/after comparability, the right
|
|
1950
|
-
\`surface\` preset, \`--wf-*\` tokens instead of hex, and no \`<html>\`/\`<style>\`/font
|
|
1951
|
-
tags. Before authoring ANY wireframe / \`<Screen>\` / \`WireframeBlock\`, READ
|
|
1952
|
-
\`references/wireframe.md\` in this skill directory — it is the single source of
|
|
1953
|
-
truth for HTML wireframe quality, shared word for word with \`/visual-plan\`
|
|
1954
|
-
and \`/visual-recap\`. Do not author wireframes from memory.
|
|
1955
|
-
|
|
1956
|
-
## Canvas — read \`references/canvas.md\`
|
|
1957
|
-
|
|
1958
|
-
The canvas is the single source of truth for static UI mockups: the \`surface\`
|
|
1959
|
-
locks each artboard's footprint, mixed surfaces lay out
|
|
1960
|
-
in lanes, annotations are plain-text designer notes anchored by
|
|
1961
|
-
\`targetId\`/\`placement\`, and edits are surgical \`contentPatches\`. Before
|
|
1962
|
-
authoring or editing ANY canvas, artboard, or annotation, READ
|
|
1963
|
-
\`references/canvas.md\` in this skill directory — it is the single source of truth
|
|
1964
|
-
for canvas/artboard mechanics. Do not author canvas layouts from memory.
|
|
1965
|
-
Canvas artboards use the same HTML wireframe path as document-body
|
|
1966
|
-
\`WireframeBlock\` screens: author \`<Screen surface="..." html={...} />\` with a
|
|
1967
|
-
semantic HTML fragment. Do not author fresh kit-tree children such as
|
|
1968
|
-
\`<FrameScreen>\`, \`<Card>\`, \`<Row>\`, or \`<Btn>\` inside canvas \`<Screen>\` tags;
|
|
1969
|
-
those are legacy compatibility markup for old plans and produce brittle canvas
|
|
1970
|
-
layouts.
|
|
1971
|
-
|
|
1972
|
-
## Document quality — read \`references/document-quality.md\`
|
|
1973
|
-
|
|
1974
|
-
The document is a serious technical plan, not marketing: outcome-first,
|
|
1975
|
-
prose-first, self-contained, built from the right native blocks, with open
|
|
1976
|
-
questions in a single bottom \`question-form\` and a pre-handoff visual check.
|
|
1977
|
-
Before authoring the plan document, READ \`references/document-quality.md\` in this
|
|
1978
|
-
skill directory — it is the single source of truth for the document quality bar.
|
|
1979
|
-
Do not write the document from memory.
|
|
1980
|
-
|
|
1981
|
-
## Good vs. bad exemplar — read \`references/exemplar.md\`
|
|
1982
|
-
|
|
1983
|
-
For a worked example of the bar — a great UI-first plan and \`/visual-plan\`, plus
|
|
1984
|
-
the anti-patterns to avoid — READ \`references/exemplar.md\` in this skill
|
|
1985
|
-
directory before authoring a plan.
|
|
1986
|
-
|
|
1987
|
-
## Tool Guidance
|
|
1988
|
-
|
|
1989
|
-
- \`create-visual-plan\`: start one structured visual plan per agent task/run, or
|
|
1990
|
-
import an existing text plan by passing \`planText\`; \`content\` may include no
|
|
1991
|
-
visual surface, canvas only, or canvas + prototype.
|
|
1992
|
-
- \`create-ui-plan\`: start a UI-first plan when the work is primarily product UI.
|
|
1993
|
-
- \`create-prototype-plan\`: start a prototype-first plan with a functional top
|
|
1994
|
-
review surface.
|
|
1995
|
-
- \`create-plan-design\`: start a full-fidelity branded Design-tab plan with an
|
|
1996
|
-
optional matching Prototype tab.
|
|
1997
|
-
- \`convert-visual-plan-to-prototype\`: convert an existing HTML wireframe canvas
|
|
1998
|
-
into a prototype plan.
|
|
1999
|
-
- \`create-visual-questions\`: use only when the user explicitly asks for a visual
|
|
2000
|
-
intake questionnaire, not as \`/visual-plan\` preflight.
|
|
2001
|
-
- \`update-visual-plan\`: revise content, status, or comments with targeted
|
|
2002
|
-
\`contentPatches\` (see Core Workflow step 6).
|
|
2003
|
-
- \`read-visual-plan-source\`: read the normalized plan as \`plan.mdx\`,
|
|
2004
|
-
optional \`canvas.mdx\`, optional \`.plan-state.json\`, and JSON.
|
|
2005
|
-
- \`patch-visual-plan-source\`: apply granular MDX AST patches by stable block,
|
|
2006
|
-
artboard, annotation, component, or wireframe-node id.
|
|
2007
|
-
- \`import-visual-plan-source\`: create or replace a plan from an MDX folder.
|
|
2008
|
-
- \`get-visual-plan\`: read the current structured plan, exported HTML, and
|
|
2009
|
-
annotations; it also returns the MDX folder for source workflows.
|
|
2010
|
-
- \`get-plan-feedback\`: read unconsumed human feedback. Use it frequently; it
|
|
2011
|
-
returns grouped threads, exact anchor details, expected resolver, and recent
|
|
2012
|
-
review-event payloads so agents can act only on the comments meant for them.
|
|
2013
|
-
- \`get-plan-blocks\`: resolve block tags before authoring — do not memorize tags;
|
|
2014
|
-
call this first to get the authoritative tag names, required fields, and prop
|
|
2015
|
-
shapes from the live block registry.
|
|
2016
|
-
- \`export-visual-plan\`: export HTML, Markdown fallback, structured JSON, and MDX
|
|
2017
|
-
files for repo check-in.
|
|
2018
|
-
|
|
2019
|
-
When the user critiques a plan's look or structure, fix the renderer or this
|
|
2020
|
-
skill — never hand-edit one stored plan. Turn feedback into better guidance.
|
|
2021
|
-
|
|
2022
|
-
## Local-Files Privacy Mode — read \`references/local-files.md\`
|
|
2023
|
-
|
|
2024
|
-
When the user wants no hosted Plan database writes — no DB writes, no Plan MCP
|
|
2025
|
-
publish, fully local/offline/private planning, repo-owned source-controlled
|
|
2026
|
-
artifacts, or \`AGENT_NATIVE_PLANS_MODE=local-files\` — do not call any hosted Plan
|
|
2027
|
-
tool except the schema-only \`get-plan-blocks\` catalog lookup. Author a local MDX
|
|
2028
|
-
folder and
|
|
2029
|
-
preview it with \`plan local check\` / \`plan local serve\` / \`plan local verify\`.
|
|
2030
|
-
Before using local-files mode, READ \`references/local-files.md\` in this skill
|
|
2031
|
-
directory — it is the single source of truth for the full contract (catalog
|
|
2032
|
-
lookup, MDX folder layout, the local bridge commands, and the hosted tools you
|
|
2033
|
-
must not call). Carry forward only the code-research and plan-composition
|
|
2034
|
-
guidance from Core Workflow; everything hosted is replaced by the local bridge.
|
|
2035
|
-
|
|
2036
|
-
## Interpreting comment anchors
|
|
2037
|
-
|
|
2038
|
-
This section applies to hosted plans with \`get-plan-feedback\` /
|
|
2039
|
-
\`update-visual-plan\`. In local-files mode, do not call hosted feedback or update
|
|
2040
|
-
tools; interpret file/chat feedback directly, edit the MDX files, rerun the
|
|
2041
|
-
local bridge check/serve/verify command, and report the new local URL.
|
|
2042
|
-
|
|
2043
|
-
\`get-plan-feedback\` returns rich anchors — read them before acting on any comment.
|
|
2044
|
-
|
|
2045
|
-
- **Coordinate frames.** \`targetX\`/\`targetY\` are percentages *within* the
|
|
2046
|
-
element named by \`targetSelector\`/\`targetKind\`. Bare \`x\`/\`y\` are percentages
|
|
2047
|
-
of the whole plan document. \`canvasX\`/\`canvasY\` are raw board-world pixels on
|
|
2048
|
-
the design canvas (board size given when available).
|
|
2049
|
-
- **Wireframe pins.** Anchors on wireframes include \`targetNodeId\` and
|
|
2050
|
-
\`targetNodePath\` (e.g. \`card > list > listItem "Acme Inc"\`) identifying the
|
|
2051
|
-
exact kit node. Use \`targetNodeId\` directly with wireframe node patch ops;
|
|
2052
|
-
use \`data-design-id\` values from design artboards with
|
|
2053
|
-
\`update-design-element-style\`. Prefer the node id/path over raw coordinates;
|
|
2054
|
-
fall back to coordinates plus the focused screenshot (red ring marks the exact
|
|
2055
|
-
point) only when no node id is present.
|
|
2056
|
-
- **Text quotes.** Resolve \`textQuote\` against current prose using
|
|
2057
|
-
\`contextBefore\`/\`contextAfter\` for disambiguation. If \`ambiguous: true\`, ask
|
|
2058
|
-
the user — do not guess which occurrence is meant.
|
|
2059
|
-
- **Detached comments.** \`get-plan-feedback\` flags threads whose quoted text no
|
|
2060
|
-
longer exists as \`detached\` (in \`detachedThreads\`). Reconcile these against
|
|
2061
|
-
rewritten content — never silently drop them.
|
|
2062
|
-
- **Routing.** \`resolutionTarget\` is the only routing signal: act on \`agent\`,
|
|
2063
|
-
treat \`human\` as context only. \`@mentions\` are people to notify, never a
|
|
2064
|
-
routing signal.
|
|
2065
|
-
- **Two-axis state.** Mark every ingested comment as consumed
|
|
2066
|
-
(\`consumedCommentIds\` on \`update-visual-plan\`). Set \`status=resolved\` only on
|
|
2067
|
-
agent-targeted comments you actually addressed; leave human-targeted comments
|
|
2068
|
-
open.
|
|
2069
|
-
|
|
2070
|
-
## Visibility & Sharing
|
|
2071
|
-
|
|
2072
|
-
Use \`set-resource-visibility\` to change who can see a plan (e.g. public, login,
|
|
2073
|
-
or org-scoped). Use \`share-resource\` to grant specific users or roles access
|
|
2074
|
-
by email or role. Gate visibility before sharing any plan that covers
|
|
2075
|
-
unreleased or private work — default to the narrowest scope that meets the
|
|
2076
|
-
review need.
|
|
2077
|
-
|
|
2078
|
-
## Setup & Authentication
|
|
2079
|
-
|
|
2080
|
-
There are two ways into Plans.
|
|
2081
|
-
|
|
2082
|
-
**Coding agent (CLI).** Install once with the Agent-Native CLI. The command
|
|
2083
|
-
installs the Plans skills, registers the hosted Plans MCP connector, and runs
|
|
2084
|
-
auth/setup for the selected local client(s) in the same step (a one-time browser
|
|
2085
|
-
sign-in at setup — this is intended), so the first tool call in that client does
|
|
2086
|
-
not hit an OAuth wall:
|
|
2087
|
-
|
|
2088
|
-
\`\`\`bash
|
|
2089
|
-
npx @agent-native/core@latest skills add visual-plans
|
|
2090
|
-
\`\`\`
|
|
2091
|
-
|
|
2092
|
-
After that, \`/visual-plan\`, \`/visual-recap\`, and \`/visualize-repo\` are the
|
|
2093
|
-
installed slash commands. If you only need one command, use
|
|
2094
|
-
\`skills add visual-plan\`, \`skills add visual-recap\`, or
|
|
2095
|
-
\`skills add visualize-repo\` instead. The other planning modes
|
|
2096
|
-
(\`create-ui-plan\`, \`create-prototype-plan\`, \`create-plan-design\`,
|
|
2097
|
-
\`create-visual-questions\`) are MCP tools reachable from \`/visual-plan\`, not
|
|
2098
|
-
separate slash commands. Pass \`--no-connect\` to register the connector without
|
|
2099
|
-
authenticating, then run
|
|
2100
|
-
\`npx @agent-native/core@latest connect https://plan.agent-native.com --client all\`
|
|
2101
|
-
whenever you are ready, or choose a narrower \`--client\`. Auth and MCP tool
|
|
2102
|
-
loading are per client config/session.
|
|
2103
|
-
|
|
2104
|
-
**Browser (people you share with).** Open the Plans editor and create & edit
|
|
2105
|
-
with no sign-up — you work as a guest. Sign in only when you want to save or
|
|
2106
|
-
share; signing in claims the plans you made as a guest into your account.
|
|
2107
|
-
|
|
2108
|
-
Sharing and commenting require an account: public/shared plans are viewable by
|
|
2109
|
-
anyone with the link, but commenting on them needs an agent-native account.
|
|
2110
|
-
|
|
2111
|
-
For fully offline, no-account use, run the Plans app locally and sync plans to
|
|
2112
|
-
your repo as MDX. This local mode is a separate advanced path, not the default
|
|
2113
|
-
hosted flow.
|
|
2114
|
-
|
|
2115
|
-
For repo-wide visual docs, run
|
|
2116
|
-
\`npx @agent-native/core@latest visualize-repo --open\` to create/update
|
|
2117
|
-
\`agent-native.json\`, seed \`.agent-native/visual-docs/repo-overview\`, and open
|
|
2118
|
-
the local bridge.
|
|
2119
|
-
|
|
2120
|
-
If a Plans tool returns \`needs auth\`, \`Unauthorized\`, or \`Session terminated\`, do
|
|
2121
|
-
not keep retrying it — stop and give the user the per-client reconnect step from
|
|
2122
|
-
\`references/connection.md\`, then continue once the connector is available.
|
|
2123
|
-
|
|
2124
|
-
Hosted default: connect \`https://plan.agent-native.com/_agent-native/mcp\`. Do
|
|
2125
|
-
not put shared secrets in skill files.
|
|
2126
|
-
`;
|
|
2127
|
-
|
|
2128
|
-
export const VISUAL_RECAP_SKILL_MD = `---
|
|
2129
|
-
name: visual-recap
|
|
2130
|
-
description: >-
|
|
2131
|
-
Turn a PR, branch, commit, or git diff into an interactive visual recap with
|
|
2132
|
-
diagrams, file maps, API/schema summaries, annotated diffs, and focused review
|
|
2133
|
-
notes.
|
|
2134
|
-
metadata:
|
|
2135
|
-
visibility: exported
|
|
2136
|
-
---
|
|
2137
|
-
|
|
2138
|
-
# Visual Recap
|
|
2139
|
-
|
|
2140
|
-
\`/visual-recap\` creates a visual plan built **from** a diff, not toward one. It
|
|
2141
|
-
is the reverse of forward planning: instead of describing the change you are
|
|
2142
|
-
about to make, you describe the change that was just made, at a higher altitude
|
|
2143
|
-
than line-by-line review. The same plan data model serves both directions —
|
|
2144
|
-
schema, API, file, and architecture changes become the same \`data-model\`,
|
|
2145
|
-
\`api-endpoint\`, \`file-tree\`, and \`diagram\` blocks a forward plan would use, only
|
|
2146
|
-
now they summarize work that exists. A reviewer scans the shape of the change
|
|
2147
|
-
before spending attention on the literal lines.
|
|
2148
|
-
|
|
2149
|
-
## Publish As An Agent-Native Plan — Never Inline
|
|
2150
|
-
|
|
2151
|
-
The deliverable is ALWAYS a published Agent-Native Plan, created with
|
|
2152
|
-
\`create-visual-recap\` on the Plan MCP connector — NEVER inline chat content (not
|
|
2153
|
-
Markdown prose, an ASCII sketch, a table, a fenced "wireframe", or a "here's the
|
|
2154
|
-
recap" summary). A recap's entire value is the hosted, interactive, annotatable
|
|
2155
|
-
plan; an inline summary is not a degraded recap, it is the thing a recap
|
|
2156
|
-
replaces. If the \`plan\` (or legacy \`agent-native-plans\`) tools are not visible,
|
|
2157
|
-
discover them through the host's \`tool_search\` first; if they are still missing,
|
|
2158
|
-
STOP and give the user the client-specific reconnect step rather than improvising
|
|
2159
|
-
an inline recap. Before publishing, or whenever a connector or auth error
|
|
2160
|
-
appears, READ \`references/connection.md\` in this skill directory — it is the
|
|
2161
|
-
single source of truth for the never-inline rule, connector discovery, and the
|
|
2162
|
-
per-client reconnect steps. Local-files privacy mode (below) is the one
|
|
2163
|
-
exception.
|
|
2164
|
-
|
|
2165
|
-
## Local-Files Privacy Mode — read \`references/local-files.md\`
|
|
2166
|
-
|
|
2167
|
-
When the user wants no hosted Plan database writes — no DB writes, no Plan MCP
|
|
2168
|
-
publish, fully local/offline/private recaps, or \`AGENT_NATIVE_PLANS_MODE=local-files\`
|
|
2169
|
-
— do not call any hosted Plan tool except the schema-only \`get-plan-blocks\`
|
|
2170
|
-
catalog lookup. Read the diff with the local \`recap collect-diff\` / \`scan\` /
|
|
2171
|
-
\`build-prompt --local-files\` helpers, author a local MDX folder (set
|
|
2172
|
-
\`kind: "recap"\` and \`localOnly: true\`), and preview it with \`plan local check\`,
|
|
2173
|
-
\`plan local serve --kind recap\`, and \`plan local verify --kind recap\`. Before
|
|
2174
|
-
using local-files mode, READ \`references/local-files.md\` in this skill directory
|
|
2175
|
-
— it is the single source of truth for the full contract.
|
|
2176
|
-
|
|
2177
|
-
## When To Use
|
|
2178
|
-
|
|
2179
|
-
Build a recap when a PR or commit is large, multi-file, or touches schema, API
|
|
2180
|
-
contracts, or architecture, and a reviewer would benefit from seeing the change
|
|
2181
|
-
mapped to structured blocks before reading the raw diff. A GitHub Action can
|
|
2182
|
-
generate one automatically from a PR diff; an agent can generate one on request
|
|
2183
|
-
("recap this PR", "show me what this branch changed"). Skip it for small,
|
|
2184
|
-
single-file, or obvious diffs — a recap is review overhead, and a tiny change
|
|
2185
|
-
reviews faster as plain diff.
|
|
2186
|
-
|
|
2187
|
-
## Recap The Whole Work Unit
|
|
2188
|
-
|
|
2189
|
-
When \`/visual-recap\` is invoked in a chat thread after work has already happened,
|
|
2190
|
-
the default scope is the whole current work unit/thread, not only the most recent
|
|
2191
|
-
user message, tool action, or follow-up fix. Gather the thread-owned changes
|
|
2192
|
-
across the conversation: original implementation work, later bug fixes, UI
|
|
2193
|
-
follow-ups, tests, changesets, skill/instruction updates, generated plan/source
|
|
2194
|
-
artifacts, and any local import/linking fixes needed to make the recap open.
|
|
2195
|
-
|
|
2196
|
-
Use the current diff plus conversation context to separate thread-owned changes
|
|
2197
|
-
from unrelated dirty work that existed before the thread. Exclude unrelated
|
|
2198
|
-
pre-existing edits. If the scope is genuinely ambiguous and cannot be inferred,
|
|
2199
|
-
state the assumption or ask a concise question before publishing.
|
|
2200
|
-
|
|
2201
|
-
When updating an existing recap after feedback, revise the recap so it still
|
|
2202
|
-
covers the whole thread/work unit plus the new correction. Do not replace a broad
|
|
2203
|
-
recap with a narrow recap of only the latest feedback unless the user explicitly
|
|
2204
|
-
asks for that narrower scope.
|
|
2205
|
-
|
|
2206
|
-
## Keep The Recap Body Lean
|
|
2207
|
-
|
|
2208
|
-
Do not add boilerplate intro, disclaimer, provenance, or summary prose blocks to
|
|
2209
|
-
the generated plan body. In particular, do not create a \`rich-text\` block just to
|
|
2210
|
-
say the recap is an aid, that the reviewer should still review the diff, how many
|
|
2211
|
-
files changed, or which ref/working tree generated the recap. The plan title,
|
|
2212
|
-
brief, and \`file-tree\` (which carries the per-file change stats) already carry
|
|
2213
|
-
that context.
|
|
2214
|
-
|
|
2215
|
-
Only add prose blocks when they tell the reviewer something specific about the
|
|
2216
|
-
change that the structured blocks do not: the objective, a real compatibility
|
|
2217
|
-
risk, an important decision visible in the diff, or a grounded review note.
|
|
2218
|
-
|
|
2219
|
-
## Recaps Must Be Substantial
|
|
2220
|
-
|
|
2221
|
-
Lean is not the same as thin. A recap is not a single wireframe plus one
|
|
2222
|
-
sentence — that under-serves the reviewer as much as boilerplate prose over-serves
|
|
2223
|
-
them. Alongside the visual/structural headline (wireframes, \`data-model\`,
|
|
2224
|
-
\`api-endpoint\`, \`diagram\`), a substantial recap also carries the implementation
|
|
2225
|
-
evidence:
|
|
2226
|
-
|
|
2227
|
-
- A short surface/state inventory before authoring: list the changed routes,
|
|
2228
|
-
components, popovers/dialogs, role/access states, empty/error states, and
|
|
2229
|
-
shared abstractions visible in the diff. The final recap must either represent
|
|
2230
|
-
each meaningful item with a block or intentionally omit it because it is tiny,
|
|
2231
|
-
redundant, or not user-visible.
|
|
2232
|
-
- A \`file-tree\` of the changed files with each entry's \`change\` flag, so the
|
|
2233
|
-
reviewer sees the footprint of the work at a glance.
|
|
2234
|
-
- The split \`diff\` of the KEY changed files, grouped under a \`## Key changes\`
|
|
2235
|
-
\`rich-text\` heading in a single horizontal \`tabs\` block (the default
|
|
2236
|
-
orientation, one file per tab), with a one-line \`summary\` and a few
|
|
2237
|
-
\`annotations\` on each — so the reviewer can drop from the high-altitude shape
|
|
2238
|
-
straight into the load-bearing code. Use horizontal file tabs, not a vertical
|
|
2239
|
-
side rail, so the selected file has enough width for the side-by-side diff.
|
|
2240
|
-
|
|
2241
|
-
Skip the diff appendix only for a genuinely tiny change that reviews faster as
|
|
2242
|
-
plain diff (see "When To Use"); for any change worth recapping, the file-tree and
|
|
2243
|
-
key-change diffs belong in the plan.
|
|
2244
|
-
|
|
2245
|
-
## Canonical Shape And Budgets
|
|
2246
|
-
|
|
2247
|
-
A strong recap follows one skeleton, top to bottom:
|
|
2248
|
-
|
|
2249
|
-
1. UI-impact headline — wireframes first, when the diff changed rendered UI.
|
|
2250
|
-
2. Short outcome narrative (\`rich-text\`): what changed and why, 1-3 paragraphs.
|
|
2251
|
-
3. \`data-model\` / \`api-endpoint\` blocks for schema and contract changes.
|
|
2252
|
-
4. \`file-tree\` of the changed files with \`change\` flags.
|
|
2253
|
-
5. \`## Key changes\` — one horizontal \`tabs\` block of \`diff\` / \`annotated-code\`.
|
|
2254
|
-
|
|
2255
|
-
Budgets that keep the recap reviewable:
|
|
2256
|
-
|
|
2257
|
-
- 3-8 key-change tabs. Fewer than 3 on a large change under-serves the
|
|
2258
|
-
reviewer; more than 8 stops being a summary.
|
|
2259
|
-
- Keep each diff/annotated-code excerpt focused — prefer under ~150 lines per
|
|
2260
|
-
tab; summarize or link the rest of a long file instead of dumping it.
|
|
2261
|
-
- Title at most ~70 characters; brief 1-3 sentences.
|
|
2262
|
-
|
|
2263
|
-
**GOOD.** A 25-file auth change: Before/After wireframes of the login surface,
|
|
2264
|
-
a two-paragraph narrative, a diff-aware \`data-model\` of the sessions table, an
|
|
2265
|
-
\`api-endpoint\` for the new refresh route, a \`file-tree\` with change flags, and
|
|
2266
|
-
\`## Key changes\` with five focused tabs, each with a one-line \`summary\` and a
|
|
2267
|
-
few annotations on the load-bearing hunks.
|
|
2268
|
-
|
|
2269
|
-
**BAD.** One giant unsegmented diff dump with no summaries or annotations; or a
|
|
2270
|
-
sparse three-block recap of a 40-file change (one wireframe, one sentence, one
|
|
2271
|
-
file list) that forces the reviewer back into the raw diff anyway.
|
|
2272
|
-
|
|
2273
|
-
## UI Impact Needs Wireframes
|
|
2274
|
-
|
|
2275
|
-
When the diff changes rendered UI, layout, density, visual state, interaction
|
|
2276
|
-
affordances, navigation, controls, menus, dialogs, or design tokens, the recap
|
|
2277
|
-
MUST include one or more wireframes. Prose and file diffs are not a substitute
|
|
2278
|
-
for showing what changed visually.
|
|
2279
|
-
|
|
2280
|
-
Before choosing wireframes, make a UI coverage pass from the diff:
|
|
2281
|
-
|
|
2282
|
-
- Identify the entry surface where the change appears, such as a page header,
|
|
2283
|
-
list row, toolbar, route shell, or menu trigger.
|
|
2284
|
-
- Identify the interaction surface that opens or changes, such as a popover,
|
|
2285
|
-
dialog, tab, sheet, dropdown, inline editor, or toast.
|
|
2286
|
-
- Identify the resulting destination or persistent state, such as a public page,
|
|
2287
|
-
read-only view, empty state, error state, loading state, permission-denied
|
|
2288
|
-
state, or saved/shared state.
|
|
2289
|
-
- Identify access or role variants when permissions change. Owner/admin/editor
|
|
2290
|
-
versus viewer/non-manager differences are visual behavior and need a compact
|
|
2291
|
-
matrix, paired wireframes, or clearly labeled state sequence.
|
|
2292
|
-
|
|
2293
|
-
For UI-heavy PRs, a single before/after of the entry surface is not enough.
|
|
2294
|
-
Show the changed entry point, the main changed interaction surface, and the
|
|
2295
|
-
resulting/destination state. Add more states when the diff adds tabs, role-based
|
|
2296
|
-
controls, public/private visibility, invite/manage flows, destructive controls,
|
|
2297
|
-
or empty/error branches.
|
|
2298
|
-
|
|
2299
|
-
Choose the smallest visual surface that makes the review clear:
|
|
2300
|
-
|
|
2301
|
-
- Use a \`Before\` / \`After\` wireframe pair when the reviewer benefits from direct
|
|
2302
|
-
comparison, such as a removed or added control, a changed state, layout
|
|
2303
|
-
density, ordering, navigation, or a visible component replacement.
|
|
2304
|
-
\`references/wireframe.md\` owns how to lay that pair out (columns vs.
|
|
2305
|
-
vertical stack by geometry).
|
|
2306
|
-
- Use an after-only wireframe when the change is purely additive or the "before"
|
|
2307
|
-
state would only show absence without adding review value.
|
|
2308
|
-
- Use more than two wireframes when the UI change is flow-dependent, responsive,
|
|
2309
|
-
or stateful; show the meaningful states in order instead of forcing a single
|
|
2310
|
-
before/after pair.
|
|
2311
|
-
- For tiny surfaces like menus, popovers, dialogs, toasts, or panels, use the
|
|
2312
|
-
matching \`surface\` (\`popover\`, \`panel\`, etc.) and show the focused sub-surface.
|
|
2313
|
-
Do not redraw a full page unless placement in the page is itself part of the
|
|
2314
|
-
change.
|
|
2315
|
-
|
|
2316
|
-
Ground each wireframe in the changed UI behavior, component names, file paths,
|
|
2317
|
-
and diff-visible labels/states. If exact pixels are inferred rather than
|
|
2318
|
-
captured, say so in the wireframe caption or a concise annotation. For
|
|
2319
|
-
local/manual recaps, import or update the plan source that holds the wireframes
|
|
2320
|
-
so the rendered recap opens with the UI visual available.
|
|
2321
|
-
|
|
2322
|
-
## Wireframe Quality — read \`references/wireframe.md\`
|
|
2323
|
-
|
|
2324
|
-
UI recap/plan wireframes must meet a strict quality bar — full-width chrome,
|
|
2325
|
-
pinned bottom bars, real product content, before/after comparability, the right
|
|
2326
|
-
\`surface\` preset, \`--wf-*\` tokens instead of hex, and no \`<html>\`/\`<style>\`/font
|
|
2327
|
-
tags. Before authoring ANY wireframe / \`<Screen>\` / \`WireframeBlock\`, READ
|
|
2328
|
-
\`references/wireframe.md\` in this skill directory — it is the single source of
|
|
2329
|
-
truth for HTML wireframe quality, shared word for word with \`/visual-plan\`
|
|
2330
|
-
and \`/visual-recap\`. Do not author wireframes from memory.
|
|
2331
|
-
|
|
2332
|
-
Use the standard \`WireframeBlock\` / \`<Screen>\` format so the Plan viewer owns the
|
|
2333
|
-
surface frame, theme, and sketchy/clean toggle. HTML wireframes are appropriate
|
|
2334
|
-
when placement precision matters, especially popovers, menus, dialogs, and dense
|
|
2335
|
-
forms. For HTML
|
|
2336
|
-
wireframes, keep \`renderMode\` unset or \`wireframe\` unless a design-only editable
|
|
2337
|
-
mockup is explicitly required, because \`renderMode="design"\` disables the
|
|
2338
|
-
sketchy rough overlay.
|
|
2339
|
-
|
|
2340
|
-
When a browser tool is available, render a UI-impact recap in the Plan viewer
|
|
2341
|
-
and visually inspect it at the current theme before sharing. If any label,
|
|
2342
|
-
annotation, toolbar, or wireframe content overlaps another element, fix the MDX
|
|
2343
|
-
and re-import before reporting the link. A text-match screenshot is not enough;
|
|
2344
|
-
visually inspect the captured image. When no browser is available (for example
|
|
2345
|
-
a headless CI agent), state that in the recap handoff instead.
|
|
2346
|
-
|
|
2347
|
-
## Top Canvas Recaps — read \`../visual-plan/references/canvas.md\`
|
|
2348
|
-
|
|
2349
|
-
When a recap includes a top canvas, storyboard, or flow view, READ
|
|
2350
|
-
\`../visual-plan/references/canvas.md\` before authoring \`canvas.mdx\`. Recap
|
|
2351
|
-
canvas artboards must use the same HTML wireframe path as good document-body
|
|
2352
|
-
wireframes: \`<Screen surface="..." html={...} />\` with a semantic HTML fragment.
|
|
2353
|
-
Do not author fresh kit-tree children such as \`<FrameScreen>\`, \`<Card>\`,
|
|
2354
|
-
\`<Row>\`, \`<Title>\`, or \`<Btn>\` inside canvas \`<Screen>\` tags. Those components
|
|
2355
|
-
are legacy compatibility markup for old plans; in new canvas storyboards they
|
|
2356
|
-
can produce cramped or overlapping layouts even when the inline body wireframe
|
|
2357
|
-
looks good. If a canvas mockup looks worse than the same screen below the fold,
|
|
2358
|
-
assume it used the legacy kit path and replace it with an HTML screen.
|
|
2359
|
-
|
|
2360
|
-
## Open And Report The Recap
|
|
2361
|
-
|
|
2362
|
-
In local-files privacy mode, run \`plan local check\` first, then report the local
|
|
2363
|
-
bridge URL from
|
|
2364
|
-
\`npx @agent-native/core@latest plan local serve --dir <plan-dir> --kind recap --open\`
|
|
2365
|
-
or from \`<plan-dir>/.plan-url\`. It opens the hosted Plan UI but reads from the
|
|
2366
|
-
localhost bridge on this machine, so it is not shareable across machines. If the
|
|
2367
|
-
Plan app itself is running locally with the same \`PLAN_LOCAL_DIR\`, the
|
|
2368
|
-
\`/local-plans/<slug>\` route is also valid. Do not invent a hosted database URL
|
|
2369
|
-
and do not publish just to get an absolute Plan link.
|
|
2370
|
-
|
|
2371
|
-
After creating the recap, link the reviewer to the rendered plan with an
|
|
2372
|
-
**absolute URL on the origin whose database actually holds the plan**. That
|
|
2373
|
-
origin is the Plan MCP server you just created the recap through — NOT whatever
|
|
2374
|
-
dev server you happen to know is running. The create tool returns the correct
|
|
2375
|
-
link; report THAT. Never make the primary link a local \`plan.mdx\` file, a local
|
|
2376
|
-
mirror folder, or a relative path such as \`/plans/<id>\`.
|
|
2377
|
-
|
|
2378
|
-
When the recap is posted to a PR for a private repo, the plan link is not a
|
|
2379
|
-
public URL. Make the PR comment/handoff copy explicit: reviewers may need to
|
|
2380
|
-
sign in to Agent-Native Plans with an account that has access to the owning
|
|
2381
|
-
organization before the link loads. Use wording like: "Private repo recap:
|
|
2382
|
-
sign in with access to this org if the plan does not open." Do not imply the
|
|
2383
|
-
link is broken or public when access is gated by repo/org visibility.
|
|
2384
|
-
|
|
2385
|
-
A recap lives only in the database of the MCP that created it. A separately
|
|
2386
|
-
running local dev server (e.g. \`http://localhost:8081\`) has its OWN database and
|
|
2387
|
-
will NOT contain a recap created through the hosted MCP, so a hand-built
|
|
2388
|
-
\`localhost\` link returns "Plan not found". This is the most common recap
|
|
2389
|
-
mistake — do not guess an origin you have not confirmed shares the MCP's data.
|
|
2390
|
-
|
|
2391
|
-
Resolve the URL in this order:
|
|
2392
|
-
|
|
2393
|
-
1. Use the absolute URL the create tool RETURNS — \`openLink.webUrl\`, else the
|
|
2394
|
-
\`visualUrl\` in the returned \`plan.mdx\` frontmatter, else \`url\`/\`path\`
|
|
2395
|
-
resolved against the MCP server's own origin (for the hosted MCP that is
|
|
2396
|
-
\`https://plan.agent-native.com\`). This always points at the database that has
|
|
2397
|
-
the plan.
|
|
2398
|
-
2. Use a \`localhost\`/dev origin ONLY when the recap was created through a Plan
|
|
2399
|
-
MCP bound to that same origin — i.e. that MCP's url is
|
|
2400
|
-
\`http://localhost:<port>/_agent-native/mcp\`. Creating through the hosted MCP
|
|
2401
|
-
and linking to localhost is the exact mismatch that 404s.
|
|
2402
|
-
3. If only a plan id is available, build the MCP origin's absolute URL
|
|
2403
|
-
(hosted: \`https://plan.agent-native.com/plans/<id>\`) and say it was inferred.
|
|
2404
|
-
|
|
2405
|
-
If the user wants to review on localhost but the recap was created through the
|
|
2406
|
-
hosted MCP, say so plainly: the local dev server cannot see it. To view a recap
|
|
2407
|
-
on localhost (e.g. to exercise un-deployed local renderer changes), they must
|
|
2408
|
-
connect a LOCAL Plan MCP (\`http://localhost:<port>/_agent-native/mcp\`) and
|
|
2409
|
-
re-create the recap through it so it lands in the local database; offer to do
|
|
2410
|
-
that rather than handing over a localhost URL that will not resolve.
|
|
2411
|
-
|
|
2412
|
-
When running in Codex and the Browser/in-app side browser tools are available,
|
|
2413
|
-
open the returned absolute recap URL there automatically after creation. Still
|
|
2414
|
-
include the same absolute URL in the final response. Local mirror files like
|
|
2415
|
-
\`plans/<slug>/plan.mdx\` may be mentioned only as secondary source-control
|
|
2416
|
-
artifacts, not as the main way to open the recap.
|
|
2417
|
-
|
|
2418
|
-
## Diff → Block Mapping
|
|
2419
|
-
|
|
2420
|
-
Map each kind of change to the block that carries it, derived mechanically from
|
|
2421
|
-
the actual diff. The names below are the CONCEPTUAL block types, not the JSX
|
|
2422
|
-
tags — resolve every conceptual name to its exact tag + prop schema with the
|
|
2423
|
-
\`get-plan-blocks\` tool (see "Block reference" below) before authoring.
|
|
2424
|
-
|
|
2425
|
-
- **Schema / migration change** → \`data-model\` for the resulting entities,
|
|
2426
|
-
fields, and relations. Flag what moved per field/entity with
|
|
2427
|
-
\`change: "added" | "modified" | "removed" | "renamed"\`, and for a changed type
|
|
2428
|
-
set \`was\` to the prior value (e.g. the old column type) — grounded in the real
|
|
2429
|
-
migration diff. That diff-aware \`data-model\` is the headline; reach for a split
|
|
2430
|
-
\`diff\` of the literal SQL only when the exact statement still matters, not by
|
|
2431
|
-
default.
|
|
2432
|
-
- **API / action / route change** → \`api-endpoint\` with the method, path,
|
|
2433
|
-
params, request, and responses as they are after the change. Flag each changed
|
|
2434
|
-
param/response with \`change\` (and \`was\` on a param whose type/shape changed),
|
|
2435
|
-
and set \`change\` on the endpoint root for a wholly added or removed route. Mark
|
|
2436
|
-
removed endpoints with \`deprecated: true\` and explain in prose.
|
|
2437
|
-
Keep multiple API endpoints in the normal single-column document flow unless
|
|
2438
|
-
they are an explicit before/after contract comparison.
|
|
2439
|
-
Author each request/response example as a SINGLE valid JSON value — one
|
|
2440
|
-
top-level object or array, parseable on its own — so it renders in the
|
|
2441
|
-
collapsible JSON explorer. Do not put \`//\` or \`/* */\` comments, prose,
|
|
2442
|
-
trailing commas, or two or more concatenated top-level objects inside one
|
|
2443
|
-
example; a non-parseable body falls back to flat text and loses the explorer.
|
|
2444
|
-
When an endpoint has several distinct message shapes (for example separate
|
|
2445
|
-
websocket frame types, or a success body versus an error body), give each its
|
|
2446
|
-
OWN example with its own label rather than cramming them into one body.
|
|
2447
|
-
- **Compatibility-sensitive change** → short \`rich-text\` notes beside the
|
|
2448
|
-
relevant \`data-model\` / \`api-endpoint\` block. Name the changed field,
|
|
2449
|
-
endpoint, or behavior and mark whether it is breaking, risky, or non-breaking;
|
|
2450
|
-
pair that note with a split \`diff\` for the literal lines.
|
|
2451
|
-
- **Any meaningful code hunk** → \`diff\` with \`mode: "split"\`, carrying the real
|
|
2452
|
-
\`before\` / \`after\` text and the \`filename\` / \`language\`. Split mode is the
|
|
2453
|
-
default for recap code review because before/after legibility is the point;
|
|
2454
|
-
use \`mode: "unified"\` only for a genuinely narrow standalone hunk where
|
|
2455
|
-
side-by-side would hide the code. Give every \`diff\` a one-line \`summary\`
|
|
2456
|
-
saying what the hunk changes and why; it renders as a description above the
|
|
2457
|
-
code so the reviewer reads intent first. Never leave a diff unlabeled.
|
|
2458
|
-
For the KEY changed files, attach \`annotations\` to the \`diff\` so the recap
|
|
2459
|
-
calls out what each important hunk does — this is the headline affordance for
|
|
2460
|
-
annotating the key files updated. Each annotation anchors to the AFTER-side
|
|
2461
|
-
line numbers by default (set \`side: "before"\` to point at removed lines). Keep
|
|
2462
|
-
it to a few high-signal notes per file, not one per line.
|
|
2463
|
-
When several key files each need a substantial diff, introduce the group with a
|
|
2464
|
-
\`rich-text\` heading block whose markdown is \`## Key changes\`, then place the
|
|
2465
|
-
\`diff\` blocks under it in a reusable \`tabs\` block with horizontal orientation
|
|
2466
|
-
(the default — omit \`orientation\`) so the selected file's split diff gets the
|
|
2467
|
-
full document width. Let that heading label the section — do NOT also set a
|
|
2468
|
-
\`title\` on the \`tabs\` block. Keep each tab label to the file path or a short
|
|
2469
|
-
basename plus directory hint.
|
|
2470
|
-
The renderer's wide document layout is intentionally allowlisted: \`diff\`,
|
|
2471
|
-
\`annotated-code\`, vertical \`tabs\`, and \`tabs\` containing diff-like children
|
|
2472
|
-
break out wider than prose. Do not put API endpoints, OpenAPI specs, data
|
|
2473
|
-
models, JSON explorers, wireframes, question forms, or custom HTML into tabs
|
|
2474
|
-
merely to make them wide.
|
|
2475
|
-
If the recap ends with more than one supporting diff, that trailing diff
|
|
2476
|
-
appendix should be one horizontal \`tabs\` block under its own \`## Key changes\`
|
|
2477
|
-
heading, not a stack of separate \`diff\` blocks.
|
|
2478
|
-
- **Brand-new file or a substantial added block with no meaningful "before"** →
|
|
2479
|
-
\`annotated-code\` rather than a one-sided split \`diff\`. Carry the real new code
|
|
2480
|
-
with its \`filename\` / \`language\` and anchor a few high-signal notes to the lines
|
|
2481
|
-
that matter so the reviewer reads what the new code does, not code for code's
|
|
2482
|
-
sake. Keep split \`diff\` for true before/after hunks where the removed lines
|
|
2483
|
-
still carry meaning, and group several annotated walkthroughs in a horizontal
|
|
2484
|
-
\`tabs\` block the same way diffs are grouped.
|
|
2485
|
-
- **Files added / removed / renamed** → \`file-tree\` with each entry's \`change\`
|
|
2486
|
-
flag (\`added\`, \`removed\`, \`modified\`, \`renamed\`) and a short \`note\`; attach a
|
|
2487
|
-
\`snippet\` only when one tells the reviewer something the path does not.
|
|
2488
|
-
- **Rendered UI / interaction change** → one or more wireframes showing the
|
|
2489
|
-
visible UI delta before the reviewer reads code. Use \`Before\` / \`After\`
|
|
2490
|
-
wireframes when the comparison clarifies the change; otherwise use after-only
|
|
2491
|
-
or a short state/flow sequence. Use realistic UI surfaces: for a popover
|
|
2492
|
-
change, show a popover with its title row, top-right actions, options/fields,
|
|
2493
|
-
tabs, selected/disabled states, people/lists/rows, and any opened prompt/menu
|
|
2494
|
-
anchored to the correct trigger. If a route was added, show the route body and
|
|
2495
|
-
the unavailable/empty state when the diff implements one. If permissions
|
|
2496
|
-
changed, show what managers can do and what viewers/non-managers see instead.
|
|
2497
|
-
Keep the body lean: the wireframe carries the UI story, while the file tree
|
|
2498
|
-
and \`diff\` blocks carry implementation evidence.
|
|
2499
|
-
- **Architecture or data-flow shift** → \`diagram\` with \`data.html\` / \`data.css\`
|
|
2500
|
-
as a two-panel before/after, layered, or swimlane layout, or \`mermaid\` for a
|
|
2501
|
-
quick graph. Use two-dimensional layouts; do not reduce a structural change to
|
|
2502
|
-
a left-to-right chain. Do not use \`diagram\` as a stand-in for rendered UI
|
|
2503
|
-
controls; UI changes need \`wireframe\` blocks.
|
|
2504
|
-
Author diagram HTML/CSS with the renderer-owned \`.diagram-*\` primitives
|
|
2505
|
-
(\`.diagram-panel\`, \`.diagram-node\`, \`.diagram-pill\`, \`[data-rough]\`, …) and
|
|
2506
|
-
the same \`--wf-*\` theme tokens \`references/wireframe.md\` defines — never
|
|
2507
|
-
\`font-family\`, hex, rgb/hsl literals, or one-off dark/light palettes. Choose
|
|
2508
|
-
the outer \`frame\` intentionally: recap diagrams usually benefit from
|
|
2509
|
-
\`frame: "show"\` when they stand alone, but use \`frame: "hide"\` when columns,
|
|
2510
|
-
tabs, a card, or the diagram's own panels already provide the boundary.
|
|
2511
|
-
- **Outcome-first narrative** → \`rich-text\` for the "what changed and why" prose:
|
|
2512
|
-
the objective the diff served, the key decisions visible in it, and the risks a
|
|
2513
|
-
reviewer should weigh. This is the only place the model writes freely.
|
|
2514
|
-
|
|
2515
|
-
## Block reference — call \`get-plan-blocks\`, do not memorize tags
|
|
2516
|
-
|
|
2517
|
-
The conceptual block names above (\`api-endpoint\`, \`data-model\`, \`json-explorer\`,
|
|
2518
|
-
\`tabs\`, …) are NOT the JSX tags you author with, and the exact tags, required
|
|
2519
|
-
fields, and prop shapes change as the block library evolves. Do not author from
|
|
2520
|
-
memorized tags — they drift and silently produce a wrong tag (\`ApiEndpoint\`
|
|
2521
|
-
instead of \`Endpoint\`, \`JsonExplorer\` instead of \`Json\`, \`Tabs\` instead of
|
|
2522
|
-
\`TabsBlock\`) that errors on import.
|
|
2523
|
-
|
|
2524
|
-
**Before writing any structured plan content, fetch/read the block catalog.** In
|
|
2525
|
-
hosted or self-hosted mode, call \`get-plan-blocks\` on the Plan MCP connector
|
|
2526
|
-
(\`plan\` or legacy \`agent-native-plans\`). If no Plan tools are visible yet in a
|
|
2527
|
-
lazy-loading client, search/load them through the host's tool discovery surface
|
|
2528
|
-
first (\`tool_search\` when available). In local-files mode, or when the skill was
|
|
2529
|
-
installed as plain text and no MCP tools are registered after discovery, run
|
|
2530
|
-
\`npx @agent-native/core@latest plan blocks --out plan-blocks.md\` and read that
|
|
2531
|
-
file first. The CLI command calls the public no-auth \`get-plan-blocks\` route and
|
|
2532
|
-
sends no plan/recap content. If network access is unavailable, use the bundled
|
|
2533
|
-
references and validate with \`plan local check\`; run \`plan local serve\` only
|
|
2534
|
-
when the hosted Plan UI is reachable or a local Plan app is already running.
|
|
2535
|
-
|
|
2536
|
-
The catalog returns the authoritative, always-current block vocabulary generated
|
|
2537
|
-
live from the app's own block registry — the same config the renderer and MDX
|
|
2538
|
-
round-trip use — so it can never be stale even if this SKILL.md is an old
|
|
2539
|
-
installed copy:
|
|
2540
|
-
|
|
2541
|
-
- \`get-plan-blocks\` (default \`format: "reference"\`) → a compact table of every
|
|
2542
|
-
block's runtime \`type\`, exact MDX \`<Tag>\`, placement, and key data fields.
|
|
2543
|
-
This is your map from each conceptual name above to its real tag and props.
|
|
2544
|
-
- \`get-plan-blocks\` with \`format: "schema"\` → the full per-block JSON Schema
|
|
2545
|
-
plus a worked example for each block, when you need exact field types,
|
|
2546
|
-
enums, or nesting (e.g. \`Diff.annotations\`, \`Endpoint.params[].in\`,
|
|
2547
|
-
\`DataModel.entities[].fields[]\`).
|
|
2548
|
-
|
|
2549
|
-
Author the recap source against the tags and schemas that call returns. The
|
|
2550
|
-
complete set of valid block-level tags is whatever \`get-plan-blocks\` lists;
|
|
2551
|
-
any other capitalized tag at the block level is rejected on import with an
|
|
2552
|
-
"Unknown plan block" / "did you mean" error. Lowercase HTML tags inside
|
|
2553
|
-
\`rich-text\`/markdown prose (\`<div>\`, \`<span>\`, \`<code>\`, \`<br>\`, …) are always
|
|
2554
|
-
fine — only capitalized component-style block tags are validated.
|
|
2555
|
-
|
|
2556
|
-
A few recap-specific authoring rules the registry table cannot encode:
|
|
2557
|
-
|
|
2558
|
-
- Every structured block takes a REQUIRED \`id\` (unique across the whole plan)
|
|
2559
|
-
plus the shared optional \`summary\` / \`editable\` envelope. Ordinary top-level
|
|
2560
|
-
Markdown prose imports as rich-text automatically; use \`<RichText id="...">\`
|
|
2561
|
-
only when prose needs explicit metadata or a preserved referenced block id.
|
|
2562
|
-
- Every capitalized block component must be self-closing (\`<Diagram ... />\`) or
|
|
2563
|
-
explicitly closed around children (\`<RichText ...>...</RichText>\`). Never
|
|
2564
|
-
leave a bare opening tag like \`<RichText ...>\` in a paragraph; MDX treats it
|
|
2565
|
-
as unclosed JSX and import fails before the recap can render.
|
|
2566
|
-
- Code-bearing blocks (\`Code\`, \`AnnotatedCode\`, and \`Diff\`) are
|
|
2567
|
-
whitespace-sensitive. Prefer the exact MDX form from the \`get-plan-blocks\`
|
|
2568
|
-
examples / source exporter, where multiline code is encoded as JSON string
|
|
2569
|
-
attributes such as \`code={"const x =\\n y"}\`. Static template literals are
|
|
2570
|
-
accepted only when they are static strings with no \`\${...}\` interpolation.
|
|
2571
|
-
- \`Endpoint\`: prose \`description\` is the MDX **children** (body between the
|
|
2572
|
-
tags), not an attribute; for a WebSocket upgrade use \`method="GET"\`. Each
|
|
2573
|
-
request/response \`example\` is a JSON **string** (the renderer parses it into
|
|
2574
|
-
the JSON explorer), so keep it a single parseable JSON value.
|
|
2575
|
-
- \`TabsBlock\`: the whole \`tabs\` array (including nested child blocks) is ONE
|
|
2576
|
-
JSON \`tabs={[…]}\` prop — there is NO nested \`<Tab>\` element.
|
|
2577
|
-
- \`WireframeBlock\`: its body is a single \`<Screen surface ... html=… />\` subtree
|
|
2578
|
-
(nested MDX, not a flat prop); \`html\` must be a single-quoted string or static
|
|
2579
|
-
template literal, never a dynamic \`html={someVar}\` expression. See
|
|
2580
|
-
\`references/wireframe.md\` for the HTML rules.
|
|
2581
|
-
- \`Diagram\`: the whole payload is one \`data={{ html?, css?, nodes?, edges?, … }}\`
|
|
2582
|
-
attribute and requires either \`html\` or at least one node; \`Mermaid\` is its
|
|
2583
|
-
own separate block (\`source\` text), not a \`Diagram\` prop.
|
|
2584
|
-
|
|
2585
|
-
## Before / After Is The Headline
|
|
2586
|
-
|
|
2587
|
-
The recap's center of gravity is the before/after comparison. For document-body
|
|
2588
|
-
comparisons there are two primitives, and they cover the whole need together:
|
|
2589
|
-
|
|
2590
|
-
- **\`columns\`** — the side-by-side container, for **structured** comparisons.
|
|
2591
|
-
Use two columns labeled \`Before\` and \`After\`, each holding a block (commonly a
|
|
2592
|
-
\`data-model\`, \`api-endpoint\`, or \`rich-text\`), so the reviewer reads the old
|
|
2593
|
-
shape against the new shape in one glance. This is the right primitive for
|
|
2594
|
-
"the schema went from X to Y" or "the endpoint contract changed like this."
|
|
2595
|
-
Do not use \`columns\` simply to compact or group a list of API endpoints.
|
|
2596
|
-
- **\`diff\`** — for **code**. It renders the literal removed and added lines. Use
|
|
2597
|
-
it for the actual hunks. Use split mode by default for recap code review;
|
|
2598
|
-
reserve \`mode: "unified"\` for genuinely narrow standalone hunks where
|
|
2599
|
-
side-by-side would hide the code. Key-file diff groups should use horizontal
|
|
2600
|
-
tabs so split diffs get the full document width.
|
|
2601
|
-
|
|
2602
|
-
For UI diffs, wireframes are the visual comparison primitive. Use before/after
|
|
2603
|
-
wireframes when the comparison clarifies the change; use after-only or a state
|
|
2604
|
-
sequence when that better matches the change. The visual headline must show
|
|
2605
|
-
exact placement, realistic chrome, and adequate padding before any abstract
|
|
2606
|
-
explanation. Do not stop at the first visible affordance when the diff adds a
|
|
2607
|
-
flow; show the entry point, the opened surface, and the resulting state or page
|
|
2608
|
-
so the reviewer can trace the actual user path. \`references/wireframe.md\` owns
|
|
2609
|
-
the before/after layout choice —
|
|
2610
|
-
the \`columns\` renderer keeps narrow surfaces side by side and auto-stacks wide
|
|
2611
|
-
\`desktop\`/\`browser\` frames vertically; never hand-build a side-by-side
|
|
2612
|
-
wireframe layout in \`custom-html\`. For document-body
|
|
2613
|
-
comparisons, there is no other multi-column primitive — \`columns\` plus the
|
|
2614
|
-
\`diff\` block are the whole comparison vocabulary. Do not hand-build side-by-side
|
|
2615
|
-
layouts in \`custom-html\`, and do not stack two \`data-model\` blocks vertically
|
|
2616
|
-
and call it a comparison when \`columns\` exists to put them side by side.
|
|
2617
|
-
|
|
2618
|
-
## Grounding Rule
|
|
2619
|
-
|
|
2620
|
-
Structured blocks are **true by construction** only if they are derived from the
|
|
2621
|
-
actual changed lines. The \`diff\`, \`data-model\`, \`api-endpoint\`, and \`file-tree\`
|
|
2622
|
-
blocks MUST be built mechanically from the real diff — real paths, real fields,
|
|
2623
|
-
real method/path, real before/after text — never inferred, rounded, or invented.
|
|
2624
|
-
The model writes only the prose: the "why", the narrative, the risk read. A
|
|
2625
|
-
confidently wrong recap is dangerous in a review context, because a reviewer who
|
|
2626
|
-
trusts the summary may skip the very line the summary got wrong. When the diff
|
|
2627
|
-
does not contain a fact, leave it out rather than guess; mark anything the model
|
|
2628
|
-
inferred (not extracted) as inferred in prose.
|
|
2629
|
-
|
|
2630
|
-
## Security
|
|
2631
|
-
|
|
2632
|
-
- **Gate visibility.** Recaps of a private repo are org/login-gated — set the
|
|
2633
|
-
plan's visibility to the owning org or login, never auto-public. A recap can
|
|
2634
|
-
expose unreleased schema, internal endpoints, and architecture; treat it like
|
|
2635
|
-
the source it summarizes. Any PR comment or handoff that links to the recap
|
|
2636
|
-
must say that private-repo recaps require signing in with access to the owning
|
|
2637
|
-
org if the link does not load.
|
|
2638
|
-
- **Never transcribe secrets.** A diff can contain API keys, tokens, webhook
|
|
2639
|
-
URLs, signing secrets, \`.env\` values, or credential-looking literals. Do not
|
|
2640
|
-
copy any of these into a \`diff\`, \`file-tree\` snippet, \`api-endpoint\`, or prose
|
|
2641
|
-
block — redact them (\`sk-•••\`, \`<redacted>\`). This mirrors the repo's
|
|
2642
|
-
hardcoded-secret rule: obviously fake placeholders only, never the real value,
|
|
2643
|
-
in any block, caption, or note.
|
|
2644
|
-
|
|
2645
|
-
## Bidirectional Loop
|
|
2646
|
-
|
|
2647
|
-
In hosted mode, because a recap is a real, editable plan, the same review loop
|
|
2648
|
-
as forward plans applies: a reviewer can annotate any block, and the coding
|
|
2649
|
-
agent reads \`get-plan-feedback\` to drive fixes back into the code — annotation →
|
|
2650
|
-
agent → diff, the same close-the-loop flow forward plans use. After a reviewer
|
|
2651
|
-
annotates a block, call \`get-plan-feedback\` to read the structured feedback,
|
|
2652
|
-
then either update the recap with \`create-visual-recap\` (passing the existing
|
|
2653
|
-
\`planId\` to replace it in place) or apply targeted changes with
|
|
2654
|
-
\`update-visual-plan\`. The loop is live and wired. In local-files privacy mode,
|
|
2655
|
-
do not call those hosted tools; read review notes from chat or local files, edit
|
|
2656
|
-
\`<plan-dir>/*.mdx\` directly, and rerun \`plan local check\`, \`serve\`, or \`verify\`
|
|
2657
|
-
for \`<plan-dir>\`. The one thing not yet automatic is PR-comment-triggered
|
|
2658
|
-
re-runs: the GitHub Action creates an initial recap per PR, but it does not yet
|
|
2659
|
-
re-run automatically when new review feedback is posted in GitHub — that
|
|
2660
|
-
auto-re-run is the remaining fast-follow.
|
|
2661
|
-
|
|
2662
|
-
## Related Skills
|
|
2663
|
-
|
|
2664
|
-
- **visual-plan** — the canonical command and the source of the shared Wireframe
|
|
2665
|
-
& Canvas and Document Quality cores; a recap follows the same block discipline
|
|
2666
|
-
in reverse.
|
|
2667
|
-
- **comment anchors** — recap comments use the same anchor rules as forward
|
|
2668
|
-
plans; see "Interpreting comment anchors" in the visual-plan skill for
|
|
2669
|
-
coordinate frames, wireframe node ids, text-quote resolution, detached
|
|
2670
|
-
threads, routing via \`resolutionTarget\`, and two-axis consumed/resolved state.
|
|
2671
|
-
- **security** — data scoping, secret handling, and the hardcoded-secret rule the
|
|
2672
|
-
recap's redaction and visibility gating mirror.
|
|
2673
|
-
- **sharing** — org/login-gated visibility for the plan that holds the recap.
|
|
2674
|
-
`;
|
|
2675
|
-
|
|
2676
|
-
export const VISUALIZE_REPO_SKILL_MD = `---
|
|
2677
|
-
name: visualize-repo
|
|
2678
|
-
description: >-
|
|
2679
|
-
Open or create a repo-native visual documentation workspace backed by local
|
|
2680
|
-
Plan MDX files. Use when the user asks to visualize a repository, create
|
|
2681
|
-
durable visual docs for APIs/components/models/flows, launch a visual repo
|
|
2682
|
-
viewer, review repo docs like a visual IDE, or collect Plan comments that
|
|
2683
|
-
should become coding-agent changes.
|
|
2684
|
-
metadata:
|
|
2685
|
-
visibility: exported
|
|
2686
|
-
---
|
|
2687
|
-
|
|
2688
|
-
# Visualize Repo
|
|
2689
|
-
|
|
2690
|
-
\`/visualize-repo\` opens a local, source-controlled visual documentation layer
|
|
2691
|
-
for a repository. It is for durable repo understanding, not a one-off plan:
|
|
2692
|
-
components can have wireframes, APIs can have specs, models can have schema
|
|
2693
|
-
views, and reviewers can comment on those docs before sending work to a coding
|
|
2694
|
-
agent.
|
|
2695
|
-
|
|
2696
|
-
## Default Command
|
|
2697
|
-
|
|
2698
|
-
Run the Agent-Native CLI from the repo root:
|
|
2699
|
-
|
|
2700
|
-
\`\`\`bash
|
|
2701
|
-
npx @agent-native/core@latest visualize-repo --open
|
|
2702
|
-
\`\`\`
|
|
2703
|
-
|
|
2704
|
-
Useful variants:
|
|
2705
|
-
|
|
2706
|
-
\`\`\`bash
|
|
2707
|
-
npx @agent-native/core@latest visualize-repo init
|
|
2708
|
-
npx @agent-native/core@latest visualize-repo --target actions --target server/db/schema.ts
|
|
2709
|
-
npx @agent-native/core@latest visualize-repo check
|
|
2710
|
-
npx @agent-native/core@latest visualize-repo verify
|
|
2711
|
-
npx @agent-native/core@latest visualize-repo --no-open
|
|
2712
|
-
\`\`\`
|
|
2713
|
-
|
|
2714
|
-
The command writes or updates \`agent-native.json\` with an
|
|
2715
|
-
\`apps.visualize-repo\` local-files section, creates a starter MDX folder at
|
|
2716
|
-
\`.agent-native/visual-docs/repo-overview\`, then serves it through the Plan
|
|
2717
|
-
local bridge. The hosted Plan UI can render the review surface, but the plan
|
|
2718
|
-
source stays in local files and bridge comments stay in \`comments.json\`.
|
|
2719
|
-
|
|
2720
|
-
## When There Is No Manifest
|
|
2721
|
-
|
|
2722
|
-
If \`agent-native.json\` does not exist, let the CLI bootstrap one. It scans for
|
|
2723
|
-
high-value starting points such as \`actions/\`, \`app/components/\`,
|
|
2724
|
-
\`app/pages/\`, \`server/db/schema.ts\`, \`src/\`, \`packages/\`, \`templates/\`,
|
|
2725
|
-
\`docs/\`, and \`content/\`. Keep the first run targeted. Prefer 5-20 visualized
|
|
2726
|
-
nodes over a generated wall of repo prose.
|
|
2727
|
-
|
|
2728
|
-
Use explicit targets when the user already knows the important surface:
|
|
2729
|
-
|
|
2730
|
-
\`\`\`bash
|
|
2731
|
-
npx @agent-native/core@latest visualize-repo \\
|
|
2732
|
-
--target actions/webhooks.ts \\
|
|
2733
|
-
--target server/db/schema.ts \\
|
|
2734
|
-
--target app/components/PromptComposer.tsx
|
|
2735
|
-
\`\`\`
|
|
2736
|
-
|
|
2737
|
-
## Agent Workflow
|
|
2738
|
-
|
|
2739
|
-
1. Inspect \`agent-native.json\` and the generated \`plan.mdx\`.
|
|
2740
|
-
2. Read the source anchors listed for each target before changing the visual
|
|
2741
|
-
docs.
|
|
2742
|
-
3. Add only the visual blocks that earn their keep: \`api-endpoint\` for stable
|
|
2743
|
-
APIs, \`data-model\` for durable schema, \`wireframe\` for user-facing
|
|
2744
|
-
components/flows, \`diagram\` for architecture, and \`annotated-code\` for
|
|
2745
|
-
load-bearing implementation.
|
|
2746
|
-
4. Run \`npx @agent-native/core@latest visualize-repo check\` after editing MDX.
|
|
2747
|
-
5. Use \`verify\` before handoff when renderer correctness matters.
|
|
2748
|
-
|
|
2749
|
-
When acting on comments, treat local \`comments.json\` as the feedback inbox.
|
|
2750
|
-
Agent-targeted comments should become code changes plus matching MDX updates so
|
|
2751
|
-
the visual docs and executable code stay in sync.
|
|
2752
|
-
|
|
2753
|
-
## Privacy Boundary
|
|
2754
|
-
|
|
2755
|
-
\`visualize-repo check\` is local/offline lint. \`visualize-repo --open\` starts a
|
|
2756
|
-
localhost bridge and opens the Plan UI against local files; it does not publish
|
|
2757
|
-
the plan to hosted storage and performs no hosted Plan database writes.
|
|
2758
|
-
\`visualize-repo verify\` may send the MDX folder to the Plan app's public
|
|
2759
|
-
validation action so the real renderer schema can check it. For no hosted
|
|
2760
|
-
content egress, pass \`--app-url\` pointing at a local Plan app or skip
|
|
2761
|
-
\`verify\` and rely on \`check\`.
|
|
2762
|
-
|
|
2763
|
-
Do not call hosted Plan write tools for this workflow unless the user explicitly
|
|
2764
|
-
asks to publish or share the docs. Avoid \`create-visual-plan\`,
|
|
2765
|
-
\`update-visual-plan\`, \`import-visual-plan-source\`, \`patch-visual-plan-source\`,
|
|
2766
|
-
and \`get-plan-feedback\` for local repo docs; edit the MDX files directly and
|
|
2767
|
-
use the local bridge.
|
|
2768
|
-
`;
|
|
52
|
+
export {
|
|
53
|
+
CANVAS_REFERENCE_MD,
|
|
54
|
+
CONNECTION_REFERENCE_MD,
|
|
55
|
+
DOCUMENT_QUALITY_REFERENCE_MD,
|
|
56
|
+
EXEMPLAR_REFERENCE_MD,
|
|
57
|
+
LOCAL_FILES_REFERENCE_MD,
|
|
58
|
+
VISUAL_PLANS_SKILL_MD,
|
|
59
|
+
VISUAL_RECAP_SKILL_MD,
|
|
60
|
+
VISUALIZE_REPO_SKILL_MD,
|
|
61
|
+
WIREFRAME_REFERENCE_MD,
|
|
62
|
+
};
|
|
2769
63
|
|
|
2770
64
|
export const BUILT_IN_APP_SKILLS = {
|
|
2771
65
|
assets: {
|