Problem
Kilo Code's integration in Gentle-AI uses the same OpenCode-compatible overlay format (opencode.json with "mode": "primary" for the orchestrator), which causes issue #729: "gentle-orchestrator is a primary agent and cannot be used as a subagent."
Additionally, the current integration doesn't leverage:
- Kilo Code's native
.kilo/agents/*.md sub-agent file format
- Kilo Gateway's free model routing for per-phase model assignment
kilo.jsonc for provider configuration
Proposed Solution
Replace the OpenCode overlay approach for Kilo Code with native agent files, following the same pattern used for Cursor (.cursor/agents/), Kiro (.kiro/agents/), and Kimi (.kimi/agents/).
Changes
- Native Agent Files: Generate
.kilo/agents/sdd-*.md files with YAML frontmatter instead of relying on opencode.json overlay
- Model Routing: Add
KiloModelAlias type with per-phase model assignment via Kilo Gateway
- Provider Config: Generate
kilo.jsonc with Kilo Gateway provider settings
- Verification: Add post-injection verification for Kilo Code (currently only runs for OpenCode)
Files Changed
| File |
Change |
internal/model/kilo_model.go |
NEW — KiloModelAlias type, model resolver |
internal/agents/kilocode/adapter.go |
MODIFIED — Enable SupportsSubAgents, add SubAgentsDir |
internal/assets/kilocode/agents/*.md |
NEW — 10 SDD phase agent templates |
internal/components/sdd/inject.go |
MODIFIED — Kilo-specific injection path |
internal/components/kilojsonc/kilojsonc.go |
NEW — kilo.jsonc generation |
internal/model/kilo_model_test.go |
NEW — Model unit tests |
internal/agents/kilocode/adapter_test.go |
MODIFIED — Adapter capability tests |
internal/components/sdd/inject_test.go |
MODIFIED — Kilo integration tests |
Test Results
All tests pass (go test ./...), go vet clean. 10 new Kilo-specific tests added.
Known Limitations
- Profile Detection:
~/.config/kilo/profiles/ detection not implemented in this PR (additive feature, non-blocking)
- Backward Compatible: Existing
opencode.json overlay is preserved as fallback
Related Issues
Checklist
Problem
Kilo Code's integration in Gentle-AI uses the same OpenCode-compatible overlay format (
opencode.jsonwith"mode": "primary"for the orchestrator), which causes issue #729: "gentle-orchestrator is a primary agent and cannot be used as a subagent."Additionally, the current integration doesn't leverage:
.kilo/agents/*.mdsub-agent file formatkilo.jsoncfor provider configurationProposed Solution
Replace the OpenCode overlay approach for Kilo Code with native agent files, following the same pattern used for Cursor (
.cursor/agents/), Kiro (.kiro/agents/), and Kimi (.kimi/agents/).Changes
.kilo/agents/sdd-*.mdfiles with YAML frontmatter instead of relying onopencode.jsonoverlayKiloModelAliastype with per-phase model assignment via Kilo Gatewaykilo.jsoncwith Kilo Gateway provider settingsFiles Changed
internal/model/kilo_model.gointernal/agents/kilocode/adapter.gointernal/assets/kilocode/agents/*.mdinternal/components/sdd/inject.gointernal/components/kilojsonc/kilojsonc.gointernal/model/kilo_model_test.gointernal/agents/kilocode/adapter_test.gointernal/components/sdd/inject_test.goTest Results
All tests pass (
go test ./...),go vetclean. 10 new Kilo-specific tests added.Known Limitations
~/.config/kilo/profiles/detection not implemented in this PR (additive feature, non-blocking)opencode.jsonoverlay is preserved as fallbackRelated Issues
Checklist
go test ./...)go vetclean