Migrate Kilocode rules from .kilocoderules and .kilocode/rules/ to
Opencode's instructions config array.
Features:
- Discover rules from .kilocoderules, .kilocode/rules/*.md, and
mode-specific variants
- Support global rules from ~/.kilocode/rules/
- Read-only migration (never modifies project files)
- Combines with existing opencode config (never overwrites)
- Kilocode-only (no .roorules or .clinerules migration)
Files:
- rules-migrator.ts: Core migration logic
- config.ts: Integration point for direct CLI usage
- config-injector.ts: Integration for VSCode extension path
- rules-migrator.test.ts: 13 unit tests
- config-injector.test.ts: 4 new integration tests
- rules-migration.md: Documentation
Migrate Kilocode MCP server configurations from the VSCode extension's
mcp_settings.json to Opencode's native MCP config format.
Features:
- Read MCP settings from VSCode extension global storage
- Convert Kilocode format (command + args) to Opencode format (command array)
- Handle disabled servers (skip them)
- Warn about alwaysAllow permissions that cannot be migrated
- Support project-level .kilocode/mcp_settings.json
Config precedence (lowest to highest):
1. Kilocode MCP settings (new)
2. Remote/well-known config
3. Global user config
4. Project config (opencode.json)
5. OPENCODE_CONFIG_CONTENT
This allows users to configure MCP servers in the Kilocode VSCode extension
and have them automatically available in kilo-cli without any manual setup.
Native opencode config takes precedence over legacy Kilocode settings.