improve-codebase-architecture
Improve Codebase Architecture
Surface architectural friction as deepening opportunities: refactors that turn
shallow modules into deep ones. Use the codebase-design vocabulary throughout and
respect the active project's domain language and ADRs.
Resolve every .agents/projects/ path from the repository root; never read or write
project artifacts in a global agent-installation directory.
Process
-
Scope before scanning. Use a direction named by the user, or inspect a useful span of commit history to identify recently changing hot spots. Read
.agents/projects/<project>/CONTEXT.mdand relevant project ADRs, then explore the selected area for shallow modules, leaking seams, poor locality, and interfaces that resist behavior-focused tests. Apply the deletion test to every candidate.Done when candidates are grounded in real friction in the selected code area.