Discover and explore top open-source AI tools and projects—updated daily.
hsingjuiCode context engine for AI agents
Top 98.5% on SourcePulse
ContextWeaver addresses the challenge of providing AI agents with precise, contextually rich code snippets from local repositories. It targets AI code assistants and developers building LLM-powered coding tools, enabling deeper code understanding and more effective AI-driven development through advanced semantic retrieval.
How It Works
ContextWeaver employs a hybrid search engine combining vector (semantic) and lexical (FTS) retrieval, fused via Reciprocal Rank Fusion (RRF). Code is semantically split using Tree-sitter AST parsing for supported languages (TS, JS, Python, Go, Java, Rust), with a fallback for others. A three-stage context expansion strategy (neighbor, breadcrumb, import) enriches retrieved snippets before token-aware packing and truncation.
Quick Start & Requirements
npm install -g @hsingjui/contextweaver or pnpm add -g @hsingjui/contextweaver).~/.contextweaver/.env after running contextweaver init.contextweaver index [/path/to/repo]. Semantic search is performed via cw search --information-request "...". MCP server activation uses contextweaver mcp.Highlighted Details
Maintenance & Community
The provided README does not detail specific contributors, community channels (e.g., Discord/Slack), or roadmap links.
Licensing & Compatibility
Distributed under the permissive MIT License, suitable for commercial use and integration into closed-source projects.
Limitations & Caveats
Relies on external API keys for embedding and reranking, necessitating setup and potential costs. Unsupported languages use a less precise line-based fallback splitting mechanism.
1 month ago
Inactive