fix-loop
Skill0 starsChanged 3 months agoMITView on GitHub
Regression-guarded fix protocol to prevent whack-a-mole (fixing A breaks B, fixing B breaks A). Use when starting a bug-fix or test-fix session that may take multiple attempts, or when the user mentions regressions reappearing. Enforces a fixed guard test set, one change per iteration, and a session ledger.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- channingwalton/skillstheir own version, first seen Nov 6, 2026
- robinbril/claude-code-harnesstheir own version, first seen Nov 1, 2026
- wukun2005-gif/ai-skillstheir own version, first seen May 10, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- robinbril/claude-code-harness★ 3same name
- channingwalton/skills★ 2same name
- wukun2005-gif/ai-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- coding-rulesSkill
- cq-reviewSkill
- kill-procSkill
- prepare-clearSkill
- reworkSkill
- self-reviewSkill
- spec-devSkill
- triageSkill
The file
Files
fix-loop: モグラたたき防止プロトコル
複数回の試行が予想される修正作業で使う。核心は 3 つ: 固定ガードテストセット / 1 変更 1 検証 / 試行台帳。
フェーズ 0: セッション開始
- 修正目標を 1 文で定義する (何が通れば完了か)。
- ガードテストセットを確定する:
- 直したいテスト (target)
- 過去にこの領域で壊れたことのあるテスト
- 変更予定ファイルに関連するテスト (lit なら該当ディレクトリ)
- 実行時間の目安: 1 回 5 分以内に収まる範囲。収まらなければ絞り、 最終確認でフルテストを走らせる前提にする。
- セッション途中でセットを狭めない (広げるのは可。狭めるとモグラたたきが再発する)。
- 台帳ファイル
notes/fix-sessions/YYYYMMDD-<topic>.mdを作る。関連するトレース ID (S-03 など) があれば冒頭に書く (影響範囲調査で辿れるように)。 - ベースライン取得: ガードセットを 1 回実行し、結果を台帳に記録する。
lit の場合はログを保存し
parse-lit-log.py saveでベースライン化 (triage Skill のディレクトリに同梱されている)。
フェーズ 1: 修正ループ (1 反復 = 1 仮説 = 1 変更)
各反復で:
- 仮説を台帳に書いてから変更する (「何が原因で、この変更でなぜ直るか」)。
- 変更は論理的に 1 箇所。複数の仮説を同時に入れない。
- ガードセットを毎回全部実行する (target だけ実行して他を確認しないのが whack-a-mole の温床)。 実行・計測の前に、測る対象が今のソースから作られたものかを確かめる (ビルドし直す、または実行ファイルとソースの時刻を比べる)。古いビルドを測ると 「コードの読みと挙動が食い違う」形の存在しない不具合を追うことになる (実例: 3 分古いバイナリの挙動を 30 分調べた)。
- 結果を台帳のマトリクスに記録する:
## 試行履歴
| # | 仮説/変更 | 変更ファイル | target | ガード他 | 判定 |
|---|---|---|---|---|---|
| 0 | (baseline) | - | FAIL | all PASS | - |
| 1 | XXX が原因、YYY に修正 | foo.cpp | PASS | bar.ll FAIL | 後退→revert |- 判定ルール:
- target 改善 + ガード後退なし → 採用、次へ
- ガードのどれかが後退 → その変更を積んだまま次の修正をしない。 revert するか、後退の原因を理解して仮説を立て直す。 「壊れた方をあとで直す」は禁止 (それがモグラたたき)。
フェーズ 2: 収束判定
- 3 反復連続で純改善なしなら手を止める。追加の変更ではなく根本原因分析に戻る。 そもそも 2 つの要求が矛盾していないか (A と B が同じコードに逆の期待をしている)。 修正すべき層が違うのではないか (フロントエンド vs backend、共通部 vs ターゲット固有部)。 分析結果と選択肢をユーザーに提示して判断を仰ぐ。
フェーズ 3: セッション終了
- 最終状態でベースラインとの差分を取り、純減 (直った数 − 壊した数) を明示する。
- フルテスト (check-llvm 等の重いもの) の実行はプロジェクトルールに従いユーザーに確認する。
- 台帳に結論 (採用した修正、根本原因、学んだこと) を追記して閉じる。 台帳は消さない — 次に同じ領域を触るときの「過去に壊れたことのあるテスト」リストになる。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

