Relationships
#356 Add first-class Kilo Code tool support
Opened by maphew · 5/15/2026
Problem
swamp repo upgrade --tool kilo is currently rejected because kilo is not part of swamp's built-in AI tool registry. Kilo Code users can partially work around this by enrolling opencode, but that records audit data as opencode, generates .opencode/ scaffolding, and does not give Kilo a first-class doctor audit path.
Kilo is OpenCode-derived and the installed Kilo CLI supports compatible plugin-style tool hooks and project configuration paths. A first-class kilo tool would let Kilo users initialize and upgrade swamp repos without pretending to be OpenCode.
Proposed solution
Add kilo as a supported AI tool value alongside claude, cursor, kiro, opencode, codex, and copilot.
Suggested behavior:
swamp repo init --tool kiloandswamp repo upgrade --tool kiloare accepted.- Repository scaffolding writes swamp skills to
.kilo/skills/. - Root instructions use
AGENTS.mdwith references to.kilo/skills/<name>/SKILL.md. - Audit plugin is generated at
.kilo/plugins/swamp-audit.ts. - The Kilo plugin imports
Pluginfrom@kilocode/pluginand records bash tool invocations throughswamp audit record --from-hook --tool kilo. swamp audit record --from-hook --tool kilonormalizes the same payload shape as OpenCode plugins (tool_name: "bash",tool_input.command, optionalsession_id).swamp doctor audit --tool kilochecks thekilobinary, swamp on PATH,.kilo/plugins/swamp-audit.ts, and synthetic payload roundtrip.- Docs and generated skills list
kiloin supported tool sets.
Local validation
I prototyped this in a local clone and verified the following:
deno task fmt
deno task check
deno test --unstable-bundle --allow-read --allow-write --allow-env --allow-run --allow-net --allow-sys \
src/domain/audit/doctor/check_test.ts \
src/domain/audit/doctor/checks/binary_on_path_test.ts \
src/domain/audit/doctor/checks/agent_config_loadable_test.ts \
src/domain/audit/doctor/checks/swamp_binary_on_path_test.ts \
src/domain/audit/doctor/synthetic_payloads_test.ts \
src/domain/repo/repo_service_test.ts \
src/cli/ai_tool_parser_test.ts \
src/cli/commands/repo_init_test.tsResult: 144 passed | 0 failed.
I also smoke-tested from source:
tmpdir=$(mktemp -d /tmp/kilo-swamp-test.XXXXXX)
deno run --unstable-bundle -A main.ts repo init "$tmpdir" --tool kilo --json
deno run --unstable-bundle -A main.ts doctor audit --repo-dir "$tmpdir" --tool kilo --jsondoctor audit returned overallStatus: "pass", with these checks passing:
binary-on-path: foundkiloswamp-binary-on-path: foundswampagent-config-loadable:.kilo/plugins/swamp-audit.tspresent and referencesswamp audit recordrecording-smoke-test: synthetic Kilo payload landed in audit JSONL
Alternatives considered
- Continue using
--tool opencodeas a compatibility shim. This works only partially and produces OpenCode-specific scaffolding/audit identity. - Keep this as a swamp extension. That is insufficient because
--toolvalues, repo scaffolding, and doctor audit support are core swamp behavior, not extension behavior.
Attribution
Reported by Matt with a local prototype generated by Kilo Code / gpt-5.5.
Open
No activity in this phase yet.
stack72 commented 5/26/2026, 7:22:20 PM
PR #1400 landed swamp agent setup which lets users define custom AI agent tools without code changes. This covers the scaffolding side of this request — Kilo users can now run:
swamp agent setup # name: kilo, instructions: AGENTS.md, skills: .kilo/skills/
swamp repo init --tool kiloThe wizard detects .kilo/ config directories and offers sensible defaults. Skills, instructions, and gitignore management all work for custom tools.
What's not covered for custom tools (by design): audit plugin generation, swamp doctor audit diagnostics, and harness detection. These remain built-in-only features. If Kilo gains enough traction to warrant full audit hook integration, it can be promoted to a built-in tool.
A separate docs issue has been filed for a how-to guide covering the custom tool workflow.
josephholsten commented 6/11/2026, 7:26:15 AM
Thanks for reporting this, and for a general case solution instead of a one-off! This also answers my question about amp.
maphew commented 9/18/2026, 6:27:38 PM
Reopening for the built-in-only pieces deferred on 5/26: audit plugin generation (.kilo/plugins/swamp-audit.ts), swamp doctor audit --tool kilo, and harness detection.
The swamp agent setup custom-tool path (PR 1400) does cover scaffolding — I've registered kilo as a custom tool and it works for repo init/upgrade, skills, and instructions. But custom tools still get no audit hooks, so Kilo sessions in swamp repos either go unaudited or get recorded under the opencode shim identity — the original problem.
Four months on, the prototype in this issue still applies: full first-class kilo support passed 144 tests locally and smoke-tested repo init --tool kilo + doctor audit --tool kilo end to end. Happy to rebase and contribute it as a PR if there's maintainer appetite for promoting kilo to built-in.
efficient on behalf of maphew
maphew commented 10/3/2026, 4:05:15 AM
Related request filed: (3000) "Let agent-runner drive more agent CLIs (Kilo Code and others)", routed to @swamp/agent-runner. That one asks for a kilo provider in agent-runner's provider registry — which agent gets run. This one covers kilo as an enrolled tool — which tool writes the files. Same theme, two surfaces; worth treating as one Kilo support workstream.
Sign in to post a ripple.