codebase-design

Design deep modules with small interfaces, clean seams, and testable adapters.

Updated Sep 19, 2026
One-click install
npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill codebase-design-ab0umar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/Ab0umar/selrs.cc.BU/tree/main/.agents/skills/codebase-design
Command: npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill codebase-design-ab0umar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, making code hard to test, navigate, and refactor. This Skill provides a shared vocabulary and decision framework for designing deep modules that hide complexity behind small interfaces. ## Core Features & Use Cases - Deep-module vocabulary: Precise definitions of module, interface, implementation, depth, seam, adapter, leverage, and locality so teams and AI agents name things consistently. - Dependency-aware deepening: Classifies dependencies as in-process, local-substitutable, remote-but-owned, or true external, and prescribes ports-and-adapters or mock strategies for each. - Design It Twice workflow: Spawns parallel sub-agents to produce radically different interface designs, then compares them on depth, locality, and seam placement. - Use Case: When refactoring a cluster of shallow service functions, use this Skill to decide where the seam goes, whether a port is justified, and how to write tests at the new interface while deleting obsolete unit tests. ## Quick Start Ask the AI to review a module's interface using the codebase-design vocabulary and suggest deepening opportunities with a testing strategy.

Frequently Asked Questions about codebase-design

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

FAQPage Schema
How do I design a deep module interface?▼

A deep module puts a large amount of behaviour behind a small interface. Reduce the number of methods, simplify parameters, and hide complexity inside. Measure depth as leverage: how much behaviour callers exercise per unit of interface they must learn.

What is the difference between a seam and an interface?▼

A seam is the location where a module's interface lives, a place where behaviour can be altered without editing that code. The interface is everything a caller must know to use the module, including invariants, ordering, and error modes.

When should I introduce a port and adapter?▼

Introduce a port only when at least two adapters are justified, typically a production adapter and a test adapter. One adapter means a hypothetical seam that adds indirection without value; two adapters make the seam real.

How do I test a deepened module with external dependencies?▼

Inject the external dependency as a port and provide a mock adapter in tests. Write tests at the deepened module's interface, assert on observable outcomes, and delete old unit tests on the shallow modules that were merged.

What are the limitations of the deep-module approach?▼

Depth measured as implementation-lines to interface-lines is rejected because it rewards padding. The approach also warns against exposing internal seams through the public interface just because tests use them.