module-design

Installation
SKILL.md

Activation Contract

Use this skill to design, modify, or analyze the design of a module: a group of artifacts under one domain (NestJS-style, OOP). Apply when creating a module, changing its public interface, reviewing coupling or leakage, or deciding whether to split or merge artifacts. Not for implementation details or one-off code.

Hard Rules

Deep modules — only the public/exported surface counts; every public element needs a real consumer or justified contract; the common case has no friction (no params or sane domain defaults); one abstraction level per operation, no exposed intermediate steps; name by interface nature (domain → ubiquitous, technical → technical), never mixed; no internal types cross the boundary; prefer one general operation with a domain default over near-duplicates, never a toggle/bag.

Information hiding — Tell, Don't Ask; report interface and back-door leakage separately; check leakage across modules and internal artifacts; shared domain primitives only as a stable, explicit contract; temporal decomposition is forbidden as a split criterion.

Pull complexity downwards — every parameter justifies why it cannot be a default or auto-detected; normalize internal errors into domain failures; absorb only the module's responsibility and decide variable policy once at a high point (DI/strategy); always define the failure contract.

Split or merge — split only if it reduces total complexity, else combine; when in doubt, one class; never mix a general mechanism with specific policy; applies to boundaries and method extraction.

Cross-cutting — always write the caller snippet (smallest realistic external usage); state responsibility in one sentence or the boundary is wrong; ALWAYS ask the output format (chat | markdown | adr); write the brief in the conversation language and code in the repo language. Persist only docs/module-design/{YYYY-MM-DD}-{module}.json: never write a ledger or a rendered file.

Reconnaissance — when the module spans many files, delegate exploration (artifacts, callers, duplicated knowledge) to an exploration subagent when available; keep the gate judgments yourself.

Decision Gates

Installs
13
GitHub Stars
2
First Seen
Oct 3, 2026