FactoryWager Wiki

Bun docs operate

Northstar: lib/docs/token-ref.tsBunToken export · tools: tools/bun-doc-refs.ts · tools/bun-docs-catalog.ts

Day commands

Intent Command
Full refresh bun run docs:refresh
Suggest token bun tools/bun-doc-refs.ts suggest <token> — frozen CANONICAL_REFS wins; prints guide example[lang] code
Guide fences Frozen bun-docs-guide-examples.ts; scrape via generate-tokens-from-docs (guides domain)
Blog ingestion CANONICAL_SOURCES + extract-metadata.ts · journey bun test tests/journey/blog-extraction.test.ts
Fetch-page SSOT fetch-page.ts · locus runtime/networking/fetch · claim fetch-page-boundaries · HTML + RSS (Accept override); conditional GET (304) stays bare fetch
Bundler sidebar nav bun tools/bun-doc-refs.ts bundler · SSOT lib/docs/bundler-nav.ts · gaps bundler-gaps.ts
Bundler anchors / gaps / tokens bundler --anchors · bundler --gaps [--json] [--strict] [--group=Extensions] · bundler --tokens
Integrity bun tools/bun-doc-refs.ts integrity · --fix / --fix-dry
Status bun tools/bun-doc-refs.ts status
Catalog export bun run docs:catalog:export
Locus bun tools/bun-doc-refs.ts locus --depth=20
Reference index bun run docs:reference-index — conditional GET of bun.com/referencetools/reference-index.json
Docs coverage verify bun run verify:docs-coverage:save — strict gate on tracked catalog/overlay/review tokens → public/registry/docs-coverage-proof.json

Loop: RSS index → reference index → scrape → catalog build → integrity log (docs:refresh). verify-all runs verify:docs-coverage:save (reads committed indexes; use --refresh-rss / --refresh-reference for live fetch).

Coverage model: RSS = what shipped · reference index = what exists on bun.com/reference · canonical-helpers = traceability · verify-docs-coverage = strict gate on FactoryWager-tracked tokens (not every generated symbol).

When integrity fails

  1. status — staleness / Bun pin
  2. integrity --fix-dry then --fix
  3. Fix dead anchors / taxonomy aliases; re-run docs:refresh

Env: DOC_INTEGRITY_AUTOFIX=1 on schedule path.

Agent entry: root AGENTS.md § Bun API references · capabilities: BUN_NATIVE_CAPABILITIES.md.

Longer command encyclopedia: git log -- docs/BUN_DOCS_OPERATE.md.