Skip to content

feat(conductor): re-plan one wrong item mid-round on a drift finding - #36618

Merged
bolichen97 merged 1 commit into
mainfrom
feat/conductor-item-replan
Nov 14, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/conductor-item-replan

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When a conductor's drift read shows a work item itself is wrong, it fixes that item in the same patrol turn instead of waiting for the round to end.

The owner asked: "看一看我们是不是做了drfit检查,能够中途换方案" (do we have a drift check that can change the plan midway?). Today the conductor can only steer a worker back toward its item as written, and goal-conductor/SKILL.md says "Re-planning mid-round is not: let the round finish." A worker on an item that is already done on main, mis-scoped, or has a bar that cannot be met keeps spending its run until the round closes.

Why it matters

Both conductors (Ultra Mode and the Bot) waste a whole worker run on an item they already know is wrong.

Not a goal

What changed (motivation → approach → change)

This implements the accepted amendment to docs/request-for-change/rfc-conductor-drift-check.md ("Amendment 2026-11-13", merged in #36507).

  • goal-conductor/SKILL.md, Patrol step 5: one new paragraph. When the lines show the item itself is wrong, the conductor closes it abandoned with the reason in the close call's decision field and creates the replacement, or corrects the bar with action=accept, never weaker than the goal asks. It rewrites the goal text's Plan and Changed lines (the feat(crew): plan before work: a State check and a five-line first report for workers, a goal-text plan for conductors #36540 rule), session_sends the worker, records decide on the item still open, and names each change in its next report.
  • goal-conductor/SKILL.md, Close the round: the "let the round finish" line now allows one-item re-plans mid-round and keeps round-level re-plans at the boundary.
  • spec_prompts.py, shared goal_plan rule: one sentence with the same moves, including decide only on the item still open, so the Bot conductor gets it too. Its crewmate golden fixture moves with it.
  • Spec byte pins move only for kirocrew-conductor.json and kirocrew-ledger-conductor.json, as the RFC's exit criteria say, plus the _CONDUCTOR_SYSTEM_PROMPT shape pin.

Backwards compatibility

Compatible: prompt text only; a conductor on the old text keeps working.

Removes nothing: the "let the round finish" rule is narrowed to round-level re-plans, not dropped.

Tests

Pins updated for the changed prompt: test/test_agent_refactor_spec_bytes.py (two conductor specs in all 8 scenarios), test/test_agent_refactor_contracts.py (prompt shape), test/fixtures/crewmate_prompts/ledger.golden.txt. Locally green: those, test/test_mate_conductor_parity.py, test/test_mate_conductor_agent.py, test/test_crewmate_prompts.py, test/test_skill_budget.py and the goal-conductor skill tests (400 passed).

Manual verification

N/A — prompt text; the parity test and byte pins are the check.

Related Issues

Part of #36299

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners November 13, 2026 12:49
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 13, 2026
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 3f8e4a370cf09171afc6696c0c824711a788bccf touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 3f8e4a370cf09171afc6696c0c824711a788bccf — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. This is prompt text only, and its shape is covered by the accepted amendment ("Amendment 2026-11-13") to rfc-conductor-drift-check.md on the base.

What this change ships

Inventory (4 items) — 4 justified

Intent: when a conductor's drift read shows a worker's item is itself wrong, the conductor fixes that one item in the same patrol turn instead of letting the worker spend its whole run on it. ADDITION.

  1. The Ultra Mode conductor's skill now re-plans one wrong item mid-round. It closes the item abandoned and creates a replacement, or corrects the item's bar so it is never weaker than the goal, then tells the worker and the owner. — justified
  2. The skill's "let the round finish" rule now covers only round-level re-plans; one-item re-plans are allowed mid-round. — justified
  3. The Bot conductor gets the same rule through the shared goal_plan text, and its golden fixture changes with it. — justified
  4. The byte pins move only for the two conductor specs, plus the _CONDUCTOR_SYSTEM_PROMPT shape pin. — justified

[FIRST-PRINCIPLES-REVIEWED] 3f8e4a3

Description read

[DESCRIPTION-READ] 3d660cef4e62804cfdb4916ff3eda339e16e2930fd357cebc3492ea8174adb46

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 3f8e4a370cf09171afc6696c0c824711a788bccf — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this is prompt text only and follows the accepted RFC amendment. The narrowed rule keeps whole-round re-plans at the round boundary, and both conductor surfaces change together.

Notes

  • When an item is closed abandoned, the worker on it is only sent a session_send; nothing says to stop or re-point that worker. If the worker ignores the message, its run is still wasted, which is the harm this PR is meant to remove. Saying explicitly whether to stop the worker or hand it the replacement item would close that gap.

[DESIGN-REVIEWED] 3f8e4a3

Description read

[DESCRIPTION-READ] 147584891bc8ea838300b7107cd6198083ba9bf76517dd85813874de1189ffa3

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 3f8e4a370cf09171afc6696c0c824711a788bccf — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3f8e4a3

Verdict parsed from the review's SHA-scoped output markers for commit 3f8e4a370cf09171afc6696c0c824711a788bccf.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 3f8e4a370cf09171afc6696c0c824711a788bccf false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 3f8e4a370cf09171afc6696c0c824711a788bccf and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3f8e4a3

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 3f8e4a370cf09171afc6696c0c824711a788bccf false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

KiroCrewCaptain commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

This PR changes prompt text only and carries out the accepted RFC amendment (rfc-conductor-drift-check.md, A.1–A.5). I checked each move it names against the ledger code:

  • close with state=abandoned and a decision reason is an existing path (mcp_dashboard_session_runs.py:1317 already makes that call).
  • accept on an open item replaces its bar, adds a decision event and resets pending_since (apply_acceptance_update, work_ledger_writes.py:858). It refuses a closed item with item_closed.
  • A replacement item can be bound to the same session, as step 4 of the skill already describes.
    So the claim that "a closed item refuses decide" matches the code. The "never weaker" bar rule, the report to the owner and keeping round-level re-plans at the round boundary all match A.3. The "let the round finish" rule is narrowed, not dropped, and no other doc or test still states it. The change sits in the shared goal_plan rule, which both the root conductor prompt and the Bot (crewmate) conductor prompt use, so both conductors get it (A.4). The byte pins move only for the two conductor specs, as the exit criteria require. The crewmate golden file and the `_CONDUCTOR_SYSTEM_PROMPT

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 cc989616ce · 59 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 13, 2026
@iamwhatever
iamwhatever force-pushed the feat/conductor-item-replan branch from b367791 to cd1e424 Compare November 13, 2026 14:13
@iamwhatever

iamwhatever commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author
  • Design Review note: shared goal_plan sentence lacks 'decide on the item still open' — fixed in cd1e424

The Bot's shared goal_plan sentence now says to record decide on the item still open (a closed one refuses it), matching the SKILL paragraph. Golden fixture and the two conductor spec pins moved with it.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 13, 2026
@iamwhatever
iamwhatever force-pushed the feat/conductor-item-replan branch 2 times, most recently from a0bcf20 to e12ff22 Compare November 13, 2026 15:16
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 13, 2026
@iamwhatever
iamwhatever force-pushed the feat/conductor-item-replan branch from e12ff22 to 949f9a8 Compare November 13, 2026 15:49
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 13, 2026
@iamwhatever
iamwhatever force-pushed the feat/conductor-item-replan branch from 949f9a8 to 76409b8 Compare November 13, 2026 16:47
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 13, 2026
@iamwhatever
iamwhatever force-pushed the feat/conductor-item-replan branch from 76409b8 to cc98961 Compare November 13, 2026 18:29
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 13, 2026
@iamwhatever
iamwhatever force-pushed the feat/conductor-item-replan branch from cc98961 to 3f8e4a3 Compare November 13, 2026 20:28
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • First Principles note: Bot sentence is in goal_plan, not read_message_detail as RFC A.5 says — kept

read_message_detail is the line #36302 edits; the sentence sits in goal_plan, which both conductors already share and which is already the 'on any finding' rule. That avoids a conflict and keeps parity. The RFC's intent, that the Bot gets the same rule through a shared rule, is met.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Design Review note: nothing says to stop the worker of an abandoned item — rebutted

goal-conductor/SKILL.md Patrol step 4 already covers it: a stuck child ("stale, no progress, item abandoned") is session_stopped first, then closed, and closing the item cuts its worker's report channel. The new paragraph's close with state=abandoned runs through that same step, so the worker does not keep spending its run.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 13, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. I read the whole diff on this head. All checks are green.

This is text only: spec_prompts.py, goal-conductor patrol step 5, and the re-plan paragraph. The rest is regenerated goldens and hashes. There is no new tool, route or storage, no regex, and nothing is refused.

Checked against the two conditions on RFC #36507:

  • A bar may only move toward the goal. Both texts allow action=accept with "a corrected bar never weaker than the goal asks". The other path is close abandoned plus a replacement create, so an item's bar cannot be loosened in place.
  • The owner report stays mandatory. The skill says to "name every closed item and bar change, old and new, in your next report to the owner", and the prompt says to "name each change in your next report".

The scope also stays narrow: one item at a time, only when its own drift lines show it is wrong, and a round-level re-plan still waits for the round to end.

One note, not a blocker: the prompt version drops "old and new". Adding those words there too would keep the two texts saying the same thing.

Direction signed by maintainer (bolichen97) as RFC #36507, with its two conditions.

@bolichen97
bolichen97 merged commit 551bb52 into main Nov 14, 2026
100 of 104 checks passed
@bolichen97
bolichen97 deleted the feat/conductor-item-replan branch November 14, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants