feat(sisyphus-junior): add model-specific GPT prompt routing (gpt-5-4, gpt-5-3-codex, generic gpt)
Split GPT prompt into three variants with model-based routing: - gpt-5-4.ts: GPT-5.4 optimized (expert coding agent framing, prose-first) - gpt-5-3-codex.ts: GPT-5.3-Codex optimized (Hephaestus-style Senior Engineer) - gpt.ts: Generic GPT fallback (Hephaestus-style, for any other GPT model) Routing: gpt-5.4 → gpt-5-4 | gpt-5.3-codex → gpt-5-3-codex | other GPT → gpt 🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -314,6 +314,30 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
|
||||
expect(result.prompt).toContain("Progress Updates")
|
||||
})
|
||||
|
||||
test("GPT 5.4 model uses GPT-5.4 specific prompt", () => {
|
||||
// given
|
||||
const override = { model: "openai/gpt-5.4" }
|
||||
|
||||
// when
|
||||
const result = createSisyphusJuniorAgentWithOverrides(override)
|
||||
|
||||
// then
|
||||
expect(result.prompt).toContain("expert coding agent")
|
||||
expect(result.prompt).toContain("<tool_usage_rules>")
|
||||
})
|
||||
|
||||
test("GPT 5.3 Codex model uses GPT-5.3-codex specific prompt", () => {
|
||||
// given
|
||||
const override = { model: "openai/gpt-5.3-codex" }
|
||||
|
||||
// when
|
||||
const result = createSisyphusJuniorAgentWithOverrides(override)
|
||||
|
||||
// then
|
||||
expect(result.prompt).toContain("Senior Engineer")
|
||||
expect(result.prompt).toContain("<tool_usage_rules>")
|
||||
})
|
||||
|
||||
test("prompt_append is added after base prompt", () => {
|
||||
// given
|
||||
const override = { prompt_append: "CUSTOM_MARKER_FOR_TEST" }
|
||||
@@ -331,7 +355,51 @@ describe("createSisyphusJuniorAgentWithOverrides", () => {
|
||||
})
|
||||
|
||||
describe("getSisyphusJuniorPromptSource", () => {
|
||||
test("returns 'gpt' for OpenAI models", () => {
|
||||
test("returns 'gpt-5-4' for GPT 5.4 models", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.4"
|
||||
|
||||
// when
|
||||
const source = getSisyphusJuniorPromptSource(model)
|
||||
|
||||
// then
|
||||
expect(source).toBe("gpt-5-4")
|
||||
})
|
||||
|
||||
test("returns 'gpt-5-4' for GitHub Copilot GPT 5.4", () => {
|
||||
// given
|
||||
const model = "github-copilot/gpt-5.4"
|
||||
|
||||
// when
|
||||
const source = getSisyphusJuniorPromptSource(model)
|
||||
|
||||
// then
|
||||
expect(source).toBe("gpt-5-4")
|
||||
})
|
||||
|
||||
test("returns 'gpt-5-3-codex' for GPT 5.3 Codex models", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.3-codex"
|
||||
|
||||
// when
|
||||
const source = getSisyphusJuniorPromptSource(model)
|
||||
|
||||
// then
|
||||
expect(source).toBe("gpt-5-3-codex")
|
||||
})
|
||||
|
||||
test("returns 'gpt-5-3-codex' for GitHub Copilot GPT 5.3 Codex", () => {
|
||||
// given
|
||||
const model = "github-copilot/gpt-5.3-codex"
|
||||
|
||||
// when
|
||||
const source = getSisyphusJuniorPromptSource(model)
|
||||
|
||||
// then
|
||||
expect(source).toBe("gpt-5-3-codex")
|
||||
})
|
||||
|
||||
test("returns 'gpt' for generic GPT models", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.2"
|
||||
|
||||
@@ -342,7 +410,7 @@ describe("getSisyphusJuniorPromptSource", () => {
|
||||
expect(source).toBe("gpt")
|
||||
})
|
||||
|
||||
test("returns 'gpt' for GitHub Copilot GPT models", () => {
|
||||
test("returns 'gpt' for GitHub Copilot generic GPT models", () => {
|
||||
// given
|
||||
const model = "github-copilot/gpt-4o"
|
||||
|
||||
@@ -377,7 +445,33 @@ describe("getSisyphusJuniorPromptSource", () => {
|
||||
})
|
||||
|
||||
describe("buildSisyphusJuniorPrompt", () => {
|
||||
test("GPT model prompt contains Hephaestus-style sections", () => {
|
||||
test("GPT 5.4 model uses GPT-5.4 optimized prompt", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.4"
|
||||
|
||||
// when
|
||||
const prompt = buildSisyphusJuniorPrompt(model, false)
|
||||
|
||||
// then
|
||||
expect(prompt).toContain("expert coding agent")
|
||||
expect(prompt).toContain("Scope Discipline")
|
||||
expect(prompt).toContain("<tool_usage_rules>")
|
||||
})
|
||||
|
||||
test("GPT 5.3 Codex model uses GPT-5.3-codex prompt", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.3-codex"
|
||||
|
||||
// when
|
||||
const prompt = buildSisyphusJuniorPrompt(model, false)
|
||||
|
||||
// then
|
||||
expect(prompt).toContain("Senior Engineer")
|
||||
expect(prompt).toContain("Scope Discipline")
|
||||
expect(prompt).toContain("<tool_usage_rules>")
|
||||
})
|
||||
|
||||
test("generic GPT model uses generic GPT prompt", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.2"
|
||||
|
||||
@@ -404,9 +498,21 @@ describe("buildSisyphusJuniorPrompt", () => {
|
||||
expect(prompt).toContain("todowrite")
|
||||
})
|
||||
|
||||
test("useTaskSystem=true includes Task Discipline for GPT", () => {
|
||||
test("useTaskSystem=true includes Task Discipline for GPT 5.4", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.2"
|
||||
const model = "openai/gpt-5.4"
|
||||
|
||||
// when
|
||||
const prompt = buildSisyphusJuniorPrompt(model, true)
|
||||
|
||||
// then
|
||||
expect(prompt).toContain("Task Discipline")
|
||||
expect(prompt).toContain("task_create")
|
||||
})
|
||||
|
||||
test("useTaskSystem=true includes Task Discipline for GPT 5.3 Codex", () => {
|
||||
// given
|
||||
const model = "openai/gpt-5.3-codex"
|
||||
|
||||
// when
|
||||
const prompt = buildSisyphusJuniorPrompt(model, true)
|
||||
|
||||
Reference in New Issue
Block a user