Skip to content

docs(rfc): let a bot's worker follow an installed agent live - #31281

Open
leozhad wants to merge 2 commits into
kirodotdev:mainfrom
leozhad:crew/mate/rfc-bot-follows-installed-agent
Open

leozhad wants to merge 2 commits into
kirodotdev:mainfrom
leozhad:crew/mate/rfc-bot-follows-installed-agent

Conversation

@leozhad

@leozhad leozhad commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Propose, for a maintainer's decision, that a Bot's worker can follow one installed agent live and keep the Bot's own directions beside that agent's.

A Bot gets an agent's abilities by copying them once (Add abilities). An agent that an external package manager installs and updates is rewritten in place on each update, so the Bot's copy keeps the old version's script paths and server commands. Adding the agent again does not repair it: the add skips servers the Bot already has, keeps replaced resource paths, carries moved hooks a second time, and replaces the Bot's own directions. A plain chat session on the same agent gets every update at its next start. #31219 asked for this; triage parked it and pointed to the RFC process.

Why it matters

Every update of such an agent is a manual step that leaves a Bot's worker half on the old version. The Bot cannot keep its own directions together with the agent's.

Not a goal

What changed (motivation → approach → change)

A new RFC, docs/request-for-change/rfc-bot-worker-follows-installed-agent.md, status draft:

  • An owner-set base_agent on the Bot's binding, read with the same spec loader a chat session uses at every worker start and layered between the worker base and the Bot's file. Earlier layers win a server's transport, restrictions from every layer join, hooks and permission rules go through the existing exact-or-refuse layering, and the owner's revocations and the governance ceiling run on the merged spec as today.
  • Stacked directions: worker base prompt, then the base agent's current prompt, then the Bot's own slot, which setting a base agent never writes.
  • Fail closed when the base agent cannot be read, and a change notice when its spec changed since the last worker start.
  • It amends rfc-mate-owned-agent-config.md §3, §9 and §9a in its own document, answers §9's three reasons for rejecting a pointer plus overlay, and explains why §9a's lineage machinery is still not needed.
  • It names the part of docs/decisions/2026-11-04-conductors-stay-simple-and-new-abilities-go-to-workers.md it asks a maintainer to change, and keeps the conductor half.
  • Alternatives: copy once and add again, a re-sync job, a replace-mode add, and binding the Bot back to the agent.

The RFC index in docs/request-for-change/README.md gains its row and audit sentence.

Backwards compatibility

Compatible: documentation only.

Removes nothing: it adds a document and an index row.

Tests

N/A — documentation only.

Proof: not provable -- docs or config only

Manual verification

N/A — scripts/docs-lint.sh, the brand check and the decision and changelog history checks pass.

Related Issues

Part of #31219

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@leozhad
leozhad requested review from a team and KiroCrewCaptain as code owners November 6, 2026 08:29
@leozhad
leozhad requested a review from Zedmor November 6, 2026 08:29
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 6, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 39fb265 to 3d5b5f3 Compare November 6, 2026 20:55
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 6, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 3d5b5f3 to 39e87c5 Compare November 7, 2026 20:53
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 7, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 39e87c5 to a110e79 Compare November 8, 2026 15:27
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 8, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from a110e79 to a283903 Compare November 8, 2026 20:04
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 8, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from a283903 to 088bfe1 Compare November 8, 2026 23:55
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 9, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 088bfe1 to e9bf8c6 Compare November 9, 2026 03:12
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 9, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from e9bf8c6 to 2b1068a Compare November 9, 2026 05:17
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 9, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 2b1068a to 6fffcf1 Compare November 9, 2026 13:26
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 9, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 6fffcf1 to 730b66e Compare November 9, 2026 18:32
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 10, 2026
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 730b66e to 03ad6d7 Compare November 10, 2026 19:20
@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision e17bac9f0780d8a3772a53327b12297e0cb41b8c touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ⏭️ skipped

Revision e17bac9f0780d8a3772a53327b12297e0cb41b8c ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of e17bac9f0780d8a3772a53327b12297e0cb41b8c via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the PR adds only an RFC and its index row. It changes no code and takes nothing away.

Notes

  • §10 says the setting is "Out of the Bot's reach" because it lives in the read-only config.json (sandbox_leaves.py:517 confirms that leaf). But a worker that can write ~/.kiro/agents/<base>.json could plant a hook or an allow rule, and that change would reach its next worker start without a preview. The RFC should say whether that file is writable inside the worker's sandbox, or name the change notice as the only defence against it.

[DESIGN-REVIEWED] e17bac9

Description read

[DESCRIPTION-READ] 888644a446004a18207a68cf7f432c1978b28e40e1cd4d69f93a78e996338f81

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed e17bac9f0780d8a3772a53327b12297e0cb41b8c via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e17bac9

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed e17bac9f0780d8a3772a53327b12297e0cb41b8c via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] e17bac9

@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from 03ad6d7 to e17bac9 Compare November 10, 2026 23:42
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 10, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own.

This PR changes only docs. It adds a draft RFC, plus its index row and audit sentence, proposing an owner-set base_agent on a Bot's binding. The base agent would be read again at every worker start and layered between the worker base and the Bot's file. I checked the RFC's claims about main against the code, and they hold:

  • resolve_worker_spec, worker_additions and merge_worker_spec work as described. A base server wins a server name through setdefault. Restrictions join across layers. layer_policy either carries a field exactly or refuses the worker. The governance ceiling is applied to the merged spec.
  • The "already present: leave it" skip is real (mate_worker_kit._plan, line 451).
  • _MAX_SPEC_HOOKS is 20.
  • WorkerKitUnreadable is the existing fail-closed refusal.
  • The crew-members.md quote and both quotes from the 2026-11-04 decision record are accurate.

The RFC keeps the conductor half of that decision. It amends the accepted RFC in its own document instead of editing it, and it leaves acceptance and any superseding decision entry to a maintainer. The status stays draft, so merging it decides nothing.

One trust claim is overstated: that config.json is

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit e17bac9f07 · 264 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention labels Nov 10, 2026
Propose an owner-set base agent for a Bot: the worker reads that
installed agent's current spec at every start and layers it between the
worker base and the Bot's own file, so an update or reinstall reaches
the Bot with no manual step. Behaviour directions stack: the base
agent's current prompt, then the Bot's own text, with no stale copy.
The conductor, memory store, workspace and governance ceiling are
unchanged, and an unreadable base agent refuses the worker.

The document amends sections 3, 9 and 9a of rfc-mate-owned-agent-config
in its own text, weighs copy-once, a re-sync job and a replace-mode add
against the live layer, and asks a maintainer to decide on the part of
the 2026-11-04 decision it would change. It changes no code.
Open question 1 asks whether an update that adds a hook, an allow
rule or a server lands on its own or waits for the owner's card. Keep
it open for maintainers and record the author's answer: it lands at
the next worker start, as a plain chat session on that agent picks it
up today, under the governance ceiling and the owner's revoked
approvals.
@leozhad
leozhad force-pushed the crew/mate/rfc-bot-follows-installed-agent branch from e17bac9 to dd5b116 Compare December 5, 2026 20:49
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants