NAVIGATION
ELOWEN DOCUMENTATION

Last updated: 10 October 2026

Browse documentation · Documentation indexing
Developer reference

Documentation indexing

The bundled elowen-docs plugin owns the product documentation corpus and search. It uses the existing PluginContext.pluginDirs() discovery seam for bundled and installed registry plugins, and the existing embeddings and docs control seams. Core does not import a plugin implementation.

resolveDocsRoot finds the numbered manual next to the package. readCorpus reads numbered Markdown pages under docs/site, including nested topics, plus the curated docs/modules and docs/plugin-author trees. The package explicitly ships those two developer trees. Private plans, reviews, tools notes, audit files and top-level operator references are outside that allowlist. Missing curated trees are an installation error, not an empty corpus.

readPluginDocs walks each manifested plugin's docs/ directory recursively. It skips symbolic links and non-Markdown files, preserves the full relative path and follows the first-root-wins identity rule. Installed plugins are searchable even when disabled. A plugin without a docs directory contributes nothing; genuine read errors reach the tool error result.

The corpus fingerprint includes sorted full paths, content, embedding model and dimension. Moving or changing a nested page invalidates the same index as any other documentation update. Rebuilding remains lazy, single-flight and transactional. A failed embedding or database write is reported; no half-built index is published.

Chunks use the page title and heading ancestry, with long sections bounded near 1,500 characters. The same search ranks passages for the model's DocsSearch tool and docs.search(query, limit). The control continues returning path, title, heading and text; no host contract changed. Without configured embeddings, keyword ranking uses Intl.Segmenter's whole-word boundaries and standard BM25 frequency and length normalization, with heading matches weighted three times above prose. It avoids matching short words inside unrelated product words. Keyword results retain the best-scoring chunk per full citation path before applying the requested limit, so long technical pages cannot crowd other relevant pages out of the result. This selection applies to keyword fallback; semantic ranking remains unchanged. Scores are normalized within the query and remain ranking values, not confidence. The result explicitly identifies keyword mode. English product terms in a Czech question may match literally; meaning across languages requires the configured embedding model.

The landing renderer consumes numbered manual pages, curated developer trees and plugin documentation by their frontmatter. Titles, unique slugs, numeric order, group and eyebrow identify a page independently of its nested file path. User guides and plugin implementation pages use distinct groups. Keep public slugs stable when moving a file.

Real consumers are the command palette's explicit Ask AI action and the DocsSearch tool. Regression coverage is in tests/plugins/elowenDocsPlugin.test.ts and tests/plugins/elowenDocsPluginDocs.test.ts. The seam catalog remains authoritative.