The previous single-pattern approach used a greedy `[^.\x60]*` segment
that mis-captured H3 headers without a namespace prefix (e.g. test-lib
entrypoints documented as `### \`run_tests(ctx)\``).
Replace with a two-pass match: pattern 1 captures `### \`ns.func(...)\``
(namespaced) and pattern 2 captures `### \`func(...)\`` (no namespace).
A seen-set prevents the namespace-less pass from re-matching names
already collected by the namespaced pass.
Enables test-libs to declare a public surface in their READMEs and
satisfy --lint's missing-docs check.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previous implementation matched function-declaration patterns inside
Lua line-comments, causing false-positive missing_docs warnings for
commented-out forward-compat stubs (e.g. DEPRECATED-MVP placeholders
in camera and render libs, 5 each).
Pre-process source with gsub to strip "--" through end-of-line before
running the two gmatch passes. Block comments (--[[...]]) are not
handled; not used in this project's Lua sources.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per user-greenlight option (b): function M.foo(...) syntax sugar is now
recognized in addition to M.foo = function(...) explicit-assignment.
Eliminates 7 false-positive stale_docs warnings on every existing lib
README (e.g. lib-core.input). Sugar-form is dominant in Sporel-lib code
(113 occurrences across lib-core/) - sticking to explicit-only would
have required cascade-migrating all init.lua files. This approach is
pragmatic: lint tolerant of idiomatic Lua, no source-rewriting needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Builds mermaid graph-LR source from manifest.deps + engine-calls.
Asset-libs (no deps, no engine) produce self-node-only output.
Per spec section 4.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greps engine.<namespace>.<func> patterns from Lua source via Lua-pattern.
Returns unique sorted array per spec section 4.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Set-difference between code-surface.public and README documented-list.
Returns { missing_docs, stale_docs } sorted, per spec section 4.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extracts M.<name> = function(...) patterns from Lua source; classifies
underscore-prefix as private. Pure regex-based (Lua patterns); 95%
coverage for idiomatic Sporel-Lib code per spec §4.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>