Skip to content

feat(graph): US-GF-03 query_graph NL scoped subgraph#84

Merged
linhdmn merged 2 commits into
mainfrom
feature/query-graph
Jul 19, 2026
Merged

feat(graph): US-GF-03 query_graph NL scoped subgraph#84
linhdmn merged 2 commits into
mainfrom
feature/query-graph

Conversation

@linhdmn

@linhdmn linhdmn commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

  • Implements US-GF-03 / REL-042 / FR-GF-05: MCP query_graph(question, token_budget?, max_depth?) — keyword seed retrieval → bounded BFS expand (or shortest path for "what connects A to B?") → token-budget trim → TOON via existing MCP envelope. Every edge carries confidence_label (EXTRACTED / INFERRED / AMBIGUOUS).
  • Implements FR-GF-06: CLI leankg graph-query "<question>" and leankg query --kind subgraph (existing --kind name|type|… unchanged).
  • Replaces unused dead-code stub in src/graph/nl_query.rs with the real Graphify-style scoped subgraph pipeline; marks tracker rows DONE.

Test plan

  • cargo test --release --lib (668 passed)
  • cargo test --release --lib nl_query (5 passed)
  • cargo test --release --test mcp_tools_redundancy_tests query_graph
  • cargo test --release --test redundant_tools_matrix
  • cargo clippy --release --lib -- -D warnings
  • leankg graph-query --help
  • Manual: index a small project and run leankg graph-query "what connects X to Y?"

Made with Cursor

linhdmn added 2 commits July 19, 2026 10:42
Add MCP query_graph and CLI graph-query / query --kind subgraph:
seed retrieval → BFS/path expand → token-budget trim with provenance
labels on every edge (REL-042 / FR-GF-05 / FR-GF-06).
Strengthen US-GF-03 MCP assertions (seeds, provenance, budget, empty
question), create persona fixture so agent_focus/diary pass, register
schema checks, and add scripts/mcp-smoke-tools.py with honest skip labels.
@linhdmn
linhdmn merged commit a752654 into main Jul 19, 2026
4 checks passed
@linhdmn
linhdmn deleted the feature/query-graph branch July 20, 2026 17:51
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