SIGN IN SIGN UP

feat: [ENG-2861] context-tree index generator + regeneration hooks

Generate and auto-maintain `_index.html` — the navigation index over
the context tree, built from the ENG-2860 vocabulary.

- IndexGenerator (`generateContextTreeIndex`): walks the context tree,
  aggregates the title/summary/tags the agent already authored on each
  topic (HTML <bv-topic> attrs + legacy .md frontmatter), groups by
  domain, and atomically writes a <bv-index> document. Deterministic
  full regen — output is byte-stable except `generatedat`. Self-checks
  via validateHtmlIndex before the write. No LLM, no provider.
- Regeneration hooks (best-effort — never fail the triggering op):
  curate-html-direct (daemon), CLI continueSession curate, and
  dream-finalize. A stale index is recoverable via the command below.
- `brv index rebuild` — manual full regen for first-time adoption,
  recovery, or post-manual-edit. In-process, no daemon required.
- escapeHtmlAttributeValue exported from html-writer for reuse.

Derived-artifact exclusion (ENG-2860) keeps `_index.html` out of BM25
indexing and query results, so the generator never self-references it.
D
Danh Doan committed
735df4fada004e2f1224b3fe8e04c26223da4037
Parent: d6bd4cf