Goal Definer任務目標訪談

Interview a fuzzy task into a six-element goal prompt an agent can run for hours without drifting or wrapping up early把講不清楚的任務訪談成六元素 goal prompt,讓 agent 自己跑好幾個小時也不偏離、不提早收工

EN繁中Model-invoked模型叫用
Read SKILL.md on GitHub在 GitHub 看 SKILL.md

A long-running agent doesn't usually fail by doing the wrong thing. It fails by deciding it's finished. "Optimize the checkout speed" is satisfied by a single cache header; "tidy up our customer data" is satisfied by deduplicating one column. This skill interviews a fuzzy task until it becomes a six-element goal prompt that another agent could work against for hours, and could verify without you looking at the result.

Install

npx skills add https://github.com/leoluyi/skills -g -a goal-definer -y

To update later:

npx skills update goal-definer

Source

What it does

It runs a conversation, one question at a time, never as a form to fill in. Six things come out of it:

  • Outcome — the finished state in observable terms. Vague answers get pushed back: "better", "更完整", "more polished" are refused until you say what specifically changes, who uses the result, and what decision it supports.
  • Verification — how the agent proves it's done without you eyeballing it. For engineering work that means tests, lint, benchmark thresholds, error counts. For writing, strategy or research it means inspectable criteria: does it answer the named questions, cite the required sources, match the defined audience, avoid the named anti-patterns, hit the target format.
  • Constraints — what can't change, what can't be assumed, what data and systems are off-limits, what style or strategy is forbidden.
  • Boundaries — the read/write surface. What it may read, what it may modify, what it must not touch, whether anything may leave the machine.
  • Iteration Policy — what gets logged each round. At minimum: what this round did, what came of it, what's most worth trying next.
  • Blocked Stop Condition — when to give up and what the report has to contain: what was tried, where it jammed, what information is missing, and what decision from you would unblock it.

Then it hands back three things: a diagnosis naming where your original phrasing was ambiguous, the paste-ready goal prompt, and one line on the highest-risk thing left to sanity-check.

When to use

When the task will take hours, you don't have a plan for it yet, and the way you'd describe it out loud is still a verb like "optimize", "clean up" or "rewrite". Those verbs are where agents stop early, because they're true of almost any amount of work.

When not to

Not when you already have a written plan — Plan → Goal takes it from there, asking the code instead of asking you. Not for writing the plan itself. And not for a task one prompt would finish; a goal spec for a one-line change is pure overhead, and the skill will say so and stop rather than humour you.

How it works

The whole design is a refusal to accept an unverifiable answer. "Higher quality" isn't a criterion, so it gets pushed on; if you can't make it concrete, the skill says so in the diagnosis instead of quietly writing a generic goal around the hole. It also won't invent constraints or boundaries you didn't state — anything that looks important but wasn't mentioned gets asked about, not assumed.

Where the task genuinely hinges on subjective quality ("the article should sound human"), it points you at distilling a taste rubric first and feeding that into Verification, rather than pretending a machine check exists.

Related skills

taste-distiller produces the rubric that Verification can point at when the standard is a matter of taste rather than a passing command. plan-to-goal covers the neighbouring case: you already have a plan, so the questions go to the code first and only the genuinely open forks come to you.

長時間執行的 agent 通常不是敗在做錯事,而是敗在自己判定做完了。「優化結帳速度」加一個 cache header 就滿足了;「整理客戶資料」去重一個欄位也滿足了。這個技能把講不清楚的任務訪談成六元素 goal prompt,讓另一個 agent 能對著它跑好幾個小時,而且不用你盯著看就能自行驗證。

安裝

npx skills add https://github.com/leoluyi/skills -g -a goal-definer -y

之後更新:

npx skills update goal-definer

原始碼

它做什麼

它以對話進行,一次問一個,不會丟一張表格叫你填。最後產出六件事:

  • Outcome——用可觀察的方式描述完成狀態。含糊的回答會被退回:「更好」「更完整」「更有質感」一律不收,直到你講出具體會變成什麼樣、誰會用這個成果、它要支持什麼決策。
  • Verification——agent 怎麼在你不看結果的情況下證明自己做完了。工程類就是測試、lint、benchmark 門檻、錯誤數;寫作、策略、研究類則是可檢查的判準:有沒有回答指定的問題、有沒有引用該引的來源、有沒有對到設定的讀者、有沒有避開點名的反模式、有沒有符合目標格式。
  • Constraints——什麼不能改、什麼前提不能假設、哪些資料和系統碰不得、哪些風格或策略禁止。
  • Boundaries——讀寫範圍。可以讀什麼、可以改什麼、什麼絕對不能動、有沒有任何東西可以離開這台機器。
  • Iteration Policy——每一輪要記錄什麼。最少要有:這一輪做了什麼、結果如何、下一步最值得試什麼。
  • Blocked Stop Condition——什麼時候該放棄,以及回報必須包含什麼:試過什麼、卡在哪、缺什麼資訊、要你做什麼決定才能解鎖。

接著它交回三樣東西:指出你原本的講法哪裡模糊的診斷、可以直接貼的 goal prompt,以及一行提醒你執行前最該確認的風險。

何時使用

當任務會跑好幾個小時、你還沒有計畫,而且你口頭描述它時用的還是「優化」「整理」「重寫」這類動詞的時候。agent 就是在這些動詞上提早收工的——因為不管做多少,這些動詞都成立。

何時不要

已經有寫好的計畫時不要用——那交給 Plan → Goal,它會先去問程式碼而不是問你。也不要用來寫計畫本身。一個 prompt 就能做完的任務同樣不要用;為了一行改動寫 goal 規格純屬多餘,而且技能會直接講明並停下來,不會陪你演。

運作方式

整個設計就是拒絕接受無法驗證的答案。「品質更高」不是判準,所以會被追問;如果你真的講不具體,技能會在診斷裡明說,而不是繞著那個洞偷偷寫出一份泛泛的 goal。它也不會憑空生出你沒講過的限制或範圍——看起來重要但你沒提到的事,它會問,不會自己假設。

當任務本質上就是主觀品質(「這篇文章要讀起來像人寫的」),它會請你先蒸餾一份品味 rubric 再放進 Verification,而不是假裝有一個機器可驗的檢查存在。

相關技能

taste-distiller 會產出那份 rubric——當標準是品味而不是一道會通過的指令時,Verification 就指向它。plan-to-goal 負責隔壁那個情況:你已經有計畫了,所以問題先丟給程式碼,只有真正待決的分歧才會回來問你。