选项

visual-plan

BuilderIO/skills BuilderIO/skills

将文本方案转化为包含图表、代码片段以及供编码人员审阅的区域的交互式可视化文档。

...展开全部
1
更新时间 2026-09-06

基于代理的计划

“代理原生计划”是一种用于编写代理程序的结构化可视化规划模式。 构建 您通常用 Markdown 编写的计划,但将其呈现为可扫描的文档,其中 嵌入了可编辑的模块:内联图表、代码片段、 待解决的问题,以及可选的顶部可视化审查区域(线框图画布、实时 原型,或两者均以标签页形式显示)。架构和后端计划仅以文档形式存在; UI 和产品计划则以顶部的画布/原型为起点(“可视化表面 选择”部分负责该规则)。

/visual-plan 是打包后的命令及主要入口。 从任务中选择 审查模式:当工作主要涉及产品 UI 且审查 应从界面开始时选择“UI 优先”;当审查应从 功能性实时原型开始时选择“原型优先”;当审查需要全保真度的品牌化 界面时选择“设计优先”;或当用户明确要求在 规划前进行问卷调查时选择“视觉需求收集”。 当已存在 Codex、Claude Code、Markdown 或粘贴的计划时, /visual-plan 将该源计划作为起点,并基于此构建评审 界面,而非从头开始。

何时使用

只要方案作为可评审的 成果比聊天中的段落更合适,就应创建或调整可视化方案。 这包括诸如单个带有状态的 UI 界面、小型工作流、产品变更的“前后对比”,或 需要达成共识的组件/API/数据结构决策等规模较小的工作,以及涉及多文件、 模糊不清、长期运行、风险较高或 UI 内容繁重的大型工作。 当架构/ 数据流/UI方向/选项/待解决问题能从内联 图表或结构化模块中获益时,当用户需要在您实施前 对方向做出反馈时,或者当现有的文本计划需要更丰富的 审查界面时,请使用它。

规划纪律

  • 审慎地设置门槛。可视化方案提供更丰富的审查界面,而不仅仅是 大型项目的专用工具。当用户需要在编码前查看、比较、评论 或批准某个方向时,即使只是微小的 UI/状态/工作流 变更,也应使用它。 对于真正琐碎且毫无歧义的工作——如错别字、一行代码的修复、 一个定义明确的函数,以及任何能用一句话描述其差异的内容——请跳过此步骤, 直接进行修改。切勿用无用内容充斥方案,也切勿 提交仅包含单一步骤的方案。
  • 起草前先做调研。先阅读真实的文件、操作、模式和 模式;使用实际的文件、符号和数据结构名称,而不是 凭空杜撰。在提出端点之前先检查现有的 actions/ 内容后再提出端点,并优先 使用命名好的客户端辅助函数,而非直接进行原始数据提取。将广泛探索任务委托给子代理。 以复用为先:对于每个步骤,先说明它复用了什么——现有的操作、模式、 组件、辅助函数——再说明它新增了什么,这样计划就能阐明真正的新 增量,而不是重复描述已存在的内容。
  • 首先确定那些难以逆转的决策。对于非平凡的后端、数据或 API 工作,先勾勒出功能的整体方向,然后明确指出那些 一旦数据或调用方产生依赖便难以撤销的决策——数据格式、公共 ID、 数据模型结构、认证和所有权边界——并确保在计划中准确确定这些内容, 即使该功能的大部分内容将在后期发布。 然后将范围限定在能够 验证该方法且不预先排除其他可能性的最小初始版本上,明确说明哪些内容包含在内,哪些内容 被明确推迟。
  • 将示例保持在适当的抽象层次。当用户的构想涉及广泛的 框架、产品或运营模式变更时,不要将其简化为 他们提到的第一个具体示例、提供方或同步路径。 将核心 抽象与说明性示例及应用/提供商适配器区分开来。利用示例 使计划易于理解,但除非它们构成整个 请求范围,否则应明确标注为示例。
  • 发布独立的计划。如果用户粘贴、引用或已拥有 Codex / Claude Code / Markdown 计划,请将其视为源材料,但应将 发布的计划重写为简洁的独立提案。 保留源计划的 有用意图和代码库事实,将推断出的可视化内容标注为“推断”,并避免 使用诸如“保留先前计划”、“不要放弃旧 想法”、“与前一版本不同”或“此修订更改了……”等修订性措辞。 一位 从未看过聊天记录或早期草稿的读者也应能理解该方案。
  • 确保初次阅读时内容具体明确。如果该计划旨在与 聊天群组以外的人分享,或者概念较为抽象,请在模式表、架构或路线图之前, 在开头部分提供一个具体的产品示例。对于 具备 UI 功能的概念,这通常意味着在顶部画布展示一个应用状态,用 产品术语呈现真实的用户工作流。不要依赖仅在对话中才有 意义的短语,也不要把计划表述为“不是旧想法”;应 直接陈述积极的模型。
  • 规划文档为只读状态。在制定或审阅 计划时,请勿对源文件进行任何编辑。只有在用户批准方向后,才开始编辑。
  • 澄清与假设。不要询问如何构建——应在计划中探索并呈现 方法和选项。 仅当 存在可能改变设计且无法通过代码解决的歧义时,才提出澄清问题;使用 主机代理的常规“向用户提问”流程,并在最终确定前批量提出 2-4 个高杠杆 问题。不要调用 create-visual-questions 用于 常规澄清或预检;仅在用户明确要求使用可视化需求收集问卷时,才将其保留给 可视化需求收集模式。否则,应明确陈述 假设并继续推进,并将所有未解决的问题保留在计划的 底部 question-form “未决问题”块中。对于复杂计划,在移交前进行 一次最终的未决问题核查:如果某项决策会影响 架构、范围、用户体验、数据结构或部署,则应在计划中 给出决策及理由,或将其放入该底部表单并附上推荐的默认值。
  • 计划是审批关卡。提交计划后,请用户在编写代码前进行 审核并批准,并明确指出工作涉及的具体文件/区域。 提交计划并请求签字确认即为审批步骤——切勿另行询问 “这样看起来好吗?”之类的问题。
  • 文档才是权威来源,而非聊天记录。当范围发生变化时, 请通过 update-visual-plan ,而不是仅在 聊天中调整方向,并确保更新后的文档能够独立成文。切勿在计划文档内部将更新描述为 对先前草稿的更正。在执行重大步骤前,请重新阅读已获批准的 计划。

