Keep every bug fix alive: pin historical bugfixes to your AST and stop AI coding agents from accidentally deleting edge-case guards during refactors. Works with DeepSeek Harness, Cursor, Claude Code & VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Keep every bug fix alive. AI coding agents only see local context, so they happily "clean up" the three odd lines that fixed a Safari date bug, a float rounding error or a lock-order race weeks ago. KeepFix remembers why those lines exist and catches the deletion.
Seal a fix once: KeepFix stores the reason, the invariant and the load-bearing code in .keepfix/seals.jsonl (no comments added to your source).
Warn before edits: agents get a one-line reminder before touching a guarded file.
Check every change: the current git diff is checked against every guard. Line shifts, reformatting and renames are not alarms; a deleted guard is, with the original reason and the diff.
Equivalent rewrites: an agent can rebind a guard with a reason, and you confirm or reject it in the panel.
Mine history: scan Git for surviving fix: commits and enable the ones worth guarding.
Use
Run KeepFix: Open KeepFix Guard Panel from the Command Palette, or the KeepFix button in the Source Control title bar.
For Claude Code / Cursor hooks and MCP tools, run:
npx -y keepfix-mcp@latest install --claude
中文
AI 编程智能体只看局部上下文,很容易把几周前专门修线上边缘故障的几行防御代码当成冗余删掉。KeepFix 为关键历史修复建立护栏:重构前提醒,改完后按 git diff 核对,误删当场报出原故障背景和缺失的代码;合法的等价重构可以重绑,由你在面板里确认。