/zsl:codebase-designfrom zsl
Shared vocabulary and refinements for reasoning about module depth, interfaces, seams, and adapters — the deep-module design language. Use when discussing module/interface design, whether a module is deep or shallow, where to place a seam, how to design an interface for testability, or when exploring alternative interfaces for a module. Composed by /improve-codebase-architecture and /tdd.
Ships in zsl. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The shared design language for module depth, interfaces, seams, and adapters. One
home for the deep-module vocabulary so the terms mean the same thing in every
skill that reasons about architecture — /improve-codebase-architecture, /tdd,
and anything else that touches interface design composes this skill instead of
carrying its own copy.
Most terms come from two books — A Philosophy of Software Design (Ousterhout, "APoSD") and Clean Architecture (Martin) — bundled as decision-pressure rules into the skills that consume this vocabulary. When we use a book's term, we use it the way the book uses it. A few terms are ours, added where the books don't have a precise name for what we mean.
Module (both books) Anything with an interface and an implementation. Scale-agnostic — applies equally to a function, class, package, or tier-spanning slice. APoSD: a deep module has a small interface hiding a large body of behaviour; a shallow module has an interface nearly as wide as its implementation. Avoid: unit, component, service.
Interface (both books) Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. Clean Architecture calls inward-owned interfaces ports (see below). Avoid: API, signature (too narrow — those refer only to the type-level surface).
Implementation (APoSD) What's inside a module — its body of code. Distinct from adapter: a thing can be a small adapter with a large implementation (a Postgres repository) or a large adapter with a small implementation (an in-memory fake).
Depth (APoSD) Leverage at the interface: a lot of behaviour behind a small interface. Deep = high leverage. Shallow = interface nearly as complex as the implementation.
Boundary (Clean Architecture) A line across which source dependencies cross in one direction only. Enforces the dependency rule: dependencies point inward toward higher-level policy. A boundary is a particular kind of seam — one that also enforces a dependency direction.
Layer (Clean Architecture) A horizontal stack of modules at the same level of policy. The inward direction is upward in policy (more general, more stable). Not interchangeable with module — a layer is the stack; a module is a unit within it.
Port (Clean Architecture) An interface owned by an inner layer, implemented by an outer-layer adapter. Use "port" when the dependency-direction property is the point; otherwise just interface.
Adapter (Clean Architecture) A concrete thing that satisfies an interface at a seam or boundary. Describes role (what slot it fills), not substance (what's inside). Humble adapters do only translation between external formats and the use-case call — no business decisions.
Cognitive load / Change amplification / Hidden dependencies / Temporal coupling (APoSD) The dimensions a deep module reduces. Use these names when describing why a deepening helps:
Where the bundled books don't have a precise term, we've added these.
Seam (from Michael Feathers, Working Effectively with Legacy Code — also bundled in /tdd's rules) A place where behaviour can be altered without editing in that place. The location at which a module's interface lives. Choosing where to put the seam is its own design decision, distinct from what goes behind it.
A boundary in Clean Architecture's sense is a particular kind of seam — one that also enforces a dependency direction. Prefer seam when the topic is testability and substitution; boundary when the topic is policy/detail separation.
Depth-as-leverage We measure depth as behaviour per unit of interface a caller has to learn. APoSD also frames depth as a ratio of implementation lines to interface lines; we don't use the ratio because it rewards padding the implementation. Both framings agree on what makes a module shallow.
Leverage What callers get from depth. More capability per unit of interface they have to learn. One implementation pays back across N call sites and M tests. Not a book term — added because the concept is useful enough to name.
Locality What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at one place rather than spreading across callers. Fix once, fixed everywhere. Not a book term — same reason.
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:
/improve-codebase-architecture, /tdd) are the canonical source for both.Good interfaces make testing natural:
Accept dependencies, don't create them
// Testable
function processOrder(order, paymentGateway) {}
// Hard to test
function processOrder(order) {
const gateway = new StripeGateway();
}
Return results, don't produce side effects
// Testable
function calculateDiscount(cart): Discount {}
// Hard to test
function applyDiscount(cart): void {
cart.total -= discount;
}
Small surface area
When the user wants to explore alternative interfaces for a chosen module (e.g. a
deepening candidate from /improve-codebase-architecture), use this parallel
sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is
unlikely to be the best.
Uses the vocabulary above — module, interface, seam, adapter, leverage.
Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a radically different interface for the module.
Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from DEEPENING.md, what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
Include both this vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
Each sub-agent outputs:
Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by depth (leverage at the interface), locality (where change concentrates), and seam placement.
After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub zunosmartlabs/zsl-superpowers --plugin zsl32 skills in this plugin
/afk-fanoutInteractive local-session scheduler for overnight remote /tdd-parallel runs. Reviews the queue of tracking PRDs with ready-for-agent children, lets the human pick which to run overnight and in what order, then schedules one one-shot remote routine per selected PRD spaced a fixed 2h apart — each fires its own remote claude.ai session running /afk-worker against one PRD. The 2h spacing is a deliberate throttle to stay under the per-5h-window token cap. Places a light scheduled claim on each PRD so a re-run the same evening won't double-book. Morning you walks the results via /morning-review./afk-workerRemote per-PRD executor fired by an /afk-fanout-scheduled one-shot routine. Runs unattended in its own remote claude.ai session — own clone, own working tree, own branch — so it never contends with other PRDs' workers. Flips the PRD's scheduled claim to in-progress, runs /tdd-parallel <num> --on-review-failure=continue --max 2, opens one integration PR, and on halt records the offending slice + RCA. Reports its outcome (claim state, PR URL or halt RCA) as a per-PRD entry on the shared afk-runs git branch that /morning-review reconciles back into the tracker, and fires a best-effort Telegram heads-up. Invoked by the scheduled routine, not by hand./ask-zslInteractive router that helps you find the right ZSL skill for what you're doing right now, without leaving your work. Use when you're mid-session and unsure which skill fits — "which ZSL skill should I use", "how do I do X with these skills", or when you want to be routed to the right part of the loop./code-reviewComprehensive pre-PR code review of the current branch with an issues-only tone and an approval gate before applying fixes. Use when user wants a code review, mentions /code-review, or asks to scan the branch before opening a PR./commitPlan and create git commits autonomously for changes made in this session (no per-commit approval prompt). Cross-session dirty files — files modified outside this conversation's tool calls — get confirmed before inclusion. Explicit file lists only, never `git add -A`. No Claude attribution lines. Use when the user wants to commit, says "/commit", or asks to land changes — and composable by any skill that needs to land changes (e.g. commit-push-pr, tdd-parallel)./commit-push-prCommit session changes, push the branch, and open a PR — in one shot. Refuses to run on the repo's default branch (main/master) so the PR step can't fail. Delegates the commit step to `/zsl:commit`, then pushes with `-u`, then opens the PR via `gh`. Use when user wants to ship a feature branch end-to-end, says "/commit-push-pr", or asks to commit, push, and open a PR.Other plugins' skills for the same job