structural-design-patterns
Installation
SKILL.md
Structural design patterns
Read references/patterns.md before making a recommendation or reviewing an implementation.
Workflow
- Draw the current dependency boundary and state what must remain transparent to the client.
- Classify the pressure: translate, split dimensions, form a tree, stack behavior, simplify, share state, or control access.
- Compare wrapper patterns explicitly; Adapter changes interface, Decorator adds stackable behavior, Facade simplifies a subsystem, and Proxy controls access behind the same interface.
- Make ownership, identity, latency, mutability, and failure semantics visible.
- Add contract tests at the boundary plus focused tests for ordering, recursion, caching, or access policy as relevant.
- Reject the pattern if indirection costs more than the demonstrated change pressure.