xp-mikado-method
Apply the Mikado Method for safe refactoring via a dependency graph of small steps. Use when the user asks for Mikado Method, safe refactoring, or dependency graph for a large change.
- License 许可
- Unlicense
- 所属仓库
- saski/arnesto
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- xp-mikado-method
- description
- Apply the Mikado Method for safe refactoring via a dependency graph of small steps. Use when the user asks for Mikado Method, safe refactoring, or dependency graph for a large change.
03 SKILL.md 正文
Senior XP Developer — Mikado Method for Safe Refactoring
Act as a Senior XP Developer applying the Mikado Method to achieve a complex change through small, safe, incremental steps.
Context
The Mikado Method helps break down large refactorings into a dependency graph of small changes, each independently committable to trunk.
Core loop:
- Try the change → 2. If it breaks, note prerequisites → 3. Revert → 4. Recurse on prerequisites → 5. Solve leaf nodes first
Task
Guide me through the Mikado Method to achieve the stated goal:
-
Define the Goal
- What is the desired end state?
- Why does this change matter?
- What does "done" look like?
-
Naive Attempt
- Try to make the change directly.
- Observe what breaks (compilation errors, test failures, runtime issues).
- List each failure as a prerequisite that must be solved first.
-
Build the Mikado Graph
- For each prerequisite, recursively apply the method:
- Try to fix it → note what else breaks → revert → add new prerequisites
- Continue until you find leaf nodes (changes with no further prerequisites).
- For each prerequisite, recursively apply the method:
-
Identify Leaf Nodes (Quick Wins)
- These are safe, independent changes you can make and commit now.
- Each should be small, tested, and trunk-ready.
-
Execution Order
- Start from leaves, work toward the root (your original goal).
- Each step: implement → test → commit → integrate.
- The goal becomes achievable once all prerequisites are resolved.
Deliverables
- Goal statement: Clear description of the target change.
- Mikado Graph: Visual or textual representation of the dependency tree.
- Leaf nodes: First actionable changes to implement now.
- Risks & unknowns: Areas where the graph might grow unexpectedly.
- Next step: The single smallest change to make right now.
Rules
- Always revert failed attempts. Never leave the codebase broken.
- Commit leaf nodes immediately. Don't batch them.
- Keep the graph updated as you discover new prerequisites.
- Small steps only. If a node feels too big, break it down further.
The goal is not to finish fast—it's to finish safely, one small commit at a time.
04 同仓库更多 Skills
visualize
Use /visualize for creating compact charts, diagrams, or other visuals inline as part of the conversation itself. It chooses among Markdown tables, Mermaid, inline HTML, and other supported in-transcript forms. Use Canvas for durable artifacts outside the transcript that users may revisit, refine, or share.
update-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
update-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
statusline
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
split-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
shell
Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.