feat(agents): add gpt-5.5 native deep category prompt

Hephaestus 5.5 was rewritten as an outcome-first delegation contract in c3fabaaf. The deep category (spawned as sisyphus-junior under gpt-5.5) now receives a matching prose-driven category context lifted from drafts/gpt-5-5/deep.md instead of the legacy gpt-5.4-era threat-frame version.

Selection happens via a new model-aware resolvePromptAppend hook on BuiltinCategoryDefinition. When the resolved category model is gpt-5.5 the new DEEP_CATEGORY_PROMPT_APPEND_GPT_5_5 is used; older models keep the legacy DEEP_CATEGORY_PROMPT_APPEND. User prompt_append remains preserved on top of either base.
This commit is contained in:
YeonGyu-Kim
2026-04-29 14:32:17 +09:00
parent 766eedd66b
commit d65bc8730c
7 changed files with 337 additions and 2 deletions
@@ -512,4 +512,114 @@ describe("resolveCategoryExecution", () => {
})
expect(result.fallbackChain).toBeUndefined()
})
test("uses GPT-5.5 deep prompt append when category model resolves to gpt-5.5", async () => {
//#given
const args = {
category: "deep",
prompt: "test prompt",
description: "Test task",
run_in_background: false,
load_skills: [],
blockedBy: undefined,
enableSkillTools: false,
}
const executorCtx = createMockExecutorContext()
executorCtx.userCategories = {
deep: { model: "openai/gpt-5.5", variant: "medium" },
}
//#when
const result = await resolveCategoryExecution(args, executorCtx, undefined, "anthropic/claude-sonnet-4-6")
//#then
expect(result.error).toBeUndefined()
expect(result.actualModel).toBe("openai/gpt-5.5")
expect(result.categoryPromptAppend).toBeDefined()
expect(result.categoryPromptAppend).toContain("operating in DEEP mode")
expect(result.categoryPromptAppend).toContain("five to fifteen minutes")
})
test("uses legacy deep prompt append when category model resolves to gpt-5.4", async () => {
//#given
const args = {
category: "deep",
prompt: "test prompt",
description: "Test task",
run_in_background: false,
load_skills: [],
blockedBy: undefined,
enableSkillTools: false,
}
const executorCtx = createMockExecutorContext()
executorCtx.userCategories = {
deep: { model: "openai/gpt-5.4" },
}
//#when
const result = await resolveCategoryExecution(args, executorCtx, undefined, "anthropic/claude-sonnet-4-6")
//#then
expect(result.error).toBeUndefined()
expect(result.actualModel).toBe("openai/gpt-5.4")
expect(result.categoryPromptAppend).toBeDefined()
expect(result.categoryPromptAppend).toContain("GOAL-ORIENTED AUTONOMOUS")
expect(result.categoryPromptAppend).not.toContain("operating in DEEP mode")
})
test("appends user prompt_append to GPT-5.5 deep base prompt", async () => {
//#given
const args = {
category: "deep",
prompt: "test prompt",
description: "Test task",
run_in_background: false,
load_skills: [],
blockedBy: undefined,
enableSkillTools: false,
}
const executorCtx = createMockExecutorContext()
executorCtx.userCategories = {
deep: {
model: "openai/gpt-5.5",
prompt_append: "USER_CUSTOM_INSTRUCTION_XYZ",
},
}
//#when
const result = await resolveCategoryExecution(args, executorCtx, undefined, "anthropic/claude-sonnet-4-6")
//#then
expect(result.error).toBeUndefined()
expect(result.categoryPromptAppend).toContain("operating in DEEP mode")
expect(result.categoryPromptAppend).toContain("USER_CUSTOM_INSTRUCTION_XYZ")
})
test("appends user prompt_append to legacy deep base prompt for non-gpt-5.5 models", async () => {
//#given
const args = {
category: "deep",
prompt: "test prompt",
description: "Test task",
run_in_background: false,
load_skills: [],
blockedBy: undefined,
enableSkillTools: false,
}
const executorCtx = createMockExecutorContext()
executorCtx.userCategories = {
deep: {
model: "openai/gpt-5.4",
prompt_append: "USER_CUSTOM_INSTRUCTION_LEGACY",
},
}
//#when
const result = await resolveCategoryExecution(args, executorCtx, undefined, "anthropic/claude-sonnet-4-6")
//#then
expect(result.error).toBeUndefined()
expect(result.categoryPromptAppend).toContain("GOAL-ORIENTED AUTONOMOUS")
expect(result.categoryPromptAppend).toContain("USER_CUSTOM_INSTRUCTION_LEGACY")
})
})