From nw
Plans and executes complex refactoring using Mikado Method, building dependency tree/graph via iterative commits and refactoring bottom-up to goal.
How this command is triggered — by the user, by Claude, or both
Slash command
/nw:mikado [refactoring-goal] - Optional: --complexity=[simple|moderate|complex] --visualization=[tree|graph]The summary Claude sees in its command listing — used to decide when to auto-load this command
# NW-MIKADO: Complex Refactoring with Mikado Method
> **EXPERIMENTAL**: Under active development. Behavior and output format may change between versions.
**Wave**: CROSS_WAVE
**Agent**: Crafty (nw-software-crafter)
**Command**: `*mikado`
## Overview
Plan and execute complex refactoring using the Mikado Method. Builds dependency {visualization} through iterative exploration|tracks discoveries via commits|executes leaf-to-goal bottom-up. For architectural changes spanning multiple classes where simple refactoring is insufficient.
## Context Files Required
- src/\* - Codebase to refactor...EXPERIMENTAL: Under active development. Behavior and output format may change between versions.
Wave: CROSS_WAVE
Agent: Crafty (nw-software-crafter)
Command: *mikado
Plan and execute complex refactoring using the Mikado Method. Builds dependency {visualization} through iterative exploration|tracks discoveries via commits|executes leaf-to-goal bottom-up. For architectural changes spanning multiple classes where simple refactoring is insufficient.
@nw-software-crafter
Execute *mikado for {refactoring-goal}.
Context Files:
Configuration:
Visualization labels: tree → "Tree", graph → "Graph". Use the selected visualization type in all output messages (e.g., "Wrote the Mikado tree" or "Wrote the Mikado graph").
Handoff To: {invoking-agent-returns-to-workflow} Deliverables: Refactored codebase + Mikado {visualization} documentation
/nw-mikado "Extract shared domain model from monolithic service layer"
Crafty builds Mikado dependency {visualization} through iterative exploration, discovers 12 leaf nodes across 4 modules, executes bottom-up from leaves to goal with discovery commits at each step.
docs/mikado/{goal-name}.mikado.md
src/* (refactored implementation)
Discovery-tracking commits in git log
npx claudepluginhub nwave-ai/nwave --plugin nw/hatch3r-refactor-planPlans a refactoring or migration effort by spawning parallel research agents and producing a spec, ADR(s), and phased todo.md entries.
/devkit.refactorRefactors code based on description using language-specific agents for Java/Spring, TypeScript/NestJS/React/Python/AWS, with file/module/feature scopes and verification steps.
/refactor-guidedPerforms safe incremental refactoring on target files directories or descriptions verifying tests at each step with git commits and reverts.
/refactorInitiates a structured refactoring session with exploration, track selection (polish or overhaul), constraint anchoring, and validation. Also supports --explore and --switch-overhaul flags.