Repository navigation
fix(members): no briefing upkeep for crewmates without file tools - #21430
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Before merge, check one thing: on claude and codex, which ignore a spec's What this change shipsInventory (7 items) — 7 justifiedIntent: stop telling conductor-template crewmates to keep a briefing file they have no tool to write. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] bef4d30 Description read[DESCRIPTION-READ] 0c5cb9bba97549f0daf0dad796490aed9fcff16983e1829652328f997def19b2 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that conductor crewmates lose nothing they need when a fresh session starts: with no briefing upkeep, the DM thread is their only working memory. [DESIGN-REVIEWED] bef4d30 Description read[DESCRIPTION-READ] 30541f31ccc5d2d662c0fb38d6351d7afd3a68cc404ecdf180811504080b1e80 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 |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
ee72f2e to
a8c833c
Compare
|
|
|
Rebased onto main at 02eeb00 and pushed a8c833c with the Design fix (dispositions above). The two reds on ee72f2e were not from this diff: Backend Tests (3.12, 7) timed out in |
|
|
|
PR Hygiene on a8c833c did not run its checks: its 10-minute job timeout cancelled it while Could a maintainer re-run the failed job ( |
Item 6 of the crewmate protocol told every crewmate to keep its briefing "with your file tools", chosen only by a platform check. A crewmate bound to a conductor template mounts no tool that writes files, by design, so it could follow that only by writing the file through the shell or not at all. member_mate_tools gains spec_has_file_write / binding_has_file_write, read from the spec the crewmate runs: true when fs_write (or its write alias), code, "*" or @Builtin is mounted after excludedTools. When it is false, the member section renders a third item 6 that names the gap and sends working memory to the DM thread. Layer 4 keeps reading the briefing, which is now the user's: its header names the file and says it may be out of date, and item 6 says the thread wins where the two disagree and to tell the user when it is stale. No kirocrew-mate tool writes the briefing, so none is named.
a8c833c to
bef4d30
Compare
|
Rebased onto main at 958316e and pushed bef4d30: #22128 conflicted with this PR in That supersedes my PR Hygiene re-run request above: the new head's runs are waiting for approval instead. |
|
|
|
One red on bef4d30 is runner infrastructure, not this diff: "Decide whether the macOS suite runs" hit its 5-minute job timeout while Could a maintainer re-run the failed job ( |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: a crewmate whose template mounts no file-writing tool is no longer told to maintain its briefing file; the new spec_has_file_write predicate picks the wording, with tests for both renderings. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/architecture/context-management.md.
Problem / Motivation
Goal: A crewmate whose template mounts no tool that writes files is told it cannot keep its briefing, instead of being told to keep it with file tools it does not have.
Item 6 of the crewmate protocol (
[HOW YOU WORK],_MEMBER_BRIEFING_ITEMinsrc/kiro_crew/context_assembly/member.py) tells every crewmate to keep its[CURRENT ASSIGNMENT]briefing "with your file tools".build_member_sectionpicks that wording with a platform check only (member_briefing_supported); it never asks what the crewmate's spec mounts. Every conductor template mounts no file-writing tool on purpose (agent_materialization/conductor_agents.py: "no tool that can write a file, notfs_writeand notcode"), and mountsexecute_bashfor named scripts, never auto-approved.Seen on a 0.10.0.1 install with three crewmates bound to
kirocrew-conductor:sponsored-services-captainandcareer-coachkeepmembers/<slug>/briefing.mdthroughexecute_bash(python3,cp): about 80 shell calls between them from 10-13 to 10-16. They ran unprompted only because that host's safety override auto-approves. On a default install each write is an approval prompt.kirocrew-maintainerhas never written one: it has nomembers/kirocrew-maintainer/directory.docs/request-for-change/rfc-crewmate-dashboard-upkeep-skill.md§1 already records that "a crewmate with no file tools cannot write it".Why it matters
Every conductor-template crewmate is given, on every injected turn, an instruction it can follow only by writing a file through the shell, which its template exists to prevent, or not at all. On a default install that shell write waits on an approval prompt, which an unattended patrol cycle cannot answer.
Not a goal
kirocrew-matetool writes it:update_selftakes a name, a description and a face._MEMBER_BRIEFING_ITEM_UNAVAILABLE), which still applies wherever layer 4 is never injected.briefing.mdas "already self-writable".What changed (motivation → approach → change)
A crewmate is told to keep its briefing only when its own spec can write files. The member section asks that spec, and words item 6 and the briefing layer from the answer:
[CURRENT ASSIGNMENT]header<path>"<path>; only the user edits or deletes it, so it may be out of date"; the empty placeholder carries no invitation to write one_MEMBER_BRIEFING_ITEM_UNAVAILABLEA no-write crewmate's briefing is therefore deliberately the user's. One written before this change, as
sponsored-services-captainandcareer-coachdid through the shell, stays injected as it is, marked as possibly out of date. The user updates or clears it by editing or deleting<data home>/members/<slug>/briefing.md(the default data home is~/.kiro/crew); the crewmate's Notes tab shows it read-only.The answer comes from
spec_has_file_write(spec)andbinding_has_file_write(binding), new insrc/kiro_crew/member_mate_tools.pybesidebinding_has_mate_tools. They read the same spec through the same_read_template. A spec writes files when it mountsfs_write(by that name, itswritealias or its KAS idsstr_replaceandfs_append),code,*or@builtin, onceexcludedToolsis subtracted. That is the readingspec_grants_tool_searchuses, with the shared mount, exclusion and alias readings inplatform.tool_names. The writer names follow governance'sfilesystem.writeclass (BUILTIN_TOOL_SCOPES). A row that binds no template is read askirocrew, the spec it runs. A spec that cannot be read keeps today's wording. The shell does not count, and the new text names no tool to write the file with.docs/architecture/context-management.mddescribes the new variant.Backwards compatibility
Compatible: only prompt wording changes, and only for a crewmate whose spec mounts no file-writing tool. Every other crewmate gets byte-identical item 6 and layer 4 text. No API, stored data or file format changes.
Removes nothing: every crewmate still has its briefing read and injected. A crewmate without file tools loses only the instruction to write the file, so one that wrote it through the shell stops doing so and its briefing becomes the user's to edit. No code reads the layer's header (on main,
CURRENT ASSIGNMENTappears only in this builder and the marker scrubber's patterns incontext_assembly/markers.py).Tests
New
test/test_member_briefing_file_tools.py:test_spec_has_file_write_reads_tools_then_exclusions: 22 spec shapes, including*as the whole value,@builtin, KAS ids (str_replaceandfs_appendcount,delete_filedoes not), alias and family exclusions, and shell or read-only tool lists that do not count.test_the_writer_names_follow_governance_and_the_alias_table: the writer set equals governance'sfilesystem.writeclass, and every short spelling inplatform.tool_names.KIRO_TOOL_ALIASEScounts exactly when the tool it names writes (writedoes;shellandreaddo not).test_binding_has_file_write_reads_the_spec_the_member_runs: a reader spec answers False and an editor spec True; a missing spec, a traversal name, a non-string name and an unreadable file keep today's wording.test_a_row_that_binds_no_template_is_read_as_the_default_one: a row with nokiro_agentis read askirocrew, the templatemember_template_idruns for it.test_a_conductor_crewmate_is_told_it_cannot_write_its_briefing: runs the realkirocrew-conductorinstaller over a default spec that mountsfs_writeandcode, binds a crewmate to the result and renders its section: the new item 6, the briefing still read under a header that names the file, says only the user edits or deletes it and that it may be out of date, no "with your file tools", item 7 intact.test_a_briefing_the_member_cannot_write_is_marked_as_possibly_stale: on the conductor template an existing briefing is still injected, and item 6 says it may be out of date, that the thread wins, and that a stale one goes to the user.test_an_empty_briefing_is_not_an_invitation_to_write_one: the empty placeholder on the conductor template.test_a_template_that_mounts_fs_write_keeps_the_upkeep_instruction: a template withfs_writekeeps_MEMBER_HOW_YOU_WORKand theyours to maintain, injected from <path>header byte for byte.test_the_platform_gap_outranks_the_tool_gap: with layer 4 unsupported, the conductor crewmate gets the Windows wording, not the new one.test_the_no_write_item_sends_working_memory_only_to_the_thread: the new item names the DM thread and no shell or mate tool.prove.py --base origin/mainon this head: PROVEN (with the production hunks reverted, an assertion fails). Determinism: the new file is green 20 of 20 runs at-n0, 10 of 10 at-n 4 --dist loadgroup --max-worker-restart=2besidetest_member_mate_tools.pyandtest_member_prompt.py, and in a shuffled order (seed 145).Local gates on this head: black, isort, flake8, mypy, comment-history, agent-SDK boundary, brand, harness parity, feature map, file-line cap, docs-lint, sync-IO, loop-bound locks, testpaths coverage, memory-store seam, the flake-pattern ratchet, semgrep on the diff,
git diff --check. Related backend set fromscripts/run_scoped_tests.py --surface backendon this head: 32,269 passed, 18 failed and 22 errors, and the same 40 node ids fail on a clean origin/main worktree at 999fcd1 on this host. All 40 are intest_acp_spawn_offload.py,test_dashboard_gallery_dispatch_tree.py,test_dashboard_gallery_real_tree.pyandtest_auto_improvement_members.py: this host's pytest temp root sits under the Crew data home, which the essential-source checks refuse as a project resource. The frontend related set was not run: the diff touches no file underwebsite/.Manual verification
spec_has_file_writeover the installed specs: False forkirocrew-conductor,kirocrew-ledger-conductor,kirocrew-pipeline-conductorandkirocrew-security-conductor; True forkirocrewandkirocrew-worker.config.jsonbindscareer-coach,kirocrew-maintainerandsponsored-services-captaintokirocrew-conductor.Not verified: a live crewmate turn on a running gateway showing the new text; the rendering test builds the same section from the real installed conductor spec.
Related Issues
Related: #19240, whose field table lists
briefing.mdas "already self-writable"; for a crewmate on a conductor template it is not. #21404 (open) also editssrc/kiro_crew/member_mate_tools.py; this branch is based on main and adds its two functions apart from that PR's hunks, so either can land first.Pattern harvest
Rule candidate: review-prompt
Pattern: prompt text that tells an agent to use a capability ("with your file tools") is chosen without asking the agent's spec whether it mounts that capability; the review should ask which templates receive the text and whether each one can follow it.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)