Feat/graph neighbors context expansion#185
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds graph-aware retrieval, proposal lifecycle changes, HTTP/JSONL transport support, sync and diff commands, adapter installers, and documentation/tests across the KB toolchain. ChangesKB retrieval, transport, and workflow expansion
Sequence Diagram(s)No additional diagram. Estimated code review effort🎯 5 (Critical) | ⏱️ ~90+ minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
ed2341a to
53d66eb
Compare
53d66eb to
552eeec
Compare
|
@plind-junior Please review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 552eeec4bd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What changed
Adds graph-aware retrieval: kb.neighbors / vouch neighbors walks Relation edges and structural links (claim→entity, page→claim, supersede/contradict) from any claim, page, entity, or source. kb.context / vouch context gains optional --expand-graph to pull neighbors into context packs after search hits, tagged with backend: "graph". New module src/vouch/graph.py; wired through MCP, JSONL, HTTP, CLI, and capabilities.
Closes #184
Why
Search and context packs are FTS/embedding driven today. The KB already stores entities, relations, and lifecycle edges (e.g. supersede writes relation artifacts for graph traversal), but nothing used the graph at retrieval time. Agents asking about a topic often need linked entities, related decisions, and page-included claims — one hop from a hit but invisible to kb.search alone.
What might break
No breaking changes for existing .vouch/ directories.
VEP
Not required — additive read-only method plus optional context params. No object model or on-disk layout changes. A spec/methods.md entry can follow in a separate docs pass before 1.0.
Tests
make checkpasses locally (lint + mypy + pytest)CHANGELOG.mdupdated under## [Unreleased]Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation