Ir al contenido principal
kitlocal.dev

Refactor for readability without changing behavior

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

Este recurso solo está disponible en inglés.

Los prompts son texto que copias en tu propio asistente. KitLocal no los ejecuta.

Rellena las variables

Lo que escribes se queda en este navegador. No se añade a la URL, ni se guarda, ni se envía a ningún sitio.

Vista previa

Falta: 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:

Propósito

Improve structure while keeping behavior identical and verifiable.

Cuándo usarlo

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

Qué preparar

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

Salida esperada

Steps with risk notes, then the final code.

Acerca de este catálogo

Instantánea incluida · publicado 15 nov 2026, 6:05 · Revisión del catálogo 5bc079fe355af2214bc0

Mostrando la instantánea incluida en la aplicación (no hay ninguna fuente de contenido configurada). Puede haber contenido más reciente en la fuente.