Repository navigation
feat(agent): ship kirocrew-team-lead as one of the default agents that leads and works - #18128
Conversation
3911af4 to
98de4e7
Compare
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: |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The research-agent hold is a rider on a feature PR; it fixes one of three ceiling-filtered installers and leaves two siblings still logging the same failure at debug. Not justified as shipped
What this change shipsInventory (5 items) — 4 justifiedIntent: give operators one default agent that does small items itself and dispatches the rest. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 4b7bf4c Description read[DESCRIPTION-READ] 97f1c6590ba6339ff253d2f9386f46e8aec142da85ec29ef13f8b49a59d11419 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that it's intended for a failed [DESIGN-REVIEWED] 4b7bf4c Description read[DESCRIPTION-READ] e911dba96d3c5c34c1bb4f6c6157aef18ebe915367bcac1ea56635f86034e1bf 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings block the merge; two advisory findings. FINDING — src/kiro_crew/agent.py:4521 — FINDING — src/kiro_crew/agent_files.py:49 — the new comment says the lead "does the focused work on it itself (running a goal as a team is a planned follow-up)". But [OPUS-REVIEWED] 4b7bf4c Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
91968d1 to
65f3efa
Compare
65f3efa to
2fb1c62
Compare
2fb1c62 to
b26cced
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
This shall be a normal customer agent, but not a mate for now. Please confirm this thing first.
|
Addressed the blocking review findings on the previous head in Design / First Principles (the spec can't dispatch). Correct: the spec derives from F1 — a failed rewrite left a stale grant list under a tightened ceiling. The team-lead spec's F2 — first install destroyed a pre-existing file at the newly reserved name. Fixed by moving a pre-existing file whose declared Local gate green on the directly-testing files plus the governance, reset and session-start-gate suites; |
|
Updated in UX / First Principles / Design — the team half was still promised in the skill, the picker description and a comment. Correct. The charter was narrowed last round but three other shipped surfaces still described dispatch:
So no text the spec loads or shows now instructs a tool the spec does not carry. GPT 6.1 F1 — the first-install guard decided ownership by name, which is forgeable. Replaced the name check with the installer-recorded SHA-256 digest in the The earlier F1 (a failed rewrite marking the ceiling held, not synced) and the charter narrowing are unchanged from the previous push. Local gate green on the directly-testing files plus the governance/reset/start-gate suites; |
|
Addressed the remaining red lanes in PR Hygiene — the description was missing the required First Principles — the previous verdict read the earlier body, which still described the first-round
No code behaviour changed in this push — it is the RFC Item-7 doc fix plus the description rewrite; the digest-ownership guard, the narrowed charter/skill/description and the failed-install hold are unchanged from the previous head. Local gate (flake8/isort/mypy/black-gate/docs-lint + the directly-testing and governance/start-gate suites) is green. |
|
Changed approach in The previous head added a digest-ownership guard to protect a pre-existing file at this newly reserved name. That guard drew a deeper set of blocking findings — the digest is never renewed on an authorized model/skills edit, so a later install sees a mismatch and stops rewriting (leaving a tightened ceiling's revoked grants live); the filename-only readers treat a preserved file as managed; forks and a Dropping the guard removes that whole class:
The failed-rewrite ceiling-hold (a failed team-lead write marks the rebuild held so a tightened ceiling is retried, not synced) is unchanged — it is independent of the overwrite question. The narrowed charter/skill/description are unchanged. Local gate green on the directly-testing files plus the governance/reset/start-gate suites; flake8/isort/mypy/black-gate/docs-lint all pass. PR body and RFC rewritten to match. |
|
Updated in The installer overwrites on every boot exactly like GPT F2 (a user-owned file at the newly reserved name must not be destroyed) stays fixed by a one-time migration, not ongoing tracking: on install, if a file at the path is not one this installer wrote — recognised by the GPT F1 is unchanged: a failed team-lead rewrite marks the rebuild held and retries on the next maintenance poll rather than being swallowed, so a tightened ceiling is never recorded as synced over a stale grant list. Tests: a foreign file is preserved as a |
|
Addressed the red lanes and the First Principles findings on Backend Tests shard 4 (Linux + Windows) — real, ours. Narrowing the First Principles Item 4 — the one unfixed sibling. Correct: First Principles title/metadata blocker. The title said "a crewmate that both leads and works" and the body said First Principles Item 1 (premise). This is the one residual point and it is a product-justification call, not a code fix: the agent derives from the default template and adds a charter prompt and the guide-server removal rather than a new tool, so whether that is sufficient justification is a maintainer decision on the RFC, not something to code around. Local gate green: the directly-testing team-lead + skill-index suites, the governance/reprojection/facade/contract suites (703), the full spec-byte/contract set (6408), flake8, isort, mypy, the formatting gate and docs-lint all pass. |
|
/ai-review override first-principles 89ac1e8: the product owner (Mingwei) directed shipping kirocrew-team-lead as a default agent installed like kirocrew-research; rfc-team-lead-default-agent.md in this PR is that decision's record. |
Human judgment recorded@chenmingwei23 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 gpt 05cf623: parity with the existing conductor and worker installers, which mount kirocrew-dashboard / kirocrew-work the same way (conductor_agents._conductor_mcp_servers, worker_agent mcp['kirocrew-work'] = managed_mcp._managed_opt_in_entry) without carrying inherited disabled/disabledTools; changing that contract belongs in its own PR for all three. |
|
/ai-review override fable 05cf623: parity with _install_research_agent and _install_knowledge_agent, which rewrite their reserved spec on every boot; the product owner (Mingwei) ruled no ownership digest or preservation code for this default agent. |
Human judgment recorded@chenmingwei23 marked the gpt 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@chenmingwei23 marked the fable 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. |
|
Re: review 2026-10-10. Confirming the point you asked me to confirm first, on the current head Confirmed: The decision and its rationale are recorded in The only capability added beyond So on this head it is a normal default/customer agent, not a mate. |
A goal handed to a person does not decompose itself. The conductors run a fleet but cannot do an item; the worker does one item but runs nobody. Nothing shipped did both: split a goal into work-ledger items, keep the few small focused ones, dispatch a session for each of the rest, and patrol that fleet. The missing piece is a prompt, not a mechanism. Every verb such a lead needs is already in the default agent's surface, so this ships the way the other default agents ship. _install_team_lead_agent is the _install_research_agent pattern: derive from build_agent_config(), swap in a name, a description and a prompt, drop the platform guide server, write the file. One call in the same install sequence, one filename in OWNED_KIRO_AGENT_FILES, one prompt constant beside _RESEARCH_SYSTEM_PROMPT, and the two agent.py facade entries every moved name carries. Deriving from build_agent_config() is the load-bearing part: that function has already filtered its tool list and its MCP servers against the governance ceiling, so this agent inherits what the ceiling permits and nothing else. It adds no grant, no server and no autoApprove of its own, and a test pins that -- the spec equals the baseline on every key except the three identity fields. The spec is overwritten on every boot, exactly as kirocrew-research and kirocrew-knowledge are. An operator who wants a lead with different rules copies it to a different agent name. That removes a question rather than answering it: an installer that had to detect and respect a hand-edit needs to decide whether the file on disk is its own write, which needs a recorded digest, a place to record it, a three-way install outcome and a start-time gate -- and each of those guards has to cover what the next one assumes. None of it is needed when nothing asks whether the file is ours. The skill carries the lead's procedure plus five team-management rules, each naming the mechanism that decides it rather than asking for judgement: resource_status and its four posture words with the server's own session ceilings, MAX_DEPTH in work_ledger.py as what refuses a third conducting level, close-and-reseed as the merge with session_adopt named as what it is not, a concrete trigger for a tracker worker that reports and never decides, and one owner per shared file with one integrator per output. A posture of unknown is the reading that FAILED and takes the same lighter path as tight, which is the one place a lead would otherwise decide from feel. Tests mirror what kirocrew-research is already held to: the installer's three identity fields, the owned filename, the no-surface-of-its-own property, the overwrite, and one pin per rule on the mechanism's name behind a positive control. The contract suites list this agent the way research is listed, and the spec-byte goldens gain one file entry per scenario plus the audit record this installer adds -- no other agent's digest, the state sidecar and the fork-refresh verdicts are unchanged. Fixes #18049, Fixes #18813
…research rewrite build_agent_config() skips opt_in servers, so the team-lead spec carried no kirocrew-dashboard or kirocrew-work and could not dispatch. Mount both through managed_mcp._managed_opt_in_entry (registry type and KIROCREW_HOME pin), grant the goal conductor's dashboard and ledger tuples through the governance ceiling, and derive the KAS permissions from the filtered list. Restore the dispatch skill and description; shorten the charter to identity, the do-it-yourself rule and pointers to team-lead and goal-conductor. A failed research rewrite now holds the ceiling like team-lead does. Drop the one-time foreign-spec migration: it keyed on the name field of the file it judged and swallowed a failed backup. The spec is overwritten on every boot exactly like kirocrew-research.
Problem / Motivation
Goal: give the product one default agent that owns a goal end to end: it does the small focused items itself and dispatches and patrols a session for every other one.
A conductor spec has no file-writing tool, so under it a one-line fix costs a whole dispatch. A worker does one item and is never handed a goal. Neither can both run a team and do a piece of the work.
Why it matters
An operator handed a goal today must pick between two shapes that both waste the unattended case: under a conductor the one-line fix stalls behind a dispatch, and under a worker there is no way to hand off the pieces the goal splits into. A default agent reaches every operator, because it appears in every agent picker.
Not a goal
kirocrew-conductororkirocrew-worker, their charters or their grants.kirocrew-panelor any dashboard-page verb; the lead is a default agent, not a crewmate.What changed (motivation → approach → change)
One installer, built like
kirocrew-research._install_team_lead_agent()inservice_agents.pyderives frombuild_agent_config(), drops the platform guide server and swaps in name, description and prompt. Its filename joinsOWNED_KIRO_AGENT_FILES, and the twoagent.pyfacade entries are added. It is rewritten on every boot exactly like research, with no ownership check; a customized lead belongs under another agent name.The dispatch servers are mounted, not inherited.
build_agent_config()skips everyopt_inserver, so a derived spec carries nokirocrew-dashboard(session_create,chat_folder_*) and nokirocrew-work(work_ledger_*). Declared intoolswithout anmcpServersentry, kiro-cli mounts nothing._mount_team_lead_dispatchbuilds both entries withmanaged_mcp._managed_opt_in_entry, the call the dashboard-manager and worker installers make. That helper carries the two fields that fail silently:"type": "registry"and theKIROCREW_HOMEpin. The auto-approved verbs are_CONDUCTOR_DASHBOARD_GRANTSand_LEDGER_CONDUCTOR_WORK_GRANTS, and the wholeallowedToolslist goes back through the governance ceiling; the KASpermissionsblock is derived from the filtered list.Charter and skill.
_TEAM_LEAD_SYSTEM_PROMPTis short: identity, the do-it-yourself rule, and pointers to theteam-leadandgoal-conductorskills.builtin_skills/team-lead/SKILL.mdis the delta overgoal-conductor: echo the ask, register the work, the do-it-yourself test, dispatch one level deep, and running the team.A failed rewrite holds the ceiling. Both
kirocrew-team-leadandkirocrew-researchderive frombuild_agent_config(), so a failed rewrite during a ceiling-tightening rebuild marks the rebuild held instead of recording the ceiling as synced; the next maintenance poll retries.Decision record: docs/request-for-change/rfc-team-lead-default-agent.md.
Backwards compatibility
Compatible: nothing main accepts today is rejected, renamed or removed. One agent spec appears under
~/.kiro/agents/and one filename joins the owned-files allowlist.Removes nothing: the change adds an installer, a skill and a hold flag; no key, path, record or function is taken away.
Tests
test/test_team_lead_agent.py:session_createandwork_ledger_recordare reachable: the server is configured, its entry launches the subcommand that serves the tool, the server lists the tool, and the server is declared intools. A positive control shows the probe reports a droppedmcpServersentry as unreachable._managed_opt_in_entry, and with registry mode and a home override forced on, both carrytype: registryand theKIROCREW_HOMEpin.session_createkeeps it offallowedToolswhile it stays mounted.kirocrew-panelis not mounted; the charter points at both skills and copies no line from the conductor charter.Spec-byte and contract baselines are re-pinned for the team-lead file only; no other spec's bytes or the audit sequence changed. Run locally: the files above plus
test_agent_refactor_*,test_agent_execution_catalog.py,test_dashboard_manager_agent.py,test_builtin_skill_*(248 passed).flake8,isort,black,mypy, the comment-history gate,docs_lint.pyandsemgrep --config semgrep/on the changed files are clean.Manual verification
N/A: every claim is about an emitted spec, and each is asserted by materializing the spec into a temp agents directory and reading it back.
Related Issues
Fixes #18049