7.2
Ten things at once: parallel tasks同時管十件事:並行的是任務同时管十件事:并行的是任务
This chapter assumes you have read Use subagents sparingly and Manage tasks, not chats.
The Knowledge經驗分享经验分享
In one sentence
To run ten things at once, run ten separate tasks with one agent each, and call the person only at the gates. Split by task, not by file. Read-only work inside a task can still go to subagents.
一句話
要同時管十件事,就跑十個獨立的任務,每個任務一個 agent,只在門的地方叫人。按任務拆,不按檔案拆。任務裡唯讀的工作,仍然可以交給子 agent。
一句话
想同时管十件事,就开十个独立的任务,每个任务一个 agent,只在关卡处叫人。按任务拆,不按文件拆。任务内部只读的活,仍然可以交给子 agent。
For leaders
- The decision: decide whether people may run several tasks at once, how many to start with, and where a person is called.
- The risk: the limit is a person's attention, not the number of agents. A gate that is always approved without reading is decoration. I have no evidence of a net speed-up: I have not measured ten tasks in parallel against ten in a row.
- The cost of doing it right: usage grows with the number of tasks (ten tasks, ten times the usage), plus a board or a simple list of what waits. Start with two or three.
- Ask the team: "Which tasks are waiting for a person right now and since when, and what happens if two of them change the same files?"
給主管
- 要做的決定:決定人可不可以同時跑好幾個任務、一開始跑幾個、在哪裡叫人。
- 風險:限制是人的注意力,不是 agent 的數量。一道永遠不讀就批准的門,只是裝飾。我沒有淨加速的證據:我沒有量過十個任務並行,對比十個一個接一個。
- 做對的成本:用量隨任務數成長(十個任務,十倍的用量),再加上一個看板,或一份簡單的等待清單。從兩三個開始。
- 可以問團隊:「現在有哪些任務在等人,等多久了?如果其中兩個改了同樣的檔案,會怎樣?」
写给管理者
- 要拍板的事:定下是否允许大家同时跑几个任务,一开始跑几个,以及在哪些地方叫人。
- 风险:瓶颈是人的注意力,不是 agent 的数量。一个永远不看就批准的关卡,只是摆设。我没有整体提速的证据:十个任务并行和十个任务串行,我没有对比测过。
- 做对的代价:用量随任务数增长(十个任务,十倍用量),外加一块看板,或者一份简单的等待清单。先从两三个开始。
- 可以问团队:“现在有哪些任务在等人、等了多久?如果其中两个改了同样的文件,会怎样?”
The problem
An agent can do a lot while you are away. So the next thought is: if one agent is good, why not run many at once? There are two ways to read that thought, and only one of them works.
The first way is one big job with many agents. You hand over a large task, and a coordinator splits it among a team of agents, each with a role (plan, implement, check). This looks like a company org chart. It is the setup that Use subagents sparingly tested: handovers lose understanding, and the same files get read again by every agent. That chapter does not argue against a fresh worker for each step of one task. What it argues against is several agents changing the same files at the same time, because then someone has to merge their work.
The second way is many jobs, one agent each. Ten requests from ten people, or ten different problems of your own. Each one is a separate piece of work with its own folder, its own agent, and its own finish line. Nothing is shared between them, so nothing needs to be merged.
This chapter is about the second way. It is not clever, and it is what lets one person keep ten things moving.
The thing in short supply is not agents. It is you. An agent can wait for a person for hours without using any compute. But what it waits with goes stale: the conversation's cache expires, and the repository may have moved on by the time you answer. A person cannot wait for ten agents without losing the thread either. So the design question is: how do you spend one person's attention across ten tasks?
問題
agent 在你不在的時候可以做很多事。所以下一個念頭是:一個 agent 好用,為什麼不同時跑很多個?這個念頭有兩種讀法,只有一種行得通。
第一種是一個大工作,很多個 agent。你交出一個大任務,由協調者把它分給一組 agent,每個有一個角色(計畫、實作、檢查)。這看起來像公司的組織圖。這就是 慎用子 agent 測過的設定:交接會丟掉理解,同樣的檔案被每個 agent 再讀一遍。那一章並不反對為一個任務的每一步,用一個新的工人。它反對的,是好幾個 agent 同時改同樣的檔案,因為那時就得有人去合併它們的工作。
第二種是很多個工作,每個一個 agent。十個人提的十個要求,或你自己的十個不同問題。每一個都是獨立的一件工作,有自己的資料夾、自己的 agent、自己的終點線。它們之間不共用任何東西,所以不需要合併。
這一章講的是第二種。它不聰明,卻是讓一個人能同時讓十件事前進的辦法。
缺的不是 agent。是你。agent 可以等人好幾個小時,不用任何運算。但它等的時候帶著的東西會過期:對話的快取過期了,等你回答時,倉庫可能已經往前走了。人也沒辦法等十個 agent,而不弄丟線索。所以設計的問題是:怎麼把一個人的注意力,分配在十個任務上?
问题
agent 在你不在的时候能干很多活。于是下一个念头是:一个 agent 好用,为什么不同时开很多个?这个念头有两种理解,只有一种行得通。
第一种,是一件大活配很多 agent。你交出一个大任务,由一个协调者把它分给一队 agent,每个有自己的角色(计划、实现、检查)。看起来像公司的组织架构图。这正是慎用子 agent测过的做法:交接会丢掉理解,每个 agent 又把同样的文件读一遍。那一章并不反对一个任务的每一步都换一个新的帮手。它反对的是好几个 agent 同时改同样的文件,因为那样就得有人来合并它们的成果。
第二种,是很多件活,每件一个 agent。十个人提的十个需求,或者你自己的十个不同的问题。每一件都是独立的一份工作,有自己的文件夹、自己的 agent、自己的终点。它们之间什么都不共享,所以什么都不用合并。
这一章讲的是第二种。它不花哨,但一个人能同时推进十件事,靠的就是它。
稀缺的不是 agent,是你。agent 可以等人等上好几个小时,不消耗任何算力。但它等的时候带着的东西会过期:对话的缓存会失效,等你回复时仓库可能已经变了。人同样不能等十个 agent 而不丢线索。所以设计上的问题是:怎么把一个人的注意力分给十个任务?
How it works
Parallel across tasks, not inside one
Each task is a folder, as in Manage tasks, not chats: the requirement, the plan, the to-do list and the handover file all live in files. One agent session holds one task at a time. Ten tasks are ten folders and ten sessions.
Why this splits cleanly where the one-big-job split does not:
- Nothing is shared. Each task has its own folder, so two agents never edit the same file at the same moment. There is no merge inside a task, because there is only one writer.
- Each task is whole. The agent that does the work also holds the plan and the context. There is no handover from an agent that understood to an agent that must act. That was the cost in the three-role test.
- The hand-off is a file, not a message. If a task stops for a day, whoever picks it up reads the folder.
The agents do not talk to each other. The only thing that crosses between tasks is you.
When a task needs a person
Now the question that matters: when does a task need you? If the answer is "often and unpredictably", ten tasks will eat your day. So the design pushes every need for a person into a few fixed points, the gates. A gate is a point where the agent stops and waits for a person's yes (the details are in Two gates: where a person approves).
A task waits for you only for reasons like these:
- the first gate: the requirement is written and the plan is ready, and both wait for you to confirm and approve;
- the second gate: the write-back (copying the finished changes into the repository) waits for your approval;
- a write failed halfway;
- it needs the results of a run that only you can do;
- its independent checks are used up and you decide what next;
- the agent stopped, or an unattended run ended.
Between those points, the agent works and you are not needed. That is the whole idea: call the person only at the gates. A task that needs you "now and then, when it has a question" is the worst case, since you cannot plan around it. A task that asks only at named points can be scheduled.
This also tells you what to build. Anything that makes the agent stop for a reason that is not a gate is a leak in your attention: a vague request, a missing permission, a confirmation box for a harmless action. Each one is worth removing (Ask or refuse).
Tasks that touch the same code
This is the common case, so it comes early. Separate task folders do not make separate repositories. Two tasks that change the same files will meet when they are written back. One way to design for it: give each task its own branch or working copy (git worktree is one way), have the write-back check whether the files it touches changed since the task began, and stop and ask a person if they did. Write back one task at a time. I have not tested ten tasks changing one repository at once, so I cannot say how often this bites.
Attention is the expensive part
Running ten tasks does not make you ten times faster. It moves your time to the gates, and a gate is only worth something if you read it.
- Keep every gate cheap to read. A plan you approve should fit on a page, in an editor, not scroll through a terminal. A requirement you confirm should be one page too (The agent writes the requirement, the person confirms it). If reading takes twenty minutes, you will skim, and a skimmed approval is the "click Allow" problem again. A number worth watching is how often you reject or change a plan: if it is never, you may be skimming.
- Do not hold more than you can read. The number of tasks you can run is set by how fast you can read plans and diffs, not by how many sessions fit on the screen. Start with two or three. How many you can hold well depends on the tasks, and I have not measured it.
- Group similar gates. If three plans wait, read them in one sitting. Switching between a plan, a diff and a requirement costs more than reading three plans.
- Cost adds up. Ten tasks are ten times the usage, so put a stop rule on each one (Unattended: when it must stop). A task that waits for you for longer than the prompt cache lives (five minutes or an hour on Anthropic's API, see Models and cost) pays full price to read its context again when you return. I have not checked how Copilot behaves here.
One list of what waits for you
With ten sessions open, how do you know which one is waiting? Going through the windows one by one is the exact cost you want to avoid.
The answer is a board: one page that lists every open task, what it is waiting for, and for how long. Two design points make it trustworthy.
- The state is written by code, not by the agent. A hook runs when the agent stops and notes "waiting for you". The board reads that state from a file made for machines. It does not read progress notes that the agent wrote in prose, because an agent forgets to tick things or ticks too many.
- Waiting is a number. The time since a task started waiting tells you which one to open first.
The same page has a switch that I use at the end of the day. It pauses every open task the agent is not working on and takes them back in the morning. The waiting time while paused is not counted, so the numbers stay honest.
No board? Use a list. The idea works by hand: one terminal tab per task, titled with the task, and a short list you keep of which tab is waiting and since when.
Read-only helpers inside a task
The one-agent-per-task rule is about work that writes. Inside one task, helpers that only read can still run in parallel and hand in short summaries, because no helper changes a file (Use subagents sparingly). A writer per task, and as many readers as the reading is worth.
原理
並行在任務之間,不在一個任務裡面
每個任務是一個資料夾,就像 管任務,不管對話 講的:需求、計畫、待辦清單和交接檔,全都放在檔案裡。一個 agent 會話一次拿著一個任務。十個任務就是十個資料夾、十個會話。
為什麼這樣拆得乾淨,而一個大工作的拆法拆不乾淨:
- 沒有共用的東西。每個任務有自己的資料夾,所以兩個 agent 絕不會在同一刻編輯同一個檔案。任務裡面沒有合併,因為只有一個寫的人。
- 每個任務是完整的。做事的 agent 也拿著計畫和上下文。沒有從理解的 agent,交給必須動手的 agent 的交接。那正是三角色測試裡的成本。
- 交接是一個檔案,不是一則訊息。如果一個任務停了一天,接手的人讀資料夾就行。
agent 之間不互相說話。唯一在任務之間來往的,是你。
任務什麼時候需要人
現在是要緊的問題:任務什麼時候需要你?如果答案是「常常,而且不可預測」,十個任務會吃掉你一整天。所以設計把每一次需要人的時候,推到少數固定的點,也就是門。門是 agent 停下來,等人說好的地方(細節在 兩道門:人在哪裡批准)。
任務只因為這類理由等你:
- 第一道門:需求寫好了,計畫也準備好了,兩者都在等你確認和批准;
- 第二道門:寫回(把做完的改動複製進倉庫)在等你的批准;
- 寫入做到一半失敗了;
- 它需要一次只有你能做的運行的結果;
- 它的獨立檢查用完了,由你決定下一步;
- agent 停了,或一次無人值守的執行結束了。
在這些點之間,agent 在工作,不需要你。這就是整個想法:只在門的地方叫人。一個「偶爾,有問題的時候」就需要你的任務,是最糟的情況,因為你沒辦法圍繞它安排時間。只在指名的點上提問的任務,是可以排進行程的。
這也告訴你要建什麼。任何讓 agent 因為不是門的理由而停下來的東西,都是你注意力的漏洞:模糊的要求、缺少的權限、一個為無害動作跳出來的確認框。每一個都值得移除(詢問不是限制)。
碰同一份程式碼的任務
這是常見的情況,所以放在前面。分開的任務資料夾,不等於分開的倉庫。兩個改同樣檔案的任務,在寫回的時候會碰到。一種設計的辦法:讓每個任務有自己的分支或工作副本(git worktree 是一種辦法),讓寫回檢查它碰的檔案從任務開始後有沒有變,如果變了,就停下來問人。一次寫回一個任務。我沒有測過十個任務同時改一個倉庫,所以這種事有多常咬人,我說不上來。
注意力是貴的部分
跑十個任務,不會讓你快十倍。它把你的時間移到門上,而門只有在你讀了它的時候才有價值。
- 讓每一道門都容易讀。你批准的計畫,應該放得進一頁,在編輯器裡,不是在終端機裡捲動。你確認的需求,也應該是一頁(需求由 agent 寫,人確認)。如果讀它要二十分鐘,你就會略讀,而略讀的批准又回到「點允許」的問題。一個值得看的數字是,你多常拒絕或修改計畫:如果從來沒有,你可能是在略讀。
- 不要拿超過你讀得完的。你能跑的任務數,由你讀計畫和 diff 的速度決定,不是由螢幕放得下幾個會話決定。從兩三個開始。你能拿好幾個,取決於任務,我沒有量過。
- 把類似的門放在一起。如果有三份計畫在等,一次坐下來全讀。在計畫、diff 和需求之間切換,比讀三份計畫更花力氣。
- 成本會累加。十個任務是十倍的用量,所以每個任務都要有一條停止規則(無人值守:什麼時候必須停)。一個等你的時間超過 prompt 快取存活時間的任務(在 Anthropic 的 API 上是五分鐘或一小時,見 選模型:算的是每次成功的成本),你回來時,它得付全額價格再讀一次它的上下文。Copilot 在這方面怎麼表現,我沒查過。
一份等你的清單
開著十個會話,你怎麼知道哪一個在等?一個一個視窗去翻,正是你想避免的成本。
答案是看板:一頁,列出每一個還開著的任務、它在等什麼、等了多久。有兩個設計重點讓它可信。
- 狀態由程式寫,不是由 agent 寫。agent 停下來時,一個 hook 會執行,記下「在等你」。看板從一個給機器讀的檔案讀這個狀態。它不讀 agent 用散文寫的進度筆記,因為 agent 會忘了打勾,或打太多勾。
- 等待是一個數字。一個任務開始等待之後經過的時間,告訴你該先打開哪一個。
同一頁上有一個開關,我在一天結束時用。它把每個 agent 沒在做的開著的任務暫停,隔天早上再接回來。暫停期間的等待時間不計,所以數字保持誠實。
沒有看板?用清單。這個想法手動也行:每個任務一個終端機分頁,用任務命名,再自己記一張短清單,寫哪個分頁在等、等了多久。
任務裡的唯讀幫手
一個任務一個 agent 的規則,講的是會寫入的工作。在一個任務裡,只讀的幫手仍然可以並行,並交回簡短的摘要,因為沒有幫手會改檔案(慎用子 agent)。每個任務一個寫的,讀的則依讀取的價值,要多少有多少。
原理
并行在任务之间,不在任务内部
每个任务是一个文件夹,和管任务,不管对话里一样:需求、计划、待办清单和交接文件都在文件里。一个 agent 会话一次只管一个任务。十个任务就是十个文件夹、十个会话。
为什么这样拆很干净,而“一件大活”的拆法不行:
- 什么都不共享。每个任务有自己的文件夹,所以两个 agent 不会在同一时刻改同一个文件。任务内部没有合并,因为只有一个写入者。
- 每个任务是完整的。干活的 agent 同时也拿着计划和上下文。不存在从“理解了的 agent”到“要动手的 agent”的交接。三角色测试里的成本,就是这么来的。
- 交接靠文件,不靠消息。任务停了一天,接手的人读文件夹就行。
这些 agent 之间不交谈。在任务之间穿梭的,只有你。
任务什么时候需要人
现在说关键的问题:任务什么时候需要你?如果答案是“经常,而且说不准”,十个任务会吃掉你一整天。所以设计上把所有对人的需要,都推到几个固定的点上,也就是关卡。关卡是 agent 停下来、等人点头的地方(细节见两道门:人在哪里审批)。
任务只会因为下面这些原因等你:
- 第一道关卡:需求写好了,计划也备好了,两者都在等你确认和批准;
- 第二道关卡:写回(把做完的改动复制进仓库)在等你批准;
- 一次写入中途失败;
- 它需要一次只有你能做的运行的结果;
- 它的独立检查次数用完了,由你决定下一步;
- agent 停了,或者一次无人值守的运行结束了。
在这些点之间,agent 自己干活,不需要你。这就是整个思路:只在关卡处叫人。一个任务“时不时有问题就来问你”,是最糟的情况,因为你没法围绕它做安排。只在明确的点上提问的任务,是可以排进日程的。
这也告诉你该建设什么。凡是让 agent 因为非关卡的原因停下来的东西,都是你注意力的漏洞:含糊的需求、缺少的权限、对无害操作弹出的确认框。每一个都值得去掉(询问不是限制)。
改同一份代码的任务
这是最常见的情况,所以放在前面。任务文件夹分开了,仓库并没有分开。两个改同样文件的任务,会在写回的时候撞上。一种设计办法:每个任务有自己的分支或工作副本(git worktree 是一种办法),写回时检查它碰过的文件在任务开始之后有没有变,变了就停下来问人。一次只写回一个任务。十个任务同时改一个仓库,我没有测过,所以说不准这个问题多久发生一次。
注意力才是贵的
跑十个任务,不会让你快十倍。它只是把你的时间挪到了关卡上,而关卡只有在你真的看了的时候才有价值。
- 让每个关卡都容易读。你要批准的计划应该一页放得下,在编辑器里看,而不是在终端里翻滚动条。你要确认的需求也应该是一页(需求由 agent 写,人确认)。如果读一遍要二十分钟,你就会扫一眼了事,扫一眼就批准,又回到了“点允许”的老问题。有个值得盯的数字:你驳回或修改计划的频率。如果从来没有,你可能是在扫一眼。
- 手里的不要超过你读得过来的。能跑多少个任务,取决于你读计划和 diff 有多快,不取决于屏幕上放得下几个会话。先从两三个开始。能稳稳拿住几个,要看任务本身,我没有测过。
- 把相似的关卡放一起。有三份计划在等,就一口气读完。在计划、diff 和需求之间来回切换,比连读三份计划更费力。
- 成本会累加。十个任务是十倍用量,所以每个任务都要配一条停止规则(无人值守:什么时候必须停)。一个任务等你的时间如果超过了 prompt 缓存的存活时间(Anthropic 的 API 上是五分钟或一小时,见选模型:看每次成功的成本),你回来时它要按全价把上下文重读一遍。Copilot 在这方面怎么处理,我没有查过。
一份等你的清单
开着十个会话,你怎么知道哪一个在等你?一个窗口一个窗口地翻,正是你想避免的成本。
答案是看板:一个页面,列出每个未结束的任务、它在等什么、等了多久。有两个设计点让它值得信任。
- 状态由代码写,不由 agent 写。agent 停下来时,一个 hook 会运行,记下“等你”。看板读的是这份给机器看的状态文件。它不读 agent 用文字写的进度笔记,因为 agent 会忘了打勾,或者勾多了。
- 等待是一个数字。一个任务从开始等待到现在过了多久,告诉你先打开哪一个。
同一个页面上有个开关,我在一天结束时用。它会暂停每个 agent 没在干活的未结束任务,第二天早上再接回来。暂停期间的等待时间不计,所以数字保持真实。
没有看板?用清单。这个思路手工也行:每个任务一个终端标签页,标题写任务名,再自己记一份短清单,写哪个标签页在等、等了多久。
任务内部只读的帮手
“一个任务一个 agent”这条规矩,针对的是会写入的活。在一个任务内部,只读的帮手仍然可以并行,交回简短的摘要,因为没有哪个帮手会改文件(慎用子 agent)。每个任务一个写入者,读的人要多少有多少,只要读的活值得。
Costs and traps
Context switching is yours. The agents do not mind switching. You do. Ten tasks in ten different domains cost more attention than ten in the same domain, because each gate needs different knowledge.
A gate that is always yes is a gate you do not read. If you approve ten plans in a row without opening one, the gates are decoration. The remedy is fewer, smaller gates, not more.
A board is only as good as its state. If the state came from the agent's own words, the board would lie. That is why the state comes from hooks and files.
I have not compared this with other ways. I have no evidence of a net speed-up: I have not measured ten parallel tasks against ten in a row, or against a team. The argument is the structure: nothing is shared, and a person's attention is the limit. The number ten in the title is an illustration, not a result.
代價和陷阱
切換上下文是你的事。agent 不介意切換。你介意。十個任務在十個不同的領域,比十個在同一個領域,花更多注意力,因為每道門需要不同的知識。
永遠是「好」的門,就是你不讀的門。如果你連續批准十份計畫,一份都沒打開過,那些門就是裝飾。解法是更少、更小的門,不是更多。
看板只和它的狀態一樣好。如果狀態來自 agent 自己的話,看板就會說謊。這就是狀態來自 hook 和檔案的原因。
我沒有拿它和其他辦法比較過。我沒有淨加速的證據:我沒有量過十個並行任務,對比十個一個接一個,或對比一個團隊。論點是結構:沒有共用的東西,人的注意力是極限。標題裡的「十」是一個例子,不是結果。
代价和坑
上下文切换的成本在你身上。agent 不在乎切换,你在乎。十个任务分布在十个不同的领域,比十个都在同一领域更费注意力,因为每个关卡需要不同的知识。
永远通过的关卡,就是你不会读的关卡。如果你连着批准了十份计划,一份也没打开过,这些关卡就是摆设。补救办法是更少、更小的关卡,不是更多。
看板的好坏取决于它的状态。如果状态来自 agent 自己说的话,看板就会说谎。这就是状态来自 hook 和文件的原因。
我没有拿它和别的办法比过。我没有整体提速的证据:十个并行任务和十个串行任务,或者和一个团队,我都没对比测过。论据在结构上:什么都不共享,人的注意力是上限。标题里的“十”是个例子,不是结果。
When to delete it
The board exists because a session does not tell you that it is waiting. When the platform shows, in one place, every running agent session and what each is waiting for, the board can go. I have not checked how far Copilot has got with that.
The idea does not go. Even when the platform does the listing, the split stays: one writer per task, and the person called at the gates.
什麼時候可以刪掉
看板存在,是因為會話不會告訴你它在等。平台如果在一個地方,顯示每個執行中的 agent 會話,和各自在等什麼,看板就可以拿掉。Copilot 在這件事上做到哪裡,我沒查過。
想法不會拿掉。就算由平台來列出,拆法還是留著:每個任務一個寫的,人在門的地方被叫來。
什么时候可以删掉
有看板,是因为会话不会告诉你它在等。等平台在一个地方显示所有正在运行的 agent 会话和它们各自在等什么,看板就可以删。Copilot 在这方面做到哪一步了,我没有查过。
思路不会消失。即使列表由平台来做,这个划分依然成立:每个任务一个写入者,只在关卡处叫人。
Try it on your own setup
No harness needed. Open your agent in your own repository and paste:
Using read-only git commands, list the branches, worktrees and open pull requests in this repository that have recent commits. For each, list the files it changes relative to the main branch. Then find pairs that change the same files, and say which would conflict if written back together. For each piece of work, say what it is probably waiting for (review, a decision, a test run). Do not change any files.在你自己的環境試試
不用裝 harness。在你自己的倉庫裡打開 agent,貼上:
只用唯讀的 git 指令,列出這個倉庫裡有最近 commit 的分支、worktree 和開著的 pull request。對每一個,列出它相對於主分支改了哪些檔案。然後找出改同樣檔案的配對,說明如果一起寫回,哪些會衝突。對每一件工作,說明它大概在等什麼(審查、一個決定、一次測試運行)。不要改任何檔案。在你自己的环境里试试
不用装 harness。在你自己的仓库里打开 agent,粘贴:
只用只读的 git 命令,列出这个仓库里最近有提交的分支、worktree 和未合并的 pull request。对每一个,列出它相对主分支改了哪些文件。然后找出改了相同文件的几对,说明如果一起写回,哪些会冲突。对每一项工作,说明它多半在等什么(review、一个决定、一次测试运行)。不要修改任何文件。Go deeper
- Use subagents sparingly: why a team of agents on one task did not pay, and where parallel reading does.
- Manage tasks, not chats: the task folder that makes each lane independent.
- Two gates: where a person approves: what a gate is and how to make the yes real.
- Unattended: when it must stop: the stop rules for a task that runs while you are away.
- Roll out and govern a harness: who owns the rules when more than one person runs tasks.
延伸閱讀
- 慎用子 agent:為什麼一個任務上的一組 agent 不划算,以及並行讀在哪裡划算。
- 管任務,不管對話:讓每條線獨立的任務資料夾。
- 兩道門:人在哪裡批准:門是什麼,以及怎麼讓「好」是真的。
- 無人值守:什麼時候必須停:你不在時執行的任務的停止規則。
- 落地與治理:不只一個人跑任務時,誰擁有規則。
延伸阅读
- 慎用子 agent:为什么一个任务上的一队 agent 不划算,以及并行阅读在哪里划算。
- 管任务,不管对话:让每一条泳道各自独立的任务文件夹。
- 两道门:人在哪里审批:关卡是什么,怎么让“点头”是真的。
- 无人值守:什么时候必须停:你不在时运行的任务的停止规则。
- 落地与治理:不止一个人跑任务时,规则归谁管。
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 task folders, the board and the "waiting for you" state run in Copilot Harness. The harness can show you a board with real tasks on it. After the setup above, type:
/harness-rookie-wondering I have read the chapter "Ten things at once". Teach me how this harness lets one person run several tasks: the task folder, the states a task can wait in, and how the board knows a task is waiting. Open the real files with me, and show me what the board reads and who writes it.It teaches one small piece at a time, stops to ask if you are following, and opens the files with you.
在 harness 裡探索
任務資料夾、看板和「在等你」的狀態,在 Copilot Harness 裡執行。harness 可以給你看一個放著真實任務的看板。照上面的說明準備好之後,輸入:
/harness-rookie-wondering 我讀完了「同時管十件事」這一章。請教我這個 harness 怎麼讓一個人跑好幾個任務:任務資料夾、任務可以等待的各種狀態,以及看板怎麼知道一個任務在等。帶我打開真實的檔案,讓我看看板讀什麼、誰寫它。它一次教一小塊,停下來確認你跟得上,然後和你一起打開檔案。
在 harness 里探索
任务文件夹、看板和“等你”这个状态,都在 Copilot Harness 里跑着。harness 可以给你看一块放着真实任务的看板。按上面的说明准备好之后,输入:
/harness-rookie-wondering 我读完了“同时管十件事:并行的是任务”这一章。请教我这个 harness 是怎么让一个人跑多个任务的:任务文件夹、任务可以处于哪几种等待状态,以及看板怎么知道一个任务在等。带我打开真实的文件,并让我看看看板读什么、谁来写。它一次只教一小块,停下来确认你跟上了,再和你一起打开文件。