创建结构化的代理原生计划——切勿内联

交付成果必须始终是结构化的“代理原生计划”,而非仅限聊天记录的计划。 托管的 Plan MCP 连接器(plan 服务器,或旧版 agent-native-plans)是 默认的协作和评论平台;这不应成为以 外部依赖或租用层为由拒绝该规划模式的理由。计划是 可移植的源代码工件(plan.mdx,可选 canvas.mdx / prototype.mdx、JSON 和 HTML 导出),而涉及所有权的工作流可 采用本地文件模式或自托管/自定义计划应用 URL,同时仍能保持 技能的审核规范。切勿建议用户跳过 /visual-plan , 因为默认界面是托管式的;请根据用户的 所有权、隐私、共享和品牌需求选择合适的 Plan 模式。

默认情况下,应通过 Plan MCP 连接器创建计划,切勿将其作为 内联聊天内容传递——不得包含 Markdown 文本、ASCII 草图、表格或带围栏的 线框图。如果 plan (或旧版 agent-native-plans)工具不可见, 请通过主机的 tool_search 进行查找;若仍未找到, 请立即停止操作,并向用户提供针对特定客户端的重连步骤,而非即兴 创建内联方案。在发布之前,或每当出现连接器或身份验证错误时, 请阅读 references/connection.md 此技能目录——它是关于“绝不内联”规则、连接器发现以及针对各客户端的 重新连接步骤的唯一权威 来源。本地文件隐私模式(在“工具指南”之后)是例外情况。

核心工作流

本节描述了托管的 Plan MCP 默认工作流。如果 AGENT_NATIVE_PLANS_MODE=local-files 已启用该模式,或用户要求完全本地 文件/不进行托管 Plan 写入操作,请改用“本地文件隐私模式”;仅 沿用此处的代码研究和计划编制指南。

  1. 遵循主机代理的常规规划流程:检查代码库,在 必要时委托进行广泛探索,收集所需信息,并在生成计划前 根据需要提出原生澄清问题。 如果源计划 已存在,请从用户的粘贴内容、被引用的 文件或最近可见的代理上下文中获取其确切文本;切勿自行编造源文本。
  2. 调用 get-plan-blocks 以获取权威的代码块目录——切勿根据 记忆中的标签自行编写。随后调用与模式匹配的创建工具: create-visual-plan 对于“文档优先”的计划(架构、后端、数据、 重构、API), create-ui-plan 针对“UI优先”方案, create-prototype-plan 针对原型优先方案, create-plan-design 适用于设计优先方案, create-visual-questions 仅当用户明确要求填写可视化 需求问卷时才执行。当源计划已存在时, 将其作为 planText ,并在生成独立的计划文档(而非修订备忘录)时, 保留原始计划的有效意图。
  3. 对于 UI/产品方案,应先使用主要 线框图和带注释的状态来构建顶层画布,然后使用原生模块编写文档 (参见 references/canvas.mdreferences/document-quality.md)。对于 涉及用户端影响的广泛产品架构方案,应在抽象 架构或模式表格之前添加 具体的“应用中呈现效果”可视化示意图。 确保文档形式尽可能接近代理通常输出的 独立 Markdown 计划。如果提供了现有计划, 请直接沿用正确的事实和决策,无需引用 之前的草稿或解释本版本的差异。对于非可视化 计划,请跳过顶部的视觉呈现层(下文的“视觉呈现层选择”部分规定了相关规则) 并放置 diagram, data-model, api-endpoint, diff, file-tree, codeannotated-code 代码块 直接置于相关正文旁边。 宽版文档布局由渲染器负责,且被有意列入白名单:仅 允许字面意义上的代码审查界面(diff, annotated-code)以及 tabs 块 (其子元素为垂直排列或类似差异对比的)才会比正文更宽。 保持 api-endpoint, openapi-spec, data-model, json-explorer, wireframe、问题以及 custom-html 块保持在正常文档流中,除非 其自身渲染器另有规定。
  4. 显示返回的“计划”链接或内联 MCP 应用,并请用户进行审查。 在聊天中始终包含实际 URL,以便在 CLI 或 其他纯文本宿主环境中,下一步只需点击即可。 当主机暴露嵌入式浏览器/预览面板 且工具可在其中打开任意 URL 时,应自动打开返回的计划 URL 以便于审查——这既是便利措施也是烟雾测试,绝不能作为 唯一的交接方式或访问 模式。 方案应在本地代理和本地浏览器 会话中开箱即用;如果已登录的嵌入式浏览器无法读取 匿名/工具检查可读取的本地方案,请修复应用/操作的所有权或访问路径, 而不是手动修补单个方案。 对于高风险方案(架构、 后端、数据、多文件或存在风险的方案),还应在用户阅读时,通过 “移交前自我 审查”启动自我审查流程,而不是因此阻塞 移交。
  5. 对于托管方案,请在以下时机调用 get-plan-feedback 在编辑前、审核后、 任何长时间暂停后, 以及最终回复前调用该方法。将 anchorDetails、解析器意图、最近的 审核事件以及浏览器交接中任何重点截图作为 权威来源,以准确了解具体发生了哪些更改,以及每条评论指向的具体内容。
  6. 对于托管方案,使用 update-visual-plan,优先采用 定向 contentPatches。 将顶级 content 有效载荷视为完全替换,而非合并;切勿 发送部分 content 对象来添加画布或单个块。如果无法避免 完全替换,请先读取完整的计划源代码/内容,保留 所有现有块和视觉表面,并在之后验证源代码/导出 结果,确保文档正文未被截断。当用户需要 支持源代码控制的编辑时,请使用 patch-visual-plan-source 基于 MDX 文件进行操作,而非重新生成图纸。
  7. 对于托管方案,仅当用户需要 export-visual-plan 仅当用户需要 可共享的收据或代码库签入 artifacts 时才进行导出。

