Migration skill: fix the design behind a group of findings, not each line #89

Merged
sionzee merged 1 commit from skill/fix-the-design into main 2026-11-20 16:27:02 +01:00
Owner

A migration agent tends to clear each finding where it is reported: a guard, a ?? default, one more branch in an if chain. The finding goes away, but the design that produced it stays, and the next line someone writes brings the bug back where no rule looks. The Phase bug that reached production was this kind: a new phase got its branch in one chain and was silently missing from two others.

The skill now treats findings the way Rust treats borrow errors. You fix the design, not the line:

  • The procedure: group the findings by cause, name the class of bug, change the representation so that bug can't be written, then follow the compiler to the call sites. The representation can be a type that can't hold the bad value, one definition of a closed set, a boundary that parses once, or one owner of the state.
  • A new reference, references/fix-the-design.md: the procedure, a list of what counts as a patch, and a table of patch vs. design fix built from real bugs.
  • SKILL.md: it is the first rule for the whole migration, and a step in the per-change workflow.
  • The review checklist: two items. Findings are fixed at their cause. A closed set that grew fails to compile everywhere it is handled.
  • The hand-off report: a "Causes removed" section.
  • Docs: the CHANGELOG and the skill's docs page.

The skill tests pass (7/7). The change adds no code examples, so the docs example checks are unaffected.

Created with Claude Opus 5.5 in Claude Code.

A migration agent tends to clear each finding where it is reported: a guard, a `??` default, one more branch in an `if` chain. The finding goes away, but the design that produced it stays, and the next line someone writes brings the bug back where no rule looks. The `Phase` bug that reached production was this kind: a new phase got its branch in one chain and was silently missing from two others. The skill now treats findings the way Rust treats borrow errors. You fix the design, not the line: - **The procedure:** group the findings by cause, name the class of bug, change the representation so that bug can't be written, then follow the compiler to the call sites. The representation can be a type that can't hold the bad value, one definition of a closed set, a boundary that parses once, or one owner of the state. - **A new reference, `references/fix-the-design.md`:** the procedure, a list of what counts as a patch, and a table of patch vs. design fix built from real bugs. - **`SKILL.md`:** it is the first rule for the whole migration, and a step in the per-change workflow. - **The review checklist:** two items. Findings are fixed at their cause. A closed set that grew fails to compile everywhere it is handled. - **The hand-off report:** a "Causes removed" section. - **Docs:** the CHANGELOG and the skill's docs page. The skill tests pass (7/7). The change adds no code examples, so the docs example checks are unaffected. Created with Claude Opus 5.5 in Claude Code.
Migration skill: fix the design behind a group of findings, not each line
All checks were successful
Benchmarks / bench (pull_request) Successful in 2m51s
450da2a64f
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sionzee deleted branch skill/fix-the-design 2026-11-20 16:27:02 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Evobug/Safe-Ts!89
No description provided.