Expand description
What a finished step actually did — the deterministic half of step
appraisal (docs/GOAL-SYSTEM-DESIGN.md §5.5).
A step is marked done by the agent, and nothing checked it. The
symmetry with the tier above is the whole argument: a board task is
closed by the owner (TASK-AGENT-DESIGN.md D6), so a person is the check;
a todo step is closed by the model, so there is no person and the check
has to be structural. D5’s rule — state is derived from the record, never
self-reported — reaches one tier further down than it was written for.
Pure, and unit-tested rather than trialled, for compact.rs’s reason:
getting it wrong is silent. A finding that fires on honest work is a line
the model learns to skip, which is how a check that protects nothing
survives; a finding that never fires is indistinguishable from a plan that
always lands.
Two readings only, and the omissions are deliberate. §5.5’s table lists five signals; the two here — no calls at all and the last call did not succeed — are facts about the span. The other three (a span far longer than its siblings, a verify-shaped call that passed, the same target read repeatedly) are comparisons, and each needs either a threshold nobody has measured here or a guess about what a tool call meant. A threshold that cries wolf is doctor’s named failure, and the escalation to a model that would settle the ambiguous cases is rung 7’s, not this one’s. The same-target reading is boredom’s (§9.1) and belongs one mechanism over.
What this module does not do is act. The finding is rendered onto the
todo result and the plan action — accept, revise the step, revise the
plan, escalate — is the model’s, because the plan is the model’s. The
harness has no way to author a decomposition and no business having one.
Structs§
- Span
- What happened between a step starting and the model calling it done.
- Step
Escalation - What the quarantined escalation call is handed. See the module note above on why the step’s own text is safe to include here in a way an appraiser’s evidence (§5.1) could not be.
- Work
- The run’s work so far, as of one tool call.
Enums§
- Escalation
Reason - Which comparison flagged a landed step for a second opinion.
- Finding
- What the span says about the step.
- Outcome
- How one executed call ended, as far as the run’s own record knows.
- Step
Verdict - What the escalation decided: nothing further, or a plan-revision nudge is worth surfacing.
Constants§
- STEP_
ESCALATION_ STEM - Marks a folded nudge as the harness’s own words, on
boredom::NOTICE_STEM’s exact precedent:agent::is_harness_voiceis a closed list the learning miner filters every tool-result message’s text through before deciding whether it is a user’sSteer/Followupintervention. Without an entry here,templated_nudge’s output — folded into the very messageescalation_candidatealso carries tool results in — would be mined as if a person had typed it,escalation.stepand all, and could ride into a future prompt as aClean-origin learned rule derived from nobody’s words.
Functions§
- appraise
- The deterministic reading. No model, no threshold, no tuned constant.
- escalation_
candidate - The escalation’s own pre-filter: cheap, deterministic, and it only ever decides whether to ask, never the answer.
- escalation_
prompt - The prompt the quarantined pass runs. Reasoning first, the typed field last — the front door’s and the appraiser’s own finding: constrained output degrades reasoning when the answer precedes the thinking.
- next_
run - A fresh run identity. Monotonic within the process, meaningless outside it.
- parse_
step_ verdict - Parse what the escalation returned.
- templated_
nudge - The nudge folded into the run when the escalation says
revise_plan.