codebase-designlisted
Install: claude install-skill buildproven/claude-kit
# Codebase Design
Design modules that hide meaningful complexity behind a small, stable
interface. This vocabulary and discipline are adapted from Matt Pocock's
MIT-licensed `codebase-design` skill; see `NOTICE`.
## Vocabulary
- **Module** — an interface plus its implementation, at any scale.
- **Interface** — everything callers must know: operations, invariants, error
modes, ordering, configuration, and performance expectations.
- **Seam** — where behavior can vary without editing the caller.
- **Adapter** — a concrete implementation that occupies a seam.
- **Depth** — useful behavior delivered per unit of interface callers learn.
- **Leverage** — capability reused by many callers through one interface.
- **Locality** — changes, knowledge, bugs, and verification concentrated in
one place.
## Design tests
### Deletion test
Imagine deleting the module:
- If complexity disappears, it may be a pass-through.
- If the complexity spreads back across callers, the module is earning its
place.
### Interface test
Callers and tests should use the same supported seam. If tests must reach
through the interface into internals, either the test is coupled to
implementation or the module is shaped incorrectly.
### Variation test
One adapter is often a hypothetical abstraction. Introduce a seam when
behavior actually varies, external effects need isolation, or the interface
meaningfully concentrates complexity.
## Deepening workflow
1. Identify repeated knowledge or coordina