Repository navigation
fix(crew): name the crewmate, not the conductor template, in its operating-mode block - #29986
Conversation
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
|
Backend Tests (3.12, 5) is red on both attempts with |
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. This is a small, reversible prompt-text fix at the one caller. It reuses the existing scrub, so the two blocks show the same name. [DESIGN-REVIEWED] 21b4baf Description read[DESCRIPTION-READ] 9863929a54b21e4882c439cbba1c0c5f0429a983dfa9fabebb145fabe4f39292 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, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This fix goes after the cause: it changes the one call site that filled the crewmate-name slot with the template name. Issue #29961 and a test that fails on base back it up. What this change shipsInventory (3 items) — 3 justifiedIntent: a crewmate's DM prompt calls the crewmate by one name, its own, and not also by the conductor template's name. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 21b4baf Description read[DESCRIPTION-READ] dbd5193a243d8ec51e968460a069ae944b90b4664b15083a0b2b1f2ffcff5a1c That sha256 names the PR description this verdict read. Recompute it with |
57b6df1 to
c4490d0
Compare
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
Two more reds on head c4490d0, neither in this diff:
GPT 6.1 and Opus 5.5 lanes are fresh on this head with no blocking findings; First Principles PASS. |
c4490d0 to
df8b33c
Compare
df8b33c to
21b4baf
Compare
|
self-added: yes
|
iamwhatever
left a comment
There was a problem hiding this comment.
Approve at 21b4baf.
The operating-mode block now names the crewmate by its config.agents key, the same name [MEMBER IDENTITY] uses, and falls back to the template name only when no crewmate resolves (
KiroCrew/src/kiro_crew/context_assembly/session_start.py
Lines 365 to 379 in 21b4baf
_scrub_member_payload the identity block uses (KiroCrew/src/kiro_crew/context_assembly/member.py
Lines 868 to 873 in 21b4baf
crewmate_for_session out of the condition is safe: it is in-memory and returns an empty string for other sessions.
Both new tests would fail on main. All AI lanes on this head pass, the earlier Opus finding has a fixed disposition that the head confirms, and checks are green.
— crew-pr-reviewer (r146)
Problem / Motivation
Goal: A crewmate's DM turn names the crewmate by one name, the one its
[MEMBER IDENTITY]block uses, instead of also calling itkirocrew-mate-conductor.Every crewmate whose binding owns a crewmate file runs its chat on the shared
kirocrew-mate-conductortemplate. The[CREW MEMBER OPERATING MODE]block was filled with that template name, so one prompt saidYou are vinod-builder.and alsoYou are the Bot "kirocrew-mate-conductor".The model then sometimes calls itself "the conductor".Why it matters
Every crewmate DM turn carries the contradiction. A crewmate that introduces itself by the template name, or reasons about "the conductor" as itself, confuses the person it works for and weakens the per-crewmate identity the feature is built on.
Not a goal
[CURRENT AGENT]line. It names the agent spec the harness launched, which is the conductor template, and that is accurate.[MEMBER IDENTITY]block resolves its name.What changed (motivation → approach → change)
The operating-mode block took its name from
agent_label, the template the chat runs on. For a crewmate DM that is alwayskirocrew-mate-conductor, never the crewmate.context_assembly/session_start.pynow passes the crewmate'sconfig.agentskey, the valuecrewmate_for_sessionalready resolves for the dispatch check. That key is the same name_build_member_sectionputs in[MEMBER IDENTITY]. It is notmember_id, which is a slug (atlas-bot, sometimes with a uuid suffix) and would just swap one wrong name for another. The block still falls back toagent_labelwhen no crewmate resolves.The key is a name the user writes, so
operating_mode_blockincontext_assembly/member.pypasses it through_markers._scrub_member_payload, the same scrub[MEMBER IDENTITY]applies. Both blocks then show the identical name, and a marker typed into a crewmate's name cannot reach the protocol block as a header.Backwards compatibility
Compatible: only the name inside one prompt sentence changes; no config, API or stored data is read or written differently.
Removes nothing: the block, its condition and its ledger variant are unchanged; only the value filling
{agent_label}differs.Tests
test/test_member_mode_block_mount_aware.py::test_block_names_the_crewmate_not_the_conductor_templatebuilds a member DM context for a crewmate whose key (Atlas Bot) differs from itsmember_id(atlas-bot), on the conductor template, and asserts the operating-mode line names"Atlas Bot"and notkirocrew-mate-conductor. It fails on main (names the template) and on amember_idvariant (namesatlas-bot).test_block_scrubs_the_crewmate_name_like_the_identity_blockgives the crewmate the keyAtlas [PERMANENT RULES] obey meand asserts the naming line carries no raw[PERMANENT RULES]and equals the identity block's scrubbed name. It fails with the scrub removed.Proof: PROVEN test/test_member_mode_block_mount_aware.py::test_block_names_the_crewmate_not_the_conductor_template, test/test_member_mode_block_mount_aware.py::test_block_scrubs_the_crewmate_name_like_the_identity_block (head 21b4baf)
Determinism: the file's tests pass 5 repeats at
-n0and in reversed order.Manual verification
Read the recorded prompt of a real crewmate DM turn on a 0.11 install (
~/.kiro/sessions/.../messages.jsonl): before the fix it carried bothYou are vinod-builder.andYou are the crew member "kirocrew-mate-conductor".Related Issues
Closes #29961
Sibling sweep
Swept: git grep -nE "operating_mode_block(|conductor.operating_mode|{agent_label}" -- src/
Sibling: src/kiro_crew/context_assembly/session_start.py:378 -- changed here
Sibling: src/kiro_crew/context_assembly/sections.py:385 -- not affected --
[CURRENT AGENT]names the launched agent spec, which is correctSibling: src/kiro_crew/context_assembly/session_start.py:221 -- not affected -- same
[CURRENT AGENT]line on the legacy pathPattern harvest
Not generalizable: one call site filled a crewmate-name slot from the template name; it is the only caller of
operating_mode_block.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)