codebase-design
Shared vocabulary and principles for designing deep modules: a lot of behaviour behind a small interface, at a clean seam, testable through that interface.
Skill by dougborg
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dougborg-codebase-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/codebase-design
What's inside
- Skill name
codebase-design- Description
- Shared vocabulary and principles for designing deep modules: a lot of behaviour behind a small interface, at a clean seam, testable through that interface. Use when designing or reshaping a module's interface, deciding where a seam goes, making code more testable or easier for agents to navigate, and when another skill needs the deep-module vocabulary.
- License
- Apache-2.0
- Instructions
- 74 lines in SKILL.md · view on GitHub
Files (3)
- DEEPENING.md
- DESIGN-IT-TWICE.md
- SKILL.md
SKILL.md (first lines)
# Codebase Design Design **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. The aim is leverage for callers, locality for maintainers, and testability for everyone. ## Vocabulary Use these terms exactly; consistent words are the point. - **Module**: anything with an interface and an implementation, at any scale: a function, class, package, or slice across tiers. _Avoid_: unit, component, service. - **Interface**: everything a caller must know to use the module correctly: the signature plus invariants, ordering constraints, error modes, required configuration, and performance characteristics. _Avoid_: API, signature (both name only the type-level surface). - **Implementation**: the code inside a module. - **Depth**: leverage at the interface, the behaviour a caller or test can exercise per unit of interface they have to learn. The deep-module idea is Ousterhout's; measuring it as leverage rather than as a ratio of implementation lines to interface lines is deliberate, since a line ratio rewards padding. **Deep**: much behaviour behind a small interface. **Shallow**: the interface is nearly as complex as the implementation. - **Seam** (Michael Feathers): a place where behaviour can change without editing that place; where a module's interface lives. Where to put it is a design decision of its own. _Avoid_: boundary (overloaded with DDD's bounded context). - **Adapter**: a concrete thing that satisfies an interface at a seam. It names a role, not a size: a thin adapter can wrap a large implementation. - **Leverage**: what callers gain from depth; one implementation pays back across many call sites and tests. - **Locality**: what maintainers gain from depth; change, bugs, and knowledge concentrate in one place. ## Principles - **Depth belongs to the interface.** A deep module can be built from small, swappable parts inside; they just aren't part of its interface. A module can have internal seams for its own tests as well as the external seam callers use. - **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across many callers, it was earning its keep. - **The interface is the test surface.** Callers and tests cross the same seam. Wanting to test past the interface means the module is the wrong shape. - **One adapter means a hypothetical seam; two adapters mean a real one.** Introduce a seam only when something actually varies across it (typically production and test). ## Designing for testability - **Accept dependencies; don't construct them.** `processOrder(order, paymentGateway)` is testable; a function that builds its own gateway is not. - **Return results rather than producing side effects** where the caller can apply them: `calculateDiscount(cart): Discount` over `applyDiscount(cart): void`. - **Keep the surface small.** Fewer methods mean fewer tests; fewer parameters mean simpler setup. For any interface, ask: can it have fewer methods, simpler parameters, or hide more inside? ## Going deeper - Deepening a cluster of shallow modules given their dependencies (in-process, local stand-in, remote but owned, true external), seam discipline, and replacing old tests rather than layering on them: [DEEPENING.md](DEEPENING.md). - Exploring alternative interfaces with parallel subagents, each designing under a different constraint, then comparing on depth, locality, and seam placement: [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md).
From dougborg/harness-kit, Apache-2.0.
More from dougborg/harness-kit
- 0.565score
adhd-mode
dougborg
Shapes every response for a reader with ADHD: the next action first, numbered steps, progress restated each turn, tangents held back, concrete time estimates…
SkillAFreshness: AClaude Code +9 - 0.565score
agent-standup
dougborg
Reconciles and coordinates shared work across multiple coding agents and human operators.
SkillAFreshness: AClaude Code +9 - 0.565score
code-reviewer
dougborg
Reviews a diff across six dimensions — correctness, design, readability, performance, testing, security — plus the repo's documented standards, code smells…
SkillAFreshness: AClaude Code +9 - 0.565score
commit
dougborg
Creates conventional commits with quality gates — stages intentionally, checks for uv.lock drift, runs the project's verification command, and writes the…
SkillAFreshness: AClaude Code +9 - 0.565score
diagnosing-bugs
dougborg
A disciplined diagnosis loop for hard bugs and performance regressions: build a tight feedback loop that goes red on this bug, minimise, hypothesise…
SkillAFreshness: AClaude Code +9 - 0.565score
documentation-writer
dougborg
Writes and revises human-facing documentation — READMEs, contributor and setup guides, reference pages, architecture notes, CLAUDE.md, and changelog entries.
SkillAFreshness: AClaude Code +9 - 0.565score
domain-modeling
dougborg
Builds and sharpens a project's domain language as decisions are made: challenges fuzzy or conflicting terms, stress-tests concepts with edge-case scenarios…
SkillAFreshness: AClaude Code +9 - 0.565score
grilling
dougborg
Interviews the user relentlessly about a plan, design, decision, or idea until every branch of the decision tree is resolved and nothing is silently assumed.
SkillAFreshness: AClaude Code +9 - 0.565score
harness-issue
dougborg
Files a bug report, idea, or proposed change against the upstream harness repo resolved from the project's config, from any project that uses harness-kit.
SkillAFreshness: AClaude Code +9 - 0.561score
budget
dougborg
Check the Claude usage/token budget before dispatching subagents or large fan-outs.
SkillAFreshness: AClaude Code +9 - 0.561score
harness
dougborg
Audits, bootstraps, updates, and improves a project's agent harness: the skills, agents, hooks, and instructions for Claude Code and Codex.
SkillAFreshness: AClaude Code +9 - 0.558score
implement
dougborg
Build a ticket or small spec in this session, test-first, through to an open PR.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 1
- Open issues
- 8
- Last commit (this folder)
- Oct 6, 2026 (22 days ago)
- Last release
- Oct 18, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/dougborg/harness-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dougborg
- 0.565score
agent-standup
dougborg
Reconciles and coordinates shared work across multiple coding agents and human operators.
SkillAFreshness: AClaude Code +9 - 0.565score
adhd-mode
dougborg
Shapes every response for a reader with ADHD: the next action first, numbered steps, progress restated each turn, tangents held back, concrete time estimates…
SkillAFreshness: AClaude Code +9 - 0.565score
code-reviewer
dougborg
Reviews a diff across six dimensions — correctness, design, readability, performance, testing, security — plus the repo's documented standards, code smells…
SkillAFreshness: AClaude Code +9 - 0.565score
commit
dougborg
Creates conventional commits with quality gates — stages intentionally, checks for uv.lock drift, runs the project's verification command, and writes the…
SkillAFreshness: AClaude Code +9 - 0.565score
diagnosing-bugs
dougborg
A disciplined diagnosis loop for hard bugs and performance regressions: build a tight feedback loop that goes red on this bug, minimise, hypothesise…
SkillAFreshness: AClaude Code +9 - 0.565score
documentation-writer
dougborg
Writes and revises human-facing documentation — READMEs, contributor and setup guides, reference pages, architecture notes, CLAUDE.md, and changelog entries.
SkillAFreshness: AClaude Code +9
Cite this page
codebase-design skill. Agent Mart. https://agentmart.dev/skills/dougborg-codebase-design (last updated 2026-10-24)