buddy
nWave concierge — ask any question about methodology, project state, commands, migration, or troubleshooting. Read-only, contextual answers.
Archives a completed feature to docs/evolution/, migrates lasting artifacts to permanent directories, and cleans up the temporary workspace. Use after all implementation steps pass and mutation testing completes.
> /plugin marketplace add nWave-ai/nWave > /plugin install nw@nwave-marketplace
How it fires
How this command gets triggered: by you, by Claude, or both.
/finalizeContext preview
What this command does when you run it.
Archives a completed feature to docs/evolution/, migrates lasting artifacts to permanent directories, and cleans up the temporary workspace. Use after all implementation steps pass and mutation testing completes.
description: "Archives a completed feature to docs/evolution/, migrates lasting artifacts to permanent directories, and cleans up the temporary workspace. Use after all implementation steps pass and mutation testing completes." disable-model-invocation: true argument-hint: '[agent] [feature-id] - Example: @platform-architect "auth-upgrade"'
**Wave**: CROSS_WAVE **Agent**: @nw-platform-architect (default) or specified agent
Finalize a completed feature: verify all steps done|create evolution document|migrate lasting artifacts to permanent directories|preserve delivery history|remove session-only state. Agent gathers project data|analyzes execution history|writes summaries|migrates|cleans session state.
`docs/feature/{feature-id}/` becomes **delivery history** at finalize. Artifacts with lasting value are also copied to permanent directories, while the complete wave history remains available to the wave matrix.
/nw-finalize @{agent} "{feature-id}"Before dispatching, verify all steps are done — prevents archiving incomplete features.
Parse execution-log.json, verify every step has status DONE. If any step is not DONE, block finalization and list incomplete steps with current status. Do not dispatch until all steps complete.
Create `docs/evolution/YYYY-MM-DD-{feature-id}.md` with:
Scan `docs/feature/{feature-id}/` and migrate artifacts with lasting value to permanent directories. Create destination directories as needed.
| Source (temporary workspace) | Destination (permanent) | Condition | |---|---|---| | `design/architecture-design.md` | `docs/architecture/{feature}/` | If exists | | `design/component-boundaries.md` | `docs/architecture/{feature}/` | If exists | | `design/technology-stack.md` | `docs/architecture/{feature}/` | If exists | | `design/data-models.md` | `docs/architecture/{feature}/` | If exists | | `design/adrs/ADR-*.md` | `docs/adrs/` | Flat namespace, cross-feature | | `distill/test-scenarios.md` | `docs/scenarios/{feature}/` | Scenario-to-story traceability | | `distill/walking-skeleton.md` | `docs/scenarios/{feature}/` | Walking skeleton specification | | `discuss/journey-*.yaml` | `docs/ux/{feature}/` | If UX journeys exist | | `discuss/journey-*-visual.md` | `docs/ux/{feature}/` | If UX visuals exist |
Research docs (`docs/research/`) are already in a permanent location — no migration needed.
These are process scaffolding. They remain in delivery history but are not copied elsewhere:
| File pattern | Why not copied | |---|---| | `deliver/execution-log.json` | Audit trail captured in evolution doc | | `deliver/roadmap.json` | Step plan — superseded by evolution doc + git history | | `deliver/.develop-progress.json` | Resume state — temporary | | `design/review-*.md` | Review findings captured in evolution doc | | `distill/acceptance-review.md` | Test review — tests themselves remain in `tests/` | | `discuss/dor-validation.md` | Process gate, not lasting value | | `discuss/shared-artifacts-registry.md` | Process scaffolding (if exists) | | `*/wave-decisions.md` | Key decisions extracted into evolution doc |
1. **List session artifacts** — List only session markers and temp files proposed for removal. 2. **Present for approval** — Show the exact removal list to the user and request approval. 3. **Preserve delivery history** — Keep `docs/feature/{feature-id}/`; the wave matrix derives finalized status from this directory. 4. **Remove session artifacts only** — On approval, remove `.nwave/des/deliver-session.json`, `.develop-progress.json`, and approved temp files. Keep discuss/, design/, distill/, and deliver/ wave artifacts.
**NEVER delete without user approval.** Show exactly what will be removed.
1. Verify all migrated files exist in their destinations 2. Update architecture doc statuses from "FUTURE DESIGN" to "IMPLEMENTED" 3. Optionally invoke /nw-document for reference docs (skip with --skip-docs) 4. Commit in logical groups:
@{agent}
Finalize: {feature-id}
**Key constraints:**
The invoked agent MUST create a task list from its workflow phases at the start of execution using TaskCreate. Each phase becomes a task with the gate condition as completion criterion. Mark tasks in_progress when starting each phase and completed when the gate passes. This gives the user real-time visibility into progress.
AI agents that guide you from idea to working code, with human judgment at every gate. nWave runs inside Claude Code. It breaks feature delivery into seven waves (discover, diverge, discuss, design, devops, distill, deliver).
Repo: nWave-ai/nWave
nWave concierge — ask any question about methodology, project state, commands, migration, or troubleshooting. Read-only, contextual answers.
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD
Detects current wave progress for a feature and resumes at the next step. Scans docs/feature/ for artifacts.
Orchestrates the full DELIVER wave end-to-end (roadmap > execute-all > finalize). Use when all prior waves are complete and the feature is ready for…
Designs system architecture with C4 diagrams and technology selection. Use when defining component boundaries, choosing tech stacks, or creating architecture…
Designs CI/CD pipelines, infrastructure, observability, and deployment strategy. Use when preparing platform readiness for a feature.