bridge-pattern-implementor
Installation
SKILL.md
Bridge Pattern Implementor
When to Use
You are designing or refactoring a system where an abstraction (e.g., a Window, Shape, or Device) must work across multiple implementations (e.g., platform APIs, rendering engines, storage backends) and both the abstraction and implementation dimensions need to evolve independently.
Specific triggers:
- You notice a class hierarchy "exploding" — adding a new abstraction variant requires N new classes, one per implementation platform
- Client code is bound to a specific implementation at compile time and you need runtime flexibility
- You need to change or swap an underlying implementation without recompiling clients
- You want to share a single implementation object across multiple abstraction instances (e.g., reference counting, shared state)
- You are porting an existing system to multiple platforms and want the abstraction hierarchy to remain platform-neutral
Before starting, verify:
- Is the variation driven by two independent axes? (If only one axis varies, plain inheritance suffices.)
- Are the implementations genuinely interchangeable from the abstraction's point of view? (If they require different calling conventions the client must know about, Adapter may be a better fit.)