codebase-design

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

10|3|Updated Jul 18, 2019
One-click install
npx skills add https://github.com/tanqimin/MyFavsORM --skill codebase-design-tanqimin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/tanqimin/MyFavsORM/tree/main/.agents/skills/codebase-design
Command: npx skills add https://github.com/tanqimin/MyFavsORM --skill codebase-design-tanqimin

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, depth, seam, adapter, leverage, and locality so teams and AI agents name design concepts 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 classes, use this Skill to decide where the seam goes, whether a port is justified, and how to test through the new interface while deleting obsolete unit tests. ## Quick Start Ask the AI to review a module 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 minimizing the number of methods and simplifying parameters while hiding complexity inside the implementation. Ask whether deleting the module would make complexity vanish (a pass-through) or reappear across callers (earning its keep).

What is the difference between a seam and an interface?

A seam is the location where a module's interface lives and where behavior can be altered without editing that place. 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. A single-adapter seam is just indirection and should be avoided.

How do I test a deepened module after merging shallow modules?

Write new tests at the deepened module's interface and delete the old unit tests on the shallow modules. Tests should assert observable outcomes through the interface so they survive internal refactors.

How should external third-party dependencies be handled in module design?

Treat true external services like payment providers as injected ports, with tests supplying mock adapters. For your own remote services, define a port with an HTTP adapter in production and an in-memory adapter in tests.