fix(kilo-subagent): default mode to 'all' to match Kilo CLI docs#1632
Open
sirmacik wants to merge 2 commits into
Open
fix(kilo-subagent): default mode to 'all' to match Kilo CLI docs#1632sirmacik wants to merge 2 commits into
sirmacik wants to merge 2 commits into
Conversation
Kilo CLI's documented default for user-defined agents is `all` (available both as a top-level pick AND as a subagent). See https://kilocode.ai/docs/customize/custom-modes — the `mode` reference states: 'all — Available both as a top-level pick and as a subagent (default for user-defined agents).' Rulesync previously defaulted to `subagent`, which hid every generated agent from Kilo's agent picker. Users had to either set `kilo: { mode: all }` explicitly in every source subagent, or post-process the output with sed. After this PR, omitting `kilo.mode` writes `mode: all` — matching Kilo's own default for user-defined agents. The explicit override still wins, so users wanting subagent-only behavior can opt in with `kilo: { mode: subagent }` in source frontmatter. Tests: - updated default-mode test: expect 'all' instead of 'subagent' - added regression test: explicit kilo.mode=subagent override is preserved This is a behavior change for users who relied on the previous default. Opt-out path is a one-line frontmatter addition.
Self-review surfaced two gaps after the default mode change:
1. Unit-test symmetry: the new regression test covers explicit
kilo.mode='subagent' override, and a pre-existing test covers
kilo.mode='primary', but explicit kilo.mode='all' (which equals
the new default but is a valid explicit value) was not tested.
Add the symmetry test so a future regression in the defaulting
logic that overrides explicit user intent would be caught.
2. E2E mode-preservation: src/e2e/e2e-subagents.spec.ts had a
target-specific test for OpenCode mode preservation (line 109)
but no kilo equivalent. Per AGENTS.md the Tool x Feature matrix
must have E2E coverage. Add two kilo E2E tests:
- default emission: source without kilo.mode -> output has mode: all
- override preservation: source with kilo.mode=subagent -> output
has mode: subagent
These mirror the project's established pattern (dedicated mode
tests for targets that need them; the generic generate matrix
tests basic existence).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kilo CLI's documented default for user-defined agents is
all(available both as a top-level pick AND as a subagent). See https://kilocode.ai/docs/customize/custom-modes — themodereference states:Rulesync previously defaulted to
subagent, which hid every generated agent from Kilo's agent picker. Users had to either setkilo: { mode: all }explicitly in every source subagent, or post-process the output with sed.After this PR, omitting
kilo.modewritesmode: all— matching Kilo's own default for user-defined agents. The explicit override still wins, so users wanting subagent-only behaviour can opt in withkilo: { mode: subagent }in source frontmatter.Changes
src/features/subagents/kilo-subagent.ts: change default from"subagent"→"all"infromRulesyncSubagent. Added an inline comment linking to the Kilo docs reference.src/features/subagents/kilo-subagent.test.ts: updated the existing default-mode test to expectmode: all. Added regression test: explicitkilo: { mode: subagent }override is preserved.Tests
All 10 kilo-subagent tests pass.
pnpm cicheckclean.Risk
Behaviour change for users who relied on the previous default. Opt-out path is a one-line frontmatter addition (
kilo: { mode: subagent }). The new default matches Kilo's own documented default, so most users will see no behaviour change in practice — the generated agents simply become visible in the picker as Kilo's docs already say they should be.