Skip to content

feat: engraph v0.4.0 — context engine#3

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

feat: engraph v0.4.0 — context engine#3
devwhodevs merged 8 commits intomainfrom
feature/v2.2a

Conversation

@devwhodevs
Copy link
Copy Markdown
Owner

Summary

Context engine transforms raw search results and vault data into agent-ready context bundles. Six functions exposed as engraph context CLI subcommands.

  • engraph context read <file> — full note content with metadata, graph edges, frontmatter/body split
  • engraph context list — filter notes by folder and/or tags
  • engraph context vault-map — vault structure overview (folders, tags, recent files)
  • engraph context who <name> — person context bundle (note + mentions + connections)
  • engraph context project <name> — project bundle (note + children + tasks + team + daily mentions)
  • engraph context topic <query> — rich topic context with character budget trimming (search + graph expansion)

Architecture

  • New src/context.rs module — pure functions taking ContextParams (store + vault_path + profile)
  • Refactored search_internal() extracted from run_search() for reuse
  • Five new Store query methods (list_files, folder_note_counts, top_tags, recent_files, edge_count_for_file)
  • All output structs derive Serialize for --json support
  • context topic loads embedder for search; all other commands are lightweight

Test plan

  • 144 unit tests passing (cargo test --lib)
  • Clippy clean (cargo clippy -- -D warnings)
  • Formatted (cargo fmt --check)
  • Live vault test: all 6 context commands verified
  • Budget trimming verified (content truncated with docid reference)
  • --json output verified on all commands
  • Manual: engraph context topic "query" --budget 8000
  • Manual: engraph context who "Person Name" --json

🤖 Generated with Claude Code

devwhodevs and others added 8 commits March 24, 2026 23:22
Reusable 3-lane RRF search function returning structured results.
run_search now delegates to search_internal then formats output.
InternalSearchResult + SearchOutput types for context engine.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
list_files with folder/tag filtering, folder_note_counts with
top-level grouping, top_tags via json_each aggregation,
recent_files by indexed_at, edge_count_for_file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NoteContent with full content, metadata, graph edges. NoteListItem
for filtered listing. VaultMap with folder counts, top tags, recent
files. ContextParams shared context. File resolution supports
docid, exact path, and basename match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Finds person note by basename, returns full content + mention edges
with snippets + wikilink connections. FTS snippet extraction with
disk-read fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Finds project note, child notes (same folder + linkers), active
tasks (unchecked checkboxes), team (people linked from project),
recent mentions in daily notes via FTS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assembles direct search results + graph expansions within a char
budget. Priority ordering: direct matches first, then 1-hop related.
Truncation with docid reference for full content. Testable without
embedder via context_topic_from_results.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Six context subcommands with --json support. Topic loads embedder
for hybrid search. All others are lightweight (no model load).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Version bump and docs update for engraph v0.4.0:
- Context engine with 6 functions (read, list, vault_map, who, project, topic)
- engraph context CLI with --json support
- search_internal extracted for reuse
- 13 modules, 144 tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@devwhodevs devwhodevs merged commit 5b14eea 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