Skip to content

Follow up Kilo Code upstream updates: mode-specific rule directories (.kilo/rules-{mode}/) not authorable #2499

Description

@dyoshikawa

Summary

One remaining Kilo Code gap after #2417's items were resolved: mode-specific rule directories (.kilo/rules-{mode}/) are read on every Kilo config load but cannot be authored from rulesync — a rulesync rule can only apply to all modes.

Baseline: #2417 surveyed through v7.4.16 (2026-07-24) and is closed; its remaining items are now implemented — the sandbox permissions block (with project-scope narrowing to enabled/network) and global non-root rules (~/.kilo/rules) are both in the codebase and visible in dry-runs. The only newer stable release, v7.4.17 (2026-07-29), adds no authorable config surface.

Recent Releases

  • v7.4.17 (2026-07-29) — release — Agent Manager / VS Code UI work plus an OpenCode v1.17.5→v1.17.9 sync (PR #12460) of runtime MCP/provider bugfixes. No new config key or file surface.
  • v7.4.15 (2026-07-22, PR #12422) — "project memory" rework; agent-managed runtime state, not a user-authored config file.

Gaps

rules — mode-specific rule directories (.kilo/rules-{mode}/) not authorable (project scope)

  • Upstream (confirmed against main, 2026-07-30): packages/opencode/src/kilocode/rules-migrator.ts scans {.kilo,.kilocode}/rules-{mode}/*.md for KNOWN_MODES = ["code", "architect", "ask", "debug", "orchestrator"] and injects them as instructions. includeModeSpecific defaults to true and packages/opencode/src/kilocode/config/config.ts calls RulesMigrator.migrate({ projectDir }) with no options, so these directories are read on every config load — current behavior, not a one-shot legacy migration. Docs: custom instructions.
  • rulesync: unsupported — KILO_RULES_DIR_NAME is the single "rules" (src/constants/kilo-paths.ts), and kilo-rule.ts has no mode dimension.
  • Scope note: project only — the migrator's mode loop runs over projectDir and globalRulesDirs() has no mode variant.

Proposed Follow-up

Accept a kilo: { mode: "code" | "architect" | "ask" | "debug" | "orchestrator" } hint on a rulesync rule that routes the file into .kilo/rules-{mode}/ (and registers it in instructions), with the reverse mapping on import. Authoring-parity gap, not a correctness failure — same priority #2417 assigned it.

Non-gaps (verified, do not re-file)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    consideringenhancementNew feature or requestmaintainer-scrapRough notes for AI implementation. Not for human eyes.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions