Skip to main content
← Guides

Refactoring plan

Prompts & workflows · Prompt case

Output steps, verification points and rollback conditions; do not promise performance gains.

Prompt effect has not been tested.

A prompt is a re-runnable template, not a promise of results. Changing the model, version or input can change the outcome. Use the checkpoints on this page to verify it yourself, and treat the official sources as evidence of mechanism rather than a guarantee of effect.

Task and inputs

Output steps, verification points and rollback conditions; do not promise performance gains. Inputs: Code structure description, goal, and constraints.

The prompt

Create a refactoring plan. Output steps[] with change, verify and rollback. Each step must be small and independently verifiable; verify gives observable criteria and rollback gives trigger conditions. Do not write percentage gains or best solution; mark uncertain impact as risk.

Replace {field} placeholders with the current inputs before running.

Expected output shape

steps[] with verification and rollback per step.

Checkpoints

  • Each step has verify and rollback.
  • No unverified performance promises.
  • Risk items are explicit.

Failure branches

  • Step too large: split into rollbackable steps.
  • Verification not observable: use tests or check commands.

Sources and limits

This site has not tested the effect of this prompt. See the sources for the mechanism; changing model, version or input can change the result.

Sources

SourceURL
OpenAI Cookbook: GPT-4.1 Prompting Guide (official repository raw, fetched 200 on 2026-11-07)https://raw.githubusercontent.com/openai/openai-cookbook/main/examples/gpt4-1_prompting_guide.ipynb

Source snapshot: 2026-11-07; item-specific rechecks and their scope are recorded in the text or source notes. Features and terms may change; check the original sources before use.