Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

refactor-break-compat

/refactor-break-compat

Modernizuje API, usuwa shimy kompatybilności i flagi funkcji albo przepisuje podsystem od nowa, z możliwym zerwaniem wstecznej zgodności.

Repozytorium
dalcom-skills ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

85/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść20 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

Co robi i kiedy

Modernizuje API, usuwa shimy kompatybilności i flagi funkcji albo przepisuje podsystem od nowa, z możliwym zerwaniem wstecznej zgodności.

Oryginalny opis (EN)

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.

Jak działa

  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
Sekcje z nagłówków SKILL.md, w oryginale · 43 linii, 805 słów
Podgląd SKILL.md
---
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.
Pliki w paczce (2)
  • SKILL.md 5 KB
  • agents/openai.yaml 1 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · gosuda/dalcom-skills85Apache-2.0
OutlineDriven/outline-driven-development100Apache-2.0
outlinedriven/odin-claude-plugin90Apache-2.0

Migawka bazy z 13.11.2026 · wersja paczki 2c912df7159d (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90refactor-break-bw-compat
    Refaktoryzuje przez usuwanie zgodności wstecznej i warstw legacy, przy modernizacji API, sprzątaniu długu migracyjnego, usuwaniu shimów i nieaktualnych flag funkcji.
  • 90compat-recon
    Sprawdza istniejące API pod kątem ryzyka zmian łamiących zgodność i braków w mechanizmach kontroli kompatybilności.
  • 90compat-audit
    Ocenia proponowaną zmianę API pod kątem zmian łamiących zgodność: klasyfikuje je i szacuje wpływ na klientów.
  • 100sui-compat-matrix
    Pilnuje zgodności wersji pakietów @mysten/* w pluginie SUI: macierz kompatybilności, format bannera i procedurę audytu przy aktualizacji SDK.
  • 100refactor-safely
    Pomaga restrukturyzować kod, od którego zależą inni, bez psucia: strangler fig, shimy zgodności, codemody, flagi funkcji i dzielenie refaktoryzacji na zrozumiałe pull requesty.
  • 82mcp-server-spec-compat
    Pomaga edytować kod protokołu MCP w serwerze designer-skill-mcp zgodnie ze specyfikacją.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.