Skip to content

fix(kilo-subagent): default mode to 'all' to match Kilo CLI docs#1632

Open
sirmacik wants to merge 2 commits into
dyoshikawa:mainfrom
sirmacik:fix/kilo-subagent-default-mode
Open

fix(kilo-subagent): default mode to 'all' to match Kilo CLI docs#1632
sirmacik wants to merge 2 commits into
dyoshikawa:mainfrom
sirmacik:fix/kilo-subagent-default-mode

Conversation

@sirmacik
Copy link
Copy Markdown
Contributor

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 — 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 behaviour can opt in with kilo: { mode: subagent } in source frontmatter.

Changes

  • src/features/subagents/kilo-subagent.ts: change default from "subagent""all" in fromRulesyncSubagent. Added an inline comment linking to the Kilo docs reference.
  • src/features/subagents/kilo-subagent.test.ts: updated the existing default-mode test to expect mode: all. Added regression test: explicit kilo: { mode: subagent } override is preserved.

Tests

All 10 kilo-subagent tests pass. pnpm cicheck clean.

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.

sirmacik added 2 commits May 12, 2026 17:07
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).
@sirmacik sirmacik marked this pull request as ready for review May 12, 2026 15:35
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.

1 participant