legacy-codebase-recon
Legacy Codebase Recon
Use this skill before changing unfamiliar legacy code. The job is to reduce uncertainty by tracing history, ownership, seams, invariants, dead paths, and behavioral evidence before editing.
The outcome is not a patch. The outcome is a short recon brief that says what is known, what is inferred, what remains unknown, and where an edit can be made with the least risk.
When To Use
Use this when a task asks for work in an old, inherited, poorly documented, high-risk, or unfamiliar area. It also applies when the requested change crosses ownership boundaries, touches old abstractions, deletes apparently unused code, or depends on behavior that is not already proven by tests.
Do not use this as a substitute for direct implementation when the code is already understood and the edit is local, obvious, and covered by tests.
Operating Rules
Start by protecting the current worktree. Run a status check and treat uncommitted changes as user work unless the user says otherwise.
Do not edit production code during recon. It is acceptable to run read-only searches, inspect history, run tests, and create temporary local scratch artifacts that are removed before the final answer.
Prefer direct evidence over narrative. Executable code, tests, generated artifacts, runtime behavior, and current schemas outrank stale docs and comments.