Repository navigation
Add the restructure skill, with the Mikado Method for stalled units - #232
Merged
Merged
Conversation
…r stalled units Coordinates architectural-analysis, plan-a-change (or its own plan when han-planning is absent), and refactor or tdd per unit, after one start gate. A unit that stalls becomes the goal of a Mikado graph: attempt, record prerequisites, undo with undo-attempt.sh, and work leaves first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d workflow map Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and plan-a-change to it Adds restructure to pairing's flagged skills and to the collaborative-stop rule (canonical and both vendored copies, still byte-identical), and gives refactor and plan-a-change routing lines toward restructure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves the missing-test-command case out of the hard-failure list and into the start gate, says what happens when a Mikado leaf stalls, and renames the test fixture's folder so no conventional source path appears. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/concepts.md # han-planning/skills/plan-a-change/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
restructureskill that reorganizes a codebase toward a target layout one committed unit at a time, so that a large restructure can run unattended without changing behavior.Behavior changes
The new
han-coding:restructureskill coordinates the work and leaves the code changes to existing skills. You state a goal, such as "group each package by feature." The skill discovers the project's layout, commands, test roots, and documented structure rules at runtime, so it works on any codebase. It shows all of that at one start gate and then asks nothing further. After you confirm, it runsarchitectural-analysis, plans ordered units, and hands each unit torefactorortdd. Each green unit is committed on the current branch, and every decision goes into a change log with its justification. The skill never pushes, never switches branches, and never edits a test to make a unit pass.When a unit stalls because its code is too tangled to move in one step, the skill switches to the Mikado Method. It tries the change, records what breaks as prerequisites in a graph committed to the repo, undoes the attempt, and does the prerequisites first. A bundled
undo-attempt.shscript restores the tree to the last commit. It refuses to run if HEAD has moved, and it removes only untracked files that git does not ignore, which is why the skill requires a clean tree at the start. Discovery stops after five rounds per stalled unit by default; the unit is then logged as not done and its dependents are skipped.Three existing skills route work differently.
pairingcan now driverestructure, stopping after each unit so you can review the commit. The descriptions ofrefactorandplan-a-changenow point torestructurefor whole-area work.han-codinggains no dependency onhan-planning: whenplan-a-changeis not installed,restructurewrites the unit plan itself and records that in the change log. The research report behind the design is included atdocs/research/mikado-method-skill.md.