備課台 PINHWA / AI CURRICULUM
Claude Code 導演學 · Lesson 04 / 10

把劇本寫對
勝過拍十次

學會寫一份單一 markdown spec,掌握 planning workflow,用 grill-me 讓 agent 反問你,再用 intent engineering 給它「why」。規劃,才是導演真正的槓桿。

大章 5 小節 18 閱讀約 20 分鐘
「With coding agents, you spend more time planning than you actually do building. Its success is really just dependent on how good is your plan.」
— Cole Medine
本課目錄 · ON THIS PAGE ▾

為何規劃:把劇本寫對,勝過拍十次

本堂目標:理解「規劃才是導演的真正槓桿」,並學會寫一份能讓 agent 一次走對方向的單一 markdown spec。

規劃,為什麼是最關鍵的一步

你委派的是「整段執行」,所以成敗在 plan

  • 第 1 堂的 sandwich 委派裡,中間那層 build 你會盡量整段交出去。那一段交得出去,靠的就是前面這份 plan。
  • Cole 的原話:「With coding agents, you spend more time planning than you actually do building.」他講的是工作時間的真實分配。
  • 他接著說:「Its success is really just dependent on how good is your plan.」agent 做得好不好,幾乎取決於你的計畫多清楚,跟它多聰明關係不大。
  • 直覺上花時間規劃很慢,但換來的是 agent 一次就走在對的方向上,省下整串返工。

「目標」不等於「計畫」

  • 「幫我做一個報價系統」是目標,不是計畫。agent 收到只會大量腦補。
  • 計畫要回答的是:要建什麼、成功長什麼樣、怎麼驗證、會動到哪些檔案。
  • 缺了「成功標準」與「驗證方式」,你拿回來的就是「它以為你要、但你其實不要」的東西。
  • 把計畫當成你交給劇組的劇本:演員不必猜你想拍什麼,照著演就對。

單一 markdown plan 的四個區塊

一份文件,四段結構

  • Goal(要建什麼):一句話講清楚這次要產出什麼,範圍到哪裡為止。
  • What success looks like(成功長什麼樣):完成後具體看得到、摸得到的樣子。
  • Validation strategy(如何驗證):agent 要如何向你證明「真的做完且能運作」。
  • Integration points(會動到哪些檔案):會建立、編輯、影響到哪些既有檔案或功能。

為什麼是「單一 markdown」而非散落的指令

  • Cole 明說:「A lot of people like using markdown... I'll have like a single markdown document.」一份文件前後一致,可被反覆引用。
  • 散在對話裡的零碎指令,agent 跑到一半就會漏接,或自行重組成它以為的版本。
  • 一份 spec 文件還能被「另一個沒脈絡的人」(或下一個 session)讀懂,這是檢驗計畫夠不夠好的硬標準。
  • integration points 這段尤其關鍵:技術的人能據此檢查 agent 對檔案結構的理解對不對;不技術的人也能至少看到「它打算動哪些東西」。

planning workflow:從載入脈絡到「go and do」

一份好 plan 是你和 agent 一起、按固定流程談出來的,沒人能一個人憋出來。

Cole 的五步規劃流程

從 context 到對齊

  1. Context loading — 先把任務相關的文件、既有程式、需求載入,給 agent 共同的事實基礎
  2. Research with sub agents — 用 sub agents 去查 tech stack、別人怎麼建類似的東西
  3. Propose a plan — 和 agent 一起把研究結果收斂成一份 plan
  4. Grill you — 讓 agent 大量反問你,逼出你沒講清楚的假設
  5. Go and do — 雙方對齊後,才正式開始建

用 sub agents 做 research

  • Cole:「I'll typically have it do some kind of research, usually using sub agents for that.」
  • 建新應用時,可派一個 sub agent 去查「這類東西用什麼 tech stack 好」,另一個查「別人怎麼建類似的」。
  • 對不技術的人特別有用:你不必自己懂技術選型,讓 agent 把資訊蒐齊再 propose plan 給你。
  • research 排在 build 之前,先補足脈絡,計畫才不會建立在空想上。

讓 agent「grill」你

  • 規劃階段最該做的事,是讓 coding agent 反過來問你一大堆問題。
  • Nate 剛發了一支介紹 Matt Pocock 的 grill-me skill 的影片,Cole 評這個 skill「really good」。
  • 目的:「make sure that the coding agent is not assuming a ton of things about what you want it to do.」別讓它擅自假設。
  • 它問得越多、你答得越清楚,最後那份 plan 你才敢說「both you and the coding agent are aligned」。

plan mode 之爭:內建 vs 自寫 planning skill

