feat: Agent Plugins v1.0.0 support - #155
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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.mdand load it fromeditors.py. - Add
generate_plugin()to emitplugin.json,mcp.json,SKILL.md, and tool reference docs into an Agent Plugin directory. - Add
_discover_project_root()andserve()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 initdeclares--plugin/--plugin-diroptions, but plugin generation logic is not implemented here; instead, a new “Agent Plugin generation” block was added underupgrade()and referencesgen_plugin,plugin_dir, andoutput_levelwhich are not in scope. This will raiseNameErrorwhencce upgraderuns andcce init --plugincurrently has no effect. Move the generation block intoinit()(afteroutput_levelis set) and remove it fromupgrade().
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 whendiscovered != Path.cwd(). If the user runscce servefrom the project root (where discovery returns the current directory), this branch skips reloading and leavesctx.obj["config"]potentially pointing at the launch config rather than the project’s.context-engine.yaml. Reload config wheneverdiscoveredis found, and onlychdirwhen 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()readsdata/tools_reference.mdfrom disk usingPath(__file__).parent / "data" ..., which will fail in installed distributions unless the markdown file is included as package data. Preferimportlib.resourceshere 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.
- 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
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
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.
Summary
cce init --pluginto generate a portable Agent Plugin directoryuvxto launch CCE on demand (no pre-install needed)cce serve(walk up from cwd to find .git)Design spec: docs/superpowers/specs/2026-08-07-agent-plugins-design.md