Commit Graph
84 Commits
Author SHA1 Message Date
Colby McHenryandClaude Opus 4.6 75e9bfca04 Downgrade tree-sitter to 0.21.1 to eliminate all peer dependency warnings
All grammar packages now have compatible peer deps with tree-sitter 0.21.x,
resulting in zero warnings during npm install. Downgraded grammars:
c 0.24.1→0.23.2, php 0.24.2→0.23.11, python 0.23.6→0.23.4,
rust 0.24.0→0.23.1, swift 0.7.1→0.6.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:07:39 -06:00
Colby McHenryandClaude Opus 4.6 a4c1d32160 Upgrade tree-sitter-c, php, and rust to versions compatible with tree-sitter 0.22.4
Reduces peer dependency warnings during install by upgrading grammars that
have newer versions accepting ^0.22.x: c 0.23.4→0.24.1, php 0.23.11→0.24.2,
rust 0.23.2→0.24.0. Python 0.23.6 and swift 0.7.1 already compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:01:59 -06:00
Colby McHenryandClaude Opus 4.6 9a122b041b Move tree-sitter grammars to optionalDependencies for Windows compatibility
tree-sitter-kotlin doesn't ship prebuilt binaries for win32-x64, causing
npm install to fail on Windows without Visual Studio. All grammars are now
optional since the runtime already handles missing parsers gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 02:51:32 -06:00
Colby McHenry 2ad03d2f7d updates 2026-02-10 02:26:47 -06:00
Colby McHenryandClaude Opus 4.6 f03524f1c8 Move sqlite-vss to optionalDependencies, remove tree-sitter-liquid
sqlite-vss fails to compile on Windows — moving it to optional lets
install succeed while the code already falls back to brute-force
vector search. tree-sitter-liquid is removed entirely as it has ABI
incompatibility with tree-sitter 0.22+ and Liquid is handled by the
built-in regex extractor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:36:56 -06:00
Colby McHenry d3ba9868df WIP on security-hardening 2026-02-10 00:29:22 -06:00
Colby McHenryandClaude Opus 4.6 e07250ed60 Port bug fixes and stability improvements from PR #15
- Fix Float32Array embedder bug: was creating zero-filled array instead
  of copying data from TypedArray-like objects
- Fix VSS search query: use subquery pattern so LIMIT applies before JOIN
- Pin tree-sitter versions: remove caret ranges for ABI stability, add
  overrides to lock tree-sitter core at 0.22.4
- Lazy grammar loading: load native bindings on first use per language
  instead of all at startup, so one missing grammar doesn't affect others
- Remove stale src/extraction/queries copy from copy-assets script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:40:37 -06:00
Colby McHenry d0ee6f7fc4 Enhances code extraction and project indexing
Adds support for Dart and Liquid languages with tree-sitter parsing.
Improves accuracy of code symbol extraction for existing languages.
Indexes project files to enhance code navigation features.
Migrates build system to facilitate code contributions.
Removes git hook functionality.
Integrates Sentry for error tracking and reporting.
Enhances project initialization and configuration loading.
2026-02-09 22:18:59 -06:00
Colby McHenryandClaude Opus 4.5 f0ddfccf47 Skip global install if codegraph command already exists
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:40:29 -06:00
Colby McHenryandClaude Opus 4.5 553f623fe1 Bump version to 0.3.0
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:30:08 -06:00
Colby McHenryandClaude Opus 4.5 3ad4d5b35d Download embedding model to ~/.codegraph/models on install
The nomic-ai model is now downloaded during npm install via a postinstall
script and stored globally in ~/.codegraph/models (shared across projects)
instead of per-project in .codegraph/models.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 13:29:03 -06:00
Colby McHenryandClaude Opus 4.5 3c2022375a Bump version to 0.2.9 and update npm description
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 15:03:55 -06:00
Colby McHenryandClaude Opus 4.5 14c0d5ae88 Include README.md in npm package
- Add README.md to files array so it appears on npmjs.com
- Bump version to 0.2.8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:23:40 -06:00
Colby McHenryandClaude Opus 4.5 214ea0dbb0 Update README to clarify installer auto-configures CLAUDE.md
- Add note that installer updates ~/.claude/CLAUDE.md in Quick Start
- Rename "Recommended: Add Global Instructions" to "Global Instructions Reference"
- Clarify that instructions are added automatically, shown for reference
- Bump version to 0.2.7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:21:15 -06:00
Colby McHenryandClaude Opus 4.5 a4ddedb197 Add Liquid template language support for Shopify themes
- Add 'liquid' to Language type and default include patterns
- Create LiquidExtractor with regex-based extraction (tree-sitter-liquid has ABI issues)
- Extract render/include/section references as component nodes
- Extract schema blocks as constant nodes with parsed names
- Extract assign statements as variable nodes
- Create file relationship edges for snippet/section references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:59:40 -06:00
Colby McHenryandClaude Opus 4.5 8d1fb680e5 Installer now creates/updates CLAUDE.md with CodeGraph instructions
- Added claude-md-template.ts with the instructions template
- Installer writes to ~/.claude/CLAUDE.md (global) or ./.claude/CLAUDE.md (local)
- Smart detection: updates existing CodeGraph section or appends if not found
- Uses HTML comment markers for reliable section replacement on upgrades

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:30:13 -06:00
Colby McHenryandClaude Opus 4.5 1ca43a85e0 Installer now installs codegraph globally
The installer runs `npm install -g @colbymchenry/codegraph` so users
can simply run `codegraph init -i` instead of the full npx command.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:20:53 -06:00
Colby McHenryandClaude Opus 4.5 26f8f2f59f Fix next steps to use npx instead of global codegraph command
Users running via npx don't have the codegraph command installed
globally. Update installer message and README to use
npx @colbymchenry/codegraph init -i instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:18:47 -06:00
Colby McHenryandClaude Opus 4.5 c87c5487aa Fix ESM import error for @xenova/transformers
Change static import to dynamic import() for @xenova/transformers
which is an ESM-only package. This fixes ERR_REQUIRE_ESM when
running via npx in CommonJS environments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:11:40 -06:00
Colby McHenryandClaude Opus 4.5 1c8144ba08 Bump version to 0.2.1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:37:41 -06:00
Colby McHenryandClaude Opus 4.5 9baf59e5f0 Add interactive CLI installer for Claude Code integration
- New `codegraph install` command and auto-run when invoked with no args
- Beautiful ASCII banner using figlet
- Interactive prompts for global (~/.claude) or local (./.claude) installation
- Writes MCP server config to claude.json
- Writes auto-allow permissions to settings.json
- For local installs: auto-initializes project, indexes, and installs git hooks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:31:29 -06:00
Colby McHenryandClaude Opus 4.5 0a1b78854a Hybrid approach: Explore agents use CodeGraph for faster lookups
Updated documentation to recommend instructing Explore agents to use
CodeGraph tools (search, callers, callees, context) for faster code
exploration instead of file scanning.

