nw-design-patterns
7 agentic design patterns with decision tree for choosing the right pattern for each agent type
Best use case
nw-design-patterns is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
7 agentic design patterns with decision tree for choosing the right pattern for each agent type
Teams using nw-design-patterns should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/nw-design-patterns/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How nw-design-patterns Compares
| Feature / Agent | nw-design-patterns | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
7 agentic design patterns with decision tree for choosing the right pattern for each agent type
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Agentic Design Patterns
## Pattern Decision Tree
```
Is the agent doing a single focused task?
YES -> Does it need self-evaluation?
YES -> Reflection
NO -> ReAct (default for most agents)
NO -> Is it coordinating multiple agents?
YES -> Are tasks independent?
YES -> Parallel Orchestration
NO -> Are tasks sequential with dependencies?
YES -> Sequential Orchestration
NO -> Hierarchical (supervisor + workers)
NO -> Is it routing to one of several specialists?
YES -> Router
NO -> Does it need structured task decomposition?
YES -> Planning
NO -> ReAct (default)
```
## 1. ReAct (Reason + Act)
General-purpose agents needing tool calling and iterative problem-solving.
**Loop**: Reason -> Select/execute action -> Observe result -> Repeat until done.
**When**: Default pattern. Most specialist agents.
**Examples**: software-crafter, researcher, troubleshooter.
## 2. Reflection
Agent must evaluate and iteratively improve its own output.
**Loop**: Generate -> Review against criteria -> Identify gaps -> Refine -> Validate threshold met.
**When**: Quality-critical outputs where first-draft insufficient (code review, architecture review, agent validation).
**Examples**: agent-builder-reviewer, solution-architect-reviewer, software-crafter-reviewer.
## 3. Router
Request classified and delegated to exactly one specialist.
**Loop**: Analyze request -> Classify -> Select specialist -> Delegate.
**When**: Task dispatching, single path execution. Low overhead, fast routing.
**Examples**: workflow-dispatcher, task-router.
## 4. Planning
Complex tasks requiring structured decomposition before execution.
**Loop**: Decompose into sub-tasks -> Sequence -> Allocate resources -> Execute with checkpoints.
**When**: Multi-step implementations, migrations, large refactoring.
**Examples**: project-planner, migration-coordinator.
## 5. Sequential Orchestration
Linear workflows with clear dependencies between stages.
**Structure**: Agent1 -> Output1 -> Agent2 -> Output2 -> Agent3 -> Result
**When**: Pipeline workflows where each stage transforms previous output.
**Example**: nWave waves: DISCUSS -> DESIGN -> DEVOPS -> DISTILL -> DELIVER.
## 6. Parallel Orchestration
Multiple independent analyses needed simultaneously.
**Structure**: Supervisor -> [Worker1, Worker2, Worker3] (concurrent) -> Aggregate results.
**When**: Independent analyses, multi-aspect reviews, parallel risk assessment.
**Example**: Multi-reviewer code review, parallel security + performance + correctness analysis.
## 7. Hierarchical
Supervisor coordinates multiple worker agents dynamically.
**Structure**: Supervisor manages workers, routing tasks and aggregating results.
**When**: Complex coordination where routing depends on intermediate results.
**Example**: feature-coordinator supervising frontend/backend/database/testing specialists.
## Pattern Combinations
- **ReAct + Reflection**: Reason/act then self-review (most reviewer agents)
- **Planning + Sequential**: Decompose then execute pipeline (devop)
- **Router + Hierarchical**: Route to supervisor who coordinates workers
## Choosing for nWave Agents
| Agent Role | Pattern | Rationale |
|-----------|---------|-----------|
| Specialist (single domain) | ReAct | Tool-using, iterative task completion |
| Reviewer (-reviewer suffix) | Reflection | Must self-evaluate and iterate on critique |
| Wave orchestrator | Sequential | Clear dependency chain between phases |
| Multi-agent coordinator | Hierarchical | Dynamic task routing to specialists |
| Task dispatcher | Router | Classification and single-path delegation |Related Skills
nw-ux-web-patterns
Web UI design patterns for product owners. Load when designing web application interfaces, writing web-specific acceptance criteria, or evaluating responsive designs.
nw-ux-tui-patterns
Terminal UI and CLI design patterns for product owners. Load when designing command-line tools, interactive terminal applications, or writing CLI-specific acceptance criteria.
nw-ux-emotional-design
Emotional design and delight patterns for product owners. Load when designing onboarding flows, empty states, first-run experiences, or evaluating the emotional quality of an interface.
nw-ux-desktop-patterns
Desktop application UI patterns for product owners. Load when designing native or cross-platform desktop applications, writing desktop-specific acceptance criteria, or evaluating panel layouts and keyboard workflows.
nw-test-design-mandates
Four design mandates for acceptance tests - hexagonal boundary enforcement, business language abstraction, user journey completeness, walking skeleton strategy, and pure function extraction
nw-security-by-design
Security design principles, STRIDE threat modeling, OWASP Top 10 architectural mitigations, and secure patterns. Load when designing systems or reviewing architecture for security.
nw-sd-patterns
Core distributed systems patterns - load balancing, caching, sharding, consistent hashing, message queues, rate limiting, CDN, Bloom filters, ID generation, replication, conflict resolution, CAP theorem
nw-sd-patterns-advanced
Advanced distributed patterns - event sourcing, CQRS, saga, stream processing, append-only log, exactly-once delivery, sequencer, double-entry ledger, erasure coding, order book, watermarks
nw-fp-usable-design
Naming conventions, API ergonomics, and usability patterns for functional code
nw-fp-algebra-driven-design
Algebra-driven API design with monoids, semigroups, and interpreters via algebraic equations
nw-domain-driven-design
Strategic and tactical DDD patterns, bounded context discovery, context mapping, aggregate design rules, and decision frameworks for when to apply DDD
nw-design
Designs system architecture with C4 diagrams and technology selection. Routes to the right architect based on design scope (system, domain, application, or full stack). Two interaction modes: guide (collaborative Q&A) or propose (architect presents options with trade-offs).