Repository navigation
feat(cli): add Kilo Code support - #745
Conversation
7b4d03b to
ec67353
Compare
|
Hi, and apologies for opening this pull request prematurely. |
ec67353 to
2fa0688
Compare
Follow-up scope: rules and commandsThis draft only adds Kilo as a flat-build target. It deliberately retains the existing global framework-build decision for plugin That was an intentional YAGNI choice, recorded in the flat-build design: at the time, the framework shipped no plugin source in either directory. It was therefore not an omission specific to Kilo. The situation is worth revisiting separately because This PR remains a draft and has not been reviewed, approved, or merged; neither follow-up assumes that it will be accepted. |
4e2a4c2 to
4d054e9
Compare
|
@waewoo One Kilo contract problem remains in this draft. The profile declares Please remove the command capability, |
|
@blafourcade CommandsThe current Kilo documentation explicitly documents project workflows/slash commands as Markdown files under https://kilo.ai/docs/customize/workflows In particular, it states that workflows are stored as slash commands in The current Kilo configuration reference also documents Markdown commands and explicitly supports both https://github.com/Kilo-Org/kilocode/blob/main/packages/opencode/src/kilocode/skills/kilo-config.md This is also reflected in the implementation history. Kilo-Org/kilocode#6881 established So based on the current documented Kilo contract, Unless I am missing another constraint specific to AIDD, I think RulesI also checked your point that Kilo rules should be Markdown files referenced from The Kilo configuration reference confirms that https://github.com/Kilo-Org/kilocode/blob/main/packages/opencode/src/kilocode/skills/kilo-config.md The current #745 implementation correctly installs generated rules under: and its base Kilo configuration contains: {
"instructions": [
".kilo/rules/**/*.md"
]
}However, following the installation path exposed an edge case in the current draft: when a project already owns That could leave There is also an existing-config consistency case to cover: the Kilo MCP capability already resolves I'll therefore adjust the Rules/config part so that AIDD safely ensures: {
"instructions": [
"...existing user instructions...",
".kilo/rules/**/*.md"
]
}while:
I'll add tests for these existing-config cases as part of the change. Thanks — the review helped uncover this Rules/config edge case. |
|
@waewoo You are correct. My previous review comment was based on an outdated assumption: current Kilo documentation explicitly supports Markdown slash commands under Please retain Your rule/config finding is the relevant gap for #868: generated |
940e8d9 to
0fd0c16
Compare
|
Thanks for correcting the command-surface point. I updated the PR to keep the documented Kilo command profile support explicit while clarifying that flat plugin-command distribution remains a separate follow-up. The PR now links to #744 without closing it, and keeps flat Kilo Rules distribution and its configuration merge behavior scoped to #868. |
71d7bf8 to
646ee28
Compare
blafourcade
left a comment
There was a problem hiding this comment.
I pulled this down, built it from 646ee285 and ran it. Design is right and the sandbox behaviour is good, but pnpm test was never run on this head and six tests fail on the branch alone, before any merge. Needs another pass.
What I checked and liked
Installed into a throwaway HOME, then translate --to kilo --as flat:
Flat-installed 8 plugins, 458 files written
434 .kilo/skills 19 .kilo/hooks 2 .kilo/plugin 2 .kilo/agents 1 .kilo/kilo.jsonc
Nothing escapes .kilo/. I drove the generated lifecycle plugin by hand: one dispatch on session.created, none on anything else, and with node off the PATH it prints spawn node ENOENT and the session survives. That is exactly the contract in aidd_docs/memory/architecture.md. timeout: 5000, stdio closed, cwd bounded to the project. Good work.
I also diffed the golden cell by cell against the merge base: none of the nine existing cells moved, the +263 lines are all kilo:flat. That was my main worry and it is clean. The two shared e2e changes tighten things rather than loosen them, and ci.yml has the ten-cell matrix.
What blocks it
The kilo:flat baseline is stale.
kilo:flat: +.kilo/kilo.jsonc, ~.kilo/plugin/aidd-context-hooks.js, -kilo.json
Baseline still holds kilo.json, the build emits .kilo/kilo.jsonc. The build is right, the snapshot was never recaptured after the move your own description announces. Note your verification list names tests/e2e/framework-build.e2e.test.ts; the failing one is tests/golden/framework-build-golden.e2e.test.ts.
The telemetry reason string is written two ways, in six places you added. profile.ts:46 says Kilo OpenTelemetry is experimental and not yet supported by AIDD., and registry-conformance.unit.test.ts:143, read-local-cost-sweep.unit.test.ts:81 and diagnose-telemetry-use-case.unit.test.ts:654 expect telemetry has not been measured. Three of the six failures are just that.
kilo is in the static id list but not guaranteed in the registry.
UnregisteredToolError: Tool 'kilo' is not registered.
at getToolConfig src/contexts/tools/domain/registry.ts:67
at hostMarketplaceRegistryReaders .../host-marketplace-registry-reader-adapter.ts:27
at tests/contexts/framework/application/clean-native-cache.integration.test.ts:705
AI_TOOL_IDS is static in src/kernel/tool.ts, TOOL_REGISTRY is a Map filled at runtime by registerTool(). Any path iterating the ids and calling getToolConfig without the Kilo profile imported throws. Wiring probably saves us in production, but the trap is there and this test finds it.
Conflict with next on opencode-mcp-merge.ts, which #870 rewrote. Small one: keep your arrayEntries helper (used at 63-64) and take next's comment, its assertContributedServerUnchanged body stays below.
Minor
catches-that-swallowflagskilo-hooks-bridge.ts, but thatcatchis inside a template literal, so it is generated JS and not executed TS. The guard reads source text and cannot tell. Add aBASELINEentry with a reason rather than touching the code.- Bundle is at 653.7 KB for a 654 KB budget. Three tenths of a kilobyte left. Next addition breaks the build.
- The description links
cli/src/domain/tools/ai/kilo.ts, which does not exist. Real path iscli/src/contexts/tools/domain/profiles/kilo/. Description only.
One thing to flag in the PR itself
KILO_RUNTIME_SMOKE=1 means CI never runs your strongest claim. Without the flag the test skips; with it, on my machine, spawn kilo ENOENT, since Kilo is not installed. So "Kilo discovers the generated skills and agents and fires the guarded synchronization exactly once" rests on your local run and nothing else can confirm it. Please say so in the description, otherwise a future reader reads a skipped test as a passing one.
Merged with next I get 6759 passed, 7 failed, typecheck clean. Fix the six, rebase, regenerate the golden and I will take another look.
acd794e to
91eff15
Compare
|
Thanks for the detailed review and for checking the generated Kilo tree and lifecycle behaviour. For clarity, this PR adds end-to-end Kilo Code support to the framework, including:
The OpenCode MCP changes only resolve the merge with All requested corrections have now been addressed:
Validation completed locally:
I also identified two separate repository/tooling follow-ups that do not belong in this PR:
Those should be tracked separately rather than expanding this PR. |
AIDD-Session-Id: 01a0c897-e6c0-78d0-8f7c-3e908106d4a9
AIDD-Session-Id: 01a0c897-e6c0-78d0-8f7c-3e908106d4a9
bfa7fb9 to
2db7cc0
Compare
|
Thanks for the clarification. I rebased the branch onto
Final local validation:
No remaining blocking issue identified in this PR. Ready to merge once CI is green. |
blafourcade
left a comment
There was a problem hiding this comment.
Re-verified on 2db7cc0: CI, Validate, CodeQL, cli CI, Windows, Kilo runtime smoke, coverage, and mutation gates all pass. Previous blocking findings are resolved.
🎯 What & why
Add native Kilo Code support so AIDD can be installed and released for Kilo instead of relying on the OpenCode layout that Kilo no longer discovers.
🛠️ How it works
The new Kilo tool adapter maps skills, agents, MCP configuration, and flat plugins to Kilo-native project locations. The flat build contract namespaces skills and subagents, merges MCP servers, emits project-local
.kilo/kilo.jsoncby default, and feeds a newkilo:flatrelease cell. The README documents the generated archive and installation flow.The Kilo profile retains Kilo's documented command surface:
CommandsCapability,.kilo/commands, and command-link rewriting. Flat distribution of plugin commands remains a separate follow-up. Flat Kilo Rules distribution and its configuration merge behavior are tracked in #868.🔌 Lifecycle plugin
This PR generates the Kilo-native project lifecycle plugin under
.kilo/plugin/from the relevant AIDDhooks.jsondefinitions. It maps Kilo's verified session-start equivalent to the guardedaidd-contextproject-memory synchronization while reusing the existing shared behavior. Missing memory, malformed markers, and plugin failures remain non-blocking and diagnostic.The existing Kilo agent output (
.kilo/agents/) remains separate from this executable plugin bridge.🧪 Verification
Executed on
71d7bf885a899171e9f0129f29f6bbdbbab7cd46:pnpm --dir cli typecheckpnpm --dir cli exec vitest run --project=e2e tests/e2e/framework-build.e2e.test.ts— 22 passed.KILO_RUNTIME_SMOKE=1 pnpm --dir cli exec vitest run --project=e2e tests/e2e/kilo-runtime.e2e.test.ts— 1 passed; Kilo discovers the generated skills and agents, loads the generated project plugin, and fires the guarded synchronization exactly once.🔗 Linked issue
Related: #744
✅ I certify