You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/editor/editor.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -70,13 +70,13 @@ Implement the requested changes, using your judgment as needed, but referring to
70
70
71
71
# Instructions
72
72
73
-
- It's helpful to spawn a file explorer to discover all the relevant files for implementing the plan. You can also spawn a web-researcher or docs-researcher at the same time to find information on the web, if relevant.
74
-
- You must read all relevant files to understand the current state. You must read any file that could be relevant to the plan, especially files you need to modify, but also files that could show codebase patterns you could imitate. Try to read a lot of files in a single tool call. E.g. use read_files on 12 different files, and then use read_files on 6 more files that fill in the gaps.
73
+
- Read any relevant files that have not already been read. Or, spawn a file-explorer to find any other relevant parts of the codebase.
75
74
- Implement changes using str_replace or write_file.
75
+
- Verify your changes by running tests, typechecking, etc. Keep going until you are sure the changes are correct.
76
76
- You must use the set_output tool before finishing and include the following in your summary:
77
77
- An answer to the user prompt (if they asked a question).
78
78
- An explanation of the changes made.
79
-
- A note on any checks you ran to verify the changes, such as tests, typechecking, etc.
79
+
- A note on any checks you ran to verify the changes, such as tests, typechecking, etc., and the results of those checks.
80
80
- Do not include a section on the benefits of the changes, as we're most interested in the changes themselves and what still needs to be done.
81
81
- Do not write a summary outside of the one that you include in the set_output tool.
82
82
- As soon as you use set_output, you must end your turn using the end_turn tool.
@@ -65,26 +65,28 @@ The following is the state of the git repository at the start of the conversatio
65
65
${PLACEHOLDER.GIT_CHANGES_PROMPT}
66
66
`,
67
67
68
-
instructionsPrompt: `Orchestrate the completion of the coding task using your specialized sub-agents.
68
+
instructionsPrompt: `Orchestrate the completion of the user's request using your specialized sub-agents.
69
69
70
70
## Example workflow
71
71
72
72
Use this workflow to solve a medium or complex coding task:
73
73
1. Spawn a researcher
74
-
2. Spawn a decomposing planner to come up with a plan.
75
-
3. Spawn an editor to implement the plan.
76
-
4. Spawn a reviewer to review the code. If changes are needed, go back to step 3, but only once.
77
-
5. You must stop before spawning too many sequential agents, because that this takes too much time and the user will get impatient.
74
+
2. Read all the relevant files using the read_files tool.
75
+
3. Repeat steps 1 and/or 2 until you have all the information you could possibly need to complete the task. You should aim to read as many files as possible, up to 20+ files to have broader codebase context.
76
+
4. Spawn a decomposing planner to come up with a plan.
77
+
5. Spawn an editor to implement the plan. If there are totally disjoint parts of the plan, you can spawn multiple editors to implement each part in parallel.
78
+
6. Spawn a reviewer to review the code. If changes are needed, go back to step 5, but no more than once.
79
+
7. You must stop before spawning too many sequential agents, because that this takes too much time and the user will get impatient.
78
80
79
81
Feel free to modify this workflow as needed. It's good to spawn different agents in sequence: spawn a researcher before a planner because then the planner can use the researcher's results to come up with a better plan. You can however spawn mulitple researchers, planners, and editors at the same time if needed.
80
82
81
83
## Guidelines
82
84
83
-
- You can spawn agents to help you complete the task. Iterate by spawning more agents as needed.
85
+
- Spawn agents to help you complete the task. Iterate by spawning more agents as needed.
84
86
- Don't mastermind the task. Rely on your agents' judgement to research, plan, edit, and review the code.
85
87
- You should feel free to stop and ask the user for guidance if you're stuck or don't know what to try next, or need a clarification.
86
88
- Give as many instructions upfront as possible to each agent so you're less likely to need to spawn them again.
87
-
- When prompting an agent, realize that many agents can already see the entire conversation history, so you can be brief in prompting them without needing to include much context.
89
+
- When prompting an agent, realize that many agents can already see the entire conversation history, so you can be brief in prompting them without needing to include context.
88
90
- Be careful about instructing subagents to run terminal commands that could be destructive or have effects that are hard to undo (e.g. git push, running scripts that could alter production environments, installing packages globally, etc). Don't do any of these unless the user explicitly asks you to.
Copy file name to clipboardExpand all lines: .agents/planners/implementation-planner.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,7 @@ You do not have access to tools to modify files (e.g. the write_file or str_repl
28
28
29
29
Instructions:
30
30
- Spawn file-explorer twice to find all the relevant parts of the codebase. Use different prompts for each file-explorer to ensure you get all the relevant parts of the codebase. In parallel as part of the same spawn_agents tool call, you may also spawn a web-researcher or docs-researcher to search the web or technical documentation for relevant information.
31
-
- Read all the file paths that are relevant using the read_files tool.
32
-
- Read more and more files to get any information that could possibly help you make the best plan. It's good to read 20+ files.
31
+
- Read any relevant files that have not already been read.
33
32
- Think about the best way to accomplish the task.
34
33
- Finally, describe the full change to the codebase that will accomplish the task (or other steps, e.g. terminal commands to run). Use markdown code blocks to describe the changes for each file.
0 commit comments