From fa460469f04717aa306088673fb13660e5c537b9 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 7 Mar 2026 00:43:01 +0900 Subject: [PATCH] feat(sisyphus): rewrite GPT-5.4 prompt with 8-block architecture Restructure from 13 scattered XML blocks to 8 dense blocks with 9 named sub-anchors, following OpenAI GPT-5.4 prompting guidance and Oracle-reviewed context preservation strategy. Key changes: - Merge think_first + intent_gate + autonomy into unified with domain_guess classification and sub-anchor - Add as central workflow: EXPLORE -> PLAN -> ROUTE -> EXECUTE_OR_SUPERVISE -> VERIFY -> RETRY -> DONE - Add mandatory manual QA in (conditional on runnable behavior) - Move to position #2 for GPT-5.4 attention pattern - Add as explicit loop exit gate - Add and per GPT-5.4 guidance - Add domain_guess (provisional) in intent, finalized in ROUTE after exploration -- visual domain always routes to visual-engineering - Preserve all named sub-anchors: ask_gate, tool_persistence, parallel_tools, tool_method, dependency_checks, verification_loop, failure_recovery, completeness_contract - Add skill loading emphasis at intent/route/delegation layers - Rename EXECUTE to EXECUTE_OR_SUPERVISE to preserve orchestrator identity with non-execution exits (answer/ask/challenge) --- src/agents/sisyphus/gpt-5-4.ts | 348 +++++++++++++++++++-------------- 1 file changed, 203 insertions(+), 145 deletions(-) diff --git a/src/agents/sisyphus/gpt-5-4.ts b/src/agents/sisyphus/gpt-5-4.ts index 815605f64..38dca0eb7 100644 --- a/src/agents/sisyphus/gpt-5-4.ts +++ b/src/agents/sisyphus/gpt-5-4.ts @@ -1,14 +1,24 @@ /** - * GPT-5.4-native Sisyphus prompt — written from scratch. + * GPT-5.4-native Sisyphus prompt — rewritten with 8-block architecture. * * Design principles (derived from OpenAI's GPT-5.4 prompting guidance): - * - Compact, block-structured prompts with XML tags - * - reasoning.effort defaults to "none" — encourage explicit thinking + * - Compact, block-structured prompts with XML tags + named sub-anchors + * - reasoning.effort defaults to "none" — explicit thinking encouragement required * - GPT-5.4 generates preambles natively — do NOT add preamble instructions * - GPT-5.4 follows instructions well — less repetition, fewer threats needed - * - GPT-5.4 benefits from: output contracts, verification loops, dependency checks - * - GPT-5.4 can be over-literal — add intent inference layer for 알잘딱 behavior + * - GPT-5.4 benefits from: output contracts, verification loops, dependency checks, completeness contracts + * - GPT-5.4 can be over-literal — add intent inference layer for nuanced behavior * - "Start with the smallest prompt that passes your evals" — keep it dense + * + * Architecture (8 blocks, ~9 named sub-anchors): + * 1. — Role, instruction priority, orchestrator bias + * 2. — Hard blocks + anti-patterns (early placement for GPT-5.4 attention) + * 3. — Think-first + intent gate + autonomy (merged, domain_guess routing) + * 4. — Codebase assessment + research + tool rules (named sub-anchors preserved) + * 5. — EXPLORE→PLAN→ROUTE→EXECUTE_OR_SUPERVISE→VERIFY→RETRY→DONE (heart of prompt) + * 6. — Category+skills, 6-section prompt, session continuity, oracle + * 7. — Task/todo management + * 8. +## Output - -${hardBlocks} + +- Default: 3-6 sentences or ≤5 bullets +- Simple yes/no: ≤2 sentences +- Complex multi-file: 1 overview paragraph + ≤5 tagged bullets (What, Where, Risks, Next, Open) +- Before taking action on a non-trivial request, briefly explain your plan in 2-3 sentences. + -${antiPatterns} + +- Prefer concise, information-dense writing. +- Avoid repeating the user's request back to them. +- Do not shorten so aggressively that required evidence, reasoning, or completion checks are omitted. + +`; -Soft guidelines: -- Prefer existing libraries over new dependencies -- Prefer small, focused changes over large refactors -- When uncertain about scope, ask - -`; + return `${identityBlock} + +${constraintsBlock} + +${intentBlock} + +${exploreBlock} + +${executionLoopBlock} + +${delegationBlock} + +${tasksSection} + +${styleBlock}`; } export { categorizeTools };