Repository navigation
feat: native plugins for Cursor, Codex CLI, Kiro, and OpenCode - #77
Merged
Merged
Conversation
Generate first-class per-host plugin artifacts from the canonical sources (prompts/*.md, AGENTS.md, rules/*.md, examples/*.md) via a new modular generator, so each host matches the Claude Code plugin surface: persona-bearing experts + when-to-delegate guidance, not just raw MCP tools. Hosts: - Cursor: .cursor/rules/deliberation.mdc - Codex CLI: plugins/deliberation/ (.codex-plugin/plugin.json + .mcp.json + skills/) and a repo-scoped .agents/plugins/marketplace.json, installable with `codex plugin marketplace add antonbabenko/deliberation`. The plugin lives in a subdirectory because Codex rejects a root marketplace source.path (openai/codex#17066); interface carries the required displayName/developerName/category/capabilities. - Kiro: POWER.md (keywords activation + license/support footer) + mcp.json + steering/ (a Kiro Power; "Add power from GitHub"). - OpenCode: .opencode/commands/ (thin MCP-tool wrappers) + .opencode/agents/ (expert personas, mode: subagent). Dirs are plural per opencode.ai docs. Engine: scripts/sync-hosts.js orchestrates per-host modules under scripts/hosts/*.js; output is deterministic and committed, drift-guarded by test/host-artifacts.test.js and the validate workflow. version.json stays the single SSOT (pre-commit.js syncs the Codex manifest version). Zero new runtime deps; no build at git-load. Root .mcp.json freed + un-ignored for the Codex plugin config. Host formats verified against live official docs; the generator was reviewed by GPT + Gemini (deliberation's own code-reviewer) across two rounds, which caught the Codex subdir/interface requirements, CRLF drift-stability, YAML frontmatter escaping, and a path-traversal guard.
Two defects in the native host plugins (PR #77): - Scrub Claude-Code-only references from generated non-Claude host artifacts. Kiro's steering/deliberation-triggers.md verbatim-copied rules/triggers.md, leaking ${CLAUDE_PLUGIN_ROOT}, a rules/orchestration.md path, and mcp__deliberation-* bridge tool names. Add a host-neutral transform in scripts/hosts/kiro.js (strips the Claude workflow block + the mcp__deliberation fenced examples, keeps the trigger tables) and an assertHostClean() guard in scripts/sync-hosts.js that fails generation if any host artifact leaks a Claude-only token (enforced for all four hosts + future ones). The source rules/*.md stay Claude-correct. - Fix the OpenRouter delegate receiving file attachments as "[object Object]". core/providers/openai-compatible.js passed raw {path} file objects to buildInitialTurns (which expects already-inlined text), so buildMessages string-coerced them. Inline via the bridge's inlineFiles() (now exported from server/openrouter/index.js) before building turns, and surface skip notes like the standalone bridge. (Live effect requires an MCP server restart to reload.) Reviewed by GPT + Gemini + Grok (deliberation's own code-reviewer, two rounds); covered by tests OC5/OC6/OC7 + a no-Claude-token host artifact test. 286 tests + typecheck green; grep for Claude-only tokens in host artifacts empty.
docs/hosts/ is gitignored, so the per-host install instructions never shipped. Move them to public-docs/hosts/ (tracked) and add the two missing hosts so all four are covered: cursor.md, codex.md, kiro.md, opencode.md + an index README. The repo README's "Native plugins per host" section links to them. Reviewed by GPT + Gemini + Grok (/ask-all): aligned the OpenRouter credential row across all four guides (declare models in ~/.config/deliberation/config.json) and completed the Cursor tool/expert list to match the cross-host claim.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ship deliberation as a first-class native plugin per host (not just a raw MCP install) for four non-Claude hosts, so each matches the Claude Code plugin surface: persona-bearing experts + when-to-delegate guidance.
All host artifacts are generated from the canonical sources (
prompts/*.md,AGENTS.md,rules/*.md,examples/*.md) by a new modular generator and committed, so they never drift..cursor/rules/deliberation.mdcplugins/deliberation/(.codex-plugin/plugin.json+.mcp.json+skills/) +.agents/plugins/marketplace.jsoncodex plugin marketplace add antonbabenko/deliberationPOWER.md+mcp.json+steering/.opencode/commands/+.opencode/agents/mcp+ ecosystem listingEngine
scripts/sync-hosts.jsorchestrates per-host modules (scripts/hosts/{_shared,cursor,codex,kiro,opencode}.js).build(ctx) -> {path: content}, merged with a collision + path-traversal guard.test/host-artifacts.test.js+ thevalidateworkflow.version.jsonstays the single SSOT (pre-commit.jssyncs the Codex manifest).scripts/sync-prompts.js)..mcp.jsonfreed + un-ignored to hold the project MCP config.Verification
source.path(Marketplace local plugin path "./" cannot reference the repository root openai/codex#17066) -> plugin moved to a subdir + requiredinterfacefields added; OpenCode dirs are plural.code-reviewer, two rounds) -> caught + fixed: Codex subdir/interface, CRLF drift-stability, YAML frontmatter escaping, path-traversal guard, Kiro frontmatter quoting. Grok approved both rounds.Test plan
node scripts/sync-hosts.js && node scripts/sync-hosts.js --check(drift-clean, 29 artifacts)node --test test/*.test.js(282 pass)npm run typecheck(clean)codex plugin marketplace add antonbabenko/deliberation; Kiro "Add power from GitHub"; OpenCode install (cannot run in CI)Follow-ups (tracked, not in this PR)
.opencode/frontmatter carries a harmless extraname:key.ask-all'sfilesattachment serializes as[object Object]for the OpenRouter delegate.