Skip to content

Commit 4fc5d7e

Browse files
committed
In max mode, do typecheck before code review
1 parent 9ca64da commit 4fc5d7e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

agents/base2/base2.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,11 @@ ${
205205
}
206206
207207
${
208-
isDefault || isMax
209-
? `[ You spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-multi-prompt'}, a commander to typecheck the changes, and another commander to run tests, all in parallel ]`
210-
: '[ You spawn a commander to typecheck the changes and another commander to run tests, all in parallel ]'
208+
isDefault
209+
? `[ You spawn a code-reviewer, a commander to typecheck the changes, and another commander to run tests, all in parallel ]`
210+
: isMax
211+
? `[ You spawn a commander to typecheck the changes, and another commander to run tests, in parallel. Then, you spawn a code-reviewer-multi-prompt to review the changes. ]`
212+
: '[ You spawn a commander to typecheck the changes and another commander to run tests, all in parallel ]'
211213
}
212214
213215
${
@@ -331,10 +333,10 @@ ${buildArray(
331333
'- Implement the changes using the str_replace or write_file tools. Implement all the changes in one go.',
332334
isFast &&
333335
'- Do a single typecheck targeted for your changes at most (if applicable for the project). Or skip this step if the change was small.',
334-
(isDefault || isMax) &&
335-
`- Spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-multi-prompt'} to review the changes after you have implemented the changes. (Skip this step only if the change is extremely straightforward and obvious.)`,
336336
!hasNoValidation &&
337337
`- For non-trivial changes, test them by running appropriate validation commands for the project (e.g. typechecks, tests, lints, etc.). Try to run all appropriate commands in parallel. ${isMax ? ' Typecheck and test the specific area of the project that you are editing *AND* then typecheck and test the entire project if necessary.' : ' If you can, only test the area of the project that you are editing, rather than the entire project.'} You may have to explore the project to find the appropriate commands. Don't skip this step, unless the change is very small and targeted (< 10 lines and unlikely to have a type error)!`,
338+
(isDefault || isMax) &&
339+
`- Spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-multi-prompt'} to review the changes after you have implemented changes. (Skip this step only if the change is extremely straightforward and obvious.)`,
338340
`- Inform the user that you have completed the task in one sentence or a few short bullet points.${isSonnet ? " Don't create any markdown summary files or example documentation files, unless asked by the user." : ''}`,
339341
!isFast &&
340342
!noAskUser &&

0 commit comments

Comments
 (0)