refactor(ultrawork): rename gpt5.2.ts to gpt.ts and align with 5.4 style
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
+11
-15
@@ -1,15 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* Ultrawork message optimized for GPT 5.2 series models.
|
* Ultrawork message optimized for GPT 5.4 series models.
|
||||||
*
|
|
||||||
* Key characteristics (from GPT 5.2 Prompting Guide):
|
|
||||||
* - "Stronger instruction adherence" - follows instructions more literally
|
|
||||||
* - "Conservative grounding bias" - prefers correctness over speed
|
|
||||||
* - "Parallelize independent reads to reduce latency" - official guidance
|
|
||||||
*
|
*
|
||||||
* Design principles:
|
* Design principles:
|
||||||
|
* - Expert coding agent framing with approach-first mentality
|
||||||
|
* - Prose-first output (do not default to bullets)
|
||||||
* - Two-track parallel context gathering (Direct tools + Background agents)
|
* - Two-track parallel context gathering (Direct tools + Background agents)
|
||||||
* - Fire background agents, then use direct tools while waiting
|
* - Deterministic tool usage and explicit decision criteria
|
||||||
* - Explicit complexity-based decision criteria
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const ULTRAWORK_GPT_MESSAGE = `<ultrawork-mode>
|
export const ULTRAWORK_GPT_MESSAGE = `<ultrawork-mode>
|
||||||
@@ -19,11 +15,11 @@ export const ULTRAWORK_GPT_MESSAGE = `<ultrawork-mode>
|
|||||||
[CODE RED] Maximum precision required. Think deeply before acting.
|
[CODE RED] Maximum precision required. Think deeply before acting.
|
||||||
|
|
||||||
<output_verbosity_spec>
|
<output_verbosity_spec>
|
||||||
- Default: 3-6 sentences or ≤5 bullets for typical answers
|
- Default: 1-2 short paragraphs. Do not default to bullets.
|
||||||
- Simple yes/no questions: ≤2 sentences
|
- Simple yes/no questions: ≤2 sentences.
|
||||||
- Complex multi-file tasks: 1 short overview paragraph + ≤5 bullets (What, Where, Risks, Next, Open)
|
- Complex multi-file tasks: 1 overview paragraph + up to 4 high-level sections grouped by outcome, not by file.
|
||||||
- Avoid long narrative paragraphs; prefer compact bullets
|
- Use lists only when content is inherently list-shaped (distinct items, steps, options).
|
||||||
- Do not rephrase the user's request unless it changes semantics
|
- Do not rephrase the user's request unless it changes semantics.
|
||||||
</output_verbosity_spec>
|
</output_verbosity_spec>
|
||||||
|
|
||||||
<scope_constraints>
|
<scope_constraints>
|
||||||
@@ -144,8 +140,8 @@ A task is complete when:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
`
|
`;
|
||||||
|
|
||||||
export function getGptUltraworkMessage(): string {
|
export function getGptUltraworkMessage(): string {
|
||||||
return ULTRAWORK_GPT_MESSAGE
|
return ULTRAWORK_GPT_MESSAGE;
|
||||||
}
|
}
|
||||||
@@ -3,39 +3,53 @@
|
|||||||
*
|
*
|
||||||
* Routing:
|
* Routing:
|
||||||
* 1. Planner agents (prometheus, plan) → planner.ts
|
* 1. Planner agents (prometheus, plan) → planner.ts
|
||||||
* 2. GPT 5.2 models → gpt5.2.ts
|
* 2. GPT models → gpt.ts
|
||||||
* 3. Gemini models → gemini.ts
|
* 3. Gemini models → gemini.ts
|
||||||
* 4. Default (Claude, etc.) → default.ts (optimized for Claude series)
|
* 4. Default (Claude, etc.) → default.ts (optimized for Claude series)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { isPlannerAgent, isGptModel, isGeminiModel, getUltraworkSource } from "./source-detector"
|
export {
|
||||||
export type { UltraworkSource } from "./source-detector"
|
isPlannerAgent,
|
||||||
export { ULTRAWORK_PLANNER_SECTION, getPlannerUltraworkMessage } from "./planner"
|
isGptModel,
|
||||||
export { ULTRAWORK_GPT_MESSAGE, getGptUltraworkMessage } from "./gpt5.2"
|
isGeminiModel,
|
||||||
export { ULTRAWORK_GEMINI_MESSAGE, getGeminiUltraworkMessage } from "./gemini"
|
getUltraworkSource,
|
||||||
export { ULTRAWORK_DEFAULT_MESSAGE, getDefaultUltraworkMessage } from "./default"
|
} from "./source-detector";
|
||||||
|
export type { UltraworkSource } from "./source-detector";
|
||||||
|
export {
|
||||||
|
ULTRAWORK_PLANNER_SECTION,
|
||||||
|
getPlannerUltraworkMessage,
|
||||||
|
} from "./planner";
|
||||||
|
export { ULTRAWORK_GPT_MESSAGE, getGptUltraworkMessage } from "./gpt";
|
||||||
|
export { ULTRAWORK_GEMINI_MESSAGE, getGeminiUltraworkMessage } from "./gemini";
|
||||||
|
export {
|
||||||
|
ULTRAWORK_DEFAULT_MESSAGE,
|
||||||
|
getDefaultUltraworkMessage,
|
||||||
|
} from "./default";
|
||||||
|
|
||||||
import { getUltraworkSource } from "./source-detector"
|
import { getUltraworkSource } from "./source-detector";
|
||||||
import { getPlannerUltraworkMessage } from "./planner"
|
import { getPlannerUltraworkMessage } from "./planner";
|
||||||
import { getGptUltraworkMessage } from "./gpt5.2"
|
import { getGptUltraworkMessage } from "./gpt";
|
||||||
import { getDefaultUltraworkMessage } from "./default"
|
import { getDefaultUltraworkMessage } from "./default";
|
||||||
import { getGeminiUltraworkMessage } from "./gemini"
|
import { getGeminiUltraworkMessage } from "./gemini";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the appropriate ultrawork message based on agent and model context.
|
* Gets the appropriate ultrawork message based on agent and model context.
|
||||||
*/
|
*/
|
||||||
export function getUltraworkMessage(agentName?: string, modelID?: string): string {
|
export function getUltraworkMessage(
|
||||||
const source = getUltraworkSource(agentName, modelID)
|
agentName?: string,
|
||||||
|
modelID?: string,
|
||||||
|
): string {
|
||||||
|
const source = getUltraworkSource(agentName, modelID);
|
||||||
|
|
||||||
switch (source) {
|
switch (source) {
|
||||||
case "planner":
|
case "planner":
|
||||||
return getPlannerUltraworkMessage()
|
return getPlannerUltraworkMessage();
|
||||||
case "gpt":
|
case "gpt":
|
||||||
return getGptUltraworkMessage()
|
return getGptUltraworkMessage();
|
||||||
case "gemini":
|
case "gemini":
|
||||||
return getGeminiUltraworkMessage()
|
return getGeminiUltraworkMessage();
|
||||||
case "default":
|
case "default":
|
||||||
default:
|
default:
|
||||||
return getDefaultUltraworkMessage()
|
return getDefaultUltraworkMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user