{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"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","body":"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.\n\n## The idea this merges\n\nAndrej 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.\n\nThis 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.\n\n## Links now round-trip between the site and Obsidian\n\nAn 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]].\n\nTwo details carry the weight:\n\nA 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.\n\nOn 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.\n\n## One derivation: the graph, the lint, the queue\n\nThree public endpoints now serve one derivation over the whole corpus:\n\n**`/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.\n\n**`/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.\n\n**`/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.\n\n## The vault: the whole system as a folder of markdown\n\n`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).\n\nWhat lands on disk, and why each file exists:\n\n- **`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.\n- **`log.md`** — the append-only chronology, projected from the live events ledger. The ledger stays canonical; the file is a read model.\n- **`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.\n- **`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.\n- **`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.\n- **`_MOC/graph.canvas`** — a JSON Canvas 1.0 map of the ontology folders and their top pages, edges drawn from declared embeds.\n- **`.obsidian/`** — graph color groups per ontology folder, so the vault opens looking organized rather than gray.\n- **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.\n\nThe 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.\n\n## The doctrine is now a law object\n\nThe 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.\n\nIts 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).\n\n## What is not satisfied\n\n- **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.\n- **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.\n- **Stale detection is young.** Zero stale hubs at the 120-day threshold mostly reflects a corpus younger than 120 days, not perfect maintenance.\n- **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.\n- **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.\n- **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.\n\n## Run it yourself\n\n```bash\n# the queue\ncurl -s https://miscsubjects.com/api/articles/next-acts?limit=10\n\n# the health report\ncurl -s https://miscsubjects.com/api/articles/graph-lint\n\n# backlinks for any article\ncurl -s 'https://miscsubjects.com/api/articles/graph-links?slug=bpc-157'\n\n# the vault (JSON manifest of files + hashes)\ncurl -s 'https://miscsubjects.com/api/articles/obsidian-vault?slugs=protocol,bpc-157'\n```\n\nThen 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.\n\n\n## Every proposed addition, classified — KEEP, CHANGE, DELETE, BUILD\n\nThe 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.\n\n| Verdict | Item | Component it attaches to | Measurable advantage |\n|---|---|---|---|\n| 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 |\n| 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 |\n| 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 |\n| 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 |\n| 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) |\n| 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 |\n| 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 |\n| 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\" |\n| 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 |\n| 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 |\n| BUILD | Web Clipper ingest | intake lane | external sources enter as claims with provenance instead of dying in bookmarks |\n| 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 |\n| 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 |\n\nVerdicts 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.\n","register":"essay","hero":"https://miscsubjects.com/img/gen/arcads-gpt-image-3184d580-f3a6-4849-92b6-0b4f65f17e0c.png","hero_brief":"A large white wall covered in hundreds of small handwritten index cards pinned with red pins and connected by fine red threads. At the exact center hangs one completely blank white card, and dozens of red threads from distant cards all converge on that blank card. The handwriting on every other card is too small and blurred to read. Photorealistic magazine-feature photograph, soft natural daylight, shallow depth of field focused on the blank card. The composition is the article finding: 163 pages that do not exist yet are already link-requested by hundreds of published pages.","editorial_review":{"headline_subject":"The site derives its own ranked work queue from the corpus graph and exports itself as an Obsidian vault","hero_subject":"A wall of linked index cards with one blank card at the center","visual_action":"Dozens of red threads from distant cards converge on the single blank card","rationale":"Literal render of the core finding — the missing page every existing page points to; matches the missing-pages queue that tops next-acts.","inspected":true,"inspection_note":"Opened arcads-gpt-image-3184d580 at 1536x1024 and at 720px card scale: hundreds of white cards with illegible small handwriting, red pins, red threads all converging on one blank centered card; no readable words anywhere; first candidate ef7b9720 rejected because its cards carried readable crime-board vocabulary (Suspect?, Witness Report) off the article subject.","hero_brief":"A large white wall covered in hundreds of small handwritten index cards pinned with red pins and connected by fine red threads. At the exact center hangs one completely blank white card, and dozens of red threads from distant cards all converge on that blank card. The handwriting on every other card is too small and blurred to read. Photorealistic magazine-feature photograph, soft natural daylight, shallow depth of field focused on the blank card. The composition is the article finding: 163 pages that do not exist yet are already link-requested by hundreds of published pages."},"tags":["canonical","loop","knowledge-graph","obsidian"],"category":"canon","style":{},"claims":[{"id":"c1","text":"Article bodies support [[slug]] and [[slug|label]] wikilinks that render as /a/ links on the site; unresolved targets render as marked gaps.","tier":"system","source_ids":["s1"]},{"id":"c2","text":"The corpus link graph computed 3,386 edges across 2,264 articles on its first live run (2026-08-03T02:47Z).","tier":"system","source_ids":["s1"]},{"id":"c3","text":"The first gap scan found 163 missing pages already wikilinked from published bodies; the top target, oip-total-structure, was requested by 171 articles.","tier":"system","source_ids":["s1"]},{"id":"c4","text":"The lint pass found 1,715 orphan articles (no inbound links), 494 articles carrying unsourced claims, and 32 articles with claims under active challenge.","tier":"system","source_ids":["s1"]},{"id":"c5","text":"The vault export (version 3) produced 370 files for a two-article slice and 369 of 369 content hashes verified against SHA256SUMS on pull.","tier":"system","source_ids":["s1"]},{"id":"c6","text":"Karpathy's LLM-wiki pattern maintains a compiled markdown knowledge base through three operations — ingest, query, lint — anchored by index.md and an append-only log.md.","tier":"mechanistic","source_ids":["s2"]},{"id":"c7","text":"Obsidian Bases (.base YAML database views) shipped in Obsidian 1.9 (2025) and requires no community plugin.","tier":"mechanistic","source_ids":["s3"]},{"id":"c8","text":"JSON Canvas 1.0 defines .canvas files as a single JSON object of nodes (text, file, link, group) and edges with integer coordinates.","tier":"mechanistic","source_ids":["s4"]},{"id":"c9","text":"Obsidian shipped an official CLI in v1.12 (February 2026); it remote-controls the running desktop app and does not run headless.","tier":"mechanistic","source_ids":["s5"]},{"id":"c10","text":"Vannevar Bush's 1945 Memex proposed a personal knowledge store with associative trails between documents; the maintenance burden was the unsolved part.","tier":"mechanistic","source_ids":["s6"]},{"id":"c11","text":"The Loop Law at /a/loop-law serves the loop doctrine as a human page, a JSON object, and a model skill from one source file, with owner corrections applied as dated amendments to the object itself.","tier":"system","source_ids":["s1"]}],"sources":[{"id":"s1","type":"system","url":"https://miscsubjects.com/api/articles/graph-lint","title":"Live derivation receipts, 2026-08-03: graph-lint counts {articles:2264, edges:3386, orphans:1715, missing_pages:163, unsourced:494, contested:32}; next-acts head [write oip-total-structure 271, write oip-machine-plane 110, write oip-ground 103] at 2026-08-03T02:48:38Z; vault pull 370 files, SHA256SUMS verify 369 ok 0 fail"},{"id":"s2","type":"reference","url":"https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f","title":"Karpathy — LLM Wiki (gist, 2026)"},{"id":"s3","type":"reference","url":"https://obsidian.md/help/bases/syntax","title":"Obsidian Bases syntax (official documentation)"},{"id":"s4","type":"reference","url":"https://jsoncanvas.org/spec/1.0/","title":"JSON Canvas spec 1.0"},{"id":"s5","type":"reference","url":"https://obsidian.md/cli","title":"Obsidian CLI (official documentation)"},{"id":"s6","type":"reference","url":"https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/","title":"Vannevar Bush — As We May Think, The Atlantic, July 1945"},{"id":"s7","type":"reference","url":"https://github.com/kepano/obsidian-skills","title":"kepano/obsidian-skills — Obsidian's agent-skill reference for markdown, Bases, JSON Canvas, and the CLI"},{"id":"s8","type":"reference","url":"https://obsidian.md/help/uri","title":"Obsidian URI scheme (official documentation)"}],"prov":{"model":"Fable 5 (Claude Code)","action":"write"}}