> Harness EngineeringHarness EngineeringHarness Engineering The engineering outside the model模型之外的工程模型之外的工程

7.3

What I cut, and what the data says我砍掉了什麼,數據怎麼說我砍掉了什么,数据怎么说

This chapter assumes you have read Use subagents sparingly and Manage tasks, not chats.

讀這一章,你需要讀過 慎用子 agent 和 管任務,不管對話。

读这一章之前,需要先读过慎用子 agent和管任务,不管对话。

The Knowledge經驗分享经验分享

In one sentence

The three job-title agents cost the most and bought nothing I could measure. Removing them, along with levels and a separate coordinator, made the harness simpler. Only the first removal was measured.

一句話

按職位分工的三個 agent 花得最多,卻沒買到任何我量得出來的東西。把它們拿掉,連同級別和獨立的協調者一起拿掉,harness 變簡單了。只有第一項砍掉的東西是量過的。

一句话

三个按岗位分工的 agent 花得最多,却没换来我能量出来的任何东西。把它们连同级别和单独的协调者一起拿掉,harness 简单了。只有第一刀是量过的。

For leaders

  • The decision: ask of every agent, rule and step what it bought and what would make it safe to remove, and set a time to review the answers.
  • The risk: setups only grow, so every part keeps costing context, upkeep and learning time. The one cut I measured was three job-title agents against one agent: several times the cost for the same number right, on four tasks run once each.
  • The cost of doing it right: an hour to list the parts and write one line for each. The harder cost is telling the people already using a part what replaces it.
  • Ask the team: "For each agent, rule and step: what did it buy, how do you know, and what would make it safe to remove?"

給主管

  • 要做的決定:對每個 agent、規則和步驟都問:它買到了什麼,怎樣才能安全地拿掉它。然後定一個時間,回頭檢查答案。
  • 風險:設定只會越長越大,所以每個部分都在持續花上下文、維護和學習的時間。我量過的那一刀,是三個按職位分工的 agent 對一個 agent:答對的數量一樣,花費是好幾倍。四個任務,各跑一次。
  • 做對的成本:一個小時,把各部分列出來,每個寫一行。更難的成本,是告訴已經在用某個部分的人,用什麼取代它。
  • 可以問團隊:「每個 agent、規則和步驟:它買到了什麼,你怎麼知道,怎樣才能安全地拿掉?」

写给管理者

  • 要拍板的事:对每个 agent、规则和步骤都问一遍:它换来了什么,什么情况下可以安全地拿掉。并定一个时间来复查这些答案。
  • 风险:配置只会越长越大,所以每个部分都在持续占用上下文、维护成本和学习时间。我量过的只有一刀:三个按岗位分工的 agent 对一个 agent,做对的数量一样,成本是好几倍;一共四个任务,每个只跑了一次。
  • 做对的代价:花一个小时把各部分列出来,每个写一句话。更难的代价是,要告诉已经在用某个部分的人,拿什么来替代它。
  • 可以问团队:“对每个 agent、规则和步骤:它换来了什么?你怎么知道?什么情况下可以安全地拿掉?”

The problem

Every part you add to an agent setup has a price. It takes room in the context, it has to be kept true, and a newcomer has to learn it. Most setups only grow, because adding feels like progress and removing feels like losing something.

I want to ask a different question of each part: what did it buy, and when can it go? If I cannot answer the first, the part is a cost with no return. If I cannot answer the second, I will keep it forever.

Version 1.0 of my own setup was a good test of this. It had several parts that sounded right. I shipped it, used it, and after a few days of use, in version 1.1, I took out a large share of it. This chapter lists what I cut and why. It keeps one line clear throughout: for each cut, what I measured and what I only judged.

A few words first.

  • A level was a choice the user made at the start of each job: a light level for a quick answer, a middle one for a medium task, a heavy one for several agents working together. Different levels had different rules.
  • A coordinator is an agent whose only job is to hand work to others (the word is used as in Use subagents sparingly). In my old heavy level it was a separate agent.
  • A request folder was a separate folder, apart from the task, where the heavy-level team kept its plan, its handovers and its results.
  • A job-title agent is an agent given a role like planner, builder or reviewer, as in a team of people.

