codebase-design

Designs deep modules with small interfaces, clean seams, and interface-level testing.

3|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/MaxWolf-01/agents --skill codebase-design-maxwolf-01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/MaxWolf-01/agents/tree/main/mx/skills/codebase-design
Command: npx skills add https://github.com/MaxWolf-01/agents --skill codebase-design-maxwolf-01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, spreading complexity across callers and making code hard to test and navigate. This Skill provides a shared vocabulary and decision framework for designing deep modules: a lot of behaviour behind a small interface, placed at a clean seam. ## Core Features & Use Cases - Deep-module vocabulary: Precise definitions of module, interface, depth, seam, adapter, leverage, and locality, with explicit terms to avoid, so teams and AI agents name things consistently. - Dependency-aware deepening: Classifies dependencies (in-process, local-substitutable, remote-but-owned, true external) and prescribes ports-and-adapters strategies and replace-don't-layer testing for each. - Design It Twice workflow: Spawns parallel sub-agents to produce radically different interface designs for a candidate module, then compares them on depth, locality, and seam placement. - Use Case: When refactoring a tangled cluster of small classes, use this Skill to identify the right seam, merge the cluster into one deep module, and write tests only at its interface. ## Quick Start Ask the agent to review a module or package in your repository and propose a deeper interface using the codebase-design vocabulary.

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?

Start by asking three questions: can you reduce the number of methods, simplify the parameters, and hide more complexity inside. Each yes increases depth, meaning more behaviour per unit of interface callers must learn. Then verify the interface works as the sole test surface.

What is a seam in software design?

A seam, from Michael Feathers, is a place where you can alter behaviour without editing in that place; it is the location where a module's interface lives. Choosing where the seam goes is a design decision distinct from what implementation sits behind it.

When should I use ports and adapters for dependencies?

Use ports and adapters when a dependency crosses a network boundary you own, such as internal microservices, or is a true external service like Stripe. Only introduce a port when at least two adapters are justified, typically a production adapter and a test adapter.

Should I keep old unit tests after merging shallow modules?

No. Once tests exist at the deepened module's interface, old unit tests on the shallow modules become waste and should be deleted. Tests should assert observable outcomes through the interface so they survive internal refactors.

What is the Design It Twice approach for interfaces?

Design It Twice spawns three or more parallel sub-agents, each producing a radically different interface under different constraints such as minimal entry points or maximum flexibility. You then compare the designs on depth, locality, and seam placement before choosing or hybridizing.