guide-deepen-module
Use when code is written or changed that adds a module or changes a module's public interface, in any tier. Produces an interface shaped before the code behind it, and the bar it must meet at merge. N
SKILL.mdskills/guides/guide-deepen-module/SKILL.md
GitHubGuide: deep modules
Applies to any new module, and any change to what an existing module exposes: its exports, its signatures, what its callers must know.
Shaping step
- Before the code behind it, write the interface: the one entry point a caller uses, as signatures.
- Name what stays inside: every type, helper and state a caller does not need.
- Check each caller: it calls the entry, never reaches past it.
- The interface is contested, or callers already know too much: stop and run the
deepen-moduleskill.
Ok at merge
- Callers import the entry point alone; nothing behind it is imported from outside.
- The interface is smaller than what it hides.
- No caller was changed to work around the module.