codebase-design

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

1|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/SevWren/Daily-Motivation-Brain-Helper --skill codebase-design-sevwren
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/SevWren/Daily-Motivation-Brain-Helper/tree/main/CLAUDE/skills/engineering/codebase-design
Command: npx skills add https://github.com/SevWren/Daily-Motivation-Brain-Helper --skill codebase-design-sevwren

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 change. 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, seam, adapter, depth, leverage, and locality so teams and AI agents name things consistently. - Dependency-aware deepening: Classifies dependencies (in-process, local-substitutable, remote-owned, true external) and prescribes ports-and-adapters strategies for each, with replace-don't-layer testing guidance. - 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 cluster of shallow service classes, use this Skill to identify the right seam, define a minimal interface, and generate competing interface designs before committing to one. ## Quick Start Ask the assistant to review a module or package in your codebase 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 reducing the number of methods and simplifying parameters so more behavior hides behind less surface. Accept dependencies rather than creating them, return results rather than producing side effects, and verify depth with the deletion test: if deleting the module pushes complexity into callers, it earns its keep.

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 code. The interface is everything a caller must know to use the module: signatures, invariants, ordering, error modes, and performance characteristics.

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. A single-adapter seam is just indirection. Use ports for remote-owned or third-party dependencies so tests can substitute in-memory or mock adapters.

How do I test a deepened module without mocking everything?▼

Write tests at the deepened module's interface, treating the interface as the test surface, and delete old unit tests on the shallow modules it absorbed. Use local stand-ins like in-memory databases for substitutable dependencies and mock adapters only for true external services.

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 distinct constraints such as minimal surface, maximum flexibility, or common-case optimization. The designs are then compared on depth, locality, and seam placement, with an opinionated recommendation.