improve-codebase-architecture

Identify shallow modules and propose higher-depth refactors with interface-level test surfaces.

1|Updated May 22, 2026
One-click install
npx skills add https://github.com/spontus-reach/spontus --skill improve-codebase-architecture-spontus-reach
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/spontus-reach/spontus/tree/main/.agents/skills/improve-codebase-architecture
Command: npx skills add https://github.com/spontus-reach/spontus --skill improve-codebase-architecture-spontus-reach

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It identifies architectural friction in a codebase and recommends refactors that increase interface depth, improve testability, and concentrate knowledge and verification at stable seams.

Core Features & Use Cases

  • Explore deepening opportunities by scanning a codebase for shallow modules, weak locality, and seams that don’t support effective testing.
  • Propose candidate refactors that turn shallow modules into deep ones while aligning with the project’s domain vocabulary and existing ADR decisions.
  • Run a grilling loop with the user to validate constraints, dependency categories, seam placement, adapter strategy, and the test surface for the deepened module.
  • Guide interface exploration using a “Design It Twice” approach to generate and compare radically different interface shapes for the chosen candidate.

Quick Start

Use the skill to analyze your target area and produce a numbered list of deepening candidates, then choose one to grill for seam and testing strategy.

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?

Refactoring shallow modules involves identifying deepening opportunities that replace weak designs with higher-depth interfaces, enforcing seam and adapter discipline to concentrate knowledge and improve testability.

What makes a module shallow and how does deepening fix testability?

Shallow modules have weak locality and seams that don't support effective testing, while deepening replaces them with stable interface-level test surfaces that pass the deletion test, concentrating verification where it belongs.

How do I consolidate tightly-coupled modules for better interface design?

Consolidating tightly-coupled modules requires scanning for deepening candidates, validating dependency categories, and applying ports and adapters strategy to establish stable seams that support AI-navigable maintenance.

Can I use a Design It Twice approach to compare different interface shapes?

Yes, the Design It Twice approach guides interface exploration by generating and comparing radically different interface shapes for a chosen deepening candidate, aligning with domain vocabulary and existing ADR decisions.

When should I apply ports and adapters to prepare codebases for AI-navigable maintenance?

Apply ports and adapters when improving architecture to replace shallow module designs, enforce seam and adapter discipline, and focus validation on interface-level test surfaces using the deletion test for AI-navigable maintenance.

What's the best way to validate seam placement during a codebase refactoring?

Validating seam placement requires running a grilling loop to check constraints, dependency categories, adapter strategy, and the test surface for the deepened module against the deletion test.