Goal
Ship the F1–F5 phases ratified in plans/preview-search.md: build the manifest indexer, the search page, the pre-commit Gate 4 wiring, the cross-page search affordance, and the spot-check + idempotency proof. Result: preview.offplan.online/search/ returns live keyword results across every canonical-store artefact within <100 ms on a phone.
Tasks
- [x] F1 —
scripts/build_search_index.py+docs/rendered/search/manifest.json+manifest.meta.json+ 15 unit tests attests/test_build_search_index.py(idempotent; stdlib-only; ~250 LOC). - [x] F2 —
docs/rendered/search/index.html(vanilla JS, ~1150 LOC including canonical CSS + scorer + UI). Sticky input, kind/status chips, date-decay + grouping toggles, ~80-line scorer with field weights + inlinekind:/status:/author:/"phrases", up to 3 snippets per row, supersedes → successor link,/focus + ↑↓ select + Enter open + Esc clear, URL hash sync, recent + curated empty-state. - [x] F3 —
scripts/hooks/pre-commitGate 4 (soft-fail manifest regen) +.claude/commands/handoff.mdStep 4.5(b2) + Step 6 stage hook. - [x] F4 — Cross-page search link in
scripts/build-rendered-index.py,scripts/render_about.py,scripts/render_md.py(all clearly-commented# === P11f search link ===blocks). - [x] F5 — Idempotency proof + spot-check 5 queries + mobile sanity check at ~360 px.
What's Next
F1–F5 are shipped on branch vault/p11f-search-build (pushed, not merged). Next: PR review, merge to main, watch the Cloudflare deploy land at preview.offplan.online/search/.
Key Context
- Plan: preview-search — F1–F5 phases verbatim.
- Parent workstream: repo-as-canonical-store-vault — § P11f bullet.
- Composes with P11b (
render_md.py<meta>contract), P11e (about-pages — manifest'sabout_urlresolves to<slug>/), P12 (pre-commit Gate 3 pattern; Gate 4 here uses the same Bash 3 compat). - Visual register: canonical (Skeleton White / Helvetica Neue 200-300 / Inter body / JetBrains Mono mono / oxidised pills).
- Manifest is committed (not gitignored) so the Cloudflare Pages deploy from
docs/rendered/carries it without a CI build step.
Session Log
- vault-p11f-search-build (2026-05-11, parallel-agent worktree
vault/p11f-search-build): Shipped F1–F5 in one pass. F1 emits 113-entry, ~188 KB manifest in <1 s on Roman's Mac; 15 unit tests pass. F2 inlines a ~1150-LOC search page (CSS + HTML + JS) — homegrown scorer, snippet rendering with HTML-escape-then-mark, full keyboard ergonomics, recent + curated empty state, hash deep-link sync. F3 wires Gate 4 (Bash 3 compatible, soft-fail) + handoff Step 4.5(b2). F4 adds clearly-commented search-link affordance to index, about, and full-render footer; regenerated 124 outputs. F5 confirms idempotency (second--allrun is a no-op) + spot-checksstripe,P11f,forge,CONV-30,kind:plan canonicalagainst the live manifest.