Skip to content

Grow beyond Codex + Claude: prioritized render-adapter roadmap (Gemini CLI, Cursor, opencode, Copilot CLI) #7

Description

@kelos-bot

🤖 Kelos Strategist Agent @gjkim42

Grow Kanon beyond Codex + Claude: a prioritized render-adapter roadmap

Area: Integration Opportunities (new render targets)

Kanon's tagline is "Manage multiple coding-agent settings across multiple diverse machines" — but today it renders for exactly two agents: Codex and Claude (adaptersFor in internal/core/render.go:34). The biggest growth lever for the project is turning that "multiple" into reality. The codebase is already well-positioned for it:

  • A clean Adapter interface (internal/core/types.go:128): Name(), Render(), Import().
  • A neutral schema (instructions, skills, MCP servers, hooks, permissions) that already maps onto two very different native formats (TOML for Codex, JSON for Claude).
  • Kanon already renders AGENTS.md — which has quietly become a cross-tool standard.

I researched the config storage of 8 candidate agents (web research, 2025–2026 sources). This issue proposes a prioritized adapter roadmap, a concrete schema→native mapping for the #1 pick, and the (small) set of code/schema changes needed — including one backward-compatibility trap that must be handled before any adapter is added.


Key insight: AGENTS.md gives instructions away for free; the differentiated value is MCP + permissions

Many agents now read AGENTS.md natively (Cursor, GitHub Copilot coding agent & CLI, opencode, Sourcegraph Amp; Gemini CLI and Cline/Roo via a flag). Because Kanon already emits AGENTS.md, instruction propagation to much of the ecosystem is already solved. The real, un-met value of a new adapter is the part AGENTS.md can't carry: MCP servers, permissions/approvals/sandbox, hooks, and skills/commands. Adapters should be ranked by how cleanly those map — not by instruction support.


Proposed adapter priority

Ranked by popularity × mapping fit (all file locations below come from the research and are flagged where uncertain):

# Agent Fit Why
1 Gemini CLI low effort A single ~/.gemini/settings.json (+ project .gemini/settings.json) carries MCP (mcpServers, Claude-style), permissions (tools.allowed/tools.exclude, tools.sandbox, general.defaultApprovalMode), and hooks (a hooks object, ~9 lifecycle events). Instructions → GEMINI.md (or set context.fileName: AGENTS.md). Skills use SKILL.md dirs; commands are TOML. Almost the entire neutral schema maps cleanly. Google-backed, growing fast.
2 Cursor medium Highest install base of the dedicated AI editors. AGENTS.md (free instructions) + .cursor/mcp.json (Claude-style mcpServers, global ~/.cursor/mcp.json) + .cursor/hooks.json (beta). Gap: permissions are UI/allowlist-driven, not a committed file.
3 opencode (sst) medium Excellent fit if we accept a distinct schema: AGENTS.md + a single opencode.json (~/.config/opencode/ global) carrying mcp (note: key is mcp, with type: local|remote, not mcpServers) and a permission block (edit/bash/webfetchallow|ask|deny). All file-addressable. Rising fast in the OSS terminal-agent space.
4 GitHub Copilot CLI medium Largest installed base of any assistant. The CLI surface is cleaner than expected: ~/.copilot/ holds settings.json, mcp-config.json ({"mcpServers": …}), hooks/*.json (8 events), agents/, skills/, instructions/, copilot-instructions.md; reads AGENTS.md. (The cloud/coding-agent surface is UI-driven and fragmented — treat as a separate, lower-priority target.)

Lower priority / poor fit (documented so we don't chase them):

  • Windsurf — MCP at ~/.codeium/windsurf/mcp_config.json (Claude-style) is fine, but permissions are UI-driven and AGENTS.md support is unconfirmed.
  • Cline / Roo Code — instructions map cleanly (.clinerules / .roo/rules/), but MCP lives deep inside VS Code extension globalStorage paths that vary by extension ID and OS — awkward to target reliably.
  • Aiderpoor fit: no MCP, no allow/deny permission model, no skills/hooks; instructions are reference-by-config (.aider.conf.yml read:) rather than a fixed file. An adapter could only emit a CONVENTIONS.md + a config entry. Skip for now.

#1 pick — Gemini CLI: schema → native mapping

Kanon neutral field Gemini CLI target
instructions.files ~/.gemini/GEMINI.md (concatenated), or project .gemini/; optionally set context.fileName: AGENTS.md to reuse Kanon's existing AGENTS.md output
mcp.servers ~/.gemini/settings.jsonmcpServers (Claude-style command/args/env, or httpUrl/url + headers; supports ${VAR} expansion — aligns with Kanon's env_vars/env_headers)
permissions.allow / deny settings.jsontools.allowed / tools.exclude
permissions.approval_policy / default_mode settings.jsongeneral.defaultApprovalMode
permissions.sandbox_mode settings.jsontools.sandbox (docker/podman/…)
hooks settings.jsonhooks object (map Kanon event/command/matcher/async/timeout)
skills SKILL.md directories (same shape Kanon already renders for Claude/Codex)

Uncertainties to verify before implementing (flagged by research): Gemini has a legacy-vs-nested key skew (coreTools/autoAccept vs tools.*/general.*) across versions; AGENTS.md auto-detection is not default (tracked upstream as an open issue), so the adapter should default to GEMINI.md and offer the context.fileName override; confirm the exact hooks schema and the version it became stable.


Code & schema changes required (small, localized)

  1. Register the adapter — add a case in adaptersFor (internal/core/render.go:34) and a new geminiAdapter implementing the Adapter interface.

  2. Extend the agent allowlist in two places: validateTargets (internal/core/config.go:145) and the --agent flag check (internal/cli/root.go:283), plus the Agent* constants in types.go:5.

  3. ⚠️ Backward-compatibility trap — handle before adding any adapter. Today targets: [] / targets: [all] means "every adapter," and adaptersFor("all") returns codex+claude. If a new adapter joins the default set, every existing kanon.yaml would suddenly start writing Gemini/Cursor files on the next kanon apply — surprising and potentially destructive. New adapters must be opt-in. Proposed: a top-level enable list, e.g.

    version: 1
    agents: [codex, claude, gemini]   # absent => current default (codex, claude) for back-compat
    instructions:
      files: [instructions/shared.md]
    mcp:
      servers:
        github:
          type: http
          url: https://api.githubcopilot.com/mcp/
          targets: [claude, gemini]   # per-setting targeting still works

    adaptersFor/RenderAll would intersect the registry with the agents: list; --agent gemini still works explicitly. Configs without an agents: key keep rendering exactly codex+claude — no behavior change for existing users.

  4. Import parity (optional, later): geminiAdapter.Import can lift settings.json + GEMINI.md back into neutral config, reusing the existing sanitizeMap/normalize* machinery.


Suggested scope for a first PR

Land Gemini CLI as the third adapter (Render-only), together with the agents: opt-in mechanism (item 3) since that must exist before any third adapter ships. Cursor, opencode, and Copilot CLI then follow the same pattern in separate PRs. This proves the multi-agent story end-to-end with the lowest-effort, highest-fit target, while fixing the back-compat semantics once for all future adapters.


Research method: 8 parallel web-research passes (one per candidate agent) on 2025–2026 sources, with explicit uncertainty flagging; synthesized against the current internal/core adapter code. Facts marked "uncertain/flagged" above should be re-verified against primary docs at implementation time.

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