Vai al contenuto principale
kitlocal.dev

Refactor for readability without changing behavior

Proposes small, behavior-preserving refactorings for a function and lists the tests that must still pass.

Questa risorsa è disponibile solo in inglese.

I prompt sono testo che copi nel tuo assistente. KitLocal non li esegue.

Compila le variabili

Quello che scrivi resta in questo browser. Non viene aggiunto all’URL, salvato né inviato da nessuna parte.

Anteprima

Ancora necessario: Code to refactor, Language

Refactor this {{language}} code for readability WITHOUT changing behavior.
Give a list of small steps, each independently reviewable, with the resulting code for the
final step only. Call out any step that could change behavior (ordering, errors, side effects)
and the test that would reveal it. If the existing tests are missing or weak, say which
characterization tests to write first.

Code:
{{code}}

Existing tests:

Scopo

Improve structure while keeping behavior identical and verifiable.

Quando usarlo

  • A function is hard to read and you want safe, reviewable steps.

Cosa preparare

  • The code and the tests that cover it, if any.

Output atteso

Steps with risk notes, then the final code.

Informazioni su questo catalogo

Istantanea inclusa · pubblicato 15 nov 2026, 06:05 · Revisione del catalogo 5bc079fe355af2214bc0

Viene mostrata l’istantanea inclusa nell’app (nessuna fonte di contenuti configurata). Alla fonte potrebbero esserci contenuti più recenti.