Use when decomposing a system into components with clear boundaries, module organization, and interface contracts — the "how do we slice this?" question at design time. NOT for reviewing an existing system's health (use the architecture skill or engineering:arch).
Resources
1Install
npx skillscat add mikeparcewski/wicked-garden/wicked-garden-engineering-system-design Install via the SkillsCat registry.
System Design Skill
Decompose systems into well-defined components with clear boundaries and interfaces.
Purpose
Transform architecture into concrete components:
- Component identification and boundaries
- Interface definition
- Dependency management
- Module organization
Process
1. Identify Components
Ask:
- What are major capabilities?
- What changes together?
- What has different scaling needs?
- What domain concepts exist?
2. Define Boundaries
Apply:
- High Cohesion - Related functionality together
- Low Coupling - Minimal dependencies
- Single Responsibility - One reason to change
- Information Hiding - Encapsulate internals
3. Design Interfaces
For each component:
- Public API (what it exposes)
- Dependencies (what it needs)
- Events (what it publishes/subscribes)
- Data contracts (I/O structures)
4. Document
Creates in phases/design/:
design/
├── components/
│ ├── overview.md
│ ├── auth-component.md
│ └── dependencies.mmd
└── interfaces/
└── component-api.mdComponent Patterns
Layered - Presentation → Application → Domain → Infrastructure
Hexagonal - Business logic with adapter ports
Plugin - Core system with pluggable extensions
See component patterns in refs/ (patterns-layered-pattern.md, patterns-facade-pattern.md).
Dependency Management
Rules
- Acyclic - No circular dependencies
- Unidirectional - Dependencies flow one way
- Stable - Depend on stable abstractions
- Explicit - Declare in constructor/config
Common Anti-Patterns
God Object - One component does everything
Fix: Split by responsibility
Feature Envy - Component uses another's data extensively
Fix: Move functionality to data owner
Circular Dependencies - A depends on B, B depends on A
Fix: Extract shared logic or use events
Leaky Abstraction - Internal details exposed
Fix: Refine public interface
See dependency guides in refs/ (dependencies-dependency-principles.md, dependencies-best-practices.md).
Integration
With Architecture Skill
Implements high-level architecture:
- Takes architectural decisions
- Maps to concrete components
- Validates feasibility
With Integration Skill
Provides boundaries for:
- API design
- Service contracts
- Event schemas
With wicked-crew
Called during design phase after architecture.
Events
[arch:components:defined:success]- Components designed[arch:interface:defined:success]- Interface documented[arch:dependency:analyzed:success]- Dependencies validated
Tips
- Start with Boundaries - Define what's in/out first
- Think in Interfaces - Design API before implementation
- Keep It Simple - Don't over-decompose
- Test Boundaries - Use contract tests
- Refactor Gradually - Small, safe steps
- Document Dependencies - Make them explicit
Reference Materials
- Component Template:
- Interface Template:
- Component Patterns:
- Dependencies:
- Anti-Patterns: