給 AI agent 的「完成定義」自我把關 spec:讓它交件前先驗收自己
一份可貼進任何 coding agent 的 Definition of Done 模板,把『什麼叫做完』寫成 agent 必須逐項自檢的 checklist:行為符合驗收標準、tests / lint / typecheck / build 全綠(沒跑要說原因)、有風險的改動附 rollback、最後交一份『驗證故事』。杜絕「它說完成了結果一堆紅」。
AI agent 最大的謊就是「我做完了」——結果 build 是紅的、測試沒跑、邊界沒處理。
這份 Definition of Done spec 逼它在說『完成』前,逐項自檢並貼出驗證證據;可以直接放進任務指令,或常駐進 CLAUDE.md / AGENTS.md。
[ Log in to see the full prompt ]Sign up free to see the full prompt, copy it, save it, and join the discussion. Free content unlocks on login; Pro content is a separate subscription.
適用情境:交付任何稍微重要的 coding task(修 bug、加功能、改 API)時,貼在任務描述末端;或把整段精簡後放進 CLAUDE.md / AGENTS.md 變成每次都生效的常駐規則。為什麼有效:① 把『完成』從感覺變成『必須提出證據的主張』,直接打中 agent 最常見的假性完成;② 要求貼『真實未經修飾的測試/build output』,擋掉它編造綠燈;③ 明確的 out-of-scope 清單 + scope discipline 自檢,避免它順手亂改不相干檔案;④ 『驗證故事』讓人類 reviewer 30 秒就懂發生什麼。技巧:TEST_COMMAND / QUALITY_COMMANDS 填你專案真實指令(如 pnpm test、tsc --noEmit、next build),agent 才有得跑。這套 DoD 概念對 Claude Code、Codex、或任何能跑指令的 agent 都通用。
## Definition of Done 1. Behavior ✅ — 三條驗收標準逐條對應到 auth.ts L40-58。 2. Scope ✅ — 只改 auth.ts / auth.test.ts,未碰 out-of-scope 的 db/。 3. Tests ✅ — `pnpm test`:`Test Files 12 passed | Tests 84 passed`(原文貼上)。 4. Lint/typecheck/build ✅ — `tsc --noEmit` exit 0;`next build` 成功。 5. New coverage ✅ — 新增 `returns JSON on 401`,在舊 code 會 fail。 6. Edge cases ✅ — 空 body / 過期 token / 並發重送 已處理。 7. Conventions ✅ — 沿用既有 `errJson()` helper。 8. Rollback ✅ — 單一 commit,可直接 revert。 9. No placeholders ✅。 Verification story:把 401 從回 HTML 改成回結構化 JSON,新增對應測試證明新舊行為差異,型別/建置全綠,單一 commit 可回滾。
Suno Engineer's Mindset: 4 Steps to a Song That Doesn't Sound Like AI
A studio engineer's breakdown of Suno's fatal weaknesses (fried vocals, high-frequency artifacts), plus a 4-step DAW workflow and a Suno Studio cleanup prompt.
5 Claude Weekly Workflows That Stuck After 6 Months
Proposal generator / meeting processor / content repurposer / Friday review / shutdown reset — out of 40 I tried, only these 5 survived, each saving 30+ minutes per run.