Cole 為何通常不用內建 plan mode

  • 被問到是否用 plan mode 時,Cole 回答:「Usually I don't use plan mode.」這是他個人的習慣,別當成通則。
  • 原因:「Plan mode puts Claude Code into a bit of a different behavior that I'd rather be able to control more myself.」
  • 他寧可自寫一個 planning skill:「Instructions for how I want it to ask me questions and then just generally how I want to go about researching and organizing things into a plan.」
  • 自寫 skill 讓他能定義「要有哪些 sections」「怎麼問問題」「怎麼 research」,他認為這些是內建 plan mode 不讓你細調的地方。
  • 內建 plan mode 本身很好上手:工作中按 Shift+Tab 循環,直到狀態列顯示 plan mode on(截至 2026-10)。新手怎麼用內建 Plan Mode,CC 高階第 2 堂有完整講解;本堂講的是你想要更多控制時的下一步。

這是「control 與 customizability」之爭

  • Cole 說這是貫穿他所有內容的主題:「I like to have control and customizability, cuz in the end that's how you get the best results.」
  • 他在訪談中的類比:自己不用 OpenClaw 之類的現成工具,而是直接在 Claude Code 上自建 second brain,因為「running something that you don't understand」很難真正變成你自己的系統。
  • 他也誠實補一句:內建 plan mode「it'll build something actually pretty much like this」,對新手已經夠用。
  • 結論:新手先用內建 plan mode 養成「先規劃」的習慣;進階者再把它升級成自寫 planning skill。 兩者排在學習曲線的兩端,並不衝突。

核心心法:intent engineering,給它「why」

你不必告訴它「怎麼建」,你要告訴它「為何而建」。why 會反過來把 how 形塑得更好。

把自己當 Claude Code 的產品經理

你的角色是 shape the vision

  • Cole 在訪談收尾的核心建議:「No matter how technical you are... you could think of yourself like the product manager for Claude Code.」
  • 產品經理做什麼?「You don't necessarily have to describe how to build something, but it's important for you to shape the vision.」
  • 你負責回答「what are we going to build」與「為什麼」,把「怎麼建」的細節留給 agent。
  • 這是第 1 堂導演心態的延伸:導演定義願景,不必親自打光收音。

intent engineering:給它 why

  • Cole 在訪談時說,當時不少人把這個做法叫 intent engineering:「you want to give like the why.」
  • 做法:「Claude Code, this is why we're building this thing.」明確告訴它這東西為何存在、要解決誰的什麼問題。
  • 為什麼有效:「That really actually ends up shaping the how quite well.」你給了 why,它就能自己推導出更合理的 how。
  • Cole 提到,他在 Claude 官方文件讀到,給模型「context for why you're doing something」確實會讓它做得更好。

案例:Nate 的報價自動化為何失敗

underscope 的代價

  • Nate 回憶經營 agency 時最大的失敗之一,是報價自動化:要翻大量歷史報價、過往客戶案、提案來生成新報價。
  • 失敗原因他自己點名:「I underscoped that build. We went into it not realizing how much actually is necessary to get to an accurate quote.」
  • 一個準確報價背後有「so many different factors」,他在規劃時沒問足夠的問題,就直接開建。
  • 他學到的教訓正好是本堂全部:「The importance of asking enough questions and scoping」,以及把工作切分清楚。

實作:為一個真實任務寫一份 spec

不要只讀。挑一個你「這週真的想做」的任務(一支腳本、一個小工具、一份自動化),跟著把 spec 寫出來,並讓 Claude grill 你。

第一步:自己先寫初稿

用四區塊模板起草

  1. 打開一個 plan.md,依 Goal / Success / Validation / Integration 四段填寫
  2. Goal 與 why 都要寫,記得 intent engineering,告訴它「為何而建」
  3. 故意留白你還沒想清楚的地方,等下讓 agent 來 grill
  4. 先別貼給 Claude,先逼自己把能想到的寫滿
plan.md 模板(先自己填)
# Goal
我要建什麼:________
為什麼要建(why / intent):________

# What success looks like
完成後具體看得到的樣子:________

# Validation strategy
agent 要如何向我證明它真的做完且能運作:________

# Integration points
會建立 / 編輯 / 影響到哪些檔案或既有功能:________

第二步:讓 Claude 用 grill-me 風格反問你

把初稿交出去被「烤」

  • 貼上你的 plan.md,明確要它「先別動手」,改用提問模式逼出你的盲點。
請 Claude grill 你
這是我的 plan 初稿(見下方)。先不要寫任何程式,也不要直接幫我補完。
請用「grill me」的風格,針對這份 plan 反問我 5–8 個最關鍵的問題:
聚焦在你目前必須「假設」才能往下做的地方、成功標準是否可驗證、
以及 integration points 有沒有漏。一次把問題列完,我會逐題回答。

[貼上你的 plan.md]

把答案整理回 spec

  • 逐題回答後,請它把你的回答收斂回更新版 plan。
收斂成對齊後的 plan
以下是我對每個問題的回答(見下方)。請據此更新 plan.md,
讓 Goal / Success / Validation / Integration 四段都不再有未確認的假設。
更新完,用一段話跟我確認:你現在理解的「我們要建什麼、如何驗證」是什麼。
對齊後我才會說「go and do」。

[貼上你的逐題回答]

開工前的自我檢查表

  • 我的 plan 有完整四區塊:Goal / Success / Validation / Integration
  • 我在 Goal 裡寫了 why(intent),不只寫 what
  • 我讓 Claude grill 我 5–8 題,而不是讓它擅自假設
  • 我把回答整理回 spec,四段都沒有未確認的假設
  • 我和 agent 已對齊,才說出「go and do」
🎙️講師帶領:本堂節奏與重點講師視角 · 點開

時間配置(約 60 分鐘):為何規劃最關鍵 12 分 → 四區塊 spec 結構 12 分 → planning workflow 與 plan mode 之爭 12 分 → intent engineering 8 分 → 實作帶學員寫一份真 spec 並現場 grill 12 分 → Q&A 4 分。

教學重點:

  • 一定要讓學員「當場」打開一個檔案寫 plan,不要只講。本堂最大的價值是肌肉記憶:四區塊 + 讓 agent 反問。
  • 解釋 plan mode 之爭時,務必中立:Cole 自寫 planning skill 是為了 control 與 customizability,但他也說內建 plan mode「會 build 出差不多的東西」。新手用內建、進階者自寫,兩者不衝突。
  • intent engineering 段落親自示範一次:同一個 plan,一版有 why、一版沒有,讓學員看 agent 推導出的 how 差多少。

常見學員問題 / 抗拒:

  • 「我規劃半小時還沒開始寫,主管會覺得我在混。」→ 用 Nate 報價失敗的案例反駁:underscope 的返工成本遠高於規劃時間。
  • 「給它 why 很 cringe。」→ 直接引 Cole 原話:「kind of cringe... but that actually is how you get the best results. So just do it.」
  • 「那我到底該不該用 plan mode?」→ 先用,養成先規劃的習慣;等你能說清楚「我想要它怎麼問、plan 要有哪些 section」時,再升級成自寫 skill。

學員常見問題與總結

把本堂濃縮成可以帶走的幾句話。

五個最常見問題

  • Q:spec 一定要四個區塊都寫嗎? → 是。少了 Validation 與 Integration,agent 就會擅自假設,這正是返工的源頭。
  • Q:我不技術,integration points 寫不出來怎麼辦? → 讓 sub agent 先 research,再請它 propose;你至少要看得懂「它打算動哪些東西」。
  • Q:到底要不要用 plan mode? → 新手先用內建養習慣;想要更多 control 與 customizability 時,再自寫 planning skill。
  • Q:grill-me 會不會問太多很煩? → 那正是重點。它問你 5–8 題,換掉的是 build 完才發現方向錯的整段重來。
  • Q:給它 why 真的有差嗎? → 有。Cole 說他讀過 Claude 官方文件也建議說明目的,給 intent / why 會讓它把 how 做得更好。

一句話帶走

  • 規劃 = 寫一份四區塊 spec(Goal / Success / Validation / Integration)+ 讓 agent grill 你 + 給它 why。
  • 你當 product manager,shape the vision,不用描述「怎麼建」。
本堂帶走 · TAKEAWAYS
規劃是真正的槓桿

委派整段執行,成敗取決於 plan;前期投入越扎實,返工越少

單一 markdown spec

Goal / Success / Validation / Integration 四區塊,一份文件貫穿全程

grill-me 對齊法

讓 agent 反問你 5–8 題,把「擅自假設」前置成「明確提問」

intent engineering

給它 why,why 會反過來形塑 how;把自己當 Claude Code 的產品經理

🎙️講師結語講師視角 · 點開

收尾請把學員的注意力釘在一句話上:「Its success is really just dependent on how good is your plan.」本堂教的是一個工作習慣:先寫 spec、再被 grill、給足 why,然後才開工。請預告:第 5 堂我們把重複的流程封裝成 skill,之後的第 6 堂再談驗證。帶著一份好 spec 和一組好 skill,你才真的敢對 Claude 說「go and rip through this」。

你不是在描述「怎麼建」,你是在 shape the vision。
下一堂,我們把重複的流程封裝成 skill。
ESC
常用