improve-codebase-architecture

Installation
SKILL.md

Improve Codebase Architecture

Find refactors that turn shallow modules into deep ones and improve locality, leverage, testability, and navigation.

Context

Read CONTEXT.md and relevant ADRs before analysis. Apply the vocabulary and principles from codebase-design, including module, interface, depth, seam, adapter, leverage, locality, and the deletion test. Preserve the project's domain terms.

Explore

Inspect the codebase directly. When broad exploration would help and the active runtime permits delegation, use its explorer or subagent capability through RUNTIME_TOOLS.md; otherwise continue in the main agent. Look for shallow interfaces, scattered knowledge, leaking seams, low-locality call patterns, and behavior that is difficult to test through a stable interface.

Present Candidates

Write a self-contained HTML report to the operating system's temporary directory and tell the user its absolute path. Use Mermaid for graph-shaped relationships and HTML, CSS, or SVG for editorial comparisons. Each candidate should include involved files, the friction, a plain-language change, benefits, a before/after view, ADR conflicts, and a confidence rating. End with the strongest recommendation.

See HTML-REPORT.md for the report scaffold and visual patterns. Do not propose detailed interfaces until the user selects a candidate.

Explore the Selection

Installs
3
First Seen
Mar 29, 2026