Something went wrong. Try again.
Something went wrong. Try again.
Executable knowledge #
Markdown is the durable truth. IWE supplies semantic structure. marimo supplies executable structure. marimohub supplies the runtime. Nix supplies the environment. jj supplies history. HTML is a view.
The working proof of concept is workbench/. This
note records what upstream supports today (checked 2026-10-03), the design
choices layered on top, and what is still open.
Responsibilities #
| Layer | Owns | Here |
|---|---|---|
| Markdown | Canonical knowledge and executable source | workbench/knowledge/**/*.md |
| IWE | Identity, links, inclusion graph, schemas, retrieval | .iwe/, iwe CLI, iwec MCP, iwe_bridge |
| marimo | Reactive cells, analysis, controls, computed results | python {.marimo} fences |
| marimohub | Sessions, apps, jobs, remote access; operational history | services.marimohub (modules/nixos/) |
| Nix | Environments, images, server, versions | workbench/environments/, flake.lock |
| jj | Source history and review | the repository |
Three graphs describe a result: the IWE graph (what knowledge exists and how it relates), the marimo graph (which cells produced it), and the Nix closure (which software ran them). The demo shows all three: it asks IWE about itself, computes reactively, and reports the store path of its interpreter.
Verified against upstream #
marimo 0.24.2 (nixpkgs pin; PyPI has 0.25.1) #
- Markdown notebooks mark code with
python {.marimo}fences, andsql {.marimo query="df"}for SQL. A file is a notebook only if it has a marimo fence or amarimo-versionkey, so plain notes are never notebooks. Prose between fences becomesmo.mdcells and is written back verbatim. - The editor save preserves arbitrary frontmatter. It re-reads the YAML
from disk and merges marimo's keys over it. On the demo, a save that edited
one cell changed only that line once
marimo-versionwas pinned.marimo-versionis rewritten on every save, andtitleis added if missing. The workbench check asserts this. marimo convertand IR round-trips are not safe. They keep only string-valued frontmatter keys: lists, maps, and numbers are dropped. Never route knowledge documents through them.marimo check,export html,edit, andrunaccept.md. Upstream states Markdown notebooks cannot be imported as modules or run as scripts.
IWE 0.24.2 (pinned; 0.25.0 released 2026-10-02) #
- The documented integration surfaces are the CLI and the MCP server
(
iwec). Theliwelibrary is not API-stable.iwe_bridgetherefore shells out toiwe … -f jsonand keeps no index of its own. iwe find -k KEY -f jsonreturns the frontmatter plusreferences,includedBy, and the other edges. The YAML filter (--filter) is marked experimental upstream.- Schemas (
.iwe/schemas/NAME.yaml, JSON Schema for frontmatter) bind by key glob inconfig.toml, not by atypefield. The schemas here pintypeso the two agree. - IWE keeps arbitrary frontmatter keys. Its writer reflows paragraphs and
writes fences as
``` python {.marimo}. marimo parses that form into identical cells, which the round-trip test asserts. The two tools differ only in byte style, so do not run a workspace-wideiwe normalizeover executable documents;iwe normalize -k KEYis safe but produces churn. - 0.25.0 renames
[library]to[workspace]and rewritesconfig.tomlin place on first read.iwe_bridgeaccepts both forms.
marimohub 0.4.14 #
- An Apache-2.0 TypeScript server, configured only with
MARIMOHUB_*variables. Its releases shipmarimohub-linux-x64, a Node single-executable that unpacks its bundle intoMARIMOHUB_SEA_CACHE_DIR. nixpkgs does not package it. The package here patches that binary's ELF interpreter; the build runs--versionto prove it starts. - Storage:
s3,gcs,azure,fs,r2,memory, or an externallibrary. There is no database: the object store holds catalog, versions, and snapshots.fsis single-replica and needs one filesystem for atomic renames. - Compute:
coreweave,wandb,modal,e2b,fargate,kubernetes,docker,podman,local,cloudflare,none, or an external Nodelibraryadapter.localis documented as development-only, with no isolation.podmansupports rootless Podman and is single-host. - The Podman adapter runs
podman run -d … IMAGE sleep infinity, then drives the kernel withpodman exec … sh -lc:uv sync --inexactintoUV_PROJECT_ENVIRONMENT, thenuv run --no-sync marimo edit. The image must provideuv,python3,sh, coreutils, a writable/workspace, and a pinned marimo (0.23.10 or 0.24.x). - Auth:
oidc,proxy-header(including Tailscale Serve'sTailscale-User-Login),cloudflare-access, ordev. - Hub-native notebooks are
notebook.pypluspyproject.toml..mdentry notebooks are only supported through Git-synced sources (pushorpull), which are read-only, versioned, and marked work in progress. Pull mode needs a GitHub App. Push mode accepts an archive and token from any CI.
Design choices (experimental) #
- One file, two readers. The demo's frontmatter carries IWE's keys
(
type,status,project) and the workbench'senvironment. marimo owns onlytitleandmarimo-version. Executable cells are plain marimo fences. No second representation is generated. - Environments are named in frontmatter, defined in Nix.
environments/NAME.nixadds Python packages and tools to a base of marimo,iwe_bridge, and IWE. Each environment builds a runtime, a sandbox image, and a manifest entry.workbenchresolves a document'senvironmentagainst the manifest and runs marimo from that store path. - Nix-built sandbox images.
dockerTools.streamLayeredImageproduces a marimohub-compatible image whose tag is its Nix output hash. A writable--system-site-packagesvirtualenv over the store Python satisfies uv's environment contract while every pre-installed package resolves to/nix/store.UV_OFFLINE=1makes a dependency missing from the closure fail rather than install from PyPI. Images arepodman loaded into the hub account before it starts. No registry is involved. - Isolation stays in Podman. The dev shell and
workbench editare not sandboxes. marimohub'slocalbackend is excluded from the module. - The repository stays authoritative. marimohub receives landed commits
through push sync (
workbench sync, agit archiveofworkbench/plus the commit ID). Its versions and session snapshots are operational history. Edits made in the hub reach the repository only as ordinary commits: export or copy the file back, then review it withjj diff. Hub-side source-control publishing (a GitHub App) is the upstream path for automating that and is not configured. - Deployment follows the repository's pattern.
services.marimohubis a generic module,workbench-hub.nixspecializes it, and themarimohubDen aspect carries server policy metadata. No host includes it yet. Themarimohub-homelab-evaluationcheck proves the homelab evaluates with it, asnixbot-homelab-evaluationdoes for nixbot. - Tailscale Serve on 9443, never Funnel.
proxy-headerauth trustsTailscale-User-Login, which only Serve sets for a signed-in tailnet user. The hub claims 9443 indotfiles.tailscale.https(modules/nixos/tailscale-https.nix), clear of the CI dashboard's 8443 and of Funnel's ports, and evaluation fails if another service on the node claims the same port.
Not yet verified #
- The hub and a Podman kernel have not been run end to end; this
environment has neither Podman nor a NixOS host. The module evaluates, the
image builds, and the binary starts. The first real start should confirm
rootless Podman under a lingering system user,
uv syncagainst the--system-site-packagesvenv, and the notebook bridge install. - Whether
uv sync --inexactreinstalls packages already visible from the store when a synced notebook'spyproject.tomldeclares them. WithUV_OFFLINE=1that would fail rather than drift. - Whether a synced
.mdentry notebook keeps its frontmatter through hub edit sessions (hub saves go through the same marimo serializer, so it should).
Open questions and upstream limits #
- Environment binding in the hub. marimohub selects an image per notebook
in its own metadata and ignores frontmatter. A sync step could set the image
from
environment, but the image-selection API has not been checked. - A Nix-native compute backend. marimohub's external
librarycompute adapter is the documented extension point. Acompute-nixadapter could start each kernel as a transient systemd unit (DynamicUser, a private writable workspace, read-only/nix/store, cgroup limits, namespaces) from a realized closure, with no image or uv step. It is not built: rootless Podman already gives an isolation boundary through documented interfaces, and the adapter API should first be read indevelopment_docs/ports.md. - Write-back. The hub's versions are immutable snapshots of the source. Turning a hub edit into a JJ change is manual today.
- IWE 0.25. Bump deliberately. It rewrites
config.tomlon first read, and unknown keys intree,export, andupdate -kbecome errors. - Agents. Agents should use
iwec(MCP) for graph operations. Wiring a workbench-scoped IWE MCP server into the AI client modules is a follow-up. - marimo Studio (released 2026-10-01) builds audience-specific views of a notebook. It is a candidate for the "derived presentation" layer and is not integrated.