← Text prompts
Text & chatWrite

Refactor code while preserving behaviour

Improve structure while preserving observable behaviour.

What to provide

  • Code
  • Goal
Make it yours

Fill in what you know. Empty fields stay as placeholders.

Supply code for this task.

Supply goal for this task.

Optional instructions
2 inputs to replace

Verify affected behaviour and avoid unrelated changes disguised as cleanup.

Revision 1.0

How to use this prompt

State the improvement goal and identify public interfaces that must remain stable.

What to check in the result

Verify affected behaviour and avoid unrelated changes disguised as cleanup.