npx claudepluginhub nwave-ai/nwave --plugin nw[component-name] - Optional: --residuality --paradigm=[auto|oop|fp]# NW-DESIGN: Architecture Design **Wave**: DESIGN (wave 3 of 6) | **Agents**: Morgan (nw-solution-architect) | **Command**: `*design-architecture` ## Overview Execute DESIGN wave through discovery-driven architecture design. Morgan asks about business drivers and constraints first, then recommends architecture that fits. Analyzes existing codebase, evaluates open-source alternatives, produces C4 diagrams (Mermaid) as mandatory output. ## Prior Wave Consultation Before beginning DESIGN work, read targeted prior wave artifacts: 1. **DISCOVER** (synthesis check only): Read `docs/feature/...
/architectDesigns system architecture evaluating patterns (monolith, microservices, serverless, event-driven, CQRS, hexagonal) with trade-offs, C4 diagrams, bounded contexts, and ADRs. Outputs docs, commits changes. Supports comparisons, migrations, validation.
/designDesigns scalable system architecture with roadmap, technology recommendations, risks, code examples, and deployment strategy for a system or feature description.
/architectEnters Architect Mode to design high-level system architectures, analyze trade-offs, produce design docs, ADRs, ASCII diagrams, and implementation plans before coding.
/askProvides structured architectural guidance on technical questions via consultation with systems design, technology strategy, scalability, and risk experts, including analysis, recommendations, and next steps.
/swarm-design-architectureDesigns system architecture using parallel advocate agents for adversarial technology comparisons, producing balanced trade-off analysis and research journal.
/brainstormBrainstorms high-level architecture options collaboratively with diagrams and package research to create an implementation plan.
Share bugs, ideas, or general feedback.
Wave: DESIGN (wave 3 of 6) | Agents: Morgan (nw-solution-architect) | Command: *design-architecture
Execute DESIGN wave through discovery-driven architecture design. Morgan asks about business drivers and constraints first, then recommends architecture that fits. Analyzes existing codebase, evaluates open-source alternatives, produces C4 diagrams (Mermaid) as mandatory output.
Before beginning DESIGN work, read targeted prior wave artifacts:
docs/feature/{feature-id}/discover/wave-decisions.md — if any decision is unclear or relevant to architecture, read the referenced source filedocs/feature/{feature-id}/discuss/:
wave-decisions.md — decision summaryrequirements.md — functional requirementsacceptance-criteria.md — testable criteria driving architectureuser-stories.md — scope of what to buildstory-map.md — walking skeleton and release slicingoutcome-kpis.md — quality attributes informing architectureDISCUSS already synthesizes DISCOVER evidence into structured requirements. DESIGN does not need raw DISCOVER artifacts (problem-validation, interview-log, etc.) unless wave-decisions.md flags something architecturally significant.
READING ENFORCEMENT: You MUST read every file listed in Prior Wave Consultation above using the Read tool before proceeding. After reading, output a confirmation checklist (✓ {file} for each read, ⊘ {file} (not found) for missing). Do NOT skip files that exist — skipping causes architectural decisions disconnected from requirements.
After reading, check whether any DESIGN decisions would contradict DISCUSS requirements. Flag contradictions and resolve with user before proceeding. Example: DISCUSS requires "real-time updates" but DESIGN chooses batch processing — this must be resolved.
When DESIGN decisions change assumptions from prior waves:
## Changed Assumptions section at the end of the affected DESIGN artifactdocs/feature/{feature-id}/design/upstream-changes.md for the product owner to reviewArchitecture decisions driven by quality attributes, not pattern shopping:
Review JTBD artifacts from DISCUSS to understand which jobs the architecture must serve. Morgan asks: What are we building? For whom? Which quality attributes matter most? (scalability|maintainability|testability|time-to-market|fault tolerance|auditability)
Morgan asks: Team size/experience? Timeline? Existing systems to integrate? Regulatory requirements? Operational maturity (CI/CD, monitoring)?
Morgan asks: How many teams? Communication patterns? Does proposed architecture match org chart?
Morgan identifies primary language(s) from constraints, then applies:
After confirmation, ask user permission to write paradigm to project CLAUDE.md:
This project follows the **functional programming** paradigm. Use @nw-functional-software-crafter for implementation.This project follows the **object-oriented** paradigm. Use @nw-software-crafter for implementation.Default if user declines/unsure: OOP. User can override later.
Recommend based on quality attribute priorities|constraints|paradigm from Steps 1-3.5. Default: modular monolith with dependency inversion (ports-and-adapters). Overrides require evidence.
If functional paradigm selected, Morgan adapts architectural strategy:
--residuality flag only)When activated: apply complexity-science-based stress analysis — stressors|attractors|residues|incidence matrix|resilience modifications. See stress-analysis skill.
When not activated: skip entirely, do not mention.
Before dispatching the architect agent, read rigor config from .nwave/des-config.json (key: rigor). If absent, use standard defaults.
agent_model: Pass as model parameter to Task tool. If "inherit", omit model (inherits from session).reviewer_model: If design review is performed, use this model for the reviewer agent. If "skip", skip design review.review_enabled: If false, skip post-design review step.@nw-solution-architect
Execute *design-architecture for {feature-id}.
Context files: see Prior Wave Consultation above.
Configuration:
SKILL_LOADING: Read your skill files at ~/.claude/skills/nw/solution-architect/. At Phase 4, always load: architecture-patterns.md, architectural-styles-tradeoffs.md. Do NOT load roadmap-design.md during DESIGN wave -- roadmap creation belongs to the DELIVER wave (/nw-roadmap or /nw-deliver). Then follow your Skill Loading Strategy table for phase-specific skills.
Handoff To: nw-platform-architect (DEVOPS wave) Deliverables: See Morgan's handoff package specification in agent file
Before completing DESIGN, produce docs/feature/{feature-id}/design/wave-decisions.md:
# DESIGN Decisions — {feature-id}
## Key Decisions
- [D1] {decision}: {rationale} (see: {source-file})
## Architecture Summary
- Pattern: {e.g., modular monolith with ports-and-adapters}
- Paradigm: {OOP|FP}
- Key components: {list top-level components}
## Technology Stack
- {language/framework}: {rationale}
## Constraints Established
- {architectural constraint}
## Upstream Changes
- {any DISCUSS assumptions changed, with rationale}
This summary enables DEVOPS and DISTILL to quickly assess architecture decisions without reading all DESIGN files.
docs/feature/{feature-id}/design/
architecture-design.md (includes C4 diagrams in Mermaid)
technology-stack.md
component-boundaries.md
data-models.md
wave-decisions.md
docs/adrs/
ADR-NNN-*.md
CLAUDE.md (project root) (optional: ## Development Paradigm section)