Skip to content

Commit ea389f5

Browse files
committed
Merge branch 'main' into connect-claude
2 parents 500cada + c15d7be commit ea389f5

File tree

163 files changed

+7956
-4882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+7956
-4882
lines changed

.agents/__tests__/context-pruner.test.ts

Lines changed: 993 additions & 970 deletions
Large diffs are not rendered by default.

.agents/base2/base2.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function createBase2(
2424
const isMax = mode === 'max'
2525
const isLite = mode === 'lite'
2626

27-
const isOpus = true
27+
const isOpus = !isLite
2828
const isSonnet = false
2929
const isGemini = false
3030

@@ -166,7 +166,8 @@ ${buildArray(
166166
isFast &&
167167
'- Prioritize speed: quickly getting the user request done is your first priority. Do not call any unnecessary tools. Spawn more agents in parallel to speed up the process. Be extremely concise in your responses. Use 2 words where you would have used 2 sentences.',
168168
'- If a tool fails, try again, or try a different tool or approach.',
169-
'- **Use <think></think> tags for moderate reasoning:** When you need to work through something moderately complex (e.g., understanding code flow, planning a small refactor, reasoning about edge cases, planning which agents to spawn), wrap your thinking in <think></think> tags. Spawn the thinker agent for anything more complex.',
169+
(isDefault || isMax) &&
170+
'- **Use <think></think> tags for moderate reasoning:** When you need to work through something moderately complex (e.g., understanding code flow, planning a small refactor, reasoning about edge cases, planning which agents to spawn), wrap your thinking in <think></think> tags. Spawn the thinker agent for anything more complex.',
170171
'- Context is managed for you. The context-pruner agent will automatically run as needed. Gather as much context as you need without worrying about it.',
171172
isSonnet &&
172173
`- **Don't create a summary markdown file:** The user doesn't want markdown files they didn't ask for. Don't create them.`,
@@ -186,7 +187,11 @@ ${buildArray(
186187
187188
[ You spawn one more code-searcher and file-picker ]
188189
189-
[ You read a few other relevant files using the read_files tool ]
190+
[ You read a few other relevant files using the read_files tool ]${
191+
!noAskUser
192+
? `\n\n[ You ask the user for important clarifications on their request or alternate implementation strategies using the ask_user tool ]`
193+
: ''
194+
}
190195
${
191196
isDefault
192197
? `[ You implement the changes using the editor agent ]`
@@ -309,12 +314,11 @@ ${buildArray(
309314
isMax &&
310315
`- Important: Read as many files as could possibly be relevant to the task over several steps to improve your understanding of the user's request and produce the best possible code changes. Find more examples within the codebase similar to the user's request, dependencies that help with understanding how things work, tests, etc. This is frequently 12-20 files, depending on the task.`,
311316
!noAskUser &&
312-
isMax &&
313-
'If needed, use the ask_user tool to ask the user for clarification on their request or alternate implementation strategies. It is good to get context on the codebase before asking questions so you can ask informed questions.',
317+
'After getting context on the user request from the codebase or from research, use the ask_user tool to ask the user for important clarifications on their request or alternate implementation strategies. You should skip this step if there are no important clarifications to make.',
314318
(isDefault || isMax) &&
315319
`- For any task requiring 3+ steps, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${isFast ? '' : ' You should include a step to review the changes after you have implemented the changes.'}:${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} You may be able to do reviewing and validation in parallel in the same step. Skip write_todos for simple tasks like quick edits or answering questions.`,
316320
(isDefault || isMax) &&
317-
`- For quick problems, use <think></think> tags to think through the problem. For anything more complex, spawn the thinker agent to help find the best solution.`,
321+
`- For quick problems, briefly explain your reasoning to the user. If you need to think longer, write your thoughts within the <think> tags. Finally, for complex problems, spawn the thinker agent to help find the best solution.`,
318322
isLite &&
319323
'- IMPORTANT: You must spawn the editor-gpt-5 agent to implement the changes after you have gathered all the context you need. This agent will do the best job of implementing the changes so you must spawn it for all changes. Do not pass any prompt or params to the editor agent when spawning it. It will make its own best choices of what to do.',
320324
isDefault &&
@@ -370,7 +374,7 @@ function buildImplementationStepPrompt({
370374
function buildPlanOnlyInstructionsPrompt({}: {}) {
371375
return `Orchestrate the completion of the user's request using your specialized sub-agents.
372376
373-
You are in plan mode, so you should default to asking the user a few clarifying questions and then creating a spec/plan based on the user's request. However, creating a plan is not required at all and you should otherwise strive to act as a helpful assistant and answer the user's questions or requests freely.
377+
You are in plan mode, so you should default to asking the user clarifying questions, potentially in multiple rounds as needed to fully understand the user's request, and then creating a spec/plan based on the user's request. However, asking questions and creating a plan is not required at all and you should otherwise strive to act as a helpful assistant and answer the user's questions or requests freely.
374378
375379
## Example response
376380
@@ -386,7 +390,7 @@ To clarify the user's intent, or get them to weigh in on key decisions, you shou
386390
387391
It's good to use this tool before generating a spec, so you can make the best possible spec for the user's request.
388392
389-
If you don't have any important questions to ask, you can skip this step.
393+
If you don't have any important questions to ask, you can skip this step. Keep asking questions until you have a clear understanding of the user's request and how to solve it. However, be sure that you never ask questions with obvious answers or questions about details that can be changed later. Focus on the most important aspects only.
390394
391395
## Creating a spec
392396

0 commit comments

Comments
 (0)