diff --git a/README.md b/README.md index 1e60db6..0488dc8 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,12 @@ cce init Restart your editor. Done. Every question now hits the index instead of re-reading files. +> **Agent Plugin support:** Run `cce init --plugin` to generate a portable +> [Agent Plugin](https://agent-plugins.org) directory that works with +> VS Code, Cursor, Copilot, Codex, ChatGPT, and Kiro. The plugin uses +> `uvx` to launch CCE on demand, so users don't need to pre-install the +> Python package. See [Agent Plugin](#agent-plugin) below. + > **Already have Ollama?** Skip `[local]` and use `uv tool install code-context-engine` instead. CCE auto-detects Ollama at localhost:11434 and uses `nomic-embed-text`.
@@ -355,10 +361,52 @@ CCE's cross-session memory depends on the agent calling `record_decision` and `r --- +## Agent Plugin + +[Agent Plugins](https://agent-plugins.org) is an open standard (v1.0.0) backed by Amazon, Cursor, Microsoft, OpenAI, and Vercel for packaging AI skills and MCP servers into portable, zero-install bundles. CCE can generate a plugin directory that compatible editors can discover and load automatically. + +```bash +cce init --plugin # Generate at .cce/plugin/ +cce init --plugin --plugin-dir ~/plugins/cce # Custom location +cce init --agent claude --plugin # Both: agent config + plugin +``` + +### What gets generated + +``` +.cce/plugin/ +├── plugin.json # Agent Plugins v1.0.0 manifest +├── mcp.json # MCP server config (uvx + stdio) +├── skills/ +│ └── code-context/ +│ ├── SKILL.md # Agent instructions (frontmatter + body) +│ └── references/ +│ └── tools.md # Per-tool parameter docs (loaded on demand) +└── LICENSE +``` + +### Compatible editors + +VS Code, GitHub Copilot, ChatGPT, Codex, Cursor, and Kiro. The plugin uses `uvx` to launch CCE on demand, so users do not need to pre-install the Python package. The MCP server auto-discovers the project root by walking up from its working directory, looking for `.context-engine.yaml` or `.git/`. + +### When to use `--plugin` vs `--agent` + +| | `--agent` (default) | `--plugin` | +|---|---|---| +| Install method | Writes editor-specific config files | Generates a portable plugin directory | +| Zero-install | No, CCE must be on PATH | Yes, `uvx` fetches CCE on demand | +| Instruction updates | Stale until `cce init` re-run | Stale until `cce init --plugin` re-run | +| Best for | Your own machine | Sharing with a team or distributing | + +Both can be used together. `--agent` handles per-editor MCP config, `--plugin` provides a portable alternative. + +--- + ## CLI at a glance ```bash cce init # Index + install hooks + register MCP +cce init --plugin # Generate Agent Plugin for VS Code, Cursor, etc. cce # Status banner cce savings # Token savings with dollar estimates cce savings --all # All projects diff --git a/docs-src/src/content/docs/agents/overview.md b/docs-src/src/content/docs/agents/overview.md index d4ffe01..6bfde4a 100644 --- a/docs-src/src/content/docs/agents/overview.md +++ b/docs-src/src/content/docs/agents/overview.md @@ -59,6 +59,20 @@ Or configure everything at once: cce init --agent all ``` +## Agent Plugin (alternative install) + +Instead of per-editor MCP config, you can generate a portable [Agent Plugin](https://agent-plugins.org) directory: + +```bash +cce init --plugin +``` + +This creates a `.cce/plugin/` directory containing a manifest, MCP server config, and skill instructions that conform to the Agent Plugins v1.0.0 specification. Editors that support Agent Plugins (VS Code, Cursor, Copilot, Codex, ChatGPT, Kiro) discover and load it automatically. + +The plugin uses `uvx` to fetch and run CCE on demand, so team members who install the plugin do not need CCE pre-installed. Both `--agent` and `--plugin` can be used together in the same `cce init` command. + +See the [Getting Started](/code-context-engine/guide/getting-started/#agent-plugin) page for more details. + ## Common issues across all agents ### "cce: command not found" diff --git a/docs-src/src/content/docs/cli-reference.md b/docs-src/src/content/docs/cli-reference.md index 0b1e445..91d9f6e 100644 --- a/docs-src/src/content/docs/cli-reference.md +++ b/docs-src/src/content/docs/cli-reference.md @@ -25,6 +25,21 @@ What it does: - Creates or updates agent instruction files. - Adds per-machine files to `.gitignore`. +**Agent Plugin flags:** + +| Flag | Description | +|------|-------------| +| `--plugin` | Generate an [Agent Plugin](https://agent-plugins.org) directory alongside the MCP config | +| `--plugin-dir ` | Output directory for the plugin (default: `.cce/plugin/`) | + +```bash +cce init --plugin # Generate at .cce/plugin/ +cce init --plugin --plugin-dir ~/plugins/ # Custom output directory +cce init --agent claude --plugin # Both: agent config + plugin +``` + +The generated directory contains `plugin.json`, `mcp.json`, and `skills/code-context/SKILL.md` conforming to the [Agent Plugins v1.0.0](https://agent-plugins.org) specification. Compatible editors (VS Code, Cursor, Copilot, Codex, ChatGPT, Kiro) discover and load the plugin automatically. The plugin uses `uvx` to launch CCE on demand, so pre-installing the Python package is not required. The default `.cce/plugin/` path is added to `.gitignore` automatically. + ## cce index Re-index files that have changed since the last run. @@ -170,6 +185,8 @@ cce serve cce serve --project-dir /path/to/project ``` +When `--project-dir` is not provided, `cce serve` auto-discovers the project root by walking up from the current working directory, looking for `.context-engine.yaml` or `.git/`. This allows the MCP server to work correctly when launched from subdirectories or from an Agent Plugin directory. + ## cce list Show every available command grouped by category. diff --git a/docs-src/src/content/docs/getting-started.md b/docs-src/src/content/docs/getting-started.md index 7100179..1d374ff 100644 --- a/docs-src/src/content/docs/getting-started.md +++ b/docs-src/src/content/docs/getting-started.md @@ -58,6 +58,24 @@ cce init --agent pi # Pi only cce init --agent all # Every supported editor ``` +### Agent Plugin + +Add `--plugin` to generate a portable [Agent Plugin](https://agent-plugins.org) directory. Agent Plugins is an open standard (v1.0.0) for packaging AI skills and MCP servers into zero-install bundles. + +```bash +cce init --plugin # Plugin written to .cce/plugin/ +cce init --plugin --plugin-dir ./my-plugin # Custom output directory +cce init --agent claude --plugin # Both: agent config + plugin +``` + +The generated plugin contains a manifest (`plugin.json`), MCP server config (`mcp.json`), and a skill file (`SKILL.md`) with CCE instructions. Compatible editors (VS Code, Cursor, GitHub Copilot, Codex, ChatGPT, Kiro) discover and load it automatically. + +The plugin uses `uvx` to launch CCE on demand, so users who install the plugin do not need to pre-install the Python package. The `--plugin` flag is independent of `--agent` and both can be used together. + +:::tip +After upgrading CCE, re-run `cce init --plugin` to regenerate the plugin with the latest version and instructions. +::: + ## Verify it works Restart your editor, then ask a question about your code. The agent will call `context_search` via MCP instead of reading files. diff --git a/docs-src/src/content/docs/introduction.md b/docs-src/src/content/docs/introduction.md index 7f8d168..b15a929 100644 --- a/docs-src/src/content/docs/introduction.md +++ b/docs-src/src/content/docs/introduction.md @@ -41,6 +41,8 @@ CCE parses your code into semantic chunks (functions, classes, modules) using Tr | OpenCode | `opencode.json` | | | Tabnine | `.tabnine/agent/settings.json` | `TABNINE.md` | +CCE also supports [Agent Plugins](https://agent-plugins.org) (`cce init --plugin`), a portable zero-install alternative that works across VS Code, Cursor, Copilot, Codex, ChatGPT, and Kiro without per-editor config files. + ## How it works 1. **Index** — Tree-sitter parses code into semantic chunks. Stored locally with vector embeddings. diff --git a/docs/index.html b/docs/index.html index d299d5a..3f73298 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,7 +9,7 @@ - +