improve-codebase-architecture

Identify shallow, tightly coupled modules and propose deepening refactors with RFC issues.

12|Updated Dec 25, 2024
One-click install
npx skills add https://github.com/whyte25/reusables --skill improve-codebase-architecture-whyte25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/whyte25/reusables/tree/main/.agents/skills/improve-codebase-architecture
Command: npx skills add https://github.com/whyte25/reusables --skill improve-codebase-architecture-whyte25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you identify architectural friction that makes a codebase hard to understand, refactor, and test, by targeting shallow, tightly-coupled modules for deepening into testable boundaries.

Core Features & Use Cases

  • Explore architectural friction: Navigate the codebase to find seams where integration risk, coupling, or untestable behavior accumulates.
  • Propose deepening candidates: Produce a ranked set of deepening opportunities describing the involved modules, coupling reasons, dependency category, and expected test impact.
  • Design multiple interface options: Generate 3+ radically different deep-module interface designs with signatures, usage examples, hidden complexity, dependency strategy, trade-offs, and a recommended direction.
  • Create an RFC issue: Turn the selected refactor into a GitHub issue using the provided architectural RFC template.

Quick Start

Ask the AI to improve your codebase architecture by finding shallow, tightly-coupled modules and proposing deepening refactors with a testable interface and an RFC issue.

Frequently Asked Questions about improve-codebase-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor shallow modules to improve codebase architecture and testability?

To improve codebase architecture, you refactor shallow modules by identifying tightly coupled seams and deepening them into boundary interfaces. This shifts testing to dependency boundaries, reducing integration risk and making behavior easier to verify.

What is the best way to design deep module interfaces for existing code?

Designing deep module interfaces involves generating multiple radically different architectural variants with distinct signatures and dependency strategies. You compare the hidden complexity and trade-offs of each to select a recommended direction for your refactor.

How do I create an architectural RFC issue on GitHub for a refactoring effort?

You create an architectural RFC issue by documenting the selected deepening refactor, including the involved modules, coupling reasons, and expected test impact. The Skill formats this data using a defined GitHub RFC template to propose the structural changes.

Why does tight coupling make my codebase hard to test and navigate?

Tight coupling makes a codebase hard to test because shallow modules accumulate architectural friction across internal seams. This coupling increases integration risk and scatters behavior, preventing you from isolating logic at dependency boundaries for testing.

Can I use this approach to fix architectural friction across internal dependency categories?

Yes, you can fix architectural friction across internal dependency categories by iteratively exploring the codebase. The process prioritizes deepening candidates by classifying dependencies and evaluating the expected test impact for each tightly coupled module.

When should I not use deep module refactoring for testability?

You should avoid deep module refactoring when your codebase lacks clear architectural friction or internal seams. If modules are already decoupled and behavior is easily testable across existing boundaries, deepening interfaces adds unnecessary structural overhead.