問題

你加進 agent 設定的每個部分,都有代價。它占上下文的空間,要有人讓它保持正確,新人要花時間學它。多數設定只會越長越大,因為加東西像是進步,拿東西像是損失。

我想對每個部分問另一個問題:它買到了什麼,什麼時候可以拿掉?答不出第一個,這個部分就是只有成本、沒有回報。答不出第二個,我就會永遠留著它。

我自己設定的 1.0 版,是這個問題的好考題。它有好幾個聽起來很對的部分。我發布了它,用了它,用了幾天之後,在 1.1 版裡拿掉了很大一部分。這一章列出我砍了什麼、為什麼砍。整章只守一條線:每一刀,哪些是我量過的,哪些只是我的判斷。

先說幾個詞。

  • 級別是使用者在每個工作開始時做的選擇:輕的級別用來快速回答,中間的用於中等的任務,重的讓好幾個 agent 一起工作。不同級別有不同的規則。
  • 協調者是只負責把工作交給別人的 agent(用法和 慎用子 agent 一樣)。在我舊的重級別裡,它是一個獨立的 agent。
  • 請求資料夾是和任務分開的另一個資料夾。重級別的團隊把計劃、交接和結果放在這裡。
  • 按職位分工的 agent是被給了一個角色的 agent,例如計劃者、實作者或 reviewer,就像一個人的團隊那樣。

问题

给 agent 配置加的每个部分都有代价。它占上下文的空间,要一直保持正确,新人还得去学它。大多数配置只会越长越大,因为加东西像是在前进,拿东西则像是在失去什么。

我想对每个部分问另一个问题:它换来了什么,什么时候可以拿掉?第一个答不上来,这个部分就是只花钱不回本。第二个答不上来,我就会永远留着它。

我自己配置的 1.0 版,正好拿来检验这件事。它有好几个听起来很对的部分。我发了版,用了几天,在 1.1 版里拿掉了其中很大一部分。这一章列出我砍掉了什么、为什么。通篇保持一条清楚的线:每一刀,哪些是我量过的,哪些只是我的判断。

先交代几个词。

  • 级别,是用户在每个工作开始时做的一个选择:轻的用来快速回答,中等的用于中等任务,重的用于几个 agent 一起干活。不同的级别规则不同。
  • 协调者,是只负责把活分给别人的 agent(这个词的用法和慎用子 agent里一样)。在我以前的重级别里,它是一个单独的 agent。
  • 请求文件夹,是和任务分开的另一个文件夹,重级别的团队把计划、交接和结果放在里面。
  • 按岗位分工的 agent,是被指定了计划者、开发者或 reviewer 这类角色的 agent,就像人的团队那样。

How it works

At a glance

The four cuts, with how much evidence each has. The sections below give the reasons.

Cut What it was meant to buy Why it went Evidence Reconsider when
Three job-title agents A division of labour like a human team Several times the cost, same result Measured: 4 tasks, one run each, direction only A comparison on a larger, messier task shows a gain
Levels Rules matched to the difficulty of a job Only one was used; hard to choose; rules clashed My experience of use, no count How hard a job is can be reliably told before it starts
Separate coordinator Someone to hand out the work The one that understands is not the one that acts; the worker learns it again Reasoned; a clue in the test records, not measured alone The platform can restore the context of a finished subagent
Request folder A separate place for a team's files Nothing needed it once the team was gone Follows from the other cuts, untested A flow comes back that needs its own workspace

The test I use for any part

Your setup also only grows, so these questions are for you. Before I keep a part, I ask the same few questions (the ones in Roll out and govern a harness): what failure does it prevent, with a real example? What does it cost? What would have to change for it to go? The cuts below are those questions, answered late, after use.

version 1.0 version 1.1 three levels, user picks three job-title agents coordinator builder reviewer request folder one task folder one agent does the work reviewer, when asked for removal measured (direction only) removal not measured
Two versions of the structure. Four things went; only the three job-title agents were measured, and the reviewer stayed as an independent check.

The picture shows the two versions. The lit box is the one cut I measured. The dashed boxes are the cuts I did not measure.