移交前的自我审查

对于高风险方案——架构、后端、数据模型、迁移、多文件 或其他存在风险的工作——在将 方案视为最终版本之前,请进行一次对抗性自我审查。对于小型、仅涉及 UI 或仅需做出单一决策的方案,若成本 大于收益,则可跳过此步骤。 确保审查过程成本低且不阻塞:

  • 先展示计划,并行进行审查。发布链接并让用户 开始阅读,然后并行进行审查——切勿让用户为此等待。
  • 审查书面计划;不要重新调研。对计划文本及其 自身中的薄弱环节进行批判性分析。基础工作已在起草阶段完成,因此审查应 检查输出结果,而非重新探索代码库。
  • 安排一位持怀疑态度的审阅者,其唯一职责是找出薄弱、缺失 或错误之处——而非赞扬。重点审查:那些隐含或完全未明确的、难以回溯的决策 (线缆格式、公共 ID、数据模型结构、身份验证、所有权); 未 基于实际文件或符号的步骤;在计划本应 确定单一选项的情况下却列出多种选项;明显缺失的决策(“当X发生时会怎样?”、“为什么不选Y?”); 以及冗余内容或单步填充。
  • 修复 vs. 询问。亲自应用明确的修复措施,使用 update-visual-plan contentPatches ——模糊的非目标、缺乏依据的断言、明显缺失的 决策。而将真正的判断决策交还给用户:将其添加到 底部 question-form “未决问题”区块,或将其批量纳入常规的 “向用户提问”流程。切勿默认自行决定。
  • 不要在用户阅读过程中给他们带来意外。对于大型计划,应在 编辑器加载前应用补丁;否则,请简要说明正在运行自我审查,因此 计划在此过程中发生变化是预期的。下次响应时,请总结 审查带来了哪些变化,以及哪些问题被揭示出来供用户决定。

可视化决策界面

请在创建计划之前或阅读源计划之后选择界面。 请勿默认添加视觉装饰元素:

对于 UI/产品方案,顶部画布通常是主要的审查界面。将 首个有意义的线框图放置于此,而非将其埋藏在文档正文块中。当状态至关重要时(例如默认视图、 溢出菜单或弹出框、侧边面板、加载状态或错误提示),请使用 多个画布画板。 在框架旁添加简短注释, 并使用 targetId 加号 placement的图框旁添加简短注释;将实现细节、 权衡、文件映射、数据契约、风险及验证内容保留在画布下方的 文档正文中。

当用户要求提供流程图、故事板、用户旅程、线框图、画布或“这 看起来是什么样”时,请将其视为“画布优先”的请求。为每个 用户可见的状态创建一个画板,仅连接相邻的过渡,并使用简短的画布 注释来记录产品说明。不要仅仅因为 HTML 图表更快捷 就用文档正文 diagram 块来替代所请求的故事板,仅仅因为 HTML 图表编写起来更 快;用于解释后端机制、架构或 数据流的图表应置于画布下方。

将产品线框图与说明性/元图分开处理。从纯粹的 界面开始,使其看起来像正在讨论的应用状态,不要在 UI 中嵌入 说明性文字或架构注释。将箭头、标签、契约、数据 流和模式说明放在单独的注释中、单独的画布图中, 或文档正文中。

当方案涉及现有应用时,绘制前请先检查当前的壳体/组件。 第一个画板应以与实际应用相同的 密度呈现:现有的侧边栏、工具栏位置、溢出菜单、应用界面元素以及 框架代理界面元素均应保留在实际位置。 将次要界面元素建模为 独立状态,例如右上角的溢出弹出框、片状界面、面板、加载 状态或独立的 AgentSidebar,而不是发明一个永久的检查器或 将框架界面元素折叠到产品 UI 中。

  • 仅涉及架构、后端、数据迁移、 纯文案或其他非可视化方案的内容,不应在画布上呈现。请勿将顶部画布用于 架构图、依赖关系图、文件规划、API 契约或 仅涉及数据流的审查。 仅当关系需要视觉解释时,才在详尽文档中使用本地内联图表, 通常每条建议或决策对应一张空间图。除非 关系确实是顺序的,否则应优先使用分组区域、图层、象限、 矩阵或“前后”面板,而非单轴链式布局。
  • 画布仅用于展示单个静态屏幕、前后对比、组件 状态、小型弹出窗口,或无需点击的视觉指引。 将这些线框图放入 content.canvas 并省略 content.prototype.
  • Canvas + 原型,用于多步骤 UI 流程、入门引导、向导、 审核/审批流程、导航变更,或任何需要评审者 亲自操作行为的情境。保留静态线框图在 content.canvas,将对齐的功能原型添加到 content.prototype,并借助顶部的视觉标签页在它们之间切换。
  • 当用户要求操作 UI 或交互是 主要问题时,应采用“原型优先”策略。使用 create-prototype-plan,该方法在必要时仍会保留静态 模拟图。

对于画布与原型混合的方案,请在两个界面中复用相同的真实标签、应用状态 和屏幕 ID。画布是可供审查的静态参考; 原型则是同一流程的交互版本,而非独立的 设计方向。

线框图质量——请参阅 references/wireframe.md

UI 总结/规划线框图必须达到严格的质量标准——全宽界面边框、 固定底部栏、真实的产品内容、前后对比效果,以及正确的 surface 预设值、 --wf-* 使用令牌代替十六进制值,且不得 /

在 GitHub 上查看
---
name: visual-plan
description: Transform text plans into interactive visual documents with diagrams, code snippets, and review surfaces for coding agents.
---

# Agent-Native Plans

Agent-Native Plans is structured visual planning mode for coding agents. Build
the plan you would normally write in Markdown, but as a scannable document with
editable blocks mixed in: inline diagrams, code snippets,
open questions, and an optional top visual review area (wireframe canvas, live
prototype, or both in tabs). Architecture and backend plans stay document-only;
UI and product plans start with the top canvas/prototype (the Visual Surface
Choice section owns that rule).

`/visual-plan` is the packaged command and main entry point. Choose the review
mode from the task: UI-first when the work is primarily product UI and review
should start with screens, prototype-first when review should start with a
functional live prototype, design-first when review needs full-fidelity branded
screens, or visual-intake when the user explicitly wants a questionnaire before
planning. When a Codex, Claude Code, Markdown, or pasted plan already exists,
`/visual-plan` uses that source plan as the starting point and builds the review
surface from it instead of starting over.

## When To Use

Create or adapt a visual plan whenever the plan would be better as a reviewable
artifact than a chat paragraph. This includes modest work such as a single UI
surface with states, a small workflow, a before/after product change, or a
component/API/data-shape decision that needs alignment, plus larger multi-file,
ambiguous, long-running, risky, or UI-heavy work. Use it when architecture /
data flow / UI direction / options / open questions would benefit from inline
diagrams or structured blocks, when the user needs to react to a direction
before you implement, or when an existing text plan needs a richer review
surface.

## Plan Discipline

- **Gate thoughtfully.** A visual plan is a richer review surface, not only a
  tool for giant projects. Use it when the user needs to see, compare, comment
  on, or approve a direction before code, even for a modest UI/state/workflow
  change. Skip it for truly trivial, unambiguous work — typos, one-line fixes, a
  single well-specified function, anything whose diff you could describe in one
  sentence — and just make the change. Never pad a plan with filler and never
  ship a single-step plan.
- **Research before you draft.** Read the real files, actions, schema, and
  patterns first; name actual files, symbols, and data shapes instead of
  inventing them. Check existing `actions/` before proposing endpoints and prefer
  named client helpers over raw fetch. Delegate wide exploration to a sub-agent.
  Lead with reuse: for each step, name what it reuses — existing actions, schema,
  components, helpers — before what it adds, so the plan explains the genuinely new
  delta instead of redescribing what already exists.
- **Decide the hard-to-reverse bets first.** For non-trivial backend, data, or API
  work, sketch where the feature is headed, then call out the decisions that are
  expensive to undo once data or callers depend on them — wire format, public ids,
  data-model shape, auth and ownership boundaries — and get those right in the plan
  even if most of the feature ships later. Then scope to the smallest first cut that
  proves the approach without foreclosing it, stating both what is in and what is
  explicitly deferred.
- **Keep examples at the right altitude.** When the user's idea is a broad
  framework, product, or operating-model change, do not collapse it into the
  first concrete example, provider, or sync path they mention. Separate the core
  abstraction from motivating examples and app/provider adapters. Use examples
  to make the plan legible, but label them as examples unless they are the whole
  requested scope.
- **Publish standalone plans.** If the user pasted, referenced, or already has a
  Codex / Claude Code / Markdown plan, treat it as source material, but rewrite
  the published plan as a clean standalone proposal. Preserve the source plan's
  useful intent and codebase facts, label inferred visuals as inferred, and avoid
  revision language such as "preserve the prior plan", "do not drop the old
  idea", "unlike the previous version", or "this revision changes...". A reader
  who never saw the chat or earlier drafts should understand the plan.
- **Make the first read concrete.** If the plan is meant to be shared with
  someone outside the chat, or if the concept is abstract, lead near the top with
  one concrete product example before mode tables, architecture, or roadmaps. For
  UI-capable concepts, that usually means a top-canvas app state that shows the
  real user workflow in product terms. Do not rely on phrases that only make
  sense in conversation, and do not frame the plan as "not the old idea"; state
  the positive model directly.
- **Planning is read-only.** Make no source edits while building or reviewing the
  plan. Start editing only after the user approves the direction.
- **Clarify vs. assume.** Do not ask how to build it — explore and present the
  approach and options in the plan. Ask a clarifying question only when an
  ambiguity would change the design and you cannot resolve it from the code; use
  the host agent's normal ask-user-question flow and batch 2-4 high-leverage
  questions before finalizing. Do not call `create-visual-questions` for
  ordinary clarification or preflight; reserve it for the visual-intake mode when
  the user explicitly asks for a visual intake questionnaire. Otherwise state the
  assumption explicitly and proceed, and keep anything unresolved in the plan's
  single bottom `question-form` Open Questions block. For complex plans, do a
  final open-question pass before handoff: if a decision would affect
  architecture, scope, UX, data shape, or rollout, either decide it in the plan
  with rationale or put it in that bottom form with a recommended default.
- **The plan is the approval gate.** After surfacing it, ask the user to review
  and approve before you write code, and name which files/areas the work touches.
  Presenting the plan and requesting sign-off is the approval step — do not ask a
  separate "does this look good?" question.
- **The document is the source of truth, not the chat.** When scope shifts,
  update the plan with `update-visual-plan` rather than only changing course in
  chat, and make the updated document stand alone. Do not describe the update as
  a correction to an earlier draft inside the plan itself. Re-read the approved
  plan before major steps.

## Create A Structured Agent-Native Plan — Never Inline

The deliverable is ALWAYS a structured Agent-Native Plan, not a chat-only plan.
The hosted Plan MCP connector (`plan` server, or legacy `agent-native-plans`) is
the default collaboration and commenting surface; it is not a reason to reject
the planning pattern as an external dependency or rented layer. Plans are
portable source artifacts (`plan.mdx`, optional `canvas.mdx` /
`prototype.mdx`, JSON, and HTML export), and ownership-sensitive workflows can
use local-files mode or a self-hosted/custom Plan app URL without abandoning the
skill's review discipline. Do not advise the user to skip `/visual-plan` because
the default surface is hosted; choose the right Plan mode for the user's
ownership, privacy, sharing, and branding needs.

By default, create the plan via the Plan MCP connector and NEVER hand it over as
inline chat content — no Markdown prose, ASCII sketch, table, or fenced
wireframe. If the `plan` (or legacy `agent-native-plans`) tools are not visible,
discover them through the host's `tool_search` first; if they are still missing,
STOP and give the user the client-specific reconnect step rather than improvising
an inline plan. Before publishing, or whenever a connector or auth error appears,
READ `references/connection.md` in this skill directory — it is the single source
of truth for the never-inline rule, connector discovery, and the per-client
reconnect steps. Local-files privacy mode (after Tool Guidance) is the exception.

## Core Workflow

This section describes the default hosted Plan MCP workflow. If
`AGENT_NATIVE_PLANS_MODE=local-files` is set, or the user asks for fully local
files/no hosted Plan writes, use **Local-Files Privacy Mode** instead; carry
forward only the code-research and plan-composition guidance here.

1. Follow the host agent's normal planning flow: inspect the codebase, delegate
   wide exploration when useful, gather the info needed, and ask native
   clarifying questions as needed before generating the plan. If a source plan
   already exists, gather its exact text from the user's paste, a referenced
   file, or recent visible agent context; do not invent source text.
2. Call `get-plan-blocks` for the authoritative block catalog — do not author
   from memorized tags. Then call the mode-matched create tool:
   `create-visual-plan` for document-first plans (architecture, backend, data,
   refactor, API), `create-ui-plan` for UI-first plans, `create-prototype-plan`
   for prototype-first plans, `create-plan-design` for design-first plans,
   `create-visual-questions` only when the user explicitly asks for a visual
   intake questionnaire. When a source plan already exists,
   pass it as `planText` and preserve the original plan's useful intent while
   producing a standalone plan document, not a revision memo.
3. For UI/product plans, compose the top canvas first with the primary
   wireframes and annotated states, then write the document with native blocks
   (see `references/canvas.md` and `references/document-quality.md`). For
   broad product architecture plans with a user-facing implication, add a
   concrete "what this looks like in the app" visual before the abstract
   architecture or mode tables. Keep the document close to the standalone
   Markdown plan the agent would normally output. If an existing plan was
   provided, carry forward the right facts and decisions without referring to
   the previous draft or explaining how this version differs. For non-visual
   plans, skip the top visual surface (Visual Surface Choice below owns the rule)
   and put `diagram`, `data-model`,
   `api-endpoint`, `diff`, `file-tree`, `code`, and `annotated-code` blocks
   directly next to the relevant prose.
   Wide document layout is renderer-owned and intentionally allowlisted: only
   literal code-review surfaces (`diff`, `annotated-code`) and `tabs` blocks
   with vertical orientation or diff-like children break out wider than prose.
   Keep `api-endpoint`, `openapi-spec`, `data-model`, `json-explorer`,
   `wireframe`, question, and `custom-html` blocks in normal document flow unless
   their own renderer says otherwise.
4. Surface the returned Plans link or inline MCP App and ask the user to review.
   Always include the actual URL in chat so the next step is a click in CLI or
   other text-only hosts. When the host exposes an embedded browser/preview panel
   and a tool can open arbitrary URLs there, open the returned plan URL
   automatically for convenient review — a convenience and smoke test, never the
   only handoff or the access
   model. Plans should load out of the box for the local agent and local browser
   session; if a signed-in embedded browser cannot read a local plan that an
   anonymous/tool check can read, fix the app/action ownership or access path
   rather than patching one plan by hand. For high-stakes plans (architecture,
   backend, data, multi-file, or risky), also kick off the self-review pass in
   **Self-Review Before Handoff** while the user reads, instead of blocking the
   handoff on it.
5. For hosted plans, call `get-plan-feedback` before editing, after review,
   after any long pause,
   and before the final response. Treat `anchorDetails`, resolver intent, recent
   review events, and any focused screenshots from browser handoff as the source
   of truth for exactly what changed and exactly what each comment points at.
6. For hosted plans, apply changes with `update-visual-plan`, preferring
   targeted `contentPatches`.
   Treat the top-level `content` payload as a full replacement, not a merge; do
   not send a partial `content` object to add a canvas or one block. If a full
   replacement is unavoidable, first read the complete plan source/content, carry
   forward every existing block and visual surface, and verify the source/export
   afterward so the document body was not truncated. When the user wants
   source-control friendly edits, use `patch-visual-plan-source` against the MDX
   files instead of regenerating the plan.
7. For hosted plans, export with `export-visual-plan` only when the user wants a
   shareable receipt or repo-check-in artifacts.

## Self-Review Before Handoff

For high-stakes plans — architecture, backend, data-model, migration, multi-file,
or otherwise risky work — run one adversarial self-review pass before treating the
plan as final. Skip it for small, UI-only, or single-decision plans where the cost
outweighs the value. Keep the pass cheap and non-blocking:

- **Surface the plan first, review concurrently.** Post the link and let the user
  start reading, then run the review in parallel — never make the user wait on it.
- **Review the written plan; do not re-research.** Critique the plan text and its
  own blocks. The grounding was already done while drafting, so the review checks
  the output instead of re-exploring the repo.
- **Spawn one skeptical reviewer** whose only job is to find what is weak, missing,
  or wrong — not to praise. Point it at: hard-to-reverse decisions made implicitly
  or not at all (wire format, public ids, data-model shape, auth, ownership); steps
  not anchored in real files or symbols; a menu of options where the plan should
  commit to one; obvious missing decisions ("what happens when X?", "why not Y?");
  and padding or single-step filler.
- **Fix vs. ask.** Apply clear-cut fixes yourself with `update-visual-plan`
  `contentPatches` — vague non-goals, unanchored claims, an obvious missing
  decision. Route genuine judgment calls back to the user instead: add them to the
  bottom `question-form` Open Questions block or batch them into the normal
  ask-user-question flow. Do not silently decide them.
- **Do not surprise the user mid-read.** On a large plan, apply the patches before
  the editor loads; otherwise note briefly that a self-review is running so the
  plan changing under them is expected. When you next respond, summarize what the
  review changed and what it surfaced for the user to decide.

## Visual Surface Choice

Choose the surface before creating the plan or after reading the source plan. Do
not add visual chrome by default:

For UI/product plans, the top canvas is usually the primary review surface. Put
the first meaningful wireframes there, not buried as document-body blocks. Use
multiple canvas artboards when states matter, such as the default view, an
overflow menu or popover, a side panel, loading, or error. Put short annotations
beside frames with `targetId` plus `placement`; keep implementation details,
tradeoffs, file maps, data contracts, risks, and verification in the document
body below the canvas.

When the user asks for a flow, storyboard, journey, wireframe, canvas, or "what
this looks like", treat that as a canvas-first request. Make one artboard per
user-visible state, connect only adjacent transitions, and use short canvas
annotations for the product notes. Do not substitute a document-body `diagram`
block for the requested storyboard just because HTML diagrams are faster to
write; diagrams belong below the canvas for backend mechanics, architecture, or
data-flow explanation.

Keep product wireframes and explanatory/meta diagrams separate. Start with pure
screens that look like the app state under discussion, without callout prose or
architecture notes embedded inside the UI. Put arrows, labels, contracts, data
flow, and mode explanations in separate annotations, separate canvas diagrams,
or the document body.

When the plan touches an existing app, inspect the current shell/components
before drawing. The first artboard should look like the real app at the same
density: existing sidebars, toolbar placement, overflow menus, app chrome, and
framework agent chrome stay in their real places. Model secondary surfaces as
separate states, such as a top-right overflow popover, sheet, panel, loading
state, or separate AgentSidebar, rather than inventing a permanent inspector or
folding framework chrome into the product UI.

- **No visual surface** for architecture-only, backend-only, data migration,
  copy-only, or otherwise non-visual plans. Do not use the top canvas for
  architecture diagrams, dependency maps, file plans, API contracts, or
  data-flow-only reviews. Use a strong document with local inline diagrams
  only when relationships need a visual explanation, usually one spatial diagram
  per recommendation or decision. Prefer grouped regions, layers, quadrants,
  matrices, or before/after panels over a single-axis chain unless the
  relationship is truly sequential.
- **Canvas only** for one static screen, a before/after comparison, a component
  state, a small popover, or a visual direction that does not require clicking.
  Put those wireframes in `content.canvas` and omit `content.prototype`.
- **Canvas + prototype** for multi-step UI flows, onboarding, wizards,
  review/approval flows, navigation changes, or anything where the reviewer
  needs to operate the behavior. Keep the static wireframes in
  `content.canvas`, add the aligned functional prototype in
  `content.prototype`, and rely on the top visual tabs to switch between them.
- **Prototype-first** when the user asks to operate the UI or when interaction is
  the main question. Use `create-prototype-plan`, which still preserves static
  mocks where useful.

For mixed canvas + prototype plans, reuse the same real labels, app statuses,
and screen ids across both surfaces. The canvas is the inspectable static reference;
the prototype is the interactive version of that same flow, not a separate
design direction.

## Wireframe quality — read `references/wireframe.md`

UI recap/plan wireframes must meet a strict quality bar — full-width chrome,
pinned bottom bars, real product content, before/after comparability, the right
`surface` preset, `--wf-*` tokens instead of hex, and no `<html>`/`<style>`/font
tags. Before authoring ANY wireframe / `<Screen>` / `WireframeBlock`, READ
`references/wireframe.md` in this skill directory — it is the single source of
truth for HTML wireframe quality, shared word for word with `/visual-plan`
and `/visual-recap`. Do not author wireframes from memory.

## Canvas — read `references/canvas.md`

The canvas is the single source of truth for static UI mockups: the `surface`
locks each artboard's footprint, mixed surfaces lay out
in lanes, annotations are plain-text designer notes anchored by
`targetId`/`placement`, and edits are surgical `contentPatches`. Before
authoring or editing ANY canvas, artboard, or annotation, READ
`references/canvas.md` in this skill directory — it is the single source of truth
for canvas/artboard mechanics. Do not author canvas layouts from memory.
Canvas artboards use the same HTML wireframe path as document-body
`WireframeBlock` screens: author `<Screen surface="..." html={...} />` with a
semantic HTML fragment. Do not author fresh kit-tree children such as
`<FrameScreen>`, `<Card>`, `<Row>`, or `<Btn>` inside canvas `<Screen>` tags;
those are legacy compatibility markup for old plans and produce brittle canvas
layouts.

## Document quality — read `references/document-quality.md`

The document is a serious technical plan, not marketing: outcome-first,
prose-first, self-contained, built from the right native blocks, with open
questions in a single bottom `question-form` and a pre-handoff visual check.
Before authoring the plan document, READ `references/document-quality.md` in this
skill directory — it is the single source of truth for the document quality bar.
Do not write the document from memory.

## Good vs. bad exemplar — read `references/exemplar.md`

For a worked example of the bar — a great UI-first plan and `/visual-plan`, plus
the anti-patterns to avoid — READ `references/exemplar.md` in this skill
directory before authoring a plan.

## Tool Guidance

- `create-visual-plan`: start one structured visual plan per agent task/run, or
  import an existing text plan by passing `planText`; `content` may include no
  visual surface, canvas only, or canvas + prototype.
- `create-ui-plan`: start a UI-first plan when the work is primarily product UI.
- `create-prototype-plan`: start a prototype-first plan with a functional top
  review surface.
- `create-plan-design`: start a full-fidelity branded Design-tab plan with an
  optional matching Prototype tab.
- `convert-visual-plan-to-prototype`: convert an existing HTML wireframe canvas
  into a prototype plan.
- `create-visual-questions`: use only when the user explicitly asks for a visual
  intake questionnaire, not as `/visual-plan` preflight.
- `update-visual-plan`: revise content, status, or comments with targeted
  `contentPatches` (see Core Workflow step 6).
- `read-visual-plan-source`: read the normalized plan as `plan.mdx`,
  optional `canvas.mdx`, optional `.plan-state.json`, and JSON.
- `patch-visual-plan-source`: apply granular MDX AST patches by stable block,
  artboard, annotation, component, or wireframe-node id.
- `import-visual-plan-source`: create or replace a plan from an MDX folder.
- `get-visual-plan`: read the current structured plan, exported HTML, and
  annotations; it also returns the MDX folder for source workflows.
- `get-plan-feedback`: read unconsumed human feedback. Use it frequently; it
  returns grouped threads, exact anchor details, expected resolver, and recent
  review-event payloads so agents can act only on the comments meant for them.
- `get-plan-blocks`: resolve block tags before authoring — do not memorize tags;
  call this first to get the authoritative tag names, required fields, and prop
  shapes from the live block registry.
- `export-visual-plan`: export HTML, Markdown fallback, structured JSON, and MDX
  files for repo check-in.

When the user critiques a plan's look or structure, fix the renderer or this
skill — never hand-edit one stored plan. Turn feedback into better guidance.

## Local-Files Privacy Mode — read `references/local-files.md`

