Skip to content

feat: show crew display names in select_crew and route_crew - #14926

Merged
buluoray merged 1 commit into
mainfrom
feat/crew-roster-display-name
Sep 29, 2026
Merged

buluoray merged 1 commit into
mainfrom
feat/crew-roster-display-name

Conversation

@buluoray

@buluoray buluoray commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: An agent routing work can map the crew name a user says to the key it must pass to spawn_run(crew=...), even when that label no longer looks like the key.

select_crew and route_crew return only the config key. A user says "hand it to Release Notes", but that crew's key is still launch-notes from before a rename, or a Chinese label sits on a derived key. The agent sees nothing that connects the two, so it guesses from triggers and can dispatch to the wrong crew.

Why it matters

Crew keys are immutable ids while display_name is free to change (#13561, and #14865 keys new crews by id). Every rename widens the gap between what the user says and what the agent sees, and a wrong dispatch runs the task with another crew's memory and template.

Not a goal

  • Resolving a display name passed as crew= on the tool side. The agent still dispatches by key.
  • Changing how crews are keyed or renamed.

What changed (motivation → approach → change)

The routing tools now show the label next to the key. Each select_crew roster entry and each route_crew match or unavailable entry carries display_name when the crew has one that differs from its key, the unknown-crew error lists each key with its label, and the roster guidance tells the agent to dispatch by name. A crew with no label, or a label equal to its key, looks exactly as before. docs/system-specs/modules/crew-mode.md records the field.

Backwards compatibility

Compatible: one optional field is added to two JSON outputs; no existing field changes or disappears.

Tests

test/test_select_crew.py: a renamed crew's roster entry, top route_crew match and unavailable entry carry display_name; a label equal to its key is not repeated; the guidance names display_name. The unknown-crew available list shows launch-notes (Release Notes). All four new tests fail when the field is not written.

Manual verification

N/A — unit coverage sufficient; the change is two JSON shapes that the tests read back.

Related Issues

no linked issue: companion to #14865, which keys new crews by id and keeps the typed name as display_name.

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

@buluoray
buluoray requested a review from a team as a code owner September 29, 2026 04:52
@buluoray
buluoray requested a review from kyleseaman September 29, 2026 04:52
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of f4a1c353c506f49961140e247af84699f828d6c7 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify a display_name colliding with another crew's key can't happen (or is harmless) — two roster entries would then both answer to one spoken name.

[DESIGN-REVIEWED] f4a1c35

Description read

[DESCRIPTION-READ] eb02bf5d16ad1a2c2240a6e43cb55e4efa127e1fee617339127552a0ab5c91a3

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 Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of f4a1c353c506f49961140e247af84699f828d6c7 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f4a1c35

False positive or not applicable? A repository writer can comment:
/ai-review override gpt f4a1c353c506f49961140e247af84699f828d6c7: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of f4a1c353c506f49961140e247af84699f828d6c7 — 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/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (6 items) — 6 justified

Intent: let the routing agent map the label a user says to the immutable key spawn_run(crew=...) needs — an ADDITION.

  1. select_crew roster entries show the crew's label beside its key when they differ — justified
  2. route_crew matches show that label — justified
  3. route_crew unavailable entries show that label — justified
  4. The unknown-crew error lists every key with its differing label — justified
  5. Roster guidance now says the user may use display_name but dispatch passes name — justified
  6. crew-mode.md records the field in the same commit — justified

Evidence: display_name exists on base (config/sections.py:3105, "the name stays the immutable identity") so the label/key divergence is real, not speculative. Grepped display_name across src/kiro_crew (89 files): all other hits are dashboard/channel/app surfaces, none a model-facing crew listing — no existing mechanism does this job, and select_crew/route_crew are the only such listings, so no unfixed siblings. Nothing removed, no default flipped, no pin deleted: not product shape.

[FIRST-PRINCIPLES-REVIEWED] f4a1c35

Description read

[DESCRIPTION-READ] 0fbd3f20cfb73f2839308f1f149e606d783e721788647ef792df7b92990be480

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 Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] f4a1c35

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable f4a1c353c506f49961140e247af84699f828d6c7: <one-sentence reason>

