feat(agents): add gpt-5.5 native hephaestus prompt

Ground-up rewrite that follows the same Codex-style section structure
as the new gpt-5-5 sisyphus prompt, tuned for Hephaestus's autonomous
deep-worker role.

Distinctive elements:
- 'Autonomy and Persistence' section with named 'Forbidden stops' list
  (replaces gpt-5-4's FORBIDDEN/CORRECT table rhetoric)
- 'Three-attempt failure protocol' codified
- 'Exploration-first approach' with explicit 5-15 minute expectation
- 'Dig deeper' subsection for root-cause bias
- 'Ambition vs precision' distinction for greenfield vs existing
  codebase work

getHephaestusPromptSource() now checks gpt-5-5 before gpt-5-4; the
regex-based gpt-5-4 path stays as the catch-all for other native
versions.
This commit is contained in:
YeonGyu-Kim
2026-04-24 13:06:02 +09:00
parent 98964eb6f8
commit a432e29ae3
2 changed files with 316 additions and 2 deletions
+15 -2
View File
@@ -1,6 +1,6 @@
import type { AgentConfig } from "@opencode-ai/sdk";
import type { AgentMode, AgentPromptMetadata } from "../types";
import { isGpt5_3CodexModel, isGptNativeSisyphusModel } from "../types";
import { isGpt5_3CodexModel, isGpt5_5Model, isGptNativeSisyphusModel } from "../types";
import type {
AvailableAgent,
AvailableTool,
@@ -13,14 +13,18 @@ import { getGptApplyPatchPermission } from "../gpt-apply-patch-guard";
import { buildHephaestusPrompt as buildGptPrompt } from "./gpt";
import { buildHephaestusPrompt as buildGpt53CodexPrompt } from "./gpt-5-3-codex";
import { buildHephaestusPrompt as buildGpt54Prompt } from "./gpt-5-4";
import { buildGpt55HephaestusPrompt as buildGpt55Prompt } from "./gpt-5-5";
const MODE: AgentMode = "primary";
export type HephaestusPromptSource = "gpt-5-4" | "gpt-5-3-codex" | "gpt";
export type HephaestusPromptSource = "gpt-5-5" | "gpt-5-4" | "gpt-5-3-codex" | "gpt";
export function getHephaestusPromptSource(
model?: string,
): HephaestusPromptSource {
if (model && isGpt5_5Model(model)) {
return "gpt-5-5";
}
if (model && isGptNativeSisyphusModel(model)) {
return "gpt-5-4";
}
@@ -58,6 +62,15 @@ function buildDynamicHephaestusPrompt(ctx?: HephaestusContext): string {
let basePrompt: string;
switch (source) {
case "gpt-5-5":
basePrompt = buildGpt55Prompt(
agents,
tools,
skills,
categories,
useTaskSystem,
);
break;
case "gpt-5-4":
basePrompt = buildGpt54Prompt(
agents,