From: Jérôme Benoit Date: Thu, 7 May 2026 06:40:37 +0000 (+0200) Subject: refactor(sandcastle): split AGENT_MODEL into per-role constants X-Git-Tag: cli@v4.7.0~31 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8c3c3b9f333cf541f1c8dd907d9734f255f089d4;p=e-mobility-charging-stations-simulator.git refactor(sandcastle): split AGENT_MODEL into per-role constants --- diff --git a/.sandcastle/constants.ts b/.sandcastle/constants.ts index 5a7efb78..74497537 100644 --- a/.sandcastle/constants.ts +++ b/.sandcastle/constants.ts @@ -3,7 +3,9 @@ import { existsSync } from 'node:fs' export const AGENT_IDLE_TIMEOUT_S = 300 -export const AGENT_MODEL = 'github-copilot/claude-sonnet-4.6' +export const AGENT_ACTOR_MODEL = 'github-copilot/claude-sonnet-4.6' + +export const AGENT_CRITIC_MODEL = 'github-copilot/claude-sonnet-4.6' export const BRANCH_PREFIX = 'agent/issue' @@ -61,7 +63,7 @@ export const MAX_CRITIC_ROUNDS = 10 export const MAX_TITLE_LENGTH = 200 -export const PLANNER_MODEL = 'github-copilot/claude-opus-4.6' +export const AGENT_PLANNER_MODEL = 'github-copilot/claude-opus-4.6' export const PUSH_TIMEOUT_MS = 60_000 diff --git a/.sandcastle/refinement-loop.ts b/.sandcastle/refinement-loop.ts index 779bcaf3..9983e518 100644 --- a/.sandcastle/refinement-loop.ts +++ b/.sandcastle/refinement-loop.ts @@ -13,8 +13,9 @@ import type { } from './types.js' import { + AGENT_ACTOR_MODEL, + AGENT_CRITIC_MODEL, AGENT_IDLE_TIMEOUT_S, - AGENT_MODEL, COMPLETION_SIGNAL, CONTEXT_HASH_RADIUS, HASH_PREFIX_LENGTH, @@ -432,7 +433,7 @@ async function executeRound ( let implementerResult: Awaited> try { implementerResult = await sandbox.run({ - agent: sandcastle.opencode(AGENT_MODEL), + agent: sandcastle.opencode(AGENT_ACTOR_MODEL), completionSignal: COMPLETION_SIGNAL, idleTimeoutSeconds: AGENT_IDLE_TIMEOUT_S, maxIterations: budget, @@ -592,7 +593,7 @@ async function runCritic ( signal?: AbortSignal ): Promise { let critic = await sandbox.run({ - agent: sandcastle.opencode(AGENT_MODEL), + agent: sandcastle.opencode(AGENT_CRITIC_MODEL), completionSignal: COMPLETION_SIGNAL, idleTimeoutSeconds: AGENT_IDLE_TIMEOUT_S, maxIterations: 1, @@ -607,7 +608,7 @@ async function runCritic ( if (findings === null) { console.warn(` #${spec.id}: Critic parse failed. Retrying.`) critic = await sandbox.run({ - agent: sandcastle.opencode(AGENT_MODEL), + agent: sandcastle.opencode(AGENT_CRITIC_MODEL), completionSignal: COMPLETION_SIGNAL, idleTimeoutSeconds: AGENT_IDLE_TIMEOUT_S, maxIterations: 1, diff --git a/.sandcastle/task-source.ts b/.sandcastle/task-source.ts index 4a4458d1..3a52af19 100644 --- a/.sandcastle/task-source.ts +++ b/.sandcastle/task-source.ts @@ -12,7 +12,7 @@ import { MAX_ISSUES_FETCH, MAX_PRS_FETCH, MAX_TITLE_LENGTH, - PLANNER_MODEL, + AGENT_PLANNER_MODEL, TASK_TIMEOUT_MS, } from './constants.js' import { execFileAsync, toErrorMessage } from './utils.js' @@ -96,7 +96,7 @@ export class GithubIssueSource implements TaskSource { let plan: Awaited> try { plan = await sandcastle.run({ - agent: sandcastle.opencode(PLANNER_MODEL), + agent: sandcastle.opencode(AGENT_PLANNER_MODEL), completionSignal: COMPLETION_SIGNAL, idleTimeoutSeconds: AGENT_IDLE_TIMEOUT_S, maxIterations: 1,