Cut 1: the three job-title agents (measured)

In 1.0, the heavy mode ran a team: a coordinator wrote the plan, a builder made the changes, a reviewer checked them. I compared it with one agent working alone on the same four tasks. That test is in Use subagents sparingly, so I will not repeat it. Only what limits it matters here.

  • Four tasks, each run once. Run it again and the numbers move.
  • The two sides were not equal. The single agent used a top model; the team had a knowledge base to read (A knowledge base: an honest index of the code).
  • What I trust is the direction. The team cost several times more, with the same number right. I do not trust the exact ratio.

So this cut has data, and the data is thin. It is enough to say the team did not pay on those tasks. It does not say a team never pays. I kept one role, the independent reviewer, because an independent check is one of the four things worth a second agent. That is reasoning, not a measurement: I did not test the reviewer alone, to the same standard as the cut that I did measure.

Cut 2: levels (design history, no data)

I did not measure levels. What I have is what I saw using them.

  • Only the middle level got used. The light and the heavy ones sat idle most of the time.
  • Choosing a level first was one more step every time.
  • Two sets of rules side by side confused the agent. It gave wrong explanations about which applied.
  • The deeper reason: how hard a job is cannot be told before it starts. A level asks you to guess.

This is my own experience over a few days, not a count. I did not log how often each level was used. What replaced levels is the task, with care set by what a mistake would cost and the kind of the task (Manage tasks, not chats).

Cut 3: the separate coordinator (reasoned, partly from the test)

The problem was not whether the coordinator understood the task. It did. The problem was that the one that understood was not the one that acted, so the worker it handed the task to had to learn it again. That matches what I saw in the records of the three-role test: the coordinator read the files and understood the change, and the builder started from nothing and read them again.

The test compared the whole team with one agent, not the team with and without a separate coordinator, so I have no number for the coordinator alone. The double reading in the records is a clue, not a measurement. The rest is an argument: whoever moves a task forward has to understand it, and the agent that holds the task already does.

Cut 4: the request folder (design history, no data)

The heavy-level team kept its work in a request folder, separate from the task folder. Once the heavy-level flow was gone, a second place to keep a job's files had no use. The task folder is the workspace. One place is easier to find, to back up, and to read for a person or a new session. I did not test this. It follows from the other cuts: nothing needed it any more.

What the cuts took out, and what it did to the harness

The 1.1 release removed the levels, the whole heavy-level flow with its commands, two agents, a skill, some numbers in the configuration and the request folder. It also shortened the rules that are injected at the top of every prompt to three or four lines, and it dropped the limits on the count of searches and tool calls. The agent now sees fewer rules, and fewer ways to be confused.

This is the benefit I trust most, and it is not a measurement. A smaller harness is easier to explain, to test and to hand to a colleague (Roll out and govern a harness). I did not measure the effect on accuracy or cost.

Things I chose not to build

A cut removes something that existed. There is a second list: things I decided not to build, each with the condition that would make me reconsider. A few examples:

  • Agents sending messages to each other. A subagent has no state, and messages across sessions were not verified. Reconsider when it is measured to be reliable.
  • Several subagents changing the same files at once. Merge conflicts, and the code cannot be run to judge who is right. Reconsider when the repository can run its tests locally.
  • My own sandbox, context compression or subagent scheduling. The platform keeps changing these, and I would rather wait for the platform.
  • Features built on Preview or experimental settings. They can change or vanish. Reconsider when they are stable.

The habit behind the list: a "no" that comes with a reason and a condition can be reopened. A "no" with neither becomes a taboo.

原理

一眼看完

四刀,各有多少證據。後面的小節說明原因。

砍掉的 本來想買到什麼 為什麼拿掉 證據 什麼時候重新考慮
三個按職位分工的 agent 像人的團隊那樣分工 花費好幾倍,結果一樣 量過:4 個任務,各跑一次,只看方向 在更大、更亂的任務上比較,顯示有好處
級別 規則配合工作的難度 只用到一個;難選;規則互相打架 我的使用經驗,沒有計數 開始之前,就能可靠地知道一個工作有多難
獨立的協調者 有人負責分配工作 懂的那個不是動手的那個;做事的要重學一遍 推理出來的;測試紀錄裡有線索,沒有單獨量過 平台可以還原一個已結束的子 agent 的上下文
請求資料夾 團隊檔案的獨立位置 團隊沒了以後,沒有東西需要它 從其他幾刀推出來的,沒有測 需要自己工作區的流程回來了

