Prompt Coding Limited info

SWE-agent: Review Your Changes Before Submitting (Diff Checklist)

The review message in SWE-agent's default config: before the final submit, the agent is shown its own diff and asked to rerun the reproduction script if the code changed afterwards, remove that script, revert any modified test files with git checkout, and then run submit again.

  • 🤖 Any chat LLM
  • 🗂️ Coding

Prompt by John Yang, Carlos E. Jimenez, Alexander Wettig, Shunyu Yao, Karthik Narasimhan, Ofir Press (SWE-agent/SWE-agent) · Original source (opens in a new tab)

SWE-agent: Review Your Changes Before Submitting (Diff Checklist) — prompt preview

The prompt

prompt
Thank you for your work on this issue. Please carefully follow the steps below to help review your changes.

1. If you made any changes to your code after running the reproduction script, please run the reproduction script again.
  If the reproduction script is failing, please revisit your changes and make sure they are correct.
  If you have already removed your reproduction script, please ignore this step.
2. Remove your reproduction script (if you haven't done so already).
3. If you have modified any TEST files, please revert them to the state they had before you started fixing the issue.
  You can do this with `git checkout -- /path/to/test/file.py`. Use below <diff> to find the files you need to revert.
4. Run the submit command again to confirm.

Here is a list of all of your changes:

<diff>
{{diff}}
</diff>

What it is

The review message in SWE-agent's default config: before the final submit, the agent is shown its own diff and asked to rerun the reproduction script if the code changed afterwards, remove that script, revert any modified test files with git checkout, and then run submit again. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the SWE-agent repository (MIT License, Copyright (c) 2024 John Yang, Carlos E. Jimenez, Alexander Wettig, Shunyu Yao, Karthik Narasimhan, Ofir Press). Licence: https://github.com/SWE-agent/SWE-agent/blob/main/LICENSE. Original author: John Yang, Carlos E. Jimenez, Alexander Wettig, Shunyu Yao, Karthik Narasimhan, Ofir Press (SWE-agent/SWE-agent). Changes by FoxaMind: the YAML key and its ten-space indentation removed; the {{diff}} placeholder keeps the source syntax.

Who it's for

  • Developers building submit steps for coding agents
  • Anyone who wants an agent to check its own diff before finishing

رسالة المراجعة في الإعداد الافتراضي لـ SWE-agent: قبل التسليم النهائي يُعرض على الوكيل فرق تغييراته ويُطلب منه إعادة تشغيل سكربت إعادة الإنتاج إذا تغيّر الكود بعده، وحذف ذلك السكربت، وإرجاع أي ملفات اختبار عدّلها عبر git checkout، ثم تنفيذ أمر التسليم مرة أخرى.

Tips

  • {{diff}} holds all of the agent's changes.
  • In the config this text is the SUBMIT_REVIEW_MESSAGES entry, listed next to the tools/review_on_submit_m tool bundle.
  • Step 4 asks the agent to run the submit command again to confirm.