Repository navigation
DO NOT MERGE feat(chat): bring back Crew Mode as one switch - #22876
bolichen97 wants to merge 2 commits into
Conversation
Sensitive change review
|
Sensitive Change ReviewSensitive files changed:
|
First Principles Review (Opus 5.5) — ✅ human override accepted@bolichen97 overrode this lane for |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level blocker: one module decides who is a Crew Mode root or worker and stamps every row, and the readers that lose rows (app-sdk and Mochi self-lookups, MCP tools reading as an agent) still find their own rows. Notes
[DESIGN-REVIEWED] 8f76a04 Description read[DESCRIPTION-READ] 2a39d7551ea75de82ff68f600c5c62eef28558a50b6d31606872a9a0488dd0c1 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) — ✅ human override accepted@bolichen97 overrode this lane for |
Opus 5.5 Review — ✅ no blocking findingsReviewed 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_timeline.py:242 -- Interrupted turns use the narration timestamp as their completion time
BLOCKING -- website/src/components/commandPalette/providers/recentsProvider.ts:265 -- Closed Crew Mode workers reappear in Older Sessions
[BLOCK-MERGE] 8f76a04 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — UPHOLD. Harm is MEDIUM. The Crew timeline draws a wrong "recorded" turn bar on a common path: Stopping a turn while a tool runs after narration was flushed. Confirmed in the code:
The bar is labelled authoritative, so the wrong timing doesn't show itself. The real fix is cheap: stamp an end time into F2 — DOWNGRADE. Harm is LOW. A closed worker's archived transcript shows up as an Older row in the command palette's Recents. Confirmed in the code:
Nothing is lost and the row opens a real archived conversation; a closed session showing under Older is the normal treatment for any closed session. The real fix costs more than that. History rows carry no lineage today: False positive or not applicable? A repository writer can comment: |
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
4b2cff9 to
6d9ec48
Compare
Sensitive change review
|
6d9ec48 to
2034a6c
Compare
Sensitive change review
|
Sensitive change review
|
Sensitive change review
|
|
/ai-review override first-principles e83dd12: Owner decision: Crew Mode returns as one opt-in switch. Conductors leave the normal agent picker and Crew Mode workers leave the person's lists, so the conductor can be swapped later without users noticing. The timeline view is in scope by owner request. Reviewed in two code and two UI rounds; a design doc and RFC follow. |
Human judgment recorded@bolichen97 marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override ux e83dd12: Owner decision: keep the gradient on the Crew Mode card, chip and composer mark so a conductor chat stands out from normal chats. It is scoped to crew-mode.css, every status label passes 4.5:1 contrast in both themes, and the other UX findings are fixed in this head. |
Human judgment recorded@bolichen97 marked the ux AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
…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.
Turning Crew Mode on stamps the conductor on the chat (crew_mode_agent,
persisted), so changing agent.crew_mode_agent swaps it for new chats while a
chat already in Crew Mode keeps its own. Only that agent and its deprecated
alias make a Crew Mode root: the pipeline, security and team-lead conductors
keep their folders and visible workers.
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.
… findings - Only a Crew Mode chat (its family or its stamp) hides the agent picker, shows the Crew Mode label and skips the keyboard agent cycle; another conductor's chat keeps its picker. The stamp is honored in the split pane too. - Crew Mode membership follows the current lineage: an adopted worker belongs to the root that adopted it, and with the lineage settled a released worker stands on its own; the birth stamp fills in only while lineage is unknown. - A timeline hand-off pairs a send named by slot key, transcript stem or a unique title. - A closed root's workers are restated on the removal patch even when a legacy client's push rebuilt the root cache first. - A Crew Mode caller's session_create reply names the Workers panel, never a folder it was not filed in or the sidebar; the server reports crew_mode. - The worker breadcrumb says a failed worker-list read with an error notice. - The Crew Mode welcome tests use their own chat keys, and the slot row key pin lists crew_mode_agent. - Chats created on the Crew Mode conductor are stamped too. - The breadcrumb's root title is text, so its row holds two controls. - Pressed, the Crew Mode chip moves into the composer's Crew Mode mark (a fade under reduced motion). The mark is a read-only status: no pill, no hover or pressed state, not focusable, named "Crew Mode is on for this chat". - Worker cards show no raw ledger id. - A worker the list marks done gets the new-turn steer hint, even with a stale turn flag. - The timeline pairs hand-offs off the event loop.
Sensitive change review
|
e83dd12 to
8f76a04
Compare
|
/ai-review override first-principles 8f76a04: Owner decision: Crew Mode returns as one opt-in switch. Conductors leave the normal agent picker and Crew Mode workers leave the person's lists, so the conductor can be swapped later without users noticing. The timeline view is in scope by owner request. Reviewed in two code and two UI rounds; a design doc and RFC follow. |
|
/ai-review override ux 8f76a04: Owner decision: keep the gradient on the Crew Mode card, chip and composer mark so a conductor chat stands out from normal chats. It is scoped to crew-mode.css, every status label passes 4.5:1 contrast in both themes, and the other UX findings are fixed in this head. |
Human judgment recorded@bolichen97 marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Human judgment recorded@bolichen97 marked the ux AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
|
Closing without merge by owner decision. The work stays on branch feat/crew-mode, which is now pushed to directly. |
Supersedes #22842 (closed when its branch was renamed).
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, and stamps that agent on the chat, so changing the key swaps the conductor for new chats while a chat already in Crew Mode keeps the one it started on. Only that agent (and its deprecated aliaskirocrew-ledger-conductor) makes a chat a Crew Mode root. A normal chat's agent picker and the keyboard agent cycle list no conductor at all; a Crew Mode chat has no agent picker (another conductor's chat keeps its own). 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
A running worker: its steer hint reads "Cuts into its current reply." Dark and light, from this head on a preview gateway:
A done worker: its steer hint reads "Starts a new turn in ." Dark and light:
Timeline header while a worker is still open ("Live"), dark and light:
Timeline header once every worker is done ("Finished"), dark and light:
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.
Crew Mode chip and welcome page
Real UI on a preview gateway, English, real chats. The chip sits right of Choose memory mode on a new chat's welcome state. It reads "Crew Mode: split into tasks" (a phone shows "Crew Mode"), and its tooltip is "Turn on Crew Mode: each task runs in its own chat and reports back here."
Chip on a new chat, dark and light:
Welcome page on an empty chat right after the chip is pressed: hero, slogan, the five-step flow and the Task board button. Dark and light:
Where room is tight (a 390 px tall landscape screen), the slogan hides and Task board is its icon alone, named by aria-label and tooltip. Dark and light:
Busy state ("Available after the reply."): not shown in a screenshot. The chip row only shows on the welcome state, and the welcome state ends the moment this tab sends. So the busy chip only appears when the server reports a run for an empty chat before its first message lands.
CrewModeChiptests pin it (aria-disabled, the hint, no switch on click).