When the user wants no hosted Plan database writes — no DB writes, no Plan MCP
publish, fully local/offline/private planning, repo-owned source-controlled
artifacts, or `AGENT_NATIVE_PLANS_MODE=local-files` — do not call any hosted Plan
tool except the schema-only `get-plan-blocks` catalog lookup. Author a local MDX
folder and
preview it with `plan local check` / `plan local serve` / `plan local verify`.
Before using local-files mode, READ `references/local-files.md` in this skill
directory — it is the single source of truth for the full contract (catalog
lookup, MDX folder layout, the local bridge commands, and the hosted tools you
must not call). Carry forward only the code-research and plan-composition
guidance from Core Workflow; everything hosted is replaced by the local bridge.

## Interpreting comment anchors

This section applies to hosted plans with `get-plan-feedback` /
`update-visual-plan`. In local-files mode, do not call hosted feedback or update
tools; interpret file/chat feedback directly, edit the MDX files, rerun the
local bridge check/serve/verify command, and report the new local URL.

`get-plan-feedback` returns rich anchors — read them before acting on any comment.

- **Coordinate frames.** `targetX`/`targetY` are percentages *within* the
  element named by `targetSelector`/`targetKind`. Bare `x`/`y` are percentages
  of the whole plan document. `canvasX`/`canvasY` are raw board-world pixels on
  the design canvas (board size given when available).
- **Wireframe pins.** Anchors on wireframes include `targetNodeId` and
  `targetNodePath` (e.g. `card > list > listItem "Acme Inc"`) identifying the
  exact kit node. Use `targetNodeId` directly with wireframe node patch ops;
  use `data-design-id` values from design artboards with
  `update-design-element-style`. Prefer the node id/path over raw coordinates;
  fall back to coordinates plus the focused screenshot (red ring marks the exact
  point) only when no node id is present.
- **Text quotes.** Resolve `textQuote` against current prose using
  `contextBefore`/`contextAfter` for disambiguation. If `ambiguous: true`, ask
  the user — do not guess which occurrence is meant.
- **Detached comments.** `get-plan-feedback` flags threads whose quoted text no
  longer exists as `detached` (in `detachedThreads`). Reconcile these against
  rewritten content — never silently drop them.
- **Routing.** `resolutionTarget` is the only routing signal: act on `agent`,
  treat `human` as context only. `@mentions` are people to notify, never a
  routing signal.
- **Two-axis state.** Mark every ingested comment as consumed
  (`consumedCommentIds` on `update-visual-plan`). Set `status=resolved` only on
  agent-targeted comments you actually addressed; leave human-targeted comments
  open.

## Visibility & Sharing

Use `set-resource-visibility` to change who can see a plan (e.g. public, login,
or org-scoped). Use `share-resource` to grant specific users or roles access
by email or role. Gate visibility before sharing any plan that covers
unreleased or private work — default to the narrowest scope that meets the
review need.

## Setup & Authentication

There are two ways into Plans.

**Coding agent (CLI).** Install once with the Agent-Native CLI. The command
installs the Plans skills, registers the hosted Plans MCP connector, and runs
auth/setup for the selected local client(s) in the same step (a one-time browser
sign-in at setup — this is intended), so the first tool call in that client does
not hit an OAuth wall:

```bash
npx @agent-native/core@latest skills add visual-plans
```

After that, `/visual-plan` and `/visual-recap` are the two installed slash
commands. If you only need one command, use `skills add visual-plan` or
`skills add visual-recap` instead. The other planning modes
(`create-ui-plan`, `create-prototype-plan`, `create-plan-design`,
`create-visual-questions`) are MCP tools reachable from `/visual-plan`, not
separate slash commands. Pass `--no-connect` to register the connector without
authenticating, then run
`npx @agent-native/core@latest connect https://plan.agent-native.com --client all`
whenever you are ready, or choose a narrower `--client`. Auth and MCP tool
loading are per client config/session.

**Browser (people you share with).** Open the Plans editor and create & edit
with no sign-up — you work as a guest. Sign in only when you want to save or
share; signing in claims the plans you made as a guest into your account.

Sharing and commenting require an account: public/shared plans are viewable by
anyone with the link, but commenting on them needs an agent-native account.

For fully offline, no-account use, run the Plans app locally and sync plans to
your repo as MDX. This local mode is a separate advanced path, not the default
hosted flow.

If a Plans tool returns `needs auth`, `Unauthorized`, or `Session terminated`, do
not keep retrying it — stop and give the user the per-client reconnect step from
`references/connection.md`, then continue once the connector is available.

Hosted default: connect `https://plan.agent-native.com/_agent-native/mcp`. Do
not put shared secrets in skill files.

所有文件

0 个文件

安装 visual-plan

下载技能文件并将其解压到 .claude/skills/ 目录中。

下载ZIP

克隆仓库并复制技能文件到您的项目中。

git clone https://github.com/BuilderIO/skills/tree/main/skills/visual-plan # Copy SKILL.md to your .claude/skills/ directory

复制 复制
快速设置: 将技能文件夹复制到 .claude/skills/ Claude 会自动检测并使用该技能

相关技能

notion-automation
更新时间 2026-06-29
airtable-automation
更新时间 2026-06-29
seo-programmatic
更新时间 2026-06-29
revops
更新时间 2026-06-29
OR