Skip to content

Add Continue render adapter for IDE and CLI rules + MCP blocks #62

Description

@kelos-bot

🤖 Kelos Strategist Agent @gjkim42

Area: Integration Opportunities

Summary

Add a Continue render adapter so Kanon can manage Continue IDE/CLI agent configuration alongside Codex and Claude.

Continue is a good next integration target because one file-backed configuration ecosystem reaches three surfaces: the VS Code extension, the JetBrains plugin, and the cn CLI. Its current docs define agents through config.yaml with rules and mcpServers, support file-backed rules under .continue/rules, and support standalone MCP block files under .continue/mcpServers/. That maps well to Kanon's existing instructions and mcp.servers without needing a broad new schema first.

MVP: render Continue rules from Kanon instructions and Continue MCP block files from Kanon MCP servers. Do not map models, prompts, hooks, permissions, or skills in v1.

Evidence from the current codebase

  • Kanon currently has only codex, claude, and all agent constants; no Continue target exists (internal/core/types.go:5-8).
  • The neutral Config has instructions, skills, mcp, hooks, and metadata; this is enough for a rules+MCP Continue MVP, but there is no Continue-specific config block (internal/core/types.go:11-18).
  • Adapter already provides the right extension point: Name(), Render(), and Import() (internal/core/types.go:132-136).
  • RenderAll dispatches through adaptersFor, but adaptersFor returns only Codex and Claude today (internal/core/render.go:16-31, internal/core/render.go:55-63).
  • The CLI --agent flag and validation only accept all, codex, or claude (internal/cli/root.go:56-60, internal/cli/root.go:557-559).
  • Current adapters show the expected shape for a new adapter: read concatenated instructions, render MCP into native files, and copy skills only where the target has compatible semantics (internal/core/codex.go:21-75, internal/core/claude.go:22-80).

External signal

Continue's official docs make this a practical file-backed target:

Why this is not a duplicate

I reviewed the open generated-by-kelos issues and searched for Continue/Cline/Roo/VS Code extension overlap before filing.

This is distinct from:

This should inherit the back-compat guard from #7: new adapters must be opt-in, not added to default --agent all, so existing Kanon users do not suddenly write .continue/ files.

Proposed mapping

Prefer block-directory output over mutating ~/.continue/config.yaml in v1. Continue's IDE/CLI may co-own config.yaml for models and user preferences; block files let Kanon own only the files it generates.

User-scoped render:

~/.continue/rules/kanon-instructions.md
~/.continue/mcpServers/kanon.yaml

Project-scoped render with --project <repo>:

<repo>/.continue/rules/kanon-instructions.md
<repo>/.continue/mcpServers/kanon.yaml

Example Kanon source:

version: 1
agents: [codex, claude, continue] # from #7's opt-in model, or equivalent

instructions:
  files:
    - instructions/shared.md
    - instructions/go-services.md

mcp:
  servers:
    playwright:
      command: npx
      args: ["@playwright/mcp@latest"]
      targets: [continue]

    docs:
      type: streamable-http
      url: https://mcp.docs.example.com/mcp
      targets: [continue, claude]

Rendered Continue rule:

---
name: Kanon instructions
---

<concatenated instructions/shared.md and instructions/go-services.md>

Rendered Continue MCP block:

name: Kanon MCP Servers
version: 1.0.0
schema: v1
mcpServers:
  - name: playwright
    type: stdio
    command: npx
    args:
      - "@playwright/mcp@latest"
  - name: docs
    type: streamable-http
    url: https://mcp.docs.example.com/mcp

Mapping details:

  • instructions.files -> one generated Continue rule file. Keep the same concatenation semantics as Codex/Claude instructions.
  • MCPServer.Command + Args + Env -> Continue type: stdio server entries.
  • MCPServer.URL with type: sse or type: streamable-http -> Continue remote transport entries.
  • Continue mcpServers is a list, while Kanon stores a map. Sort names for stable output.
  • If a Continue-targeted MCP server uses fields Continue does not document in this surface (enabled_tools, disabled_tools, default_approval, per-tool policies, bearer_token_env_var, or header variants), v1 should fail validation or warn loudly instead of silently dropping tool-safety intent.
  • Do not render hooks for Continue until Continue documents a compatible hook file surface.
  • Do not render skills to Continue in v1. Continue rules/prompts are not the same as Kanon SKILL.md directories.

Import behavior

Render-only is a reasonable MVP. Import can follow once the output format is stable.

A later continueAdapter.Import could:

Suggested MVP scope

  1. Add AgentContinue and register a render-only continueAdapter, gated by the same opt-in adapter mechanism proposed in Grow beyond Codex + Claude: prioritized render-adapter roadmap (Gemini CLI, Cursor, opencode, Copilot CLI) #7.
  2. Extend target validation and --agent handling for continue.
  3. Render instructions to .continue/rules/kanon-instructions.md with Continue rule frontmatter.
  4. Render Continue-compatible MCP servers to .continue/mcpServers/kanon.yaml with stable ordering.
  5. Add explicit validation/warnings for unsupported MCP fields on Continue-targeted servers.
  6. Add tests for user scope, project scope, target filtering, deterministic output, remote transport mapping, and unsupported-field diagnostics.
  7. Defer import, models, prompts, permissions, hooks, and skills.

Use cases unlocked

  1. Mixed IDE teams: developers using Codex/Claude in terminals and Continue in VS Code/JetBrains get the same shared instructions and MCP tools from one Kanon repo.
  2. Project-owned agent rules: a platform team can render project .continue/rules next to AGENTS.md / CLAUDE.md using the same --project workflow.
  3. CLI and IDE parity: Continue CLI (cn) and IDE extensions can share the same generated rule/MCP block files.
  4. Migration path from Claude/Cursor MCP: Continue can consume Claude/Cursor-style MCP JSON in .continue/mcpServers; Kanon can centralize the neutral source instead of requiring copy-paste between tools.

Guardrails

  • Keep Continue opt-in; do not change default all behavior for existing configs.
  • Avoid overwriting ~/.continue/config.yaml in v1. The user's model config and Continue preferences live there.
  • Treat Continue's secret syntax as native. Do not translate ${VAR} to ${{ secrets.NAME }} until Close the secret-management loop: import secret policies, a validate lint, and a secrets resolution backend #17 or an explicit secret policy covers it.
  • Do not claim feature parity with Codex/Claude adapters. The first value is instructions/rules + MCP, because those map cleanly today.
  • Keep unsupported tool-approval semantics visible. Silent drops would be especially risky for MCP servers.

Backward compatibility

  • Existing kanon.yaml files are unchanged.
  • No Continue files are rendered unless the user explicitly selects/opts into continue.
  • Existing Codex and Claude render/import behavior remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions