Context Chain
No description available
Ask AI about Context Chain
Powered by Claude Β· Grounded in docs
I know everything about Context Chain. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
context-chain
Lightweight code knowledge graph for TypeScript / JavaScript, with design-decision capture via Claude Code hooks. Tree-sitter + SQLite, no LLM calls at runtime.
Install
git clone <repo> context-chain
cd context-chain
npm install # auto-builds via the prepare hook
npm link # or: npm install -g .
npm run verify # optional β runs seven verify scripts, all should print OK
Usage
Index a project
cd /path/to/your/ts-project
context-chain index .
context-chain stats
Creates .ctx/graph.db at the project root. Re-running index rebuilds fully (no incremental).
Claude Code integration
Copy .mcp.json.example to a project as .mcp.json (Claude Code picks it up automatically when you open that project), or merge the hooks + MCP block into ~/.claude/settings.json for a user-wide setup. Both absolute paths β the dist/src/mcp.js binary and the project you indexed β must be edited.
Full hook list, output format, and flow walkthrough: doc/consumption.md.
MCP exposes three tools (record_decisions, decisions_by_keyword, reset_decision_cache). Each tool's description is self-explanatory in-client; see doc/mcp.md for background.
Architecture
Seven layers. Each has a plan doc under doc/plan-*.md with scope, decisions, and verify scenarios:
storage β extract β resolve β pipeline β decisions β mcp β consumption
Working principles: CLAUDE.md.
scope
- TypeScript / JavaScript only
- Full rebuild per
indexrun - Call resolution: named imports + same-module only. Member chains (
obj.method()), default / namespace imports, and barrel re-exports are explicitly unresolved β seedoc/plan-resolve.md - Decisions are alerts for what grep cannot find β not documentation, TODOs, or bug notes
License
Apache-2.0
