選項

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 工作,先勾勒功能的發展方向,接著指出那些 一旦資料或呼叫方依賴後便難以撤銷的決策——傳輸格式、公開識別碼、 資料模型結構、認證與所有權界限——並在計畫中將這些內容 處理妥當,即使功能的大部分內容將於稍後發布。 接著將範圍限定在最小的「首版」, 既能驗證方法又不會預先封閉後續發展空間,同時明確列出 包含的內容以及 明確延後處理的部分。
  • 將範例維持在適當的層級。當使用者的構想涉及廣泛的 框架、產品或營運模式變更時,切勿將其簡化為 他們首先提及的具體範例、供應商或同步路徑。 將核心 抽象概念與說明性範例及應用程式/供應商適配器區分開來。運用範例 使計畫易於理解,但除非其代表了整個 所要求的範圍,否則應標示為範例。
  • 發布獨立的計畫。若使用者貼上、引用或已擁有 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, code,並將 annotated-code 區塊 直接置於相關文字旁。 寬版文件佈局由渲染器管理,並刻意列入允許清單:僅限 字面上的程式碼審查介面(diff, annotated-code)以及 tabs 區塊 (其子元素為垂直方向或類似 diff 格式)才會比正文更寬。 請將 api-endpoint, openapi-spec, data-model, json-explorer, wireframe、問題標籤以及 custom-html 區塊保持在正常文件流程中,除非 其專屬渲染器另有規定。
  4. 顯示回傳的「Plan」連結或內嵌的 MCP App,並請使用者進行審查。 請務必在聊天視窗中包含實際網址,以便在 CLI 或 其他純文字主機上進行下一步操作。 當主機暴露嵌入式瀏覽器/預覽面板, 且工具可在其中開啟任意網址時,應自動開啟回傳的計畫網址 以便檢視——此舉既是為提供便利性,亦是煙霧測試,絕非 唯一的移交方式或存取 模式。 方案應能於本地代理程式及本地瀏覽器 工作階段中預先載入;若已登入的嵌入式瀏覽器無法讀取某個 匿名/工具檢查可讀取的本地方案,應修正應用程式/動作的所有權或存取路徑, 而非手動修補單一方案。 對於高風險方案(架構、 後端、資料、多檔案或具風險性),應在用戶閱讀時,同步啟動 「交接前自我審查」中的自我審查流程,而非因此阻擋 交接程序。
  5. 對於託管方案,請在 get-plan-feedback 在編輯前、審查後、 任何長時間暫停後, 以及最終回覆前。將 anchorDetails、解析器意圖、最近的 審查事件,以及來自瀏覽器交接的任何重點螢幕截圖,視為 關於「確切變更內容」及「每則評論所指對象」的權威來源。
  6. 對於託管方案,請使用 update-visual-plan,並優先採用 針對性 contentPatches。 將頂層 content 載荷視為完整替換,而非合併;切勿 傳送部分 content 物件來新增畫布或單一區塊。若無法避免 完全替換,請先讀取完整的計畫來源/內容,保留 所有現有區塊與視覺表面,並於事後驗證來源/匯出 內容,確保文件正文未遭截斷。當使用者希望 進行符合來源控制的編輯時,請使用 patch-visual-plan-source 針對 MDX 檔案進行操作,而非重新生成圖面。
  7. 對於託管藍圖,僅當使用者需要 export-visual-plan 僅當使用者需要 可分享的收據或儲存庫簽入 artefact 時才進行匯出。

移交前的自我審查

對於高風險計畫——例如架構、後端、資料模型、遷移、多檔案, 或其他具風險的工作——在將 計畫視為最終版本之前,請執行一次對立角度的自我審查。若為小型、僅限使用者介面,或僅需單一決策的計畫,且其成本 高於價值時,則可跳過此步驟。 確保此流程成本低且不造成阻塞:

  • 先公開計畫,並同步進行審查。發布連結並讓使用者 開始閱讀,然後並行進行審查——絕不要讓使用者為此等待。
  • 審查書面計畫;切勿重新進行研究。針對計畫文本及其 自身區塊提出批評。基礎工作已在起草時完成,因此審查應 檢查產出結果,而非重新探索儲存庫。
  • 指派一位持懷疑態度的審查者,其唯一任務是找出薄弱、遺漏 或錯誤之處——而非給予讚揚。重點應放在:那些隱含或完全未明示的、難以逆轉的決策 (線路格式、公開識別碼、資料模型結構、授權、所有權); 未 與實際檔案或符號掛鉤的步驟;在方案應 明確選定其中一項時卻列出多項選項;明顯遺漏的決策(「當 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 會自動偵測並使用該技能
儲存庫 BuilderIO/skills

相關技能

notion-automation
更新時間 2026-06-29
airtable-automation
更新時間 2026-06-29
seo-programmatic
更新時間 2026-06-29
revops
更新時間 2026-06-29
OR