~/VibeHandbook
免費 PDF

19 · 09

回顧與練習

關鍵要點

  • 智慧體放大的是你精確表達需求、並識別是否如願以償的能力 — 而不是取代它。
  • 界定範圍有雙重回報: 範圍收得緊的任務產出你真能審查的 diff,鬆散的任務產出你審不動的 diff。
  • 審查 diff,而不是整個程式碼庫 — git diff --stat 幾秒鐘就能標出範圍蔓延,而通過的測試套件永遠不能替代親自執行。
  • 絕不要對付費 跑沒有限流的智慧體迴圈;給每個迴圈設硬上限 — 最大迭代次數、支出上限或超時。
  • 在信任智慧體後臺執行之前,先在前臺盯著頭幾次執行,確認它會收斂

動手試試

挑一個小而邊界清晰的任務,連同一個明確的停止條件("嘗試 3 次後停止"或"測試再失敗兩次就停止")一起交給智慧體。在前臺從頭到尾盯完整個執行,然後只用 git diff --stat 再加 git diff 審查這份 diff。如果改動觸及的檔案多於你界定的範圍,那就是收緊任務說明並重跑的訊號。

本章提示詞

I'm giving you an autonomous task. Obey these guardrails exactly:
- SCOPE: only touch [list the files/modules]. If the fix needs more,
  STOP and tell me instead of expanding scope.
- GOAL: [one concrete, checkable outcome].
- STOP CONDITIONS: stop after 3 attempts, OR if tests fail twice in a
  row, OR if you've made changes outside the scope above.
- COST: do not call any paid API in a loop without a hard cap.
- REPORT: when you stop, show me `git diff --stat`, the test result,
  and one sentence on whether you converged or got stuck.
Begin, and narrate each attempt so I can watch you converge.

想離線閱讀?

免費下載整本書的 PDF 或 EPUB。