Skip to content
Skills Library
Programming · Building & coding

refactor-break-compat

/refactor-break-compat

Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly. Not for additive refactors that must preserve the old path.

Licence
Apache-2.0
Last repository change
10.11.2026

Assessment and security

85/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content20 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly. Not for additive refactors that must preserve the old path.

Original author description

Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly. Not for additive refactors that must preserve the old path.

How it works

  1. Name the replacement contract and its proof
  2. Map everything the old shape touches
  3. Show the demolition and wait for a yes
  4. Cut over atomically: delete, then migrate
  5. Rewrite the tests to the new truth
  6. Exterminate ghosts and dead weight
  7. Prove zero residue
  8. What failure looks like
Original SKILL.md headings · 43 lines, 805 words
SKILL.md preview
---
name: refactor-break-compat
description: 'Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly. Not for additive refactors that must preserve the old path.'
---

# Breaking refactors

Tear out an old API shape and move every caller to its replacement in one clean cutover, leaving no shim, flag, or adapter behind. This skill demolishes the old path, so if the old path must survive, use a regular additive refactor instead. Everything here is local: writes touch only version-tracked refactor targets, rollback is version control, and nothing reaches the network. The demolition owner migrates every consumer in the same cutover and never hands migration work to consumers or keeps a compatibility alias behind.

You need the old surface (compat shims, legacy adapters, feature flags, version gates, backward-compatible interfaces) and the new contract every caller must adopt. If the request does not name the old surface or the new contract, stop and ask one question naming the missing item; a word such as AGGRESSIVE is neither. An optional file or module scope bounds the work; without one, the blast-radius map sets the boundary, and nothing outside the approved manifest gets touched no matter what a review finding suggests.

## Name the replacement contract and its proof

Before touching code, write down the consumer contract the replacement must satisfy and the behavior proof suited to this target (a test, a check, whatever actually exercises it). If that proof does not exist, stop and name the missing proof in the blocked result. Also confirm there is no known behavior the old shape covers that the replacement cannot reproduce; if such a gap is known, stop before destroying anything and name the consumer plus the unreproduced behavior.

## Map everything the old shape touches

Enumerate every file, module, and caller of the old shape with `ast-grep` or `rg`. This demolition manifest is the scope: every file and caller that will be deleted or rewritten, every test that will change, every flag or config key going away.

## Show the demolition and wait for a yes

Present the manifest and its consequences to the human and wait for explicit confirmation. Nothing is deleted on an assumed or timed-out yes. A rejection or silence ends the run with the tree untouched.

## Cut over atomically: delete, then migrate

Remove the compat layers, adapters, legacy branches, and flags used only by the old path. Delete means delete, never comment out. Spare any flag that also controls the replacement or another live path. Treat this deletion and the caller migration below as one atomic unit: if a gap surfaces mid-cutover, either finish inside the approved scope or restore the whole affected cutover to the pre-change baseline. A half-migrated tree is never shipped and never reported as success.

Migrate every reference from the manifest to the new contract. After each batch, run the strongest static enumerator the project has (compiler or typechecker, including opt-in `mypy`, `pyright`, `tsc --checkJs`, Sorbet). A clean static pass is never sufficient on its own, because no static pass sees reflective, dynamically dispatched, string-constructed, or generated references, nor code excluded from the build. Enumerate those by hand and name them in the report.

## Rewrite the tests to the new truth

Update assertions to the new behavior and delete tests whose entire purpose was the old behavior. Where the new contract is now thinly covered, add tests that prove its independent behavior rather than snapshotting output. A suppressed check or a zero-matched selection counts as no proof at all.

## Exterminate ghosts and dead weight

Grep for string references, config keys, env vars, doc links, error messages, and import paths naming the old API until the search returns nothing. Then remove the imports, packages, dependencies, types, and dead files that only the old path needed.

## Prove zero residue

Search for every old symbol, flag, and format name. Anything found sends you back to migration. Where this target exposes metrics, logs, or dependency-analysis channels, corroborate through them that no consumer still uses the old shape after the cutover. The report names the commit range that reverts the removal and, where such channels exist, the post-removal watch set confirming no consumer regressed (otherwise it records those channels as not applicable).

## What failure looks like

Residue survivors, a broken build, or a stalled half-migration all fail the run, and partial results are never reported as success. Fix forward only inside the approved scope; otherwise restore the whole affected cutover to baseline, name the exact blockers, and stop with the matching exit: 1 for residue, 2 for broken build, 3 for stalled migration. Zero is a clean demolition only: every caller on the new contract, tests asserting the new behavior with old-behavior tests gone, and the zero-residue search empty.

Report the blast-radius manifest, the deleted artifacts, the caller-migration checklist (naming any pre-destruction blocked consumer and its unreproduced behavior), the test-rewrite summary, the zero-residue result with revert range and watch set, and the exit code, in that order.
Files in this package (2)
  • SKILL.md 5 KB
  • agents/openai.yaml 1 KB

Versions

RepositoryScoreLicence
This page · gosuda/dalcom-skills85Apache-2.0
OutlineDriven/outline-driven-development100Apache-2.0
outlinedriven/odin-claude-plugin90Apache-2.0

Database snapshot: 13.11.2026 · package version 2c912df7159d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90refactor-break-bw-compat
    Refactor by removing backward compatibility and legacy layers. Use when modernizing APIs, cleaning up migration debt, removing compat shims, or eliminating stale feature flags.
  • 90compat-recon
    Audit existing API for breaking change risks and missing compatibility controls. Use when asked to "find breaking change risks in our API", "audit our compatibility controls", or "what could break clients".
  • 90compat-audit
    Audit a proposed API change for breaking changes — classification and impact assessment. Use when asked "is this a breaking change", "will this break clients", or "assess the impact of this API change".
  • 100sui-compat-matrix
    Use when bumping any @mysten/* SDK version, adding a new SDK-using skill, or diagnosing version-drift errors across the plugin. Defines the canonical compat matrix, banner spec, and SDK-bump audit SOP. Triggers on "@mysten upgrade", "SDK bump", "version drift", "banner format", "compat matrix".
  • 100refactor-safely
    Restructure code that other people depend on without breaking them. Use when planning a large refactor or rewrite, splitting a monolith into packages, renaming or moving public symbols, changing internal architecture behind a stable API, or when the user says "I want to rewrite…
  • 82mcp-server-spec-compat
    Use when editing designer-skill-mcp MCP protocol code.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.