improve-codebase-architecture

Identify architectural friction and deepening opportunities in codebases.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/Soham407/studio-kickstart --skill improve-codebase-architecture-soham407
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/Soham407/studio-kickstart/tree/main/architecture/matt-pocock-improve-codebase-architecture
Command: npx skills add https://github.com/Soham407/studio-kickstart --skill improve-codebase-architecture-soham407

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you identify architectural friction—modules that are hard to understand, hard to test through their interface, or tightly coupled—so you can refactor toward deeper, more testable designs with clear seams and adapters.

Core Features & Use Cases

  • Improves architecture through deepening candidates: surfaces places where interface-level tests would replace wasteful shallow tests, improving locality and leverage.
  • Uses a consistent architecture vocabulary: applies the skill’s module/interface/seam/adapter language (from LANGUAGE.md) to keep refactors precise and AI-navigable.
  • Balances options with design exploration: supports a “present candidates → select one → grilling loop” workflow, and optionally explores alternative interface designs via sub-agent patterns.

Quick Start

Ask an AI to “walk my repository, name deepening opportunities using the module/interface/seam/adapter vocabulary, and propose a prioritized list of candidates that improve testability and AI-navigability.”

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 into deeper, more testable code?

To refactor shallow modules into deeper, testable code, analyze your codebase for architectural friction and seam placement issues, then consolidate tightly coupled logic behind clear module interfaces using adapters for testing and production environments.

What is the ports-and-adapters pattern for testing strategy?

The ports-and-adapters pattern for testing strategy isolates core logic behind seams, allowing you to replace shallow tests with interface-level tests that leverage adapters to inject test data and verify production behavior.

How do I identify architectural friction in a codebase?

You identify architectural friction in a codebase by scanning for modules that are hard to understand, hard to test through their interface, or tightly coupled, then mapping these shallow modules to prioritized deepening candidates.

Does this codebase refactoring approach work with existing ADRs?

Yes, this refactoring approach works with existing ADRs by exploring the project and Architecture Decision Records first to ensure proposed deepening candidates and seam placements align with your established design decisions.

What's the best way to define seams and adapters for testing?

The best way to define seams and adapters for testing is through a grilling loop that evaluates prioritized deepening candidates, explicitly defining the deepened module boundary and its appropriate adapters for both test and production environments.

When should I not use deepening candidates for refactoring?

You should not use deepening candidates for refactoring when your modules are already deep, easily testable through their interfaces, or when your current architecture exhibits no significant locality, leverage, or coupling issues.