feat(models): move the implementer to opus/high

Owner-ratified 2026-07-20: authored code is the pipeline's primary
output, so plan execution takes the judgment model — but keeps the
in-loop effort tier (high, not xhigh): the implementer is the
most-dispatched per-task role and volume x wall-clock still governs
its thinking budget. Applies to the frontmatter pin and the three
implement-loop dispatches (impl, impl-fix-spec, impl-fix-qual).

The compiler-driven-edit arm deliberately keeps its implementer
dispatch at sonnet/high: compiler-enumerated propagation is
mechanical, and the arm's policy header pins its own tier.
This commit is contained in:
2026-07-20 14:50:31 +02:00
parent b591e753cd
commit cdbc2d03ae
4 changed files with 35 additions and 19 deletions
+6 -4
View File
@@ -82,7 +82,9 @@
// session-model inherit (which could route to an unintended tier, e.g.
// fable — reserved for the four ratified frontmatter gates, never for
// workflow stages; agent-template § model rule 1). Mechanical and
// in-loop steps run sonnet; the quality gate runs opus by default (last
// in-loop check steps run sonnet; the implementer runs opus/high
// (owner-ratified 2026-07-20: judgment model for code authorship, kept at
// the in-loop effort tier); the quality gate runs opus by default (last
// correctness review before the end-verify), TIERED to sonnet/high for a
// small (<= 25 changed lines), non-contract diff as measured
// independently by the spec-reviewer (issue #30) — the end-verify /
@@ -792,7 +794,7 @@ async function runTask(task) {
'inner-loop discipline — add the failing test inline even if the task text forgot to script it). ' +
'Build and test must be green before you report DONE. Leave all edits UNSTAGED; never commit.\n\n' +
`mode: ${mode}\niter_id: ${iter_id}\n\nTASK ${task.id}${task.title}\n${task.text}`,
{ agentType: 'implementer', model: 'sonnet', effort: 'high', label: `impl:${task.id}`, phase: 'Per-task loop', schema: IMPL_SCHEMA },
{ agentType: 'implementer', model: 'opus', effort: 'high', label: `impl:${task.id}`, phase: 'Per-task loop', schema: IMPL_SCHEMA },
)
if (!impl) return { id: task.id, title: task.title, outcome: 'BLOCKED', reason: 'implementer agent did not return' }
if (impl.status === 'BLOCKED') return { id: task.id, title: task.title, outcome: 'BLOCKED', reason: impl.reason || 'worker-blocked' }
@@ -833,7 +835,7 @@ async function runTask(task) {
`${STANDING}${ANCHOR}\n\nRepair task ${task.id} to satisfy the spec-compliance review. Address EACH finding; ` +
'do not widen scope. Keep build + tests green; leave edits unstaged.\n\n' +
`TASK ${task.id}${task.title}\n${task.text}\n\nFINDINGS:\n- ${(spec?.findings || ['(none reported)']).join('\n- ')}`,
{ agentType: 'implementer', model: 'sonnet', effort: 'high', label: `impl-fix-spec:${task.id}`, phase: 'Per-task loop', schema: IMPL_SCHEMA },
{ agentType: 'implementer', model: 'opus', effort: 'high', label: `impl-fix-spec:${task.id}`, phase: 'Per-task loop', schema: IMPL_SCHEMA },
)
if (specFix && specFix.applied_changes === true) wroteAnyFile = true
}
@@ -951,7 +953,7 @@ async function runTask(task) {
'into a deviation the next review flags.\n\n' +
`TASK ${task.id}${task.title}\n${task.text}\n\nISSUES:\n- ` +
(qual?.issues?.length ? qual.issues.map((i) => `[${i.severity}] ${i.text}`) : ['(none reported)']).join('\n- '),
{ agentType: 'implementer', model: 'sonnet', effort: 'high', label: `impl-fix-qual:${task.id}`, phase: 'Per-task loop', schema: IMPL_SCHEMA },
{ agentType: 'implementer', model: 'opus', effort: 'high', label: `impl-fix-qual:${task.id}`, phase: 'Per-task loop', schema: IMPL_SCHEMA },
)
if (fix && fix.applied_changes === true) wroteAnyFile = true
if (fix && (fix.status === 'BLOCKED' || fix.status === 'NEEDS_CONTEXT')) {