Offline symbol lookup
Planned thin wrapper over two files that already exist. No new backend needed.
Lookup order
Section titled “Lookup order”zz doc <symbol> # e.g. zz doc std.http.route | zz doc "??" | zz doc chan.send- Exact match in
docs/stdlib/reference.md(generated 691 entries) → print the module guide section (docs/stdlib/<guide>#<fn>). - Keyword match in
docs/_meta/search-index.json(keywords+excerpt) → rank pages, print top 3 paths. - Language operators (
??,|>,?,..) →docs/language/operators.mdanchor. - Error messages →
docs/guides/error-index.mdrow.
Behavior
Section titled “Behavior”- Offline: reads the local
docs/tree (or~/.zz/docs/<tag>/snapshot per VERSIONING). Never hits network. - Output is the excerpt + file path, not a pager — pipeable to
less/ editors. - Unknown symbol: list close matches via the same Levenshtein used for typo
suggestions (
did you mean).
Until it ships
Section titled “Until it ships”rg "std.http.route" docs/stdlib/python3 -c "import json; print([p['path'] for p in json.load(open('docs/_meta/search-index.json'))['pages'] if 'chan' in p['keywords']])"See Conventions for link rules the implementation must follow.