stage-tidylisted
Install: claude install-skill domain-centric-development/dca-marketplace
# Tidy one story's code
Input: the story, `tasks/<story>/plan.md`, `tasks/<story>/build.md`, and the code as the build
stage left it — green: the files `tasks/<story>/.verify/changed.txt` lists, which the pipeline
recorded from the working tree. Nothing else. Every file you change is a row under `## Moves`; the
gate checks the table against what changed.
Output: the tidied code, plus `tasks/<story>/tidy.md`.
The build stage answers the criteria with the smallest change that works, which is the right thing
for it to do and leaves the second half of red–green–refactor undone. This stage is that half. It
is the only stage that may improve code without a criterion asking for it, and the price of that
freedom is that it may not change what the code *does*.
## Do
1. Read the plan and the build file, then the code they name. Work **only inside this story's
footprint**: the files the build stage changed, and what it made demonstrably redundant — a
helper nothing calls any more, a duplicate the new code introduced. A smell elsewhere is a note
in your file, never an edit.
2. Keep every test green, and **change no test**. A test that now reads wrongly is a finding for
the judge; a test you may not touch is what keeps this stage honest, because a refactor that
edits its own check proves nothing.
3. Change no behaviour. Nothing removed that a criterion needs, nothing added that meets a
criterion the build stage did not meet, no error message a caller can see reworded