Reference · Matt Pocock's Skills

Health Card

Keep the next feature easy: deepen the code, and fix the agent's environment.

Sources: codebase-design (+ DEEPENING.md), improve-codebase-architecture, retro, and their guides, commit 5beb35b.

Vocabulary (use these words exactly)

SayMeansNot
ModuleAnything with an interface and an implementation, at any scaleunit, component, service
InterfaceEverything a caller must know: types, invariants, ordering, errors, config, performanceAPI, signature
SeamWhere an interface lives; you can change behaviour there without editing thereboundary
AdapterA concrete thing filling the slot at a seam (a role)
DepthBehaviour per unit of interface learned. Deep = small interface, lots behind itlines ratio
Leverage / LocalityWhat callers get / what maintainers get from depth

Four principles

  1. Deletion test: if complexity vanishes, the module was a pass-through; if it reappears across callers, it earns its keep.
  2. The interface is the test surface. Wanting to test past it means the module is the wrong shape.
  3. One adapter = hypothetical seam; two = real.
  4. Depth belongs to the interface. Internal seams stay private.

Testing across the seam, by dependency

DependencyTest with
In-processMerge and test directly; no adapter
Local-substitutableA local stand-in (PGLite, in-memory FS)
Remote but ownedA port: HTTP adapter for production, in-memory adapter for tests
True externalAn injected port with a mock adapter

Replace, don't layer: once tests at the deepened interface exist, delete the old shallow unit tests.

/improve-codebase-architecture

  1. Scope: take your direction, or read git log for hot spots. Best prompt: point it at the next spec and ask "how can we make this change easy?"
  2. A subagent explores; each candidate must pass the deletion test.
  3. An HTML report in $TMPDIR, with badges Strong / Worth exploring / Speculative. It then stops and asks. It changes no code.
  4. Grill one candidate → decision → /to-spec → /to-tickets → /implement. Use one candidate per session.

/retro: where each finding goes

Session symptomFix
Slow to find a file or factNavigation pointer
A mistake a tool could catch (mechanical)Deterministic check: lint, hook, or CI
The reviewer missed a judgement callCODING_STANDARDS.md (read by the reviewer)
Couldn't reach informationWiden access (tee logs, read-only service access)
Bloated CLAUDE.md/AGENTS.mdMove steering out; delete no-ops

← Course index · Skill Map · On-ramps Card · Build Card

Related ideas