feat(implement-loop): tier the quality review by independently-measured diff size
qual+repairs are the pipeline's largest cost pool (51M of 164.5M real tokens, 31%, in the 206-run corpus), with opus weighing ~5x on the quota side. The opus pin's own rationale (consequence-of-a-miss, agent-template § model) scales with diff size — so the tier now does too: the spec-reviewer, which runs before quality, reads the diff itself and is independent of the implementer, reports diff_magnitude (git diff HEAD --shortstat) and touches_contract; <=25 changed lines and no contract-referenced path -> sonnet/high, anything larger, contract-touching, or unmeasured -> opus/xhigh (fail conservative). The independent end-verify/mini-verify suite gate is the deterministic backstop that makes the lower tier defensible; the chosen tier is logged per task (qual_tier) in the end-report. Sampling phase per the issue's acceptance: the first ~10 real small-diff iterations get a one-off opus second review; important+ divergences are recorded on the issue before the threshold counts as proven. closes #30
This commit is contained in:
@@ -19,6 +19,14 @@ has reported `compliant`, never before.
|
||||
only after the spec-compliance phase reports `compliant` —
|
||||
a separate `agent()` call with a fresh context.)
|
||||
|
||||
The frontmatter pins opus/xhigh as this role's default tier;
|
||||
the workflow overrides it per dispatch (issue #30): a small
|
||||
(≤25 changed lines), non-contract diff — as measured
|
||||
independently by the spec-reviewer, never by the implementer —
|
||||
runs at sonnet/high, with the loop's independent end-verify
|
||||
suite gate as the deterministic correctness backstop. The
|
||||
review bar and this file's rules are identical at both tiers.
|
||||
|
||||
## What this role is for
|
||||
|
||||
Spec compliance answers "did the implementer build the right
|
||||
|
||||
Reference in New Issue
Block a user