@agent-native/core 0.100.1 → 0.101.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +73 -0
- package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/ar-SA/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/de-DE/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/es-ES/template-plan.mdx +14 -0
- package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/fr-FR/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/hi-IN/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/ja-JP/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/ko-KR/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/pt-BR/template-plan.mdx +14 -0
- package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/zh-CN/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/zh-TW/template-plan.mdx +7 -0
- package/corpus/core/docs/content/pr-visual-recap.mdx +50 -32
- package/corpus/core/docs/content/template-plan.mdx +14 -0
- package/corpus/core/docs/content/toolkit-comments-review.mdx +16 -2
- package/corpus/core/package.json +4 -1
- package/corpus/core/src/a2a/index.ts +2 -1
- package/corpus/core/src/a2a/server.ts +34 -9
- package/corpus/core/src/agent/production-agent.ts +56 -10
- package/corpus/core/src/cli/create.ts +47 -19
- package/corpus/core/src/cli/pr-visual-recap-workflow.ts +2 -3
- package/corpus/core/src/cli/recap.ts +3 -4932
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +6 -4
- package/corpus/core/src/cli/skills-content/visual-recap-skill.ts +7 -1
- package/corpus/core/src/client/AgentPanel.tsx +19 -17
- package/corpus/core/src/client/AssistantChat.tsx +4 -0
- package/corpus/core/src/client/analytics.ts +8 -1
- package/corpus/core/src/client/chat/markdown-renderer.tsx +54 -8
- package/corpus/core/src/client/chat/message-components.tsx +8 -2
- package/corpus/core/src/client/clipboard.ts +28 -1
- package/corpus/core/src/client/composer/PromptComposer.tsx +4 -0
- package/corpus/core/src/client/composer/TiptapComposer.tsx +30 -3
- package/corpus/core/src/client/guided-questions.tsx +4 -0
- package/corpus/core/src/client/i18n.tsx +2 -1
- package/corpus/core/src/client/index.ts +4 -0
- package/corpus/core/src/client/review/ReviewCommentComposer.tsx +108 -0
- package/corpus/core/src/client/review/ReviewThreadPanel.tsx +482 -150
- package/corpus/core/src/client/review/index.ts +8 -0
- package/corpus/core/src/client/review/use-review.ts +35 -1
- package/corpus/core/src/client/use-agent-chat-context.ts +3 -2
- package/corpus/core/src/integrations/webhook-handler.ts +4 -2
- package/corpus/core/src/review/actions/create-review-comment.ts +2 -1
- package/corpus/core/src/review/actions/get-review-feedback.ts +6 -11
- package/corpus/core/src/review/actions/list-review-comments.ts +38 -4
- package/corpus/core/src/review/actions/reply-review-comment.ts +33 -22
- package/corpus/core/src/review/actions/resolve-review-thread.ts +29 -2
- package/corpus/core/src/review/actions/send-review-thread-to-agent.ts +62 -0
- package/corpus/core/src/review/identity.ts +101 -0
- package/corpus/core/src/review/index.ts +14 -0
- package/corpus/core/src/review/store.ts +315 -8
- package/corpus/core/src/review/types.ts +4 -0
- package/corpus/core/src/secrets/crypto.ts +98 -47
- package/corpus/core/src/secrets/index.ts +2 -1
- package/corpus/core/src/secrets/schema.ts +3 -0
- package/corpus/core/src/secrets/storage.ts +164 -31
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/action-routes.ts +125 -4
- package/corpus/core/src/server/agent-chat/plugin-options.ts +16 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +1 -0
- package/corpus/core/src/server/index.ts +8 -0
- package/corpus/core/src/vite/action-types-plugin.ts +4 -0
- package/corpus/templates/analytics/changelog/2026-07-14-daily-dashboard-email-captures-authenticate-with-a-sessi.md +6 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +156 -3
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +402 -142
- package/corpus/templates/assets/app/components/layout/Layout.tsx +4 -0
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -1
- package/corpus/templates/assets/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/assets/app/i18n-data.ts +1 -0
- package/corpus/templates/assets/app/routes/library.tsx +187 -48
- package/corpus/templates/assets/changelog/2026-07-13-assets-keeps-the-right-chat-sidebar-closed-when-the-full-pag.md +6 -0
- package/corpus/templates/assets/changelog/2026-07-13-merged-the-candidates-panel-into-the-library-as-a-drafts-tab.md +6 -0
- package/corpus/templates/chat/app/lib/agent-page.tsx +40 -0
- package/corpus/templates/chat/app/routes/agent.tsx +5 -3
- package/corpus/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +5 -0
- package/corpus/templates/clips/AGENTS.md +4 -0
- package/corpus/templates/clips/actions/get-feature-flags.ts +30 -0
- package/corpus/templates/clips/actions/lib/transcript-preview.ts +48 -0
- package/corpus/templates/clips/actions/request-transcript.ts +41 -1
- package/corpus/templates/clips/actions/view-screen.ts +5 -9
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/components/player/video-player.tsx +39 -1
- package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +6 -12
- package/corpus/templates/clips/app/hooks/use-mse-video-source.ts +146 -0
- package/corpus/templates/clips/app/lib/capture-install-options.ts +21 -0
- package/corpus/templates/clips/app/lib/fmp4.ts +271 -0
- package/corpus/templates/clips/app/lib/mse-video-loader.ts +585 -0
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +0 -4
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +5 -13
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +2 -37
- package/corpus/templates/clips/app/routes/download.tsx +3 -2
- package/corpus/templates/clips/changelog/2026-07-10-shared-clips-now-start-playing-instantly-instead-of-showing-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-14-clips-now-distinguishes-transcript-previews-from-incomplete-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-14-desktop-app-prompts-stay-hidden-after-you-download-the-insta.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +5 -0
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +10 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +4 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +2518 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/live_upload.rs +353 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +558 -67
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +11 -1
- package/corpus/templates/clips/desktop/src-tauri/src/remote_flags.rs +188 -0
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +1 -1
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +1 -0
- package/corpus/templates/clips/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +5 -1
- package/corpus/templates/clips/shared/feature-flags.ts +41 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +3 -0
- package/corpus/templates/design/.agents/skills/design-review-feedback/SKILL.md +42 -0
- package/corpus/templates/design/AGENTS.md +6 -0
- package/corpus/templates/design/README.md +1 -0
- package/corpus/templates/design/actions/navigate.ts +4 -4
- package/corpus/templates/design/actions/view-screen.ts +116 -2
- package/corpus/templates/design/agent-native.app-skill.json +5 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +52 -59
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +13 -9
- package/corpus/templates/design/app/components/design/EditPanel.tsx +79 -11
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +78 -65
- package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +161 -0
- package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +96 -0
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +166 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1077 -0
- package/corpus/templates/design/app/components/visual-editor/index.ts +1 -0
- package/corpus/templates/design/app/components/visual-editor/review-canvas-state.ts +42 -0
- package/corpus/templates/design/app/hooks/use-design-systems.ts +2 -2
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +9 -6
- package/corpus/templates/design/app/hooks/use-question-flow.ts +7 -1
- package/corpus/templates/design/app/i18n/ar-SA.ts +56 -1
- package/corpus/templates/design/app/i18n/de-DE.ts +57 -1
- package/corpus/templates/design/app/i18n/en-US.ts +56 -1
- package/corpus/templates/design/app/i18n/es-ES.ts +56 -1
- package/corpus/templates/design/app/i18n/fr-FR.ts +57 -1
- package/corpus/templates/design/app/i18n/hi-IN.ts +56 -1
- package/corpus/templates/design/app/i18n/ja-JP.ts +56 -1
- package/corpus/templates/design/app/i18n/ko-KR.ts +56 -1
- package/corpus/templates/design/app/i18n/pt-BR.ts +57 -1
- package/corpus/templates/design/app/i18n/zh-CN.ts +56 -1
- package/corpus/templates/design/app/i18n/zh-TW.ts +51 -0
- package/corpus/templates/design/app/pages/Present.tsx +172 -14
- package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +23 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +10 -0
- package/corpus/templates/design/app/pages/present-review-state.ts +18 -0
- package/corpus/templates/design/app/public-routes.ts +8 -0
- package/corpus/templates/design/app/root.tsx +7 -6
- package/corpus/templates/design/changelog/2026-07-13-dragged-design-assets-now-appear-at-the-visible-drop-locatio.md +6 -0
- package/corpus/templates/design/changelog/2026-07-13-reviewers-can-pin-comments-on-shared-designs-and-apply-verif.md +6 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +10 -0
- package/corpus/templates/design/server/plugins/auth.ts +7 -5
- package/corpus/templates/design/server/plugins/review.ts +9 -0
- package/corpus/templates/design/shared/review-anchor.ts +83 -0
- package/corpus/templates/design/shared/review-summary.ts +25 -0
- package/corpus/templates/forms/.agents/skills/form-publishing/SKILL.md +2 -0
- package/corpus/templates/forms/AGENTS.md +4 -0
- package/corpus/templates/forms/actions/create-form.ts +2 -1
- package/corpus/templates/forms/actions/update-form.ts +5 -2
- package/corpus/templates/forms/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +3 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +19 -0
- package/corpus/templates/forms/changelog/2026-07-14-fixed-the-ask-forms-loading-input-appearing-above-the-welcom.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-14-form-social-previews-now-show-the-form-title-description-and.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-14-forms-can-email-the-form-owner-when-new-responses-arrive.md +6 -0
- package/corpus/templates/forms/server/handlers/submissions.ts +17 -0
- package/corpus/templates/forms/server/lib/form-og-image.ts +64 -6
- package/corpus/templates/forms/server/lib/public-form-ssr.ts +6 -2
- package/corpus/templates/forms/server/lib/response-email.ts +65 -0
- package/corpus/templates/forms/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/forms/server/routes/api/forms/og/[...slug]/og.png.get.ts +184 -0
- package/corpus/templates/forms/shared/types.ts +2 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +6 -4
- package/corpus/templates/plan/.agents/skills/visual-recap/SKILL.md +7 -1
- package/dist/a2a/index.d.ts +2 -1
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/server.d.ts +25 -0
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +30 -6
- package/dist/a2a/server.js.map +1 -1
- package/dist/agent/production-agent.d.ts +2 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +37 -12
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/create.d.ts +5 -3
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +44 -19
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +2 -2
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +2 -2
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +3 -562
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +3 -3875
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.js +6 -4
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
- package/dist/cli/skills-content/visual-recap-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-recap-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-recap-skill.js +7 -1
- package/dist/cli/skills-content/visual-recap-skill.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +3 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +2 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +2 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/analytics.d.ts +5 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +3 -1
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/chat/markdown-renderer.d.ts +1 -0
- package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
- package/dist/client/chat/markdown-renderer.js +36 -1
- package/dist/client/chat/markdown-renderer.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +5 -2
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/clipboard.d.ts +3 -1
- package/dist/client/clipboard.d.ts.map +1 -1
- package/dist/client/clipboard.js +24 -1
- package/dist/client/clipboard.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +2 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +2 -2
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +3 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +20 -5
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/guided-questions.d.ts +3 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +2 -1
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/i18n.d.ts.map +1 -1
- package/dist/client/i18n.js +3 -1
- package/dist/client/i18n.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/review/ReviewCommentComposer.d.ts +18 -0
- package/dist/client/review/ReviewCommentComposer.d.ts.map +1 -0
- package/dist/client/review/ReviewCommentComposer.js +30 -0
- package/dist/client/review/ReviewCommentComposer.js.map +1 -0
- package/dist/client/review/ReviewThreadPanel.d.ts +28 -1
- package/dist/client/review/ReviewThreadPanel.d.ts.map +1 -1
- package/dist/client/review/ReviewThreadPanel.js +151 -39
- package/dist/client/review/ReviewThreadPanel.js.map +1 -1
- package/dist/client/review/index.d.ts +3 -2
- package/dist/client/review/index.d.ts.map +1 -1
- package/dist/client/review/index.js +2 -1
- package/dist/client/review/index.js.map +1 -1
- package/dist/client/review/use-review.d.ts +23 -0
- package/dist/client/review/use-review.d.ts.map +1 -1
- package/dist/client/review/use-review.js +3 -0
- package/dist/client/review/use-review.js.map +1 -1
- package/dist/client/use-agent-chat-context.d.ts +1 -1
- package/dist/client/use-agent-chat-context.d.ts.map +1 -1
- package/dist/client/use-agent-chat-context.js +4 -2
- package/dist/client/use-agent-chat-context.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +3 -2
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/review/actions/create-review-comment.js +2 -1
- package/dist/review/actions/create-review-comment.js.map +1 -1
- package/dist/review/actions/get-review-feedback.js +6 -11
- package/dist/review/actions/get-review-feedback.js.map +1 -1
- package/dist/review/actions/list-review-comments.d.ts +1 -0
- package/dist/review/actions/list-review-comments.js +25 -4
- package/dist/review/actions/list-review-comments.js.map +1 -1
- package/dist/review/actions/reply-review-comment.js +12 -5
- package/dist/review/actions/reply-review-comment.js.map +1 -1
- package/dist/review/actions/resolve-review-thread.d.ts +3 -0
- package/dist/review/actions/resolve-review-thread.js +20 -3
- package/dist/review/actions/resolve-review-thread.js.map +1 -1
- package/dist/review/actions/send-review-thread-to-agent.d.ts +17 -0
- package/dist/review/actions/send-review-thread-to-agent.d.ts.map +1 -0
- package/dist/review/actions/send-review-thread-to-agent.js +49 -0
- package/dist/review/actions/send-review-thread-to-agent.js.map +1 -0
- package/dist/review/identity.d.ts +6 -0
- package/dist/review/identity.d.ts.map +1 -0
- package/dist/review/identity.js +68 -0
- package/dist/review/identity.js.map +1 -0
- package/dist/review/index.d.ts +3 -1
- package/dist/review/index.d.ts.map +1 -1
- package/dist/review/index.js +2 -1
- package/dist/review/index.js.map +1 -1
- package/dist/review/store.d.ts +36 -0
- package/dist/review/store.d.ts.map +1 -1
- package/dist/review/store.js +223 -8
- package/dist/review/store.js.map +1 -1
- package/dist/review/types.d.ts +4 -0
- package/dist/review/types.d.ts.map +1 -1
- package/dist/review/types.js.map +1 -1
- package/dist/secrets/crypto.d.ts +35 -13
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +78 -41
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/index.d.ts.map +1 -1
- package/dist/secrets/index.js +2 -1
- package/dist/secrets/index.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/secrets/schema.d.ts +20 -1
- package/dist/secrets/schema.d.ts.map +1 -1
- package/dist/secrets/schema.js +3 -0
- package/dist/secrets/schema.js.map +1 -1
- package/dist/secrets/storage.d.ts +7 -7
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +121 -30
- 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/action-routes.d.ts +45 -0
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +71 -5
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +16 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +1 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/index.d.ts +3 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/locales/ar-SA/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/ar-SA/template-plan.mdx +7 -0
- package/docs/content/locales/de-DE/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/de-DE/template-plan.mdx +7 -0
- package/docs/content/locales/es-ES/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/es-ES/template-plan.mdx +14 -0
- package/docs/content/locales/fr-FR/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/fr-FR/template-plan.mdx +7 -0
- package/docs/content/locales/hi-IN/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/hi-IN/template-plan.mdx +7 -0
- package/docs/content/locales/ja-JP/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/ja-JP/template-plan.mdx +7 -0
- package/docs/content/locales/ko-KR/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/ko-KR/template-plan.mdx +7 -0
- package/docs/content/locales/pt-BR/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/pt-BR/template-plan.mdx +14 -0
- package/docs/content/locales/zh-CN/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/zh-CN/template-plan.mdx +7 -0
- package/docs/content/locales/zh-TW/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/zh-TW/template-plan.mdx +7 -0
- package/docs/content/pr-visual-recap.mdx +50 -32
- package/docs/content/template-plan.mdx +14 -0
- package/docs/content/toolkit-comments-review.mdx +16 -2
- package/package.json +4 -1
- package/corpus/templates/forms/server/routes/api/forms/og/[slug]/og.png.get.ts +0 -45
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VISUAL_PLANS_SKILL_MD = "---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n`/visual-plan` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n`/visual-plan` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work \u2014 typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence \u2014 and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing `actions/` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses \u2014 existing actions, schema,\n components, helpers \u2014 before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them \u2014 wire format, public ids,\n data-model shape, auth and ownership boundaries \u2014 and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it \u2014 explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call `create-visual-questions` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom `question-form` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step \u2014 do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with `update-visual-plan` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan \u2014 Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (`plan` server, or legacy `agent-native-plans`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (`plan.mdx`, optional `canvas.mdx` /\n`prototype.mdx`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip `/visual-plan` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content \u2014 no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the `plan` (or legacy `agent-native-plans`) tools are not visible,\ndiscover them through the host's `tool_search` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD `references/connection.md` in this skill directory \u2014 it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n`AGENT_NATIVE_PLANS_MODE=local-files` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call `get-plan-blocks` for the authoritative block catalog \u2014 do not author\n from memorized tags. Then call the mode-matched create tool:\n `create-visual-plan` for document-first plans (architecture, backend, data,\n refactor, API), `create-ui-plan` for UI-first plans, `create-prototype-plan`\n for prototype-first plans, `create-plan-design` for design-first plans,\n `create-visual-questions` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as `planText` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see `references/canvas.md` and `references/document-quality.md`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put `diagram`, `data-model`,\n `api-endpoint`, `diff`, `file-tree`, `code`, and `annotated-code` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (`diff`, `annotated-code`) and `tabs` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep `api-endpoint`, `openapi-spec`, `data-model`, `json-explorer`,\n `wireframe`, question, and `custom-html` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review \u2014 a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call `get-plan-feedback` before editing, after review,\n after any long pause,\n and before the final response. Treat `anchorDetails`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with `update-visual-plan`, preferring\n targeted `contentPatches`.\n Treat the top-level `content` payload as a full replacement, not a merge; do\n not send a partial `content` object to add a canvas or one block. If a full\n replacement is unavoidable, first read the complete plan source/content, carry\n forward every existing block and visual surface, and verify the source/export\n afterward so the document body was not truncated. When the user wants\n source-control friendly edits, use `patch-visual-plan-source` against the MDX\n files instead of regenerating the plan.\n7. For hosted plans, export with `export-visual-plan` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nFor high-stakes plans \u2014 architecture, backend, data-model, migration, multi-file,\nor otherwise risky work \u2014 run one adversarial self-review pass before treating the\nplan as final. Skip it for small, UI-only, or single-decision plans where the cost\noutweighs the value. Keep the pass cheap and non-blocking:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel \u2014 never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong \u2014 not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with `update-visual-plan`\n `contentPatches` \u2014 vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom `question-form` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with `targetId` plus `placement`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body `diagram`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in `content.canvas` and omit `content.prototype`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n `content.canvas`, add the aligned functional prototype in\n `content.prototype`, and rely on the top visual tabs to switch between them.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use `create-prototype-plan`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe quality \u2014 read `references/wireframe.md`\n\nUI recap/plan wireframes must meet a strict quality bar \u2014 full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font\ntags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ\n`references/wireframe.md` in this skill directory \u2014 it is the single source of\ntruth for HTML wireframe quality, shared word for word with `/visual-plan`\nand `/visual-recap`. Do not author wireframes from memory.\n\n## Canvas \u2014 read `references/canvas.md`\n\nThe canvas is the single source of truth for static UI mockups: the `surface`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n`targetId`/`placement`, and edits are surgical `contentPatches`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n`references/canvas.md` in this skill directory \u2014 it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n`WireframeBlock` screens: author `<Screen surface=\"...\" html={...} />` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n`<FrameScreen>`, `<Card>`, `<Row>`, or `<Btn>` inside canvas `<Screen>` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality \u2014 read `references/document-quality.md`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom `question-form` and a pre-handoff visual check.\nBefore authoring the plan document, READ `references/document-quality.md` in this\nskill directory \u2014 it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar \u2014 read `references/exemplar.md`\n\nFor a worked example of the bar \u2014 a great UI-first plan and `/visual-plan`, plus\nthe anti-patterns to avoid \u2014 READ `references/exemplar.md` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- `create-visual-plan`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing `planText`; `content` may include no\n visual surface, canvas only, or canvas + prototype.\n- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.\n- `create-prototype-plan`: start a prototype-first plan with a functional top\n review surface.\n- `create-plan-design`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only when the user explicitly asks for a visual\n intake questionnaire, not as `/visual-plan` preflight.\n- `update-visual-plan`: revise content, status, or comments with targeted\n `contentPatches` (see Core Workflow step 6).\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: read the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `get-plan-blocks`: resolve block tags before authoring \u2014 do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode \u2014 read `references/local-files.md`\n\nWhen the user wants no hosted Plan database writes \u2014 no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or `AGENT_NATIVE_PLANS_MODE=local-files` \u2014 do not call any hosted Plan\ntool except the schema-only `get-plan-blocks` catalog lookup. Author a local MDX\nfolder and\npreview it with `plan local check` / `plan local serve` / `plan local verify`.\nBefore using local-files mode, READ `references/local-files.md` in this skill\ndirectory \u2014 it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with `get-plan-feedback` /\n`update-visual-plan`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n`get-plan-feedback` returns rich anchors \u2014 read them before acting on any comment.\n\n- **Coordinate frames.** `targetX`/`targetY` are percentages *within* the\n element named by `targetSelector`/`targetKind`. Bare `x`/`y` are percentages\n of the whole plan document. `canvasX`/`canvasY` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include `targetNodeId` and\n `targetNodePath` (e.g. `card > list > listItem \"Acme Inc\"`) identifying the\n exact kit node. Use `targetNodeId` directly with wireframe node patch ops;\n use `data-design-id` values from design artboards with\n `update-design-element-style`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve `textQuote` against current prose using\n `contextBefore`/`contextAfter` for disambiguation. If `ambiguous: true`, ask\n the user \u2014 do not guess which occurrence is meant.\n- **Detached comments.** `get-plan-feedback` flags threads whose quoted text no\n longer exists as `detached` (in `detachedThreads`). Reconcile these against\n rewritten content \u2014 never silently drop them.\n- **Routing.** `resolutionTarget` is the only routing signal: act on `agent`,\n treat `human` as context only. `@mentions` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (`consumedCommentIds` on `update-visual-plan`). Set `status=resolved` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open.\n\n## Visibility & Sharing\n\nUse `set-resource-visibility` to change who can see a plan (e.g. public, login,\nor org-scoped). Use `share-resource` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work \u2014 default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup \u2014 this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n```bash\nnpx @agent-native/core@latest skills add visual-plans\n```\n\nAfter that, `/visual-plan`, `/visual-recap`, and `/visualize-repo` are the\ninstalled slash commands. If you only need one command, use\n`skills add visual-plan`, `skills add visual-recap`, or\n`skills add visualize-repo` instead. The other planning modes\n(`create-ui-plan`, `create-prototype-plan`, `create-plan-design`,\n`create-visual-questions`) are MCP tools reachable from `/visual-plan`, not\nseparate slash commands. Pass `--no-connect` to register the connector without\nauthenticating, then run\n`npx @agent-native/core@latest connect https://plan.agent-native.com --client all`\nwhenever you are ready, or choose a narrower `--client`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n`npx @agent-native/core@latest visualize-repo --open` to create/update\n`agent-native.json`, seed `.agent-native/visual-docs/repo-overview`, and open\nthe local bridge.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`, do\nnot keep retrying it \u2014 stop and give the user the per-client reconnect step from\n`references/connection.md`, then continue once the connector is available.\n\nHosted default: connect `https://plan.agent-native.com/mcp`. Do\nnot put shared secrets in skill files.\n";
|
|
1
|
+
export declare const VISUAL_PLANS_SKILL_MD = "---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n`/visual-plan` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n`/visual-plan` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work \u2014 typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence \u2014 and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing `actions/` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses \u2014 existing actions, schema,\n components, helpers \u2014 before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them \u2014 wire format, public ids,\n data-model shape, auth and ownership boundaries \u2014 and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it \u2014 explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call `create-visual-questions` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom `question-form` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step \u2014 do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with `update-visual-plan` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan \u2014 Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (`plan` server, or legacy `agent-native-plans`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (`plan.mdx`, optional `canvas.mdx` /\n`prototype.mdx`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip `/visual-plan` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content \u2014 no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the `plan` (or legacy `agent-native-plans`) tools are not visible,\ndiscover them through the host's `tool_search` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD `references/connection.md` in this skill directory \u2014 it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n`AGENT_NATIVE_PLANS_MODE=local-files` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call `get-plan-blocks` for the authoritative block catalog \u2014 do not author\n from memorized tags. Then call the mode-matched create tool:\n `create-visual-plan` for document-first plans (architecture, backend, data,\n refactor, API), `create-ui-plan` for UI-first plans, `create-prototype-plan`\n for prototype-first plans, `create-plan-design` for design-first plans,\n `create-visual-questions` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as `planText` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see `references/canvas.md` and `references/document-quality.md`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put `diagram`, `data-model`,\n `api-endpoint`, `diff`, `file-tree`, `code`, and `annotated-code` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (`diff`, `annotated-code`) and `tabs` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep `api-endpoint`, `openapi-spec`, `data-model`, `json-explorer`,\n `wireframe`, question, and `custom-html` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review \u2014 a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call `get-plan-feedback` before editing, after review,\n after any long pause,\n and before the final response. Treat `anchorDetails`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with `update-visual-plan`, preferring\n targeted `contentPatches`.\n Treat the top-level `content` payload as a full replacement, not a merge; do\n not send a partial `content` object to add a canvas or one block. If a full\n replacement is unavoidable, first read the complete plan source/content, carry\n forward every existing block and visual surface, and verify the source/export\n afterward so the document body was not truncated. When the user wants\n source-control friendly edits, use `patch-visual-plan-source` against the MDX\n files instead of regenerating the plan.\n7. For hosted plans, export with `export-visual-plan` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nThis adversarial self-review pass is opt-in, not default: run it only for\nhigh-stakes plans \u2014 irreversible migrations, security-sensitive work, or when\nthe user explicitly asks for extra rigor \u2014 and skip it otherwise. It roughly\ndoubles the cost of plan generation, so the default for small, UI-only,\nsingle-decision, or ordinary plans is to skip it, not to run it. Keep the pass\ncheap and non-blocking when it does run:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel \u2014 never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong \u2014 not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with `update-visual-plan`\n `contentPatches` \u2014 vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom `question-form` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with `targetId` plus `placement`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body `diagram`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in `content.canvas` and omit `content.prototype`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n `content.canvas`, add the aligned functional prototype in\n `content.prototype`, and rely on the top visual tabs to switch between them.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use `create-prototype-plan`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe quality \u2014 read `references/wireframe.md`\n\nUI recap/plan wireframes must meet a strict quality bar \u2014 full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font\ntags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ\n`references/wireframe.md` in this skill directory \u2014 it is the single source of\ntruth for HTML wireframe quality, shared word for word with `/visual-plan`\nand `/visual-recap`. Do not author wireframes from memory.\n\n## Canvas \u2014 read `references/canvas.md`\n\nThe canvas is the single source of truth for static UI mockups: the `surface`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n`targetId`/`placement`, and edits are surgical `contentPatches`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n`references/canvas.md` in this skill directory \u2014 it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n`WireframeBlock` screens: author `<Screen surface=\"...\" html={...} />` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n`<FrameScreen>`, `<Card>`, `<Row>`, or `<Btn>` inside canvas `<Screen>` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality \u2014 read `references/document-quality.md`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom `question-form` and a pre-handoff visual check.\nBefore authoring the plan document, READ `references/document-quality.md` in this\nskill directory \u2014 it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar \u2014 read `references/exemplar.md`\n\nFor a worked example of the bar \u2014 a great UI-first plan and `/visual-plan`, plus\nthe anti-patterns to avoid \u2014 READ `references/exemplar.md` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- `create-visual-plan`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing `planText`; `content` may include no\n visual surface, canvas only, or canvas + prototype.\n- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.\n- `create-prototype-plan`: start a prototype-first plan with a functional top\n review surface.\n- `create-plan-design`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- `create-visual-questions`: use only when the user explicitly asks for a visual\n intake questionnaire, not as `/visual-plan` preflight.\n- `update-visual-plan`: revise content, status, or comments with targeted\n `contentPatches` (see Core Workflow step 6).\n- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,\n optional `canvas.mdx`, optional `.plan-state.json`, and JSON.\n- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- `import-visual-plan-source`: create or replace a plan from an MDX folder.\n- `get-visual-plan`: read the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- `get-plan-blocks`: resolve block tags before authoring \u2014 do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill \u2014 never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode \u2014 read `references/local-files.md`\n\nWhen the user wants no hosted Plan database writes \u2014 no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or `AGENT_NATIVE_PLANS_MODE=local-files` \u2014 do not call any hosted Plan\ntool except the schema-only `get-plan-blocks` catalog lookup. Author a local MDX\nfolder and\npreview it with `plan local check` / `plan local serve` / `plan local verify`.\nBefore using local-files mode, READ `references/local-files.md` in this skill\ndirectory \u2014 it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with `get-plan-feedback` /\n`update-visual-plan`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n`get-plan-feedback` returns rich anchors \u2014 read them before acting on any comment.\n\n- **Coordinate frames.** `targetX`/`targetY` are percentages *within* the\n element named by `targetSelector`/`targetKind`. Bare `x`/`y` are percentages\n of the whole plan document. `canvasX`/`canvasY` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include `targetNodeId` and\n `targetNodePath` (e.g. `card > list > listItem \"Acme Inc\"`) identifying the\n exact kit node. Use `targetNodeId` directly with wireframe node patch ops;\n use `data-design-id` values from design artboards with\n `update-design-element-style`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve `textQuote` against current prose using\n `contextBefore`/`contextAfter` for disambiguation. If `ambiguous: true`, ask\n the user \u2014 do not guess which occurrence is meant.\n- **Detached comments.** `get-plan-feedback` flags threads whose quoted text no\n longer exists as `detached` (in `detachedThreads`). Reconcile these against\n rewritten content \u2014 never silently drop them.\n- **Routing.** `resolutionTarget` is the only routing signal: act on `agent`,\n treat `human` as context only. `@mentions` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (`consumedCommentIds` on `update-visual-plan`). Set `status=resolved` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open.\n\n## Visibility & Sharing\n\nUse `set-resource-visibility` to change who can see a plan (e.g. public, login,\nor org-scoped). Use `share-resource` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work \u2014 default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup \u2014 this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n```bash\nnpx @agent-native/core@latest skills add visual-plans\n```\n\nAfter that, `/visual-plan`, `/visual-recap`, and `/visualize-repo` are the\ninstalled slash commands. If you only need one command, use\n`skills add visual-plan`, `skills add visual-recap`, or\n`skills add visualize-repo` instead. The other planning modes\n(`create-ui-plan`, `create-prototype-plan`, `create-plan-design`,\n`create-visual-questions`) are MCP tools reachable from `/visual-plan`, not\nseparate slash commands. Pass `--no-connect` to register the connector without\nauthenticating, then run\n`npx @agent-native/core@latest connect https://plan.agent-native.com --client all`\nwhenever you are ready, or choose a narrower `--client`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up \u2014 you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n`npx @agent-native/core@latest visualize-repo --open` to create/update\n`agent-native.json`, seed `.agent-native/visual-docs/repo-overview`, and open\nthe local bridge.\n\nIf a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`, do\nnot keep retrying it \u2014 stop and give the user the per-client reconnect step from\n`references/connection.md`, then continue once the connector is available.\n\nHosted default: connect `https://plan.agent-native.com/mcp`. Do\nnot put shared secrets in skill files.\n";
|
|
2
2
|
//# sourceMappingURL=visual-plan-skill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-plan-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"visual-plan-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,mv4BAudjC,CAAC"}
|
|
@@ -201,10 +201,12 @@ forward only the code-research and plan-composition guidance here.
|
|
|
201
201
|
|
|
202
202
|
## Self-Review Before Handoff
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
This adversarial self-review pass is opt-in, not default: run it only for
|
|
205
|
+
high-stakes plans — irreversible migrations, security-sensitive work, or when
|
|
206
|
+
the user explicitly asks for extra rigor — and skip it otherwise. It roughly
|
|
207
|
+
doubles the cost of plan generation, so the default for small, UI-only,
|
|
208
|
+
single-decision, or ordinary plans is to skip it, not to run it. Keep the pass
|
|
209
|
+
cheap and non-blocking when it does run:
|
|
208
210
|
|
|
209
211
|
- **Surface the plan first, review concurrently.** Post the link and let the user
|
|
210
212
|
start reading, then run the review in parallel — never make the user wait on it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-plan-skill.js","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqdpC,CAAC","sourcesContent":["export const VISUAL_PLANS_SKILL_MD = `---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n\\`/visual-plan\\` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n\\`/visual-plan\\` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work — typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence — and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing \\`actions/\\` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses — existing actions, schema,\n components, helpers — before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them — wire format, public ids,\n data-model shape, auth and ownership boundaries — and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it — explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call \\`create-visual-questions\\` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom \\`question-form\\` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step — do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with \\`update-visual-plan\\` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan — Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (\\`plan\\` server, or legacy \\`agent-native-plans\\`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (\\`plan.mdx\\`, optional \\`canvas.mdx\\` /\n\\`prototype.mdx\\`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip \\`/visual-plan\\` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content — no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the \\`plan\\` (or legacy \\`agent-native-plans\\`) tools are not visible,\ndiscover them through the host's \\`tool_search\\` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD \\`references/connection.md\\` in this skill directory — it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n\\`AGENT_NATIVE_PLANS_MODE=local-files\\` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call \\`get-plan-blocks\\` for the authoritative block catalog — do not author\n from memorized tags. Then call the mode-matched create tool:\n \\`create-visual-plan\\` for document-first plans (architecture, backend, data,\n refactor, API), \\`create-ui-plan\\` for UI-first plans, \\`create-prototype-plan\\`\n for prototype-first plans, \\`create-plan-design\\` for design-first plans,\n \\`create-visual-questions\\` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as \\`planText\\` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see \\`references/canvas.md\\` and \\`references/document-quality.md\\`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put \\`diagram\\`, \\`data-model\\`,\n \\`api-endpoint\\`, \\`diff\\`, \\`file-tree\\`, \\`code\\`, and \\`annotated-code\\` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (\\`diff\\`, \\`annotated-code\\`) and \\`tabs\\` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep \\`api-endpoint\\`, \\`openapi-spec\\`, \\`data-model\\`, \\`json-explorer\\`,\n \\`wireframe\\`, question, and \\`custom-html\\` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review — a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call \\`get-plan-feedback\\` before editing, after review,\n after any long pause,\n and before the final response. Treat \\`anchorDetails\\`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with \\`update-visual-plan\\`, preferring\n targeted \\`contentPatches\\`.\n Treat the top-level \\`content\\` payload as a full replacement, not a merge; do\n not send a partial \\`content\\` object to add a canvas or one block. If a full\n replacement is unavoidable, first read the complete plan source/content, carry\n forward every existing block and visual surface, and verify the source/export\n afterward so the document body was not truncated. When the user wants\n source-control friendly edits, use \\`patch-visual-plan-source\\` against the MDX\n files instead of regenerating the plan.\n7. For hosted plans, export with \\`export-visual-plan\\` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nFor high-stakes plans — architecture, backend, data-model, migration, multi-file,\nor otherwise risky work — run one adversarial self-review pass before treating the\nplan as final. Skip it for small, UI-only, or single-decision plans where the cost\noutweighs the value. Keep the pass cheap and non-blocking:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel — never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong — not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with \\`update-visual-plan\\`\n \\`contentPatches\\` — vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom \\`question-form\\` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with \\`targetId\\` plus \\`placement\\`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body \\`diagram\\`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in \\`content.canvas\\` and omit \\`content.prototype\\`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n \\`content.canvas\\`, add the aligned functional prototype in\n \\`content.prototype\\`, and rely on the top visual tabs to switch between them.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use \\`create-prototype-plan\\`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe quality — read \\`references/wireframe.md\\`\n\nUI recap/plan wireframes must meet a strict quality bar — full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n\\`surface\\` preset, \\`--wf-*\\` tokens instead of hex, and no \\`<html>\\`/\\`<style>\\`/font\ntags. Before authoring ANY wireframe / \\`<Screen>\\` / \\`WireframeBlock\\`, READ\n\\`references/wireframe.md\\` in this skill directory — it is the single source of\ntruth for HTML wireframe quality, shared word for word with \\`/visual-plan\\`\nand \\`/visual-recap\\`. Do not author wireframes from memory.\n\n## Canvas — read \\`references/canvas.md\\`\n\nThe canvas is the single source of truth for static UI mockups: the \\`surface\\`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n\\`targetId\\`/\\`placement\\`, and edits are surgical \\`contentPatches\\`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n\\`references/canvas.md\\` in this skill directory — it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n\\`WireframeBlock\\` screens: author \\`<Screen surface=\"...\" html={...} />\\` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n\\`<FrameScreen>\\`, \\`<Card>\\`, \\`<Row>\\`, or \\`<Btn>\\` inside canvas \\`<Screen>\\` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality — read \\`references/document-quality.md\\`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom \\`question-form\\` and a pre-handoff visual check.\nBefore authoring the plan document, READ \\`references/document-quality.md\\` in this\nskill directory — it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar — read \\`references/exemplar.md\\`\n\nFor a worked example of the bar — a great UI-first plan and \\`/visual-plan\\`, plus\nthe anti-patterns to avoid — READ \\`references/exemplar.md\\` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- \\`create-visual-plan\\`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing \\`planText\\`; \\`content\\` may include no\n visual surface, canvas only, or canvas + prototype.\n- \\`create-ui-plan\\`: start a UI-first plan when the work is primarily product UI.\n- \\`create-prototype-plan\\`: start a prototype-first plan with a functional top\n review surface.\n- \\`create-plan-design\\`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- \\`convert-visual-plan-to-prototype\\`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- \\`create-visual-questions\\`: use only when the user explicitly asks for a visual\n intake questionnaire, not as \\`/visual-plan\\` preflight.\n- \\`update-visual-plan\\`: revise content, status, or comments with targeted\n \\`contentPatches\\` (see Core Workflow step 6).\n- \\`read-visual-plan-source\\`: read the normalized plan as \\`plan.mdx\\`,\n optional \\`canvas.mdx\\`, optional \\`.plan-state.json\\`, and JSON.\n- \\`patch-visual-plan-source\\`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- \\`import-visual-plan-source\\`: create or replace a plan from an MDX folder.\n- \\`get-visual-plan\\`: read the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- \\`get-plan-feedback\\`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- \\`get-plan-blocks\\`: resolve block tags before authoring — do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- \\`export-visual-plan\\`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill — never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode — read \\`references/local-files.md\\`\n\nWhen the user wants no hosted Plan database writes — no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or \\`AGENT_NATIVE_PLANS_MODE=local-files\\` — do not call any hosted Plan\ntool except the schema-only \\`get-plan-blocks\\` catalog lookup. Author a local MDX\nfolder and\npreview it with \\`plan local check\\` / \\`plan local serve\\` / \\`plan local verify\\`.\nBefore using local-files mode, READ \\`references/local-files.md\\` in this skill\ndirectory — it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with \\`get-plan-feedback\\` /\n\\`update-visual-plan\\`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n\\`get-plan-feedback\\` returns rich anchors — read them before acting on any comment.\n\n- **Coordinate frames.** \\`targetX\\`/\\`targetY\\` are percentages *within* the\n element named by \\`targetSelector\\`/\\`targetKind\\`. Bare \\`x\\`/\\`y\\` are percentages\n of the whole plan document. \\`canvasX\\`/\\`canvasY\\` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include \\`targetNodeId\\` and\n \\`targetNodePath\\` (e.g. \\`card > list > listItem \"Acme Inc\"\\`) identifying the\n exact kit node. Use \\`targetNodeId\\` directly with wireframe node patch ops;\n use \\`data-design-id\\` values from design artboards with\n \\`update-design-element-style\\`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve \\`textQuote\\` against current prose using\n \\`contextBefore\\`/\\`contextAfter\\` for disambiguation. If \\`ambiguous: true\\`, ask\n the user — do not guess which occurrence is meant.\n- **Detached comments.** \\`get-plan-feedback\\` flags threads whose quoted text no\n longer exists as \\`detached\\` (in \\`detachedThreads\\`). Reconcile these against\n rewritten content — never silently drop them.\n- **Routing.** \\`resolutionTarget\\` is the only routing signal: act on \\`agent\\`,\n treat \\`human\\` as context only. \\`@mentions\\` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (\\`consumedCommentIds\\` on \\`update-visual-plan\\`). Set \\`status=resolved\\` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open.\n\n## Visibility & Sharing\n\nUse \\`set-resource-visibility\\` to change who can see a plan (e.g. public, login,\nor org-scoped). Use \\`share-resource\\` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work — default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup — this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n\\`\\`\\`bash\nnpx @agent-native/core@latest skills add visual-plans\n\\`\\`\\`\n\nAfter that, \\`/visual-plan\\`, \\`/visual-recap\\`, and \\`/visualize-repo\\` are the\ninstalled slash commands. If you only need one command, use\n\\`skills add visual-plan\\`, \\`skills add visual-recap\\`, or\n\\`skills add visualize-repo\\` instead. The other planning modes\n(\\`create-ui-plan\\`, \\`create-prototype-plan\\`, \\`create-plan-design\\`,\n\\`create-visual-questions\\`) are MCP tools reachable from \\`/visual-plan\\`, not\nseparate slash commands. Pass \\`--no-connect\\` to register the connector without\nauthenticating, then run\n\\`npx @agent-native/core@latest connect https://plan.agent-native.com --client all\\`\nwhenever you are ready, or choose a narrower \\`--client\\`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up — you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n\\`npx @agent-native/core@latest visualize-repo --open\\` to create/update\n\\`agent-native.json\\`, seed \\`.agent-native/visual-docs/repo-overview\\`, and open\nthe local bridge.\n\nIf a Plans tool returns \\`needs auth\\`, \\`Unauthorized\\`, or \\`Session terminated\\`, do\nnot keep retrying it — stop and give the user the per-client reconnect step from\n\\`references/connection.md\\`, then continue once the connector is available.\n\nHosted default: connect \\`https://plan.agent-native.com/mcp\\`. Do\nnot put shared secrets in skill files.\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"visual-plan-skill.js","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-plan-skill.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAudpC,CAAC","sourcesContent":["export const VISUAL_PLANS_SKILL_MD = `---\nname: visual-plan\ndescription: >-\n Turn ordinary text plans into rich interactive visual plans with diagrams,\n file maps, annotated code, open questions, and UI/prototype review when\n useful.\nmetadata:\n visibility: exported\n---\n\n# Agent-Native Plans\n\nAgent-Native Plans is structured visual planning mode for coding agents. Build\nthe plan you would normally write in Markdown, but as a scannable document with\neditable blocks mixed in: inline diagrams, code snippets,\nopen questions, and an optional top visual review area (wireframe canvas, live\nprototype, or both in tabs). Architecture and backend plans stay document-only;\nUI and product plans start with the top canvas/prototype (the Visual Surface\nChoice section owns that rule).\n\n\\`/visual-plan\\` is the packaged command and main entry point. Choose the review\nmode from the task: UI-first when the work is primarily product UI and review\nshould start with screens, prototype-first when review should start with a\nfunctional live prototype, design-first when review needs full-fidelity branded\nscreens, or visual-intake when the user explicitly wants a questionnaire before\nplanning. When a Codex, Claude Code, Markdown, or pasted plan already exists,\n\\`/visual-plan\\` uses that source plan as the starting point and builds the review\nsurface from it instead of starting over.\n\n## When To Use\n\nCreate or adapt a visual plan whenever the plan would be better as a reviewable\nartifact than a chat paragraph. This includes modest work such as a single UI\nsurface with states, a small workflow, a before/after product change, or a\ncomponent/API/data-shape decision that needs alignment, plus larger multi-file,\nambiguous, long-running, risky, or UI-heavy work. Use it when architecture /\ndata flow / UI direction / options / open questions would benefit from inline\ndiagrams or structured blocks, when the user needs to react to a direction\nbefore you implement, or when an existing text plan needs a richer review\nsurface.\n\n## Plan Discipline\n\n- **Gate thoughtfully.** A visual plan is a richer review surface, not only a\n tool for giant projects. Use it when the user needs to see, compare, comment\n on, or approve a direction before code, even for a modest UI/state/workflow\n change. Skip it for truly trivial, unambiguous work — typos, one-line fixes, a\n single well-specified function, anything whose diff you could describe in one\n sentence — and just make the change. Never pad a plan with filler and never\n ship a single-step plan.\n- **Research before you draft.** Read the real files, actions, schema, and\n patterns first; name actual files, symbols, and data shapes instead of\n inventing them. Check existing \\`actions/\\` before proposing endpoints and prefer\n named client helpers over raw fetch. Delegate wide exploration to a sub-agent.\n Lead with reuse: for each step, name what it reuses — existing actions, schema,\n components, helpers — before what it adds, so the plan explains the genuinely new\n delta instead of redescribing what already exists.\n- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API\n work, sketch where the feature is headed, then call out the decisions that are\n expensive to undo once data or callers depend on them — wire format, public ids,\n data-model shape, auth and ownership boundaries — and get those right in the plan\n even if most of the feature ships later. Then scope to the smallest first cut that\n proves the approach without foreclosing it, stating both what is in and what is\n explicitly deferred.\n- **Keep examples at the right altitude.** When the user's idea is a broad\n framework, product, or operating-model change, do not collapse it into the\n first concrete example, provider, or sync path they mention. Separate the core\n abstraction from motivating examples and app/provider adapters. Use examples\n to make the plan legible, but label them as examples unless they are the whole\n requested scope.\n- **Publish standalone plans.** If the user pasted, referenced, or already has a\n Codex / Claude Code / Markdown plan, treat it as source material, but rewrite\n the published plan as a clean standalone proposal. Preserve the source plan's\n useful intent and codebase facts, label inferred visuals as inferred, and avoid\n revision language such as \"preserve the prior plan\", \"do not drop the old\n idea\", \"unlike the previous version\", or \"this revision changes...\". A reader\n who never saw the chat or earlier drafts should understand the plan.\n- **Make the first read concrete.** If the plan is meant to be shared with\n someone outside the chat, or if the concept is abstract, lead near the top with\n one concrete product example before mode tables, architecture, or roadmaps. For\n UI-capable concepts, that usually means a top-canvas app state that shows the\n real user workflow in product terms. Do not rely on phrases that only make\n sense in conversation, and do not frame the plan as \"not the old idea\"; state\n the positive model directly.\n- **Planning is read-only.** Make no source edits while building or reviewing the\n plan. Start editing only after the user approves the direction.\n- **Clarify vs. assume.** Do not ask how to build it — explore and present the\n approach and options in the plan. Ask a clarifying question only when an\n ambiguity would change the design and you cannot resolve it from the code; use\n the host agent's normal ask-user-question flow and batch 2-4 high-leverage\n questions before finalizing. Do not call \\`create-visual-questions\\` for\n ordinary clarification or preflight; reserve it for the visual-intake mode when\n the user explicitly asks for a visual intake questionnaire. Otherwise state the\n assumption explicitly and proceed, and keep anything unresolved in the plan's\n single bottom \\`question-form\\` Open Questions block. For complex plans, do a\n final open-question pass before handoff: if a decision would affect\n architecture, scope, UX, data shape, or rollout, either decide it in the plan\n with rationale or put it in that bottom form with a recommended default.\n- **The plan is the approval gate.** After surfacing it, ask the user to review\n and approve before you write code, and name which files/areas the work touches.\n Presenting the plan and requesting sign-off is the approval step — do not ask a\n separate \"does this look good?\" question.\n- **The document is the source of truth, not the chat.** When scope shifts,\n update the plan with \\`update-visual-plan\\` rather than only changing course in\n chat, and make the updated document stand alone. Do not describe the update as\n a correction to an earlier draft inside the plan itself. Re-read the approved\n plan before major steps.\n\n## Create A Structured Agent-Native Plan — Never Inline\n\nThe deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.\nThe hosted Plan MCP connector (\\`plan\\` server, or legacy \\`agent-native-plans\\`) is\nthe default collaboration and commenting surface; it is not a reason to reject\nthe planning pattern as an external dependency or rented layer. Plans are\nportable source artifacts (\\`plan.mdx\\`, optional \\`canvas.mdx\\` /\n\\`prototype.mdx\\`, JSON, and HTML export), and ownership-sensitive workflows can\nuse local-files mode or a self-hosted/custom Plan app URL without abandoning the\nskill's review discipline. Do not advise the user to skip \\`/visual-plan\\` because\nthe default surface is hosted; choose the right Plan mode for the user's\nownership, privacy, sharing, and branding needs.\n\nBy default, create the plan via the Plan MCP connector and NEVER hand it over as\ninline chat content — no Markdown prose, ASCII sketch, table, or fenced\nwireframe. If the \\`plan\\` (or legacy \\`agent-native-plans\\`) tools are not visible,\ndiscover them through the host's \\`tool_search\\` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline plan. Before publishing, or whenever a connector or auth error appears,\nREAD \\`references/connection.md\\` in this skill directory — it is the single source\nof truth for the never-inline rule, connector discovery, and the per-client\nreconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.\n\n## Core Workflow\n\nThis section describes the default hosted Plan MCP workflow. If\n\\`AGENT_NATIVE_PLANS_MODE=local-files\\` is set, or the user asks for fully local\nfiles/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry\nforward only the code-research and plan-composition guidance here.\n\n1. Follow the host agent's normal planning flow: inspect the codebase, delegate\n wide exploration when useful, gather the info needed, and ask native\n clarifying questions as needed before generating the plan. If a source plan\n already exists, gather its exact text from the user's paste, a referenced\n file, or recent visible agent context; do not invent source text.\n2. Call \\`get-plan-blocks\\` for the authoritative block catalog — do not author\n from memorized tags. Then call the mode-matched create tool:\n \\`create-visual-plan\\` for document-first plans (architecture, backend, data,\n refactor, API), \\`create-ui-plan\\` for UI-first plans, \\`create-prototype-plan\\`\n for prototype-first plans, \\`create-plan-design\\` for design-first plans,\n \\`create-visual-questions\\` only when the user explicitly asks for a visual\n intake questionnaire. When a source plan already exists,\n pass it as \\`planText\\` and preserve the original plan's useful intent while\n producing a standalone plan document, not a revision memo.\n3. For UI/product plans, compose the top canvas first with the primary\n wireframes and annotated states, then write the document with native blocks\n (see \\`references/canvas.md\\` and \\`references/document-quality.md\\`). For\n broad product architecture plans with a user-facing implication, add a\n concrete \"what this looks like in the app\" visual before the abstract\n architecture or mode tables. Keep the document close to the standalone\n Markdown plan the agent would normally output. If an existing plan was\n provided, carry forward the right facts and decisions without referring to\n the previous draft or explaining how this version differs. For non-visual\n plans, skip the top visual surface (Visual Surface Choice below owns the rule)\n and put \\`diagram\\`, \\`data-model\\`,\n \\`api-endpoint\\`, \\`diff\\`, \\`file-tree\\`, \\`code\\`, and \\`annotated-code\\` blocks\n directly next to the relevant prose.\n Wide document layout is renderer-owned and intentionally allowlisted: only\n literal code-review surfaces (\\`diff\\`, \\`annotated-code\\`) and \\`tabs\\` blocks\n with vertical orientation or diff-like children break out wider than prose.\n Keep \\`api-endpoint\\`, \\`openapi-spec\\`, \\`data-model\\`, \\`json-explorer\\`,\n \\`wireframe\\`, question, and \\`custom-html\\` blocks in normal document flow unless\n their own renderer says otherwise.\n4. Surface the returned Plans link or inline MCP App and ask the user to review.\n Always include the actual URL in chat so the next step is a click in CLI or\n other text-only hosts. When the host exposes an embedded browser/preview panel\n and a tool can open arbitrary URLs there, open the returned plan URL\n automatically for convenient review — a convenience and smoke test, never the\n only handoff or the access\n model. Plans should load out of the box for the local agent and local browser\n session; if a signed-in embedded browser cannot read a local plan that an\n anonymous/tool check can read, fix the app/action ownership or access path\n rather than patching one plan by hand. For high-stakes plans (architecture,\n backend, data, multi-file, or risky), also kick off the self-review pass in\n **Self-Review Before Handoff** while the user reads, instead of blocking the\n handoff on it.\n5. For hosted plans, call \\`get-plan-feedback\\` before editing, after review,\n after any long pause,\n and before the final response. Treat \\`anchorDetails\\`, resolver intent, recent\n review events, and any focused screenshots from browser handoff as the source\n of truth for exactly what changed and exactly what each comment points at.\n6. For hosted plans, apply changes with \\`update-visual-plan\\`, preferring\n targeted \\`contentPatches\\`.\n Treat the top-level \\`content\\` payload as a full replacement, not a merge; do\n not send a partial \\`content\\` object to add a canvas or one block. If a full\n replacement is unavoidable, first read the complete plan source/content, carry\n forward every existing block and visual surface, and verify the source/export\n afterward so the document body was not truncated. When the user wants\n source-control friendly edits, use \\`patch-visual-plan-source\\` against the MDX\n files instead of regenerating the plan.\n7. For hosted plans, export with \\`export-visual-plan\\` only when the user wants a\n shareable receipt or repo-check-in artifacts.\n\n## Self-Review Before Handoff\n\nThis adversarial self-review pass is opt-in, not default: run it only for\nhigh-stakes plans — irreversible migrations, security-sensitive work, or when\nthe user explicitly asks for extra rigor — and skip it otherwise. It roughly\ndoubles the cost of plan generation, so the default for small, UI-only,\nsingle-decision, or ordinary plans is to skip it, not to run it. Keep the pass\ncheap and non-blocking when it does run:\n\n- **Surface the plan first, review concurrently.** Post the link and let the user\n start reading, then run the review in parallel — never make the user wait on it.\n- **Review the written plan; do not re-research.** Critique the plan text and its\n own blocks. The grounding was already done while drafting, so the review checks\n the output instead of re-exploring the repo.\n- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,\n or wrong — not to praise. Point it at: hard-to-reverse decisions made implicitly\n or not at all (wire format, public ids, data-model shape, auth, ownership); steps\n not anchored in real files or symbols; a menu of options where the plan should\n commit to one; obvious missing decisions (\"what happens when X?\", \"why not Y?\");\n and padding or single-step filler.\n- **Fix vs. ask.** Apply clear-cut fixes yourself with \\`update-visual-plan\\`\n \\`contentPatches\\` — vague non-goals, unanchored claims, an obvious missing\n decision. Route genuine judgment calls back to the user instead: add them to the\n bottom \\`question-form\\` Open Questions block or batch them into the normal\n ask-user-question flow. Do not silently decide them.\n- **Do not surprise the user mid-read.** On a large plan, apply the patches before\n the editor loads; otherwise note briefly that a self-review is running so the\n plan changing under them is expected. When you next respond, summarize what the\n review changed and what it surfaced for the user to decide.\n\n## Visual Surface Choice\n\nChoose the surface before creating the plan or after reading the source plan. Do\nnot add visual chrome by default:\n\nFor UI/product plans, the top canvas is usually the primary review surface. Put\nthe first meaningful wireframes there, not buried as document-body blocks. Use\nmultiple canvas artboards when states matter, such as the default view, an\noverflow menu or popover, a side panel, loading, or error. Put short annotations\nbeside frames with \\`targetId\\` plus \\`placement\\`; keep implementation details,\ntradeoffs, file maps, data contracts, risks, and verification in the document\nbody below the canvas.\n\nWhen the user asks for a flow, storyboard, journey, wireframe, canvas, or \"what\nthis looks like\", treat that as a canvas-first request. Make one artboard per\nuser-visible state, connect only adjacent transitions, and use short canvas\nannotations for the product notes. Do not substitute a document-body \\`diagram\\`\nblock for the requested storyboard just because HTML diagrams are faster to\nwrite; diagrams belong below the canvas for backend mechanics, architecture, or\ndata-flow explanation.\n\nKeep product wireframes and explanatory/meta diagrams separate. Start with pure\nscreens that look like the app state under discussion, without callout prose or\narchitecture notes embedded inside the UI. Put arrows, labels, contracts, data\nflow, and mode explanations in separate annotations, separate canvas diagrams,\nor the document body.\n\nWhen the plan touches an existing app, inspect the current shell/components\nbefore drawing. The first artboard should look like the real app at the same\ndensity: existing sidebars, toolbar placement, overflow menus, app chrome, and\nframework agent chrome stay in their real places. Model secondary surfaces as\nseparate states, such as a top-right overflow popover, sheet, panel, loading\nstate, or separate AgentSidebar, rather than inventing a permanent inspector or\nfolding framework chrome into the product UI.\n\n- **No visual surface** for architecture-only, backend-only, data migration,\n copy-only, or otherwise non-visual plans. Do not use the top canvas for\n architecture diagrams, dependency maps, file plans, API contracts, or\n data-flow-only reviews. Use a strong document with local inline diagrams\n only when relationships need a visual explanation, usually one spatial diagram\n per recommendation or decision. Prefer grouped regions, layers, quadrants,\n matrices, or before/after panels over a single-axis chain unless the\n relationship is truly sequential.\n- **Canvas only** for one static screen, a before/after comparison, a component\n state, a small popover, or a visual direction that does not require clicking.\n Put those wireframes in \\`content.canvas\\` and omit \\`content.prototype\\`.\n- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,\n review/approval flows, navigation changes, or anything where the reviewer\n needs to operate the behavior. Keep the static wireframes in\n \\`content.canvas\\`, add the aligned functional prototype in\n \\`content.prototype\\`, and rely on the top visual tabs to switch between them.\n- **Prototype-first** when the user asks to operate the UI or when interaction is\n the main question. Use \\`create-prototype-plan\\`, which still preserves static\n mocks where useful.\n\nFor mixed canvas + prototype plans, reuse the same real labels, app statuses,\nand screen ids across both surfaces. The canvas is the inspectable static reference;\nthe prototype is the interactive version of that same flow, not a separate\ndesign direction.\n\n## Wireframe quality — read \\`references/wireframe.md\\`\n\nUI recap/plan wireframes must meet a strict quality bar — full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n\\`surface\\` preset, \\`--wf-*\\` tokens instead of hex, and no \\`<html>\\`/\\`<style>\\`/font\ntags. Before authoring ANY wireframe / \\`<Screen>\\` / \\`WireframeBlock\\`, READ\n\\`references/wireframe.md\\` in this skill directory — it is the single source of\ntruth for HTML wireframe quality, shared word for word with \\`/visual-plan\\`\nand \\`/visual-recap\\`. Do not author wireframes from memory.\n\n## Canvas — read \\`references/canvas.md\\`\n\nThe canvas is the single source of truth for static UI mockups: the \\`surface\\`\nlocks each artboard's footprint, mixed surfaces lay out\nin lanes, annotations are plain-text designer notes anchored by\n\\`targetId\\`/\\`placement\\`, and edits are surgical \\`contentPatches\\`. Before\nauthoring or editing ANY canvas, artboard, or annotation, READ\n\\`references/canvas.md\\` in this skill directory — it is the single source of truth\nfor canvas/artboard mechanics. Do not author canvas layouts from memory.\nCanvas artboards use the same HTML wireframe path as document-body\n\\`WireframeBlock\\` screens: author \\`<Screen surface=\"...\" html={...} />\\` with a\nsemantic HTML fragment. Do not author fresh kit-tree children such as\n\\`<FrameScreen>\\`, \\`<Card>\\`, \\`<Row>\\`, or \\`<Btn>\\` inside canvas \\`<Screen>\\` tags;\nthose are legacy compatibility markup for old plans and produce brittle canvas\nlayouts.\n\n## Document quality — read \\`references/document-quality.md\\`\n\nThe document is a serious technical plan, not marketing: outcome-first,\nprose-first, self-contained, built from the right native blocks, with open\nquestions in a single bottom \\`question-form\\` and a pre-handoff visual check.\nBefore authoring the plan document, READ \\`references/document-quality.md\\` in this\nskill directory — it is the single source of truth for the document quality bar.\nDo not write the document from memory.\n\n## Good vs. bad exemplar — read \\`references/exemplar.md\\`\n\nFor a worked example of the bar — a great UI-first plan and \\`/visual-plan\\`, plus\nthe anti-patterns to avoid — READ \\`references/exemplar.md\\` in this skill\ndirectory before authoring a plan.\n\n## Tool Guidance\n\n- \\`create-visual-plan\\`: start one structured visual plan per agent task/run, or\n import an existing text plan by passing \\`planText\\`; \\`content\\` may include no\n visual surface, canvas only, or canvas + prototype.\n- \\`create-ui-plan\\`: start a UI-first plan when the work is primarily product UI.\n- \\`create-prototype-plan\\`: start a prototype-first plan with a functional top\n review surface.\n- \\`create-plan-design\\`: start a full-fidelity branded Design-tab plan with an\n optional matching Prototype tab.\n- \\`convert-visual-plan-to-prototype\\`: convert an existing HTML wireframe canvas\n into a prototype plan.\n- \\`create-visual-questions\\`: use only when the user explicitly asks for a visual\n intake questionnaire, not as \\`/visual-plan\\` preflight.\n- \\`update-visual-plan\\`: revise content, status, or comments with targeted\n \\`contentPatches\\` (see Core Workflow step 6).\n- \\`read-visual-plan-source\\`: read the normalized plan as \\`plan.mdx\\`,\n optional \\`canvas.mdx\\`, optional \\`.plan-state.json\\`, and JSON.\n- \\`patch-visual-plan-source\\`: apply granular MDX AST patches by stable block,\n artboard, annotation, component, or wireframe-node id.\n- \\`import-visual-plan-source\\`: create or replace a plan from an MDX folder.\n- \\`get-visual-plan\\`: read the current structured plan, exported HTML, and\n annotations; it also returns the MDX folder for source workflows.\n- \\`get-plan-feedback\\`: read unconsumed human feedback. Use it frequently; it\n returns grouped threads, exact anchor details, expected resolver, and recent\n review-event payloads so agents can act only on the comments meant for them.\n- \\`get-plan-blocks\\`: resolve block tags before authoring — do not memorize tags;\n call this first to get the authoritative tag names, required fields, and prop\n shapes from the live block registry.\n- \\`export-visual-plan\\`: export HTML, Markdown fallback, structured JSON, and MDX\n files for repo check-in.\n\nWhen the user critiques a plan's look or structure, fix the renderer or this\nskill — never hand-edit one stored plan. Turn feedback into better guidance.\n\n## Local-Files Privacy Mode — read \\`references/local-files.md\\`\n\nWhen the user wants no hosted Plan database writes — no DB writes, no Plan MCP\npublish, fully local/offline/private planning, repo-owned source-controlled\nartifacts, or \\`AGENT_NATIVE_PLANS_MODE=local-files\\` — do not call any hosted Plan\ntool except the schema-only \\`get-plan-blocks\\` catalog lookup. Author a local MDX\nfolder and\npreview it with \\`plan local check\\` / \\`plan local serve\\` / \\`plan local verify\\`.\nBefore using local-files mode, READ \\`references/local-files.md\\` in this skill\ndirectory — it is the single source of truth for the full contract (catalog\nlookup, MDX folder layout, the local bridge commands, and the hosted tools you\nmust not call). Carry forward only the code-research and plan-composition\nguidance from Core Workflow; everything hosted is replaced by the local bridge.\n\n## Interpreting comment anchors\n\nThis section applies to hosted plans with \\`get-plan-feedback\\` /\n\\`update-visual-plan\\`. In local-files mode, do not call hosted feedback or update\ntools; interpret file/chat feedback directly, edit the MDX files, rerun the\nlocal bridge check/serve/verify command, and report the new local URL.\n\n\\`get-plan-feedback\\` returns rich anchors — read them before acting on any comment.\n\n- **Coordinate frames.** \\`targetX\\`/\\`targetY\\` are percentages *within* the\n element named by \\`targetSelector\\`/\\`targetKind\\`. Bare \\`x\\`/\\`y\\` are percentages\n of the whole plan document. \\`canvasX\\`/\\`canvasY\\` are raw board-world pixels on\n the design canvas (board size given when available).\n- **Wireframe pins.** Anchors on wireframes include \\`targetNodeId\\` and\n \\`targetNodePath\\` (e.g. \\`card > list > listItem \"Acme Inc\"\\`) identifying the\n exact kit node. Use \\`targetNodeId\\` directly with wireframe node patch ops;\n use \\`data-design-id\\` values from design artboards with\n \\`update-design-element-style\\`. Prefer the node id/path over raw coordinates;\n fall back to coordinates plus the focused screenshot (red ring marks the exact\n point) only when no node id is present.\n- **Text quotes.** Resolve \\`textQuote\\` against current prose using\n \\`contextBefore\\`/\\`contextAfter\\` for disambiguation. If \\`ambiguous: true\\`, ask\n the user — do not guess which occurrence is meant.\n- **Detached comments.** \\`get-plan-feedback\\` flags threads whose quoted text no\n longer exists as \\`detached\\` (in \\`detachedThreads\\`). Reconcile these against\n rewritten content — never silently drop them.\n- **Routing.** \\`resolutionTarget\\` is the only routing signal: act on \\`agent\\`,\n treat \\`human\\` as context only. \\`@mentions\\` are people to notify, never a\n routing signal.\n- **Two-axis state.** Mark every ingested comment as consumed\n (\\`consumedCommentIds\\` on \\`update-visual-plan\\`). Set \\`status=resolved\\` only on\n agent-targeted comments you actually addressed; leave human-targeted comments\n open.\n\n## Visibility & Sharing\n\nUse \\`set-resource-visibility\\` to change who can see a plan (e.g. public, login,\nor org-scoped). Use \\`share-resource\\` to grant specific users or roles access\nby email or role. Gate visibility before sharing any plan that covers\nunreleased or private work — default to the narrowest scope that meets the\nreview need.\n\n## Setup & Authentication\n\nThere are two ways into Plans.\n\n**Coding agent (CLI).** Install once with the Agent-Native CLI. The command\ninstalls the Plans skills, registers the hosted Plans MCP connector, and runs\nauth/setup for the selected local client(s) in the same step (a one-time browser\nsign-in at setup — this is intended), so the first tool call in that client does\nnot hit an OAuth wall:\n\n\\`\\`\\`bash\nnpx @agent-native/core@latest skills add visual-plans\n\\`\\`\\`\n\nAfter that, \\`/visual-plan\\`, \\`/visual-recap\\`, and \\`/visualize-repo\\` are the\ninstalled slash commands. If you only need one command, use\n\\`skills add visual-plan\\`, \\`skills add visual-recap\\`, or\n\\`skills add visualize-repo\\` instead. The other planning modes\n(\\`create-ui-plan\\`, \\`create-prototype-plan\\`, \\`create-plan-design\\`,\n\\`create-visual-questions\\`) are MCP tools reachable from \\`/visual-plan\\`, not\nseparate slash commands. Pass \\`--no-connect\\` to register the connector without\nauthenticating, then run\n\\`npx @agent-native/core@latest connect https://plan.agent-native.com --client all\\`\nwhenever you are ready, or choose a narrower \\`--client\\`. Auth and MCP tool\nloading are per client config/session.\n\n**Browser (people you share with).** Open the Plans editor and create & edit\nwith no sign-up — you work as a guest. Sign in only when you want to save or\nshare; signing in claims the plans you made as a guest into your account.\n\nSharing and commenting require an account: public/shared plans are viewable by\nanyone with the link, but commenting on them needs an agent-native account.\n\nFor fully offline, no-account use, run the Plans app locally and sync plans to\nyour repo as MDX. This local mode is a separate advanced path, not the default\nhosted flow.\n\nFor repo-wide visual docs, run\n\\`npx @agent-native/core@latest visualize-repo --open\\` to create/update\n\\`agent-native.json\\`, seed \\`.agent-native/visual-docs/repo-overview\\`, and open\nthe local bridge.\n\nIf a Plans tool returns \\`needs auth\\`, \\`Unauthorized\\`, or \\`Session terminated\\`, do\nnot keep retrying it — stop and give the user the per-client reconnect step from\n\\`references/connection.md\\`, then continue once the connector is available.\n\nHosted default: connect \\`https://plan.agent-native.com/mcp\\`. Do\nnot put shared secrets in skill files.\n`;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VISUAL_RECAP_SKILL_MD = "---\nname: visual-recap\ndescription: >-\n Turn a PR, branch, commit, or git diff into an interactive visual recap with\n diagrams, file maps, API/schema summaries, annotated diffs, and focused review\n notes.\nmetadata:\n visibility: exported\n---\n\n# Visual Recap\n\n`/visual-recap` creates a visual plan built **from** a diff, not toward one. It\nis the reverse of forward planning: instead of describing the change you are\nabout to make, you describe the change that was just made, at a higher altitude\nthan line-by-line review. The same plan data model serves both directions \u2014\nschema, API, file, and architecture changes become the same `data-model`,\n`api-endpoint`, `file-tree`, and `diagram` blocks a forward plan would use, only\nnow they summarize work that exists. A reviewer scans the shape of the change\nbefore spending attention on the literal lines.\n\n## Publish As An Agent-Native Plan \u2014 Never Inline\n\nThe deliverable is ALWAYS a published Agent-Native Plan, created with\n`create-visual-recap` on the Plan MCP connector \u2014 NEVER inline chat content (not\nMarkdown prose, an ASCII sketch, a table, a fenced \"wireframe\", or a \"here's the\nrecap\" summary). A recap's entire value is the hosted, interactive, annotatable\nplan; an inline summary is not a degraded recap, it is the thing a recap\nreplaces. If the `plan` (or legacy `agent-native-plans`) tools are not visible,\ndiscover them through the host's `tool_search` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline recap. Before publishing, or whenever a connector or auth error\nappears, READ `references/connection.md` in this skill directory \u2014 it is the\nsingle source of truth for the never-inline rule, connector discovery, and the\nper-client reconnect steps. Local-files privacy mode (below) is the one\nexception.\n\n## Local-Files Privacy Mode \u2014 read `references/local-files.md`\n\nWhen the user wants no hosted Plan database writes \u2014 no DB writes, no Plan MCP\npublish, fully local/offline/private recaps, or `AGENT_NATIVE_PLANS_MODE=local-files`\n\u2014 do not call any hosted Plan tool except the schema-only `get-plan-blocks`\ncatalog lookup. Read the diff with the local `recap collect-diff` / `scan` /\n`build-prompt --local-files` helpers, author a local MDX folder (set\n`kind: \"recap\"` and `localOnly: true`), and preview it with `plan local check`,\n`plan local serve --kind recap`, and `plan local verify --kind recap`. Before\nusing local-files mode, READ `references/local-files.md` in this skill directory\n\u2014 it is the single source of truth for the full contract.\n\n## When To Use\n\nBuild a recap when a PR or commit is large, multi-file, or touches schema, API\ncontracts, or architecture, and a reviewer would benefit from seeing the change\nmapped to structured blocks before reading the raw diff. A GitHub Action can\ngenerate one automatically from a PR diff; an agent can generate one on request\n(\"recap this PR\", \"show me what this branch changed\"). Skip it for small,\nsingle-file, or obvious diffs \u2014 a recap is review overhead, and a tiny change\nreviews faster as plain diff.\n\n## Recap The Whole Work Unit\n\nWhen `/visual-recap` is invoked in a chat thread after work has already happened,\nthe default scope is the whole current work unit/thread, not only the most recent\nuser message, tool action, or follow-up fix. Gather the thread-owned changes\nacross the conversation: original implementation work, later bug fixes, UI\nfollow-ups, tests, changesets, skill/instruction updates, generated plan/source\nartifacts, and any local import/linking fixes needed to make the recap open.\n\nUse the current diff plus conversation context to separate thread-owned changes\nfrom unrelated dirty work that existed before the thread. Exclude unrelated\npre-existing edits. If the scope is genuinely ambiguous and cannot be inferred,\nstate the assumption or ask a concise question before publishing.\n\nWhen updating an existing recap after feedback, revise the recap so it still\ncovers the whole thread/work unit plus the new correction. Do not replace a broad\nrecap with a narrow recap of only the latest feedback unless the user explicitly\nasks for that narrower scope.\n\n## Keep The Recap Body Lean\n\nDo not add boilerplate intro, disclaimer, provenance, or summary prose blocks to\nthe generated plan body. In particular, do not create a `rich-text` block just to\nsay the recap is an aid, that the reviewer should still review the diff, how many\nfiles changed, or which ref/working tree generated the recap. The plan title,\nbrief, and `file-tree` (which carries the per-file change stats) already carry\nthat context.\n\nOnly add prose blocks when they tell the reviewer something specific about the\nchange that the structured blocks do not: the objective, a real compatibility\nrisk, an important decision visible in the diff, or a grounded review note.\n\n## Recaps Must Be Substantial\n\nLean is not the same as thin. A recap is not a single wireframe plus one\nsentence \u2014 that under-serves the reviewer as much as boilerplate prose over-serves\nthem. Alongside the visual/structural headline (wireframes, `data-model`,\n`api-endpoint`, `diagram`), a substantial recap also carries the implementation\nevidence:\n\n- A short surface/state inventory before authoring: list the changed routes,\n components, popovers/dialogs, role/access states, empty/error states, and\n shared abstractions visible in the diff. The final recap must either represent\n each meaningful item with a block or intentionally omit it because it is tiny,\n redundant, or not user-visible.\n- A `file-tree` of the changed files with each entry's `change` flag, so the\n reviewer sees the footprint of the work at a glance.\n- The split `diff` of the KEY changed files, grouped under a `## Key changes`\n `rich-text` heading in a single horizontal `tabs` block (the default\n orientation, one file per tab), with a one-line `summary` and a few\n `annotations` on each \u2014 so the reviewer can drop from the high-altitude shape\n straight into the load-bearing code. Use horizontal file tabs, not a vertical\n side rail, so the selected file has enough width for the side-by-side diff.\n\nSkip the diff appendix only for a genuinely tiny change that reviews faster as\nplain diff (see \"When To Use\"); for any change worth recapping, the file-tree and\nkey-change diffs belong in the plan.\n\n## Canonical Shape And Budgets\n\nA strong recap follows one skeleton, top to bottom:\n\n1. UI-impact headline \u2014 wireframes first, when the diff changed rendered UI.\n2. Short outcome narrative (`rich-text`): what changed and why, 1-3 paragraphs.\n3. `data-model` / `api-endpoint` blocks for schema and contract changes.\n4. `file-tree` of the changed files with `change` flags.\n5. `## Key changes` \u2014 one horizontal `tabs` block of `diff` / `annotated-code`.\n\nBudgets that keep the recap reviewable:\n\n- 3-8 key-change tabs. Fewer than 3 on a large change under-serves the\n reviewer; more than 8 stops being a summary.\n- Keep each diff/annotated-code excerpt focused \u2014 prefer under ~150 lines per\n tab; summarize or link the rest of a long file instead of dumping it.\n- Title at most ~70 characters; brief 1-3 sentences.\n\n**GOOD.** A 25-file auth change: Before/After wireframes of the login surface,\na two-paragraph narrative, a diff-aware `data-model` of the sessions table, an\n`api-endpoint` for the new refresh route, a `file-tree` with change flags, and\n`## Key changes` with five focused tabs, each with a one-line `summary` and a\nfew annotations on the load-bearing hunks.\n\n**BAD.** One giant unsegmented diff dump with no summaries or annotations; or a\nsparse three-block recap of a 40-file change (one wireframe, one sentence, one\nfile list) that forces the reviewer back into the raw diff anyway.\n\n## UI Impact Needs Wireframes\n\nWhen the diff changes rendered UI, layout, density, visual state, interaction\naffordances, navigation, controls, menus, dialogs, or design tokens, the recap\nMUST include one or more wireframes. Prose and file diffs are not a substitute\nfor showing what changed visually.\n\nBefore choosing wireframes, make a UI coverage pass from the diff:\n\n- Identify the entry surface where the change appears, such as a page header,\n list row, toolbar, route shell, or menu trigger.\n- Identify the interaction surface that opens or changes, such as a popover,\n dialog, tab, sheet, dropdown, inline editor, or toast.\n- Identify the resulting destination or persistent state, such as a public page,\n read-only view, empty state, error state, loading state, permission-denied\n state, or saved/shared state.\n- Identify access or role variants when permissions change. Owner/admin/editor\n versus viewer/non-manager differences are visual behavior and need a compact\n matrix, paired wireframes, or clearly labeled state sequence.\n\nFor UI-heavy PRs, a single before/after of the entry surface is not enough.\nShow the changed entry point, the main changed interaction surface, and the\nresulting/destination state. Add more states when the diff adds tabs, role-based\ncontrols, public/private visibility, invite/manage flows, destructive controls,\nor empty/error branches.\n\nChoose the smallest visual surface that makes the review clear:\n\n- Use a `Before` / `After` wireframe pair when the reviewer benefits from direct\n comparison, such as a removed or added control, a changed state, layout\n density, ordering, navigation, or a visible component replacement.\n `references/wireframe.md` owns how to lay that pair out (columns vs.\n vertical stack by geometry).\n- Use an after-only wireframe when the change is purely additive or the \"before\"\n state would only show absence without adding review value.\n- Use more than two wireframes when the UI change is flow-dependent, responsive,\n or stateful; show the meaningful states in order instead of forcing a single\n before/after pair.\n- For tiny surfaces like menus, popovers, dialogs, toasts, or panels, use the\n matching `surface` (`popover`, `panel`, etc.) and show the focused sub-surface.\n Do not redraw a full page unless placement in the page is itself part of the\n change.\n\nGround each wireframe in the changed UI behavior, component names, file paths,\nand diff-visible labels/states. If exact pixels are inferred rather than\ncaptured, say so in the wireframe caption or a concise annotation. For\nlocal/manual recaps, import or update the plan source that holds the wireframes\nso the rendered recap opens with the UI visual available.\n\n## Wireframe Quality \u2014 read `references/wireframe.md`\n\nUI recap/plan wireframes must meet a strict quality bar \u2014 full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font\ntags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ\n`references/wireframe.md` in this skill directory \u2014 it is the single source of\ntruth for HTML wireframe quality, shared word for word with `/visual-plan`\nand `/visual-recap`. Do not author wireframes from memory.\n\nUse the standard `WireframeBlock` / `<Screen>` format so the Plan viewer owns the\nsurface frame, theme, and sketchy/clean toggle. HTML wireframes are appropriate\nwhen placement precision matters, especially popovers, menus, dialogs, and dense\nforms. For HTML\nwireframes, keep `renderMode` unset or `wireframe` unless a design-only editable\nmockup is explicitly required, because `renderMode=\"design\"` disables the\nsketchy rough overlay.\n\nWhen a browser tool is available, render a UI-impact recap in the Plan viewer\nand visually inspect it at the current theme before sharing. If any label,\nannotation, toolbar, or wireframe content overlaps another element, fix the MDX\nand re-import before reporting the link. A text-match screenshot is not enough;\nvisually inspect the captured image. When no browser is available (for example\na headless CI agent), state that in the recap handoff instead.\n\n## Top Canvas Recaps \u2014 read `../visual-plan/references/canvas.md`\n\nWhen a recap includes a top canvas, storyboard, or flow view, READ\n`../visual-plan/references/canvas.md` before authoring `canvas.mdx`. Recap\ncanvas artboards must use the same HTML wireframe path as good document-body\nwireframes: `<Screen surface=\"...\" html={...} />` with a semantic HTML fragment.\nDo not author fresh kit-tree children such as `<FrameScreen>`, `<Card>`,\n`<Row>`, `<Title>`, or `<Btn>` inside canvas `<Screen>` tags. Those components\nare legacy compatibility markup for old plans; in new canvas storyboards they\ncan produce cramped or overlapping layouts even when the inline body wireframe\nlooks good. If a canvas mockup looks worse than the same screen below the fold,\nassume it used the legacy kit path and replace it with an HTML screen.\n\n## Open And Report The Recap\n\nIn local-files privacy mode, run `plan local check` first, then report the local\nbridge URL from\n`npx @agent-native/core@latest plan local serve --dir <plan-dir> --kind recap --open`\nor from `<plan-dir>/.plan-url`. It opens the hosted Plan UI but reads from the\nlocalhost bridge on this machine, so it is not shareable across machines. If the\nPlan app itself is running locally with the same `PLAN_LOCAL_DIR`, the\n`/local-plans/<slug>` route is also valid. Do not invent a hosted database URL\nand do not publish just to get an absolute Plan link.\n\nAfter creating the recap, link the reviewer to the rendered plan with an\n**absolute URL on the origin whose database actually holds the plan**. That\norigin is the Plan MCP server you just created the recap through \u2014 NOT whatever\ndev server you happen to know is running. The create tool returns the correct\nlink; report THAT. Never make the primary link a local `plan.mdx` file, a local\nmirror folder, or a relative path such as `/plans/<id>`.\n\nWhen the recap is posted to a PR for a private repo, the plan link is not a\npublic URL. Make the PR comment/handoff copy explicit: reviewers may need to\nsign in to Agent-Native Plans with an account that has access to the owning\norganization before the link loads. Use wording like: \"Private repo recap:\nsign in with access to this org if the plan does not open.\" Do not imply the\nlink is broken or public when access is gated by repo/org visibility.\n\nA recap lives only in the database of the MCP that created it. A separately\nrunning local dev server (e.g. `http://localhost:8081`) has its OWN database and\nwill NOT contain a recap created through the hosted MCP, so a hand-built\n`localhost` link returns \"Plan not found\". This is the most common recap\nmistake \u2014 do not guess an origin you have not confirmed shares the MCP's data.\n\nResolve the URL in this order:\n\n1. Use the absolute URL the create tool RETURNS \u2014 `openLink.webUrl`, else the\n `visualUrl` in the returned `plan.mdx` frontmatter, else `url`/`path`\n resolved against the MCP server's own origin (for the hosted MCP that is\n `https://plan.agent-native.com`). This always points at the database that has\n the plan.\n2. Use a `localhost`/dev origin ONLY when the recap was created through a Plan\n MCP bound to that same origin \u2014 i.e. that MCP's url is\n `http://localhost:<port>/mcp`. Creating through the hosted MCP\n and linking to localhost is the exact mismatch that 404s.\n3. If only a plan id is available, build the MCP origin's absolute URL\n (hosted: `https://plan.agent-native.com/plans/<id>`) and say it was inferred.\n\nIf the user wants to review on localhost but the recap was created through the\nhosted MCP, say so plainly: the local dev server cannot see it. To view a recap\non localhost (e.g. to exercise un-deployed local renderer changes), they must\nconnect a LOCAL Plan MCP (`http://localhost:<port>/mcp`) and\nre-create the recap through it so it lands in the local database; offer to do\nthat rather than handing over a localhost URL that will not resolve.\n\nWhen running in Codex and the Browser/in-app side browser tools are available,\nopen the returned absolute recap URL there automatically after creation. Still\ninclude the same absolute URL in the final response. Local mirror files like\n`plans/<slug>/plan.mdx` may be mentioned only as secondary source-control\nartifacts, not as the main way to open the recap.\n\n## Diff \u2192 Block Mapping\n\nMap each kind of change to the block that carries it, derived mechanically from\nthe actual diff. The names below are the CONCEPTUAL block types, not the JSX\ntags \u2014 resolve every conceptual name to its exact tag + prop schema with the\n`get-plan-blocks` tool (see \"Block reference\" below) before authoring.\n\n- **Schema / migration change** \u2192 `data-model` for the resulting entities,\n fields, and relations. Flag what moved per field/entity with\n `change: \"added\" | \"modified\" | \"removed\" | \"renamed\"`, and for a changed type\n set `was` to the prior value (e.g. the old column type) \u2014 grounded in the real\n migration diff. That diff-aware `data-model` is the headline; reach for a split\n `diff` of the literal SQL only when the exact statement still matters, not by\n default.\n- **API / action / route change** \u2192 `api-endpoint` with the method, path,\n params, request, and responses as they are after the change. Flag each changed\n param/response with `change` (and `was` on a param whose type/shape changed),\n and set `change` on the endpoint root for a wholly added or removed route. Mark\n removed endpoints with `deprecated: true` and explain in prose.\n Keep multiple API endpoints in the normal single-column document flow unless\n they are an explicit before/after contract comparison.\n Author each request/response example as a SINGLE valid JSON value \u2014 one\n top-level object or array, parseable on its own \u2014 so it renders in the\n collapsible JSON explorer. Do not put `//` or `/* */` comments, prose,\n trailing commas, or two or more concatenated top-level objects inside one\n example; a non-parseable body falls back to flat text and loses the explorer.\n When an endpoint has several distinct message shapes (for example separate\n websocket frame types, or a success body versus an error body), give each its\n OWN example with its own label rather than cramming them into one body.\n- **Compatibility-sensitive change** \u2192 short `rich-text` notes beside the\n relevant `data-model` / `api-endpoint` block. Name the changed field,\n endpoint, or behavior and mark whether it is breaking, risky, or non-breaking;\n pair that note with a split `diff` for the literal lines.\n- **Any meaningful code hunk** \u2192 `diff` with `mode: \"split\"`, carrying the real\n `before` / `after` text and the `filename` / `language`. Split mode is the\n default for recap code review because before/after legibility is the point;\n use `mode: \"unified\"` only for a genuinely narrow standalone hunk where\n side-by-side would hide the code. Give every `diff` a one-line `summary`\n saying what the hunk changes and why; it renders as a description above the\n code so the reviewer reads intent first. Never leave a diff unlabeled.\n For the KEY changed files, attach `annotations` to the `diff` so the recap\n calls out what each important hunk does \u2014 this is the headline affordance for\n annotating the key files updated. Each annotation anchors to the AFTER-side\n line numbers by default (set `side: \"before\"` to point at removed lines). Keep\n it to a few high-signal notes per file, not one per line.\n When several key files each need a substantial diff, introduce the group with a\n `rich-text` heading block whose markdown is `## Key changes`, then place the\n `diff` blocks under it in a reusable `tabs` block with horizontal orientation\n (the default \u2014 omit `orientation`) so the selected file's split diff gets the\n full document width. Let that heading label the section \u2014 do NOT also set a\n `title` on the `tabs` block. Keep each tab label to the file path or a short\n basename plus directory hint.\n The renderer's wide document layout is intentionally allowlisted: `diff`,\n `annotated-code`, vertical `tabs`, and `tabs` containing diff-like children\n break out wider than prose. Do not put API endpoints, OpenAPI specs, data\n models, JSON explorers, wireframes, question forms, or custom HTML into tabs\n merely to make them wide.\n If the recap ends with more than one supporting diff, that trailing diff\n appendix should be one horizontal `tabs` block under its own `## Key changes`\n heading, not a stack of separate `diff` blocks.\n- **Brand-new file or a substantial added block with no meaningful \"before\"** \u2192\n `annotated-code` rather than a one-sided split `diff`. Carry the real new code\n with its `filename` / `language` and anchor a few high-signal notes to the lines\n that matter so the reviewer reads what the new code does, not code for code's\n sake. Keep split `diff` for true before/after hunks where the removed lines\n still carry meaning, and group several annotated walkthroughs in a horizontal\n `tabs` block the same way diffs are grouped.\n- **Files added / removed / renamed** \u2192 `file-tree` with each entry's `change`\n flag (`added`, `removed`, `modified`, `renamed`) and a short `note`; attach a\n `snippet` only when one tells the reviewer something the path does not.\n- **Rendered UI / interaction change** \u2192 one or more wireframes showing the\n visible UI delta before the reviewer reads code. Use `Before` / `After`\n wireframes when the comparison clarifies the change; otherwise use after-only\n or a short state/flow sequence. Use realistic UI surfaces: for a popover\n change, show a popover with its title row, top-right actions, options/fields,\n tabs, selected/disabled states, people/lists/rows, and any opened prompt/menu\n anchored to the correct trigger. If a route was added, show the route body and\n the unavailable/empty state when the diff implements one. If permissions\n changed, show what managers can do and what viewers/non-managers see instead.\n Keep the body lean: the wireframe carries the UI story, while the file tree\n and `diff` blocks carry implementation evidence.\n- **Architecture or data-flow shift** \u2192 `diagram` with `data.html` / `data.css`\n as a two-panel before/after, layered, or swimlane layout, or `mermaid` for a\n quick graph. Use two-dimensional layouts; do not reduce a structural change to\n a left-to-right chain. Do not use `diagram` as a stand-in for rendered UI\n controls; UI changes need `wireframe` blocks.\n Author diagram HTML/CSS with the renderer-owned `.diagram-*` primitives\n (`.diagram-panel`, `.diagram-node`, `.diagram-pill`, `[data-rough]`, \u2026) and\n the same `--wf-*` theme tokens `references/wireframe.md` defines \u2014 never\n `font-family`, hex, rgb/hsl literals, or one-off dark/light palettes. Choose\n the outer `frame` intentionally: recap diagrams usually benefit from\n `frame: \"show\"` when they stand alone, but use `frame: \"hide\"` when columns,\n tabs, a card, or the diagram's own panels already provide the boundary.\n- **Outcome-first narrative** \u2192 `rich-text` for the \"what changed and why\" prose:\n the objective the diff served, the key decisions visible in it, and the risks a\n reviewer should weigh. This is the only place the model writes freely.\n\n## Block reference \u2014 call `get-plan-blocks`, do not memorize tags\n\nThe conceptual block names above (`api-endpoint`, `data-model`, `json-explorer`,\n`tabs`, \u2026) are NOT the JSX tags you author with, and the exact tags, required\nfields, and prop shapes change as the block library evolves. Do not author from\nmemorized tags \u2014 they drift and silently produce a wrong tag (`ApiEndpoint`\ninstead of `Endpoint`, `JsonExplorer` instead of `Json`, `Tabs` instead of\n`TabsBlock`) that errors on import.\n\n**Before writing any structured plan content, fetch/read the block catalog.** In\nhosted or self-hosted mode, call `get-plan-blocks` on the Plan MCP connector\n(`plan` or legacy `agent-native-plans`). If no Plan tools are visible yet in a\nlazy-loading client, search/load them through the host's tool discovery surface\nfirst (`tool_search` when available). In local-files mode, or when the skill was\ninstalled as plain text and no MCP tools are registered after discovery, run\n`npx @agent-native/core@latest plan blocks --out plan-blocks.md` and read that\nfile first. The CLI command calls the public no-auth `get-plan-blocks` route and\nsends no plan/recap content. If network access is unavailable, use the bundled\nreferences and validate with `plan local check`; run `plan local serve` only\nwhen the hosted Plan UI is reachable or a local Plan app is already running.\n\nThe catalog returns the authoritative, always-current block vocabulary generated\nlive from the app's own block registry \u2014 the same config the renderer and MDX\nround-trip use \u2014 so it can never be stale even if this SKILL.md is an old\ninstalled copy:\n\n- `get-plan-blocks` (default `format: \"reference\"`) \u2192 a compact table of every\n block's runtime `type`, exact MDX `<Tag>`, placement, and key data fields.\n This is your map from each conceptual name above to its real tag and props.\n- `get-plan-blocks` with `format: \"schema\"` \u2192 the full per-block JSON Schema\n plus a worked example for each block, when you need exact field types,\n enums, or nesting (e.g. `Diff.annotations`, `Endpoint.params[].in`,\n `DataModel.entities[].fields[]`).\n\nAuthor the recap source against the tags and schemas that call returns. The\ncomplete set of valid block-level tags is whatever `get-plan-blocks` lists;\nany other capitalized tag at the block level is rejected on import with an\n\"Unknown plan block\" / \"did you mean\" error. Lowercase HTML tags inside\n`rich-text`/markdown prose (`<div>`, `<span>`, `<code>`, `<br>`, \u2026) are always\nfine \u2014 only capitalized component-style block tags are validated.\n\nA few recap-specific authoring rules the registry table cannot encode:\n\n- Every structured block takes a REQUIRED `id` (unique across the whole plan)\n plus the shared optional `summary` / `editable` envelope. Ordinary top-level\n Markdown prose imports as rich-text automatically; use `<RichText id=\"...\">`\n only when prose needs explicit metadata or a preserved referenced block id.\n- Every capitalized block component must be self-closing (`<Diagram ... />`) or\n explicitly closed around children (`<RichText ...>...</RichText>`). Never\n leave a bare opening tag like `<RichText ...>` in a paragraph; MDX treats it\n as unclosed JSX and import fails before the recap can render.\n- Code-bearing blocks (`Code`, `AnnotatedCode`, and `Diff`) are\n whitespace-sensitive. Prefer the exact MDX form from the `get-plan-blocks`\n examples / source exporter, where multiline code is encoded as JSON string\n attributes such as `code={\"const x =\\n y\"}`. Static template literals are\n accepted only when they are static strings with no `${...}` interpolation.\n- `Endpoint`: prose `description` is the MDX **children** (body between the\n tags), not an attribute; for a WebSocket upgrade use `method=\"GET\"`. Each\n request/response `example` is a JSON **string** (the renderer parses it into\n the JSON explorer), so keep it a single parseable JSON value.\n- `TabsBlock`: the whole `tabs` array (including nested child blocks) is ONE\n JSON `tabs={[\u2026]}` prop \u2014 there is NO nested `<Tab>` element.\n- `WireframeBlock`: its body is a single `<Screen surface ... html=\u2026 />` subtree\n (nested MDX, not a flat prop); `html` must be a single-quoted string or static\n template literal, never a dynamic `html={someVar}` expression. See\n `references/wireframe.md` for the HTML rules.\n- `Diagram`: the whole payload is one `data={{ html?, css?, nodes?, edges?, \u2026 }}`\n attribute and requires either `html` or at least one node; `Mermaid` is its\n own separate block (`source` text), not a `Diagram` prop.\n\n## Before / After Is The Headline\n\nThe recap's center of gravity is the before/after comparison. For document-body\ncomparisons there are two primitives, and they cover the whole need together:\n\n- **`columns`** \u2014 the side-by-side container, for **structured** comparisons.\n Use two columns labeled `Before` and `After`, each holding a block (commonly a\n `data-model`, `api-endpoint`, or `rich-text`), so the reviewer reads the old\n shape against the new shape in one glance. This is the right primitive for\n \"the schema went from X to Y\" or \"the endpoint contract changed like this.\"\n Do not use `columns` simply to compact or group a list of API endpoints.\n- **`diff`** \u2014 for **code**. It renders the literal removed and added lines. Use\n it for the actual hunks. Use split mode by default for recap code review;\n reserve `mode: \"unified\"` for genuinely narrow standalone hunks where\n side-by-side would hide the code. Key-file diff groups should use horizontal\n tabs so split diffs get the full document width.\n\nFor UI diffs, wireframes are the visual comparison primitive. Use before/after\nwireframes when the comparison clarifies the change; use after-only or a state\nsequence when that better matches the change. The visual headline must show\nexact placement, realistic chrome, and adequate padding before any abstract\nexplanation. Do not stop at the first visible affordance when the diff adds a\nflow; show the entry point, the opened surface, and the resulting state or page\nso the reviewer can trace the actual user path. `references/wireframe.md` owns\nthe before/after layout choice \u2014\nthe `columns` renderer keeps narrow surfaces side by side and auto-stacks wide\n`desktop`/`browser` frames vertically; never hand-build a side-by-side\nwireframe layout in `custom-html`. For document-body\ncomparisons, there is no other multi-column primitive \u2014 `columns` plus the\n`diff` block are the whole comparison vocabulary. Do not hand-build side-by-side\nlayouts in `custom-html`, and do not stack two `data-model` blocks vertically\nand call it a comparison when `columns` exists to put them side by side.\n\n## Grounding Rule\n\nStructured blocks are **true by construction** only if they are derived from the\nactual changed lines. The `diff`, `data-model`, `api-endpoint`, and `file-tree`\nblocks MUST be built mechanically from the real diff \u2014 real paths, real fields,\nreal method/path, real before/after text \u2014 never inferred, rounded, or invented.\nThe model writes only the prose: the \"why\", the narrative, the risk read. A\nconfidently wrong recap is dangerous in a review context, because a reviewer who\ntrusts the summary may skip the very line the summary got wrong. When the diff\ndoes not contain a fact, leave it out rather than guess; mark anything the model\ninferred (not extracted) as inferred in prose.\n\n## Security\n\n- **Gate visibility.** Recaps of a private repo are org/login-gated \u2014 set the\n plan's visibility to the owning org or login, never auto-public. A recap can\n expose unreleased schema, internal endpoints, and architecture; treat it like\n the source it summarizes. Any PR comment or handoff that links to the recap\n must say that private-repo recaps require signing in with access to the owning\n org if the link does not load.\n- **Never transcribe secrets.** A diff can contain API keys, tokens, webhook\n URLs, signing secrets, `.env` values, or credential-looking literals. Do not\n copy any of these into a `diff`, `file-tree` snippet, `api-endpoint`, or prose\n block \u2014 redact them (`sk-\u2022\u2022\u2022`, `<redacted>`). This mirrors the repo's\n hardcoded-secret rule: obviously fake placeholders only, never the real value,\n in any block, caption, or note.\n\n## Bidirectional Loop\n\nIn hosted mode, because a recap is a real, editable plan, the same review loop\nas forward plans applies: a reviewer can annotate any block, and the coding\nagent reads `get-plan-feedback` to drive fixes back into the code \u2014 annotation \u2192\nagent \u2192 diff, the same close-the-loop flow forward plans use. After a reviewer\nannotates a block, call `get-plan-feedback` to read the structured feedback,\nthen either update the recap with `create-visual-recap` (passing the existing\n`planId` to replace it in place) or apply targeted changes with\n`update-visual-plan`. The loop is live and wired. In local-files privacy mode,\ndo not call those hosted tools; read review notes from chat or local files, edit\n`<plan-dir>/*.mdx` directly, and rerun `plan local check`, `serve`, or `verify`\nfor `<plan-dir>`. The one thing not yet automatic is PR-comment-triggered\nre-runs: the GitHub Action creates an initial recap per PR, but it does not yet\nre-run automatically when new review feedback is posted in GitHub \u2014 that\nauto-re-run is the remaining fast-follow.\n\n## Related Skills\n\n- **visual-plan** \u2014 the canonical command and the source of the shared Wireframe\n & Canvas and Document Quality cores; a recap follows the same block discipline\n in reverse.\n- **comment anchors** \u2014 recap comments use the same anchor rules as forward\n plans; see \"Interpreting comment anchors\" in the visual-plan skill for\n coordinate frames, wireframe node ids, text-quote resolution, detached\n threads, routing via `resolutionTarget`, and two-axis consumed/resolved state.\n- **security** \u2014 data scoping, secret handling, and the hardcoded-secret rule the\n recap's redaction and visibility gating mirror.\n- **sharing** \u2014 org/login-gated visibility for the plan that holds the recap.\n";
|
|
1
|
+
export declare const VISUAL_RECAP_SKILL_MD = "---\nname: visual-recap\ndescription: >-\n Turn a PR, branch, commit, or git diff into an interactive visual recap with\n diagrams, file maps, API/schema summaries, annotated diffs, and focused review\n notes.\nmetadata:\n visibility: exported\n---\n\n# Visual Recap\n\n`/visual-recap` creates a visual plan built **from** a diff, not toward one. It\nis the reverse of forward planning: instead of describing the change you are\nabout to make, you describe the change that was just made, at a higher altitude\nthan line-by-line review. The same plan data model serves both directions \u2014\nschema, API, file, and architecture changes become the same `data-model`,\n`api-endpoint`, `file-tree`, and `diagram` blocks a forward plan would use, only\nnow they summarize work that exists. A reviewer scans the shape of the change\nbefore spending attention on the literal lines.\n\n## Publish As An Agent-Native Plan \u2014 Never Inline\n\nThe deliverable is ALWAYS a published Agent-Native Plan, created with\n`create-visual-recap` on the Plan MCP connector \u2014 NEVER inline chat content (not\nMarkdown prose, an ASCII sketch, a table, a fenced \"wireframe\", or a \"here's the\nrecap\" summary). A recap's entire value is the hosted, interactive, annotatable\nplan; an inline summary is not a degraded recap, it is the thing a recap\nreplaces. If the `plan` (or legacy `agent-native-plans`) tools are not visible,\ndiscover them through the host's `tool_search` first; if they are still missing,\nSTOP and give the user the client-specific reconnect step rather than improvising\nan inline recap. Before publishing, or whenever a connector or auth error\nappears, READ `references/connection.md` in this skill directory \u2014 it is the\nsingle source of truth for the never-inline rule, connector discovery, and the\nper-client reconnect steps. Local-files privacy mode (below) is the one\nexception.\n\n## Local-Files Privacy Mode \u2014 read `references/local-files.md`\n\nWhen the user wants no hosted Plan database writes \u2014 no DB writes, no Plan MCP\npublish, fully local/offline/private recaps, or `AGENT_NATIVE_PLANS_MODE=local-files`\n\u2014 do not call any hosted Plan tool except the schema-only `get-plan-blocks`\ncatalog lookup. Read the diff with the local `recap collect-diff` / `scan` /\n`build-prompt --local-files` helpers, author a local MDX folder (set\n`kind: \"recap\"` and `localOnly: true`), and preview it with `plan local check`,\n`plan local serve --kind recap`, and `plan local verify --kind recap`. Before\nusing local-files mode, READ `references/local-files.md` in this skill directory\n\u2014 it is the single source of truth for the full contract.\n\n## When To Use\n\nBuild a recap when a PR or commit is large, multi-file, or touches schema, API\ncontracts, or architecture, and a reviewer would benefit from seeing the change\nmapped to structured blocks before reading the raw diff. A GitHub Action can\ngenerate one automatically from a PR diff; an agent can generate one on request\n(\"recap this PR\", \"show me what this branch changed\"). Skip it for small,\nsingle-file, or obvious diffs \u2014 a recap is review overhead, and a tiny change\nreviews faster as plain diff.\n\n## Recap The Whole Work Unit\n\nWhen `/visual-recap` is invoked in a chat thread after work has already happened,\nthe default scope is the whole current work unit/thread, not only the most recent\nuser message, tool action, or follow-up fix. Gather the thread-owned changes\nacross the conversation: original implementation work, later bug fixes, UI\nfollow-ups, tests, changesets, skill/instruction updates, generated plan/source\nartifacts, and any local import/linking fixes needed to make the recap open.\n\nUse the current diff plus conversation context to separate thread-owned changes\nfrom unrelated dirty work that existed before the thread. Exclude unrelated\npre-existing edits. If the scope is genuinely ambiguous and cannot be inferred,\nstate the assumption or ask a concise question before publishing.\n\nWhen updating an existing recap after feedback, revise the recap so it still\ncovers the whole thread/work unit plus the new correction. Do not replace a broad\nrecap with a narrow recap of only the latest feedback unless the user explicitly\nasks for that narrower scope.\n\n## Keep The Recap Body Lean\n\nDo not add boilerplate intro, disclaimer, provenance, or summary prose blocks to\nthe generated plan body. In particular, do not create a `rich-text` block just to\nsay the recap is an aid, that the reviewer should still review the diff, how many\nfiles changed, or which ref/working tree generated the recap. The plan title,\nbrief, and `file-tree` (which carries the per-file change stats) already carry\nthat context.\n\nOnly add prose blocks when they tell the reviewer something specific about the\nchange that the structured blocks do not: the objective, a real compatibility\nrisk, an important decision visible in the diff, or a grounded review note.\n\n## Recaps Must Be Substantial\n\nLean is not the same as thin. A recap is not a single wireframe plus one\nsentence \u2014 that under-serves the reviewer as much as boilerplate prose over-serves\nthem. Alongside the visual/structural headline (wireframes, `data-model`,\n`api-endpoint`, `diagram`), a substantial recap also carries the implementation\nevidence:\n\n- A short surface/state inventory before authoring: list the changed routes,\n components, popovers/dialogs, role/access states, empty/error states, and\n shared abstractions visible in the diff. The final recap must either represent\n each meaningful item with a block or intentionally omit it because it is tiny,\n redundant, or not user-visible.\n- A `file-tree` of the changed files with each entry's `change` flag, so the\n reviewer sees the footprint of the work at a glance.\n- The split `diff` of the KEY changed files, grouped under a `## Key changes`\n `rich-text` heading in a single horizontal `tabs` block (the default\n orientation, one file per tab), with a one-line `summary` and a few\n `annotations` on each \u2014 so the reviewer can drop from the high-altitude shape\n straight into the load-bearing code. Use horizontal file tabs, not a vertical\n side rail, so the selected file has enough width for the side-by-side diff.\n\nSkip the diff appendix only for a genuinely tiny change that reviews faster as\nplain diff (see \"When To Use\"); for any change worth recapping, the file-tree and\nkey-change diffs belong in the plan.\n\n## Canonical Shape And Budgets\n\nA strong recap follows one skeleton, top to bottom:\n\n1. UI-impact headline \u2014 wireframes first, when the diff changed rendered UI.\n2. Short outcome narrative (`rich-text`): what changed and why, 1-3 paragraphs.\n3. `data-model` / `api-endpoint` blocks for schema and contract changes.\n4. `file-tree` of the changed files with `change` flags.\n5. `## Key changes` \u2014 one horizontal `tabs` block of `diff` / `annotated-code`.\n\nBudgets that keep the recap reviewable:\n\n- 3-8 key-change tabs. Fewer than 3 on a large change under-serves the\n reviewer; more than 8 stops being a summary.\n- Keep each diff/annotated-code excerpt focused \u2014 prefer under ~150 lines per\n tab; summarize or link the rest of a long file instead of dumping it.\n- Title at most ~70 characters; brief 1-3 sentences.\n\nThese budgets are also the cost ceiling: do not exceed them in the name of\nthoroughness, and do not re-read the full diff after the initial sequential\npass \u2014 work from the notes taken during that pass.\n\n**GOOD.** A 25-file auth change: Before/After wireframes of the login surface,\na two-paragraph narrative, a diff-aware `data-model` of the sessions table, an\n`api-endpoint` for the new refresh route, a `file-tree` with change flags, and\n`## Key changes` with five focused tabs, each with a one-line `summary` and a\nfew annotations on the load-bearing hunks.\n\n**BAD.** One giant unsegmented diff dump with no summaries or annotations; or a\nsparse three-block recap of a 40-file change (one wireframe, one sentence, one\nfile list) that forces the reviewer back into the raw diff anyway.\n\n## UI Impact Needs Wireframes\n\nWhen the diff changes rendered UI, layout, density, visual state, interaction\naffordances, navigation, controls, menus, dialogs, or design tokens, the recap\nMUST include one or more wireframes. Prose and file diffs are not a substitute\nfor showing what changed visually.\n\nBefore choosing wireframes, make a UI coverage pass from the diff:\n\n- Identify the entry surface where the change appears, such as a page header,\n list row, toolbar, route shell, or menu trigger.\n- Identify the interaction surface that opens or changes, such as a popover,\n dialog, tab, sheet, dropdown, inline editor, or toast.\n- Identify the resulting destination or persistent state, such as a public page,\n read-only view, empty state, error state, loading state, permission-denied\n state, or saved/shared state.\n- Identify access or role variants when permissions change. Owner/admin/editor\n versus viewer/non-manager differences are visual behavior and need a compact\n matrix, paired wireframes, or clearly labeled state sequence.\n\nFor UI-heavy PRs, a single before/after of the entry surface is not enough.\nShow the changed entry point, the main changed interaction surface, and the\nresulting/destination state. Add more states when the diff adds tabs, role-based\ncontrols, public/private visibility, invite/manage flows, destructive controls,\nor empty/error branches.\n\nChoose the smallest visual surface that makes the review clear:\n\n- Use a `Before` / `After` wireframe pair when the reviewer benefits from direct\n comparison, such as a removed or added control, a changed state, layout\n density, ordering, navigation, or a visible component replacement.\n `references/wireframe.md` owns how to lay that pair out (columns vs.\n vertical stack by geometry).\n- Use an after-only wireframe when the change is purely additive or the \"before\"\n state would only show absence without adding review value.\n- Use more than two wireframes when the UI change is flow-dependent, responsive,\n or stateful; show the meaningful states in order instead of forcing a single\n before/after pair.\n- For tiny surfaces like menus, popovers, dialogs, toasts, or panels, use the\n matching `surface` (`popover`, `panel`, etc.) and show the focused sub-surface.\n Do not redraw a full page unless placement in the page is itself part of the\n change.\n\nGround each wireframe in the changed UI behavior, component names, file paths,\nand diff-visible labels/states. If exact pixels are inferred rather than\ncaptured, say so in the wireframe caption or a concise annotation. For\nlocal/manual recaps, import or update the plan source that holds the wireframes\nso the rendered recap opens with the UI visual available.\n\n## Wireframe Quality \u2014 read `references/wireframe.md`\n\nUI recap/plan wireframes must meet a strict quality bar \u2014 full-width chrome,\npinned bottom bars, real product content, before/after comparability, the right\n`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font\ntags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ\n`references/wireframe.md` in this skill directory \u2014 it is the single source of\ntruth for HTML wireframe quality, shared word for word with `/visual-plan`\nand `/visual-recap`. Do not author wireframes from memory.\n\nUse the standard `WireframeBlock` / `<Screen>` format so the Plan viewer owns the\nsurface frame, theme, and sketchy/clean toggle. HTML wireframes are appropriate\nwhen placement precision matters, especially popovers, menus, dialogs, and dense\nforms. For HTML\nwireframes, keep `renderMode` unset or `wireframe` unless a design-only editable\nmockup is explicitly required, because `renderMode=\"design\"` disables the\nsketchy rough overlay.\n\nWhen a browser tool is available, render a UI-impact recap in the Plan viewer\nand visually inspect it at the current theme before sharing. If any label,\nannotation, toolbar, or wireframe content overlaps another element, fix the MDX\nand re-import before reporting the link. Limit this to one render-and-inspect\npass plus at most one fix-and-re-render; do not keep iterating beyond that\nunless the user explicitly asks. A text-match screenshot is not enough;\nvisually inspect the captured image. When no browser is available (for example\na headless CI agent), state that in the recap handoff instead.\n\n## Top Canvas Recaps \u2014 read `../visual-plan/references/canvas.md`\n\nWhen a recap includes a top canvas, storyboard, or flow view, READ\n`../visual-plan/references/canvas.md` before authoring `canvas.mdx`. Recap\ncanvas artboards must use the same HTML wireframe path as good document-body\nwireframes: `<Screen surface=\"...\" html={...} />` with a semantic HTML fragment.\nDo not author fresh kit-tree children such as `<FrameScreen>`, `<Card>`,\n`<Row>`, `<Title>`, or `<Btn>` inside canvas `<Screen>` tags. Those components\nare legacy compatibility markup for old plans; in new canvas storyboards they\ncan produce cramped or overlapping layouts even when the inline body wireframe\nlooks good. If a canvas mockup looks worse than the same screen below the fold,\nassume it used the legacy kit path and replace it with an HTML screen.\n\n## Open And Report The Recap\n\nIn local-files privacy mode, run `plan local check` first, then report the local\nbridge URL from\n`npx @agent-native/core@latest plan local serve --dir <plan-dir> --kind recap --open`\nor from `<plan-dir>/.plan-url`. It opens the hosted Plan UI but reads from the\nlocalhost bridge on this machine, so it is not shareable across machines. If the\nPlan app itself is running locally with the same `PLAN_LOCAL_DIR`, the\n`/local-plans/<slug>` route is also valid. Do not invent a hosted database URL\nand do not publish just to get an absolute Plan link.\n\nAfter creating the recap, link the reviewer to the rendered plan with an\n**absolute URL on the origin whose database actually holds the plan**. That\norigin is the Plan MCP server you just created the recap through \u2014 NOT whatever\ndev server you happen to know is running. The create tool returns the correct\nlink; report THAT. Never make the primary link a local `plan.mdx` file, a local\nmirror folder, or a relative path such as `/plans/<id>`.\n\nWhen the recap is posted to a PR for a private repo, the plan link is not a\npublic URL. Make the PR comment/handoff copy explicit: reviewers may need to\nsign in to Agent-Native Plans with an account that has access to the owning\norganization before the link loads. Use wording like: \"Private repo recap:\nsign in with access to this org if the plan does not open.\" Do not imply the\nlink is broken or public when access is gated by repo/org visibility.\n\nA recap lives only in the database of the MCP that created it. A separately\nrunning local dev server (e.g. `http://localhost:8081`) has its OWN database and\nwill NOT contain a recap created through the hosted MCP, so a hand-built\n`localhost` link returns \"Plan not found\". This is the most common recap\nmistake \u2014 do not guess an origin you have not confirmed shares the MCP's data.\n\nResolve the URL in this order:\n\n1. Use the absolute URL the create tool RETURNS \u2014 `openLink.webUrl`, else the\n `visualUrl` in the returned `plan.mdx` frontmatter, else `url`/`path`\n resolved against the MCP server's own origin (for the hosted MCP that is\n `https://plan.agent-native.com`). This always points at the database that has\n the plan.\n2. Use a `localhost`/dev origin ONLY when the recap was created through a Plan\n MCP bound to that same origin \u2014 i.e. that MCP's url is\n `http://localhost:<port>/mcp`. Creating through the hosted MCP\n and linking to localhost is the exact mismatch that 404s.\n3. If only a plan id is available, build the MCP origin's absolute URL\n (hosted: `https://plan.agent-native.com/plans/<id>`) and say it was inferred.\n\nIf the user wants to review on localhost but the recap was created through the\nhosted MCP, say so plainly: the local dev server cannot see it. To view a recap\non localhost (e.g. to exercise un-deployed local renderer changes), they must\nconnect a LOCAL Plan MCP (`http://localhost:<port>/mcp`) and\nre-create the recap through it so it lands in the local database; offer to do\nthat rather than handing over a localhost URL that will not resolve.\n\nWhen running in Codex and the Browser/in-app side browser tools are available,\nopen the returned absolute recap URL there automatically after creation. Still\ninclude the same absolute URL in the final response. Local mirror files like\n`plans/<slug>/plan.mdx` may be mentioned only as secondary source-control\nartifacts, not as the main way to open the recap.\n\n## Diff \u2192 Block Mapping\n\nMap each kind of change to the block that carries it, derived mechanically from\nthe actual diff. The names below are the CONCEPTUAL block types, not the JSX\ntags \u2014 resolve every conceptual name to its exact tag + prop schema with the\n`get-plan-blocks` tool (see \"Block reference\" below) before authoring.\n\n- **Schema / migration change** \u2192 `data-model` for the resulting entities,\n fields, and relations. Flag what moved per field/entity with\n `change: \"added\" | \"modified\" | \"removed\" | \"renamed\"`, and for a changed type\n set `was` to the prior value (e.g. the old column type) \u2014 grounded in the real\n migration diff. That diff-aware `data-model` is the headline; reach for a split\n `diff` of the literal SQL only when the exact statement still matters, not by\n default.\n- **API / action / route change** \u2192 `api-endpoint` with the method, path,\n params, request, and responses as they are after the change. Flag each changed\n param/response with `change` (and `was` on a param whose type/shape changed),\n and set `change` on the endpoint root for a wholly added or removed route. Mark\n removed endpoints with `deprecated: true` and explain in prose.\n Keep multiple API endpoints in the normal single-column document flow unless\n they are an explicit before/after contract comparison.\n Author each request/response example as a SINGLE valid JSON value \u2014 one\n top-level object or array, parseable on its own \u2014 so it renders in the\n collapsible JSON explorer. Do not put `//` or `/* */` comments, prose,\n trailing commas, or two or more concatenated top-level objects inside one\n example; a non-parseable body falls back to flat text and loses the explorer.\n When an endpoint has several distinct message shapes (for example separate\n websocket frame types, or a success body versus an error body), give each its\n OWN example with its own label rather than cramming them into one body.\n- **Compatibility-sensitive change** \u2192 short `rich-text` notes beside the\n relevant `data-model` / `api-endpoint` block. Name the changed field,\n endpoint, or behavior and mark whether it is breaking, risky, or non-breaking;\n pair that note with a split `diff` for the literal lines.\n- **Any meaningful code hunk** \u2192 `diff` with `mode: \"split\"`, carrying the real\n `before` / `after` text and the `filename` / `language`. Split mode is the\n default for recap code review because before/after legibility is the point;\n use `mode: \"unified\"` only for a genuinely narrow standalone hunk where\n side-by-side would hide the code. Give every `diff` a one-line `summary`\n saying what the hunk changes and why; it renders as a description above the\n code so the reviewer reads intent first. Never leave a diff unlabeled.\n For the KEY changed files, attach `annotations` to the `diff` so the recap\n calls out what each important hunk does \u2014 this is the headline affordance for\n annotating the key files updated. Each annotation anchors to the AFTER-side\n line numbers by default (set `side: \"before\"` to point at removed lines). Keep\n it to a few high-signal notes per file, not one per line.\n When several key files each need a substantial diff, introduce the group with a\n `rich-text` heading block whose markdown is `## Key changes`, then place the\n `diff` blocks under it in a reusable `tabs` block with horizontal orientation\n (the default \u2014 omit `orientation`) so the selected file's split diff gets the\n full document width. Let that heading label the section \u2014 do NOT also set a\n `title` on the `tabs` block. Keep each tab label to the file path or a short\n basename plus directory hint.\n The renderer's wide document layout is intentionally allowlisted: `diff`,\n `annotated-code`, vertical `tabs`, and `tabs` containing diff-like children\n break out wider than prose. Do not put API endpoints, OpenAPI specs, data\n models, JSON explorers, wireframes, question forms, or custom HTML into tabs\n merely to make them wide.\n If the recap ends with more than one supporting diff, that trailing diff\n appendix should be one horizontal `tabs` block under its own `## Key changes`\n heading, not a stack of separate `diff` blocks.\n- **Brand-new file or a substantial added block with no meaningful \"before\"** \u2192\n `annotated-code` rather than a one-sided split `diff`. Carry the real new code\n with its `filename` / `language` and anchor a few high-signal notes to the lines\n that matter so the reviewer reads what the new code does, not code for code's\n sake. Keep split `diff` for true before/after hunks where the removed lines\n still carry meaning, and group several annotated walkthroughs in a horizontal\n `tabs` block the same way diffs are grouped.\n- **Files added / removed / renamed** \u2192 `file-tree` with each entry's `change`\n flag (`added`, `removed`, `modified`, `renamed`) and a short `note`; attach a\n `snippet` only when one tells the reviewer something the path does not.\n- **Rendered UI / interaction change** \u2192 one or more wireframes showing the\n visible UI delta before the reviewer reads code. Use `Before` / `After`\n wireframes when the comparison clarifies the change; otherwise use after-only\n or a short state/flow sequence. Use realistic UI surfaces: for a popover\n change, show a popover with its title row, top-right actions, options/fields,\n tabs, selected/disabled states, people/lists/rows, and any opened prompt/menu\n anchored to the correct trigger. If a route was added, show the route body and\n the unavailable/empty state when the diff implements one. If permissions\n changed, show what managers can do and what viewers/non-managers see instead.\n Keep the body lean: the wireframe carries the UI story, while the file tree\n and `diff` blocks carry implementation evidence.\n- **Architecture or data-flow shift** \u2192 `diagram` with `data.html` / `data.css`\n as a two-panel before/after, layered, or swimlane layout, or `mermaid` for a\n quick graph. Use two-dimensional layouts; do not reduce a structural change to\n a left-to-right chain. Do not use `diagram` as a stand-in for rendered UI\n controls; UI changes need `wireframe` blocks.\n Author diagram HTML/CSS with the renderer-owned `.diagram-*` primitives\n (`.diagram-panel`, `.diagram-node`, `.diagram-pill`, `[data-rough]`, \u2026) and\n the same `--wf-*` theme tokens `references/wireframe.md` defines \u2014 never\n `font-family`, hex, rgb/hsl literals, or one-off dark/light palettes. Choose\n the outer `frame` intentionally: recap diagrams usually benefit from\n `frame: \"show\"` when they stand alone, but use `frame: \"hide\"` when columns,\n tabs, a card, or the diagram's own panels already provide the boundary.\n- **Outcome-first narrative** \u2192 `rich-text` for the \"what changed and why\" prose:\n the objective the diff served, the key decisions visible in it, and the risks a\n reviewer should weigh. This is the only place the model writes freely.\n\n## Block reference \u2014 call `get-plan-blocks`, do not memorize tags\n\nThe conceptual block names above (`api-endpoint`, `data-model`, `json-explorer`,\n`tabs`, \u2026) are NOT the JSX tags you author with, and the exact tags, required\nfields, and prop shapes change as the block library evolves. Do not author from\nmemorized tags \u2014 they drift and silently produce a wrong tag (`ApiEndpoint`\ninstead of `Endpoint`, `JsonExplorer` instead of `Json`, `Tabs` instead of\n`TabsBlock`) that errors on import.\n\n**Before writing any structured plan content, fetch/read the block catalog.** In\nhosted or self-hosted mode, call `get-plan-blocks` on the Plan MCP connector\n(`plan` or legacy `agent-native-plans`). If no Plan tools are visible yet in a\nlazy-loading client, search/load them through the host's tool discovery surface\nfirst (`tool_search` when available). In local-files mode, or when the skill was\ninstalled as plain text and no MCP tools are registered after discovery, run\n`npx @agent-native/core@latest plan blocks --out plan-blocks.md` and read that\nfile first. The CLI command calls the public no-auth `get-plan-blocks` route and\nsends no plan/recap content. If network access is unavailable, use the bundled\nreferences and validate with `plan local check`; run `plan local serve` only\nwhen the hosted Plan UI is reachable or a local Plan app is already running.\n\nThe catalog returns the authoritative, always-current block vocabulary generated\nlive from the app's own block registry \u2014 the same config the renderer and MDX\nround-trip use \u2014 so it can never be stale even if this SKILL.md is an old\ninstalled copy:\n\n- `get-plan-blocks` (default `format: \"reference\"`) \u2192 a compact table of every\n block's runtime `type`, exact MDX `<Tag>`, placement, and key data fields.\n This is your map from each conceptual name above to its real tag and props.\n- `get-plan-blocks` with `format: \"schema\"` \u2192 the full per-block JSON Schema\n plus a worked example for each block, when you need exact field types,\n enums, or nesting (e.g. `Diff.annotations`, `Endpoint.params[].in`,\n `DataModel.entities[].fields[]`).\n\nAuthor the recap source against the tags and schemas that call returns. The\ncomplete set of valid block-level tags is whatever `get-plan-blocks` lists;\nany other capitalized tag at the block level is rejected on import with an\n\"Unknown plan block\" / \"did you mean\" error. Lowercase HTML tags inside\n`rich-text`/markdown prose (`<div>`, `<span>`, `<code>`, `<br>`, \u2026) are always\nfine \u2014 only capitalized component-style block tags are validated.\n\nA few recap-specific authoring rules the registry table cannot encode:\n\n- Every structured block takes a REQUIRED `id` (unique across the whole plan)\n plus the shared optional `summary` / `editable` envelope. Ordinary top-level\n Markdown prose imports as rich-text automatically; use `<RichText id=\"...\">`\n only when prose needs explicit metadata or a preserved referenced block id.\n- Every capitalized block component must be self-closing (`<Diagram ... />`) or\n explicitly closed around children (`<RichText ...>...</RichText>`). Never\n leave a bare opening tag like `<RichText ...>` in a paragraph; MDX treats it\n as unclosed JSX and import fails before the recap can render.\n- Code-bearing blocks (`Code`, `AnnotatedCode`, and `Diff`) are\n whitespace-sensitive. Prefer the exact MDX form from the `get-plan-blocks`\n examples / source exporter, where multiline code is encoded as JSON string\n attributes such as `code={\"const x =\\n y\"}`. Static template literals are\n accepted only when they are static strings with no `${...}` interpolation.\n- `Endpoint`: prose `description` is the MDX **children** (body between the\n tags), not an attribute; for a WebSocket upgrade use `method=\"GET\"`. Each\n request/response `example` is a JSON **string** (the renderer parses it into\n the JSON explorer), so keep it a single parseable JSON value.\n- `TabsBlock`: the whole `tabs` array (including nested child blocks) is ONE\n JSON `tabs={[\u2026]}` prop \u2014 there is NO nested `<Tab>` element.\n- `WireframeBlock`: its body is a single `<Screen surface ... html=\u2026 />` subtree\n (nested MDX, not a flat prop); `html` must be a single-quoted string or static\n template literal, never a dynamic `html={someVar}` expression. See\n `references/wireframe.md` for the HTML rules.\n- `Diagram`: the whole payload is one `data={{ html?, css?, nodes?, edges?, \u2026 }}`\n attribute and requires either `html` or at least one node; `Mermaid` is its\n own separate block (`source` text), not a `Diagram` prop.\n\n## Before / After Is The Headline\n\nThe recap's center of gravity is the before/after comparison. For document-body\ncomparisons there are two primitives, and they cover the whole need together:\n\n- **`columns`** \u2014 the side-by-side container, for **structured** comparisons.\n Use two columns labeled `Before` and `After`, each holding a block (commonly a\n `data-model`, `api-endpoint`, or `rich-text`), so the reviewer reads the old\n shape against the new shape in one glance. This is the right primitive for\n \"the schema went from X to Y\" or \"the endpoint contract changed like this.\"\n Do not use `columns` simply to compact or group a list of API endpoints.\n- **`diff`** \u2014 for **code**. It renders the literal removed and added lines. Use\n it for the actual hunks. Use split mode by default for recap code review;\n reserve `mode: \"unified\"` for genuinely narrow standalone hunks where\n side-by-side would hide the code. Key-file diff groups should use horizontal\n tabs so split diffs get the full document width.\n\nFor UI diffs, wireframes are the visual comparison primitive. Use before/after\nwireframes when the comparison clarifies the change; use after-only or a state\nsequence when that better matches the change. The visual headline must show\nexact placement, realistic chrome, and adequate padding before any abstract\nexplanation. Do not stop at the first visible affordance when the diff adds a\nflow; show the entry point, the opened surface, and the resulting state or page\nso the reviewer can trace the actual user path. `references/wireframe.md` owns\nthe before/after layout choice \u2014\nthe `columns` renderer keeps narrow surfaces side by side and auto-stacks wide\n`desktop`/`browser` frames vertically; never hand-build a side-by-side\nwireframe layout in `custom-html`. For document-body\ncomparisons, there is no other multi-column primitive \u2014 `columns` plus the\n`diff` block are the whole comparison vocabulary. Do not hand-build side-by-side\nlayouts in `custom-html`, and do not stack two `data-model` blocks vertically\nand call it a comparison when `columns` exists to put them side by side.\n\n## Grounding Rule\n\nStructured blocks are **true by construction** only if they are derived from the\nactual changed lines. The `diff`, `data-model`, `api-endpoint`, and `file-tree`\nblocks MUST be built mechanically from the real diff \u2014 real paths, real fields,\nreal method/path, real before/after text \u2014 never inferred, rounded, or invented.\nThe model writes only the prose: the \"why\", the narrative, the risk read. A\nconfidently wrong recap is dangerous in a review context, because a reviewer who\ntrusts the summary may skip the very line the summary got wrong. When the diff\ndoes not contain a fact, leave it out rather than guess; mark anything the model\ninferred (not extracted) as inferred in prose.\n\n## Security\n\n- **Gate visibility.** Recaps of a private repo are org/login-gated \u2014 set the\n plan's visibility to the owning org or login, never auto-public. A recap can\n expose unreleased schema, internal endpoints, and architecture; treat it like\n the source it summarizes. Any PR comment or handoff that links to the recap\n must say that private-repo recaps require signing in with access to the owning\n org if the link does not load.\n- **Never transcribe secrets.** A diff can contain API keys, tokens, webhook\n URLs, signing secrets, `.env` values, or credential-looking literals. Do not\n copy any of these into a `diff`, `file-tree` snippet, `api-endpoint`, or prose\n block \u2014 redact them (`sk-\u2022\u2022\u2022`, `<redacted>`). This mirrors the repo's\n hardcoded-secret rule: obviously fake placeholders only, never the real value,\n in any block, caption, or note.\n\n## Bidirectional Loop\n\nIn hosted mode, because a recap is a real, editable plan, the same review loop\nas forward plans applies: a reviewer can annotate any block, and the coding\nagent reads `get-plan-feedback` to drive fixes back into the code \u2014 annotation \u2192\nagent \u2192 diff, the same close-the-loop flow forward plans use. After a reviewer\nannotates a block, call `get-plan-feedback` to read the structured feedback,\nthen either update the recap with `create-visual-recap` (passing the existing\n`planId` to replace it in place) or apply targeted changes with\n`update-visual-plan`. The loop is live and wired. In local-files privacy mode,\ndo not call those hosted tools; read review notes from chat or local files, edit\n`<plan-dir>/*.mdx` directly, and rerun `plan local check`, `serve`, or `verify`\nfor `<plan-dir>`. The one thing not yet automatic is PR-comment-triggered\nre-runs: the GitHub Action creates an initial recap per PR, but it does not yet\nre-run automatically when new review feedback is posted in GitHub \u2014 that\nauto-re-run is the remaining fast-follow.\n\n## Related Skills\n\n- **visual-plan** \u2014 the canonical command and the source of the shared Wireframe\n & Canvas and Document Quality cores; a recap follows the same block discipline\n in reverse.\n- **comment anchors** \u2014 recap comments use the same anchor rules as forward\n plans; see \"Interpreting comment anchors\" in the visual-plan skill for\n coordinate frames, wireframe node ids, text-quote resolution, detached\n threads, routing via `resolutionTarget`, and two-axis consumed/resolved state.\n- **security** \u2014 data scoping, secret handling, and the hardcoded-secret rule the\n recap's redaction and visibility gating mirror.\n- **sharing** \u2014 org/login-gated visibility for the plan that holds the recap.\n";
|
|
2
2
|
//# sourceMappingURL=visual-recap-skill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-recap-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-recap-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"visual-recap-skill.d.ts","sourceRoot":"","sources":["../../../src/cli/skills-content/visual-recap-skill.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,kqjCAwiBjC,CAAC"}
|
|
@@ -133,6 +133,10 @@ Budgets that keep the recap reviewable:
|
|
|
133
133
|
tab; summarize or link the rest of a long file instead of dumping it.
|
|
134
134
|
- Title at most ~70 characters; brief 1-3 sentences.
|
|
135
135
|
|
|
136
|
+
These budgets are also the cost ceiling: do not exceed them in the name of
|
|
137
|
+
thoroughness, and do not re-read the full diff after the initial sequential
|
|
138
|
+
pass — work from the notes taken during that pass.
|
|
139
|
+
|
|
136
140
|
**GOOD.** A 25-file auth change: Before/After wireframes of the login surface,
|
|
137
141
|
a two-paragraph narrative, a diff-aware \`data-model\` of the sessions table, an
|
|
138
142
|
\`api-endpoint\` for the new refresh route, a \`file-tree\` with change flags, and
|
|
@@ -213,7 +217,9 @@ sketchy rough overlay.
|
|
|
213
217
|
When a browser tool is available, render a UI-impact recap in the Plan viewer
|
|
214
218
|
and visually inspect it at the current theme before sharing. If any label,
|
|
215
219
|
annotation, toolbar, or wireframe content overlaps another element, fix the MDX
|
|
216
|
-
and re-import before reporting the link.
|
|
220
|
+
and re-import before reporting the link. Limit this to one render-and-inspect
|
|
221
|
+
pass plus at most one fix-and-re-render; do not keep iterating beyond that
|
|
222
|
+
unless the user explicitly asks. A text-match screenshot is not enough;
|
|
217
223
|
visually inspect the captured image. When no browser is available (for example
|
|
218
224
|
a headless CI agent), state that in the recap handoff instead.
|
|
219
225
|
|