Skip to content

feat: Agent Plugins v1.0.0 support - #155

Merged
rajkumarsakthivel merged 11 commits into
mainfrom
feat/agent-plugins
Aug 11, 2026
Merged

feat: Agent Plugins v1.0.0 support#155
rajkumarsakthivel merged 11 commits into
mainfrom
feat/agent-plugins

Conversation

@rajkumarsakthivel

Copy link
Copy Markdown
Member

Summary

  • Add cce init --plugin to generate a portable Agent Plugin directory
  • Plugin works with VS Code, Cursor, GitHub Copilot, Codex, ChatGPT, and Kiro
  • Uses uvx to launch CCE on demand (no pre-install needed)
  • Extract instruction template into standalone file (single source of truth)
  • Add project auto-discovery to cce serve (walk up from cwd to find .git)
  • Update README, wiki docs, and Starlight source

Design spec: docs/superpowers/specs/2026-08-07-agent-plugins-design.md

Design for adopting the Agent Plugins v1.0.0 standard as a new
distribution channel. Covers plugin generation (plugin.json, mcp.json,
SKILL.md), project auto-discovery in cce serve, instruction template
consolidation, and CLI interface.
Generate a portable Agent Plugin directory (plugin.json, mcp.json,
SKILL.md) compatible with VS Code, Cursor, Copilot, Codex, ChatGPT,
and Kiro. Uses uvx to launch CCE on demand.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Agent Plugins v1.0.0 support to Code Context Engine by generating a portable plugin directory (manifest + MCP config + skill instructions), consolidating the instruction template into a single markdown source file, and enhancing cce serve with project auto-discovery so the MCP server can launch correctly from subdirectories (including plugin roots).

Changes:

  • Add instruction-template single source of truth via src/context_engine/data/instructions.md and load it from editors.py.
  • Add generate_plugin() to emit plugin.json, mcp.json, SKILL.md, and tool reference docs into an Agent Plugin directory.
  • Add _discover_project_root() and serve() auto-discovery, plus CLI/docs/test updates for the new plugin flow.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_plugin.py Adds tests for instruction template loading, plugin generation outputs, and project root discovery.
src/context_engine/editors.py Loads instructions from a file and adds generate_plugin() to write Agent Plugin artifacts.
src/context_engine/data/tools_reference.md New on-demand MCP tool parameter reference for skills.
src/context_engine/data/instructions.md New shared base instruction template used by writers and plugin skill body.
src/context_engine/data/init.py Marks context_engine.data as a package for distributable resources.
src/context_engine/cli.py Adds _discover_project_root(), wires serve auto-discovery, and introduces --plugin/--plugin-dir options for init.
README.md Documents Agent Plugin generation and adds CLI quick-reference entry.
docs/wiki/CLI-Reference.md Documents cce init --plugin and cce serve auto-discovery behavior.
docs/superpowers/specs/2026-08-07-agent-plugins-design.md Design spec for the Agent Plugins integration.
docs/superpowers/plans/2026-08-07-agent-plugins.md Implementation plan for the Agent Plugins integration work.
docs/index.html Marketing/docs site updates highlighting Agent Plugin and auto-discovery features.
docs-src/src/content/docs/introduction.md Mentions Agent Plugin support as an alternative install/config method.
docs-src/src/content/docs/getting-started.md Adds “Agent Plugin” section with usage examples and guidance.
docs-src/src/content/docs/cli-reference.md Documents --plugin and --plugin-dir, and notes serve auto-discovery.
docs-src/src/content/docs/agents/overview.md Adds Agent Plugin section as an alternative to per-editor config.
Suppressed comments (3)

src/context_engine/cli.py:2763

  • cce init declares --plugin/--plugin-dir options, but plugin generation logic is not implemented here; instead, a new “Agent Plugin generation” block was added under upgrade() and references gen_plugin, plugin_dir, and output_level which are not in scope. This will raise NameError when cce upgrade runs and cce init --plugin currently has no effect. Move the generation block into init() (after output_level is set) and remove it from upgrade().
        if configured is None:
            _warn(
                "MCP config skipped — .mcp.json could not be parsed; "
                "fix or remove it and re-run `cce init`"
            )

src/context_engine/cli.py:2841

  • In serve(), auto-discovery only reloads config when discovered != Path.cwd(). If the user runs cce serve from the project root (where discovery returns the current directory), this branch skips reloading and leaves ctx.obj["config"] potentially pointing at the launch config rather than the project’s .context-engine.yaml. Reload config whenever discovered is found, and only chdir when needed.

    With --http, starts a REST server exposing the storage backend for remote
    backend clients. Binds loopback by default; exposing on other interfaces
    requires CCE_API_TOKEN to be set.
    """

src/context_engine/editors.py:781

  • generate_plugin() reads data/tools_reference.md from disk using Path(__file__).parent / "data" ..., which will fail in installed distributions unless the markdown file is included as package data. Prefer importlib.resources here as well (and ensure the resource is packaged).
    tools_ref = (Path(__file__).parent / "data" / "tools_reference.md").read_text(
        encoding="utf-8"
    )

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/context_engine/editors.py
Comment thread README.md Outdated
- Use importlib.resources instead of Path(__file__) for wheel-safe data access
- Add setuptools package-data config for context_engine.data markdown files
- Fix serve() config reload when discovered root equals cwd
- Grammar fix in README Agent Plugin section
…import

- Plugin generation block was in upgrade() where gen_plugin/plugin_dir
  params don't exist; moved to init() where those CLI options are defined
- Remove extraneous f-prefix on placeholder-free string in editors.py
- Remove unused Path import in test_plugin.py
@rajkumarsakthivel
rajkumarsakthivel merged commit 07aa984 into main Aug 11, 2026
19 checks passed
rajkumarsakthivel added a commit that referenced this pull request Aug 11, 2026
- Use importlib.resources instead of Path(__file__) for wheel-safe data access
- Add setuptools package-data config for context_engine.data markdown files
- Fix serve() config reload when discovered root equals cwd
- Grammar fix in README Agent Plugin section
@rajkumarsakthivel
rajkumarsakthivel deleted the feat/agent-plugins branch August 11, 2026 11:43
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.

3 participants