From dfc57d0426cd7868610adea024caccf9ddef515c Mon Sep 17 00:00:00 2001 From: justsisyphus Date: Fri, 23 Jan 2026 21:41:55 +0900 Subject: [PATCH] refactor(model-requirements): use lowercase agent keys --- src/hooks/todo-continuation-enforcer.ts | 2 +- src/shared/model-requirements.test.ts | 40 ++++++++++++------------- src/shared/model-requirements.ts | 10 +++---- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/hooks/todo-continuation-enforcer.ts b/src/hooks/todo-continuation-enforcer.ts index 1841b56d..41e8b2c5 100644 --- a/src/hooks/todo-continuation-enforcer.ts +++ b/src/hooks/todo-continuation-enforcer.ts @@ -13,7 +13,7 @@ import { createSystemDirective, SystemDirectiveTypes } from "../shared/system-di const HOOK_NAME = "todo-continuation-enforcer" -const DEFAULT_SKIP_AGENTS = ["Prometheus (Planner)"] +const DEFAULT_SKIP_AGENTS = ["prometheus"] export interface TodoContinuationEnforcerOptions { backgroundManager?: BackgroundManager diff --git a/src/shared/model-requirements.test.ts b/src/shared/model-requirements.test.ts index 7afb5ef3..bebd3580 100644 --- a/src/shared/model-requirements.test.ts +++ b/src/shared/model-requirements.test.ts @@ -23,9 +23,9 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.variant).toBe("high") }) - test("Sisyphus has valid fallbackChain with claude-opus-4-5 as primary", () => { - // #given - Sisyphus agent requirement - const sisyphus = AGENT_MODEL_REQUIREMENTS["Sisyphus"] + test("sisyphus has valid fallbackChain with claude-opus-4-5 as primary", () => { + // #given - sisyphus agent requirement + const sisyphus = AGENT_MODEL_REQUIREMENTS["sisyphus"] // #when - accessing Sisyphus requirement // #then - fallbackChain exists with claude-opus-4-5 as first entry @@ -84,9 +84,9 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.model).toBe("gemini-3-flash-preview") }) - test("Prometheus (Planner) has valid fallbackChain with claude-opus-4-5 as primary", () => { - // #given - Prometheus agent requirement - const prometheus = AGENT_MODEL_REQUIREMENTS["Prometheus (Planner)"] + test("prometheus has valid fallbackChain with claude-opus-4-5 as primary", () => { + // #given - prometheus agent requirement + const prometheus = AGENT_MODEL_REQUIREMENTS["prometheus"] // #when - accessing Prometheus requirement // #then - fallbackChain exists with claude-opus-4-5 as first entry @@ -100,9 +100,9 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.variant).toBe("max") }) - test("Metis (Plan Consultant) has valid fallbackChain with claude-opus-4-5 as primary", () => { - // #given - Metis agent requirement - const metis = AGENT_MODEL_REQUIREMENTS["Metis (Plan Consultant)"] + test("metis has valid fallbackChain with claude-opus-4-5 as primary", () => { + // #given - metis agent requirement + const metis = AGENT_MODEL_REQUIREMENTS["metis"] // #when - accessing Metis requirement // #then - fallbackChain exists with claude-opus-4-5 as first entry @@ -116,9 +116,9 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.variant).toBe("max") }) - test("Momus (Plan Reviewer) has valid fallbackChain with gpt-5.2 as primary", () => { - // #given - Momus agent requirement - const momus = AGENT_MODEL_REQUIREMENTS["Momus (Plan Reviewer)"] + test("momus has valid fallbackChain with gpt-5.2 as primary", () => { + // #given - momus agent requirement + const momus = AGENT_MODEL_REQUIREMENTS["momus"] // #when - accessing Momus requirement // #then - fallbackChain exists with gpt-5.2 as first entry, variant medium @@ -132,9 +132,9 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(primary.providers[0]).toBe("openai") }) - test("Atlas has valid fallbackChain with claude-sonnet-4-5 as primary", () => { - // #given - Atlas agent requirement - const atlas = AGENT_MODEL_REQUIREMENTS["Atlas"] + test("atlas has valid fallbackChain with claude-sonnet-4-5 as primary", () => { + // #given - atlas agent requirement + const atlas = AGENT_MODEL_REQUIREMENTS["atlas"] // #when - accessing Atlas requirement // #then - fallbackChain exists with claude-sonnet-4-5 as first entry @@ -150,15 +150,15 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { test("all 9 builtin agents have valid fallbackChain arrays", () => { // #given - list of 9 agent names const expectedAgents = [ - "Sisyphus", + "sisyphus", "oracle", "librarian", "explore", "multimodal-looker", - "Prometheus (Planner)", - "Metis (Plan Consultant)", - "Momus (Plan Reviewer)", - "Atlas", + "prometheus", + "metis", + "momus", + "atlas", ] // #when - checking AGENT_MODEL_REQUIREMENTS diff --git a/src/shared/model-requirements.ts b/src/shared/model-requirements.ts index 61f2c468..ddb912f1 100644 --- a/src/shared/model-requirements.ts +++ b/src/shared/model-requirements.ts @@ -10,7 +10,7 @@ export type ModelRequirement = { } export const AGENT_MODEL_REQUIREMENTS: Record = { - Sisyphus: { + sisyphus: { fallbackChain: [ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-5", variant: "max" }, { providers: ["zai-coding-plan"], model: "glm-4.7" }, @@ -46,28 +46,28 @@ export const AGENT_MODEL_REQUIREMENTS: Record = { { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" }, ], }, - "Prometheus (Planner)": { + prometheus: { fallbackChain: [ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-5", variant: "max" }, { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" }, { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro-preview" }, ], }, - "Metis (Plan Consultant)": { + metis: { fallbackChain: [ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-5", variant: "max" }, { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "high" }, { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro-preview", variant: "max" }, ], }, - "Momus (Plan Reviewer)": { + momus: { fallbackChain: [ { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2", variant: "medium" }, { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-opus-4-5" }, { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro-preview", variant: "max" }, ], }, - Atlas: { + atlas: { fallbackChain: [ { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-5" }, { providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.2" },