Files
skills/skills/engineering/tdd/deep-modules.md
T
Matt Pocock 62f43a1817 Add new skills for TDD, issue management, PRD creation, and productivity tools
- Introduced TDD skills including deep modules, interface design, mocking, refactoring, and testing guidelines.
- Added skills for breaking plans into GitHub issues and creating PRDs from conversation context.
- Implemented productivity skills for scaffolding exercises, setting up pre-commit hooks, and managing notes in Obsidian.
- Created a caveman communication mode for concise technical responses and a grilling technique for thorough plan discussions.
- Developed a skill for writing new agent skills with structured templates and guidelines.
- Included git guardrails to prevent dangerous git commands and a migration guide for using @total-typescript/shoehorn in tests.
2026-04-28 09:42:34 +01:00

1.2 KiB

Deep Modules

From "A Philosophy of Software Design":

Deep module = small interface + lots of implementation

┌─────────────────────┐
│   Small Interface   │  ← Few methods, simple params
├─────────────────────┤
│                     │
│                     │
│  Deep Implementation│  ← Complex logic hidden
│                     │
│                     │
└─────────────────────┘

Shallow module = large interface + little implementation (avoid)

┌─────────────────────────────────┐
│       Large Interface           │  ← Many methods, complex params
├─────────────────────────────────┤
│  Thin Implementation            │  ← Just passes through
└─────────────────────────────────┘

When designing interfaces, ask:

  • Can I reduce the number of methods?
  • Can I simplify the parameters?
  • Can I hide more complexity inside?