Auto-generated from all feature plans. Last updated: 2026-03-20
-
Neo4j (production) / FalkorDB (default) — same shared instance as CGC core; (001-cgc-plugin-extension)
-
Python 3.10+ (constitutional constraint) (001-cgc-plugin-extension)
src/
codegraphcontext/
plugin_registry.py ← PluginRegistry (discovers cgc_cli_plugins + cgc_mcp_plugins entry points)
cli/main.py ← CLI app; loads plugin CLI commands at import time
server.py ← MCPServer; loads plugin MCP tools at init time
tests/
unit/plugin/ ← Unit tests for plugin system (mocked entry points)
integration/plugin/ ← Integration tests (real stub plugin if installed)
e2e/plugin/ ← Full lifecycle E2E tests
plugins/
cgc-plugin-stub/ ← Reference stub plugin (minimal test fixture)
cgc-plugin-otel/ ← OpenTelemetry span receiver plugin
cgc-plugin-xdebug/ ← Xdebug DBGp call-stack listener plugin
docs/
plugins/
authoring-guide.md ← How to write a CGC plugin
cross-layer-queries.md ← Canonical cross-layer Cypher queries
cd src [ONLY COMMANDS FOR ACTIVE TECHNOLOGIES][ONLY COMMANDS FOR ACTIVE TECHNOLOGIES] pytest [ONLY COMMANDS FOR ACTIVE TECHNOLOGIES][ONLY COMMANDS FOR ACTIVE TECHNOLOGIES] ruff check .
Python 3.10+ (constitutional constraint): Follow standard conventions
-
001-cgc-plugin-extension: Added Python 3.10+ (constitutional constraint)
-
001-cgc-plugin-extension: Added Python 3.10+ (constitutional constraint)
cgc_cli_plugins— plugins contribute a(name, typer.Typer)viaget_plugin_commands()cgc_mcp_plugins— plugins contribute MCP tools viaget_mcp_tools()andget_mcp_handlers()
plugins/cgc-plugin-<name>/
├── pyproject.toml ← entry-points in both cgc_cli_plugins + cgc_mcp_plugins
└── src/cgc_plugin_<name>/
├── __init__.py ← PLUGIN_METADATA dict (required)
├── cli.py ← get_plugin_commands()
└── mcp_tools.py ← get_mcp_tools() + get_mcp_handlers()
Plugin tools must be prefixed with plugin name: <pluginname>_<toolname> (e.g. otel_query_spans).
pip install -e plugins/cgc-plugin-stub # minimal test fixture
pip install -e plugins/cgc-plugin-otel
pip install -e plugins/cgc-plugin-xdebugPYTHONPATH=src pytest tests/unit/plugin/ tests/integration/plugin/ -v
PYTHONPATH=src pytest tests/e2e/plugin/ -v # e2e (needs plugins installed)