我對任何部分都用的測試

你的設定也只會越長越大,所以這些問題是問你的。留下一個部分之前,我問同樣的幾個問題(就是 落地與治理 裡那些):它防止什麼失敗,有真實的例子嗎?它花多少?要變成什麼樣,它才能拿掉?下面的每一刀,就是這些問題,在用過之後才遲遲回答出來。

1.0 版 1.1 版 三個 Level,由使用者選 三個職稱 agent 協調者 實作者 審查者 request 資料夾 一個任務資料夾 一個 agent 做事 審查者,需要時才用 移除有量測(只看方向) 移除沒有量測
結構的兩個版本。拿掉了四樣東西;只有三個職稱 agent 量測過,審查者留下來當獨立檢查。

圖裡是兩個版本。亮著的方框是我量過的那一刀。虛線方框是我沒量的幾刀。

第一刀:三個按職位分工的 agent(量過)

在 1.0 裡,重模式執行一個團隊:協調者寫計劃,實作者改程式碼,reviewer 檢查。我拿它和一個 agent 單獨做同樣的四個任務比。那個測試在 慎用子 agent 裡,所以我不重複。這裡只講它的限制。

  • 四個任務,各跑一次。再跑一次,數字會動。
  • 兩邊並不對等。單一 agent 用的是頂級模型;團隊有一個知識庫可以讀(知識庫:程式碼的誠實索引)。
  • 我相信的是方向。團隊花了好幾倍,答對的數量一樣。確切的倍數,我不信。

所以這一刀有數據,但數據很薄。它足以說:在那些任務上,團隊不划算。它不能說團隊永遠不划算。我留下了一個角色,獨立的 reviewer,因為獨立檢查是值得多一個 agent 的四件事之一。這是推理,不是量出來的:我沒有用量那一刀的同樣標準,單獨測 reviewer。

第二刀:級別(設計歷史,沒有數據)

我沒有量過級別。我有的,是用它們時看到的事。

  • 只有中間的級別被用到。輕的和重的,多半閒置。
  • 先選級別,是每次多一步。
  • 兩套規則並排放著,讓 agent 糊塗了。它會給出錯的解釋,說哪一套適用。
  • 更深的原因:工作有多難,在開始之前是看不出來的。級別要你去猜。

這是我幾天裡自己的經驗,不是計數。我沒有記錄每個級別被用了幾次。取代級別的是任務:照出錯的代價和任務的種類,決定要多小心(管任務,不管對話)。

第三刀:獨立的協調者(推理出來的,部分來自測試)

問題不是協調者懂不懂任務。它懂。問題是,懂的那個不是動手的那個,所以它交辦的做事者,得把任務再學一遍。這和我在三角色測試的紀錄裡看到的一致:協調者讀了檔案,懂了這個改動;實作者從零開始,又把它們讀了一遍。

那個測試比的是整個團隊和一個 agent,不是有獨立協調者和沒有的團隊,所以協調者單獨的數字我沒有。紀錄裡讀了兩次,是線索,不是量測。其餘是論證:推動任務前進的人,必須懂這個任務,而持有任務的 agent 已經懂了。

第四刀:請求資料夾(設計歷史,沒有數據)

重級別的團隊,把工作放在請求資料夾裡,和任務資料夾分開。重級別的流程沒了以後,第二個放工作檔案的地方就沒有用了。任務資料夾就是工作區。一個地方比較好找、好備份,人或新會話也比較好讀。我沒有測這個。它是從其他幾刀推出來的:沒有東西再需要它了。

這幾刀拿掉了什麼,對 harness 做了什麼

