BookStore โ€” Facts Wiki

๐Ÿ“š BookStore โ€” Facts Wiki

An educational demo of the “facts cache” pattern: understand a page in a codebase once, write down the distilled, reusable truth about it as a page-wiki.md, anchor that file to the source by git blob hash, and then reuse the facts instead of re-reading the source every time โ€” saving tokens. When the source changes, the anchor goes stale and you re-read only then.

โ–ถ Live: try the bookstore app ยท browse the facts ยท wiki index

This repo has two halves:

And a small CLI that makes the loop runnable and measurable:

node tools/facts.mjs resolve "add to cart button"   # which page is this about?
node tools/facts.mjs check    book-detail            # are the facts still fresh vs source?
node tools/facts.mjs compare  book-detail            # tokens: re-read source vs reuse facts
node tools/facts.mjs demo     "add to cart button"   # the whole loop, end to end

Fully self-contained and non-proprietary โ€” no company code. Purely for learning/experimenting with the pattern.