@buluoray
buluoray force-pushed the feat/crew-roster-display-name branch from 9817e8a to d0b1cf1 Compare September 29, 2026 05:01
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 29, 2026
@buluoray

Copy link
Copy Markdown
Contributor Author
  • route_crew dispatch passes the key, not the label -- rebutted

Each route_crew match keys the crew under crew, and its guidance already says "spawn with crew=" (mcp_core.py:2507); display_name is a separate optional field beside it, so the dispatch value stays the key.

@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 Sep 29, 2026
@buluoray
buluoray force-pushed the feat/crew-roster-display-name branch from d0b1cf1 to 75c2e8b Compare September 29, 2026 05:18
@buluoray

Copy link
Copy Markdown
Contributor Author
  • crew-mode.md miscounts its roster rules -- fixed in 75c2e8b

The display_name note describes an entry field, not a rule selecting which crews are listed, so it moved out of the three-rule list into its own paragraph; the "Three rules" count is correct again.

@buluoray
buluoray force-pushed the feat/crew-roster-display-name branch from 75c2e8b to 530e4c4 Compare September 29, 2026 05:27
@buluoray

Copy link
Copy Markdown
Contributor Author
  • route_crew labels matches but not unavailable entries -- fixed in 530e4c4

unavailable entries go through the same _with_display_name helper, so all three crew-naming entries in the two tools carry the label; test_route_crew_unavailable_entries_carry_display_name fails without it.

The user names a crew by the label the dashboard shows, but
spawn_run(crew=...) takes the config key. Both routing tools returned
only the key, so a crew whose label no longer resembles its id (a
renamed crew, or a non-Latin label keyed by a derived id) could not be
matched to the user's words. Each roster entry and route_crew match
now carries display_name when it differs from the key, and the roster
guidance says to dispatch by name.
@buluoray
buluoray force-pushed the feat/crew-roster-display-name branch from 530e4c4 to f4a1c35 Compare September 29, 2026 06:00
@buluoray

Copy link
Copy Markdown
Contributor Author
  • unknown-crew error still returns bare keys -- fixed in f4a1c35

available now lists each key followed by (display_name) when the label differs, so a label passed as crew= maps to its key on the error path; test_unknown_crew_error_lists_labels_beside_keys fails without it.

@buluoray

Copy link
Copy Markdown
Contributor Author
  • unknown-crew available list is keys-only -- fixed in f4a1c35

Same change as the First Principles item: the unknown-crew available string carries each differing label beside its key.

@buluoray

Copy link
Copy Markdown
Contributor Author
  • display_name colliding with another crew's key -- rebutted: harmless for dispatch

spawn_run(crew=...) and a named select_crew resolve only against cfg.agents keys (if crew not in cfg.agents in _do_select_crew), so a spoken name equal to some key always dispatches to that key; a label never becomes an alias. The roster shows both entries side by side, so the model sees the overlap rather than guessing blind. Preventing label/key overlap at write time belongs to crew creation and rename, which this PR does not touch.

@buluoray

Copy link
Copy Markdown
Contributor Author
  • span=dca5f829948a Raw display name exposes credentials to the LLM -- rebutted: not a defect

The only reader of this output is the model, and display_name comes from the agent-readable config.json (sandbox.py:11615), so the model can already read the same string directly; the tool result crosses no new boundary.
The same two outputs already return description (mcp_core.py:2494) and triggers (mcp_core.py:2538) verbatim from the same agent record, so no new field class reaches the model.
_roster_mask (dashboard/handlers/agents.py:4008) guards the browser roster view, a different sink; nothing on the MCP path scrubs any of these fields, and a per-field scrub here would leave its siblings unscrubbed.

@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: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
@buluoray
buluoray enabled auto-merge (squash) September 29, 2026 06:49
@buluoray
buluoray merged commit c4225bc into main Sep 29, 2026
97 checks passed
@buluoray
buluoray deleted the feat/crew-roster-display-name branch September 29, 2026 06:55
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 29, 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.

2 participants