Benchmark results show ~30% fewer tokens and ~25% fewer tool calls
when Explore agents leverage CodeGraph for graph-based lookups.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:09:15 -06:00
Colby McHenryandClaude Opus 4.5 ef6f2ae50b codegraph_explore now reads code internally (sub-agent behavior)
Instead of returning file paths for Claude to read separately,
codegraph_explore now:
- Reads relevant files internally using fs
- Extracts code snippets for key symbols (functions, types, APIs)
- Includes the code directly in the response
- Returns a synthesis with data flow and key code included

This matches native explore agent behavior where file reading
happens in the sub-agent context, keeping main context clean.

Bump version to 0.1.8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 03:16:05 -06:00
Colby McHenryandClaude Opus 4.5 0ecd195f15 Add explicit action items to codegraph_explore output
- Move warnings to TOP of output so Claude sees them first
- If existing implementations found: "STOP: Similar implementations exist!"
- If feature request: "BEFORE PLANNING: Use AskUserQuestion to clarify..."
- Update tool description to emphasize checking existing code first
- Fixes issue where Claude listed questions but never asked them

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 03:04:11 -06:00
Colby McHenryandClaude Opus 4.5 43cee17dc3 Make codegraph_explore language-agnostic
- Pattern generation now uses multiple naming conventions:
  PascalCase, snake_case, and camelCase
- Common suffixes/prefixes work across languages (Service,
  Handler, Controller, handle_, create_, etc.)
- Removed JS/React-specific patterns like useBundle, SwapDialog
- Bump version to 0.1.6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 02:53:50 -06:00
Colby McHenryandClaude Opus 4.5 0c168c4d8b Add codegraph_explore tool and expand exclude patterns
- Add codegraph_explore MCP tool for deep exploration with condensed output
- Expand default exclude patterns for framework build outputs (.next, .nuxt, .expo, etc.)
- Increase node ID hash length from 16 to 32 chars to prevent collisions
- Add feature request detection with UX clarification reminders
- Update README with MCP tools reference and best practices
- Update CLAUDE.md with context usage guidelines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 02:42:34 -06:00
Colby McHenryandClaude Opus 4.5 b1c6d672db 0.1.4
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 00:50:53 -06:00
Colby McHenry 18b891a62a bump version 2026-01-18 19:04:14 -06:00
Colby McHenry 8f34ce7b13 0.1.2 2026-01-18 18:56:10 -06:00
Colby McHenryandClaude Opus 4.5 6b672f9152 Add evaluation framework and fix call graph extraction
- Add evaluation test suite with TypeScript and Python fixtures
- Fix MCP server to defer CodeGraph init until rootUri received
- Fix call edge extraction by calling resolveReferences() after indexAll/sync
- Fix glob matching for root-level files (e.g., **/*.py now matches auth.py)
- Fix duplicate node extraction for methods inside classes
- Update context tests to use buildContext for semantic search + graph traversal
- Export unused formatter functions to fix build

Evaluation results:
- TypeScript: 96% precision, 79% recall, 85% F1
- Python: 99% precision, 80% recall, 85% F1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 18:48:22 -06:00
Colby McHenry e306114607 update readme 2026-01-18 17:04:50 -06:00
Colby McHenry 91aa545f59 rename 2026-01-18 16:53:17 -06:00
Colby McHenry ac81eb036e rename 2026-01-18 16:51:42 -06:00
Colby McHenry cc6e7a5c89 Init 2026-01-18 16:25:00 -06:00