Skip to content

fix(crew): close the two conductor-mode rule gaps - #37617

Merged
bolichen97 merged 1 commit into
mainfrom
fix/crew-conductor-mode-gaps
Nov 15, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/crew-conductor-mode-gaps

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Conductor mode's team lead follows the same two shared rules the other conductors already follow, and a Bot turn that cannot hand work to a worker is no longer told to track its hand-offs.

  • kirocrew-team-lead (conductor mode) reaches the shared conductor rules only through goal-conductor/SKILL.md. Two of them were missing there and listed as known gaps in test/test_mate_conductor_parity.py (CONDUCTOR_MODE_GAPS): dependent_calls (a call that depends on another goes in a later step) and patrol_requested (a requested monitor reply is not a retry cue). The root conductor and the Bot conductor both carry them.
  • docs/system-specs/modules/crew-mode.md says "kirocrew-conductor (conductor mode chats)". Conductor mode runs kirocrew-team-lead.
  • A Bot's thread whose operating-mode block is withheld (the backend cannot mount session_*, or this session withheld the dashboard mount) still got conductor.tracking_ledger: "Every task you hand to a worker ... record each item ... with work_ledger_record". The turn has no worker to hand anything to.

Why it matters

The team lead batches a report with the read that proves it, and retries a requested monitor reply, which the other two conductors are told not to do. A Bot on a backend without dispatch is told to track hand-offs it cannot make.

Not a goal

  • The worker protocol for a Bot's worker (worker.principles, a worker parity test): a sibling PR.
  • The Bot's ask rule (ask_only_when_needed allowlist): the v2 guidance PR feat(prompts): one reroute-first ask policy for every crew kind #37609 covers it.
  • Teaching the ledger to Bots whose spec gates or mutes it (audit cases N1-N6): that reverses decision 2026-11-06 and needs its own decision record first.

What changed (motivation → approach → change)

Gap Change
Team lead misses dependent_calls and patrol_requested goal-conductor/SKILL.md carries both rules (top of "The loop", and the Patrol monitor_start paragraph). The parity test moves both keys from CONDUCTOR_MODE_GAPS to CONDUCTOR_MODE_SKILL_ANCHORS, so the existing anchor test now holds them.
Stale spec text crew-mode.md names kirocrew-conductor as the plain and child conductor, says how the parity test holds kirocrew-team-lead through the skill, and the test table row says the same.
Tracking sentence without dispatch build_member_section picks conductor.tracking_ledger only when the ledger is mounted AND _member_dispatch_held (the same verdict that gates the operating-mode block in session_start) holds. It takes the live session's member_dispatch_mounted as dispatch_mounted; every member-section caller in session_start.py, turn_message.py and the V2 essentials path passes it through. crewmate_prompts.json comments for the two tracking pieces name the new condition.

No RFC: crew-mode.md "The two conductors stay in step" already requires a conductor rule to land on every conductor or carry a reason, and the tracking change is a bug fix (the text named work the turn cannot do).

Backwards compatibility

Compatible: dispatch_mounted is a new optional keyword defaulting to None, which falls back to the configured backend's capability, so every existing caller keeps working.

Removes nothing: the tracking sentence still renders on every turn it rendered on; only its variant changes when the operating-mode block is withheld.

Tests

  • test_a_turn_without_the_dispatch_tools_is_not_told_to_track_its_hand_offs (both halves: session reports no mount; no session evidence and the backend cannot dispatch) gets the plain sentence; a session that holds the mount still gets the ledger sentence. Replacing the new _member_dispatch_held condition with True fails both cases.
  • test_goal_conductor_skill_carries_each_mapped_rule now holds the two new anchors; test_every_conductor_mode_gap_is_still_a_gap runs on an empty gap list.

Proof: PROVEN test/test_mate_conductor_parity.py::test_goal_conductor_skill_carries_each_mapped_rule (head 619362c)

