feat(agents): pin explicit reasoning effort on every agent and workflow call

Effort joins model as a mandatory pin: an omitted field inherits the
session effort, coupling every dispatch's thinking budget to whatever
the user happens to be chatting at (often xhigh) — the same
session-state coupling the model pin removes. The assignment follows
the model split:

- xhigh on every opus agent (judgement roles are the pipeline's
  quality floor and must not degrade with the session);
- high on every sonnet agent (tightly-scoped plan execution gains
  little from xhigh but pays its latency per dispatch, and these are
  the per-task in-loop roles — wall-clock is the efficiency metric;
  not lower than high, since re-loops cost more than saved thinking);
- medium inline in the workflow scripts for schema-bound
  extraction/verification stages that author no code (preflight,
  plan-extract, mini-verify, tree-check, finalize, build/suite
  verify).

Workflow agent() calls pass effort explicitly on every call — whether
frontmatter effort propagates through an agentType dispatch is
undocumented, so the scripts do not rely on it. Policy documented in
docs/agent-template.md § effort, mirroring § model.
This commit is contained in:
2026-07-02 15:43:36 +02:00
parent 52c87d19ce
commit edbbb68f97
18 changed files with 65 additions and 13 deletions
+29
View File
@@ -13,6 +13,7 @@ name: <agent-slug>
description: <third-person, "Use when…" or role description>
tools: <comma-separated tool list>
model: <opus | sonnet>
effort: <xhigh | high>
---
> Violating the letter of these rules is violating the spirit.
@@ -137,6 +138,34 @@ The same rule binds Workflow scripts: every `agent()` call passes an
explicit `model:` option (see the model-policy header comments in
`implement/workflows/*.js`).
### `effort`
Mandatory. Every agent pins an explicit reasoning effort — one of the
harness levels `low | medium | high | xhigh | max`, of which the plugin
uses two. An omitted field means the agent inherits the *session*
effort, coupling every dispatch's thinking budget to whatever the user
happens to be chatting at — the same session-state coupling the `model`
pin exists to remove. Effort follows the model split:
- **`xhigh` on every `opus` agent.** The judgement roles are the
pipeline's quality floor; their thinking budget must not silently
degrade because the session runs lower.
- **`high` on every `sonnet` agent.** Tightly-scoped execution of a
pre-made plan gains little from `xhigh` but pays its latency on
every dispatch — and these are exactly the roles dispatched
per-task inside loops (wall-clock is the pipeline's efficiency
metric). Not lower than `high`: a sloppy in-loop step triggers
re-loops that cost more wall-clock than the saved thinking.
Workflow scripts pin a third tier inline: schema-bound
extraction/verification stages that author no code (preflight,
plan-extract, mini-verify, tree-check, finalize, build/suite verify)
run `medium` via the `agent()` call's `effort:` option. As with
`model:`, every `agent()` call passes `effort:` explicitly — whether
frontmatter effort propagates through an `agentType` dispatch is
undocumented, so the scripts do not rely on it (see the policy header
comments in `implement/workflows/*.js`).
## Sections in detail
### Spirit-letter lead-in