Skip to content

feat(slack): code channels run the default agent; add "Always use conductor mode" - #38240

Merged
kyleseaman merged 1 commit into
mainfrom
feat/code-channel-default-agent-ultra
Nov 17, 2026
Merged

kyleseaman merged 1 commit into
mainfrom
feat/code-channel-default-agent-ultra

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A Slack code channel with no settings touched runs the owner's default agent, and the owner can choose to run every new code channel in conductor mode instead.

A code channel with nothing configured is filed into the auto "Code channels" sidebar folder, which was created with kirocrew-conductor as its default agent. The channel therefore ran the conductor, which only plans and hands off work, and with helper agents off it refused with "This code channel isn't allowed to open helper chats". The owner asked for an option to always use conductor mode, shown where that feature is offered, and otherwise for the default agent rather than the conductor.

Why it matters

Every install that turns Code channels on gets a channel that cannot do the work it was opened for until the owner finds and turns on helper agents. Owners who want a conductor in every channel have no single switch for it.

Not a goal

  • Changing helper-agent dispatch (slack.code_channel_dispatch), its gate or its refusal text. It stays independent of the agent, and the new switch never turns it on.
  • Changing the conductor mode lock after the first message, the Slack kickoff picker or /kirocrew agent.
  • Rewriting any stored sidebar folder.
  • Moving sessions that are already bound to a code channel.

What changed (motivation → approach → change)