1.1 版拿掉了級別、整個重級別的流程和它的指令、兩個 agent、一個 skill、設定裡的一些數字和請求資料夾。它也把每個 prompt 開頭注入的規則縮短成三、四行,並去掉了對搜尋次數和工具呼叫次數的限制。現在 agent 看到的規則更少,能搞糊塗的地方也更少。

這是我最相信的好處,而它不是量出來的。小一點的 harness,比較好說明、好測試,也比較好交給同事(落地與治理)。我沒有量對準確度或成本的影響。

我選擇不做的事

砍掉的,是原本存在的東西。還有第二份清單:我決定不做的事,每一項都附上讓我重新考慮的條件。幾個例子:

  • agent 之間互相傳訊息。子 agent 沒有狀態,跨會話的訊息也沒有驗證過。等量出它可靠了,再重新考慮。
  • 好幾個子 agent 同時改同一批檔案。會有合併衝突,而且程式碼跑不起來,就沒辦法判斷誰對。等倉庫可以在本機跑測試了,再重新考慮。
  • 我自己的沙箱、上下文壓縮或子 agent 排程。平台一直在改這些,我寧可等平台。
  • 建在 Preview 或實驗性設定上的功能。它們可能改變或消失。等它們穩定了,再重新考慮。

這份清單背後的習慣:附上理由和條件的「不」,可以重新打開。兩樣都沒有的「不」,會變成禁忌。

原理

一览

四刀,以及每一刀有多少证据。理由在下面各节。

砍掉的 本来想换来什么 为什么拿掉 证据 什么时候重新考虑
三个按岗位分工的 agent 像人的团队那样分工 成本好几倍,结果一样 量过:4 个任务,各跑一次,只看方向 在更大、更乱的任务上做对比,显示有好处
级别 规则配合工作的难度 只用到一个;难选;规则互相打架 我的使用经验,没有计数 开工之前就能可靠地判断一个工作有多难
单独的协调者 有人负责分配工作 懂的那个不是动手的那个;干活的要重学一遍 推理出来的;测试记录里有线索,没有单独量过 平台能恢复一个已结束的子 agent 的上下文
请求文件夹 团队文件的独立位置 团队没了以后,没有东西需要它 从其他几刀推出来的,没有测 需要自己工作区的流程回来了

我对任何一个部分用的检验

你的配置也只会越长越大,所以这些问题是留给你的。在留下一个部分之前,我都问同样的几个问题(就是落地与治理里的那几个):它防止了什么故障,有真实的例子吗?它花多少?要变成什么样,它才能拿掉?下面的几刀,就是这些问题在用过之后才答出来的结果。

1.0 版 1.1 版 三个 Level,由用户选 三个岗位 agent 协调者 开发者 reviewer request 文件夹 一个任务文件夹 一个 agent 干活 reviewer,需要时才用 移除有测量(只看方向) 移除没有测量
结构的两个版本。拿掉了四样东西;只有三个岗位 agent 测量过,reviewer 留下来当独立检查。

这张图画的是两个版本。亮着的框是我量过的那一刀。虚线框是我没量过的几刀。

第 1 刀:三个按岗位分工的 agent(量过)

在 1.0 里,重模式跑一个团队:协调者写计划,开发者改代码,reviewer 做检查。我拿它和一个 agent 单干,在同样的四个任务上做了对比。那个测试在慎用子 agent里,这里不再重复。这里只关心它的局限。

  • 四个任务,每个只跑一次。再跑一次,数字就会变。
  • 两边条件不对等。单个 agent 用的是顶级模型;团队有一份知识库可读(知识库:代码的诚实索引)。
  • 我信的是方向。团队贵好几倍,做对的数量一样。具体倍数我不信。

所以这一刀有数据,但数据很薄。足以说明在那些任务上,团队不划算。它不能说明团队永远不划算。我留下了一个角色,也就是独立的 reviewer,因为独立检查是值得多一个 agent 的四样东西之一。这是推理,不是测量:我没有用量过的那一刀同样的标准,单独测过 reviewer。

第 2 刀:级别(设计史,没有数据)

我没有量过级别。我手里有的,是用它们时看到的情况。

  • 只有中等级别被用到。轻的和重的大多数时候闲着。
  • 先选级别,每次都多一步。
  • 两套规则放在一起,会把 agent 弄糊涂。它会就“哪套适用”给出错误的解释。
  • 更深的原因是:一个工作有多难,开工之前是判断不了的。级别要你去猜。

这是我几天里的亲身经验,不是计数。我没有记录每个级别被用了多少次。替代级别的是任务,谨慎的程度由出错的代价和任务的类型来定(管任务,不管对话)。

第 3 刀:单独的协调者(推理出来的,部分来自测试)

问题不在协调者有没有弄懂任务。它弄懂了。问题在于:弄懂的那个不是动手的那个,所以它把任务交给的干活的,还得再学一遍。这和我在三角色测试的记录里看到的一致:协调者读了文件,弄懂了要改什么,而开发者从零开始,又把它们读了一遍。

测试比较的是整个团队和一个 agent,不是有单独协调者和没有单独协调者的团队,所以单独的协调者我没有数字。记录里的重复阅读,是线索,不是测量。其余是一个论证:推动任务往前走的人必须理解它,而拿着这个任务的 agent 本来就理解。

第 4 刀:请求文件夹(设计史,没有数据)

重级别的团队把工作放在请求文件夹里,和任务文件夹分开。重级别的流程没了之后,再留一个放工作文件的地方就没有用了。任务文件夹就是工作区。一个地方更容易找,更容易备份,人或者新会话读起来也更容易。我没有测过这一点。它是从其他几刀推出来的:不再有东西需要它了。

这几刀拿掉了什么,对 harness 有什么影响

1.1 版拿掉了级别、整个重级别的流程(连同它的命令)、两个 agent、一个 skill、配置里的一些数字,还有请求文件夹。它还把注入在每条 prompt 最前面的规则缩短到三四行,并去掉了对搜索次数和工具调用次数的限制。现在 agent 看到的规则更少,能被弄糊涂的地方也更少。

这是我最信的好处,而且它不是测量出来的。更小的 harness 更容易解释,更容易测试,也更容易交给同事(落地与治理)。对准确率和成本的影响,我没有量过。

我选择不做的

砍,是拿掉原来有的东西。还有第二份清单:我决定不做的东西,每一项都带着会让我重新考虑的条件。几个例子:

  • agent 之间互相发消息。子 agent 没有状态,跨会话的消息也没有验证过。等测出来可靠了再考虑。
  • 好几个子 agent 同时改同样的文件。会有合并冲突,而且代码跑不起来,没法判断谁对。等仓库能在本地跑测试了再考虑。
  • 我自己做沙箱、上下文压缩或子 agent 调度。平台一直在改这些,我宁可等平台。
  • 建立在 Preview 或实验性设置上的功能。它们可能变,也可能消失。等稳定了再考虑。

这份清单背后的习惯是:带着理由和条件的“不”,可以重新打开。两样都没有的“不”,就成了禁忌。

Costs and traps

Cutting is also a bet. The three-role team lost on four tasks, one run each, in a made-up repository. A very large, messy repository with a vague request may be different, and I have no data either way. If your tasks look like that, test before you copy my cut.

Do not read "multi-agent is bad" from this. I kept an independent reviewer, on reasoning that I did not test. I use read-only helpers for broad reading (Use subagents sparingly). What I cut is splitting one piece of work by job title.

An unmeasured cut is a judgment. Levels, the separate coordinator and the request folder went on reasoning and use. A reader could disagree, and I could be wrong. I have written which is which so that you can.

Do not cut and forget. Write down why a thing went and when to reconsider, in the same place as the reason you added it. Without that, someone adds it back a year later for the same reason.

Old setups need an exit. Taking out the old flow broke a request in progress, and anyone with old settings had to change them by hand. The 1.1 notes say so. Removing a part has a cost to the people already using it. When you remove one, say what replaces it, how to move, which old settings stop working, and what happens to work in progress.

代價和陷阱

砍掉也是一場賭注。三角色的團隊輸了,是在四個任務、各跑一次、一個虛構的倉庫裡。一個很大、很亂、需求又模糊的倉庫,可能不一樣,兩邊我都沒有數據。如果你的任務長那樣,先測,再照我的砍法。

不要從這裡讀出「多 agent 不好」。我留下了一個獨立的 reviewer,理由是我沒測過的推理。我用唯讀的幫手去做大範圍的閱讀(慎用子 agent)。我砍掉的,是照職位把一件工作切開。

沒量過的砍法,是一個判斷。級別、獨立的協調者和請求資料夾,是靠推理和使用經驗拿掉的。讀者可以不同意,我也可能錯。我把哪個是哪個寫出來,讓你能自己判斷。

不要砍了就忘。把一樣東西為什麼拿掉、什麼時候重新考慮,寫下來,和當初加它的理由放在同一個地方。不然一年後,有人會因為同樣的理由把它加回來。

舊的設定需要退場的路。拿掉舊流程,讓一個進行中的請求壞掉了,有舊設定的人也得手動改。1.1 的說明寫了這點。拿掉一個部分,對已經在用的人是有成本的。拿掉的時候,要說明用什麼取代、怎麼搬過去、哪些舊設定不再有效,以及進行中的工作會怎樣。

代价和坑

砍也是一种赌注。三角色团队是在一个虚构的仓库里、四个任务各跑一次的情况下输的。一个非常大、非常乱的仓库,加上一个含糊的需求,结果可能不同,两边我都没有数据。如果你的任务像那样,抄我的砍法之前先测一下。

别从这里得出“多 agent 不好”。我留下了独立的 reviewer,依据是我没测过的推理。我用只读的帮手做大范围阅读(慎用子 agent)。我砍掉的,是把一份工作按岗位拆开。

没量过的一刀,只是判断。级别、单独的协调者和请求文件夹,是凭推理和使用经验拿掉的。读者可以不同意,我也可能错。我写明了哪些是哪种,好让你自己判断。

砍了就忘,不行。把一样东西为什么拿掉、什么时候重新考虑,写在你当初记下加它的理由的同一个地方。不然一年后有人出于同样的理由把它加回来。

旧的配置需要出路。拿掉旧流程,弄坏了一个进行中的请求,用着旧设置的人得手工改。1.1 版的发布说明里写了这一点。拿掉一个部分,对已经在用它的人是有代价的。你拿掉一个东西时,要说明拿什么来替代,怎么迁移,哪些旧设置不再生效,进行中的工作会怎样。

When to delete it

The best time to review a cut is after a model upgrade. The reasons behind my cuts were facts about the models and the platform of that month. Models get better at long tasks, and the platform may one day let a finished subagent be resumed, which would remove the relearning cost behind the coordinator cut. Re-run the same fixed tasks and see (Fixed tasks, scored by a script).

The list of "not built, reconsider when" is itself a thing to prune (When the model is upgraded, delete uses the same habit for the rules you keep). When a condition has been met, build it or strike it out.

什麼時候可以刪掉

回頭檢查一刀的最好時機,是模型升級之後。我砍的那些理由,是那個月的模型和平台的事實。模型在長任務上會越來越好,平台有一天也可能讓已結束的子 agent 能繼續,那就會去掉協調者那一刀背後重學的成本。重跑同樣的固定任務,看看結果(固定的任務,用腳本打分)。

「沒做,等條件到了再考慮」的清單,本身也是要修剪的東西(模型升級了,就要刪 對你留下的規則,用的是同一個習慣)。條件到了,就做出來,或者劃掉。

什么时候可以删掉

复查这几刀的最好时机,是模型升级之后。我砍的理由,是那个月的模型和平台的事实。模型在长任务上会越来越好,平台有一天也可能让已结束的子 agent 能接着干,那就会去掉协调者那一刀背后重学的成本。重跑同样的固定任务,看看结果(固定的任务,用脚本打分)。

“不做,等条件到了再考虑”的清单,本身也是要修剪的东西(模型升级了,就要删对你留下的规则,用的是同一个习惯)。条件到了,就做出来,或者划掉。

Try it on your own setup

No harness needed. Open your agent in your own repository and paste:

List every custom agent, skill, rule, hook and check this repository defines for AI agents. For each, write two things: what it bought (a failure it prevented, with a real example from git history or issues if one exists), and what would make it safe to remove. Mark each answer "measured", "seen" or "only reasoned". Put the parts with no stated purpose first. Do not change any files.

