mnemoa 協助編碼智能體清理過時指令檔
Where most memory tools help your agent remember more, mnemoa helps it forget what no longer belongs.
Affan Shaik 開發 mnemoa,掃描 AGENTS.md、CLAUDE.md 等編碼智能體指令檔及計劃,找出過時、重複和矛盾內容,並提出刪除或移置方案。工具會列出修改前後估算的 token 成本,並讓用戶先檢視差異;它預設在本機以確定性檢查執行,選用的 LLM 功能則預設停用。程式庫:https://github.com/Flotrpy/mnemoa
I built *mnemoa * to keep AI coding instructions from going stale.
*mnemoa * is built to make coding agents forget: it finds the stale, redundant and contradictory lines in AGENTS.md, CLAUDE.md and other instruction files, so they can be deleted rather than piled on.
Coding agents rely on files like AGENTS.md, CLAUDE.md, and project plans to understand a codebase. Over time, those files can get long, repeat rules already enforced by tools, and point to paths or commands that no longer exist.
I built mnemoa to help keep that repo memory small, accurate, and useful.
What it does
*mnemoa * scans a repository’s agent instruction files and plans. It checks for issues such as:
- Instructions that are too long or consume too much always-loaded context
- Broken paths, symbols, and commands
- Plans that have drifted from the code
- Rules that a formatter, linter, or other tool could enforce instead
It can also create a prune plan showing what it would remove or move, along with the estimated token cost before and after. You can review the diff before applying it.
The idea behind “promote, then forget”
Some instructions describe rules that tools can already enforce. *mnemoa * can help turn those rules into checks, such as EditorConfig settings, Cargo lints, Ruff settings, ast-grep rules, or pre-commit hooks. It records the promotion in a ledger, so the instruction can leave the context file without losing track of why it existed.
The goal is to keep useful guidance available while reducing repetition and stale instructions.
Offline by default
*mnemoa * is written in Rust and runs deterministic checks locally. The optional LLM feature can help draft rules, but it is disabled by default. You can use the CLI, run the optional HTTP API, or connect through the Python SDK.
It models how seven coding agents load instruction files: Claude Code, Codex, Cursor, Copilot, Kiro, Cline, and Gemini.
Try it
Install from the repository and scan a project:
cargo install --path crates/mnemoa-cli
mnemoa scan .
mnemoa forget
mnemoa forget shows a dry-run plan. To apply the changes after reviewing them:
mnemoa forget --apply --yes
The project also includes a GitHub Action for running scans and drift checks in CI.
What I’d like feedback on
I’d especially like to hear how *mnemoa * handles real instruction files: which findings are useful, which ones are noisy, and what kinds of repo drift it should catch next.
來源:DEV Community · dev.to