Ir para o conteúdo 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 está disponível apenas em inglês.

Prompts são textos que você copia para o seu próprio assistente. O KitLocal não os executa.

Preencha as variáveis

O que você digita fica neste navegador. Não é adicionado à URL, salvo nem enviado a lugar nenhum.

Pré-visualização

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

Finalidade

Improve structure while keeping behavior identical and verifiable.

Quando usar

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

O que preparar

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

Saída esperada

Steps with risk notes, then the final code.

Sobre este catálogo

Instantâneo incluído · publicado 15 de nov. de 2026, 06:05 · Revisão do catálogo 5bc079fe355af2214bc0

Mostrando o instantâneo incluído no aplicativo (nenhuma fonte de conteúdo está configurada). Pode haver conteúdo mais recente na fonte.