Repository navigation
feat(conductor): check each worker's new transcript for drift on every patrol turn - #36302
Conversation
33d62e5 to
b7a7e12
Compare
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the accepted drift-check RFC defines this change, the read is capped by the cursor and Notes
[DESIGN-REVIEWED] 146cf02 Description read[DESCRIPTION-READ] acfa1a46e34efa6bc9fbe796b33166e871f4441407c75117c44d3e13f53e6739 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The accepted base RFC What this change shipsInventory (7 items) — 7 justifiedIntent: a goal conductor notices a worker going the wrong way while it works and steers it back, instead of finding out at acceptance. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 146cf02 Description read[DESCRIPTION-READ] 886aa7f8c9dfea67e1c118cb7e4d5108b9ac2e55489ba281bb45112f0ed760bc That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
b7a7e12 to
84f5927
Compare
Code change approver recommendation: A person should decideWhy: the decider raised 2 possible problems and estimates a 68% chance that this change introduces a defect; a person should check them. This prose change adds a per-turn transcript drift read to every conductor. That reverses the work-ledger RFC's stated design ("replaces the patrol cycle … instead of a per-item transcript read with a stored cursor"). The PR says the RFC that records the new decision (#36360) is on its base, but the file is not in the repo at this head, and the work-ledger RFC is not updated. CONTRIBUTING requires an RFC for a changed default. Separately, the shared short rule and the root charter's round-close text don't tell the conductor to store or write back the cursor, while the skill does. On those paths the cursor is lost at reset. Request changes until the RFC is on the base (or a maintainer overrides) and the charter's cursor handling matches the skill. Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
84f5927 to
3676926
Compare
3676926 to
f143dc4
Compare
|
f143dc4 to
66827ab
Compare
66827ab to
1d4a5c5
Compare
1d4a5c5 to
0c774b5
Compare
0c774b5 to
146cf02
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approve. I read the whole diff on this head. All checks are green.
Within the signed RFC (#36360)
- Text only:
read_message_detailinspec_prompts.py, goal-conductor step 5, thenextfield and "Cost discipline". The rest is the regenerated goldens and spec hashes. - No new tool, route or storage. The drift check uses the existing
session_read_message, withsinceandlimit: 10, so it goes through that tool's own target check and redaction. A correction is asession_sendsteer: truepluswork_ledger_record action=decide. The cursor lives in the conductor's own session ledgernext. - Bounded as signed: at most two reads per open item per patrol turn, so at most 20 rows per item. Patrol turns come only from a report, a flag or the quiet-run floor. A remote item is skipped on a patrol wake.
- Nothing new is refused or returned less, and there is no regex.
Notes, not blockers
- Cursor format in
next. The skill says "its drift cursor (step 5)" but gives no spelling. Different conductors will write it differently, and a later turn has to read it back from free text. One fixed form in the step-1nextlist, for examplecursor=<total>on each item's line, would make the read-back reliable. - The 6-item bound comes from the board, not this text. The 20-rows-per-item cap is in the skill, but the number of items read is "each OPEN local item", which today is limited by
concurrency_cap(6). #36304 (signed) moves that default to 32. Once it is built, a patrol turn could read up to 32 × 20 rows. If the RFC's 6-item ceiling is meant to hold, the skill should say "at most 6 items per turn, oldest first". - The Bot (mate) conductor prompt hashes are unchanged, so the drift check reaches only the Ultra Mode and ledger conductors for now. That is fine if the RFC scopes it that way.
Direction signed by maintainer (bolichen97) as RFC #36360.
Problem / Motivation
Goal: A goal conductor notices a worker heading the wrong way while it works, and steers it, instead of finding out at acceptance.
Owner's ask: "类似的问题,conductor没有办法主动对worker的工作纠错。我们目前其实有N轮一定苏醒,但是苏醒后它应该主动检查下worker的工作,是否偏离方向" (the conductor has no way to correct a worker's work; it already wakes at least every N quiet rounds, and on waking it should check whether each worker has drifted).
Today the goal-conductor skill's patrol step 5 says
session_read_messageis "never as the routine cycle read", and Cost discipline repeats it. So a conductor sees only each worker's ownwork_reportclaims. A worker that builds something its item does not name, or widens scope, looks on track until itsdonefails acceptance.Why it matters
Every off-direction item costs a whole worker run plus a re-plan round. The patrol already wakes (on
blocked/question/done, astale/orphanedflag, and the forced floor turn after a quiet run), so the conductor is awake at the right moments. It just never looks.Not a goal
accept_eval, never from a transcript.stale/orphanedstay the liveness signal.spec_prompts.py(sibling PR).What changed (motivation → approach → change)
Gap → the conductor reads only claims → on every patrol turn, read each open worker's NEW lines from a stored cursor and steer when they drift.
goal-conductor/SKILL.mdPatrol step 5: a "Check each worker for drift" paragraph. Per open item:session_read_messagewithsince= the item's cursor kept in the session ledger'snext,limit: 10; no new rows means skip; more than 10 new rows (orcursor_unavailable) means read the newest 10 withoutsince. Compare against the item'stitle, acceptance and the goal. Off direction:session_sendwithsteer: trueplusaction=decide. On track: silent. The cost is stated as the RFC bounds it: at most two reads per open item per patrol turn (thesinceread, plus the newest 10 only on overflow), so at most 20 rows per item. A remote-dispatched item is skipped on a patrol wake, because reading and steering it need an owner turn (the skill's Remote dispatch section).nextnow carries each item's drift cursor. Cost discipline names the drift read as an allowed use.spec_prompts.pyread_message_detail(shared by the root conductor charter and the crewmate conductor'sconductor.patrol): the same rule in short, including what to do with no stored cursor (nosince, read the newest 10), since the crewmate conductor is not taught the session-ledger cursor store. The crewmate golden fixture follows.Why not a monitor judge.
monitor_start/monitor_updatejudgecan take worker chat keys astargetsand screen their new assistant lines with awake_whenlike "a worker's new lines show it working outside its item". Checked inautonudge_service/gate.pyandjudge_tick.py, it cannot carry this alone:monitor_updateper dispatch.So the rule above is the smaller complete change; the judge is not adopted.
RFC. rfc-conductor-work-ledger.md replaced the transcript-reading patrol for liveness and verdicts, and keeps "
session_sendto ask andsession_read_messageto read the answer… The ledger removes the polling, not the conversation" (§ around line 722). This read is neither liveness nor a verdict, and it is bounded by the cursor. The product-shape decision isdocs/request-for-change/rfc-conductor-drift-check.md(accepted), merged in #36360; this PR is rebased onto it.Backwards compatibility
Compatible: prose only; no tool, schema, field or stored format changes.
Removes nothing: the "never as the routine cycle read" sentence is replaced by a bounded, purpose-limited read; every existing use of
session_read_messagestays allowed.Tests
test/fixtures/crewmate_prompts/ledger.golden.txtupdated to the new shared rule (a reading aid).test/test_agent_refactor_spec_bytes.py: thekirocrew-conductor.jsonandkirocrew-ledger-conductor.jsondigests in all 8 scenarios move to the bytes CI printed for this change (the goldens are CI's bytes and cannot be regenerated locally); no other spec file changed.test/test_agent_refactor_contracts.pypins_CONDUCTOR_SYSTEM_PROMPT's digest; it moves to the new prompt's (2eabb56eb275fc24). The spec-byte goldens were regenerated locally: on the unchanged base the local run matched CI's goldens (8 passed), so its digests are CI's. Every test file that names the conductor prompt, the goal-conductor skill orspec_prompts(111 files) was run locally on this head; all pass except two intest_slack_code_channels_binding.pythat only fail when run in a mixed batch (the file alone: 60 passed). Ran against the worktree'ssrc:test_mate_conductor_parity.py,test_crewmate_prompts.py,test_conductor_agent.py,test_conductor_skills_steer_corrections.py,test_goal_conductor_skill_grants.py,test_needs_human_is_checked.py,test_work_ledger_pending_budget.py,test_mate_conductor_agent.py,test_team_lead_agent.py,test_ledger_conductor_agent.py: 224 passed.Manual verification
N/A — prompt and skill prose; the parity and prompt tests cover the shared-rule assembly.
Related Issues
Closes #36299
Checklist