{
  "markdown": "# Loop Library\n\nA research knowledge base **about loops** — how to make them and how to improve them — built\nas a **hybrid of two ideas**:\n\n- **[Karpathy's \"LLM Wiki\"](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)**\n  — the *operating model*: an LLM compiles and continuously maintains an interlinked markdown\n  wiki instead of re-deriving answers from raw chunks every query.\n- **[Google's Open Knowledge Format (OKF v0.1)](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)**\n  — the *on-disk contract*: a portable bundle of markdown files with YAML frontmatter, one\n  concept per file, identified by path, linked into a graph.\n\n> **OKF is the contract; Karpathy is the operating model; provenance is the addition both lack.**\n\n**Scope:** agentic (LLM reason-act-observe) and automation/workflow loops.\n\n## Two engines\n\nThe repo runs two loops that feed each other:\n\n1. **Research loop — `wiki/` (Purpose 2).** The knowledge base above, maintained by\n   `ingest → query → lint`, accumulating the state of the art in loop construction and\n   recursive improvement.\n2. **Shipped loop kits — `dist/` (Purpose 1).** Vendorable, self-syncing prototypes that let\n   any home/work task *begin by defining a loop, then running it*. **Shipping here is deliberate\n   — treated like shipping software — and reserved for validated, very-high-confidence patterns.\n   Nothing is shipped yet.** Candidates are developed in the research loop first. See the bar in\n   [`dist/REGISTRY.md`](dist/REGISTRY.md) and `CLAUDE.md` §8.\n\nThe research loop improves the kits; vendored kits throw off usage that becomes new research\nsources. The library studies loops in order to ship better loops — and its own operation is\none of them.\n\n**Two ceremonies:** the **root/meta loop is alpha** — malleable; its primitives (goal, work\nproduct, hypotheses, tasks/sub-goals) live in [`loop/`](loop/) and the repo holds them on\n*itself*. **`dist/` is shipped product** — deliberate and gated. Promote from alpha to shipped\nonly at very-high confidence.\n\n## Layout (three layers)\n\n| Path | Layer | Rule |\n| --- | --- | --- |\n| [`loop/`](loop/) | the **root loop's primitives** — GOAL · HYPOTHESES · TASKS | alpha — malleable |\n| [`sources/`](sources/) | immutable raw mirrors | read-only — the source of truth |\n| [`inbox/`](inbox/) | staging | nothing auto-promoted; human approves ingest |\n| [`wiki/`](wiki/) | the OKF bundle (compiled) — **research loop / Purpose 2** | agent-owned; every page cites a source |\n| [`dist/`](dist/) | shipped loop kits — **Purpose 1** | deliberate, high-confidence only; nothing shipped yet |\n| [`_meta/`](_meta/) | schema + taxonomy | the rules, written down |\n| [`scripts/`](scripts/) | lint + conformance | the retro loop, operationalized |\n| [`CLAUDE.md`](CLAUDE.md) | control | the agent's operating manual |\n| [`.claude/skills/`](.claude/skills/) | operations | `ingest` · `query` · `lint` |\n\nThe OKF bundle is **`wiki/`** — point any OKF consumer there. Start at\n[`wiki/index.md`](wiki/index.md).\n\n## How to use it\n\n1. **Add a source** to `inbox/` (or `sources/` if you've named it), then run **`/ingest`** —\n   the agent mirrors it, writes a Source digest, and compiles it into loop/concept pages.\n2. **Ask questions** with **`/query`** — the agent reads the index, answers with citations,\n   and files genuinely new findings back as pages.\n3. **Keep it healthy** with **`/lint`** — runs `scripts/conformance.sh` (strict) and\n   `scripts/lint.sh` (advisory), then reviews contradictions, drift, and gaps.\n\nConformance is strict: every compiled page has a non-empty `type`, cites a source, and carries\na `# Citations` section. Run `bash scripts/conformance.sh` to check.\n\n## Status\n\n- **Research loop (`wiki/`)** — seeded from the founding sources; conformance + lint green.\n- **Loop kits (`dist/`)** — nothing shipped. A `vanilla-loop` scaffold was withdrawn as premature;\n  it's now an open research question. Shipping is gated (see `dist/REGISTRY.md`).\n- The mission is set (two engines that feed each other); see [`wiki/synthesis.md`](wiki/synthesis.md).\n",
  "bytes": 4115,
  "sha": "f70c7a54186cee50c616dd65d08dfe67e492817403850bc87b9dd10fba47f497",
  "repo_slug": "dudgeon/loop-library",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_dudgeon_loop_library_wiki_index_md_60a7030e/readme"
}