迴圈與脈絡

定義持續進行的 UI 原型設計迴圈,校準工作區技能,並附加輔助脈絡檔案來引導程式碼庫分析。

在 Stitch 工作區裡,迴圈不是「把按鈕顏色改成藍色」這種一次性的 bug 單,而是一個長期的設計目標,告訴 Stitch 應該在應用程式的各條路由上尋找哪類 UX 改善。

工作區功能需要先在你的電腦上執行一次 stitch enable loop。設定方式請見連接儲存庫。

用 /stitch 技能設定迴圈

當你用 /stitch 技能導入儲存庫時,代理程式會主動提出設定標準的 Scale Interactive Visual Prototyping 迴圈(ui-prototyping)。你也可以隨時讓 /stitch 設定或調整迴圈:

PROMPT
/stitch Set up a UI prototyping loop focused on turning our /schedule and /venues tables into tactile, direct-manipulation views.

從終端機使用 UI 原型範本

CLI 內建範本登錄表,可以一步建立常駐迴圈,並校準工作區的遠端分析技能:

stitch create loop --template ui-prototyping

執行 stitch create loop --template ui-prototyping 會同時完成兩件事:

  • 建立常駐迴圈,啟用 CREATE_SUGGESTIONS 自主性,讓 Stitch 持續提出洞察、方案規格與畫布設計提示詞。
  • 同步三個工作區技能(design-synthesis、insight-guidelines 與 solution-guidelines),把 Stitch 的後端研究代理程式引導到視覺 UI 原型,而不是通用的程式碼品質 lint。

想先瀏覽其他起始範本,可以執行 stitch create loop --templates,或用 stitch create loop -i 互動選擇。

如果你想針對應用程式中的特定路由或工作流程,可以在 --template ui-prototyping 之外傳入 --objective,在保留 UI 原型技能校準的同時自訂目標:

stitch create loop \
  --template ui-prototyping \
  --objective "Transform passive schedule and booking tables across /schedule and /venues into tactile, direct-manipulation surfaces."

撰寫以成果為導向的目標

最好的迴圈目標描述的是跨多條路由、可持續的 UX 成果,而不是一個封閉的小任務:

  • 瞄準成果:例如 “Evaluate visual rhythm across /feed and /schedule so mobile schedule views are glanceable and tactile”,或 “Transform read-only booking summaries into direct-manipulation surfaces across /venues and /checkout.”
  • 跳過瑣碎任務:像 “Fix table padding on /schedule” 或 “Add a filter dropdown” 這種一句話的小改動,直接手動改比走一遍工作區綜合分析更快。

每當關注焦點改變時,你都可以列出、查看或更新正在執行的迴圈:

stitch find loops
stitch get loop <loop-id>
stitch edit loop <loop-id> --objective "..."
stitch delete loop <loop-id>

目標不可變。傳 --objective 給 stitch edit loop 會替換成一個新 ID 的迴圈,所以之後要重新執行 stitch find loops 來取得新 ID。

查看迴圈的衡量方式

如果迴圈追蹤指標,stitch get loop <loop-id> 會在迴圈的洞察與方案旁顯示一個 How it’s measured 區塊。每項指標會列出:

  • 最新值與單位(例如 42 ms 或 98.5%)
  • 目標值(如果有設定)
  • 方向(↑ higher is better 或 ↓ lower is better)
  • 最近測量時間,或 no measurements yet

這個區塊是唯讀的。如果指標無法載入,迴圈的其他內容仍會顯示。

附加支援檔案與脈絡

如果你有產品需求、使用者研究筆記或架構文件,應該讓它們影響原型,請把這些內容附加到工作區。

用 stitch upload file 上傳 PDF、圖片或其他文件。Markdown 與純文字檔案會作為工作區脈絡儲存,而不是檔案:

stitch upload file ./specs/checkout-prd.pdf
stitch find files

也可以直接從終端機新增一則簡短說明:

stitch create context \
  --title "Checkout Flow Goals" \
  --description "Reduce guest checkout from four separate steps to a single focused view."

stitch find contexts

原文: https://stitch.withgoogle.com/docs/cli/priorities-and-context/

本頁翻譯自 Google Stitch 官方文件,原文版權歸 Google LLC 所有。本站為獨立第三方翻譯,與 Google 無關聯。