improve-codebase-architecture
Improve Codebase Architecture
Explore a codebase like an AI would, surface architectural friction, discover opportunities for improving testability, and propose module-deepening refactors as GitHub issue RFCs.
A deep module (John Ousterhout, "A Philosophy of Software Design") has a small interface hiding a large implementation. Deep modules are more testable, more AI-navigable, and let you test at the boundary instead of inside.
Process
1. Explore the codebase
Use the Agent tool with subagent_type=Explore to navigate the codebase naturally. Do NOT follow rigid heuristics — explore organically and note where you experience friction:
- Where does understanding one concept require bouncing between many small files?
- Where are modules so shallow that the interface is nearly as complex as the implementation?
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called?
- Where do tightly-coupled modules create integration risk in the seams between them?
- Which parts of the codebase are untested, or hard to test?
More from spences10/claude-code-toolkit
terminal-optimization
Terminal setup for Claude Code. Use for Ghostty config, statusline customization, voice dictation, tmux worktrees.
17reflect
Analyze session history for learnings and persist to skills. Solves \"memory zero\" - correct once, never again.
9techdebt-finder
Find technical debt patterns in codebases. Use when asked to find duplicated code, inconsistent patterns, or refactoring opportunities.
9skill-creator
Design and create Claude Skills using progressive disclosure principles. Use when building new skills, planning skill architecture, or writing skill content.
6claude-md-maintenance
Maintain CLAUDE.md files effectively. Use when adding lessons learned, updating conventions, or restructuring project instructions.
5research
Verify sources before presenting findings. Use when asked to research links or documentation.
4