Local: related tests (crewmate prompts, conductor parity, member prompt/essentials/turn context, skill and team-lead specs, spec bytes) passed on the rebased head (556 passed after #37164 and #37618); flake8, black, isort, mypy on touched modules, docs_lint clean.

Manual verification

N/A — unit coverage sufficient: the change is prompt text selection and skill wording, both asserted on rendered text.

Related Issues

Refs the Bot / conductor-mode sync audit (items C1, C4, N7).

Sibling sweep

Swept: git grep -n "binding_has_ledger_tools" -- src/
Sibling: src/kiro_crew/context_assembly/session_start.py -- not affected -- already gates the patrol block on _member_dispatch_held
Sibling: src/kiro_crew/agent_materialization/service_agents.py -- not affected -- install-time skill mapping, no per-turn text

Pattern harvest

Rule candidate: review-prompt
Pattern: prompt text that names tools must be gated by the same predicate that mounts them, not a narrower one

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

Follow-up (not in this diff)

  • Audit C3: Bots whose ledger is gated or muted (N1-N4) get none of the shared conductor rules; part of the pending "every Bot thread tracks in the ledger" decision.
  • dashboard/handlers/memory.py's V2 essentials validator passes no session evidence and uses the configured-capability fallback; it builds a size check, not a turn.

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

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 619362cb09c25391235d81cfb23e8cf9d277afb6 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 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the tracking sentence now uses the same check (_member_dispatch_held) as the operating-mode block, and the two skill rules close gaps the parity test already listed.

Notes

  • dashboard/handlers/memory.py's V2 essentials validator still falls back to checking what the configured backend can do. The follow-up list already names it; it only builds a size check, so leaving it is fine.

[DESIGN-REVIEWED] 619362c

Description read

[DESCRIPTION-READ] b4ca12d8cc5002e4d908e2988339b589346bfe59a17de2ecc090748a5af101bf

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 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 619362cb09c25391235d81cfb23e8cf9d277afb6 — 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. The two skill rules close gaps the base parity test already listed with "Remove it then and add the key above". The tracking gate reuses the existing _member_dispatch_held predicate.

What this change ships

Inventory (5 items) — 5 justified

Intent: the conductor-mode team lead follows the same shared rules as the other conductors, and a Bot turn with no worker dispatch is no longer told to track hand-offs. FIX.

  1. The team lead is now told to put a dependent call in a later step (goal-conductor/SKILL.md, "The loop") — justified
  2. The team lead is now told that a requested monitor reply only confirms receipt and should not be retried — justified
  3. A Bot turn whose operating-mode block is withheld now gets the plain tracking sentence, not the ledger hand-off sentence — justified
  4. A new optional dispatch_mounted argument, passed through all six member-section and essentials call sites — justified
  5. crew-mode.md, the test table row and the crewmate_prompts.json comments now name kirocrew-team-lead and the new condition — justified

[FIRST-PRINCIPLES-REVIEWED] 619362c

Description read

[DESCRIPTION-READ] 40386b20747478e2a870630f581bf5954829bd8cb32240b11a0fffc11d1bafa6

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 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 619362cb09c25391235d81cfb23e8cf9d277afb6 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 619362c

Verdict parsed from the review's SHA-scoped output markers for commit 619362cb09c25391235d81cfb23e8cf9d277afb6.

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

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 619362cb09c25391235d81cfb23e8cf9d277afb6 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 619362c

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

@KiroCrewCaptain

KiroCrewCaptain commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

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

Small, well-scoped fix. goal-conductor/SKILL.md gains the dependent_calls and patrol_requested rules, and the parity test moves them from the known-gap list to the anchor list; the anchors match the new text. build_member_section now picks conductor.tracking_ledger only when the ledger is mounted and _member_dispatch_held holds. That is the same check session_start uses for the operating-mode block, and it is called with the config name. Every turn-building caller in session_start.py and turn_message.py passes the session's member_dispatch_mounted. The default None falls back to the backend's capability (kas by default, which can dispatch), so existing callers and tests keep their behaviour, and the signature-freeze test accepts the new keyword. A new parametrized test covers both no-dispatch cases plus the held case and would fail without the change. No persisted state, limits or trust boundaries change.

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

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@iamwhatever
iamwhatever force-pushed the fix/crew-conductor-mode-gaps branch from 2f48232 to 2f5b8c0 Compare November 15, 2026 14:47
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 15, 2026
@iamwhatever
iamwhatever force-pushed the fix/crew-conductor-mode-gaps branch from 2f5b8c0 to 619362c Compare November 15, 2026 15:58
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 15, 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.

Approving at 619362c. All 97 checks pass, no red, and no one holds auto-merge.

What I read, on the whole diff:

  • Two sentences are added to the goal-conductor skill: dependent calls go in a later step, and a "requested" monitor reply is receipt only, not a cue to retry. Both are prompt text and add no gate, limit or refusal. The two matching parity-test gaps are closed by moving them from the gap list to the anchor list, and the test still fails if an anchor goes missing.
  • The tracking sentence now names the ledger tools only when the operating-mode block is also taught. dispatch_mounted is threaded through the member section builders and the five call sites, and it defaults to None, which keeps the old behavior for any caller that does not pass it. On main the session start already asks _member_dispatch_held the same question for the same block (session_start.py:329), and a known mount answer wins over the configured backend, as that function documents.
  • This changes only which of two prompt sentences a turn gets. It does not refuse or return less to any request. No regex in product code.
  • The new test covers both ways the block is withheld (mounted false with a capable backend, and unknown with an incapable backend) and the held case that keeps the ledger sentence.
  • The doc edits match the code. The prompt-registry notes for the two tracking keys name the new condition.

Non-blocking: in the spec edit, the sentence that follows the new one still starts with "There", which now reads as if it points at the withheld case. Moving the new sentence after that one would read better.

One difference to know, not a problem: this builder passes the crew key from the member's config alias, while session start uses crewmate_for_session. They agree for the config names I traced, and the None fallback only matters when no session evidence reaches the build.

@bolichen97
bolichen97 merged commit fab664c into main Nov 15, 2026
97 of 98 checks passed
@bolichen97
bolichen97 deleted the fix/crew-conductor-mode-gaps branch November 15, 2026 17:12
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants