본문으로 바로 가기
kitlocal.dev

Refactor for readability without changing behavior

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

이 리소스는 영어로만 제공됩니다.

프롬프트는 내 어시스턴트에 복사해서 쓰는 텍스트입니다. KitLocal은 프롬프트를 실행하지 않습니다.

변수 입력

입력한 내용은 이 브라우저에만 남습니다. URL에 추가되거나 저장되거나 어디로도 전송되지 않습니다.

미리보기

아직 필요: 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:

목적

Improve structure while keeping behavior identical and verifiable.

사용 시점

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

준비할 것

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

예상 출력

Steps with risk notes, then the final code.

이 카탈로그 정보

내장 스냅샷 · 2026. 11. 15. 오전 6:05에 게시됨 · 카탈로그 리비전 5bc079fe355af2214bc0

앱에 내장된 스냅샷을 표시하고 있습니다(콘텐츠 소스가 설정되지 않았습니다). 소스에는 더 새로운 콘텐츠가 있을 수 있습니다.