fix(task): append plan delegation prompt requirements
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -3,6 +3,14 @@ import { buildPlanAgentSystemPrepend, isPlanAgent } from "./constants"
|
||||
import { buildSystemContentWithTokenLimit } from "./token-limiter"
|
||||
|
||||
const FREE_OR_LOCAL_PROMPT_TOKEN_LIMIT = 24000
|
||||
const PLAN_AGENT_PROMPT_APPEND = `
|
||||
|
||||
Additional requirements for this planning request:
|
||||
- Answer in English.
|
||||
- Write the plan in English.
|
||||
- Plan well for ultrawork execution.
|
||||
- Use TDD-oriented planning.
|
||||
- Include a clear atomic commit strategy.`
|
||||
|
||||
function usesFreeOrLocalModel(model: { providerID: string; modelID: string; variant?: string } | undefined): boolean {
|
||||
if (!model) {
|
||||
@@ -52,3 +60,11 @@ export function buildSystemContent(input: BuildSystemContentInput): string | und
|
||||
effectiveMaxPromptTokens
|
||||
)
|
||||
}
|
||||
|
||||
export function buildTaskPrompt(prompt: string, agentName: string | undefined): string {
|
||||
if (!isPlanAgent(agentName)) {
|
||||
return prompt
|
||||
}
|
||||
|
||||
return `${prompt}${PLAN_AGENT_PROMPT_APPEND}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user