/ Stream
build 2026.12.03 · --:--:-- UTC · RSS

BabbTools for the frontier.

mascot mascot
All materials

10 — The Lab framework: what actually exists on remote

2026-11-29-prep-10-lab-framework.md View the source file

Checked live 2026-11-29 (this prep session). Morgen was right — the Lab work IS merged.

Head state

  • Main HEAD: 5d18970 (full 5d18970655d14a4bf67394345e377c7a763c73f0) — "Merge pull request #7" (the unfolding-replies batch), merged 2026-11-29 at Morgen's "merge any of our work not yet merged". Before that, main was 7761b9a — "Merge pull request #8 from babbworks/docs/lab-release-spec", merged 2026-11-29 08:09 UTC / 03:09 EST, after PRs #4/#5/#6 (main was 8bf6932 before it).
  • PR #7 (unfolding-replies batch) is MERGED (merge commit 5d18970, main HEAD now 5d18970). docs/labs/unfolding-replies/ is now on main. The Lab plan's Task 8 lists it as a future in-place lab (2026-11-29-unfolding-replies-<author>, base = the merge commit of PR #7) — that indexing row can now proceed; it is not a precondition for this Lab.
  • PR #8 (the Lab framework) is merged. Its files are on main.

What exists (read in full this session)

Path on mainSizeWhat it is
design/specs/2026-11-29-labs-and-releases-design.md17,612 B, 402 linesThe Lab + releases design. Status: "approved by peers8862 on 2026-11-29, including the points marked (proposed). Points marked (open) are still unanswered. Nothing here is built."
design/plans/2026-11-29-stream-labs.md26,110 B, 380 linesImplementation plan, spec §14 phases 0–2, Tasks 1–8 with failing tests first.
design/README.md5,400 B (updated by PR #8)The design folder's README, now referencing the lab commands.
design/stream.json, design/schema.json, design/inventory.json, design/dispositions.json(from PRs #3–#5)The design index, schema, generated inventory, dispositions — the indexes labs engage against.

The framework, in brief (the spec, not a summary of a summary)

  • A lab is a piece of work that asks a question: it alters files, makes something that explains an idea, or gathers evidence. Failed labs are kept. A release is a published version of the standard (Version Alpha is the first). The two must not be confused.
  • Chosen approach (decided): a folder per lab holding only changes, evidence and artifacts — not a branch per lab (rejected: variations invisible beside main, branches deleted on merge), not a full copy (rejected: hides what changed), not a separate repo (rejected: splits the record from the design).
  • Names (decided): YYYY-MM-DD-<short-title>-<author>, lowercase, hyphen-joined, e.g. 2026-11-24-rust-kernel-claude. Date = day the work was created. Author = peers8862, claude, muse or another registered id. An id never changes once published.
  • Where things live: labs/<lab-id>/ with AGENTS.md, CLAUDE.md (one line: @AGENTS.md), README.md, lab.json, files/ (only new/changed files, at the same paths as the repo), artifacts/, evidence/, notes/ (later additions, allowed after publication). Plus labs/index.csv, labs.csv, engagements.csv, status.csv (append-only). Plus releases/<release-id>/, design/register/elements.csv, design/register/tools.csv, design/tools/record.py.
  • Lab tool (proposed, not built): design/tools/record.py, standard-library Python, run as python3 design/tools/record.py <lab|release> <command>. Commands: lab new/open/save/engage/test/note/attach/status/check/publish/index. Commands never commit or push. Working folder: ~/work/stream-lab--<id> (detached checkout of the base with the lab's files applied). Build output: ~/.cache/stream-lab/<id>.
  • lab.json: id, title, question, author, created, kind (changes or in-place), base ({commit: <40 chars, on main>, from: null | release id | published lab id}), removed, engages ({ref, how} — how is tests, changes, demonstrates or uses). Status is NOT in lab.json — it is the latest row in status.csv. Statuses: open, accepted, rejected, deferred, withdrawn, superseded. rejected requires learned. accepted/rejected record the owner's decision (by is peers8862).
  • Engagement references resolve against indexes; unknown ones are refused: element:<id> (from design/register/elements.csv), section:<id> (from design/stream.json), file:<path>, tool:<id>, lab:<id>, release:<id>.
  • Evidence: evidence/runs.jsonl is append-only — run id, time (UTC), who, command, base commit, state hash (SHA-256 over paths+hashes of the lab's changes), exit code, duration, stdout/stderr files with hashes. Failing runs recorded same as passing. Machine paths redacted to <work>, <lab>, ~.
  • Publishing (spec §12): lab publish refuses unless: base commit is on origin/main; files/ matches the working folder; every reference resolves; at least one recorded run, artifact or written account; every recorded output matches its hash; no symlinks, likely secrets or machine paths; (proposed) folder ≤ 5 MB. It writes files.csv, changes.patch (usable with git apply), published.json (date + hash of every other file). Publication takes effect when the folder is merged into main; from then on lab check fails if a hashed file changes or disappears. Only new files under notes/ may be added.
  • Existing work (spec §13, indexed where it is, nothing moves): 2026-11-24-rust-kernel-claude (base 4f08699…, paths crates/, Cargo.toml, Cargo.lock); 2026-11-28-mark-boundary-<author> (base 1dc1563…, experiments/mark-boundary/; author still open); 2026-11-28-header-labs-<author> (base 88e523e…, the files in docs/labs/ at that commit; author still open; amended: later work in docs/labs/ gets its own lab). web/ is a tool made by the Rust lab, not part of the standard.
  • Order of building (spec §14): 0. element index (explicit ids for question elements, elements.csv — the plan's Task 1; the real index has 150 elements, 46 questions); 1. labs (new → publish + index); 2. existing work indexed; 3. website; 4. releases + Alpha blockers.
  • Open points in the spec: licence for code and for the written specification (blocks releases); whether to protect main (§18, open — "main is currently unprotected, so a forced push or a deletion could remove those commits"); authors of the earlier labs (blocks Task 8); several points marked (proposed) vs (decided).

What is NOT yet updated / NOT built

  • The tool does not exist. design/tools/record.py and design/tools/recordlib/ are specified and planned (Tasks 1–7) but not built — "Nothing here is built" (spec header). There is no lab new command to run yet. That is why this prep package is staged locally and backfilled later, as Morgen directed.
  • The element index does not exist yet. design/register/elements.csv is Task 1. Until it exists, a lab cannot engage element:<id> references — it engages section: and file: references instead.
  • labs/ does not exist on main yet. No labs/index.csv, no lab folders. The first lab created with the tool will create it.
  • docs/labs/ (the HTML labs) stays where it is. The spec is explicit: "Indexed where it is. Nothing moves, because published links point at it." The header labs are an in-place lab (Task 8), not a folder lab. Our three newer HTML pages (Genesis, Kernel, 128-explorer — PR #7, unmerged) will get their own lab when PR #7 merges, per Task 8's fourth row.
  • Releases are not built (phase 4, separate plan). Alpha blockers (§17) are open, including the licence.
  • PR #7 is merged. Its merge makes test_the_saved_inventory_covers_the_same_files fail until design/inventory.json is regenerated (PR #8's own note) — check whether that regeneration has landed; it is not part of this Lab.

Consequences for this Lab

  • Proposed id 2026-11-29-unfolding-kernel-muse, base 5d18970 (full 5d18970655d14a4bf67394345e377c7a763c73f0), kind changes — see file 03. The date is the day the work was created (2026-11-29); the author muse is a registered id in the plan (authors.csv: peers8862, claude, muse).
  • Until record.py exists, this package is the Lab's staging area. Backfill = run lab new at base 5d18970, copy these files into the working folder / files/ / artifacts/ / evidence/ as appropriate, record the first runs with lab test, and publish only when spec §12's seven checks pass.
  • The Lab must not change any "In v1" label, section text, version or state (plan global constraints; only the owner changes them).
  • After adding/changing tracked files outside design/, regenerate the inventory (design/tools/stream-inventory.py).