Skip to content

Commit 154c835

Browse files
committed
Some base2 prompt tweaks inspired by misses in eval task
1 parent e23614a commit 154c835

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

agents/base2/base2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ export function createBase2(
131131
- Don't forget to add any imports that might be needed
132132
- Remove unused variables, functions, and files as a result of your changes.
133133
- If you added files or functions meant to replace existing code, then you should also remove the previous code.
134-
- **Minimal new code comments:** Do not add many new comments while writing code, unless they were preexisting comments (keep those!) or unless the user asks you to add comments!
135-
- **Don't type cast as "any" type:** Don't cast variables as "any" (or similar for other languages). This is a bad practice as it leads to bugs. The code is more robust when every expression is typed.
134+
- **Don't type cast as "any" type:** Don't cast variables as "any" (or similar for other languages). This is a bad practice as it leads to bugs. Exception: when the value can truly be any type.
135+
- **Prefer str_replace to write_file:** str_replace is more efficient for targeted changes and gives more feedback. Only use write_file for new files or when necessary to rewrite the entire file.
136136
137137
# Spawning agents guidelines
138138
@@ -217,7 +217,7 @@ ${isDefault
217217
${isDefault
218218
? `[ You spawn a code-reviewer, a basher to typecheck the changes, and another basher to run tests, all in parallel ]`
219219
: isFree
220-
? `[ You spawn a code-reviewer-lite to review the changes, and a basher to typecheck the changes, and another basher to run tests, all in parallel ]`
220+
? `[ You spawn a code-reviewer-lite to review the changes, a basher to typecheck the local changes, a basher to typecheck the whole project, and another basher to run tests, all in parallel ]`
221221
: isMax
222222
? `[ You spawn a basher to typecheck the changes, and another basher to run tests, in parallel. Then, you spawn a code-reviewer-multi-prompt to review the changes. ]`
223223
: '[ You spawn a basher to typecheck the changes and another basher to run tests, all in parallel ]'

0 commit comments

Comments
 (0)