Skip to content

feat: engraph v0.3.0 — vault graph and graph search agent#2

Merged
devwhodevs merged 8 commits intomainfrom
feature/v2.1
Mar 24, 2026
Merged

feat: engraph v0.3.0 — vault graph and graph search agent#2
devwhodevs merged 8 commits intomainfrom
feature/v2.1

Conversation

@devwhodevs
Copy link
Copy Markdown
Owner

Summary

  • Vault graphedges table storing bidirectional wikilink edges (546 edges / 273 pairs on test vault) and people mention edges (77 mentions). Built during indexing after all files are written.
  • Graph search agent — 3rd RRF lane that expands seed results by following wikilinks 1-2 hops. Decay scoring (0.8x for 1-hop, 0.5x for 2-hop), relevance filtering via FTS5 term check and shared tags, multi-parent merge.
  • engraph graph CLIengraph graph show <file> displays incoming/outgoing wikilinks and mentions. engraph graph stats shows vault-wide graph overview.
  • People detection — Notes in the configured People folder become entities. Indexer scans all files for name/alias mentions and creates mention edges. Alias extraction from YAML frontmatter.
  • Status output — Now includes edge counts (Edges: 623 (546 wikilinks, 77 mentions)).

New commands

engraph graph show <file_or_docid>    Show connections for a note
engraph graph stats                   Vault graph statistics

Architecture changes

  • 11 modules → 12 (graph.rs added)
  • SQLite schema adds edges table with indexes + ON DELETE CASCADE
  • Search pipeline: [semantic, FTS, graph] → 3-lane RRF fusion
  • Edge building phase added to indexer after chunk/FTS writes

Test plan

  • 119 unit tests passing (cargo test --lib)
  • Clippy clean (cargo clippy -- -D warnings)
  • Formatted (cargo fmt --check)
  • Live vault test: 84 files, 857 chunks, 623 edges (546 wikilinks, 77 mentions)
  • Graph expansion visible in --explain output
  • People detection with alias extraction from frontmatter
  • Schema migration from v0.2 databases (edges table auto-created)
  • Manual: engraph graph show <note> on various notes
  • Manual: engraph search "person name" --explain to verify graph lane

🤖 Generated with Claude Code

devwhodevs and others added 8 commits March 24, 2026 21:39
Add edges table to SQLite for vault graph. Supports wikilink and
mention edge types. Bidirectional cleanup on delete_edges_for_file.
ON DELETE CASCADE handles file deletion. INSERT OR IGNORE for dupes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…edge stats

BFS-based neighbor traversal (Rust loop, not recursive CTE).
Shared tags via JSON query. FTS5 term presence check with escaping.
Best chunk lookup for snippet resolution. Edge statistics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Byte-scanning wikilink extractor handles [[target]], [[target|display]],
[[target#heading]], skips embeds (![[...]]). Deduplicates targets.
Query term extraction for graph agent relevance filtering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1-2 hop expansion with decay (0.8x for 1-hop, 0.5x for 2-hop).
Relevance filter: must contain query term (FTS5) or share tags.
Multi-parent merge takes highest score. Skips seed files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wikilink extraction runs on raw file content during indexing.
Targets resolved by exact path then basename match (case-insensitive).
Bidirectional edges inserted. People detection scans for name mentions
in non-People files, with alias extraction from frontmatter. Rebuild
clears edges before building.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Graph lane expands seed results from semantic + FTS by following
wikilinks. Weight 0.8 (slightly below direct lanes). Detail field
on LaneContribution shows hop info in --explain output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
'engraph graph show <file>' displays outgoing/incoming wikilinks
and mentions. Supports file path, basename, or #docid resolution.
'engraph graph stats' shows vault graph overview.
Status output now includes edge counts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Version bump and docs update for engraph v0.3.0:
- Vault graph with wikilink + mention edges
- Graph agent as 3rd RRF search lane
- engraph graph show/stats CLI
- 119 tests, 12 modules

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@devwhodevs devwhodevs merged commit 634616e into main Mar 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant