codebase-design

Defines vocabulary and principles for designing deep modules with small interfaces at clean seams.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/toderian/project_template --skill codebase-design-toderian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/toderian/project_template/tree/main/plugins/agents-core/skills/codebase-design
Command: npx skills add https://github.com/toderian/project_template --skill codebase-design-toderian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams lack a shared, precise vocabulary for discussing module design, leading to shallow abstractions, misplaced seams, and interfaces that are hard to test. This Skill standardizes terms like module, interface, seam, adapter, and depth so design, testing, and review discussions stay consistent. ## Core Features & Use Cases - Shared design glossary: Defines module, interface, implementation, adapter, depth, seam, leverage, and locality with explicit terms to avoid. - Deep vs shallow module guidance: Provides the deletion test, depth-as-leverage framing, and rules for when a seam is justified (two adapters, not one). - Testability and deepening references: Covers dependency injection patterns and a references/deepening.md guide classifying dependencies (in-process, local-substitutable, remote owned, true external) with a replace-don't-layer testing strategy. - Use Case: When reviewing whether to extract an interface for a new payment module, consult this Skill to decide if the seam is real, how deep the module should be, and how tests should cross the interface. ## Quick Start Ask the agent to review a module's interface using the codebase-design vocabulary and identify whether it is deep or shallow.

Frequently Asked Questions about codebase-design

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

FAQPage Schema
What is a deep module in software design?

A deep module packs a large amount of behaviour behind a small interface, giving callers more capability per unit of interface they must learn. A shallow module is the opposite: an interface nearly as complex as its implementation, which should be avoided.

How do I decide where to put a seam in my code?

Place a seam where behaviour needs to change without editing in place, typically where at least two adapters exist, such as production plus test. A single-adapter seam is unjustified indirection and should be avoided.

When should I introduce an interface or port for a dependency?

Introduce a port when something actually varies across the seam, usually production and test adapters. For remote owned services use ports and adapters; for true external third-party services inject the dependency and mock it in tests.

How do I make a module 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, never internal state.

Should I keep old unit tests after deepening a module?

No. Once tests exist at the deepened module's interface, old unit tests on the shallow modules become waste and should be deleted rather than layered. Tests at the interface survive internal refactors because they describe behaviour.