Skip to content

JPeetz/agent-skills / skills/development/mattpocock-dev-workflows

mattpocock-dev-workflows

Verified

Use when you need Matt Pocock's engineering workflow patterns: spec synthesis, deep-module design, domain modeling, two-axis code review, or disciplined bug diagnosis. A meta-skill covering five complementary sub-patterns for real engineering — not vibe coding.

references/deepening.md

View on GitHub
# Deepening Process

How to deepen a cluster of shallow modules safely, given its
dependencies. Assumes the vocabulary from codebase-design-glossary.md:
module, interface, seam, adapter.

## Dependency categories

When assessing a candidate for deepening, classify its dependencies. The
category determines how the deepened module is tested across its seam.

### 1. In-process

Pure computation, in-memory state, no I/O. Always deepenable: merge the
modules and test through the new interface directly. No adapter needed.

### 2. Local-substitutable

Dependencies that have local test stand-ins (PGLite for Postgres,
in-memory filesystem). Deepenable if the stand-in exists. The deepened
module is tested with the stand-in running in the test suite. The seam is
internal; no port at the module's external interface.

### 3. Remote but owned (Ports & Adapters)

Your own services across a network boundary (microservices, internal
APIs). Define a **port** (interface) at the seam. The deep module owns
the logic; the transport is injected as an **adapter**. Tests use an
in-memory adapter. Production uses an HTTP/gRPC/queue adapter.

Recommendation shape: *"Define a port at the seam, implement an HTTP
adapter for production and an in-memory adapter for testing, so the logic
sits in one deep module even though it's deployed across a network."*

### 4. True external (Mock)

Third-party services (Stripe, Twilio, etc.) you don't control. The
deepened module takes the external dependency as an injected port; tests
provide a mock adapter.

## Seam discipline

- **One adapter means a hypothetical seam. Two adapters means a real
  one.** Don't introduce a port unless at least two adapters are justified
  (typically production + test). A single-adapter seam is just indirection.
- **Internal seams vs external seams.** A deep module can have internal
  seams (private to its implementation, used by its own tests) as well as
  the external seam at its interface. Don't expose internal seams through
  the interface just because tests use them.

## Testing strategy: replace, don't layer

- Old unit tests on shallow modules become waste once tests at the
  deepened module's interface exist; **delete them**.
- Write new tests at the deepened module's interface. The **interface is
  the test surface**.
- Tests assert on observable outcomes through the interface, not internal
  state.
- Tests should survive internal refactors, since they describe behaviour,
  not implementation. If a test has to change when the implementation
  changes, it's testing past the interface.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall