Skip to content

feat(scout): ground Recall:scout in the native code KG (#207)#213

Merged
edheltzel merged 1 commit into
mainfrom
worktree-phase2c-scout-kg
Jun 28, 2026
Merged

feat(scout): ground Recall:scout in the native code KG (#207)#213
edheltzel merged 1 commit into
mainfrom
worktree-phase2c-scout-kg

Conversation

@edheltzel

Copy link
Copy Markdown
Owner

What

Wires the merged Phase 2a/2b native code-KG surfaces into commands/Recall/scout.md so /Recall:scout is graph-grounded for every user — no external .codegraph/ dependency required.

Closes #207. Advances #85 (update Recall:scout). Parent epic #196 · Phase 2c · spec .agents/atlas/plans/2026-06-25-kg-schema-design.md §5.

Value

Scout already led with memory and optionally leaned on the external codegraph MCP tool. That tool isn't installed for most users, so the graph grounding was effectively opt-in. Phase 1+2a+2b shipped a native KG (code_* tables, recall index, and the verbs recall callers/callees/trace + the join recall code-context) that lives in the same SQLite DB as memories — so scout can now be graph-grounded by default, and can do something the external tool fundamentally can't: tie decisions and learnings to the code they're about.

Changes (surgical — per KarpathyGuidelines)

commands/Recall/scout.md:

  • Repo map / Key paths / Risks ground in a code graph native-first, with graceful fallback: native KG → external codegraph (.codegraph/ + codegraph_explore) → grep/tree-walk backstop. The graph is an enhancement, never a hard dependency (mirrors the prior codegraph framing).
  • New step + report section — "Decisions & learnings tied to the key files" — runs recall code-context <relpath> to surface the memory↔code join (spec §5), the unique angle external codegraph can't reach.
  • Native-KG presence/empty detection is described in terms of the verbs' actual output (No code symbol matched / not indexed → offer recall index; Run 'recall init' capability error → recall init).
  • Sensitive-data boundary kept intact and reinforced: the code-graph verbs are named as the sanctioned, project-scoped interface to the DB — never raw SQL against recall.db.

Doc alignment (DOX): commands/AGENTS.md and docs/slash-commands.md updated to describe native-first grounding and the new report section.

Verification

Every command's syntax and output shape was confirmed by reading the merged CLI (src/commands/code-graph.ts, src/commands/code-context.ts, src/index.ts) and by a dry scout pass against this repo's own indexed graph using a scratch RECALL_DB_PATH (never the live ~/.agents/Recall/recall.db):

  • empty graph → callers prints No code symbol matched …; code-context prints … not indexed … Run \recall index` first.`
  • after recall index src (71 files, 807 nodes, 5161 edges) → callers/callees/trace/code-context all return the expected path:line / call-path / symbol-count shapes.

No code touched; doc-only change, no build/lint impact. No regression to the non-KG scout path.

Wire the Phase 2a graph verbs (recall callers/callees/trace) and the
Phase 2b memory↔code join (recall code-context) into commands/Recall/scout.md
so scout is graph-grounded for every user without the external .codegraph
dependency.

- Repo map / Key paths / Risks now ground native-first: Recall's own KG ->
  external codegraph (.codegraph/ + codegraph_explore) -> grep/tree-walk
  backstop. The graph stays an enhancement, never a hard dependency.
- New scout step + report section: "Decisions & learnings tied to the key
  files" via recall code-context — the memory↔code angle no external
  code-graph tool can do (one SQLite DB alongside memories, per spec §5).
- Sensitive-data boundary kept intact and reinforced: the code-graph verbs
  are the sanctioned project-scoped interface; never raw SQL on recall.db.
- Aligned commands/AGENTS.md and docs/slash-commands.md to the new behavior.

Command syntax/output verified against this repo's indexed graph using a
scratch RECALL_DB_PATH (callers/callees/trace/code-context, empty + populated
states), never the live ~/.agents/Recall/recall.db.

Closes #207. Advances #85.
@edheltzel edheltzel merged commit 92bed52 into main Jun 28, 2026
2 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.

Phase 2c: wire native KG into Recall:scout (advances #85)

1 participant