Skip to content

feat: add native Kilo Code integration - #2627

Open
tugrulguner wants to merge 1 commit into
obra:devfrom
tugrulguner:feat/kilo-native-715
Open

tugrulguner wants to merge 1 commit into
obra:devfrom
tugrulguner:feat/kilo-native-715

Conversation

@tugrulguner

@tugrulguner tugrulguner commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add native Kilo Code integration so Superpowers skills are discovered and the using-superpowers bootstrap is loaded automatically, without copying skills or requiring per-session opt-in.

  • Register the installed skill directory with Kilo source provenance and inject the bootstrap into top-level system context; delegated child sessions retain skills without restarting the controller workflow.
  • Expose a native Kilo server entrypoint while preserving OpenCode behavior and existing package subpaths.
  • Add installation documentation, 17 contract tests, native installation/session/scope-guard tests, and real acceptance transcripts. The required React todo-list prompt loads brainstorming first on Nemotron 3 Ultra and Poolside Laguna S, including a fresh git-installed run.

Closes #715.

Who is submitting this PR? (required)

Field Value
Your model + version gpt-6.1-sol via openai-codex; delegated research/review used gpt-6-luna
Harness + version Hermes Agent v0.22.5 (2026.9.24), local bf0203a794a0, CLI on macOS
All plugins installed Complete inventory: https://github.com/tugrulguner/superpowers/blob/8226a5b18d3f9d46fbef258642f437e024734001/tests/kilo/authoring-environment.txt . Kilo acceptance sessions loaded the candidate Superpowers plugin and Kilo defaults @kilocode/kilo-indexing and @kilocode/plugin-atomic-chat.
Human partner who reviewed this diff @tugrulguner requested submission; complete human diff review has not been confirmed.

What your human partner asked you to do, in their words:

continue, create the pr

This is agent-assisted contribution work, not a claim that the human personally encountered the original report.

What problem are you trying to solve?

Issue #715 requests native Kilo Code integration. The maintainer's tracking comment identifies the missing integration and points to Kilo's native plugin hooks as the implementation route. The existing skills-install workaround does not provide the native session bootstrap.

Real Kilo CLI 7.8.17 sessions showed an additional concrete integration failure: adding the skill path alone made resolved config look correct, but Kilo rejected the skill markdown outside the project scope, leaving only its built-in skill available. The candidate supplies source metadata only for the plugin's own installed skill directory. Native tests verify that Kilo's project-controlled markdown confinement remains effective.

What does this PR change?

Adds a dependency-free Kilo server plugin that registers repository skills and appends the using-superpowers bootstrap to native system context for top-level sessions, while withholding the controller bootstrap from task children. Adds a Kilo package server entrypoint, installation documentation, contract/native runtime tests, and real acceptance transcripts. Existing OpenCode source is unchanged, and package subpath exports remain accessible.

Is this change appropriate for the core library?

This is infrastructure for a new harness, not a domain-specific skill or promotional service integration. It reuses the existing general-purpose skills without modifying their content. It adds harness infrastructure without changing skill content.

What alternatives did you consider?

  • Copying skills or using an at-runtime skills installer: excluded by the native-integration acceptance criteria.
  • Reusing only OpenCode's user-message bootstrap: tested during investigation; it did not satisfy the behavior gate with the tested Lightning model, even after discovery was corrected.
  • Registering only skills.paths: actual discovery rejected outside-project skill markdown without Kilo source metadata.
  • Adding additional system messages: avoided by appending the bootstrap to the last existing system block.
  • Refactoring the shared OpenCode implementation: unnecessary; its existing source remains unchanged.

The source metadata relies on Kilo 7.8.17's internal skill_path_origins field. That version-sensitive dependency is an explicit limitation, not a public API guarantee. Existing origin entries and permissions are preserved, and unrelated paths are not granted trust.

Does this PR contain multiple unrelated changes?

No. The plugin, package entrypoint, installation documentation, tests, transcripts, and authoring disclosure support the single Kilo integration. No skill content was modified.

Existing PRs

  • I have reviewed all open AND closed PRs for duplicates or prior art.
  • Related PRs: no existing Kilo integration PR found in the all-state Kilo title search or issue tracking references before publication. The existing OpenCode integration is the reference implementation, not a competing Kilo implementation.

Environments tested

Harness Harness version Model Model version/ID
Kilo Code CLI, isolated macOS home/project 7.8.17 NVIDIA Nemotron kilo/nvidia/nemotron-3-ultra-550b-a55b:free
Kilo Code CLI, isolated macOS home/project 7.8.17 Poolside Laguna kilo/poolside/laguna-s-2.1:free
Kilo Code CLI, isolated macOS home/project 7.8.17 NVIDIA Nemotron, failed behavior gate kilo/nvidia/nemotron-3.5-lightning:free

VS Code, Windows, and live compaction were not tested. Successful calls were unauthenticated free-model requests reporting cost 0; no user credentials were copied.

New harness support (required if this PR adds a new harness)

The exact acceptance message triggers brainstorming as the first tool call on the two successful models above. A further clean acceptance session passed after native installation of the exact public commit using:

kilo plugin git:github.com/tugrulguner/superpowers@8226a5b18d3f9d46fbef258642f437e024734001 --global

Kilo acquired the repository itself, selected the server entrypoint, and discovered all 15 repository skills. The fresh git-installed session was ses_e8bb2caaaffeaUVD2rIiPZprs4.

The complete visible transcript for a successful local-source session is included below. The second model's complete transcript is committed in tests/kilo/acceptance.md. Provider reasoning and transport/step/token metadata are omitted explicitly; all visible text and tool inputs/results are retained. The exact CLI message argument was Let's make a react todo list; Kilo itself adds quotation marks to the stored user text.

Acceptance test permissions allowed skills/read/glob/grep/todowrite and denied mutation/other tools. The observed first tool call was brainstorming, not a failed mutation attempt. These restrictions and the failed Lightning model are disclosed rather than presented as unrestricted or universal model compliance.

Complete visible clean-session transcript: Nemotron 3 Ultra

Session: ses_e8bca699affejMNWmub5kyKqWi. First tool: skill({"name":"brainstorming"}), completed. No mutation tools called.

Command:

kilo run --dir /Users/tugrulguner/.hermes/cache/scratch/kilo715-acceptance-L/project -m kilo/nvidia/nemotron-3-ultra-550b-a55b:free --format json "Let's make a react todo list"

User

Let's make a react todo list

Tool: skill

Input:

{
  "name": "brainstorming"
}

Status: completed

Result:

<skill_content name="brainstorming">
# Skill: brainstorming

# Brainstorming

You are very good at building. You build what you believe your human
partner wants, and that belief is usually thinner than it feels. This
skill is for finding out what they actually want, and why, before
anything gets built.

People often haven't finished working out what they want. Good questions
help them think it through. When you understand the why, you make the
hundred decisions they never mention the way they would have made them.

## First: What Do You Actually Know?

Before you reply, ask yourself: what do I know about what they want, and
why?

- **Everything that matters is in the request** ("make the icon cornflower
  blue"). This is a quick, clear task. Do it, and say what you did.
- **Something non-trivial is missing.** Start the conversation.

Before you start implementing, you must, in order:

1. Lay out the approaches in a message of their own, and have your
   human partner pick one (see Lay out the approaches).
2. Write the design doc, short or full (see Size the Work).
3. Get their approval of that doc.
4. Invoke the superpowers:writing-plans skill.

Two things aren't implementing: a spike they said yes to (see Spike to
feel things out), and doing what they asked once they've opted out of
the questions.

## Look Before You Ask

In an existing project, or when they've given you context (a spec, a plan,
a handoff, files they pointed at, earlier conversation), dig in before your
first message. Read what they referred to and the code or material it
connects to, and keep reading until you can explain how the relevant
parts work today and what this change would touch. Never ask what the
project or their context already answers.

## Your First Message

Move the work forward, with one of these:

- **They've already said what they want** (a spec, a plan, a detailed
  request): aim for about 200 words for the whole message. Echo their
  request back in your own words, so they can see whether you've got its
  shape: what they want, who it's for, and why, as far as they've said.
  Add what you found that bears on it: how the relevant parts work today
  and what the change would touch. If you found something they may not
  have considered that would change what they're asking for or how it
  has to be built, like a constraint, a conflict, or a cheaper path, say
  so plainly. How to build it comes later, once you understand what they
  want (see Lay out the approaches). End with one line inviting
  corrections, then one question about what they want: the thing their
  request leaves open whose answer would most change what gets built.
  Specs are often incomplete, so confirm before you build on one.
- **They haven't:** one open question, in their own terms, about the
  biggest thing their request leaves unsettled. Say why you're asking:
  what the answer would change about what you build. For "a website for
  my bakery": "If it's mostly for people deciding whether to stop by,
  I'd lead with hours and what's in the case today; taking orders is a
  different site. What do you want someone to do when they land on it?"

How the message ends depends on whether their message asked for
brainstorming:

- **They asked for it** (by name, by invoking it, or by asking for a
  design discussion): end with your question. They want this
  conversation.
- **They didn't:** they may not want a conversation at all. After your
  question, add a light, one-line offer to just get going instead, like
  "Or if you'd rather I just dive in, say so." If they take you up on
  it, this skill is done: state any significant how-it-gets-made choice
  (platform, language, medium) in one plain line, then do what they
  asked through the normal workflow.

That's the whole message.

## The Conversation

Each message ends with one question: a single sentence with no list of
example answers hanging off it. Use plain language, pitched just a little
above where your human partner is. Match their vocabulary; never use
process jargon. You never need to quote this skill to your human
partner.

Be clear and concise. Lead with what matters. Avoid jargon. When you
report what you found, give them the most important findings and offer
the rest.

**Get them describing.** Open questions come first. Their own words carry
intent that your options can't. Offer a short menu only when they're
stuck. When they say "just guess" or "what do you think?", propose
something concrete.

**How it gets made.** Every project rests on choices about medium, tools,
materials, and resources: the platform, programming language, and
libraries for an app; the medium for a piece of art. Find out early which
of those choices they want to make, which they're handing to you, and what
they already have to work with. Someone with strong views or skills will
want to talk it through. Someone counting on you needs sensible defaults,
said in plain words. When there's existing work, build on what it already
uses. Any choice you make goes in the design as your call, never as
something they agreed to.

**Ground to cover.** This is territory, not a script. Never read these
out as questions:

- what kind of thing this is, and what makes it special
- why now, and what success looks like to them
- goals, non-goals, and anti-goals (what would make this a failure even
  if it technically works)
- prior art: what they've seen elsewhere, loved or hated
- current state: what exists now, what they've tried
- the details they care about

**Make every question specific** to their project and what they've told
you. Ask Socratically, the way a sharp colleague would: build each
question on their last answer or on something you found, so it helps
them think through a consequence or a case they may have missed
("Voting closes before the meeting, and two members joined this month.
Does someone who joins mid-round get a vote?"). When the reason isn't
already plain, say what you're hoping to learn or what the answer would
change. A proposal they can correct, plus your reason for it, often
beats a question.

**Offer recon.** Once you have a bit of grounding and looking further
would help, offer to go look: deeper into their codebase or project,
their own files and data, or the web. Say what you'd look for. They
decide whether you go.

**Lay out the approaches.** Once you understand what they want, and
before you write anything up, put the ways of building it in a message
of its own. Come up with several real alternatives and drop the weak
ones, including any that work against why they want it and any the
existing work rules out. Present the two or three that remain, grounding
each in what the project actually does and saying what it trades off.
Recommend one and say why, then ask which way they want to go. When
there's genuinely one sensible way, say so and explain why the others
don't fit. This is for how it gets built; for what they want, get them
describing first.

**Show, don't tell.** Offer the visual companion (below) whenever seeing
would help more than reading:

- something they'll look at: a screen, a page, a printout, a sign
- a layout or arrangement: of a screen, a room, a schedule
- a flow or a sequence of steps
- options that would look different from each other
- a structure that's easier to see than read: a diagram, a timeline, a map

Once they've accepted, use it for mockups to react to, side-by-side
options, and throwaway prototypes they can click.

**Spike to feel things out.** Agentic work is waterfall, but very, very
fast. A quick throwaway build is often the cheapest way to learn what
they want or whether something works. Offer one when it would help.
When they just want to spike, get out of the way. Spikes get no tests
or minimal ones, aren't bulletproof, and skip the plan, implementation,
and review process. Bring what the spike taught you back into the
conversation.

## Play It Back

Play back as you go. As soon as you understand one part well enough to
describe it (what it's for and who it serves, say, or how one piece
behaves), describe that part back in about 200-300 words, then return to
questions about the next part. Playback and questions alternate through
the whole conversation; the last chunk covers whatever is left.

Only what they said goes in as theirs. Anything you filled in goes in
as your proposal, with your reason. End each chunk by asking what's wrong
or missing.

Before you send a chunk, check it: does it describe something they'll
look at, like a page, a screen, a schedule, or a printout? If so, and
they haven't seen the visual companion offer yet, send the offer instead
(its own message, below) and hold the chunk for the next message. Once
they've accepted, put a mockup next to the description.

## Size the Work

Once you understand what they want and they've picked an approach, say
how big the work is in plain words. They can override it.

| Size | The design doc |
|------|----------------|
| A small change | a short one: what you already covered together, written down |
| A project | the full written design (below) |

Short or full, the design doc has an **Approaches** part: the two or
three ways you considered building it, what each trades off, which one
they picked, and why. They pick in the conversation, before you write
the doc.

If it grows mid-task, stop, say so, and step up a size.

If this is really several independent projects, say so, agree on an
order, and brainstorm them one at a time.

## The Written Design

Write a plain document a talented builder in the domain could plan
from without going back to your human partner. Cover:

- intent and the why
- goals, non-goals, anti-goals
- constraints
- approaches (above)
- the parts of the how they decided, as they decided them
- what's left to the builder

For a small change, the short design covers the same points in a line
or two each and goes straight to your human partner, without the
builder check.

**Where it goes:** in a software repo,
`docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`, committed.
Otherwise, ask. Your human partner's preferences override both.

**Builder check** (for a project): dispatch a fresh subagent with
`builder-check-prompt.md` in this directory. When you tell your human
partner you're writing it up, say a reviewer will read it first and you
may come back once with a few questions. Don't hand over the document
until the check is back. Sort what the builder asks into three piles:

- **Answered already** by the conversation or the project: put the answer
  in the document.
- **Minor:** a sensible builder could settle it without changing what gets
  built. Settle it yourself and mark it in the document as your call.
- **Theirs:** only your human partner can answer it, and the answer changes
  what gets built.

Bring the "theirs" pile in one message, most important first. Update the
document with their answers, then hand it over with a short list of the
calls you made so they can check those while reading. That's the only
round of questions the check produces. Without a subagent tool, read the
document as that builder yourself.

<HARD-GATE>
Nothing gets built until your human partner approves the design doc:
the short one for a small change, the full one for a project.
Building includes writing product code, scaffolding, installing
dependencies, creating projects, and invoking an implementation skill.
Reading and exploring are fine.

Two exceptions. If they opted out of the questions, the skill is done
and the gate goes with it. A spike they said yes to may be built; it
stays labeled throwaway, and keeping what it produced is a new request
that comes back through this gate.

After the design doc is approved, the next step is the plan: invoke
superpowers:writing-plans and no other skill.
</HARD-GATE>

## Red Flags

| Thought | Reality |
|---------|---------|
| "I'll offer a menu of what they might want" | Options steer. Ask them to describe it first. |
| "I'll fill in sensible defaults" | Good. Say them out loud. A default they never heard is one they couldn't reject. |
| "I've answered their questions, so I'll write the doc" | Lay out the approaches first, in a message of their own. |
| "I should explain the process first" | Ask your question. The process shows itself. |
| "They said 'sounds good' to the idea" | Approval covers what you showed them. A design doc you haven't written isn't approved. |
| "The spike works, I'll keep building on it" | Keeping it is a new request. Back through the gate. |

## Visual Companion

A browser tab for showing mockups, diagrams, and prototypes. It's a
tool, not a mode: accepting it doesn't send every question to the
browser.

**Offer it just-in-time.** Offer it the first time one of the moments
above comes up, never upfront. The offer is its own message with nothing
else in it:

> "This might be easier if I show you. Want me to open a browser tab with some mockups?"

If they decline, stay in text and don't offer again unless they raise it.

**Per question, ask: would they understand this better by seeing it?**
Mockups, layouts, diagrams, and side-by-side designs go in the browser.
Requirements, scope, tradeoffs, and conceptual choices stay in text. A
question about a UI topic isn't automatically a visual question.

If they accept, read `visual-companion.md` in this directory before
starting the server.

Base directory for this skill: /Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming
Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.
Note: file list is sampled.

<skill_files>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/scripts/helper.js</file>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/scripts/server.cjs</file>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/scripts/start-server.sh</file>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/scripts/frame-template.html</file>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/scripts/stop-server.sh</file>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/builder-check-prompt.md</file>
<file>/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/skills/brainstorming/visual-companion.md</file>
</skill_files>
</skill_content>

Tool: glob

Input:

{
  "pattern": "**/*",
  "path": "/Users/tugrulguner/.hermes/cache/scratch/kilo715-acceptance-L/project"
}

Status: completed

Result:

/Users/tugrulguner/.hermes/cache/scratch/kilo715-acceptance-L/project/kilo.json

Tool: read

Input:

{
  "filePath": "/Users/tugrulguner/.hermes/cache/scratch/kilo715-acceptance-L/project/kilo.json"
}

Status: completed

Result:

<path>/Users/tugrulguner/.hermes/cache/scratch/kilo715-acceptance-L/project/kilo.json</path>
<type>file</type>
<content>
1: {
2:   "$schema": "https://app.kilo.ai/config.json",
3:   "plugin": [
4:     "file:///Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/.kilo/plugin/superpowers.js"
5:   ],
6:   "permission": {
7:     "*": "deny",
8:     "skill": "allow",
9:     "read": "allow",
10:     "glob": "allow",
11:     "grep": "allow",
12:     "todowrite": "allow",
13:     "external_directory": {
14:       "/Users/tugrulguner/.hermes/cache/scratch/superpowers-kilo-715/**": "allow"
15:     }
16:   }
17: }

(End of file - total 17 lines)
</content>

Assistant

This is an empty project. Before I build a React todo list, I need to understand what you're looking for:

What features do you want in the todo list?

  • Basic add/remove/toggle completion?
  • Categories/tags, due dates, priority?
  • Data persistence (localStorage, backend)?
  • Filtering (all/active/completed)?

Tech preferences:

  • TypeScript or JavaScript?
  • Styling: plain CSS, Tailwind, CSS Modules, styled-components?
  • State: useState, Context, Redux, Zustand?
  • Build tool: Vite, Create React App, Next.js?

Or if you'd rather I just dive in with sensible defaults (Vite + TypeScript + Tailwind + basic CRUD), say so.

Evaluation

  • Initial acceptance prompt: Let's make a react todo list.
  • Three successful live-model sessions exercised the final plugin behavior: the two local-source models and a fresh native git install of the published commit. One Lightning-model session with the final implementation failed the behavior gate; earlier investigative implementations also failed.
  • Before source provenance was supplied, only Kilo's built-in skill was discovered. The corrected native integration discovers all 15 repository skills; successful models load brainstorming before mutation and then ask design questions. This establishes the stated acceptance criterion, not perfect adherence to every instruction in the brainstorming skill.
  • 17 Kilo contract tests pass, including package subpath compatibility, source-origin preservation, bootstrap idempotence, child classification, error recovery, and bounded cache isolation.
  • The real native CLI test passes package installation, actual skill discovery, root/child outgoing-request assertions, and a project markdown scope-guard negative test with a benign positive control. Its loopback provider intentionally returns HTTP 400 and is not represented as a real model completion.
  • Existing OpenCode bootstrap/cache/skill-registration regressions pass. All five Pi extension tests pass.
  • Independent review of exact commit 8226a5b found no actionable technical blockers after the original package exports regression was repaired and regression-tested.
  • No upstream CI result is claimed at submission time.

Rigor

  • Skills-change evaluation is not applicable: no skill content was changed.
  • This change was tested adversarially, not just on the happy path.
  • I did not modify carefully-tuned skill content without extensive evaluation evidence.

Human review

  • A human has reviewed the COMPLETE proposed diff before submission.

Submission is authorized by @tugrulguner. The unchecked item records human diff review, not the completed automated technical review. Maintainer invitation was requested in #715 (comment); no invitation has been received. This summary is agent-assisted, not represented as human-written.

@tugrulguner
tugrulguner marked this pull request as ready for review October 25, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant