Design Principles
<metadata>- Scope: SOLID principles for OOP/architecture design
- Load if: Starting new feature, refactoring, architecture review
- Prerequisites: @smith-principles/SKILL.md (fundamental principles: DRY, KISS, YAGNI, MECE)
SOLID Principles
<required>- Single Responsibility: One reason to change per class/module
- Open/Closed: Open for extension, closed for modification
- Liskov Substitution: Subtypes must be substitutable for base types
- Interface Segregation: Many specific interfaces over one general
- Dependency Inversion: Depend on abstractions, not concretions
ACTION (Recency Zone)
<required>When designing or reviewing architecture:
- Apply Single Responsibility - each module has one reason to change
- Design for extension without modification (Open/Closed)
- Ensure subtypes are substitutable (Liskov)
- Prefer small, focused interfaces (Interface Segregation)
- Depend on abstractions, not implementations (Dependency Inversion)
Claude Code Plugin Integration
<context>When pr-review-toolkit is available:
- type-design-analyzer agent: Rates type design on 4 dimensions (1-10 each)
- Encapsulation
- Invariant expression
- Usefulness
- Enforcement
- Trigger: "Review the [TypeName] type design" or use Task tool
- @smith-principles/SKILL.md - Fundamental principles (DRY, KISS, YAGNI)
- @smith-standards/SKILL.md - Universal code standards
@smith-dev/SKILL.md- Development workflow@smith-analysis/SKILL.md- Problem decomposition before design