Repository navigation
fix(crew): say what a worker-kit refusal means and list the real kit - #23565
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The three fixes are aimed at their causes. The preview redesign rides along on a fix whose Goal never asks for it, and nobody is named as having had trouble reading the old list. Notes
What this change shipsInventory (10 items) — 6 justifiedIntent: a mate's owner sees refusals as plain sentences and one consistent worker kit across Built From and the copy preview. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 94989b6 Description read[DESCRIPTION-READ] 007a4173ff7fa07ce98a23af1d8b12dcb5bdeb29f50188f41464cd72894eea57 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The [DESIGN-REVIEWED] 94989b6 Description read[DESCRIPTION-READ] 8ce715f790dc92a5d179e9e935c18e8fffb5922b10feb062b281729170416a0c 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 shipped stale-preview sentence. Shot-07 shows "Preview the copy again.", but the diff ships "Press “{{action}}” again to see the new changes.", so nobody has seen the wording this PR exists to fix. Evidence gaps
Notes
[UX-REVIEWED] 94989b6 Description read[DESCRIPTION-READ] 1a25afb10e6c3bc0c27767d5b720063bc81d73294a5d8a12b8b1f0bdb67d4152 That sha256 names everything this verdict read: the PR description, plus the 15 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 — ✅ 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 — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
c5c9367 to
3045613
Compare
3045613 to
3af3527
Compare
3af3527 to
e1462a5
Compare
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray#ce473fca]: First Principles on
|
The worker-kit routes refuse with a machine code (stale_revision, invalid_spec, ...) that the Advanced pane, the editor's Built from and the roster showed as it was. Each code now reads as a localized sentence, and a stale apply drops the preview it can no longer apply. Built From counted the worker's merged kit but listed only the file's own rows; the capability view now returns the worker's rows, and the summary and the Tools / MCP / Skills lists both read them. A worker-kit preview diffed the kit without the limits a copy sets on servers the worker base declares (a switched-off server, a turned-off tool), because the base's entry wins the merge; those are now listed.
The copy preview listed every row in one mixed list with the change
word in muted grey, so a long re-copy was hard to read. Rows now sit
under one counted heading per kind (instructions, connections, tool
access, skills, auto-approvals, turned off), added before changed
before removed, and each change word is a badge tinted by its hue with
a hue-coloured glyph. The word itself stays in the text colour, since a
plain status hue on its own tint reads under 4.5:1 in kiro-dark.
Under "Turned off" the badge states the effect ("Turns off", "Turns
back on") instead of a green "Added", and a tool selector reads "Can
use every jira tool" so it is not mistaken for an auto-approval.
The refusal sentences say "mate", per the recorded naming decision, and
the two that ask for a fresh preview name the button that makes one.
The roster's hand-off now carries the failed request's report, since
its message is translated, and the card gives the sentence a whole row.
A skill URI in Built From is named only by the pane, with the same
skillLabel the preview uses, so a pattern reads as the folder it covers.
The three section labels the rows no longer show leave the catalogs,
and workerKitErrors gets its own test so every refusal code is covered.
e1462a5 to
94989b6
Compare
Problem / Motivation
Goal: A crewmate's worker-kit screens say in plain words what went wrong, and show the same worker kit everywhere: Built From's counts and lists, and the copy preview.
Three things in the worker-kit surfaces that #23010 added read wrong:
stale_revision,invalid_spec,template_restrictions_uncarriedand the rest appeared verbatim in Advanced > Worker's extra kit, in the editor's Built from, and in the Customize > Crewmates roster cell.Why it matters
Advanced > Worker's extra kit is where an owner changes what a crewmate's worker can do. A raw code tells them nothing about what to do next. A count that disagrees with the list next to it makes the whole summary look unreliable. A preview that leaves out a restriction asks the owner to confirm something they were not shown.
Not a goal
keep_additionsdecides what counts as added since the last copy.What changed (motivation → approach → change)
{"error": code, "code": code}, and the three callers renderederr.message, which is the code.components/crew/workerKitErrors.tsmaps each code the routes send to a catalog sentence that says what to do (preview again, choose another template, fix the file). Any other failure, such as an owner-only refusal or a dropped connection, keeps the text the transport already made readable.WorkerKitPane,builtFromNameandkiroCrewAgentsPageRosterLabelsall go through it. When Apply getsstale_revision, the pane also drops the preview it can no longer apply, so the next step is a fresh preview. The errors still render throughErrorNotice, with the same hand-off settings as before.mate_capabilities.worker_summaryused to return three counts read from the merged worker spec. It now returns the merged spec's rows (worker.rows: tools, auto-approvals, servers without their approval lists, and skills, where askill://resource is named by its folder). For a crewmate that owns its file,CrewEditorNextDialogreads the summary tiles, the three tabs and the auto-approval badges from that one row set. Server rows still go throughsafe_view, so a transport credential is masked here the same way as in the file rows._worker_kitbuilds the preview's before and after fromworker_additions, then passed them through_kit_of, which dropsdisabledToolsanddisabledServers. Those are exactly what a file restricts on a base server, because the base's own entry wins the merge._worker_kitnow keeps both (a per-tool limit only when it is on a base server, since a server the kit adds already shows as a changed connection), and_changeslists them added or removed. The pane shows them as "Turned off", using the existing section label.components/crew/workerKitGroups.tsputs each row under one kind, in a fixed order (Instructions, Connections, Tool access, Skills, Auto-approvals, Turned off), each kind under aPanelSectionHeaderwith its row count and divider, and orders a kind added, then changed, then removed, then by the shown name. Each change word is a badge tinted by its hue (bg-ok-subtle/bg-warn-subtle/bg-danger-subtle) with a hue-coloured glyph (plus, pen, minus). The word itself is painted intext-text: a plain status hue on its own tint reads 3.08:1 in kiro-dark (--okis#008543there), while the glyph only needs the 3:1 non-text floor. The word stays, so colour is never the only cue. The rows no longer repeat the kind, socrewWorkerKit.section_mcp,section_skillandsection_approvalleave every catalog (the dead-keys ratchet counts them). Under "Turned off" a row IS a restriction, so its badge states the effect instead of a change word: "Turns off" (danger tint) when the copy adds the limit, "Turns back on" (ok tint) when it lifts it. A tool selector reads as what the worker can use (toolAccessLabel: "Can use every jira tool"), so a Tool access row never reads like an Auto-approvals row.3045613fd5,3af35278b4ande1462a5ae3.error_stale_revisionanderror_revision_requiredname the button that makes a preview through{{action}}("Press “Copy into the worker” again to see the new changes.");WorkerKitPanepasses the label its preview button shows right now, so a re-copy names "Re-copy from template". The three refusal sentences say "mate", perdocs/decisions/2026-10-15-the-standing-teammate-agent-is-called-a-mate.md. The roster's hand-off is given the failed request's report (reportForError) along with the translated sentence, sincefindReportmatches messages exactly and the chat would otherwise lose the endpoint, status and body; the card's notice takes a whole grid row so the sentence does not wrap one word per line. Askill://row in Built From is no longer labelled**: the server sends skill rows with no label, and the pane names them with the preview's ownworkerKitLabels.skillLabel(a folder by its name, a pattern as "Skills in skills"), so one function names a skill URI.docs/system-specs/modules/crew-mode.mddescribes all four.Backwards compatibility
Compatible: the
workerfield on the capability view changes shape from three counts to{rows}, and its only reader is the editor in this same diff. The preview can now also return two newsectionvalues, and the pane in this diff labels them. No request shape changes.Removes nothing: the counts were replaced by rows that hold the same numbers, and only the editor in this diff reads either.
Tests
test/test_mate_worker_kit.py::test_the_preview_lists_what_a_copy_restricts_on_a_base_server: a template that switches off a base server, or turns off a tool on one, shows as an added row in the preview, and as a removed row once a re-copy drops the limit.test/test_mate_capabilities_worker_summary.py: the rows are the merged worker spec's tools, approvals, servers and skills. Askill://skill is named by its folder, and a server row keeps its switch-off but not its approval list.test/test_mate_capabilities_redaction.py::test_the_workers_server_rows_are_masked_too: no env or header token reaches the browser throughworker.rows.WorkerKitPane.test.tsx:stale_revision,template_restrictions_uncarriedandtemplate_unreadableeach read as a sentence and never show the code. A stale apply drops the preview. An owner-only message passes through unchanged. Restriction rows are named.WorkerKitPane.test.tsx(grouping): headings come out as Instructions, Connections, Auto-approvals with their counts; a kind lists added, changed, removed; each badge carries its tint class and its word, with the hue on the glyph.WorkerKitPane.test.tsx(restrictions): a restriction row's badge reads "Turns off" on the danger tint, a lifted one "Turns back on" on the ok tint.workerKitLabels.test.ts: a tool selector reads "Can use every jira tool" / "Can use read on notes", never the approval wording.KiroCrewAgentsPage.rosterLabels.test.tsx(hand-off): in both views the roster's "Ask the agent" is handed the failed request's report; droppingreport=reddens it in both.test_mate_capabilities_worker_summary.py::test_a_skill_row_carries_no_name_of_its_own: every skill row the server sends has an empty label, so the pane is the only namer.CrewEditorNextDialog.test.tsx(skill URIs): a worker's skill pattern reads "Skills in skills" and a.../release-notes/SKILL.mdrow reads "release-notes".WorkerKitPane.test.tsx(button names): a stale Apply on a re-copy names “Re-copy from template”, the button on screen;workerKitErrors.test.tscovers the default first-copy label.workerKitGroups.test.ts: every section lands in its kind, in the fixed order, empty kinds are left out, and a kind sorts by change then name.workerKitErrors.test.ts: every refusal code reads as its sentence; an unknown code, an inherited property name, a plainErrorand a string keep their message (this also brings the module to 100% per-file coverage).KiroCrewAgentsPage.rosterLabels.test.tsx: a roster cell showsinvalid_specas its sentence, in both card and list views.CrewEditorNextDialog.test.tsx: the summary tiles and the Tools / MCP / Skills lists show the worker's rows, and not the file's.Proof: PROVEN test/test_mate_worker_kit.py::test_the_preview_lists_what_a_copy_restricts_on_a_base_server[entry0-row0], test/test_mate_worker_kit.py::test_the_preview_lists_what_a_copy_restricts_on_a_base_server[entry1-row1] (head 94989b6)
The frontend changes were checked by mutation by hand: pointing the Tools tab back at the file rows fails the dialog test.
Manual verification
On a pod of this branch, with a
release-bottemplate whosekirocrew-coreentry turns offcron_add, everything below was driven by Playwright and captured in the screenshots:release-botwith "Keep what was added" off and previewed. The preview groups the rows and ends with "Turned off 1 · Turns off · cron_add on kirocrew-core". The box scrolls inside the editor; the end shots below are the same preview scrolled to Apply.release-bot(turns offcron_addonkirocrew-core), then previewedrelease-bot-lite, which does not. The preview shows "Turned off 1 · Turns back on · cron_add on kirocrew-core" on the ok tint.builtFromName). It renders only when the capability view reads and the worker-kit read fails. An unreadable file fails the capability read first, so the editor never reaches it, and General then shows the binding id as Built from. That fallback is feat(crew): give each crewmate its own config, a conductor and a worker #23010's and outside this goal; it is reported to the owner as a follow-up.Badge contrast, measured from the pod screenshots (word / glyph against its tint): light Added 7.81 / 8.29, Changed 8.28 / 8.54, Removed 7.88 / 9.40; dark Added 10.50 / 3.08, Changed 9.42 / 6.98, Removed 10.52 / 4.15. Words clear 4.5:1 and glyphs clear 3:1 in both. Other built-in palettes were not measured.
Screenshots / video
The copy preview, before and after, in the light and dark default themes (same template):
The refusal sentences:
A restriction the copy lifts:
Earlier rounds
Related Issues
Follow-up to #23010.
Sibling sweep
Swept:
git grep -n crewWorkerKitApi -- website/src ':!*.test.*'(every caller of the worker-kit routes)Sibling: website/src/components/crew/WorkerKitPane.tsx -- changed here
Sibling: website/src/components/crew/builtFromName.ts -- changed here
Sibling: website/src/pages/kiroCrewAgentsPageRosterLabels.ts -- changed here
Pattern harvest
Rule candidate: review-prompt
Pattern: a route whose
erroris a machine code rendered througherr.messageinstead of a code-to-catalog mapChecklist
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.