在你自己的環境試試

不用裝 harness。在你自己的倉庫裡打開 agent,貼上:

列出這個倉庫為 AI agent 定義的每個 custom agent、skill、規則、hook 和檢查。每一項寫兩件事:它買到了什麼(它防止的一次失敗;如果 git 歷史或 issue 裡有真實的例子,就附上),以及怎樣才能安全地拿掉它。每個答案標上「量過」、「看過」或「只是推理」。沒有說明用途的部分排在最前面。不要改任何檔案。

在你自己的环境里试试

不用装 harness。在你自己的仓库里打开 agent,粘贴:

列出这个仓库为 AI agent 定义的每个自定义 agent、skill、规则、hook 和检查。对每一项写两件事:它换来了什么(它防止的一个故障,如果 git 历史或 issue 里有真实的例子就附上),以及什么情况下可以安全地拿掉。把每个答案标成“量过”“见过”或“只是推理”。没有写明用途的部分放最前面。不要修改任何文件。

Go deeper

延伸閱讀

延伸阅读

You can stop here: that is the whole idea. The next part shows where it runs, so you can look inside.讀到這裡就夠了,這就是整個想法。下一部分告訴你它在哪裡運行,可以進去看看。读到这里就够了,核心思路就是这些。下一部分告诉你它在哪里跑,可以进去看看。

In my practice (Copilot Harness)實作实战

Copilot Harness is my open-source harness for VS Code Copilot.

Repository: https://github.com/Smars-Bin-Hu/copilot-agentic-harness

Get started: clone it, open it in VS Code, and type /harness-rookie-get-me-ready in Copilot Chat. You need Python 3.9 or later and git.

Copilot Harness 是我開源的 VS Code Copilot harness。

倉庫: https://github.com/Smars-Bin-Hu/copilot-agentic-harness

開始:clone 下來,用 VS Code 打開,在 Copilot Chat 裡輸入 /harness-rookie-get-me-ready。需要 Python 3.9 以上和 git。

Copilot Harness 是我开源的 VS Code Copilot harness。

仓库: https://github.com/Smars-Bin-Hu/copilot-agentic-harness

上手:把仓库 clone 下来,用 VS Code 打开,在 Copilot Chat 里输入 /harness-rookie-get-me-ready。需要 Python 3.9 及以上版本和 git。

Explore it in the harness

The 1.0 design is gone from the current harness, but its release notes and design notes remain, with the reasons. The harness can walk you through them. After the setup above, type:

/harness-rookie-wondering I have read the chapter "What I cut". Teach me topic 15, the design choices: why there are no Levels, and the list of what the harness deliberately does not do and when each would be reconsidered. Open the release notes of version 1.1.0 with me, and show what was retired.

It teaches one small piece at a time, stops to ask if you are following, and opens the files with you.

在 harness 裡探索

1.0 的設計已經不在現在的 harness 裡,但它的發布說明和設計筆記還在,理由也都在。harness 可以帶你走一遍。照上面的說明準備好之後,輸入:

/harness-rookie-wondering 我讀完了「我砍掉了什麼,數據怎麼說」這一章。請教我主題 15,設計上的選擇:為什麼沒有級別,以及 harness 刻意不做的事的清單,和各項什麼時候會重新考慮。和我一起打開 1.1.0 版的發布說明,讓我看拿掉了什麼。

它一次教一小塊,停下來確認你跟得上,然後和你一起打開檔案。

在 harness 里探索

1.0 的设计已经不在现在的 harness 里了,但它的发布说明和设计笔记还在,理由也在。harness 可以带你走一遍。按上面的说明准备好之后,输入:

/harness-rookie-wondering 我读完了“我砍掉了什么,数据怎么说”这一章。请教我主题 15,设计取舍:为什么没有级别,以及 harness 有意不做的事的清单,和每一项在什么条件下会重新考虑。带我打开 1.1.0 版的发布说明,让我看看哪些被退役了。

它一次只教一小块,停下来确认你跟上了,再和你一起打开文件。