Build a map of the whole codebase.
A recursive analysis produces an .architecture/ wiki — stable module IDs, precise file and line boundaries, interaction edges, risks, and confidence ratings on every claim.
An open-source agent skill that turns your codebase into a fine-grained modular wiki — so AI knows exactly which code to change for any given feature, and never spills into unrelated code.
You inherit a 200k-line project. You ask an AI to add one feature. It does — but the next deploy breaks something you never asked it to touch. Sound familiar?
map-then-modify is a protocol your AI follows. It produces a complete architectural map of your codebase, then enforces precise boundaries every time it changes code.
A recursive analysis produces an .architecture/ wiki — stable module IDs, precise file and line boundaries, interaction edges, risks, and confidence ratings on every claim.
Every change starts with a written dev plan. The AI lists which files and lines it will edit — and which it explicitly will not. No silent surprises.
If reality diverges from the map mid-edit, the wiki self-heals first, the plan expands transparently, and the change continues — without ever breaking what isn't documented.
Clone the repo into your agent's skills directory. Restart your agent. That's it.
Don't use Claude Code? Replace ~/.claude/skills/ with whichever skills directory your agent uses.
Once installed, just tell your agent: "map this project" — or any wording like "啃下这个项目", "safe refactor in an unfamiliar repo". The skill auto-triggers.
Install once. Map once per project. Then keep telling your AI what to build — it stays inside the lines.
Clone the repo into your agent's skills directory and restart the agent. Full per-platform paths in the install section above.
Open your agent at the project root. Then say something like this and let it run:
<repo>/.architecture/ — module docs, interaction maps, risks, coverage. Commit it to git.After mapping is done, you can ask your AI for any code change. The skill auto-detects the wiki exists and switches into DEVELOPMENT mode. No special incantation needed.
.architecture/dev-plans/ — listing the files and lines it will edit, AND which nearby code it explicitly will not touch.It's free, open-source, and works with the agent you already use.