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:
YeonGyu-Kim
2026-03-06 22:56:51 +09:00
parent 898b628d3d
commit 20b185b59f
8 changed files with 61 additions and 6 deletions
+16
View File
@@ -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}`
}