Problem
When reviewing a PR or debugging a regression, the key question is: "what changed and what does it affect?" Mache already has the AST graph and callers/callees virtual dirs, but there's no way to go from a git diff to the set of affected graph nodes and their transitive dependents.
Proposed solution
A detect_changes capability that:
- Takes a git diff (or two refs) as input
- Maps changed byte ranges to affected AST nodes in the projected graph
- Traces the blast radius via callers/callees to show transitive impact
- Outputs affected node paths (readable via the mounted filesystem)
Possible interface
A virtual directory like _changes/ at the root that reflects the current git diff HEAD:
_changes/
modified/ # nodes whose source changed
pkg/functions/Validate/source
affected/ # transitive callers/callees of modified nodes
pkg/functions/HandleRequest/source
cmd/functions/main/source
Or a .query/-style interface: cat .query/changes?ref=HEAD~3
Prior art
codebase-memory-mcp implements detect_changes as an MCP tool that maps git diffs to graph nodes and traces blast radius. Mache's filesystem interface would make this more powerful — agents could ls and grep the affected set directly.
Context
The graph infrastructure (callers/, callees/, SourceOrigin byte ranges) is already in place. The main new work is git diff parsing → byte range mapping → transitive BFS.
Problem
When reviewing a PR or debugging a regression, the key question is: "what changed and what does it affect?" Mache already has the AST graph and callers/callees virtual dirs, but there's no way to go from a
git diffto the set of affected graph nodes and their transitive dependents.Proposed solution
A
detect_changescapability that:Possible interface
A virtual directory like
_changes/at the root that reflects the currentgit diff HEAD:Or a
.query/-style interface:cat .query/changes?ref=HEAD~3Prior art
codebase-memory-mcp implements
detect_changesas an MCP tool that maps git diffs to graph nodes and traces blast radius. Mache's filesystem interface would make this more powerful — agents couldlsandgrepthe affected set directly.Context
The graph infrastructure (callers/, callees/, SourceOrigin byte ranges) is already in place. The main new work is git diff parsing → byte range mapping → transitive BFS.