5.5
Make a pass count讓「通過」可信让“通过”可信
This chapter assumes you have read Use subagents sparingly, which explains why a checker with a separate context is worth having. Here the question is a different one: how do you know a check really happened and really passed?
讀這一章,你需要讀過 慎用子 agent,它解釋了為什麼有一個上下文獨立的檢查者值得擁有。這裡的問題不一樣:你怎麼知道檢查真的發生了,而且真的通過了?
读这一章之前,你要读过慎用子 agent,它讲了为什么上下文独立的检查者值得有。这里的问题是另一个:你怎么知道一次检查真的发生了,而且真的通过了?
The Knowledge經驗分享经验分享
In one sentence
For a check to count, code counts the passes. Do not accept the agent's word that it checked.
一句話
要讓檢查算數,由程式來計算通過。不要接受 agent 說「我檢查過了」。
一句话
一次检查要算数,就由代码来数通过的次数。不要接受 agent 说“我检查过了”。
For leaders
- The decision: decide that "checked" means a record that code counts, not the agent's word. The person sets how many passes in a row are needed, and only the person can waive the rule.
- The risk: "I had it checked and it passed" cannot be tested. The agent may have skipped the check, checked an older version, or read a FAIL as a pass. Waivers can also become a habit, and then the limit is decoration.
- The cost of doing it right: extra checks cost usage each time, and a counter needs a fingerprint of the work that includes the right things. In my setup the limit is n checks plus two extra, which is an example and not a tuned value. Without any machinery, ask for the command and its result.
- Ask the team: "For the last change that shipped, show me the record that a check ran on that exact version."
給主管
- 要做的決定:決定「檢查過」指的是程式計數的紀錄,不是 agent 的一句話。要連續通過幾次,由人設定,也只有人能豁免這條規則。
- 風險:「我讓人檢查過了,通過了」這句話沒辦法測試。agent 可能跳過了檢查、檢查的是舊版本,或把 FAIL 讀成通過。豁免也可能變成習慣,那樣上限就只是裝飾。
- 做對的成本:額外的檢查每次都花用量,而計數器需要一個包含對的東西的工作指紋。在我的設定裡,上限是 n 次檢查再加兩次,這是個例子,不是調過的值。沒有任何機制時,就要求給出指令和它的結果。
- 可以問團隊:「對最近上線的那次改動,給我看那個確切版本上有執行檢查的紀錄。」
写给管理者
- 要拍板的事:决定“检查过”指的是一条由代码计数的记录,不是 agent 的一句话。连续要通过多少次,由人来定,也只有人可以豁免这条规则。
- 风险:“我让人检查过了,通过了”这句话没法验证。agent 可能跳过了检查,可能检查的是旧版本,也可能把 FAIL 看成了通过。豁免也可能变成习惯,那样上限就成了摆设。
- 做对的代价:额外的检查每次都要花用量,而计数器需要一个把对的东西都包括进去的工作指纹。在我的配置里,上限是 n 次检查再加两次,这只是个例子,不是调优过的值。没有任何机制的话,就让 agent 给出命令和它的结果。
- 可以问团队:“拿最近上线的那次改动来说,给我看那个确切版本上做过检查的记录。”
The problem
Say you want every piece of work to pass an independent check before it is written back to a repository (the write-back: copying finished work into the real repository, see Two gates). You write that in the rules. The agent finishes, and says: "I had it checked, and it passed."
What can you do with that sentence? Nothing. It may be true. The agent may also have skipped the check, or checked an older version of the work, or read a FAIL as a pass because it wanted to be done. A sentence in a chat is the cheapest thing an agent produces. It is also the one thing you cannot test.
This chapter is about whether the check happened, on this version, with this verdict. It is a guarantee about the process, not about the quality of the work. The fix is the same idea as in Requests and rules: do not ask the agent whether it did the thing. Make the thing leave a trace that code can read, and let code decide.
問題
假設你要求每一份工作,在寫回倉庫之前,都要通過一次獨立檢查(寫回:把做完的工作複製到真實的倉庫,見 兩道門:人在哪裡批准)。你把它寫進規則。agent 做完了,說:「我讓人檢查過了,通過了。」
這句話你能拿來做什麼?什麼都做不了。它可能是真的。agent 也可能跳過了檢查,或檢查的是工作的舊版本,或因為想快點結束,把 FAIL 讀成了通過。聊天裡的一句話,是 agent 產出最便宜的東西,也是你唯一沒辦法測試的東西。
這一章講的是:檢查有沒有發生、是不是對這個版本、結論是什麼。它是對過程的保證,不是對工作品質的保證。解法和 提示裡的規則只是請求 是同一個想法:不要問 agent 做了沒有。讓那件事留下程式讀得懂的痕跡,由程式來決定。
问题
假设你想让每份工作在写回仓库之前,都通过一次独立检查(写回:把做完的工作复制进真实的仓库,见两道门:人在哪里审批)。你把它写进规则里。agent 做完了,说:“我让人检查过了,通过了。”
这句话你能拿它做什么?什么也做不了。它可能是真的。agent 也可能跳过了检查,或者检查的是工作的旧版本,或者因为想早点结束,把 FAIL 看成了通过。聊天里的一句话,是 agent 产出的最廉价的东西。它也是你唯一没法测试的东西。
这一章讲的是:检查有没有发生,是不是对着这个版本,结论是什么。它保证的是过程,不是工作的质量。解法和提示里的规则只是请求是同一个思路:不要问 agent 它有没有做那件事。让那件事留下代码读得懂的痕迹,让代码来判断。
How it works
The checker's answer is saved by code, not by the agent
When the checker answers, its answer is written to a file by a hook, as it was written. The agent cannot edit that file. The first line of the answer is fixed: PASS or FAIL (Use subagents sparingly). So "did a check happen, and what was the verdict?" becomes a question about files, and a small program can answer it.
Count passes in a row, on the exact work
A single pass is weak. A checker is a model, so it can be lucky or wrong. Passing several times in a row lowers the chance of one lucky verdict. It does not remove a blind spot that every run shares, because the checkers are the same kind of model (Can a model check a model?). So the person says how many passes are needed: n passes in a row. In my setup the person writes it in a prompt, for example "two passes in a row". The agent cannot write it for itself.
Counting is done by code, and it works like this: start from the latest check and walk back. Count the PASSes in a row. Stop at the first FAIL. A FAIL is usually followed by an edit, and the edit changes the work, so the earlier passes stop counting: the n passes must all be on one version. And count a PASS only if the version it checked is exactly the work as it is now.
- The first check passes. The count is 1.
- The second check fails. A fail resets the count to 0.
- The third check passes. The count is 1 again.
- The fourth passes too. Two in a row: the count reaches n = 2, so the work may go on.
- If the work is edited after that, the earlier passes belong to an older version and no longer count. The count is 0.
"Exactly" needs a definition. The code takes a fingerprint of the work: a hash (a short code that changes when the content changes) of the result files, the requirement and the plan. A check records the fingerprint it saw. If the fingerprint now is different, that check is about older work, so it does not count.
Two details keep this honest:
- Only things that change the result are in the fingerprint. Progress notes, logs and the checker's own records are left out. Otherwise ticking a to-do item would cancel a pass, and the counter would reset for nothing.
- A change to the requirement or the plan resets the count too. A pass against an old plan says little about the new one.
The count then gates the next move. The step that writes the work back to the repository is refused until the passes reach n. The agent has no path around it: the only way to raise the count is to get the work checked again.
A limit on the number of checks
A checker may keep finding something. If every round brings new findings, the loop never ends. So there is a limit: n checks plus a small margin (in my setup, two extra; an example, not a tuned value). When they are used up without enough passes, the agent stops and tells the person where the last findings are.
The person then chooses, in a terminal, with a typed code: allow more checks, or waive the rule for this version.
Waivers
A waiver lets the current version through without enough passes. People need it: sometimes the last findings are wording, or the checker is wrong, and the person has read the work and is satisfied. Three rules make a waiver safe:
- Only the person can grant it, through a channel the agent cannot reach (Two approvals says how).
- It covers one version. When the work changes again, the waiver ends and the count starts over.
- It leaves a record. Later you can see that this version went through on a person's decision, not on passes.
There is a second tool for the opposite case. If the person judges that one check was wrong, they can set it aside. It no longer counts, neither as a check used nor as a FAIL.
Without the machinery
If you have no checker agent, keep the idea: do not accept "I checked". Ask the agent to paste the command it ran and its result, and read the verdict yourself. After any later edit, ask again.
Checks on, but nothing checked
The sneakiest failure is silence: checks are on, and the agent simply never calls the checker. No FAIL is ever recorded, because nothing ran. A rule in the prompt will not catch this, because the agent is the one who forgot.
So the check goes where the agent has to pass through: the moment it tries to stop. A hook (Hooks) at that moment compares the state with the facts. If checks are on and there is no check, or the work changed after the last check, it blocks once and tells the agent to catch up. Then the write-back gate (Two gates) stays closed anyway, because the count is still below n.
What the checker hands in
A count is only as good as what is counted, so the checker's answer has a fixed shape, as in Use subagents sparingly. A script checks that shape after the answer. It drops a finding whose file or line does not exist. A FAIL with nothing left is invalid: the check is given back, so a vague checker does not eat the budget.
The script checks the shape, not the judgment. Whether the checker is right is still a model's opinion. Can a model check a model? takes that up.
原理
檢查者的答案由程式存下來,不是由 agent
檢查者回答時,它的答案由一個 hook 在寫出的當下就寫進檔案。agent 不能編輯那個檔案。答案的第一行是固定的:PASS 或 FAIL(慎用子 agent)。所以「有沒有檢查過、結論是什麼」就成了一個關於檔案的問題,一個小程式就能回答。
數連續的通過,而且是對確切的那份工作
單單一次通過很弱。檢查者是個模型,所以它可能運氣好,也可能錯。連續通過好幾次,能降低單次運氣好的機會。它去不掉每次運行都共有的盲點,因為檢查者是同一種模型(模型能檢查模型嗎)。所以需要通過幾次,由人來說:連續 n 次通過。在我的設定裡,人把它寫在 prompt 裡,例如「連續兩次通過」。agent 不能替自己寫。
計數由程式做,做法是這樣:從最近一次檢查開始往回走。數連續的 PASS。遇到第一個 FAIL 就停。FAIL 後面通常跟著一次編輯,編輯會改變工作,所以更早的通過就不再算:n 次通過必須都是對同一個版本。而且只有當它檢查的版本就是現在這個樣子的工作,才算一次 PASS。
- 第一次檢查通過,計數是 1。
- 第二次不通過,計數歸零。
- 第三次通過,計數又是 1。
- 第四次也通過。連續兩次,計數達到 n = 2,成果可以往下走。
- 之後如果成果又被改動,先前的通過屬於舊版本,不再算數,計數歸零。
「確切」需要定義。程式會對工作取一個指紋:對結果檔案、需求和計畫算出的 hash(內容一變,這段短碼就跟著變)。每次檢查都記下它看到的指紋。如果現在的指紋不同,那次檢查講的是較舊的工作,所以不算。
有兩個細節讓它保持誠實:
- 指紋裡只放會改變結果的東西。進度備註、紀錄和檢查者自己的紀錄不放進去。不然勾掉一個待辦項目就會取消一次通過,計數器白白重設。
- 需求或計畫一改,計數也重設。對舊計畫的通過,對新計畫說不了什麼。
然後計數決定下一步能不能走。把工作寫回倉庫的那一步,在通過次數達到 n 之前會被拒絕。agent 沒有路可以繞過去:要讓計數增加,唯一的辦法是讓工作再被檢查一次。
檢查次數的上限
檢查者可能一直找得到東西。如果每一輪都帶來新的發現,循環就永遠不會結束。所以有一個上限:n 次檢查加一點餘裕(在我的設定裡是多兩次;是個例子,不是調過的值)。用完了還沒有足夠的通過,agent 就停下來,告訴人最後的發現在哪裡。
人接著選擇,在終端機裡打一段碼:允許更多次檢查,或這個版本豁免這條規則。
豁免
豁免讓目前的版本在通過次數不夠的情況下過關。人需要它:有時最後的發現只是措辭,或檢查者錯了,人已經讀過工作,也滿意了。三條規則讓豁免安全:
- 只有人能給,走 agent 碰不到的管道(兩道門:人在哪裡批准 說了怎麼做)。
- 只涵蓋一個版本。工作再變,豁免就結束,計數重新開始。
- 會留下紀錄。之後你能看到,這個版本是靠人的決定過關的,不是靠通過。
相反的情況還有第二個工具。如果人判斷某一次檢查是錯的,可以把它放到一邊。它就不再算數,既不算用掉的一次檢查,也不算 FAIL。
沒有這些機制
如果你沒有檢查者 agent,也要保留這個想法:不要接受「我檢查過了」。請 agent 貼上它執行的指令和結果,自己讀結論。之後只要有任何編輯,就再問一次。
檢查開著,卻什麼都沒檢查
最陰險的失敗是沉默:檢查是開著的,agent 就是從來不呼叫檢查者。因為什麼都沒執行,所以從來沒有記錄過任何 FAIL。prompt 裡的規則抓不到這種情況,因為忘記的正是 agent。
所以檢查放在 agent 必須經過的地方:它想停下來的那一刻。那一刻的 hook(Hooks:每次呼叫都會經過的執行點)會拿狀態和事實對照。如果檢查是開著的,卻沒有任何檢查,或最後一次檢查之後工作又變了,它就擋一次,叫 agent 補上。然後寫回的門(兩道門:人在哪裡批准)無論如何仍然關著,因為計數還是低於 n。
檢查者交出什麼
計數只會和被計的東西一樣好,所以檢查者的答案有固定的形狀,就像 慎用子 agent 裡那樣。答案之後,有一個腳本檢查這個形狀。檔案或行號不存在的發現,會被丟掉。一個什麼都不剩的 FAIL 是無效的:這次檢查會退回去,所以含糊的檢查者不會吃掉額度。
腳本檢查的是形狀,不是判斷。檢查者對不對,仍然只是一個模型的意見。模型能檢查模型嗎 接著談這點。
原理
检查者的回答由代码保存,不由 agent 保存
检查者回答时,它的回答由 hook 原样写进一个文件。agent 改不了这个文件。回答的第一行是固定的:PASS 或 FAIL(见慎用子 agent)。这样,“检查发生了没有,结论是什么?”就成了关于文件的问题,一个小程序就能回答。
对确切的那份工作,数连续通过的次数
只通过一次,证明力很弱。检查者是个模型,它可能走运,也可能错。连续通过几次,能降低一次走运的结论的可能性。它消除不了每次运行共有的盲区,因为检查者是同一类模型(见模型能检查模型吗)。所以由人来说需要通过几次:连续通过 n 次。在我的配置里,人把它写在 prompt 里,比如“连续通过两次”。agent 不能替自己写。
计数由代码来做,做法是:从最近一次检查开始往回走。数连续的 PASS。碰到第一个 FAIL 就停。FAIL 之后通常会有一次编辑,而编辑改变了工作,所以更早的通过不再算数:这 n 次通过必须全都对着同一个版本。并且,只有当它检查的版本恰好就是工作现在的样子时,才把这次 PASS 算进去。
- 第一次检查通过,计数是 1。
- 第二次不通过,计数归零。
- 第三次通过,计数又是 1。
- 第四次也通过。连续两次,计数达到 n = 2,成果可以往下走。
- 之后如果成果又被改动,先前的通过属于旧版本,不再算数,计数归零。
“恰好”需要一个定义。代码会给工作取一个指纹:对结果文件、需求和计划做的哈希(内容一变就会变的一小段码)。一次检查会记下它看到的指纹。如果现在的指纹不同,那次检查说的是更早的工作,所以不算数。
有两个细节让它保持诚实:
- 指纹里只放会改变结果的东西。进度笔记、日志和检查者自己的记录不放进去。否则勾掉一个待办项就会抵销一次通过,计数器白白归零。
- 需求或计划的改动,也会让计数归零。对着旧计划的通过,对新计划说明不了什么。
这个计数接着管住下一步。把工作写回仓库的那一步,在通过次数达到 n 之前会被拒绝。agent 绕不过去:提高计数的唯一办法,是让工作再被检查一次。
检查次数的上限
检查者可能一直发现点什么。如果每一轮都有新的发现,循环就永远结束不了。所以有一个上限:n 次检查,再加一小点余量(在我的配置里是多两次;是个例子,不是调优过的值)。用完了还没有足够的通过次数,agent 就停下来,告诉人最后的发现在哪里。
然后人在终端里,用敲码的方式选择:允许更多次检查,或者对这个版本豁免这条规则。
豁免
豁免让当前版本不够通过次数也能放行。人需要它:有时最后的发现只是措辞问题,或者检查者错了,而人已经读过这份工作,也满意了。三条规则让豁免是安全的:
- 只有人能给,走 agent 够不着的渠道(怎么走,见两道门:人在哪里审批)。
- 只管一个版本。工作再变,豁免就失效,计数从头开始。
- 留下记录。以后你能看出,这个版本是靠人的决定过去的,不是靠通过次数。
还有第二个工具,用于相反的情形。如果人判断某一次检查是错的,可以把它搁置。它不再算数,既不算用掉的一次检查,也不算一个 FAIL。
没有这套机制时
如果你没有检查者 agent,也保留这个想法:不接受“我检查过了”。让 agent 贴出它运行的命令和结果,自己读结论。之后只要有编辑,就再问一遍。
检查开着,却什么都没检查
最隐蔽的失败是沉默:检查是开着的,agent 就是从来不调用检查者。因为什么都没运行,一个 FAIL 也不会被记下。prompt 里的规则抓不住这种情况,因为忘记的恰恰是 agent。
所以要把检查放在 agent 非经过不可的地方:它想停下的那一刻。那一刻的 hook(见 Hook:每次调用都会经过的执行点)把状态和事实对一对。如果检查是开着的,却没有检查,或者最后一次检查之后工作又变了,它就拦一次,让 agent 补上。无论如何,写回的关卡(见两道门:人在哪里审批)仍然是关着的,因为计数还没到 n。
检查者交上来的东西
计数只和被数的东西一样好,所以检查者的回答有固定的形状,和慎用子 agent里一样。回答之后,由脚本检查这个形状。它会丢掉文件或行号不存在的发现。一个丢完之后什么都不剩的 FAIL 是无效的:这次检查会退回去,这样含糊的检查者就不会白吃预算。
脚本检查的是形状,不是判断。检查者对不对,仍然是一个模型的意见。模型能检查模型吗会讲这个问题。
Costs and traps
The fingerprint has to be right. If it includes too much, every small edit cancels the passes and you pay for checks again. If it includes too little, a change slips past a pass. I have not found a perfect list; I decide by asking "does this file change what the work is?".
A counted pass is only as strong as the checker. The counter proves that a check happened on this exact version. It does not prove the checker was right. Two checkers can give different verdicts on the same work (Can a model check a model?); that is one reason to allow more than one pass in a row for important changes. I have not measured how often a checker is wrong.
It does not replace running things. A pass counted from a read-only checker is a pass about reading. For checks the agent can run (tests, linters), see Let the agent check its own work. The same warning applies there: a test that "passed" means little unless you can see the command and its output. Anthropic's guide says it directly: "'All tests pass' on its own tells you very little" (Best practices).
Waivers can become a habit. If a person waives every time the limit is hit, the limit is decoration. The record of waivers is how you notice.
代價和陷阱
指紋要對。放得太多,每個小編輯都會取消通過,你又得為檢查付錢。放得太少,改動就會從通過旁邊溜過去。我沒找到完美的清單;我靠問「這個檔案會不會改變工作是什麼?」來決定。
計數出來的通過,只和檢查者一樣強。計數器證明的是,在這個確切的版本上有發生過檢查。它不證明檢查者是對的。兩個檢查者對同一份工作可能給出不同的結論(模型能檢查模型嗎);這是對重要的改動允許連續不只一次通過的原因之一。檢查者多常出錯,我沒有量過。
它不能代替真的去執行。唯讀的檢查者算出來的通過,是關於閱讀的通過。對 agent 能執行的檢查(測試、linter),見 讓 agent 能檢查自己的活。那裡有同樣的警告:除非你看得到指令和它的輸出,否則「通過」的測試意義不大。Anthropic 的指南說得很直接:「光是『所有測試都通過』,告訴你的很少」(Best practices)。
豁免可能變成習慣。如果每次碰到上限,人都豁免,上限就只是裝飾。豁免的紀錄,就是你察覺這件事的辦法。
代价和坑
指纹得取对。包括得太多,每个小编辑都会抵销通过,你得再付一次检查的钱。包括得太少,改动就会从一次通过旁边溜过去。我没找到完美的清单;我靠问“这个文件会不会改变工作是什么”来决定。
计数的通过,只和检查者一样可靠。计数器证明的是:这个确切的版本上发生过一次检查。它不证明检查者是对的。两个检查者对同一份工作可能给出不同的结论(见模型能检查模型吗);这就是对重要的改动,允许要求连续通过不止一次的一个理由。检查者有多常出错,我没有测过。
它不能代替运行东西。一个只读的检查者给出的通过,是关于“读”的通过。对 agent 能运行的检查(测试、linter),见让 agent 能检查自己的活。那里的警告同样适用:一个“通过了”的测试,除非你能看到命令和它的输出,否则意义不大。Anthropic 的指南说得很直接:“'All tests pass' on its own tells you very little”(Best practices)。
豁免可能变成习惯。如果每次碰到上限,人都选择豁免,上限就是摆设。你靠豁免的记录来发现这一点。
When to delete it
A counter like this exists because the platform has no built-in notion of "this work was independently checked, n times, on this version". If a platform adds that, with a record the agent cannot change, use it and drop the counter. The idea does not retire: the person, not the agent, decides what counts as checked.
什麼時候可以刪掉
這樣的計數器存在,是因為平台沒有內建「這份工作在這個版本上,被獨立檢查過 n 次」這個概念。如果平台加上了,而且紀錄是 agent 改不了的,就用它,把計數器拿掉。想法不會退役:由人,不是 agent,決定什麼算檢查過。
什么时候可以删掉
这样的计数器之所以存在,是因为平台没有内置“这份工作在这个版本上被独立检查了 n 次”这个概念。如果平台加上了,并且记录是 agent 改不了的,就用它,把计数器去掉。想法不会退役:由人,而不是 agent,来决定什么算检查过。
Try it on your own setup
No harness needed. Open your agent in your own repository and paste:
Look at how this project shows that a check really happened: CI configuration, required reviews, status checks, review comments, and any file the agent writes to say it checked something. For each kind of record, tell me whether it is tied to the exact commit, who or what can edit or fake it (including the agent), and what happens to it if the code changes afterwards. Point out any place where the only evidence is someone's sentence. Do not change any files.在你自己的環境試試
不用裝 harness。在你自己的倉庫裡打開 agent,貼上:
看看這個專案怎麼證明一次檢查真的發生了:CI 設定、必要的審查、狀態檢查、審查留言,以及 agent 為了說明它檢查過什麼而寫的任何檔案。對每一種紀錄,告訴我:它有沒有綁定到確切的 commit、誰或什麼(包括 agent)能編輯或偽造它,以及之後程式碼變了,它會怎樣。指出任何唯一的證據只是某人說的一句話的地方。不要改任何檔案。在你自己的环境里试试
不用装 harness。在你自己的仓库里打开 agent,粘贴:
看看这个项目是怎么证明一次检查真的发生过的:CI 配置、必需的评审、状态检查、评审评论,以及 agent 写下来说明它检查过某样东西的任何文件。对每一种记录,告诉我它是不是绑定到确切的提交上、谁或者什么(包括 agent)能编辑或伪造它,以及之后代码变了,它会怎样。指出唯一的证据只是某人一句话的任何地方。不要修改任何文件。Go deeper
- Claude Code docs: Best practices (ask for evidence, not a claim)
延伸閱讀
- Claude Code 文件:Best practices(要證據,不要只是一個說法)
延伸阅读
- Claude Code 文档:Best practices(要证据,不要说法)
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 counting, the limit, the waiver and the catch-up at stop all run in Copilot Harness. The harness can teach them to you from the inside, with a real record of checks. After the setup above, type:
/harness-rookie-wondering I have read the chapter "Make a pass count". Teach me how this harness counts independent checks (topic 11): how the passes in a row are worked out, what the limit is, what allowing more checks, waiving and setting a check aside do, and what happens when checks are on but nothing was checked. Open a real task's record of checks with me and draw how the pieces fit together.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 怎麼計算獨立檢查(主題 11):連續通過怎麼算出來、上限是多少、允許更多次檢查、豁免和把一次檢查放到一邊各做什麼,以及檢查開著卻什麼都沒檢查時會怎樣。帶我打開一個真實任務的檢查紀錄,並畫出這些部分怎麼組合在一起。它一次教一小塊,停下來確認你跟得上,然後和你一起打開檔案。
在 harness 里探索
计数、上限、豁免,以及停下时的补检查,都在 Copilot Harness 里跑着。harness 可以从内部教你,配上一份真实的检查记录。按上面的说明准备好之后,输入:
/harness-rookie-wondering 我读完了“让‘通过’可信”这一章。请教我这个 harness 是怎么给独立检查计数的(主题 11):连续通过的次数是怎么算出来的,上限是多少,允许更多次检查、豁免和搁置一次检查各有什么作用,以及检查开着却没有任何检查时会怎样。带我打开一个真实任务的检查记录,并画出各部分是怎么配合的。它一次只教一小块,停下来确认你跟上了,再和你一起打开文件。