Follow-on from the STDLIB discoverability audit (docs/STDLIB.md coverage pass, 2026-07-13).
Why. handle_completion/handle_hover in src/eigenlsp.c advertise the compiled-in builtin_docs[] table and document-local symbols, but the ~75-module pure-EigenScript lib/ layer (808 public functions) is invisible to completion and hover. A user typing stats. gets nothing, so the language server does not help avoid the exact hand-roll failures the docs pass is fighting: DeslanStudio re-implemented _pr_median/_pr_mean while lib/stats.eigs shipped both; hex4/pad2 were hand-rolled twice.
What. A build-time (or first-run) generator that scrapes lib/*.eigs for public (define name(params)) definitions plus their # name of args -> type signature comment, emitting a table the LSP can serve as import-aware completion items (kind 3, Function) and hover detail. The signature-comment convention (docs/STDLIB.md "Writing Library Functions" rule 2) is the natural source; the same audit surfaced ~200 public functions whose signature comment is missing — those should be back-filled so the generated hover is accurate (tracked in the STDLIB.md "Signature-comment coverage" note).
Scope note. Ideally completion is scoped to what the file has imported (a stats. prefix offers stats.*), reusing the existing import-symbol tracking.
Acceptance. Typing a module prefix after an import offers that module’s public functions with their signature as detail; hover over a lib/ call shows its signature comment. Grounded in the repeated downstream hand-roll evidence.
Source: 2026-07-13 stdlib discoverability audit (DX/docs).
Follow-on from the STDLIB discoverability audit (docs/STDLIB.md coverage pass, 2026-07-13).
Why.
handle_completion/handle_hoverinsrc/eigenlsp.cadvertise the compiled-inbuiltin_docs[]table and document-local symbols, but the ~75-module pure-EigenScriptlib/layer (808 public functions) is invisible to completion and hover. A user typingstats.gets nothing, so the language server does not help avoid the exact hand-roll failures the docs pass is fighting: DeslanStudio re-implemented_pr_median/_pr_meanwhilelib/stats.eigsshipped both;hex4/pad2were hand-rolled twice.What. A build-time (or first-run) generator that scrapes
lib/*.eigsfor public (define name(params)) definitions plus their# name of args -> typesignature comment, emitting a table the LSP can serve asimport-aware completion items (kind 3, Function) and hover detail. The signature-comment convention (docs/STDLIB.md "Writing Library Functions" rule 2) is the natural source; the same audit surfaced ~200 public functions whose signature comment is missing — those should be back-filled so the generated hover is accurate (tracked in the STDLIB.md "Signature-comment coverage" note).Scope note. Ideally completion is scoped to what the file has
imported (astats.prefix offersstats.*), reusing the existing import-symbol tracking.Acceptance. Typing a module prefix after an
importoffers that module’s public functions with their signature as detail; hover over alib/call shows its signature comment. Grounded in the repeated downstream hand-roll evidence.Source: 2026-07-13 stdlib discoverability audit (DX/docs).