nwave-ai/nw-mikado-method
Enhanced Mikado Method for complex architectural refactoring - systematic dependency discovery, tree-based planning, and bottom-up execution
npx skills add https://github.com/nWave-ai/nWave --skill nw-mikado-method
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:
Take nwave-ai/nw-mikado-method from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.