X Bookmark Artifact Audit

Deterministic queue for reviewing every X bookmark one by one across enriched records, resolved links, self-threads, artifact replies, local media, durable objects, and workflow writeback.

Run:

npm run audit:x-bookmark-artifacts
npm run audit:x-bookmark-artifacts -- --limit 25
npm run audit:x-bookmark-artifacts -- --ids 123,456

Outputs:

Output Purpose
wiki/meta/x-bookmark-artifact-audit.json Tracked per-bookmark ledger. Preserves manual review fields across reruns.
outputs/bookmark-absorb/artifact-audit-YYYY-MM-DD.md Human next-review queue.
outputs/bookmark-absorb/artifact-audit-YYYY-MM-DD.json Full machine-readable snapshot for the run.

What It Catches

The old coverage audit proves that a bookmark is referenced somewhere in the wiki. That is necessary but not enough. A bookmark can be "covered" while its image was never inspected, its self-thread was never read, its artifact reply was skipped, or its resolved article never promoted into a tool/concept/skill page.

This audit separates those states:

Flag Meaning
source-review-required Resolved links, self-thread items, or artifact replies need inspection.
visual-review-required Local images or expected media need vision/OCR review.
video-demo-review-required A video demo exists and must be linked or preserved if source-critical.
missing-local-image:* Enriched media says images exist but local assets are incomplete.
missing-local-asset:* Manifest points to a file that is absent.
empty-local-asset:* Local media file exists but has zero bytes.
manifest-byte-count-stale:* Manifest has bytes: 0 but the local file is non-empty.
no-direct-wiki-reference The bookmark does not yet have a direct wiki reference, even if its thread/conversation may be covered elsewhere.

Review Contract

For each high-priority row:

  1. Read raw/x-bookmarks/enriched/<id>.json.
  2. Inspect resolved links and child links.
  3. Inspect self-thread and artifact replies.
  4. Open local images with vision/OCR when visual review is flagged.
  5. Link video demos or download them only when source-critical.
  6. Promote durable thoughts into wiki pages, tools, concepts, philosophies, skills, playbooks, diagrams, or person pages.
  7. Interrogate each bound brain object and workflow; update the canonical owner when the signal changes behavior or knowledge.
  8. Follow Generated Surface Contract when the review changes graph bindings, workflows, skills, redirects, qmd, or the stateful audit ledger.
  9. Preserve review notes in wiki/meta/x-bookmark-artifact-audit.json: reviewStatus, reviewedAt, reviewedBy, reviewedArtifacts, visualObservation, thoughtNotes, promotedPages, and structured decisions.

Decision Fields

A completed row is not just reviewStatus: reviewed. It must say what the bookmark did to the brain:

Field Meaning
decisions.articles Whether to create, update, merge, keep hub-only, or make no article change.
decisions.skills Whether to create/update an executable skill, keep a candidate/reference, or make no skill change.
decisions.tools Whether a tool page, routing entry, or version snapshot changed.
decisions.objects Whether durable brain objects, source bindings, or workflows changed.
decisions.versioning Whether version/release research was done, deferred, or not applicable.
decisions.rationale Short reason for the row-level call.
reviewedArtifacts Evidence that the enriched record, links, thread, replies, images, or videos were actually inspected.

Valid decision values are create, update, hub-only, candidate, merge, no-change, not-applicable, and defer.

Run the gate:

npx tsx scripts/doctor.ts --only x-bookmarks

The doctor fails when the source or ledger is broken and warns while individual bookmark decisions remain pending. This makes the 800+ row review durable across sessions without pretending that hub coverage equals learning.

The ledger is intentionally tracked because the 800+ bookmark review spans many sessions. Agents should never restart the review from scratch or claim the full corpus is reviewed without the ledger proving it.


Timeline