Governed by docs/request-for-change/rfc-slack-code-channels.md on main, which already records this decision (#38124); this PR builds it and does not edit the RFC. The decision is in §3 Code channels ("Always use conductor mode", "Resolution order", "The auto folder", and "Work board" for filing helper agents) and in Backward compatibility. It follows two maintainer decisions already on main: 2026-11-14-conductor-mode-graduates-from-feature-previews.md (conductor mode is on in every build but LTS) and 2026-11-15-conductor-mode-runs-on-the-conductor-by-default.md (agent.crew_mode_agent defaults to kirocrew-conductor). Its wording follows 2026-11-13-conductor-mode-keeps-no-ultra-names.md. The RFC index row is re-audited in a docs-only PR once this amendment's PRs are on main.

Default agent (the switch off, the default). The auto "Code channels" folder is now created with no default_agent, so resolution falls through to agent.default_agent (else kirocrew). Existing installs already have that folder with kirocrew-conductor. A folder record keeps no edit history, so the value is the only signal: a top-level folder named "Code channels" that still holds exactly kirocrew-conductor (features.LEGACY_AUTO_FOLDER_AGENT) is read as never edited and counts as no folder agent, however it is reached (by path or by id). That is read-time only; nothing on disk is rewritten. Any other value, or the conductor on any other folder, is the owner's and is kept. Rejected: clearing the value on disk, because a later owner-set conductor would then look the same, and it rewrites user data with no undo.

Always use conductor mode. New slack.code_channel_defaults.conductor_mode, off by default and stored only when on. A two-state rule:

  • On, where conductor mode is offered (features.conductor_mode_offered(), the edition lock the dashboard's crewModeEnabled() reads: every build but LTS): every new code channel runs agent.crew_mode_agent as a template, over the code-channel default agent and any folder agent (agent_source "conductor").
  • Otherwise: code_channel_defaults.agent > the folder's default_agent (legacy rule above) > agent.default_agent > kirocrew, as before.

A missing or malformed value, or the LTS edition, reads as off. The default-agent fallback (agent.default_agent, now the zero-config path) binds as a template, resolved the way a new dashboard chat resolves it (default_template, so a removed spec falls back to the managed default, then dispatch_kiro_agent for the declared name), and the settings preview names the same agent. A Bot keyed by the same name never takes a code channel. The agent.* values a new channel reads (agent.default_agent, agent.crew_mode_agent) come from the live config snapshot, not the gateway's config object, which a reload refreshes only for Slack fields. The session is a conductor mode root by its agent. It does not get the crew_mode_agent stamp a dashboard New chat born on the conductor gets: that stamp moves a root's workers out of folders (crew_mode.slot_in_turned_on_tree), and a code channel files its helpers in the channel's own folder, as conductor code channels do today. Bound sessions keep their agent, and a pick in the kickoff picker or /kirocrew agent still applies, within the existing lock.

Settings. Settings → Channels → Slack → Code channels → defaults card: an Always use conductor mode switch above Default agent, rendered only where conductor mode is offered (useCrewMode(); settings search hides it the same way). Its text says it overrides the default agent and the folder's agent; its info tip names Let code channels start helper agents. While it is on, Default agent is disabled with a one-line note and keeps its stored value; the preview row shows the conductor mode agent with the source "Conductor mode"; and while helper agents are off in the draft, an inline warning under the switch names that setting (display only: it saves nothing). The auto-folder row no longer names the conductor. The PUT accepts only a boolean or null for conductor_mode. While conductor mode decides the agent, the stored default agent is dormant: a folder change does not re-judge it against the new folder's project, and the card hides its stale-agent warnings while the draft has the switch on. The GET still reports agent_missing, so turning the switch off in the draft shows the warning at once, and a save that turns the switch off (alone or with a folder change) re-judges the stored agent, as an explicit agent edit is. That save judges what the runtime will run after it, config.json with config.local.json merged over it, so an agent config.local.json sets never blocks turning the switch off. A plain folder change with the switch off judges the stored agent against the new folder exactly as main does, overlay or not (test_a_folder_only_save_judges_the_stored_agent_as_main_does). When config.local.json sets slack.code_channel_defaults.conductor_mode (or cannot be read), the switch is disabled with a note naming that file, and the PUT refuses a change with 409, as for the helper-agents switch, so a save never reports a change the overlay overrides. An overlay that sets code_channel_defaults to a non-object replaces the whole section in the merge, which the reader takes as all-unset, so it reads as pinning the switch off (disabled, 409 on a change), not as unreadable. While config.local.json cannot be read at all, whether it turns the switch off is unknown, so every reader counts the switch as off, read from the file at the moment of the decision (conductor_overlay_unreadable): the bind, the settings preview, the save and the card. This fails closed, as the helper-agents switch does, whether the loader dropped the file or the live watcher kept an earlier copy. A dangling config.local.json symlink is no file, as the loader reads it, so it locks nothing (test_a_dangling_overlay_symlink_reads_as_no_overlay).

Files:

  • src/kiro_crew/slack/features.py: LEGACY_AUTO_FOLDER_AGENT, conductor_mode on CodeChannelDefaults, conductor_mode_offered, code_channel_conductor_agent, conductor_agent in resolve_code_channel_session.
  • src/kiro_crew/slack/code_channels/binding.py: auto folder created with no agent; the conductor agent passed to the resolver; agent.default_agent bound as a template.
  • src/kiro_crew/dashboard/slack_code_settings.py: GET reports conductor_mode, code_channel_conductor_agent, legacy_agent; PUT validates conductor_mode.
  • src/kiro_crew/config/sections_slack.py, section_builders.py: the config field and its reader.
  • website/src/pages/settings/SlackCodeChannelDefaults.tsx, slackCodeDraft.ts, api/client/messaging.ts, commandPalette/settingsSearchCore.ts: the switch, the disabled picker, the warning and the preview.
  • Locale catalogs (all 12), generated settings registry, ui-index and config-baseline.json.
  • Docs: docs/guides/slack-setup.md and src/kiro_crew/docs/slack-integration.md (including that a dashboard New chat in a legacy auto folder still gets kirocrew-conductor), one row in docs/system-specs/modules/crew-mode.md, and the code-channel sentences in docs/system-specs/modules/slack-gateway.md (binding resolution order, work board) and session-control.md (the second exemption) that assumed the conductor was the default. The RFC is unchanged here (main has the decision from docs(rfc): record the Slack Code channel decisions the next pull requests build on #38124).

No Sensitive Change Review watched path is touched.

Backwards compatibility

Merge order: #38112 (helper agents turn on with a first enable of Code channels) has merged, and this PR is rebased onto it. Both change slack_code_settings.py, the defaults card's draft and payload, and the locale catalogs; the rebase conflicted only in one comment block, where both sides add lines.

Compatible: conductor_mode is a new optional key that reads as off when absent, and every existing default keeps its meaning. The PUT accepts one more key and refuses nothing it accepted before.

The diff takes something away: a zero-config code channel (and one filed into an auto folder that still holds the legacy kirocrew-conductor) no longer runs the conductor, and the GET's code_channel_auto_folder.agent field is replaced by legacy_agent.

Reader: src/kiro_crew/slack/features.py:resolve_code_channel_session -- chat -- the one resolver; test_the_legacy_conductor_on_the_auto_folder_reads_as_unset, test_another_folder_naming_the_conductor_keeps_it
Reader: src/kiro_crew/slack/code_channels/binding.py:resolve_session_spec -- chat -- test_a_fresh_home_resolves_to_the_default_agent_in_code_channels, test_an_existing_legacy_auto_folder_runs_the_default_agent
Reader: src/kiro_crew/dashboard/slack_code_settings.py:code_settings_view -- crew page -- test_unset_folder_reports_the_auto_folder_and_no_folder_agent
Reader: website/src/pages/settings/SlackCodeChannelDefaults.tsx:autoLabel -- crew page -- the only frontend reader of code_channel_auto_folder.agent, moved to legacy_agent; reads the legacy conductor on an existing Code channels folder as no folder agent
Reader: src/kiro_crew/slack/code_channels/agent_picker.py:kickoff_blocks -- chat -- preselects the agent the session runs; test_the_kickoff_carries_a_picker_preselected_with_the_default_agent

A dashboard New chat inside the auto folder still reads the folder's stored default_agent unchanged; only code-channel resolution applies the legacy rule.

Tests

  • test/test_slack_features.py: resolution order (conductor mode over default and folder agent, legacy conductor on the auto folder by path and by id, conductor on another folder kept, nothing configured falls to the default agent); conductor_mode reads on only for a real true; code_channel_conductor_agent runs kirocrew-conductor by default, keeps a configured agent.crew_mode_agent, and is off on LTS, off when unreadable.
  • test/test_slack_code_settings.py: GET defaults include conductor_mode; PUT saves true, clears on false, refuses non-booleans; while it is on, a folder change does not re-judge the dormant default agent, while an explicit agent edit, or turning it off (alone or with a folder change), still is judged; agent_missing is still reported while it is on; a non-object code_channel_defaults overlay pins the switch off; an overlay that sets the switch, or an unreadable overlay, refuses a change with 409 and nothing is staged, while an overlay that sets only helper agents does not; effective agent is conductor when on and the usual order on LTS; on LTS a stored on never makes the default agent dormant (a folder-only change to a project without it is refused, 400); a dangling config.local.json symlink locks nothing; the legacy auto-folder agent is not reported.
  • test/test_slack_code_channels_binding.py: a fresh home creates the folder with no agent and binds the default agent as a template (so a Bot keyed by the same name never takes it); a legacy folder runs the default agent and is not rewritten; conductor mode wins over default and folder agents; inert on LTS; a conductor-born session carries no crew_mode_agent stamp, so its helpers keep the channel's folder; agent.crew_mode_agent and agent.default_agent are read from the live config snapshot; a removed agent.default_agent falls back to the managed default.
  • test/test_slack_code_channels_routing.py, test/test_slack_code_channel_agent_picker.py: zero-config channels and the kickoff picker land on the default agent.
  • website/src/test/SettingsSlackCodePanel.test.tsx: hidden on LTS, and a stored on is inert there; on, it disables the default-agent picker with the note, keeps the stored pick, previews the conductor mode agent and saves conductor_mode: true without touching dispatch; the helpers-off warning shows only while helpers are off and saves nothing; the stale-agent warnings are hidden while it decides the agent; it is disabled with the pinned or unreadable config.local.json note; a saved on reads back and turning it off sends null; the legacy auto-folder agent is not shown.

Per-file coverage of changed src files under the tests that exercise them: slack/features.py 96%, code_channels/binding.py 81%, dashboard/slack_code_settings.py 94%, code_channels/agent_picker.py 88%, config/section_builders.py 85%, config/sections_slack.py 100%.

Manual verification

N/A — unit coverage of the resolver, the binding, the settings API and the settings card covers every branch.

Screenshots / video

Settings → Channels → Slack → Code channels, the code-channel defaults card (built SPA, stubbed API).

Switch off (default): the default agent and folder resolve as before.

Always use conductor mode off

Switch on: Default agent disabled with its note, the stored pick kept; the preview names kirocrew-conductor, source "Conductor mode".

Always use conductor mode on

Switch on with helper agents off: the display-only warning under the switch.

On with helper agents off

Conductor mode not offered: LTS builds don't offer conductor mode anywhere, so the switch is not rendered and Default agent stays usable.

Conductor mode not offered

Set in config.local.json: the switch shows the value in force, disabled, with a note naming the file.

Set in config.local.json

config.local.json can't be read: the switch reads off, disabled, with the error naming the file. The error opens with "Off:", so the position does not depend on colour.

config.local.json unreadable

No Code channels folder yet: the default-folder row and the preview name the one created on first use.

Before the auto folder exists

Review notes on 114318e and how each was handled

  • Design: a dashboard New chat in a legacy auto folder still gets kirocrew-conductor. Said so in slack-setup.md and slack-integration.md.
  • First Principles: _live_agent_config duplicated the inline live.snapshot() or cfg idiom. Deleted; binding.py now uses the idiom (live.snapshot() only reads a module attribute, so there was no failure for the try/except to guard).
  • KiroCrewCaptain: shots 5 and 6 show the two lock states; the overlay-merged agent check now runs only on a save that turns the switch off, so a folder-only save is judged as on main (test above); the merge order with feat(slack): turn helper agents on with a first enable of code channels #38112 is stated under Backwards compatibility; _live_agent_config is inlined (above).
  • UX, evidence gaps: added shots 5 (set in config.local.json) and 6 (config.local.json unreadable).
  • UX, "what conductor mode means": the switch text now says the agent plans the work and hands it to helper agents.
  • UX, "above": the helpers-off warning now names where the switch is ("under Code channels on this page").
  • UX, shot 4: its caption now says LTS builds don't offer conductor mode at all.

UX Review notes on 0960c15 and how each was handled

  • The helpers-off warning's "under Code channels on this page" still left the reader looking: the setting's name in the warning is now a link that scrolls to Let code channels start helper agents and focuses it (test in SettingsSlackCodePanel.test.tsx).
  • No shot before the auto folder exists: added shot 7.
  • Shots 5 and 6 told on from off only by colour: the unreadable error now opens with "Off:" in every locale, as the pinned note already opens with "On"/"Off".

KiroCrewCaptain's optional notes on 0960c15 and how each was handled

  • RFC index row and rfc-slack-code-channels.md:52: not edited here; the RFC index row is re-audited in a docs-only PR once this amendment's PRs are on main.
  • LTS: added test_on_lts_a_stored_on_never_makes_the_default_agent_dormant (a stored on, a folder-only change to a project without the agent: 400, as on main). It passed before any change.
  • Dangling symlink: the conductor-only dangling_unreadable branch is deleted, so all three readers take a dangling config.local.json as no file, as the loader does; test_a_dangling_overlay_symlink_reads_as_no_overlay failed before and passes now. A file that exists but cannot be read still locks the switch off (shot 6).

Related Issues

N/A

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.

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners November 17, 2026 03:29
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 5596950cbf6f29e71133444982a81e11b10e816a — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level blocker: the zero-config default changes only when a stored value is read, and the new switch is opt-in, so both can be undone.

Notes

  • The legacy kirocrew-conductor rule only applies inside resolve_code_channel_session. A dashboard chat started in the existing "Code channels" folder still reads kirocrew-conductor from that folder. So one folder record now gives two answers depending on which path reads it.
  • Treating the exact value kirocrew-conductor as "never edited" means an owner who kept the conductor on purpose silently gets the default agent. The new switch is the only way to get it back, so the upgrade note should say so.

[DESIGN-REVIEWED] 5596950

Description read

[DESCRIPTION-READ] 8ee83a78538954f8d11043edc6bc575067345900c4f2956bb95871e5f887b066

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 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 5596950cbf6f29e71133444982a81e11b10e816a — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: the base RFC (rfc-slack-code-channels.md, status partial) records both the default-agent change and the "Always use conductor mode" switch, and every new field it adds has a consumer.

What this change ships

Inventory (9 items) — 9 justified

Intent: let a Slack code channel with no settings touched do real work on the owner's default agent, and offer one switch that runs every new channel in conductor mode instead. This is an ADDITION, plus a changed default.

  1. A code channel with no settings now runs the owner's default agent, not the conductor — justified
  2. An existing auto "Code channels" folder that still holds kirocrew-conductor counts as having no folder agent (read-time only, nothing rewritten) — justified
  3. New "Always use conductor mode" switch, slack.code_channel_defaults.conductor_mode, off by default, not shown on LTS — justified
  4. While the switch is on, Default agent is disabled, the preview says "Conductor mode", and a warning appears if helper agents are off — justified
  5. If config.local.json sets the switch or cannot be read, the switch is disabled, the save is refused with 409, and the switch counts as off — justified
  6. The default-agent fallback binds as a template the way a new dashboard chat does, so a Bot with the same name never takes the channel — justified
  7. A new code channel reads agent.* from the live config snapshot rather than the gateway's boot values — rides along, declared
  8. Turning the switch off re-checks the stored default agent, with the overlay applied — justified
  9. The auto-folder settings row no longer names the conductor; the GET field agent becomes legacy_agent, read in 2 places in SlackCodeChannelDefaults.tsx — justified

[FIRST-PRINCIPLES-REVIEWED] 5596950

Description read

[DESCRIPTION-READ] fc48a9c4449663c871e7e58146035a471b28e5e0a8b866f1b9795fceca7460e3

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 5596950cbf6f29e71133444982a81e11b10e816a — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The seven screenshots show every new state, and the blind reader read the switch correctly. The remaining confusion is about wording.

Notes

  • In conductor_mode_helpers_off, "under Code channels on this page" points at a section that shares its name with the folder "Code channels (default)". The blind reader asked: "could be either." The link already scrolls to the toggle, so drop that phrase: "…Turn on Let code channels start helper agents."
  • conductor_mode_desc names only kirocrew-conductor. The blind reader "can't tell whether the conductor is an agent like 'reviewer'" and wondered whether helpers cost more. State it in the text: "…starts on the {{agent}} agent, which plans the work and starts helper agents to do it."
  • conductor_mode_hint (the ⓘ tip) repeats the inline helpers-off warning. When helpers are off, both say it, and the tip is the only one that stays hidden. Cut the tip to "Channels already running keep their agent."

[UX-REVIEWED] 5596950

Description read

[DESCRIPTION-READ] 253ce59163a30febbdb8b7a55e73354d9b461945f81577e7e16ad65efda22136

That sha256 names everything this verdict read: the PR description, plus the 10 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 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 5596950cbf6f29e71133444982a81e11b10e816a — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 5596950

Verdict parsed from the review's SHA-scoped output markers for commit 5596950cbf6f29e71133444982a81e11b10e816a.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 5596950cbf6f29e71133444982a81e11b10e816a false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 5596950cbf6f29e71133444982a81e11b10e816a and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 5596950

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 5596950cbf6f29e71133444982a81e11b10e816a false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@KiroCrewCaptain

KiroCrewCaptain commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 12% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 1659 lines, more than the 400 it may approve on its own.

I recommend approving. The PR builds what the RFC on main already decided (rfc-slack-code-channels.md §3: "Always use conductor mode", the resolution order, the auto folder and the legacy kirocrew-conductor reading as unset), and I found no blocking issue.

Resolver (resolve_code_channel_session): the conductor agent takes priority over everything else. Otherwise the order is the code-channel default agent, then the folder's agent (with the legacy conductor on a top-level "Code channels" folder counted as none, only at read time), then agent.default_agent.

Binding:

  • The auto folder is now created with no default agent.
  • The conductor agent and the default agent are read from the live config snapshot.
  • An unreadable config.local.json counts as off (it fails closed).
  • When the conductor is the source, the "saved default agent is gone" fallback is skipped.
  • An empty agent.default_agent still falls through to _default_template_stamp, and refresh_kickoff then shows the real agent, as it already does on main.
  • Binding as a template for the slack/conductor sources matches how default_template treats a plain session.

Settings save:

  • _overlay_read gene

Tier: 2, held for a person: 40 files, more than 20.

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 5596950cbf · 1659 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. The code review found no defects on this head. One item blocks merge: evidence for two new UI states is missing.

  1. website/src/pages/settings/SlackCodeChannelDefaults.tsx:315 and :320. This PR adds two lock states to "Always use conductor mode". Pinned: config.local.json sets the switch, so it is disabled and shows the "set in {{path}}" note. Unreadable: config.local.json cannot be read, so the switch is forced off and an inline error appears. The unreadable state also adds new copy. The UX review on this head says it cannot evaluate these two states. The PR body has four screenshots: off, on, on with helpers off, and the LTS case. Neither lock state is among them, so nobody has seen either one rendered. Smallest fix: add two screenshots of this head's card to the PR body, one pinned and one unreadable, captured the same way as the other four. Then re-run the UX review. No code change is needed.

Optional:

  • src/kiro_crew/dashboard/slack_code_settings.py:579. The overlay-merged agent check also runs on a plain folder-only save. With an overlay agent set, a save that main refuses with 400 now returns 200, and the PR body does not mention this. You could gate that block on a conductor_mode change, or describe the behaviour and add a test for a folder-only save.
  • This PR and #38112 both change slack_code_settings.py and conflict there. Naming the intended merge order in one of the two bodies would help.
  • src/kiro_crew/slack/code_channels/binding.py:112. _live_agent_config wraps the live.snapshot() or cfg read that other modules write inline. You could inline it, or say why the try/except is needed here.

@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 labels Nov 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/code-channel-default-agent-ultra branch from 114318e to 0960c15 Compare November 17, 2026 08:16
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 17, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author

Thanks. All four items are addressed in 0960c15:

  • Lock states: screenshots 5 (pinned by config.local.json, switch disabled with the "set in" note) and 6 (config.local.json unreadable, switch forced off with the inline error) are now in the description, captured from this head.
  • slack_code_settings.py: the config.local.json-merged agent check now runs only on a save that changes conductor_mode, so a folder-only save is judged as on main (400); covered by test_a_folder_only_save_judges_the_stored_agent_as_main_does.
  • Merge order: the description now says feat(slack): turn helper agents on with a first enable of code channels #38112 merges first and this PR rebases onto it.
  • binding.py: _live_agent_config is gone; the read is inline as live.snapshot() or cfg, as elsewhere in slack/ (snapshot() is a plain attribute read, so the try/except guarded nothing).

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here.

To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/). The RFC amendment merged in #38124 records the decision this PR builds. A maintainer will confirm here that it covers this change.

The review found no blocking defect on head 0960c15. What it checked:

  • The resolution order matches the RFC on main.
  • An empty default agent still falls back to the default template.
  • The legacy conductor is read as unset on the auto folder only.
  • The switch fails closed when config.local.json cannot be read, at bind, preview, save and card.
  • Every new filesystem read runs off the event loop.

The five changed backend test files pass at this head. One thing done well: old installs keep working without rewriting any data, and a test pins each case.

Earlier change request, item by item:

  • Missing screenshots of the pinned and unreadable states: fixed. Shots 5 and 6 are in the body, and the UX review on this head covers all six states.
  • Optional, overlay-merged agent check on a folder-only save: fixed. It now runs only on a save that turns the switch off.
  • Optional, merge order with feat(slack): turn helper agents on with a first enable of code channels #38112: fixed. It is stated under Backwards compatibility.
  • Optional, _live_agent_config: fixed. The helper is gone and the code uses the shared idiom inline.

Optional:

  • docs/request-for-change/README.md:86 and rfc-slack-code-channels.md (around line 51) still say this amendment is unbuilt and name features.AUTO_FOLDER_AGENT, which this PR deletes. Update both in this PR, or name a follow-up.
  • No test pins the LTS check on the save's dormant-agent rule (slack_code_settings.py:556). A test could store conductor_mode: true on LTS, PUT a folder-only change to a project that lacks the agent, and expect 400.
  • slack_code_settings.py:98: the dangling_unreadable branch makes a dangling config.local.json symlink lock the conductor switch. The loader and the helper-agents reader both treat that case as no overlay. You could delete the branch so all three readers agree.

@KiroCrewCaptain
KiroCrewCaptain dismissed their stale review November 17, 2026 09:51

Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.

@kyleseaman
kyleseaman enabled auto-merge (squash) November 17, 2026 13:41
iamwhatever
iamwhatever previously approved these changes Nov 17, 2026
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 17, 2026
…ductor mode"

A zero-config code channel filed into the auto "Code channels" folder, which was
created with kirocrew-conductor as its default agent, so the channel ran the
conductor and refused work without helper agents. The auto folder is now created
with no default agent, so the owner's default agent runs. An auto folder still
holding the legacy kirocrew-conductor reads as never edited (read-time only; the
folder is not rewritten). Any other folder agent is kept.

New slack.code_channel_defaults.conductor_mode ("Always use conductor mode"), off
by default, shown and honoured wherever conductor mode is offered (every build
but LTS). When on, every new code channel runs agent.crew_mode_agent in conductor
mode, over the code-channel default agent and the folder's agent; its helpers
stay filed in the channel's folder. The default-agent picker is
disabled with a note while it is on and keeps its stored value, and the card
warns (display only) while helper agents are off. A missing or malformed value
reads as off. Helper dispatch stays independent of the agent.
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision 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 readiness: checking Automated validation is still running labels Nov 17, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author

@iamwhatever this needed a rebase after #38112 merged, since both touch the same settings card, and the push dismissed your approval on 0960c15. The head is now 5596950. Besides the rebase it adds the three non-blocking UX Review notes and KiroCrewCaptain's optional notes 2 and 3. CI is green (88 pass, 0 fail). Could you re-approve?

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

The design is signed off. A maintainer approved the RFC amendment in #38124 and then approved this PR on 0960c15. The rebase push dismissed that approval, so the PR now waits for a maintainer approval on this head.

The review found no blocking defect on head 5596950. What it checked:

  • The resolver order matches RFC §3. The conductor agent wins when the switch is on. The legacy kirocrew-conductor is ignored only on a top-level "Code channels" folder, and only when it is read.
  • An unreadable config.local.json counts as off at bind, preview, save and card. A pinned or unreadable overlay gets a 409 before anything is staged.
  • Every new filesystem read runs off the event loop.
  • In the review, the five changed backend test modules passed at this head (454 tests). 16 of 19 single-line mutations of the new invariant lines made a test fail.

One thing done well: old installs keep working without any stored folder being rewritten, and tests pin both cases: the legacy auto folder, and another folder that names the conductor.

Earlier change request, item by item:

Optional:

  • dashboard/slack_code_settings.py:630: no test covers the overlay folder branch of the check that runs when the switch is turned off. If "folder" in section is removed, all tests still pass. A case with an overlay of {slack: {code_channel_defaults: {folder: ...}}} would pin it, run once with an agent the folder's project lacks (expect 400) and once with an agent it has (expect 200). Another fix is to soften "covers every branch" in Manual verification.
  • slack/features.py:547: an owner who set kirocrew-conductor on the auto folder on purpose now gets the default agent after upgrade. One sentence in Backwards compatibility could say this, and that turning on Always use conductor mode restores it.
  • rfc-slack-code-channels.md (around line 52) and docs/request-for-change/README.md:86 will say this amendment is not built, and they name AUTO_FOLDER_AGENT, which this PR removes. Naming an issue for the docs-only follow-up would keep track of it.

@kyleseaman
kyleseaman merged commit 700d0d9 into main Nov 17, 2026
105 of 109 checks passed
@kyleseaman
kyleseaman deleted the feat/code-channel-default-agent-ultra branch November 17, 2026 18:56
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants