Repository navigation
feat(chat): bring back Crew Mode as one switch - #22842
bolichen97 wants to merge 3 commits into
Conversation
…de panel
Crew Mode hands a chat to one conductor agent, set by the new config key
agent.crew_mode_agent (default kirocrew-conductor). The Crew Mode chip on a
new chat is the only way in: a normal chat's agent picker and the keyboard
cycle list no conductor, and a conductor chat has no agent picker.
The sessions a Crew Mode chat dispatches stay out of the person's session
lists (sidebar, Sessions page, command palette Recents, Send to session) and
out of their folders, on the server and in the MCP folder tools. They are
listed in the side panel's Workers tab, grouped Needs you / Working /
Waiting / Done from real signals only, and open in the main pane like any
session, with a breadcrumb, Back to conductor and a steer box that types into
the worker as the person.
The root row is a gradient crew card with its workers' ghosts and a summary;
the sidebar filter has a Crew Mode chip. The Workers tab has a List |
Timeline switch: one lane per session drawn from recorded transcript rows
only, with turns, tool calls, waits and hand-off arrows, and what is not
recorded listed instead of drawn. Phones show the list.
New routes: GET /api/chat/slots?crew=roots|all,
GET /api/chat/slots/{slot}/crew-workers,
GET /api/chat/slots/{slot}/crew-timeline and
POST /api/chat/slots/{slot}/crew-workers/{worker}/steer, owner only.
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK Product-shape change without accepted RFC: Crew Mode was retired, and this PR brings it back. It also changes what every person's sidebar, Sessions page, Recents and agent picker show by default. No non-draft RFC on the base covers this. What this change shipsInventory (10 items, more exist) — 7 justifiedIntent: a person finds and runs the conductor through one Crew Mode switch, and its workers stay out of their own lists. ADDITION.
Notes
BlockersProduct-shape change without accepted RFC: Crew Mode reinstated as the default way to reach the conductor, and workers hidden from a person's lists by default — product shape [FIRST-PRINCIPLES-REVIEWED] f2f1458 Description read[DESCRIPTION-READ] 26efda62500ef0c328117a1753d85b894da7560c28d39d1e798d38547e445605 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Evidence is attached, the rows the patch takes away are listed with tests, and the root and worker rule sits in one server module that every reader shares. Notes
[DESIGN-REVIEWED] f2f1458 Description read[DESCRIPTION-READ] b02385b84e93927a3ffca034d1764916c397c89f5d4270e5a64adcc01c128340 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 |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the Crew Mode switch on a new chat and the Crew Mode welcome page. The PR exists to add that switch, and no supplied screenshot shows it, the page or the Task board button. Evidence gaps
Notes
[UX-REVIEWED] f2f1458 Description read[DESCRIPTION-READ] 6cb1277ccc34871999252506a916a7f1e9a9d859869b95f9f65fb8d50fc91cda That sha256 names everything this verdict read: the PR description, plus the 11 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 |
Opus 5.5 Review — 🔴 changes requested (blocking)Reviewed Blocking: when a Crew Mode root closes, its workers stay hidden from every session list. The new BLOCKING — src/kiro_crew/dashboard/state_parts/slots_frame.py:880 [BLOCK-MERGE] f2f1458 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/crew_mode.py:105 -- Changing the configured conductor disconnects existing crews
BLOCKING -- website/src/pages/chat-sidebar/SessionRow.tsx:1646 -- Crew summaries introduce a second stacked status line
BLOCKING -- website/src/pages/chat/command-center/CrewWorkerList.tsx:108 -- Crew error surfaces omit the required hand-off decision
[BLOCK-MERGE] f2f1458 |
Pull request was closed
|
Moved to #22876 after the branch was renamed to feat/crew-mode. |
Problem / Motivation
Goal: A person finds and runs the conductor through one Crew Mode switch, and the sessions it dispatches stay out of their session lists and folders while they can still watch and steer each one.
The conductor is one entry in a long agent list, so most people never find it, and when they do its workers flood the session list and create folders the person did not ask for. There is no place that shows what each worker is doing, and no way to type into a worker without opening it as an unrelated chat.
Why it matters
Crew Mode is the way a person gets a goal split into parallel chats. Without a single, recognisable entry point it goes unused, and with workers mixed into the person's own list the list stops being theirs.
Not a goal
What changed (motivation → approach → change)
Goal: one switch, one conductor, a person's list that stays the person's, and the workers visible where the conductor is.
Approach: Crew Mode is an ordinary agent switch onto one configured conductor, so nothing new runs and memory and history stay. The rule for "which sessions are a Crew Mode root, and which are its workers" lives in one server module and is stamped on every slot row; every list, picker, folder tool and route reads that stamp instead of carrying its own copy. The board-in-chat rule follows the existing in-progress RFC
docs/request-for-change/rfc-conductor-chat-board-on-tab.md(a conductor whose tab shows the board writes no board in the chat). Crew Mode itself, as a product shape, has no RFC on main yet; a maintainer decision is needed for the First Principles lane.What was built:
agent.crew_mode_agent(defaultkirocrew-conductor). The Crew Mode chip on a new chat switches to it. A normal chat's agent picker and the keyboard agent cycle list no conductor; a conductor chat has no agent picker. The name is read from the live config at the point of use, so a custom conductor applies from gateway start.crew_mode.pystampscrew_mode_root/crew_rooton slot rows. The sidebar, the Sessions page, command palette Recents and an artifact's Send to session all read one selector (selectPersonSlots). A Crew Mode root and its workers are never filed into the person's folders: session-control create dropsfolder_idand the MCP folder tools say why.GET /api/chat/slots/{slot}/crew-workers, owner only.POST .../crew-workers/{worker}/steer). It cuts into a running turn or queues for the next one, through the composer's own delivery helpers. The first delivered message reads "From conductor" instead of the raw envelope line. On desktop the panel stays beside the worker; on a phone the sheet closes so the chat shows.GET .../crew-timeline). What is not recorded (for example a tool's end time, tokens) is listed behind an (i) and never drawn. Long stretches are drawn shorter so short bars stay readable; the header keeps the true elapsed time and credits. No playhead under reduced motion, and the view holds still while the person types.Backwards compatibility
Compatible: the new config key defaults to the conductor the chip already used, the new routes are additive, and
GET /api/chat/slotskeeps every row for agents and for?crew=all.The diff takes rows away from some readers. Each one:
Reader:
src/kiro_crew/dashboard/chat_api/slot_detail.py:api_chat_slots-- chat -- a person's read without?crew=allleaves out Crew Mode workers; an agent's read (internal_auth) keeps every row, pinned bytest_an_agents_read_keeps_the_workers_its_tools_resolve.Reader:
website/src/pages/ChatSidebar.tsx,pages/SessionsPage.tsx,components/commandPalette/providers/recentsProvider.ts,components/ArtifactSendToSession.tsx-- crew page -- workers are left out byselectPersonSlots; the Recents Older rows still dedupe against every live row, pinned bypersonSlots.crewWorkers.test.tsx.Reader: the agent picker and the keyboard agent cycle -- chat -- conductors are left out of a normal chat's list (
withoutConductors,agentCycleTarget); crewmates whatever their name stay, pinned by the crewMode tests.Reader:
src/kiro_crew/dashboard/session_control_parts/session_create.py:create_session-- subagent -- dropsfolder_idonly for a Crew Mode root or its workers and answersfolder_ignored: "crew_mode", pinned bytest_session_control_create_filing.py.Tests
test/test_crew_mode_workers.py: the stamp rule, list views, the worker list (groups from real signals, the one-line summary through the board's redactor, closed workers' saved titles), the steer route (owner-only, app tokens denied, scoped to the root's tree, steers or queues as the person, a held steer is persisted and shown), the live-config conductor name, and route registration.test/test_crew_timeline.py: bars from recorded rows only, approval waits, hand-offs paired by target, only the genuine envelope on a row no person typed counts as a hand-off, labels redacted, and a 10,000-row window that is one pass (row reads counted).test/test_session_control_create_filing.py,test/test_crew_mode_board.py,test/test_agent_execution_catalog.py: folder drop, the board line in the dashboard block, the catalog fields.CrewWorkerList,CrewTimeline(including the ticking and reduced-motion cases),crewTimelinescale,crewWorkers,crewSeed/UserMessage,CrewWorkerBreadcrumb(phone), the sidebar crew card, the Sessions page and Recents rule, the panel's Workers offer and + menu, and the phone sheet closing on a worker open.Local gate:
check_black_formatting.py,check_subprocess_encoding.py,isort,flake8,mypy src/kiro_crew, comment-history, brand, line cap, harness parity, i18n check, docs-lint,npm run build, andscripts/local-gate.pyrelated tests on both surfaces.Manual verification
On a local preview gateway with real data: a real conductor split a real goal into three workers. Checked the crew card and filter, no agent picker in the conductor chat, the Workers list and timeline, a worker in the main pane, a real steer landing, the breadcrumb back, the phone layout at 390 px (breadcrumb, 44 px Back target, 16 px steer input, sheet closes on open), light and dark themes, and status-text contrast measured on the rendered pixels (every label at or above 5.9:1). Two independent code-review rounds and two UI-review rounds were run before opening; every finding is fixed except the phone timeline, which is out of scope above.
Screenshots / video
crew-mode-v2-demo.webm
More screens
Related Issues
Restarts the closed #21889.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.