---
slug: the-corpus-now-writes-its-own-work-queue
title: This site now derives its own work queue — and exports itself as an Obsidian vault
canonical: https://miscsubjects.com/a/the-corpus-now-writes-its-own-work-queue
---

On August 2, 2026, this system gained three connected capabilities in one session: article bodies now carry Obsidian-style `[[wikilinks]]` that render as ordinary links on the site and resolve natively in Obsidian; the entire corpus exports as a working Obsidian vault whose index, log, health report, and work queue are generated from the live database; and the system now computes, on demand, a ranked answer to the question every content operation struggles with — *what should be written next?* This page documents the mechanism with the receipts from the session that shipped it.

## The idea this merges

Andrej Karpathy published a pattern in 2026 he called the LLM wiki: instead of retrieving documents and re-synthesizing them on every question, keep a *compiled* knowledge base — markdown pages an LLM maintains — where every new source revises the existing pages rather than merely joining an archive. Three operations run it: **ingest** (new material updates many pages, not one), **query** (answers get filed back in), and **lint** (a standing health check for contradictions, orphan pages, stale claims, and missing cross-references). Two files anchor it: an `index.md` catalog and an append-only `log.md`. The closing point of his note reaches back to Vannevar Bush's 1945 Memex essay: a personal store of knowledge with associative trails between documents was designed eighty years ago, and the unsolved part was always who does the maintenance.

This system already had most of the hard parts: 2,264 articles in one database, claims with tiers and hash-chained sources, a public events ledger, an outreach pipeline with tracked sends and reply routing. What it did not have was the compiled-wiki discipline — no inbound-link index, no orphan detection, no mechanical answer to "what next," and an export that produced files without the graph. The merge kept this site as the canonical store and adopted exactly the parts of the wiki pattern that compound: the link graph, the lint pass, the queue, and the vault as a lossless projection.

## Links now round-trip between the site and Obsidian

An author — human or model — can now type `[[adjudication-calibration-study]]` or `[[adjudication-calibration-study|the calibration study]]` in any article body. On the reader's page it renders as a normal link to that article, with the article's real title as the text when no label is given. This paragraph does it live: the calibration numbers this system publishes are at [[adjudication-calibration-study]], and the full capability inventory is at [[the-build-end-to-end]].

Two details carry the weight:

A wikilink to a page that does not exist renders as a marked, unlinked span — and becomes a row in the system's gap report. A typed link to a missing page is treated as an authored request for that page. This is not hypothetical: the first run of the gap scan found **163 distinct missing pages already being requested by published bodies** — models writing the OIP corpus had been typing wikilinks to pages like `oip-total-structure` (requested by 171 different articles) that no one ever created. The queue found real, latent demand that had been invisible for weeks.

On export, the transform inverts. Canonical links (`/a/slug`) and typed wikilinks both become vault-resolvable wikilinks (`[[Peptides/bpc-157/README|label]]`), so Obsidian's graph view, backlinks pane, and unresolved-links report all work on the exported corpus with no plugins. A four-assertion round-trip test proves no link target is lost in either direction, and it runs in CI on every push.

## One derivation: the graph, the lint, the queue

Three public endpoints now serve one derivation over the whole corpus:

**`/api/articles/graph-links`** builds the full edge set from three sources: declared embeds, markdown links to `/a/` pages, and typed wikilinks. First live run: **3,386 edges across 2,264 articles**, with inbound links (backlinks) computed for every page — a structure that did not exist anywhere in the system before this session.

**`/api/articles/graph-lint`** is Karpathy's third operation, mechanized: orphans (no inbound links — 1,715 on first run, an honest number discussed below), missing pages (163), articles carrying claims with no source (494), articles with claims under active challenge (32), and stale hubs (heavily-linked pages that stopped moving — 0 at the current threshold). Every finding names the page and the defect. The pass is pure derivation: run it twice against an unchanged corpus and it returns identical output.

**`/api/articles/next-acts`** turns the lint into a ranked queue, and this is the piece that changes the loop. At generation time 2026-08-03T02:48:38Z the top of the live queue read: `write oip-total-structure (score 271)` — wikilinked from 171 articles, no page exists; `write oip-machine-plane (110)`; `write oip-ground (103)`. Below the writing acts sit `resolve` (challenged claims), `source` (unsourced claims), `revise` (stale hubs), `connect` (orphans) — and then the outward half: `respond` (unread replies outrank everything else in their band, because responses update priors), and `outreach` (high-fit audience classes that have gone quiet). Content work and outreach work come off the same queue, computed from the same graph. Performing the top act and re-running the derivation *is* the loop.

## The vault: the whole system as a folder of markdown

`GET /api/articles/obsidian-vault` (or `node scripts/obsidian_pull.mjs --all`) now produces a version-3 vault. The session's verification run pulled **370 files** for a two-article slice and verified **369 of 369 content hashes** against the `SHA256SUMS` manifest the server generates (the manifest does not hash itself).

What lands on disk, and why each file exists:

- **`index.md`** — Karpathy's catalog: every page, one line, with role, claim count, source count, backlink count, and last-updated date, grouped by ontology folder. The first file a model opens.
- **`log.md`** — the append-only chronology, projected from the live events ledger. The ledger stays canonical; the file is a read model.
- **`SCHEMA.md`** — the maintainer contract: the three operations, the authority rule, the conventions. **`CLAUDE.md`** and **`AGENTS.md`** are three-line pointers to it, so Claude Code, Codex, and any agentic CLI that auto-loads root files inherits the same contract from the same source.
- **`lint.md`** and **`next.md`** — the health report and the ranked queue, as files, regenerated on every pull from the same derivation the API serves.
- **`Misc.base`** — an Obsidian Bases file (the native database view that shipped in Obsidian 1.9): a table of every article grouped by role with claim/source sums, an Orphans view filtered to `backlinks == 0`, and a claim-atom view by tier. No Dataview plugin required.
- **`_MOC/graph.canvas`** — a JSON Canvas 1.0 map of the ontology folders and their top pages, edges drawn from declared embeds.
- **`.obsidian/`** — graph color groups per ontology folder, so the vault opens looking organized rather than gray.
- **Per-article folders** — README with the full body (links converted), a `Linked from` backlinks section, YAML properties typed to Obsidian's conventions (ISO dates, list tags, aliases), plus the existing claims, hash-chained sources, voxel topology, provenance, question graph, and yield files.

The authority rule is stated in the vault itself and enforced by the sync design: **the site is canonical; the vault is a lossless projection.** Local edits do not overwrite canon — the sync script posts annotations as *challenges* against specific claims on the live ledger, and the next pull shows the graph revised. Karpathy's separation of immutable sources from generated synthesis was already this system's architecture (hash-chained sources, append-only revisions); the vault just makes it visible in a folder.

## The doctrine is now a law object

The loop itself — how a model picks the next act, what form each artifact takes, which grammars are legal in a body, what a hero image may and may not be, how outreach is gated, what a finished rep looks like — is now written as a canonical law object at [The Loop Law](/a/loop-law), alongside the writing, design, outreach, and skill laws in the site footer. It serves a human page, a JSON object, and a model skill (`/api/articles/loop-law?format=skill`) from one source file.

Its repair clause is the reason it exists: **the documentation is the fix surface.** When a model produces a wrong output, the owner points at the behavior; the clause that allowed it is amended with the exhibit attached; the instance is fixed second. Every model that loads the object afterward inherits the fix. The object's amendment history already carries the failures that taught it: the render that silently replaced an authored body with a claims digest (2026-08-02), the art-styled hero images (2026-08-01), the 121 outreach drafts that converged on one template (2026-07-25), the unsigned post (2026-07-24).

## What is not satisfied

- **1,715 orphans is a real debt, not a bug in the counter.** Most are peptide and OIP articles that were published connected by folder convention but never linked by any parent page. The queue now surfaces them, but clearing them is weeks of `connect` acts.
- **The missing-pages queue is currently dominated by one corpus.** The OIP convergence series accounts for most of the 163 missing targets; the ranking is honest about demand but not yet about diversity of demand.
- **Stale detection is young.** Zero stale hubs at the 120-day threshold mostly reflects a corpus younger than 120 days, not perfect maintenance.
- **The outreach acts are derived, not executed.** External sends remain owner-gated by standing law; the queue can rank a quiet audience class, and a model may draft for it, but nothing sends itself.
- **Obsidian's official CLI requires the desktop app running.** Headless automation still goes through this site's own API; the vault's `SCHEMA.md` documents both paths.
- **The vault is one-way for structure.** Sync posts claims and challenges; it does not yet accept new pages authored in the vault. A page authored locally still enters canon through the article intake.

## Run it yourself

```bash
# the queue
curl -s https://miscsubjects.com/api/articles/next-acts?limit=10

# the health report
curl -s https://miscsubjects.com/api/articles/graph-lint

# backlinks for any article
curl -s 'https://miscsubjects.com/api/articles/graph-links?slug=bpc-157'

# the vault (JSON manifest of files + hashes)
curl -s 'https://miscsubjects.com/api/articles/obsidian-vault?slugs=protocol,bpc-157'
```

Then open the pulled folder in Obsidian and start at `index.md`. The graph you see is the same graph the queue is computed from — the site, the vault, the lint, and the queue are one derivation, read four ways.


## Every proposed addition, classified — KEEP, CHANGE, DELETE, BUILD

The 2026-08-03 merge of this corpus with the second-brain pattern (the Karpathy LLM-wiki concept and the Obsidian toolchain) proposed a set of additions. The logic law requires each to land on a terminal verdict with the component it attaches to and its measurable advantage — not a wishlist. This is that record.

| Verdict | Item | Component it attaches to | Measurable advantage |
|---|---|---|---|
| KEEP | `[[wikilink]]` round-trip grammar | article renderer + vault export | a link typed in prose to a page that does not exist becomes a ranked work order; the queue below is computed from exactly these |
| KEEP | Obsidian vault export | `GET /api/articles/obsidian-vault` | the whole corpus pulls as a hash-verified vault (370 files, 369/369 verified on the conformance run); any editor, any model, zero lock-in |
| KEEP | One-derivation loop surfaces | `graph-links` · `graph-lint` · `next-acts` | subjects are read off the graph instead of invented; the queue re-derives after every publish |
| KEEP | Stale-write protection | articles API (`body_hash` → `expected_hash`) | two agents can no longer silently overwrite each other; a moved head returns 409 with the current hash |
| KEEP | Loop law as a loadable object | [[loop-law]] (`?format=skill`) | a fresh agent with no context ran a full loop rep from the documentation alone (the misc conformance run, 2026-08-03) |
| CHANGE | Law clauses frozen in code | six `*_law_object.js` files, ~178 clauses | convert to `laws` rows: an owner correction becomes a row edit, not a deploy — the LOGIC_OVER_CODE law (2026-08-03) names doctrine-in-code a standing conversion debt |
| CHANGE | The governing constitution in a JS literal | `DECISION_CONSTITUTION` directory row | the row exists but points back at code; moving the text into the row makes version lineage rows, not git comments |
| CHANGE | Writer prompts as string constants | 4 prompts in the prose pipeline | prompts are directory rows by law (MODEL_CALL_LAW); these evade the inventory gate because they open "You write" instead of "You are" |
| DELETE | The draft-approval email round | outreach lane | replaced 2026-08-03 by owner order: letters in the settled format send directly, tracked, CC to the owner — the approval email itself had become the spam |
| BUILD | Local vault search | the pulled vault | sub-second full-text recall over the corpus without an API round-trip; the missing half of the second-brain pattern |
| BUILD | Web Clipper ingest | intake lane | external sources enter as claims with provenance instead of dying in bookmarks |
| BUILD | Vault-authored pages entering canon | obsidian sync lane | today the vault is read-only outbound; authored-in-Obsidian pages should arrive as drafts through the same claims gate |
| BUILT | The autonomy tick | automation 20 (`AGENT_SPAWN_CLI`, every 720 min) | the loop now fires its own reps: one rep per tick under [[loop-law]], sends tracked and CC'd, receipts ledgered — scheduled 2026-08-03 |

Verdicts follow the [[logic-law|logic law]]'s terminal states. Every CHANGE row is also filed on the amendment lane of the page it concerns, so the conversion debt is queue work, not a note.

