codebase-design

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

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/Evolutionary-Leadership/harness --skill codebase-design-evolutionary-leadership
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/Evolutionary-Leadership/harness/tree/main/.claude/skills/codebase-design
Command: npx skills add https://github.com/Evolutionary-Leadership/harness --skill codebase-design-evolutionary-leadership

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, change, and reason about. 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: Defines precise terms (module, interface, seam, adapter, depth, leverage, locality) so teams discuss architecture consistently instead of mixing overloaded words like "component" or "boundary". - Dependency-aware deepening: Classifies dependencies into four categories (in-process, local-substitutable, remote but owned, true external) and prescribes the right seam and adapter strategy for each. - Design It Twice: Spawns parallel sub-agents that each produce a radically different interface for a candidate module, then compares them on depth, locality, and seam placement with an opinionated recommendation. - Use Case: When refactoring a cluster of shallow service classes, use this Skill to decide where the seam belongs, whether a port-and-adapter pair is justified, and how to replace old unit tests with tests at the new interface. ## Quick Start Ask the assistant to review a module's interface using the codebase-design vocabulary and suggest how to deepen it.

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 behavior behind a small interface. Reduce the number of methods, simplify parameters, and hide complexity inside the implementation so callers get more capability 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 behavior can be altered without editing that spot. 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 plus a test adapter. A single-adapter seam is just indirection and should be avoided.

How do I make code more testable through its interface?

Accept dependencies as parameters instead of constructing them, return results instead of producing side effects, and keep the surface area small. Tests should assert observable outcomes through the interface, not internal state.

When should old unit tests be deleted after refactoring?

Delete unit tests on shallow modules once tests exist at the deepened module's interface. The interface becomes the test surface, and tests that change when the implementation changes are testing past the interface.