Expand description
The queen’s attention reward: did an escalation spend the engineer’s minutes well?
R(queen) = no_after_escalation − α·rubber_stamp − β·missed_escalationThree stat lines (stats.rs), each logged once, where its event happens:
queen_no(+1): an escalation the engineer answered by changing course: holding the move, making it reversible, keeping the old contract, leaving the other side to its owners, or own words (queen.rsanswer).queen_stamp(−α): an escalation answered “yes, fine”: the option that lets the plan go ahead (Kind::proceeds), or a bare yes.queen_missed(−β): a “no” that came after the work merged, from a session with no escalation: a veto (veto.rsrecord, any of its three ways in) of a session whose work landed (a commit of its own still on HEAD, notes.rslanded_by), or a strong regress link (notes/regress_learn.rs: a later fix of a committed decision) of a deciding session.
Escalations are the questions the queen chooses to raise: the four checkpoint kinds
(Kind::escalates). The other queue kinds are proposals or gates an engineer must answer whatever
the queen thinks (constraints, reach, open decisions), so they earn nothing.
“No escalation” is judged against this node’s queue: the queue is local, and so are the sessions it
names.
The lines roll up into stats.jsonl like every count and sync with it, so of folds the team’s
yield from the buckets; borg-web’s queen view shows it. α = 1 (a wasted answer costs what a useful
one earns) and β = memory.rs VETOED_W (a missed escalation weighs what the veto it missed weighs
in a lesson’s belief); both design-chosen, neither tuned. Nothing reads the reward but monitoring:
the design keeps the queen’s predictor a router, and optimising a proxy of the engineer is the
Goodhart trap it warns about. Preparation: no value metric yet; it is what the value metric of a
learned escalation policy will be read from.
Structs§
- Yield
- The queen’s attention reward over some counts (a bucket’s, or the team’s summed).
Constants§
- MISSED_
W - β: what a missed escalation costs. Derived: memory.rs
VETOED_W, what the missed veto weighs in a lesson’s belief. - STAMP_W
- α: what a rubber stamp costs. Baseline: defines the reward (a wasted answer costs what a useful one earns); design-chosen, not tuned, read by monitoring only.
Functions§
- answered
- Logs the reward of an answer to
e(queen.rsanswer, after it was recorded):queen_noorqueen_stampfor an escalation, nothing for any other kind. Returns the kind logged. - escalated
- Whether the queen escalated anything from
session(answered, open or dismissed alike: it was raised). - merged
- Whether
session’s work merged: it landed a commit of its own that is still on HEAD (notes.rslanded_by, from the hook’s state instate). - missed
- Logs a missed escalation once per
id(a veto episode, a regress link):causevetoorregret, ofsessioninrepo. Nothing when the queen escalated from that session, or for an unknown session. Returns whether it logged. - of
- The yield of
counts(stats.rsBucket::counts). - stamp
- Whether
answerto escalationeis “yes, fine”: it is (or starts with) the option that lets the plan go ahead, or every word of it is a plain yes. - team
- The team’s yield: every bucket of the store (this node’s events and the synced rollups), summed.
- yes
- Whether
answersays only yes: every word of it is a plain yes.