The prompt
<uploaded_files>
{{working_dir}}
</uploaded_files>
I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:
<pr_description>
{{problem_statement}}
</pr_description>
Can you help me implement the necessary changes to the repository so that the requirements specified in the <pr_description> are met?
I've already taken care of all changes to any of the test files described in the <pr_description>. This means you DON'T have to modify the testing logic or any of the tests in any way!
Your task is to make the minimal changes to non-tests files in the {{working_dir}} directory to ensure the <pr_description> is satisfied.
Follow these steps to resolve the issue:
1. As a first step, it might be a good idea to find and read code relevant to the <pr_description>
2. Create a script to reproduce the error and execute it with `python <filename.py>` using the bash tool, to confirm the error
3. Edit the sourcecode of the repo to resolve the issue
4. Rerun your reproduce script and confirm that the error is fixed!
5. Think about edgecases and make sure your fix handles them as well
Your thinking should be thorough and so it's fine if it's very long. What it is
The default task message of SWE-agent: the agent gets a repository path and a PR description, is told the tests are already taken care of, and is asked to make minimal changes to non-test files in five steps: read the relevant code, write and run a script that reproduces the error, edit the source, rerun the script, and think about edge cases. 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 six-space indentation removed; the {{working_dir}} and {{problem_statement}} placeholders keep the source syntax.
Who it's for
- Developers running coding agents on bug reports
- Anyone writing a task message for an issue-fixing agent
رسالة المهمة الافتراضية في SWE-agent: يحصل الوكيل على مسار المستودع ووصف طلب الدمج، ويُبلَّغ أن الاختبارات جاهزة، ويُطلب منه أقل تعديل ممكن على الملفات غير الاختبارية في خمس خطوات: قراءة الكود المتعلق، كتابة وتشغيل سكربت يعيد إنتاج الخطأ، تعديل المصدر، إعادة تشغيل السكربت، ثم التفكير في الحالات الطرفية.
Tips
- {{working_dir}} is the repository folder and {{problem_statement}} is the issue or PR text.
- A comment at the top of the source file says the template is heavily inspired by Anthropic's computer use demo but can be used with any LM.
- The system prompt in the same file is one line: "You are a helpful assistant that can interact with a computer to solve tasks."
- The template speaks of a python repository and of running the script with python; change both for other languages.