Correct

作者 backnotprop3a604672c46c無授權條款1.3K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

Find the mistakes agents keep repeating in this repo and make each one impossible. Try architecture first, then types, then a lint whose error names the fix, then a test, and write docs last. Prove each check fails on a real past mistake. Repeat this each time the operator corrects you. Use for /correct.

AI 產生的概覽

把儲存庫中反覆出現的代理錯誤轉化為架構、型別、lint 或測試層級的防護,避免再次發生。

功能
此技能引導代理檢視近期提交、回復、審查意見與指令檔案,將反覆出現的錯誤歸類。針對每一類,它依有效性由高而低採用架構、型別、lint 或 CI 檢查、測試,最後才是文件。產出包括每個修正一個提交、每個新檢查在真實歷史錯誤上失敗的證明,以及把每條規則與其執行方式配對的規則表。
適用情境
當操作者因相同錯誤反覆糾正代理時使用。適用於多次糾正之後,需要持久預防性變更而非又一次臨時修正的情況。
執行需求
僅含指令,不含指令碼。需要存取儲存庫歷史、審查意見與代理指令檔案,並能執行本機與 CI 命令。

Correct

The operator keeps correcting agents in this repo for the same mistakes. Change the repo so the next agent can't make them.

Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Design the repo so a change that looks right from one file is right for the whole repo.

Find the mistake classes

First, read recent commits, reverts, review comments, agent instruction files, and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice.

Fix each class at the highest level that works

  1. Eliminate it with architecture. Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy.
  2. Enforce it with types so the bad state can't be written. If bad code still compiles, add a lint or CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more.
  3. Test the behavior. Fix or delete any test that would still pass if every function it calls returned nothing.
  4. Write docs or agent rules last, only for judgment calls. Nothing fails when an agent skips them.

Fix and prove

Then fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake. Run the same command locally and in CI. Exceptions go on the offending line with a reason, an expiry date, and a human's approval.

Keep the rule table

Last, keep a table in the agent instruction file that pairs each rule with what enforces it. When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that's a repeat, so fix it at the highest level in the same change. Drop a rule once its mistake can't happen.

Reply: each class with its evidence, the level you picked, and why a higher level didn't work.

來源與署名

來源:backnotprop/pstack位於skills/correct提交3a60467

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架