重构计划Refactoring plan
输出步骤、验证点与回滚条件;不承诺性能提升。
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
制定重构计划。输出 steps[]:change、verify、rollback。每步必须小且可独立验证;verify 写可观察判据,rollback 写触发条件。不得写提升 X% 或最好方案;不确定影响标 risk。
占位符用 {字段} 标注,运行前替换为本次输入。
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[],每步含验证与回滚。
steps[] with verification and rollback per step.
检查点Checkpoints
- 每步有 verify 与 rollback。
- 无未验证性能承诺。
- risk 项明确。
- 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
| 来源Source | 链接URL |
|---|---|
| OpenAI Cookbook · GPT-4.1 Prompting Guide(官方仓库 raw,2026-11-07 直抓 200)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.ipynbhttps://raw.githubusercontent.com/openai/openai-cookbook/main/examples/gpt4-1_prompting_guide.ipynb |
资料快照日期:2026-11-07;单项复核范围与日期见对应正文或来源记录。产品功能与条款可能变化,使用前请核对原始来源。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.