A practical definition for engineering teams inheriting complex systems.
Direct answer
Legacy code is code that is hard to change safely because it lacks tests, documentation, ownership clarity, or architectural boundaries. It becomes expensive not because it is old, but because every change carries delivery risk.
Teams usually call a codebase legacy when delivery slows down, incidents increase, and engineers no longer trust small changes. Common signals include high coupling, outdated dependencies, missing tests, inconsistent patterns, and business logic concentrated in a few fragile modules.
The product needs repository access so it can inspect files, dependency relationships, churn, complexity, hotspots, and security signals. That input allows it to map engineering risk at the codebase level rather than just linting individual files.
Users get a repository health view, prioritized risky modules, technical debt signals, architecture concerns, dependency issues, and AI-assisted guidance on what to fix first. The goal is to turn an opaque legacy system into an explainable modernization backlog.