trove-refactor
/trove-refactor
Porządkuje strukturę kodu bez zmiany zachowania: nazwy, wyodrębnianie, przenoszenie i migrację wewnętrznego API, z dowodem, że zachowanie się nie zmieniło.
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 2
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- SKILL.md zawiera komentarze HTML (2). Nie widać ich w podglądzie Markdown, a model je czyta.
Co robi i kiedy
Porządkuje strukturę kodu bez zmiany zachowania: nazwy, wyodrębnianie, przenoszenie i migrację wewnętrznego API, z dowodem, że zachowanie się nie zmieniło.
Oryginalny opis (EN)
Behavior-preserving change to structure: rename, extract, inline, dedupe, move, or migrate an internal API. Pin behavior first, migrate callers and delete the legacy API in one wave, prove behavior unchanged on the real artifact. Use for refactors and internal-API migrations.
Jak działa
- Session Init
- Workflow
- Anti-patterns
Podgląd SKILL.md
--- name: trove-refactor description: "Behavior-preserving change to structure: rename, extract, inline, dedupe, move, or migrate an internal API. Pin behavior first, migrate callers and delete the legacy API in one wave, prove behavior unchanged on the real artifact. Use for refactors and internal-API migrations." --- <!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run build:skills --> ## Session Init This skill ships Trove conventions. Prefer existing project patterns over generic best practices when they conflict. If a sibling skill in this plugin matches the request more directly, defer to it. See `AGENTS.md` (or `docs/routing.md` in the marketplace) for the per-plugin routing index. # trove-refactor A refactor changes structure while holding behavior constant. The discipline is proving that "constant" is true. ## Workflow 1. **Pin the behavior.** Characterization test or snapshot of current behavior first. A type-check and a lint passing are **not** a behavior pin — they don't catch a changed result. 2. **Name the target shape.** What the structure should be after (use `trove-architect` for non-trivial reshapes). 3. **Subtract before adding.** Remove dead weight and duplication first, then build on the simpler base. 4. **Small behavior-preserving steps.** Migrate callers and delete the legacy API in the same wave (`trove-principle-migrate-then-delete`); don't leave a compatibility shim. 5. **Prove it unchanged.** Re-run the pinned behavior against the real artifact — same inputs, same outputs. `trove-verify`. 6. **Confirm reader load dropped.** If the change didn't make the code easier to trace, question whether it earned its place. ## Anti-patterns - **Smuggling behavior change into a refactor.** If behavior must change, that's a separate, named change with its own test — split it out. - **Calling a green type-check "proof".** Behavior parity needs a behavioral check, not a compile. - **Leaving the old API alive "just in case."** That's two ways to do one thing; delete it in the same wave. For a large or cross-cutting refactor (a migration across many call sites), treat each component as its own small step with its own behavior pin.
Wersje
W bazie nie ma innych skilli o nazwie trove-refactor.
Identyczna treść występuje jeszcze w 3 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki f1cc35a23bf2 (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
- 100dev-refactor
Zmienia strukturę kodu bez zmiany zachowania: wyodrębnia funkcje, zmienia nazwy, usuwa duplikaty i dzieli moduły. - 90principle-migrate-callers-then-delete-legacy-apis
Przenosi wszystkich wywołujących na nowe API wewnętrzne i usuwa stare w tej samej fali, bez warstwy zgodności, jeśli nikt zewnętrzny z niego nie korzysta. - 100refactor-safely
Przebudowuje, zmienia nazwy i przenosi kod bez zmiany zachowania, a potem dowodzi, że nic się nie zmieniło. - 100refactor
Zmienia strukturę kodu przy zachowaniu zewnętrznego działania: charakteryzuje kontrakt, usuwa zbędny kod i migruje konsumentów. - 95refactoring
Przebudowuje kod bez zmiany zachowania, sprawdzając testy przed i po każdym kroku: zmiany nazw, wydzielanie i przenoszenie. - 100test-preserving-refactor
Prowadzi refaktoryzację kodu bez zmiany obserwowalnego zachowania, utrzymując istniejące testy zielone na każdym kroku.