## Scope Deliberately small and strictly opt-in. `docs/TODO.md` declares Lua's heuristic inference sufficient for a dynamic language, and this issue does not reopen that. But for the subset of Lua codebases that carry **EmmyLua/LuaCATS annotations** (`---@class`, `---@param`, `---@return` — common in Neovim plugins, game codebases, and LuaLS-checked projects), the annotations are machine-readable type facts CGR currently ignores. ## Plan An optional adapter around `lua-language-server` (LuaLS): - Run LuaLS headless against the repo, request definitions/types per call site over LSP (or consume `--check` JSON output where sufficient). - Translate to `LanguageFrontend` fact families: resolved_call_sites for annotated-class method calls (`---@class Foo` + `foo:method()` binding), expression_types feeding `parsers/lua/type_inference.py`, external proofs for stdlib. - Only activated by explicit flag (`LUA_FRONTEND: heuristic | luals`) *and* a LuaLS binary on PATH; anything else is today's behaviour. ## Tests Fixture Lua repo with annotated classes/modules: method call on an `---@class`-typed object resolves to the right definition; unannotated code behaves identically to heuristics. Priority: low — after the Lua FLOWS_TO descriptor issue, which is independent and higher value. Depends on the `LanguageFrontend` protocol issue.