Status: open · Priority: P2 · Effort: L (~2–3 weeks) · Trigger-gated
Motivator: Static AST
callsedges miss EventEmitter wiring, ReactsetState→render, and JSX parent→child composition. Call-path and impact queries stop early on real TS/React codebases without heuristic edges — but heuristics must be tagged so agents don't treat them as type-checked facts.Roadmap: § Backlog — Agent surface & ops
| # | Decision | Source |
| --- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | --------------------------------------------------------- | ------------------------------------------ |
| L.1 | Add calls.provenance column: NULL | 'ast' | 'heuristic'. Default NULL = ast-era rows treated as ast. | Moat B |
| L.2 | Synthesis runs post-index pass after bindings — additive only; failures ignored. | Optional enrichment |
| L.3 | Moat-A filters — recipes default WHERE provenance IS NULL OR provenance = 'ast'; opt-in recipe calls-including-heuristic. | Honesty |
| L.4 | TS/React scope v1: EventEmitter on/emit, JSX child component edges, setState→render heuristic. Skip Flutter/C++/Java patterns. | TS/JS focus |
| Pattern | Edge |
|---|---|
.on('event', handler) / .emit('event') |
emitter → handler |
JSX <Child /> in component body |
parent component → Child symbol |
setState in class component |
method → render (low confidence) |
Cap fan-out per file to limit false positives.
- SCHEMA_VERSION bump —
ALTER/rebuild addscalls.provenance src/application/callback-synthesis.ts— scan files (or use jsx_elements table); insert syntheticcallsrows- Run from
run-index.tsfinally block (after bindings) - Recipe:
calls-including-heuristic, updatecall-pathdocs - Tests — fixture with EventEmitter + JSX; assert provenance tags
- Document limits in skill + MCP instructions
- Heuristic edges visible with
provenance='heuristic' - Default call-path recipe excludes heuristics unless param set
- No change to existing ast call row counts when synthesis disabled via config flag
- unresolved-calls-staging may run before synthesis
- Improves mcp-trace-explore-tools usefulness
config.synthesis.heuristicCalls: boolean default true after bake-in period.