plugins/nw/skills/nw-mikado-method/SKILL.md
Enhanced Mikado Method for complex architectural refactoring - systematic dependency discovery, tree-based planning, and bottom-up execution
npx skillsauth add nwave-ai/nwave nw-mikado-methodInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use for complex refactoring where direct implementation causes cascading failures across multiple classes/modules.
Cycle: Set Goal > Experiment > Visualize prerequisites > Revert to working state.
Treat compilation/test failures as valuable information -- each failure reveals a prerequisite node in the dependency graph. Revert keeps codebase shippable at all times.
Commit immediately after each dependency discovery to preserve exploration history and enable interrupt/resume.
Discovery: [Class.Method(params)] requires [Prerequisite] in [File:Line]Discovery: False leaf - [Node] blocked by [Dependency]Discovery: No new dependencies found - exploration complete for [GoalArea]Ready: True leaves identified - [Count] leaves ready for executionSequence: EXPERIMENT > LEARN > GRAPH > COMMIT GRAPH > REVERT
Nodes require method-level specificity:
ClassName.MethodName(parameter types) -> ReturnTypesrc/Services/UserService.cs, line 45docs/mikado/ | Filename: <goal-name>.mikado.md- [ ] pending, - [x] completed | Indentation: 4 spaces per nesting level- [ ] Goal: Replace direct DB calls in OrderController with repository pattern
- [ ] Update OrderController constructor to use IOrderRepository
- [ ] Implement SqlOrderRepository : IOrderRepository
- [ ] Create IOrderRepository interface
- [ ] Define GetOrderById(int orderId) -> Order? method signature
- [ ] Define SaveOrder(Order order) -> Task method signature
- [ ] Add constructor SqlOrderRepository(IDbContext context)
- [ ] Verify IDbContext is registered in DI container
- [ ] Implement GetOrderById method
- [ ] Handle null order case with OrderNotFoundException
- [x] Create OrderNotFoundException class
- [ ] Register IOrderRepository in DI container
- [ ] Remove IDbContext _context field from OrderController
Execution order: deepest leaves first, working up level by level.
10-minute timebox per attempt. If change can't be made in 10 min, it's too complex -- break down further.
Convert technical goals to stakeholder-understandable business value:
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.
development
Cross-agent collaboration protocols, workflow handoff patterns, and commit message formats for TDD/Mikado/refactoring workflows
development
Creates a phased roadmap.json for a feature goal with acceptance criteria and TDD steps. Use when planning implementation steps before execution.
testing
Acceptance test creation methodology for the DISTILL wave. Domain knowledge for the acceptance designer agent: port-to-port principle, prior wave reading, wave-decision reconciliation, graceful degradation, and document back-propagation.