mirror of
https://github.com/mattpocock/skills.git
synced 2026-07-29 02:52:42 +07:00
to-issues: slice wide refactors by expand–contract
Add a wide-refactor exception to the tracer-bullet rule: a single mechanical change whose blast radius fans across the codebase can't land as one green vertical slice. Seed "wide refactor" / "blast radius" across the description, the explore step (detection), and the drafting step (strategy), and give the expand–contract sequence in prose. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
16a2a5cd00
commit
a0329ba957
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"mattpocock-skills": minor
|
||||
---
|
||||
|
||||
Teach the **`to-issues`** skill to handle a **wide refactor** — a single mechanical change (like renaming a column) whose **blast radius** fans across the whole codebase, breaking thousands of call sites at once so no vertical slice can land green. The skill now spots this while exploring and slices it as **expand–contract** — expand the new form beside the old, migrate call sites in batches sized by blast radius, then contract the old form away — keeping CI green batch to batch (or, when it can't, only at a final integrate-and-verify issue). The leading words are seeded across the description, the explore step, and the drafting step.
|
||||
@@ -32,6 +32,10 @@ The whole skill turns on one distinction. A **horizontal** slice ships one layer
|
||||
|
||||
Before slicing, `to-issues` looks for prefactoring — "make the change easy, then make the easy change" — and orders that work first. It then quizzes you on the breakdown (granularity, dependencies, what to merge or split) before writing anything, and publishes blockers first so each issue's "Blocked by" field can reference a real ticket.
|
||||
|
||||
## The wide-refactor exception
|
||||
|
||||
One shape breaks the tracer-bullet rule: a **wide refactor** — a single mechanical change (rename a column, retype a shared symbol) whose **blast radius** fans across the whole codebase, so one edit breaks thousands of call sites at once and no vertical slice can land green. `to-issues` spots this while exploring and slices it as **expand–contract** instead: expand (add the new form beside the old so nothing breaks), migrate (move call sites over in batches sized by blast radius, one issue per batch, CI green throughout because the old form still exists), then contract (delete the old form once no caller remains). When even the batches can't stay green alone, they share an integration branch that all block a final integrate-and-verify issue, and green is promised only there.
|
||||
|
||||
## Where it fits
|
||||
|
||||
`to-issues` is a step in the main build chain:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: to-issues
|
||||
description: Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices.
|
||||
description: Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices — and slice wide mechanical refactors by expand–contract instead.
|
||||
disable-model-invocation: true
|
||||
---
|
||||
|
||||
@@ -22,6 +22,8 @@ If you have not already explored the codebase, do so to understand the current s
|
||||
|
||||
Look for opportunities to prefactor the code to make the implementation easier. "Make the change easy, then make the easy change."
|
||||
|
||||
Watch too for a **wide refactor** hiding in the plan — a single mechanical change whose **blast radius** fans across the whole codebase — because it slices differently from a tracer bullet (step 3).
|
||||
|
||||
### 3. Draft vertical slices
|
||||
|
||||
Break the plan into **tracer bullet** issues. Each issue is a thin vertical slice that cuts through ALL integration layers end-to-end, NOT a horizontal slice of one layer.
|
||||
@@ -34,6 +36,8 @@ Break the plan into **tracer bullet** issues. Each issue is a thin vertical slic
|
||||
|
||||
</vertical-slice-rules>
|
||||
|
||||
The **wide refactor** you spotted in step 2 is the exception to the tracer-bullet rule: because a single edit breaks thousands of call sites at once, no one slice can land green. Don't force it into a tracer bullet — sequence it as **expand–contract**. First expand: add the new form beside the old so nothing breaks. Then migrate the call sites over in batches sized by blast radius (per package, per directory), each batch its own issue blocked by the expand, keeping CI green batch to batch because the old form still exists. Finally contract: delete the old form once no caller remains, in an issue blocked by every migrate batch. When even the batches can't stay green alone, keep the sequence but let them share an integration branch that all block a final integrate-and-verify issue — green is promised only there.
|
||||
|
||||
### 4. Quiz the user
|
||||
|
||||
Present the proposed breakdown as a numbered list. For each slice, show:
|
||||
|
||||
Reference in New Issue
Block a user