The Tree-sitter + SQLite combo for AST symbol lookup is the right call, and swapping blind grep/cat for a definition resolver is exactly where most of my agent token spend was hiding too. One thing I'd love to hear you dig into: how you handle stale index invalidation on partial writes, since that's the failure mode that eventually made me distrust the tool and re-grep anyway. The <100ms target is only useful if a returned symbol is guaranteed to reflect the file on disk at call time.