codegraph is a local-first code context engine and MCP server. Keep the core engine client-agnostic. Put Codex, Gemini, and other client guidance in docs or examples rather than hard-coding client behavior into the binary.
cmd/codegraph: main entrypoint and command bootstrapinternal/appname: centralized product naming for easy renameinternal/config: config loading, path resolution, install defaultsinternal/cli: command handlers and JSON/text outputinternal/store: SQLite connection, migrations, persistenceinternal/indexer: repository scan, hashing, incremental updatesinternal/parser: parser interfaces and language adaptersinternal/query: symbol, caller, callee, impact, and stats queriesinternal/search: lightweight local semantic rankinginternal/mcp: stdio MCP server and tool routinginternal/export: JSON and DOT exportinternal/watcher: file watch and debounced updates
- Preserve the local-first architecture
- Prefer one-binary workflows and minimal runtime dependencies
- Keep public interfaces narrow and explicit
- Use SQLite migrations for schema changes
- Keep JSON responses concise and predictable
- Avoid adding cloud services, heavy UI, or client-specific behavior in core packages
- Use
codegraphMCP for codebase exploration and context queries when available (codegraph serve --repo-root <repo>).
- Run
go test ./...when tests exist - Run
go build ./cmd/codegraph - For indexing changes, verify
codegraph index,codegraph update, andcodegraph stats - For MCP changes, verify
codegraph servestill answerstools/listandtools/call - Prefer MCP-backed checks (
tools/list,tools/call) before adding ad-hoc local inspection scripts.
- Keep
README.mdandCHANGELOG.mdaligned with shipped behavior for each tag. - Add a new changelog section for each release (for example
v1.0.2 -> v1.0.3) before tagging. - Tag releases with semantic version tags (
vX.Y.Z) after tests/build pass.