Merge build/agents-dir into main
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by oscabriel · committed by oscabriel · parents 17b3479, 8e3268d · Browse files · 119 files·+1928 added−1919 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
119 files+1928 added−1919 removed
- tests:+12 added−12 removed
- other:+1916 added−1907 removed
Provenance
- Commit
c5e82bb- Tree
ce8ce04- Author
oscabriel <oscarhernandeziv@gmail.com>- Committer
oscabriel <oscarhernandeziv@gmail.com>- Parent 1
17b3479- Parent 2
8e3268d
119 files changed+1928 added−1919 removed
added:.agents/adr/0001-bun-workspaces-and-turborepo.md+22 added
12345678910111213141516171819202122---status: accepted---
# Bun workspaces and Turborepo, not pnpm
The repo is a Bun workspace with a dependency catalog, and Turborepo runs its tasks. Bun is the maintainer's default, and `bun build --compile` turns the CLI into single binaries. Turborepo caches tasks and costs one file.
## Considered Options
- **pnpm.** The Effect team uses it, and Cloudflare's `cloudflare.config.ts` tooling does not support Bun. That second reason went away once Wrangler became the deploy tool (ADR 0002).- **Workspace scripts with no task runner.** Nothing would be cached, so every check reruns on every change.
## Consequences
We keep pnpm's supply-chain guarantees by configuration rather than by tool: `--frozen-lockfile` in CI and in acceptance runs, exact pins, a minimum release age, and `trustedDependencies` for install scripts.
Rat Stack, which we port from (ADR 0013), says not to replace pnpm with Bun. That rule is about cold installs of Rat Stack's own template. The guarantees it protects are the ones kept above.
## Amended (2026-10-08)
There is no CI workflow and no acceptance script (ADR 0011's note). The lockfile guarantee is `bun run lockfile:check` (`bun install --frozen-lockfile --dry-run`), the first step of `bun run verify`. `bunfig.toml` keeps exact pins and a one-day minimum release age, and the root `package.json` names no `trustedDependencies`.added:.agents/adr/0002-wrangler-deploys-every-worker.md+54 added
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354---status: accepted---
# Wrangler deploys every Worker during the competition; `cf` is an ops CLI; after the deadline, cf or Alchemy
Until the competition closes on Oct 14, 2026, Wrangler deploys all three Workers (`platform`, `sandbox` and `web`). Cloudflare's `cf` CLI runs only read-mostly operations. After the deadline we move to cf or to Alchemy, whichever one's gate opens first. This departs from Cloudflare's own advice for new projects: "Prefer it over Wrangler … Wrangler is only for projects that already use it" ([cf launch post](https://blog.cloudflare.com/cloudflare-cf-cli-launch/)). We depart from it because neither alternative can yet declare what this platform deploys, and one deploy tool is safer in the recording week.
## Considered Options
- **Alchemy** (`2.0.0-beta.81`). - Released Alchemy cannot declare Durable Object-managed containers (`schedulingPolicy: "durable_object"`, which the Sandbox SDK 1.0 uses). Support is in open [PR #1905](https://github.com/alchemy-run/alchemy/pull/1905), so any Alchemy path today needs two tools. - Betas 79, 80 and 81 shipped on Sep 18, Oct 2 and Oct 5, and beta.80 had three breaking changes. - The Artifacts push trigger is not a reason either way. Whichever tool deploys, it is one REST call: `PUT /accounts/{account_id}/triggers/{script_name}` with a `cf.artifacts.repo.pushed` filter and a Workflow target.- **cf with `cloudflare.config.ts`** (cf `1.0.0-beta.12`, `@cloudflare/config` `0.23.0`). - The config's `Trigger` union has no events trigger, and `cf migrate` drops it: "Artifact event triggers are not supported by the new config and were not migrated." - cf hands container builds to Wrangler. - The config always writes `script_name` on a Durable Object binding, so the deploy refuses the sandbox's container DO bound from its own Worker: "You cannot configure a container on a Durable Object that is defined in another Worker." - Wrangler would still be needed for non-Vite bundling, `tail`, single secrets, the Workers vitest plugin and `varlock-wrangler`. - cf shipped beta.0 to beta.12 between Sep 25 and Oct 2, with open deploy bugs ([#192](https://github.com/cloudflare/cf/issues/192), #197, #72).
## Consequences
- `infra/bootstrap.ts` makes the events-trigger call idempotently and is the one place that checks it.- cf runs only as `bun run ops -- …`, pinned exactly, with telemetry off. A hook refuses its project commands (`dev`, `build`, `deploy`, `init`, `migrate`, `previews`), and any `delete` or `revoke` goes to the maintainer.- The README says in one line that Wrangler deploys the Workers and cf is the ops CLI, and why.
## After the deadline
**cf**, once `@cloudflare/config` gains an events trigger and the container `script_name` fix, or cf reaches GA:1. `cf migrate` each app.2. Write `exports` for the Durable Objects.3. Keep the trigger in `bootstrap.ts`.4. Remove the sandbox's self-bindings.5. Move web to `@cloudflare/vite-plugin@2`.6. Fence bindings with `InferEnv` over `defineWorker` references.7. Pass varlock values through `--secrets-file`.8. Set `DO_NOT_TRACK=1`.
Watch cf #179, #180, #192, #197, #198 and #204.
**Alchemy**, once #1905 merges (before then, the sandbox would deploy through `Command.Exec` running Wrangler):- **Async style:** plain `Cloudflare.Worker("X", { main, env })`, so Worker code stays tool-agnostic.- **The events trigger as an `Action`:** it GETs, diffs only the entries it owns, and PUTs only on a difference. An `Action` reruns only when its input changes, so the input carries a per-deploy revision. Destroy is `PUT []`.- **The binding fence:** `Cloudflare.InferEnv<typeof Platform>`, so deleting a binding is a type error.- **Config:** local state, telemetry off (`ALCHEMY_TELEMETRY_DISABLED=1`) and an exact pin.- **Frozen Durable Object names:** Alchemy deletes a removed Durable Object by default, so a rename is a delete and loses data. A test pins the class list.
Watch [#1950](https://github.com/alchemy-run/alchemy/pull/1950) (an events-trigger resource) and [#1916](https://github.com/alchemy-run/alchemy/pull/1916) (Artifacts reads).
## Amended (2026-10-08)
- The push-event trigger is declared in `apps/platform/wrangler.jsonc` (`triggers.events`), and Wrangler deploys it with the platform. `infra/bootstrap.ts --check-triggers`, which `infra/deploy.ts` runs after the deploy, reads it back (`GET /triggers/platform-<stage>`) and compares; Artifacts adds a `script_name` to each target, which the comparison expects.- The hook that refused cf's project commands is gone (ADR 0011's note). The rule stands in AGENTS.md's Boundaries and is held by review: cf runs only as `bun run ops -- …`, and any `delete` or `revoke` goes to the maintainer. In a non-interactive shell `wrangler delete` answers its own prompt yes, and cf's deletes abort unless given `--force`.added:.agents/adr/0003-rpcgroup-is-the-one-schema.md+34 added
12345678910111213141516171819202122232425262728293031323334---status: accepted---
# An Effect `RpcGroup` is the one schema
`packages/protocol` defines every operation once, as an `Rpc` in an Effect `RpcGroup` with payload, success and error schemas plus annotations. Everything else is derived from it with `bun run gen`: server handlers, the web client, CLI commands, MCP tools, skills, JSON Schema and the refusal docs. We chose `RpcGroup` because:- the contract and handler split is native: the group is schemas only, and `group.toLayer(handlers)` implements it;- `stream` is native on `Rpc.make`, which serves the Project DO's live views;- `omit`, `merge` and `prefix` give each surface its own subset;- its annotations use the same keys Effect's MCP `Tool` reads.
## Considered Options
- **`HttpApi` → OpenAPI → Forge**, tried on Oct 6, 2026 and rejected for the window: 1. It loses streaming beyond SSE and loses refusal identity: refusals become per-status error classes, without a static `retryable`. 2. It has no MCP or skill target. 3. Its CLI generator is cf's own, and the commands it emits are bound to Cloudflare's auth. 4. Its SDK generator, Fern, rejects `_tag` discriminants when two or more tags share a status. 5. Nothing is on npm ([forge#6](https://github.com/cloudflare/forge/issues/6)). 6. It needs Docker and a 1.3 GB generator image.- **Rat Stack's `packages/capability` as the source**, with `RpcGroup` as one projection of it. It passes all 59 of its tests on our Effect pin, but it lacks native `stream` and subsets, and it would put borrowed code at the centre of the product. It is the fallback if the port below is not green by hour 2 of Oct 7.
## Consequences
- The CLI-flag and MCP-tool algorithms are ported from [Rat Stack](https://github.com/joelhooks/rat-stack) at `fba26d8` (MIT): `to-command.ts` l.20–207 and `to-toolkit.ts` l.59–94, about 220 lines, into `protocol/{cli,mcp}`. They are recorded in `PROVENANCE.md` (ADR 0013). - Amended (2026-10-07): that record is gone (ADR 0013's note); `protocol/{cli,mcp}` each carry Rat Stack's MIT notice in their own header.- Wire schemas use `Schema.Int` or `Schema.Finite`, never bare `Schema.Number`, and `Schema.optionalKey`, never `Schema.optional`. Effect's `Schema.toJsonSchemaDocument`, which `McpServer` uses for tool schemas, turns `Schema.Number` into an `anyOf` that admits the strings `"Infinity"`, `"-Infinity"` and `"NaN"`, and turns `Schema.optional(Schema.String)` into string-or-`null`.- Every `effect/rpc` API is marked `@stability unstable`, so each package that uses one allows it explicitly in `allowedUnstableApis`.- A public REST SDK, if one is wanted later, comes from an `HttpApi` projection of the `RpcGroup`, not from a second source.
## Amended (2026-10-08)
There is no `bun run gen` and no generated `skills/`, `plugins/` or `docs/reference/` (ADR 0011's note). Every surface still derives from the group, in code: the platform's handlers and the web's client from the contracts, the CLI's commands and the MCP tools through the ported projections in `protocol/{cli,mcp}`, and the CLI's command list as `commandDocs` in `@repo/agent-kit`, which the platform's skill, the CLI's MCP prompt and the web's `/llms.txt` all read. `packages/protocol/test/mcp.test.ts` holds every MCP tool's schemas free of JSON Schema leaks. The `capability` fallback was never needed: the port passed within its first quarter hour.added:.agents/adr/0004-git-gateway-owns-custody.md+32 added
1234567891011121314151617181920212223242526272829303132---status: accepted---
# A git gateway owns custody, and refusals arrive in git's own output
Every git request goes through a gateway Worker that proxies git's smart HTTP protocol to Cloudflare Artifacts and holds every Artifacts token. Before it forwards a push, it reads the ref update commands and can refuse them with git's own `ng <ref> <reason>` lines, so a refusal shows up in the pusher's `git push` output with nothing installed. Holding custody in one place also gives us protected refs, claim-scoped tokens, anonymous public clones, push detection at the moment of the push, and reads limited by visibility (ADR 0007).
## Considered Options
- **Flag stray pushes afterwards and revert them.** This was the earlier design. It stays as a backstop: an Artifacts events trigger starts a Workflow for any push that reaches storage without passing the gateway.- **A client-side `git-remote-<name>` helper that rewrites push results.** It needs an install on every machine and is not authoritative, since a plain `git push` skips it. It is deferred, and it returns only if the gateway cannot be built.
## Consequences
- For an answer, the gateway forwards the push to the answerer's own fork, then rewrites git's report-status with the verdict of the cheap stages of the gate (ADR 0006).- A git credential helper ships so that tokens stay out of remote URLs.- If the gateway cannot be built, the fallback is raw per-fork tokens plus the push-event backstop, and the `git-remote-<name>` helper returns to put refusals in push output.
## Amended (2026-10-08)
What the gateway spike against live Artifacts (Oct 6–7) and the build since have shown:
- **A push lands whole or not at all.** Any refusal turns every ref in the push away. Custody judges twice: `admit` runs before forwarding, so a refused push never reaches storage, and `review` runs after storage took the push into the answerer's fork, which keeps the commit while git still shows the refusal.- **Four headers are forwarded, and no credential.** The gateway passes only `accept`, `content-encoding`, `content-type` and `git-protocol` upstream; the upstream adapter adds the platform's own token.- **Storage's rejections are translated by their text.** `stale ref` (Artifacts) and `incorrect old value provided` (git's receive-pack) become `StaleBase`, with `main` read from a fresh ref advertisement; `artifacts_git_receive_pack_busy` becomes `RepoBusy`, which is retryable. `fetch first` never reaches a server: git decides it on the client.- **A direct push to a canonical `main` is `DirectPush`.** It is final, and its next step lists the asks. `StaleBase` read backwards there and `NoAsk` said nothing about why. The only direct push admitted is the initializer's first push to an empty project; after that, `main` moves only by a landing (ADR 0014).- **Anonymous clones of public repos work** through the gateway, which holds the read token; Artifacts itself refuses anonymous reads.- **Cost.** A push through the gateway took a median 0.355 s against 0.340 s direct (+4.6%, ten pushes each). Ten clones at once took +69% (2.0 s against 1.2 s wall time), most likely because each new isolate mints a token before its first upstream call; the two were not timed apart.- **The fallback is not built.** There are no raw per-fork tokens and no `git-remote-<name>` helper. The push-event backstop is built: OnPush turns any move of a canonical `main` that the platform did not make into a `StrayPush` decision whose default is revert.- Later stages of the gate answer after the push returns, not in its report-status (ADR 0015).- **A fork takes branches only.** A claim fork or a working fork admits only `refs/heads/*`: custody refuses a push that creates, moves or deletes any other ref (a note, a tag, the platform's own refs) with `DirectPush`, whoever pushes, and the gate's parse stage agrees for a push the backstop sees. The platform's own fork writes, its verdict notes and the Lander's merge ref, reach storage directly and never pass custody.added:.agents/adr/0005-rules-read-from-the-landed-sha.md+16 added
12345678910111213141516---status: accepted---
# Rules are read from the landed SHA stored in the Project DO; the ref is a mirror
The platform reads a project's rules only from the commit it last landed itself. That SHA lives in the Project Durable Object's row and is written in the same transaction as the landing record. The rules are the config folder, the judge closure and the env shape (ADR 0009). A landed ref in the repo mirrors the SHA for people and tools, and nothing reads it to make a decision. So neither an answer nor a stray push can change what judges it.
## Considered Options
- **Read rules from a landed ref pushed atomically with `main`.** This was the earlier design, and it made an atomic two-ref push a requirement of every landing. Artifacts' `readFile` accepts a commit ID as its `ref` ([Workers binding](https://developers.cloudflare.com/artifacts/api/workers-binding/)), so reading by SHA needs no second ref.- **Read rules from the tip of `main`.** A push that reached `main` outside the gateway would then rewrite the rules that judge the next push.
## Amended (2026-10-08)
The first spike against live Artifacts (Oct 6) settled the question this ADR turned on: Artifacts has no atomic multi-ref push. `git push --atomic` is refused ("the receiving end does not support --atomic push"), and its receive-pack advertises no `atomic` capability. So the landed SHA in the Project DO is the only truth. A landing pushes `main` alone, then the mirror ref and the verdict note each follow in a push of their own (ADR 0014), and either may trail `main` for a moment. Artifacts' Workers binding also resolves only short branch names and commit SHAs, never a custom ref, so the DO keeps the SHAs of the refs it writes.added:.agents/adr/0006-landing-is-a-parse.md+26 added
1234567891011121314151617181920212223242526---status: accepted---
# Landing is a parse: a cost-ordered gate and a closed refusal union
Every push is treated as unknown input. The gate runs its stages in order of cost (the claim, the territory, judge custody and weakening, the merge, the project's own commands, then held-back checks) and narrows the push either to a checked tree, which the platform lands, or to refusals. Refusals are a closed union of `Schema.TaggedError` classes, so people, agents and code can all branch on them.
## Considered Options
- **Free-text check failures**, as most CI reports them. A person can read them, but an agent or a script has to guess what went wrong and what to do next.- **One refusal per push.** An agent with three shape problems would need three pushes to learn about them.
## Consequences
- Each refusal carries a static `retryable`, a `next` command and an optional `at: {path, line}`. It carries no `message` field: Effect's MCP server renders a tool error as text only when its message is non-empty, so without one, MCP clients get the structured error.- Text for git `remote:` lines, the CLI and MCP comes from one renderer, `protocol/render`.- Stage-1 (shape) refusals accumulate, so one push gets every shape problem at once. Costly stages stop at the first failure. The `ng` line names the first tag; `remote:` lines, CLI JSON and MCP JSON list them all.- The union is a public contract. A `_tag` is renamed only with an alias.- `Flake` and `VerifierBlocked` never count against the answerer.
## Amended (2026-10-08)
- **`PatchId` is the platform's own**, not `git patch-id`: SHA-256 over the answer's change set as sorted `path`, blob-before, blob-after lines (an absent blob as empty), computed with WebCrypto in a Worker that has no diff engine (`packages/git/src/patch-id.ts`). It ignores commit order and moves only when a blob the answer touches moves, which is when a held-back lane must run again; a verdict records it, and only held-back results may carry over, when both it and the pinned held-back suite are unchanged. Open: the change set is taken against the answer's own base, so a re-merge onto a `main` that changed one of those files keeps the same id.- **Waiting is not refusing.** An answer's `Outcome` is `Checking`, `Landed`, `WaitingOnParent`, `AwaitingFinish`, `AwaitingDecision` or `Refused`. The three waiting states carry no refusal: nothing failed, and the answer needs no new push. Only `Refused` carries refusals, all from the cheapest failing stage.- Stages 0 and 1 answer inside the push; the merge, the project's commands, held-back checks and the human stage answer afterwards (ADR 0015).added:.agents/adr/0007-visibility-boundary-is-the-repo-boundary.md+18 added
123456789101112131415161718---status: accepted---
# The visibility boundary is the repo boundary
Git cannot hide part of a repo: whoever can fetch a commit can fetch every object in its tree. So each audience's files form a layer that lives in its own repo, and the platform composes layers over `main` only where the reader may see them. One flow rule holds: no write down. Content reaches a wider audience only through a credited release, and nothing from a layer enters a public tree.
## Considered Options
- **Private branches or folders in one repo.** Git's object reachability would leak them to anyone who can clone.- **Fully hidden project layers.** Every project layer is declared publicly instead. Only personal layers may be hidden, because invisible gates destroy contributors' trust.
## Consequences
- The platform lands the answer's tree, never the composed tree, and snapshots before held-back files are written.- Public-serving Workers have no binding to the private namespace. A type test checks that the web Worker's generated env has no `ARTIFACTS_PRIVATE`.- A push that would put a layer path into a public tree is refused as `PrivatePathInPublicTree`.added:.agents/adr/0008-claims-are-exclusive-by-default.md+20 added
1234567891011121314151617181920---status: accepted---
# Claims are exclusive by default and kept alive by pushes
An ask takes one claim at a time. A claim is a fork plus a scoped token, and only pushes keep it alive: after 2 idle hours the claimant is warned, and after 24 the claim lapses (`ClaimLapsed`). A full ask returns `AskFull` before any fork is made. Racing is opt-in, for kinds where parallel attempts are the point, such as hill-climbing or design asks.
## Considered Options
- **Three claims per ask, shown as "2 of 3 taken".** Duplicate work wastes newcomers' effort, and asks open to racing get swarmed, as bounty markets do.
## Consequences
The front page shows an ask as either claimed or open.
## Amended (2026-10-08)
- **Fork names carry their parts.** A claim's fork is `<project>--<ask>--<handle>` and a person's working fork `<project>--me--<handle>`, the handle in lowercase; a layer's repo is `<project>--<layer>`. A project name, an ask id and a layer's name are each lowercase words joined by single hyphens, so none can hold `--`, and a claim fork's, a working fork's or a layer repo's name splits back into its parts. `me` and `layer` are reserved ask ids, as are `open` and `flag`, which the CLI's `ask` subcommands take.- **Making a claim's fork is safe to retry, and converges on one repo.** Ten claims at once against live Artifacts (Oct 7) were all ready within 9.9 s, so no pool of pre-made forks is needed. Under that load 4 of 10 fork calls first answered HTTP 500, then 409 "repo already exists" when retried under the same name, and each still ended as exactly one repo. So a 500 is read as "maybe made" and tried once more, and an already-exists on the claim's own name counts as made once that repo holds `main`. The name comes from the claim, so claiming again finds the same fork.added:.agents/adr/0009-env-shape-is-env-schema.md+19 added
1+---2+status: accepted3+---4+5+# The env shape is the project's `.env.schema`, parsed and never resolved6+7+A project's env shape is its committed `.env.schema`, in the [@env-spec](https://github.com/dmno-dev/varlock/discussions/17) format that varlock reads. The platform parses it at the landed SHA with `@env-spec/parser` and never resolves it: no `exec`, no plugins, and no imports from outside the repo. Function-valued flags count as sensitive. Values are stored only for `@sensitive` items, as write-only values, envelope-encrypted in the Project DO under a master key held as a Worker secret. Unlanded code sees a placeholder for every `@sensitive` item. For a `@proxy` item, the platform swaps the real value in on matching outbound HTTPS requests ([Sandbox outbound interception](https://developers.cloudflare.com/sandbox/network/call-an-authenticated-api/)).8+9+## Considered Options10+11+- **An `env.ts` in the config folder.** Only the platform would read it, while the app kept its own env loading, and the two shapes would drift. One file now serves the app, local tools, agents and the platform.12+- **Cloudflare Secrets Store for project values.** It holds [up to 100 secrets per account, in one store](https://developers.cloudflare.com/secrets-store/manage-secrets/).13+14+## Consequences15+16+- `.env.schema` and committed `.env.*` files, except `*.local`, are in the judge closure. An answer cannot add or change an env item, such as adding a `@proxy` domain or turning off `@sensitive`; a decider lands it.17+- This repo's own env uses varlock. Tools run through `varlock run`. Workers deploy through `varlock-wrangler` ([`@varlock/cloudflare-integration`](https://varlock.dev/integrations/cloudflare/)), which passes non-sensitive values as `--var` and sensitive ones through `--secrets-file`. Agents read the env only through `varlock load --agent`, with values redacted.18+- No Worker imports varlock's runtime. Its `init` patches `console` and the global `Response` and scans every streamed body, and the gateway streams git packs.19+- The format is varlock's, and the README credits it.added:.agents/adr/0010-no-inbound-github-sync.md+13 added
1+---2+status: accepted3+---4+5+# No inbound or two-way GitHub sync6+7+A project can be imported from GitHub once, to start it. After that, nothing flows in from GitHub, and nothing syncs both ways. Inbound sync would be a second way onto `main` that skips the gate.8+9+## Consequences10+11+- Export is `git clone`. Code, asks and credit trailers leave with a clone, and verdicts need one more fetch of `refs/notes/*`. The README says so.12+- An import can also be made from the web, at `/import`, and is still made once ([ADR 0033](0033-a-repo-is-imported-from-the-web-and-its-host-path-offers-the-import.md)).13+- A one-way push mirror of `main` to GitHub is on the roadmap for after the competition, not in it.added:.agents/adr/0011-the-fence.md+22 added
1+---2+status: accepted3+---4+5+# The fence: compiler first, then lint; verify is the authority6+7+> **Superseded in part (2026-10-07).** On the user's decision, the repo dropped every part of this fence whose only job was to police the agents building it: the hook policy (`scripts/hooks/vcs-policy.ts` and its Claude Code, Cursor and pi adapters), the escape count (`scripts/debt.ts` against `debt.baseline.json`), the repo's own lint rules (`tools/oxlint/fence/`), the test that held AGENTS.md's table to its enforcers, the import-direction check (`imports:check`), the generated reference and distribution (`docs/reference/`, `skills/`, `plugins/` and `gen:check`), the repo's playbooks, and the planned `scripts/acceptance.ts`. `bun run verify` is now the lockfile check, lint and format, typecheck, tests, `brand:check` and `bytes:check`, and it is still the authority. Compiler first, then lint, then a test still orders how a rule is held; a rule with none of them is held by review, and an escape still carries its reason after ` -- `. The record below is kept as it was decided.8+9+Each rule this repo keeps is held by the strongest enforcer available. First, make the mistake unrepresentable in types; then catch it with lint; then with a test; prose is the last rung. Git hooks are early feedback only; `bun run verify` and CI are the authority. The repo is built fast and mostly by agents, and a rule nothing checks drifts under that load. The fence also dogfoods the product: its judge closure, weakening and ratchet apply to this repo first.10+11+## Considered Options12+13+- **The full test suite in pre-commit.** Too slow for an agent sprint. Git hooks, when they come, run lint, format check and typecheck; tests run in `verify` and CI.14+- **A `no-comments` lint rule.** Rejected: agents need room for workaround notes.15+16+## Consequences17+18+- Every escape (`oxlint-disable`, `@effect-diagnostics`, `@ts-expect-error`) carries a reason after ` -- `. `scripts/debt.ts` counts escapes against `debt.baseline.json` in `verify`, and the count rises only with the maintainer's sign-off.19+- One hook policy (`scripts/hooks/vcs-policy.ts`), wired into Claude Code, Cursor and pi, refuses the usual ways around hooks (`--no-verify`, `commit -n`, `core.hooksPath` overrides, `LEFTHOOK=0` and `lefthook uninstall`), `git push`, `wrangler delete`, cf `delete` and `revoke`, cf's project commands and reads of the closed `.env` files.20+- Until the deadline there is no lefthook and no CI workflow: the harness hooks give the early feedback, `bun run verify` is the authority, and `scripts/acceptance.ts` stands in for CI by running `verify` on a cold install.21+- A deploy is never a way around a red gate: `infra/deploy.ts` refuses without an explicit stage and runs smoke tests after.22+- `AGENTS.md` lists each principle with the check that holds it. Where the check and the prose disagree, the check wins.added:.agents/adr/0012-lifecycles-are-pure-transitions.md+15 added
1+---2+status: accepted3+---4+5+# Lifecycles are pure transitions run per DO call6+7+Claim and landing state are each a lifecycle: a pure `transition(state, command, now)` function (`ClaimLifecycle`, `LandingLifecycle`). Each Durable Object call hydrates state, runs one transition, persists the row and an outbox entry, then settles side effects. Deadlines run on DO alarms, never on in-memory timers. Pure transitions can be model-tested over generated histories.8+9+## Considered Options10+11+- **XState 6 with `@xstate/effect`.** Both were alphas, released on Oct 3 and Oct 1, 2026, and snapshot restore was not supported yet. Revisit after the competition.12+13+## Consequences14+15+They are called lifecycles, never "deciders", although the code pattern goes by that name elsewhere: in the glossary a **Decider** is a person.added:.agents/adr/0013-provenance-copy-with-attribution.md+24 added
1+---2+status: accepted3+---4+5+# Provenance: copy with attribution6+7+> **Superseded in part (2026-10-07).** On the user's decision, `PROVENANCE.md`, `LICENSES/` and the planned `scripts/provenance.ts` are gone. A ported file carries its upstream licence notice in its own header: `packages/protocol/src/cli.ts` and `packages/protocol/src/mcp.ts` each open with Rat Stack's MIT notice in full. A vendored folder or a font keeps its licence file beside it (`tools/oxlint/anti-slop/LICENSE`, `apps/web/src/components/ui/LICENSE`, `apps/web/src/assets/fonts/LICENSE-*.txt`, burrow's `LICENSE-rat-stack.txt`). The ports of the debt ledger, `no-module-level-mutable-state`, `no-manual-effect-runtime-in-tests` and `vendor-agent-sources.sh` left with the repo's own fence (ADR 0011's note), and their notices with them. Copying with attribution, owning the copy and never syncing upstream still hold. The record below is kept as it was decided.8+9+Code from other projects enters as ports: it is copied with attribution into our own files, and from then on it is ours to change. The repo has its own history from the first commit. It is not a fork, a template or a vendor commit of another project, and it holds no third-party prose or artwork. `PROVENANCE.md`, `LICENSES/` and `UPSTREAM.md` record every port: its source, commit, licence and our changes. Upstream `main` is never synced in. The competition's [Official Rules](https://www.cloudflare.com/documents/build-next-gen-git-platform-competition-terms.pdf) (§4) require "Entrant's own original content and creation" with no "third-party copyrighted material or artwork without the copyright holder's permission", and originality is half the score (§6). So credited plumbing is fine, and the centre of the product must be ours.10+11+## Considered Options12+13+- **Fork or template Rat Stack.** A fork carries several hundred commits of someone else's history. A template marks the repo "generated from" its source and brings about 85k lines.14+- **A 25% derived and 15% near-verbatim ceiling.** That was sized for adopting a whole stack, not for grafting plumbing.15+16+## Consequences17+18+- Derived lines stay under 15% of the codebase and near-verbatim lines under 10%, with a target of about 5%. `scripts/provenance.ts` measures both.19+- Planned ports:20+ - from [Rat Stack](https://github.com/joelhooks/rat-stack) at `fba26d8` (MIT): the CLI and MCP projections (ADR 0003), `no-module-level-mutable-state`, the debt ledger, and `vendor-agent-sources.sh`;21+ - from t3code (MIT), via Rat Stack: `no-manual-effect-runtime-in-tests`;22+ - from [anti-slop](https://github.com/dmmulroy/anti-slop) at `c44ef22` (MIT): its oxlint plugins, installed by its own vendoring script.23+- Ideas taken without code, such as cf's merged command catalog, are credited in `PROVENANCE.md` as ideas.24+- Credits live in the README and `PROVENANCE.md`, not on screen in the demo.added:.agents/adr/0014-landing-is-a-cas-push-of-main-then-bookkeeping-refs.md+21 added
1+---2+status: accepted3+---4+5+# Landing is a CAS push of main, then the bookkeeping refs, each on its own6+7+The platform lands a checked tree as one new commit on canonical `main`, whose parent is the landed SHA the Project DO last recorded, pushed with a plain push: never forced and never atomic. If `main` moved since, storage refuses it, and the landing re-merges onto the new `main` or ends as `StaleBase`. Only once `main` has moved does the platform push its bookkeeping: the mirror ref (ADR 0005) and the verdict note, each in a push of its own. Artifacts has no atomic multi-ref push, and any write token can force-push `main`, so the one push that matters is the compare-and-swap on `main`, and only the platform holds a token that can make it.8+9+## Considered Options10+11+- **One atomic push of `main`, the mirror ref and the note.** This was the earlier design. Artifacts refuses `--atomic` (spike, Oct 6), and its receive-pack advertises no `atomic` capability.12+- **`--force-with-lease` on `main`.** It is a compare-and-swap too, but it is a forced push: once the expected value matches, any commit replaces `main`, even one that does not descend from it, so a landing built on the wrong parent would rewrite history instead of failing. A plain push of a commit whose parent is the old tip can only move `main` forward. The Lander uses a lease only for its own compose refs, never for `main`.13+- **Bookkeeping first, `main` last.** A mirror or a note naming a commit that never landed would mislead its readers, and Artifacts accepts a notes ref naming a commit the repo lacks, then fails the fetch of that commit.14+15+## Consequences16+17+- The landed SHA in the Project DO, written in the same transaction as the landing record, is the only truth (ADR 0005). The mirror ref and the note may trail `main` for a moment, and nothing decides by them.18+- A bookkeeping push that fails stays in the DO's outbox, and the next alarm lands the same request again. The Lander finds its own commit already on `main`, by the commit's `Request-Id` trailer, and writes only what is missing, so a replayed landing never makes a second commit.19+- Artifacts fires one push event per ref, so `OnPush` reads the ref and ignores the pushes the platform made.20+- Write tokens for a canonical repo never leave the platform. Answers go to forks, and tokens are per repo.21+- The serial landing queue lands one request per project at a time. A landing that meets `RepoBusy` waits and tries again, from a second up to five minutes.added:.agents/adr/0015-submitting-an-answer-is-asynchronous.md+19 added
1+---2+status: accepted3+---4+5+# Submitting an answer is asynchronous: the push hears the cheap stages, and the rest arrives later6+7+An answer is offered by `git push` to the claim fork, or by the `submitAnswer` contract (the CLI's `submit`, the MCP tool). Either way, the call runs only the gate's first two stages: the parse (who may push what, and where) and the shape (territory, judge custody, weakening, reached internals). A clean answer then starts the `Answer` Workflow and returns at once with the outcome `Checking`, which git shows as `remote: checking <ask> at <head>; follow with <cli> status`. The merge, the project's own commands in a container, the held-back checks and any human stage run after the call has returned. Their outcome arrives as the verdict note on the answer's head, in `status` and `watch`, and through MCP. A container check takes minutes, and a push must not hold a request open that long.8+9+## Considered Options10+11+- **Hold the push open until the verdict.** Every refusal would then reach `git push` output, but one request would hold the git client, the gateway and a container for minutes, and a dropped connection would leave the pusher with nothing to read.12+- **Accept the push and say nothing until a later read.** Shape refusals are cheap and the most common kind, so they belong in git's own output, before the answerer moves on.13+14+## Consequences15+16+- Every offer carries a `requestId` (a push's is `push-<head>-<handle>`), so offering the same answer again returns the same receipt and starts no second run.17+- A push hears every stage-1 refusal at once (ADR 0006). `submitAnswer` fails with one error, so it returns the first of them.18+- Refusals from the later stages, such as `ChecksFailed`, `Flake`, `StaleBase` from a re-merge, or `HeldBackFailed`, never appear in the push's own output. They are read from `status`, `watch`, MCP or the verdict note (`git fetch` of the notes ref, then `git notes show`).19+- An answer's `Outcome` says where it stands meanwhile: `Checking`, then `Landed`, a waiting state, or `Refused` (ADR 0006's amendment).added:.agents/adr/0016-a-person-is-a-platform-account.md+21 added
1+---2+status: accepted3+---4+5+# A person is a platform account, and nobody signs in with GitHub6+7+A person is a handle in the platform's own accounts. They sign up and sign in with a handle and a password on the platform's own pages, and the platform is its own OAuth authorization server, for the CLI's login (PKCE) and for MCP clients. Google sign-in is an optional second way in, linked to a handle, and never the identity itself. There is no GitHub sign-in, no GitHub handle lookup and no GitHub key in any env. The product's point is to leave GitHub, so who a person is must not depend on it, and accounts that need no third party let every stage sign people in with nothing to register first.8+9+## Considered Options10+11+- **GitHub OAuth as the only sign-in.** This was the earlier plan. People would arrive with an account and a handle they already have, but every stage would need an OAuth app registered by hand, and identity on a platform built to replace GitHub would be GitHub's.12+- **Named sessions alone:** a sensitive env value mapping bearer tokens to handles. It stays beside accounts, behind the same sessions port, for the operator and the demo's fictional people, who need several accountable identities without signing up one by one. It is not how real people join.13+- **A portable identity behind the handle** (declined, October 2026). Two peer platforms point a handle at something no single host owns: one at a decentralised identifier held on a data server the person chooses, with a third-party client library and an OAuth flow to reach it; the other at a signing key per device, encoded as an identifier, with no account at all. Either would let a `Signed-off-by` trailer name an identity that outlives this platform. Declined for now: the first adds a dependency no `package.json` has and a sign-in redesign, and makes who a person is depend on a third party's account again, which this decision exists to avoid; the second is a key-management burden on every contributor before their first claim. If a second identity is ever added, it is a key the person holds, linked to their platform handle and verified by the platform, never an account at a third party. Re-adding either client needs the user's sign-off.14+15+## Consequences16+17+- Handles are the platform's own. Credit trailers, the vouch file (where a handle with no provider prefix is a platform handle) and fork names spell them, and two handles that differ only in case are one person.18+- A password is HMAC'd with a pepper held as a Worker secret, then hashed with PBKDF2, so a copy of the accounts table alone is useless. `COOKIE_KEY` and `PASSWORD_PEPPER` are required on every stage, and changing the pepper makes every stored password fail.19+- Agents have no identity of their own. An agent works through its person's token, and the harness it names is audit metadata that a landing discloses as `Assisted-by:`, never identity or credit.20+- Importing a public repo from GitHub once, to start a project, is unaffected (ADR 0010).21+- The web keeps the signed-in handle for display in a second `__Host-` cookie, HttpOnly, bound to the session token by its SHA-256 and set when the person signs in, so `/auth/whoami` answers with no platform call on each page. Signing out, or any `Unauthenticated` from the platform, clears both cookies. The handle only shapes what a page shows; every write still carries the token to the platform, which decides.added:.agents/adr/0017-rules-evaluate-once-per-landed-sha-in-a-sandbox.md+20 added
1+---2+status: accepted3+---4+5+# A project's rules are evaluated once per landed SHA, in a Dynamic Worker that can reach nothing6+7+A project writes its process as TypeScript in the config folder. At each landing the Lander bundles the folder with Bun, with macros off so nothing in it runs while it is bundled. The platform then evaluates the bundle once, in a Dynamic Worker made by the Worker Loader. That Worker has no bindings, no outbound network (`fetch` and `connect` throw), no subrequests and a CPU limit, and a prelude freezes its clock and randomness to the landed commit's time and a hash of its SHA. The result is the project's policy: plain data, decoded with Schema as it leaves the sandbox, and cached in the Project DO beside the landed SHA it came from. Most rules are data. The few that are functions (whether a proposal opens without a decider, whether a claimant is admitted) are called on demand in the same kind of sandbox, with their facts passed in and the clock at zero. A project with no config folder runs on the defaults.8+9+## Considered Options10+11+- **Config as data only (JSON or YAML).** There would be nothing to sandbox, but a project could not compute its rules, and the typed SDK would have nothing to check them against. `packages/rules` keeps a JSON evaluator (a committed `policy.json`, or the defaults) as a fallback adapter.12+- **Bundle inside the platform Worker** with Cloudflare's worker bundler. A bundler would sit in the Worker that serves git, and it would bundle on every evaluation instead of once per landing.13+- **Evaluate on every push.** Every push would pay a sandbox start, and two pushes judged against the same landing could see different rules.14+15+## Consequences16+17+- Only a landing changes a project's rules, and no answer changes what judges it: the config folder is in the judge closure, and rules are read only at the landed SHA (ADR 0005).18+- Evaluating the same SHA twice gives the same policy (principle 8; `packages/rules/test/replay.test.ts`).19+- A config folder that fails to bundle or to evaluate leaves the policy of the previous landed SHA in place, and the failure is logged.20+- The SDK a project imports must run with no clock, no randomness and no network of its own, so rules get time and identity only through their facts.added:.agents/adr/0018-asks-are-drafted-in-a-workflow-and-put-to-a-decider.md+22 added
1+---2+status: accepted3+---4+5+# Asks are drafted by the platform's agent in a Workflow, run red first, and put to a decider6+7+A member who can say what a project wants, but not write its ask, proposes the want with a draft. The platform's agent then writes the ask for them. A draft round is one run of the existing `Answer` Workflow under params tagged `Draft`. Its steps are a context step, which picks files from the canonical tree at the landed commit within a byte budget and never reads a layer, then up to three attempts, then a settle. Each attempt makes one model call through Workers AI's `AI` binding, recorded as a step, and one rehearsal: red first on the Checker, the same preparation `accept` runs, which lands nothing. The model is the `DRAFT_MODEL` var, and no key or secret is involved. A refused rehearsal feeds its rendered refusal and the last 4 KB of its output into the next attempt. The model returns fields only (the ask's id, want, context, territory, the test's path and source, a rationale). Code renders the `.ask.ts` file from those fields, so only the test file is the model's own text, and that test may not sit in the config folder. A settled draft reaches a decider as an `OpenProposal` decision. Its evidence is the drafted files, the red-first signature, the model, the attempt and the rationale. Accepting it runs the unchanged `accept`, red first again on the then-current `main`. The landing credits the proposer (`Asked-by`) and the decider (`Decided-by`), and discloses the agent with `Assisted-by: <cli>-drafter:<model> (verified)`.8+9+## Considered Options10+11+- **A container harness with a provider secret** (a coding agent in a Checker-like container, calling a model provider with a key). It could edit and run code freely, but it adds a secret to set per stage, a second container image, and a harness that writes code into the ask file. That stays a later step, which could reach the same binding through an intercepted host.12+- **Drafting inside the Project Durable Object's call.** A model call takes 30 to 60 s and a rehearsal minutes; a DO call that long blocks the project, and a retried call would ask the model again. A Workflow step records the model's answer, so a replay asks nothing more.13+- **The `agents` SDK.** It brings 17 peer dependencies and a deprecated MCP agent, and it adds nothing a recorded step and a binding call do not already do.14+15+## Consequences16+17+- Nothing a draft writes lands without a decider: the draft's own rehearsal only reports, and `accept` is the one path to `main`.18+- A draft round's instance is one per project, proposal and round, so a round started twice runs once. A complete round is never started again, since that would ask the model again. A round that errored is.19+- Workers AI does not hold a model to the JSON Schema it is asked for. The reply is decoded with Effect Schema whatever the model claims, and a reply that does not decode is a spent attempt.20+- The prompt's policy digest is built from the public policy only, so a layer's name, readers and paths never reach a model.21+- Drafts are `fix` asks only for now. A project with no `fix` kind settles its draft as failed at once.22+- Drafting has its own rate limit (`DRAFT_LIMIT`), and each draft costs at most three model calls and six Checker runs, plus two on accept.added:.agents/adr/0019-the-web-reads-repos-through-public-contracts.md+28 added
1+---2+status: accepted3+---4+5+# The web reads a project's code through public contracts the platform serves6+7+> **Superseded in part (2026-10-10).** Code is no longer drawn in the browser only. ADR 0027 records that the web Worker highlights a blob page's file and a commit page's first files on the server, in a fixed set of languages and within its own limit, and that the browser's drawing takes their place once it can draw the same code at once. The tree is still drawn in the browser only. The record below is kept as it was decided.8+9+The web's code browser (tree, file, raw bytes, log, commit, refs, and why each line is there) reads only through public, read-only contracts on `/rpc`. The platform Worker serves them over its existing `RepoHost` on the public Artifacts namespace. The logic lives in one host-free module, `@repo/project/code`, which the platform's handlers and the web's offline dev world both call. No payload names a repo. Each names a project, and the module reads that project's canonical repo only, never a fork or a layer. A revision is `main` (the project's landed SHA, from its record and never from a ref), a full commit SHA in the canonical repo, or a tag name matched exactly against the port's tag list, never joined into a ref path. Every answer names the commit it resolved, so any page becomes a permalink.10+11+## Considered Options12+13+- **An Artifacts binding on the web Worker.** It would save a hop, but the web would then hold storage. Today it holds a service binding and public vars only, and a type test keeps it that way. A second Worker reading repos would also put a second place in front of the visibility rule.14+- **Highlighting on the server.** A cold highlight costs about 800 ms and some 730 bytes a line, and the grammars would add about 11 MB to the Worker. Pierre draws code in the browser instead, and the server sends a plain fallback: a table for a folder, and numbered lines with `#L<n>` anchors for a file.15+- **Browsing forks.** Forks would need their own auth paths, and a layer repo must never be nameable. Claim forks are listed and link to their answer's page instead.16+17+## Consequences18+19+- Raw bytes (`GET /<project>/raw/<rev>/<path>`) carry `x-content-type-options: nosniff` and a sandboxing CSP (`default-src 'none'; img-src 'self' data:; style-src 'unsafe-inline'; sandbox`) on every answer, refusals included. HTML and XML are served as plain text, and SVG as an image, which the sandbox keeps from running script. A read by commit SHA is cached as immutable. The web passes the route on untouched.20+- Reads addressed by object id (trees, blobs, commits, a commit's changes, a file's why) are cached per isolate, keyed by the object's id. Only finished reads are kept, never one still under way, because Workers cancels a request whose client left without interrupting its fibers. `main` is resolved on every call.21+- A README renders as GitHub-flavoured Markdown in one fixed plugin order, its relative links and images pointing into the repo at the SHA, then sanitized with GitHub's allow-list. The order is the security property, so it lives in one tested module.22+- Why each line is there is a first-parent blame from the revision, up to 200 commits. A line whose commit is a platform landing names its ask, answer, people and verdict from the project's own record, so a trailer forged on an imported commit never reads as a landing.23+- An ask's opening is a landing that answers no ask, so its landing names the ask it opened (`opened`, a migrate family's parent) and never `ask`, which credits, Today and the record read as an answer. The project derives `opened` from its record when it is read, so openings recorded before the field existed link their ask too, with nothing rewritten. Each read's results are kept beyond one isolate as ADR 0020 records.24+- The port lists tags already peeled to their commits, since an annotated tag names a tag object a commit read cannot open.25+- Artifacts' import brings no tags. An operator may backfill an imported repo's `refs/tags/*` from its source, through a short-lived write token minted over REST. This is the one write that skips the gateway, and it writes tags only, never `main`.26+- Each read is an Artifacts operation, billed past a monthly allowance and limited to 2,000 a repo every 10 s. Every walk is capped: 50,000 paths, 200 commits scanned for a path's log or for why, 300 files and 2 MiB of text in a commit's diff, and 1 MiB per file.27+- Five code reads are MCP tools too, for an agent with no shell or git, such as a hosted connector: `readTree`, `readFile`, `log`, `why` and `listRefs`, each capped: a log page holds at most 100 commits, and the limits above bound the rest. `showCommit` (up to 2 MiB of diff) and `listPaths` (up to 50,000 paths) are not, since nothing caps them to what a transcript holds. No code read is a CLI command: git reads code locally.28+- The browser draws code, diffs and the tree with Pierre in a pool of web workers (`apps/web/src/features/code/pool.tsx`), one pool per tab, kept between code pages. While it draws, the server's HTML holds the file or the diff as plain text at Pierre's exact metrics (13 px text on 20 px lines, its gutters, its header), so the highlighting lands in place with nothing moving. There is still no highlighting on the server, and the tree is still drawn only in the browser: both would need the web Worker's server build to be minified to fit its byte budget.added:.agents/adr/0020-code-history-is-kept-by-immutable-ids.md+26 added
1+---2+status: accepted3+---4+5+# Code history is kept by immutable ids, in a bucket of its own6+7+Why each line of a file is there, and a path's history, are what a walk of up to 200 first-parent commits computes, and a cold walk on a large import took tens of seconds in one isolate, then again in the next. What a walk computes from a commit is fixed for good by that commit's content, so the platform keeps it in an R2 bucket, `code-cache-<stage>` (binding `CODE_CACHE`, platform only), behind the `CodeStore` port in `@repo/project`. A key is `<repo>/<kind>/v<version>/<commit>/<scan>/<sha256(path)>`: the canonical repo only, `why` or `path-log`, the version of the algorithm that computed it, a commit id (never `main` or a tag's name, which resolve first), how many commits the walk scanned, and the path hashed to keep the key under R2's 1,024 bytes. A value holds ids and ranges encoded with Schema, never a file's text and never a landing: each view asks the project's record for its landings, so a new landing or an opening's ask shows at once.8+9+## Considered Options10+11+- **The Cache API.** It is per colo, so a reader in another colo pays the walk again, and every stage lives on `workers.dev`, where we assume `cache.put` keeps nothing.12+- **Workers KV.** Its namespace id would be written per stage into `wrangler.jsonc`, and it is eventually consistent, where R2 is strongly consistent and its binding is only a bucket name.13+- **The Project Durable Object's storage.** It would put every reader's lookup and put on the project's single-threaded object, beside its claims and landings.14+- **The `evidence` bucket.** It keeps failing lanes' logs, another job with its own name.15+- **Every tree in the store.** Tried live and reverted: each store call cost what a repo read does, so a repo's first view did three times the calls and took 32-38 s.16+- **A per-commit path index.** Counted over local copies, building it reads every changed folder of every commit in the window, about three times the trees of one walk, and the first view would pay for it. Not built.17+18+## Consequences19+20+- Reads go isolate cache, then store, then walk; what a walk computes is put in both. A store that fails, or a value that no longer decodes, is a miss, never the read's failure, and the walk puts a good value back.21+- A walk may start from what is kept at a first-parent ancestor up to 16 commits back, carrying line ranges forward through each diff, so a new landing on `main` costs a handful of reads. A result built forward that way keeps that ancestor's place in history, so past the 200-commit window it can differ from a walk started fresh; both are correct for the commits they name.22+- A version moves whenever its algorithm changes, so an old value is never read as a new one, and nothing in the bucket ever goes stale.23+- A store answers one Worker invocation a few dozen calls a second whatever is under way, so the number of calls is the cost. A file of at most 256 KiB is read whole at each commit (its git blob id is the SHA-1 of its bytes), one call a commit instead of its folders; a larger file, a folder or a missing path walks the folders. A commit that changes only a file's mode does not show in that file's history.24+- A view's reads run in one repo session (`inRepoSession` in `@repo/artifacts`): the binding adapter opens one handle per repo for the session and releases it when the view ends. A call Artifacts refuses as rate limited is asked again with a growing wait, a few times, then fails the view, which keeps nothing.25+- A cold view of a file with 200 commits of history still makes about 200 calls, 5-8 s in one invocation; a warm one answers in under a second. Going lower needs work that runs off the reader's request, such as an index built when something lands.26+- Removing the store is a deletion: the port's default stores nothing, and every read still answers.added:.agents/adr/0021-a-listed-projects-posture-is-read-from-the-project.md+22 added
1+---2+status: accepted3+---4+5+# A listed project's posture is read from the project when it is listed6+7+The project list, the platform's `/` and the web's `/llms.txt` show each project's posture beside its name. Those rows come from the front-page projection, which hears a project only through its outbox events, and a project's standing posture changes without any event: a first config stands at once with no ledger row, a widening needs no decision, and an accepted narrowing takes effect when its notice runs out, by the clock. So a list could say "Open" while the project's own ledger said "Open with sealed evidence".8+9+A list now reads each listed project's posture from that project's own record at list time: the anonymous ledger read, whose `posture` is the one standing now, the same value the ledger page shows. One helper in `@repo/project`, `withStandingPosture`, lays it over the projection's rows, a few projects at once. The platform's list and `/`, and the web's offline dev world, all call it. The projection's posture column stays as the fallback, kept for a project the platform never made or one whose ledger read fails, and that failure is logged.10+11+## Considered Options12+13+- **Write a `PostureChanged` row for a first config or a widening.** A row needs a decision to name, it changes what the public ledger records, and a project that exists today gets one only when something next wakes it.14+- **Project a new outbox event into the front page.** Existing rows stay wrong until each project emits again, and a narrowing that takes effect by the clock still lags behind it.15+- **Show posture only on the ledger page.** The badge on the list is what a visitor sees first.16+17+## Consequences18+19+- Each list makes one ledger read per listed project, and the ledger is read whole for one field. A stage that lists a few dozen projects wakes each of them on every list. ADR 0025 amends this: what a list read is kept until the posture can next change, so a list reads only the projects whose kept posture is missing or ran out.20+- Nothing is migrated or replayed: once deployed, a list shows the right posture for data already there.21+- The badge and the ledger are one value, so a narrowing that takes effect by the clock shows on the list at once.22+- Posture comes through the visibility port's own ledger, so a host without the visibility cartridge still lists every project as Open.added:.agents/adr/0022-the-web-is-a-control-room-shell.md+23 added
1+---2+status: accepted3+---4+5+# The web is one permanent shell: a rail, the page, and an inspector of typed facts6+7+Every page of the web sits in one shell that never unmounts: a rail on the left (the site's sections, the projects with their postures, the current project's sections, and the file tree on code pages), the page in the middle, and an inspector on the right that holds the typed facts of the thing in hand (its state, who may take it, the gate, the claim, the posture, the family, the provenance). One component, `Workspace` (`apps/web/src/features/shared/shell/workspace.tsx`), draws a page's main pane and its inspector together, so both arrive in the server's HTML in one pass, with no portal and no inspector built only in the browser. A list's selection lives in the address (`?ask=format-ordinal`, `?decision=dec-000002`), so a selected row and its facts render on the server and a link to them can be shared. Below 1120 px the rail becomes a top bar with a Menu sheet, the inspector's blocks render inline after the page's head, and phones get a bottom bar (Asks, Today, Projects, More).8+9+The colour and type tokens stay as they were: one paper ground, ink as the only accent, five state colours that appear only beside their word and mark, Public Sans for what people read and JetBrains Mono only for what a terminal prints. What changed is the frame: the single centred report column, its double rule under every title and its ruled field grids are gone, and the pieces every page shared (the row, the status line, the family fan, the fact blocks, the copy action) are one component each in `apps/web/src/features/shared/`.10+11+## Considered Options12+13+- **Refine the single-column report sheet.** It kept every page self-contained, but a reader had to scroll to learn an ask's state, whose move it was and its next command, and the same facts were drawn differently on each page.14+- **A man page for every page.** Terse sections and mono commands read well for agents and on the For agents page, which keeps that voice, but lists, Today and the code browser need rows, selection and a tree.15+- **A forge dashboard of cards and stat tiles.** It spends colour and space on chrome, and invites counts that read as scores.16+17+## Consequences18+19+- Every page's frame was rebuilt, and its tests render inside a memory router (`apps/web/test/render.tsx`).20+- The inspector repeats a subject's state (the State block) so it reads whole on its own; facts render twice in the markup (the inspector column and the inline copy), one hidden at each width, so a test that counts a `data-*` in the facts scopes to the inspector.21+- Phones get a fixed bottom bar, and a decision's choices sit in a fixed bar above it.22+- `DESIGN.md`'s Layout, Components and Navigation describe this shell.23+- The shell's own code sits on every page's first load, so what the rail and shell import is held small (`apps/web/test/production-bundle.test.ts`).added:.agents/adr/0023-links-are-the-routers-and-lists-render-on-the-server.md+25 added
1+---2+status: accepted3+---4+5+# Links between pages are the router's, and lists arrive rendered from the server6+7+Every link from one web page to another is `AppLink` (`apps/web/src/features/shared/link.tsx`): the router's `Link`, with the router's default preload set to `"intent"`, so a click moves without reloading the document and a hover or focus fetches the next page's code and loader data first. Outside a router (a view's own test rendered alone) it draws the same address as a plain anchor. Links to server routes (sign-in, raw bytes, a `.md` twin, `llms.txt`) stay plain anchors.8+9+The lists (the front page, a project's home, Today, the landings) and the subject pages read their data in the route's loader on the server, so the HTML a browser, a crawler or `curl` receives already holds the rows. A loader's read seeds the page's atoms through `SeededAtoms` (`apps/web/src/client/seeded.ts`), a registry made for each render, and the atoms then keep the page live in the browser. The shared atom registry lives for the Worker's whole life and every request on it shares it, so a server render never writes a value there: atoms read outside a seeded registry render as waiting on the server (`withServerValueInitial`).10+11+This replaces the earlier rule that the web's views used plain anchors so they could be rendered and tested without a router.12+13+## Considered Options14+15+- **Plain anchors everywhere.** Views render alone with no setup, but every click reloads the document, the shell's rail and inspector redraw from nothing, and no next page can be fetched ahead.16+- **Lists read in the browser after hydration.** The first load is smaller, but the HTML holds no rows (an agent or a crawler sees an empty list) and the rows arrive after a skeleton.17+- **Seeding the shared registry from the loader.** One line per page, but two requests on one Worker would see each other's data.18+19+## Consequences20+21+- A view that uses `AppLink` is tested inside a memory-history router (`renderAt` in `apps/web/test/render.tsx`), which renders the matched tree to static markup after `router.load()`.22+- A hover or focus may start platform reads for a page the reader never opens; the router keeps a preloaded result for 30 s and a loaded one for 10 s.23+- An agent that fetches a list page gets its rows in the HTML, and `Accept: text/markdown` on `/` and `/<project>` answers with the same text as `llms.txt` and the project's `llms.txt`.24+- Each page gives its own registry an `id` from its address, so moving to another address starts from that address's seeds.25+- A route file's extra exports stay in the client's entry chunk, so loaders' reads live in server-only modules (`apps/web/src/server/*`, `features/*/reads.ts`), which the root preload ceiling holds.added:.agents/adr/0024-per-ask-progress-is-folded-from-watch.md+22 added
1+---2+status: accepted3+---4+5+# Where each ask stands is folded on the web from the project's public events6+7+The web shows, for each ask, who holds it, each answer checked (its rounds), the latest outcome, whether it landed and whose move that leaves, and for a family its children's marks and "n of N landed". None of that is a new contract. It comes from one pure fold, `askStates(events)` (`apps/web/src/features/shared/ask-progress.ts`), over the `watch` replay of the project's public events that the project and answer pages already read, held once per project in `projectEventsAtom` (`apps/web/src/client/events.ts`). A claim sets the claimant and a release, a lapse or the ask's close clears it; each `Judged` is a round; a new claim starts the latest outcome over while the earlier rounds stay. A family's N is the parent's stored `blockedBy` (from `showAsk`), less the delete child, never the listing's remaining blockers. Whose move it is follows from the latest outcome alone: a refusal is the answerer's, a decision or a finish a decider's, a check the platform's, and an ask waiting on another that ask's.8+9+A landing seen while the page is open settles its mark once (the stamp). The first settled read records the highest event number it holds; a later read stamps an ask only when its close is numbered after that, or, where the page polls, when the previous read did not have it landed. A replay that already holds the landing never stamps.10+11+## Considered Options12+13+- **New fields on the listing or a per-ask progress read.** Exact and cheap per page, but each is a new public contract on every surface, the CLI's and MCP's included, for what the event stream already says.14+- **A family's N from the listing's remaining blockers.** It shrinks as children land, so "3 of 6" would read "3 of 3".15+- **Stamping every landed mark on load.** The stamp would mean nothing: it marks a landing that happened while you watched.16+17+## Consequences18+19+- Each page that folds reads its project's whole replay once when it mounts, so its cost grows with the project's events; the follow then starts from the replay's last number, and a page reads its other keys once more after the replay so nothing that happened between them is missed.20+- The web cannot say when a claim runs out or which patch each round pushed, since no event carries them; the pages show neither.21+- The fold is pure and replays to the same answer, which `apps/web/test/events.test.ts` holds.22+- The front page reads the replay only for projects with a family on the page.added:.agents/adr/0025-a-listed-posture-is-kept-until-it-can-next-change.md+22 added
1+---2+status: accepted3+---4+5+# A listed project's posture is kept with the instant it can next change6+7+This amends ADR 0021. A list still shows the posture each project's own record stands on now, but it no longer reads every listed project on every list. What a list read is kept in a store, `StandingPostures` (`packages/project/src/standing-posture.ts`), beside the instant the posture can next move by the clock alone (an accepted narrowing whose notice runs out) and the project's last event the read saw. A kept posture serves until that instant. The front-page projection deletes a project's kept row in the same write as any event it applies that can move the posture sooner (a landing, a decision, a ledger entry), and a list writes a row only while the projection has applied no later event of that project than the read saw, so a read taken before an event is never written back after it.8+9+The read is `ProjectApi.standing`, platform-only and on no contract: the public ledger carries no decision times, so it could not say when a narrowing takes effect. The store's default keeps nothing, so the web's dev world and every caller without a store read each project as before; the platform keeps it in D1, in the `standing_postures` table that `apps/platform/migrations/0005_standing_postures.sql` adds.10+11+## Considered Options12+13+- **Keep reading every project on every list** (ADR 0021 as it stood). Always current, but a stage listing a few dozen projects woke each of them on every list, the platform's `/` and the web's `/llms.txt` included.14+- **Keep the posture with a fixed time to live.** Simpler, but a landing or a decision that moves it would show late, or the time would be short enough to save little.15+- **Put the posture on an outbox event.** ADR 0021 turned this down: a narrowing takes effect by the clock, with no event.16+17+## Consequences18+19+- A list reads only the projects whose kept posture is missing or ran out, at most 8 at once.20+- A store that fails to read or write is a miss, never the list's failure, and the miss is logged.21+- Migration 0005 is applied by `bun run bootstrap -- --stage <stage>` before a platform build that reads it is deployed. Until then the projection finds no table and leaves its deletes out, and every read is a miss: lists are as slow as before, not broken.22+- The badge and the ledger stay one value; a narrowing that takes effect by the clock shows on the list at its instant.added:.agents/adr/0026-the-edge-keeps-the-webs-anonymous-answers.md+37 added
1+---2+status: accepted3+---4+5+# The edge keeps the web's anonymous answers, and nothing read for a reader6+7+The web Worker runs behind Workers Cache in each deployed stage (`"cache": { "enabled": true }` in `apps/web/wrangler.jsonc`'s `dev-oscabriel` and `demo` blocks; the top-level `local` stage, which `vite dev` reads, has none). A page the cache holds comes back from the edge without running the Worker, at the `Cache-Control` the page already gives: `branchPage` (`public, max-age=30, stale-while-revalidate=300`) for the pages at `main`, a tag or a commit, `public, max-age=60` for the agents' documents, and the platform's own headers on what the web passes on (raw files, releases, the install script).8+9+Workers Cache keys an answer by the Worker's entrypoint, path, query string and version, and by none of the host, the `Cookie` or the `Authorization` (<https://developers.cloudflare.com/workers/cache/cache-keys/>). It bypasses a request with an `Authorization`, an answer with `Set-Cookie`, and an answer marked `private` or `no-store`. It does not bypass a request that carries a cookie, it honours `Vary` by storing one variant per verbatim value of each named request header, and an answer with no `Cache-Control` is kept by a heuristic: two hours for a 200, three minutes for a 404 (<https://developers.cloudflare.com/workers/cache/configuration/>). So a page whose markup depended on its reader would be handed to everyone, and a route that forgot its headers would be kept for hours.10+11+The web holds that off in one place. `wrangler.jsonc`'s `main` is `apps/web/src/server.ts`: TanStack Start's own server entry, with every answer it gives (pages, server functions, server routes, redirects and errors) passed through `forTheEdge` (`apps/web/src/server/edge-cache.ts`):12+13+- An answer to a request that carries any cookie or an `Authorization`, an answer that sets a cookie, an answer with no `Cache-Control`, and one whose `private` or `no-cache` names a field to strip, is `private, no-store`, which the cache bypasses. Nothing read with a reader's credential is stored.14+- Any other answer the cache may store varies by `Cookie`. It was made for a request with no cookie, and the cache serves it only to a request with none, so a signed-in reader never receives a page kept from a signed-out one, and the browser's own cache drops it when a session begins or ends.15+- `CDN-Cache-Control` and `Cloudflare-CDN-Cache-Control`, which outrank `Cache-Control` at the edge, are dropped.16+17+The pages keep a rule their loaders already followed (`apps/web/src/server/front-page.ts` reads "as the anonymous viewer reads it"): a page the edge may keep reads as nobody. Its loader calls `serverClient(env)` without the request, and only the pages kept nowhere (Today and a decision, `personalPage`) reach the reader's request through Start's server helpers. The rail's signed-in state and Today's count are read in the browser after hydration. So the markup of a `branchPage` page is the same for every reader, and the `Vary` above is a second wall, not the only one.18+19+`apps/web/test/edge-cache.test.ts` holds it: the rule for every kind of answer the web gives, the entry as Start's handler wrapped and nothing else, each server route that hands the reader's cookie on (`/llms.txt`, a project's `llms.txt`, `/` as Markdown, a raw file, `/rpc`) kept nowhere when a session cookie comes with it, and the pages that read the request being exactly the `personalPage` ones. `packages/config/test/web-wiring.test.ts` holds the config: the entry, the cache on in each stage and off at the top, and no `cross_version_cache`.20+21+## Considered Options22+23+- **No Workers Cache.** Nothing to hold, but every page view runs the Worker and its platform reads; a page at a commit, which never changes, costs as much as one at `main`.24+- **A cookie-reading gateway entrypoint with the cache off, forwarding cookie-less requests to a cached inner entrypoint over `ctx.exports`** (Cloudflare's own pattern for authenticated traffic, <https://developers.cloudflare.com/workers/cache/examples/>). Every request would run the gateway, and it needs a second entrypoint in a Worker that TanStack Start's build owns. The `Vary: Cookie` rule gives the same separation inside one entrypoint.25+- **Bypassing only on the session cookie.** More hits for a reader who carries some other cookie, but every cookie the web sets would have to be weighed; the web's readers carry none until they sign in.26+- **`private` with the page's own `max-age` for a signed-in reader**, so their browser could still keep a page. Kept simple instead: `private, no-store` is what the cookie fence checks.27+- **`cross_version_cache`.** Pages would survive a deploy, but a kept page names the hashed assets of the version that drew it.28+29+## Consequences30+31+- Cost: with caching on, every request to the web Worker is billed at the standard request rate, including the static asset requests (`/assets/*`, icons, fonts) and the service-binding calls that are free without it (<https://developers.cloudflare.com/workers/cache/>). A hit runs no CPU.32+- Cost: an answer is held to the Free plan's cacheable size, whatever the account's plan, while that launch limit lasts, and purges run at the Free tier's rate (<https://developers.cloudflare.com/workers/cache/limitations/>).33+- A signed-in reader, and anyone who carries a cookie, always runs the Worker and keeps nothing in the browser; the edge serves signed-out readers and agents.34+- A page at `main` may be served by the edge up to 30 seconds old, and up to five minutes more while one request refreshes it in the background, now to every reader rather than one browser. Purging on a landing would have to run inside the web Worker (`ctx.cache.purge`), since a purge belongs to the entrypoint that owns the answer; nothing purges yet.35+- Each deploy starts the cache cold, since the version is in the key.36+- The host is not in the key: an answer that names its own origin (the agents' documents' `webUrl`) is kept for whichever host asked first. Each stage's web answers on one `workers.dev` host today; a custom domain beside it would share one cache.37+- After a deploy, `curl -sI <web>/<project>/tree/main` twice shows `cf-cache-status: MISS` then `HIT` and `vary: Cookie`; the same request with `-H 'cookie: a=b'` shows `cache-control: private, no-store` and no `HIT`.added:.agents/adr/0027-code-is-highlighted-on-the-server-in-a-fixed-set-of-languages.md+31 added
1+---2+status: accepted3+---4+5+# Code is highlighted on the server in a fixed set of languages6+7+This amends ADR 0019, which drew code in the browser only. A blob page's file and a commit page's first files now arrive highlighted in the document: the web Worker draws them with `@pierre/diffs/ssr`, using the browser's own options (`apps/web/src/features/code/pierre.ts`), and sends each drawing as a declarative shadow root on Pierre's `diffs-container`. The browser paints it with the document, before any script. The browser's own drawing (`File`, or the commit's `CodeView`) still takes over, with line selection, the address's `#L` and the worker pool, but only once it is ready to draw the same code highlighted at once: its module loaded, the pool up, and the code highlighted in the pool first (`prepareFile`, `prepareDiffs`). It then replaces the server's drawing in one render (`apps/web/src/features/code/client-code.tsx`), with every line in the same place. Code the server does not highlight still arrives as plain text and changes once, to highlighted.8+9+The server highlights only within its own limits (`apps/web/src/features/code/prerender.ts`):10+11+- **Languages.** TypeScript, TSX, JavaScript (with `.mjs` and `.cjs`), JSX, JSON, Markdown, YAML, TOML, shell, CSS and HTML, by the names Pierre gives a file's type. Any other language is sent as numbered plain text, as before, and the browser highlights it.12+- **Lines.** At most 400 lines a page. A diff counts both sides, since Pierre highlights both whole files. A commit page considers at most its first 8 files that start open (an added or deleted file past 80 lines starts folded), the ones a reader sees first. `CodeView` highlights the rest as they scroll into view.13+- **The drawing's own limits.** A file past `tokenizeMaxLength`, or with any line past `tokenizeMaxLineLength` (1,000, the same as `maxLineDiffLength`), is sent plain, so a minified file is never tokenized on the server.14+15+Both sides decide from the page's own data, so the browser knows which code arrived highlighted without being told. The Worker runs Shiki's JavaScript regex engine, since a Worker may not compile WebAssembly. Its build resolves `shiki` to core alone (`apps/web/src/server/shiki.ts`) and `@pierre/theming/themes` to an empty collection (`apps/web/src/server/pierre-themes.ts`), through a plugin in `apps/web/vite.config.ts`. So it bundles the eleven grammars it names, as chunks off its entry, and no other grammar, theme or WebAssembly. Pierre will not resolve a grammar or a theme by name in a Worker's global scope (`isWorkerContext`), and `registerCustomLanguage` only registers a loader for that resolution. The server therefore loads each grammar and the token theme itself and attaches them to Pierre's shared highlighter (`apps/web/src/features/code/prerender-server.ts`).16+17+## Considered Options18+19+- **Keep drawing in the browser only** (ADR 0019 as it stood). The plain text already matched Pierre's measures, so nothing moved. But the code changed colour after hydration, and that swap was the largest paint on code pages.20+- **Highlight on the platform and keep the HTML in R2.** Each drawing would be made once for good. But it would need a new public read for the HTML, and every Worker reading it would take a hop on every code page.21+- **Every grammar on the server.** About 10.7 MB of grammars, far past the web's byte budget.22+- **Ship the HTML in the loader's data.** The browser could then adopt it on any page, but the document would carry every drawing twice: once as markup and once as a string in the router's state. Instead the loader draws the code ahead, the drawing is kept by its blob ids until the render reads it, and the browser needs nothing but the markup.23+24+## Consequences25+26+- **Bytes.** The web Worker's JavaScript grows from 1,528,378 to 2,773,744 bytes (budget 4,075,000), about 940 KB of it grammars. Its entry stays at 308,418 (budget 801,000): the grammars and `@pierre/diffs/ssr` load by dynamic import on a page's first highlighted code. `apps/web/test/production-bundle.test.ts` holds the Worker to exactly these grammars, none on its entry, and no theme collection or Oniguruma. It also holds the chunks every page preloads to no grammar and nothing of this module.27+- **CPU.** Measured in the dev world's workerd, highlighting TypeScript takes about 0.14 ms a line warm: 2,400 lines about 315 ms, 600 about 85 ms, 400 about 57 ms, 100 about 18 ms. A fresh isolate's first 400-line file took 180 ms, which includes making the highlighter and compiling the grammar. 2,400 lines would cost hundreds of milliseconds, so the server's limit is 400 lines, well below the browser's.28+- **Document size.** A highlighted line costs about 700 to 1,600 bytes of markup, depending on how many tokens it holds: a 400-line TypeScript file is about 640 KB. Each drawing also carries Pierre's stylesheet and icons (about 48 KB). Both compress well: an 11-line file's page is 100 KB raw and 16 KB gzipped.29+- **Cache.** The drawings are kept in the isolate (`prerender.ts`): at most 24, and 8,000,000 characters of HTML, keyed by blob ids and path, which never change what they name. A file read again is not drawn again. A loader that finds its drawing evicted before the render makes it again, and the render streams it.30+- **The page.** A page reached by a link, not loaded, has no server drawing. It shows the plain text, which the browser's drawing then replaces. A split diff (`?style=split` on a wide screen) is plain until drawn, as before, since the server draws unified only.31+- **Without script.** A highlighted file has no `#L` anchors: Pierre's lines live in a shadow root, which a fragment cannot reach. Plain text keeps its anchors.added:.agents/adr/0028-the-cli-exits-with-the-code-a-refusal-calls-for.md+27 added
1+---2+status: accepted3+---4+5+# The CLI exits with the code a refusal calls for6+7+Until now every refusal ended the CLI with 1, so a script or a harness that wanted to know what to do next had to read stderr or ask for `--json`. Now the code comes from sysexits(3) and follows the refusal's fixed `retryable`, in `packages/protocol/src/exit-code.ts`:8+9+- A retryable refusal is 75 (`EX_TEMPFAIL`): run its `next`, and the same thing can pass.10+- A final refusal is 65 (`EX_DATAERR`) when what was sent has to change, 66 (`EX_NOINPUT`) when what was named does not exist or no longer stands open, and 77 (`EX_NOPERM`) when the caller may not do it. A table fixes one of the three per final tag. Its type is keyed by exactly the final tags, so a new final tag fails the typecheck until it has a code, and a retryable tag cannot be given anything but 75.11+- Refusals met together, as stage 1's are, end with the first of 77, 66, 65 and 75 among them: who is asking comes before what was named, which comes before what was sent, and 75 only when every one can be retried.12+- Not being signed in is 77, a platform that does not answer is 69 (`EX_UNAVAILABLE`), a misuse stays 2, and anything else stays 1.13+14+Every command prints its refusals through `endRefused` (`packages/protocol/src/cli.ts`), which fails with `Reported` and their code, so a command cannot print a refusal and exit with another code. The code is the CLI's projection of the union, like the `--json` envelope: `/llms-full.txt` and the skills list each refusal's code from the same table. `packages/protocol/test/exit-code.test.ts` pins every tag's code. `apps/cli/test/build.test.ts` holds the built binary to it.15+16+## Considered Options17+18+- **Keep 1 for every refusal.** Nothing to learn, but the code says nothing a harness can act on, and `retryable` was already fixed per tag.19+- **One code per tag.** Exact, but 45 codes make a lookup table nobody keeps in their head, and the tag is already in `--json`.20+- **64 (`EX_USAGE`) for a misuse.** sysexits' own code, but effect/cli and most command lines use 2, and scripts already read it.21+- **76 (`EX_PROTOCOL`) for every final refusal**, as some tools use it for "the remote rejected the payload". It would merge three answers a caller acts on differently: change what you sent, name something that exists, or get let in.22+23+## Consequences24+25+- A script that checked for exit 1 after a refusal now sees 65, 66, 75 or 77; it should test for nonzero, or for the code it means.26+- `PostureChange` is 65, as a declined waiver's `Weakened` is: it is the refusal a declined decision stands for, so the answer has to change. Its row in the reference docs now says so.27+- A code is a public contract, like a tag: change one only with notice.added:.agents/adr/0029-a-stale-answer-names-who-moved-each-conflicting-path.md+26 added
1+---2+status: accepted3+---4+5+# A stale answer names who moved each conflicting path6+7+When an answer's merge onto main conflicts, `StaleBase` named the paths and nothing more, so whoever rebased had to dig through main's log to learn whose change they were resolving against. Now it carries `movedBy` as well, an optional field that is never empty. For each conflicting path the platform landed, it names the landing that last changed that path: its commit (`landing`), the person accountable for it (`author`), and the ask it answered or opened (`ask`, absent for a decider's own landing). The renderer puts each one after its path: `src/parse.ts (last changed by alice in bb5da9e, for parse-iso)`.8+9+The merge step finds them (`packages/project/src/answer-runs/movers.ts`), after the Lander has said the merge conflicts:10+11+- A three-way merge conflicts in a path only where main changed it since the answer's base. So the step walks main's first-parent line back from the main it merged onto, through `RepoHost` (the code reads' own tree lookups, shared as one view), and stops at the base or after `MOVER_SCAN` commits (50). For each path it takes the newest commit whose entry differs from its parent's.12+- It asks the project's record for those commits' landings (`AnswerQueue.landings`, which the Workflow reaches through the project's Durable Object), and names a path only when its commit is a landing there. A trailer in a commit never reads as one, as on the code pages.13+- The step reports the names in `MergeConflict`, and the landing lifecycle copies them onto the refusal, so the transition stays pure. A merge step recorded before this change has no `movedBy`, and still decodes.14+- The walk never fails the merge: a repo it cannot read, or anything else that goes wrong, leaves `movedBy` out and logs why.15+16+## Considered Options17+18+- **The Lander reads `Ask:` trailers and the author line from `git log` in its container.** One `git log` where the clone already is. But there are three Lander adapters to teach it, its wire would grow, and the names would rest on trailers rather than the record.19+- **The project's Durable Object walks the history in `advanceAnswer`.** It already holds the record, but the walk's reads would run under the project's one lock and stall every other call to the project.20+- **Every landing since the base that changed each path.** More complete, but the list has no bound. The newest is the version on main that the rebase meets, and `myr why` gives each line's landing.21+22+## Consequences23+24+- A conflict now costs one first-parent log read of up to 51 commits, plus each conflicting path's entry at each commit since the base. A clean merge costs nothing more.25+- Everything `movedBy` names is already public: the paths in `conflicts`, and the landings' commits, authors and asks on main. It reaches the verdict note on the answer's head, `myr status`, MCP and the web, which write it through the one renderer.26+- The decider's `land` names movers the same way, through the same step.added:.agents/adr/0030-the-landing-sits-outside-the-shell-and-the-front-page-moves-to-asks.md+29 added
1+---2+status: accepted3+---4+5+# The landing sits outside the shell, and the front page moves to `/asks`6+7+This amends ADR 0022, under which every page sat in the control room's shell. The web's `/` is now a landing: one page that says what the platform is and leads to the open asks. It is the one page drawn outside the shell. Its route names `staticData: { shell: "bare" }`, and `AppShell` then draws the page alone, with no rail, bars, overlays or skip link. `apps/web/test/landing-route.test.ts` holds that only `/` names it.8+9+The front page, every open ask across every project, moved unchanged from `/` to `/asks`, which the rail already called Asks. A signed-in reader's own page is `/home`, and the docs are `/docs`. `asks`, `home` and `docs` joined `reservedProjectNames`, so no project can be named after a page the web serves.10+11+The landing is the same page for everyone, so the edge may keep it (`branchPage`, ADR 0026). Its server GET answers in this order (`landingHandler` in `apps/web/src/server/front-page.ts`):12+13+1. A request for Markdown gets `/llms.txt`, as `/` gave before and `/asks` still gives. Agents reach the web at `/`.14+2. A request that carries the session cookie gets a 302 to `/home`, kept nowhere. Workers Cache serves the kept landing only to a request with no cookie (it varies by `Cookie`), so a signed-in reader always reaches the Worker and is sent on.15+3. Anyone else gets the landing.16+17+A signed-in reader who reaches `/` by a link, with no document load, is moved to `/home` once the browser learns who they are (`whoAtom`). The wordmark leads to `/`.18+19+## Considered Options20+21+- **Keep the front page at `/` and put the landing elsewhere** (`/about`). Nothing moves, but a first-time reader lands on a list of asks with no word on what they are, and a signed-in reader has no home to arrive at.22+- **Draw `/` differently by cookie.** One address, but a page the edge keeps would then depend on its reader, which ADR 0026 forbids. The redirect keeps the landing's markup the same for everyone.23+- **A second site for the landing and docs.** A free hand with the look, but a second deploy path and a second set of byte budgets in the last week, and the docs would lose the web's Markdown pipeline and its reads.24+25+## Consequences26+27+- Links that meant the front page (Open asks, a filtered list, a crumb) now name `/asks`; a filtered list is `/asks?kind=bug&take=open`.28+- The landing follows DESIGN.md: one paper ground, ink, hairlines, the type scale, and mono only for what a terminal prints or takes. It is the one page written to explain rather than to operate, and DESIGN.md says so.29+- A bookmark of `/?kind=bug` now opens the landing, not a filtered list.added:.agents/adr/0031-an-import-keeps-its-source-and-a-repeat-by-the-initializer-converges.md+21 added
1+---2+status: accepted3+---4+5+# An import keeps its source, and a repeat by the initializer converges6+7+An imported project (ADR 0010) is a copy of a public repo, read-only here and not run by its maintainers, and its own page said nothing of where it came from: the import's URL and branch arrived in `initProject` and were dropped once the tip was adopted. The project's row now keeps them as `importedFrom`, the shape `initProject` takes (`ImportSource`), and `projectPolicy` names them beside the policy, so the project's page, the CLI's `policy` and MCP show "Imported from" from one read. A project that started empty has no such field.8+9+The thirty-eight imports already on a stage were made before the field existed, and the platform has no operator-only write to a project. Rather than add one, `initProject` converges: asked again by the project's initializer with an `import`, for a row whose adoption landed in the call that made it (its adoption landing's `landedAt` is the row's `createdAt`, where a first push lands later), it writes the source if the row keeps none, or answers as the first call did if the row keeps the same one. Any other repeat, by someone else, with another source, or for a project that started empty, is `ProjectExists` as before. `import-examples --sources` runs that call once per import the ledger records on the stage, listed by the platform or not.10+11+## Considered Options12+13+- **An operator-only `setSource` contract.** A second write path to a project's record, with its own audience and surface, for a one-time backfill of forty rows. Converging the write that exists keeps principle 8 (re-running an operation converges) and adds nothing to the public contract.14+- **Look the name up in the docs' imported list on the web.** No backend change, but it covers only the curated imports, not a project someone imports with `init --import`, and the page would state a source the platform never recorded.15+- **Keep the source on `ProjectListing`.** The listing is the front-page projection's, built from events; a project's own record is the right home, and the listing has no row for an import adopted before adoptions were heard.16+17+## Consequences18+19+- `ProjectRow` gains an optional field, decoded on read; a row without it still decodes, so no migration.20+- `import-examples` treats a project the ledger records as this stage's import as known, whether or not the platform lists it, so the seventeen unlisted imports are never taken for new ones.21+- A first push that lands in the same instant as its project's creation would read as an import's row; two separate calls never share an instant on a real clock, and tests move the clock between them.added:.agents/adr/0032-a-project-is-named-by-its-owner-and-the-forty-keep-their-keys.md+28 added
1+---2+status: accepted3+---4+5+# A project is named by its owner, and the forty keep their keys6+7+A project's name was one lowercase word, `datekit`, and that word was its address on the web (`/datekit`), at the gateway (`datekit.git`), in every contract's `project` field, and inside the platform: the Durable Object's id, the Artifacts repo's name, the code cache's key and every projection row. One flat namespace cannot hold two people's `notes`, says nothing about who a project belongs to, and gives an imported repo an address that hides where it came from.8+9+A project's name is now `<owner>/<name>`. An **owner** is a person's handle, lowercased (`oscabriel/datekit`), or a **source namespace**, the host and account a repo was imported from, from a fixed list of hosts (`github.com/pallets/click`, `codeberg.org/dnkl/fuzzel`). A name is a person or a source namespace, never both: handles hold no dot and hosts always do. Organisations will be a second kind of owner in the same place. The web serves a project at `/<owner>/<name>`, the gateway at `<platform>/<owner>/<name>.git` (a claim fork at `…/<name>--<ask>--<handle>.git`), the CLI's `--project` takes the full name, and every contract's `project` field carries it. `ProjectName` keeps its identifier and means the full name; `Owner` and `ShortName` are its parts; one parser in `packages/protocol/src/ids.ts` reads it and lowercases on the way in, and `packages/protocol/test/project-name.test.ts` holds it.10+11+Inside the platform a project keeps a flat **key**: the Durable Object's id, the repo's name, the code cache's key and the projection columns. The key is a pure function of the name: the name with each `/` replaced by `__` (`oscabriel__foo`, `github.com__pallets__click`). A segment never holds two separators in a row, so `__` occurs in no name, even one whose segments hold `_` (`alice/the_thing`), and the key reverses. The forty projects made before this decision keep the keys they have (`datekit`, `click`): `packages/protocol/src/legacy.ts` lists each with its name, `keyOf` and `nameOfKey` consult it first, and `ProjectName`'s decode accepts a bare legacy key and gives its name. So a stored event, a projection row, a Durable Object's own id, an old clone's remote, `--project datekit` and MCP's `project: "datekit"` all read as `oscabriel/datekit`, and nothing stored is migrated. The web answers `/<legacy>` and every address under it with a 301 to the full name; the gateway serves `<legacy>.git` and its forks as aliases, with no redirect, since git follows one only on its first request. The table is a cartridge: re-key the forty and delete it.12+13+Owning a namespace gives one right: to make projects in it. `initProject` refuses `NotYourNamespace` when the name's owner is neither the caller's handle nor the source namespace of the import's URL. Nothing else moves: deciders stay per path from the config folder, an import's importer stays its fallback decider, and `setEnv`, policy edits and custody are as they were. A namespace is not a policy right.14+15+## Considered Options16+17+- **Rename the Durable Objects and repos to the new keys.** A clean store, but a Durable Object cannot be renamed and an Artifacts repo cannot be moved: each of the forty would be copied, with its events and its storage, on two stages, days before the demo is recorded. The alias costs a table of forty lines.18+- **A registry table (D1, or one Durable Object per owner) mapping each name to a key.** It would also serve uniqueness and a person's project list, but it is a second source of truth, consulted on every call, for a mapping that is pure for every project but forty. Uniqueness is the key's: two names never share one.19+- **Keep flat names and add the owner as a field.** No address changes, but `/notes` still belongs to whoever took it first, and the user asked for `/owner/repo`.20+- **Every import under the importer's handle** (Gitea's model). Honest about who brought it, but the address then hides the source, two people's imports of one repo get two addresses, and the host-path address (ADR 0033) would need a lookup by source. The source namespace is the address and the provenance at once; a person may still import under their own handle.21+- **Give the owner policy rights** (decide everywhere, set env). Simpler to explain, but the platform's rights are per path in the config folder on `main`, where every reader can see them; a namespace right would be a second, invisible kind.22+23+## Consequences24+25+- `ProjectName`'s grammar widens; the short name allows `.` and `_` with single separators (`commander.js`), so an import keeps its own name. The first segment may not be a word the web serves its own pages at, and sign-up refuses those words as handles.26+- `repoKind`, fork names, layer repos and the well-known skill's URL carry the key, so the forty's URLs there are unchanged.27+- A projection row whose key decodes to no name (a torn-down throwaway) is skipped by the lists.28+- The demo's recorded addresses and commands stay true through the alias.added:.agents/adr/0033-a-repo-is-imported-from-the-web-and-its-host-path-offers-the-import.md+25 added
1+---2+status: accepted3+---4+5+# A repo is imported from the web, and its host path offers the import6+7+An import (ADR 0010, ADR 0031) could be made only from the CLI, `init --project <p> --import <url>`, by someone signed in there. The platform's point is that any public repo can be brought over and worked on through the gate, and that path asked a newcomer to install a CLI first.8+9+`/import` is a page for a signed-in reader. It takes a public HTTPS clone URL, an optional branch, the owner (a choice among the namespaces the reader may write to: their own handle, and the URL's source namespace when its host is on the list, which is then the default) and the name, prefilled from the URL's last segment. It calls the one existing contract, `initProject` with `import`, which gains the web as a surface; the platform clones any public git URL through Artifacts, so no host's API is called. A refused import reads as its refusal, with its next step.10+11+A **host path**, `/<host>/<account>/<repo>` on the web (a trailing `.git` is stripped), is a project's address when one exists at that name (ADR 0032). When none does, the page offers the import: the same form, prefilled with the URL rebuilt from the address and the owner fixed to the source namespace; signed out, it shows the sign-in link. It never imports on a GET: a crawler following `/github.com/x/y` makes nothing. A project someone imported under their own handle is not found from its host path: there is no index by source, and the address at the source namespace stays free for a copy at its source path.12+13+## Considered Options14+15+- **Import on arrival at the host path.** The address the user asked for, `myr.technology/github.com/<owner>/<repo>`, would then "just work", but any link, prefetch or crawler would create projects, and a project needs a person who answers for it. The offer keeps the person's press.16+- **Connect GitHub and pick from a list** (the bulk import GitHub and GitLab offer). It needs OAuth scopes and a host's API per host; the clone URL covers every host at once, codeberg's included. Out until someone asks for it.17+- **A mirror that keeps following the source.** Declined again (ADR 0010): inbound sync is a second way onto `main` that skips the gate.18+- **Find a project by `importedFrom` from its host path.** It would show a handle-owned copy at `/github.com/x/y`, but then two readers would reach different projects through one address depending on who imported first, and the index is a projection the platform does not keep.19+20+## Consequences21+22+- `servedOn.initProject` includes the web; the contract's payload is unchanged.23+- A new refusal, `NotYourNamespace` (ADR 0032), can come back to the page.24+- An import still brings no tags (ADR 0019); the operator's backfill stands.25+- The import page is its own chunk, so the root's preloads do not grow.added:.agents/adr/0034-a-decision-for-a-path-takes-effect-at-its-deciders-threshold.md+22 added
1+---2+status: accepted3+---4+5+# A decision for a path takes effect at its deciders' threshold6+7+A project's deciders are a list of handles per path in the config folder (`Policy.deciders`, `{handles, paths}`), and a decision takes effect on one decider's choice. One peer platform read in October 2026 keeps who may move a ref as a typed value in the repository itself: a list of keys and a count, per ref, evaluated when the ref is updated, and its web states the rule as one sentence ("1 out of 3 have to accept"). Another answers "may this key push here" per push from the host that keeps the repo. Both put the rule where the clone can read it and derive the sentence from the value. Myr already does the first half: the rule is typed code on main. What it lacks is the count.8+9+The decision: a deciders entry takes an optional `threshold`, default 1. A decision whose paths fall under an entry with a threshold of n takes effect only once n distinct deciders have chosen the same choice; each of them is credited `Decided-by`. Until then the decision is waiting, never refused, and the status line says so: "Waiting on decision dec-000001 · 1 of 2 deciders have accepted · a decider's move". If it expires first, its default takes effect as it does today, so "doing nothing lets nothing in" still holds. The count is evaluated in the decision lifecycle's `transition(state, command, now)` and nowhere else; the Policy page reads "2 of 3 deciders for `src/**`" and Today's row shows "1 of 2" under the default. This is the smallest version: no weighting, no per-kind thresholds, no delegate groups.10+11+## Considered Options12+13+- **A threshold on the project, not the path.** One number is easier to explain, but the rules are already per path, and a project that wants two deciders on `src/**` and one on `docs/**` would have to choose.14+- **Evaluate the count at the gate's decider stage instead of in the lifecycle.** The gate would then hold decision state, which Principle 12 keeps in lifecycles; the stage reads the decision's outcome as it does now.15+- **A bot as a decider, to make a count up.** An agent holds no account and no credit (ADR 0016); a threshold counts people.16+17+## Consequences18+19+- `Policy.deciders` gains an optional `Schema.Int` field in `packages/protocol`, so the CLI, MCP and the web derive it; a missing field is 1 and no stored policy changes meaning.20+- The decision lifecycle's model tests (`packages/project/test/*.model.test.ts`) gain histories where n deciders choose in any order, choose differently, or run out of time, and the planted bug is a decision that takes effect at n minus one.21+- The web's status line, Policy page and Today row take the count from the typed value; a count of deciders is a rule, never a score, so the No Score Rule is not touched.22+- Not built in the competition window. No new refusal tag and no new dependency.added:.agents/adr/0035-a-repos-host-is-a-port-behind-the-gateways-custody.md+20 added
1+---2+status: accepted3+---4+5+# A repo's host is a port behind the gateway's custody6+7+One peer platform read in October 2026 splits hosting from viewing: a repository lives on a host chosen when it is made, a web view reads the whole network, and a second, read-only view of the same records exists, which proves the view is replaceable. Myr already has that shape without having said so: every repo is reached through `RepoHost`, one port with one contract every adapter passes (`packages/artifacts/test/repo-host-contract.ts`, Principle 6), and the gateway (ADR 0004) holds every credential, enforces custody and visibility, and refuses in git's own output.8+9+The decision: the gateway's custody is all a host must honour. A host is whatever passes the `RepoHost` contract and takes its writes only from the gateway and the platform's own landings (ADR 0014); it holds no rule, no credential of its own that a client can reach, and no second way onto `main`. Adding a host (a second storage product, a self-hosted git server, a machine of the project's own) is one adapter in the owning package, not a rewrite of the platform, and the web, the CLI and MCP keep reading through the same contracts whichever host answers. Nothing is built for this now; the ADR exists so that nobody designs a second host as a second gateway.10+11+## Considered Options12+13+- **A host per project, chosen at creation, as the peer does.** The seam is the same; the choice is deferred until a second adapter exists, since a choice among one is noise in the init form.14+- **Let a host enforce its own rules** (membership on the host, as the peer's host does). It would be a second rule engine beside the typed config folder on main, with the rules in a place a clone cannot read.15+16+## Consequences17+18+- A second host adapter must pass `repo-host-contract.ts` unchanged and must refuse any write that does not come through the gateway; a test for the second point joins the contract when the first such adapter lands.19+- The visibility boundary stays the repo boundary (ADR 0007): a layer is a repo on a host, and a host sees nothing of what a layer means.20+- Not built in the competition window; no dependency is added.added:.agents/adr/0036-a-vouch-carries-its-reason-and-the-landing-it-followed.md+22 added
1+---2+status: accepted3+---4+5+# A vouch carries its reason and the landing it followed6+7+A vouch is a line in the project's vouch file on main: a handle, and whether the line denounces. One peer platform read in October 2026 makes a vouch a public, revocable record with an optional reason and a pointer to the work it was made after, offered to a maintainer right after a contribution lands, and with no number attached: it changes what a person may do, not how they rank. That is the vouch Myr's glossary describes, with two fields missing.8+9+The decision: a vouch line takes an optional `reason` and an optional `for`, the SHA of the landing it followed. The Policy page shows each as the line it is ("vouched by ines-v, for 9b1c3e5 (format-ordinal)"), with the landing linked, and never a count. After that, Today's "Newcomers to welcome" gains a one-tap Vouch whose consequence reads "adds a line to the vouch file and lands it with you as Decided-by": it is a decider's choice, so it is one of the web's permitted writes, and the line lands through the gate from the decider's working fork like any other change to the config folder. A denouncement stays what it is (it bars proposals) and is shown as its line, never as a warning label beside a name. There is no decay: the record window (30 days) already expires what trust reads.10+11+## Considered Options12+13+- **A vouch as a trailer on the landing** (`Vouched-by`). It would ride with the clone, but a vouch is about a person, not a tree, and it must be revocable; a line on main can be removed by a landing, a trailer cannot.14+- **A count of vouches shown beside a handle.** "Vouched for by 3 people" is a score; PRODUCT's "No scores" and DESIGN's No Score Rule forbid it.15+- **Vouches visible only to the signed-in.** The vouch file is public code on main; hiding its reading would make the web say less than the clone.16+17+## Consequences18+19+- The config schema in `packages/protocol` (the vouch line's parse) gains two optional fields; an old file reads as before.20+- The Policy page's vouch rows gain a reason and a linked landing when present; `apps/web/test` holds that no count of vouches is drawn.21+- The Today choice is a new contract (a decider's decision whose effect is a landing of the vouch file), in a later ADR of its own if it needs one; the line format needs none.22+- Not built in the competition window; no dependency is added.added:.agents/adr/0037-the-platform-signs-every-landing.md+22 added
1+---2+status: accepted3+---4+5+# The platform signs every landing6+7+A landing is the platform's commit (ADR 0014), and "main moves only by a landing" is the product's first promise, but a clone cannot check it: the commits on `main` look like anyone's. One peer platform read in October 2026 signs the whole of a node's references each time they change, so anyone with a clone can verify every later update of the repository without the host. Myr needs less than that: one key, one kind of commit.8+9+The decision: the platform signs each landing commit with one key held in the decoded env (`LANDING_SIGNING_KEY`, decoded once in the platform's env Layer, Principle 2), and publishes the public key at `/.well-known/` on the platform. `git log --show-signature` in a clone then proves offline that every commit on `main` is the platform's, and a commit on `main` without that signature is, by that fact, one the gate never saw. The web's Provenance block gains one entry, "Signature", naming the key. Nothing a contributor pushes is signed by the platform, and the platform never signs a fork's commits.10+11+## Considered Options12+13+- **Sign every ref, as the peer does.** It needs a signing identity per node and a protocol between nodes; Myr has one writer of `main` and one claim per fork.14+- **Ask contributors to sign their commits.** It would add a key to every first claim, and it proves authorship, not that the gate ran. Author signatures can be kept when present, apart from this.15+- **Keep the proof on the platform** (a verdict note per landing, which exists). It is a fetch away and the platform must be reachable to serve it; a signature is in the commit and needs nobody.16+17+## Consequences18+19+- A signing library the repo does not have (Ed25519 or OpenPGP signatures over git's commit buffer, verifiable by stock git) is a new dependency, and so needs the user's sign-off before any of this is built.20+- `LANDING_SIGNING_KEY` joins `apps/platform`'s `.env.schema` as a sensitive value the user sets; a stage with no key refuses to start, as a bad env does today.21+- A test holds that an unsigned push to `main` is still refused at the gateway (the signature proves a landing; it never admits one), and that the Lander's commit buffer verifies against the published key.22+- Not built in the competition window.added:.agents/adr/0038-the-ledger-is-a-note-on-main.md+22 added
1+---2+status: accepted3+---4+5+# The ledger is a note on main6+7+"Export is `git clone`": code, asks and credit trailers leave with a clone, and verdict notes take one more fetch of `refs/notes/*` (ADR 0010). What a clone does not carry is the ledger (the project's layers, counts, commitments, releases and posture changes) and its decisions; both live in the platform's record alone. One peer platform read in October 2026 keeps every social object as commits in the repository under refs of its own, so a clone carries the code, the discussion and the rule set at once. Myr's rule set is already on main; the ledger is the gap.8+9+The decision: the platform writes the ledger as a note on each landing that changes it, under `refs/notes/ledger`, append-only, in the same typed form the Ledger page and `projectPolicy` read. The fetch that brings the verdict notes brings the ledger too, so PRODUCT's sentence covers it with no new step. Only the platform writes these refs: a fork takes branches only (Principle 7, `apps/platform/test/gateway.test.ts`), so a contributor can neither forge nor erase an entry. Decisions follow the same path later, in a note of their own, once their lifecycle's record is settled enough to be a public shape.10+11+## Considered Options12+13+- **Commits under a ref of their own** (`refs/ledger`), as the peer's objects are. A commit DAG allows concurrent writers to merge, which the ledger has not got: one platform writes it in order. Notes are what git already fetches with the verdicts.14+- **A file in the config folder on main.** It would make every ledger change a landing on `main`, which moves the project's history for a bookkeeping entry, and an answer could then touch it.15+- **Leave the ledger on the platform** and say so. This is where the docs stand in the window: PRODUCT names the ledger as the one record not yet in the clone.16+17+## Consequences18+19+- The Lander's bookkeeping push (ADR 0014) gains one more note, each on its own, after `main` has moved.20+- The Ledger page names the ref the note is fetched from, as the verdict notes are named.21+- `packages/project` gains a writer of the note and a reader that decodes it with Schema (Principle 2), and a test that the note's entries equal the ledger the platform serves.22+- Not built in the competition window; no dependency is added.added:.agents/adr/0039-the-webs-rows-carry-the-state-on-the-mark-and-the-inspector-widens.md+25 added
1+---2+status: accepted3+---4+5+# The web's rows carry the state on the mark and the word in ink, and the inspector widens for its commands6+7+Two rules of DESIGN.md changed in October 2026, after a heuristic critique of the front page, a project home and an answer page (31 of 40) and a source-first reading of a peer platform's web UI, taken as values and patterns only. This records the two changes and why, so that nobody restores the old rules as a tidy-up.8+9+**The row's state word is ink.** DESIGN.md's row anatomy said "the state word in its role": Waiting in ochre, Refused in red, Landed in green, on every row. Measured on a project home, that painted ochre thirty-one times on one screen, and the one word that asks the reader for a move, "Open to take", was ink and had no weight against it. The peer's lists make the opposite mistake, a tinted square and no word, and are loud for it. The rule is now the Mark Carries Rule: in a row the colour belongs to the mark, the word is ink at 500, except Refused (red) and Landed (green), which are final and rare. The status line, the state badge and the inspector keep the coloured word, where it is said once beside its sentence. The Word First Rule is untouched: every mark still has its word.10+11+**The inspector is 20 rem from `shell` and 22 rem from `codefacts`.** At 19 rem with 16 px of padding, a 6ch hang and a 32 px Copy, the inspector's command line held about 27 characters, so `myr claim <ask> --project <project>` and `git clone` of a project wrapped to three or four lines. The inspector exists to hand a command over; it was the hardest thing on the page to read. The peer opens its side column at 20 rem and only from 1350 px, and truncates its commands; Myr shows a command whole, so it makes room instead: 20 rem, 22 rem from 1440 px, and the command line in a bleed form inside the inspector (pane-wide, hairlines top and bottom, a 28 px icon-only Copy, a 2ch hang), which gives about 32 and 36 characters a line. Main keeps a 556 px row at 1164 px and an 800 px one at 1440 px.12+13+Beside them DESIGN.md took, within its rules, a pressed-surface token for a selected row under the pointer, the time slot filled on every row, a two-line want below `tablet`, `files · +n −m` on a subject's meta line, Provenance in the one block shape, the path split in the code header and tree, the `kbd` look in the keys dialog, the Landed page told as a sentence before its hashes, and posture said once per page. None adds a colour to a non-state thing, a score, a fill, a shadow, a radius above 2 px or text under 13 px.14+15+## Considered Options16+17+- **Keep the coloured word and thin the lists.** Fewer rows per screen would not change what a page of waiting asks looks like; the stripe is the rule, not the count.18+- **Collapse the inspector on laptops** and let main have the width. The facts and the command are what the page is for; hiding them to fit them is backwards.19+- **Truncate commands in the inspector**, as the peer does. A command copied whole but read in part is the one thing the control room must not do.20+21+## Consequences22+23+- The rules are decided in DESIGN.md and not yet in the code; its "Decided, not yet drawn" list names each file, and the build issues are cut from it. The tokens (`--surface-2`, and its contrast pairs in `apps/web/test/tokens.test.ts`) are in `styles.css` now.24+- Tests that key on a row's state word by colour class must key on `data-mark` and the word instead, as DESIGN.md's "Do" already asks.25+- The critique's remaining findings (heading order in the inspector, the intro paragraphs past 70ch, the toolbar's inset) are polish, not rules, and are not recorded here.added:.agents/adr/0040-a-discussion-is-freeform-and-a-decider-turns-it-into-an-ask.md+36 added
1+---2+status: accepted3+---4+5+# A discussion is freeform, and a decider turns it into an ask6+7+A proposal works for someone who already knows the change they want. Most wants start vaguer than that: a bug half-understood, an idea that needs a maintainer's context, two people who disagree about the right shape. Today that talk has to happen somewhere else, or as proposals that get declined and proposed again. PRODUCT declined discussion threads for the competition window, "not now, not never".8+9+The decision: a project has discussions. A discussion is a public, freeform thread: a title, then posts in Markdown, each by a handle, in order. Anyone signed in and not denounced may open one or post in one. A discussion carries no type, kind, label, vote or reaction, and it lands nothing. The typed part starts when a decider turns a discussion into an ask. One call makes a proposal from the discussion and starts its first draft round (ADR 0018), with the discussion's posts as the want the agent drafts from. From there nothing changes: the decider can draft again with a note, the draft runs red first, and the decider accepts or declines it in Today. Accepting it runs the unchanged `accept`, so the ask opens through the gate like any other.10+11+The details:12+13+- **Credit.** The proposal's proposer is the person who opened the discussion, credited as `Asked-by` when the ask opens. When turning a discussion into an ask, the decider may name participants whose posts shaped it, and they are credited as `Advised-by` on the same landing. The trailer exists already.14+- **Vouches.** A credited landing counts as the landing a newcomer is welcomed after (ADR 0036). Someone who is not vouched for and is credited on an opening, as `Asked-by` or `Advised-by`, appears in Today's "Newcomers to welcome" with that landing as the vouch line's `for`, as an answerer does. The vouch is still the decider's choice, and its default is no vouch. A project's trust rules may ask for more of the Record before Today offers it.15+- **The drafter reads the thread as quoted text.** Anyone can post, so anyone can try to steer the agent. The context step puts the discussion's posts in the prompt as quoted content, marked as the words of the named handles and not as instructions, and leaves hidden posts out. Within its byte budget it keeps the opening post and the latest posts. The decider's note, when there is one, is the only instruction beside the platform's own. A draft still lands nothing without a decider, and its check still runs red first on the Checker.16+- **Moderation.** A denouncement bars posting as well as proposing. A decider of the project may hide a post with a reason: its text leaves every page and the drafter's context, and the thread shows the line in its place ("hidden by kai: off-topic"). A decider may close a discussion with a note, and a discussion turned into an ask closes with a link to its proposal. A discussion with no post for 60 days closes itself. A decider may reopen any closed discussion.17+- **Rounds stay silent.** A discussion is about a want, before or around an ask. It never attaches to a round or an answer, where the gate's verdict is the only voice.18+- **The record.** The Project Durable Object keeps each discussion, as it keeps proposals. When a discussion closes, the platform writes it to `refs/discussions/<id>` as one commit that holds its posts, so a clone that fetches the ref carries the talk with the code. Only the platform writes these refs, since a fork takes branches only (Principle 7). Hiding a post in a closed discussion rewrites its ref without the post's text. A clone that fetched the ref before keeps the text, and the Discussion page says so.19+- **Visibility.** Every discussion is public. A project's layers never reach one: a discussion reads no layer, and the drafter's context step reads none either (ADR 0018).20+21+## Considered Options22+23+- **Typed shaping.** Versioned amendments to a draft, each run red first, with named stances (satisfied, blocking with a reason) put to the decider as evidence, and a decision default that flips to accept once no stance blocks. It would show progress toward consensus as data. It also asks everyone in the talk to work in the gate's terms before anyone knows what the ask is, and stances drift toward a vote count. The decider's draft rounds already climb toward the right check; the talk before them does not need to.24+- **No discussion at all**, as PRODUCT said for the window. Talk then happens on another site, where none of it reaches the drafter, the credit or a vouch.25+- **Threads on asks and answers**, as forges do on issues and pull requests. A thread on a round invites review by comment, which a finish replaces, and a thread on an ask duplicates `ask flag`. A discussion may link an ask; it does not hang off one.26+- **Each post as a commit under the discussion's ref, pushed as it is written.** A clone would carry the live talk, but every post would be a push to Artifacts and an event `OnPush` must recognize and ignore (ADR 0014). Writing the ref once, at close, keeps pushes per discussion to one.27+- **Votes or reactions on posts or discussions.** A count beside a want is a score by another name, which PRODUCT declines.28+29+## Consequences30+31+- `packages/protocol` gains contracts to open, read, list, post in, hide a post in, close and reopen a discussion, and one for a decider to turn a discussion into a proposal with its first draft round and the handles to credit. The web, the CLI and MCP serve them, so posting becomes one of the web's permitted writes.32+- The `Proposal` schema gains the discussion it came from and the handles to credit as `Advised-by`. The Lander writes both trailers on the opening.33+- The drafter's context step gains the discussion's posts as quoted, attributed text, with a test that a hidden post never reaches the prompt and that a post's text is never placed as an instruction.34+- The vouch file's denouncement reads as barring posts too, with no change to its line.35+- PRODUCT's "no discussion threads" becomes "no discussion on rounds".36+- Not built in the competition window; no dependency is added.added:.agents/demo/README.md+16 added
1+# The demo2+3+How the submission video is made. On recording day, open these in this order:4+5+1. [`rehearsal.md`](rehearsal.md): the pre-flight list, then one checkbox per shot, marked pass or fail when the shots were walked on the live stages.6+2. [`shot-list.md`](shot-list.md): every shot, with its screen, the exact command or URL on the `demo` stage, what must already be true, a fallback, and the order to record in.7+3. [`script.md`](script.md): the narration, timed to the video's seven beats (6:30), with the captions.8+4. [`swarm-scenario.md`](swarm-scenario.md): the six fictional contributors of beats 3 and 4, what the video stages and why, how to run them, and what to do when an agent stalls.9+10+Three rules hold for every take:11+12+- **No deploys during takes.** A deploy restarts the platform mid-take. `rehearsal.md` opens with it.13+- **What is staged is labelled as staged**, in the script and in a caption: the README line in the zero-install beat, two of the six agents' nudges, and one answer written to fail a sealed check. Nothing else is planted, and every outcome is read from the platform.14+- **The people and the two projects on screen are fictional.** datekit and burrow, and everyone in them, are examples made up to show the platform; no real person is staged. The open-source repos the code browser is previewed on are imported beside them, read-only, each shown with the source it was imported from, and nothing in the video acts on one.15+16+Every command in these files is checked against what exists: a test reads each shell block, the shot list and every CLI command named in prose or a table, and fails on a root script, a file, a CLI command or a flag that isn't there. It also holds each shot to its beat in the script, and the rehearsal to one checkbox per shot.added:.agents/demo/rehearsal.md+141 added
1+# Rehearsal2+3+**No deploys during takes.** Nothing deploys between the first take and the last: a deploy restarts the platform's Durable Objects mid-take. Turn on the deploy recording lock before the first take and off after the last; while it is on, `infra/deploy.ts` refuses every deploy with `RecordingInProgress`. No flag or environment variable lifts it: only `bun infra/recording.ts off`, run by a person once the last take is done.4+5+This checklist is walked once on the live stages before the recording: the read-only shots on `demo`, the shots that consume asks on `dev-oscabriel` (on a fresh copy of each example, so demo's asks stay open for the take), with the same commands [`shot-list.md`](shot-list.md) gives. Mark each line as it is walked:6+7+- a pass: `- [x] S07 … PASS 2026-10-13 demo, 0:41`;8+- a failure, with the fallback used: `- [x] S07 … FAILED: <what broke> fallback: <what the video uses>`.9+10+Every box is ticked when the walk is done, passed or failed. A pre-flight line that sets up the recorder's desk, not a stage, says `NOT WALKED`: only the person recording can do it.11+12+**Walked on 2026-10-08, 17:08 to 17:39 UTC**, from `main` at `1e46e9a`, with nothing deployed; the deploy lock was on only for its own check. The read-only shots ran on `demo`, which was left as the seed made it: every ask open and unclaimed, and smoke passing at the end. The shots that consume asks ran on `dev-oscabriel`, on `datekit-805` and `burrow-805`, two `seed --as` copies, and every throwaway they made is in the ledger. On the morning of the take, untick the pre-flight and walk it again.13+14+**Walked again on 2026-10-11, 03:20 UTC**, on `demo` after the W13 close-out deploy (`873046e`, the Workers from `f224a14`) and the 38 imports onto demo (issue 1332): the same eight read-only shots, anonymous, headless Chromium at 1280 px, read the same as on 2026-10-10 below, with one difference on every page: the rail's Projects list names the first eight projects by name (anyhow to click), with "All projects 40" under them, and datekit is not among the eight. `/asks` still leads with burrow's family, so S01's `j` note stands. The deployed-web checks pass 16 of 16 on datekit and 12 of 12 on burrow, and the imports' 224 of 224. demo was only read.15+16+**Walked again on 2026-10-10, 22:30 to 22:55 UTC**, on `demo` as the W13 build deployed it (`main` at `41f84ca`; the Workers from `643ab22`), with nothing deployed and the lock off. Only the read-only shots were walked, anonymous, in headless Chromium at 1280 px, with smoke 11 of 11 at the end; demo was left as the seed made it. The shots that consume asks (S03 to S06, S10 to S13, S17, S18, S21, S23) were not walked again: their 2026-10-08 lines stand, and each page's "Now:" line says what the new build shows, checked in the dev world. S15 needs bram's and ines-v's profiles, which this walk did not have: an anonymous clone of the layer asks for a username. Each shot walked carries a "Walked 2026-10-10 demo:" line. The words a shot checks that changed in the new build: a project's posture is said once per project group heading, never per row; the project's People tab reads Policy, and the header's Agents reads For agents; Today's budget is one sentence; a delete child reads "Waiting for N of 6 children to land", then "Open to take".17+18+## Shots19+20+- [x] S01 The front door broke · web · the front page on a fresh seed · PASS 2026-10-08 demo, 0:02: "10 open asks, 8 open to take", datekit's three and burrow's six children open. The project badges say "Open", not "Open with sealed evidence" (the front page takes a posture only from a decided change, and a fresh seed's stands without one): the ledger in S19 carries the posture. Now: the context bar reads "10 open asks, 8 open to take"; the posture is said once per project group heading ("burrow · Open"), not per row; burrow's six children are one family row, "0 of 6 landed", with "Show 6 children". The front page is at `/asks` since W13; `/` is the landing. Walked 2026-10-10 demo: PASS, 0:04: the context bar reads "10 open asks, 8 open to take"; "burrow · Open" and "datekit · Open with sealed evidence" once each, as group headings; burrow's family is one row, "0 of 6 landed", with "Show 6 children"; the inspector reads "Start here" until `j`, which selects the first row, burrow's family, whose inspector says "Not open to you now: its page says why" and numbers no claim command. The numbered claim command shows once a datekit row is selected: press `j` past the family, or choose "Open to take" first.21+- [x] S02 The front door broke · web · format-ordinal's ask page · PASS 2026-10-08 demo, 0:01: open, "Held for newcomers, mentored by okonkwo", asked by ines-v. Now: "Held for newcomers, mentored by okonkwo" is the inspector's Take it line (the status line has it in lower case). Walked 2026-10-10 demo: PASS, 0:02: under the title, "Open to take · held for newcomers, mentored by okonkwo"; the inspector's Take it reads "Held for newcomers, mentored by okonkwo", then the clone, the claim and `myr check`, numbered 1 to 3.22+- [x] S03 Zero install · split · stock Claude Code takes add-months-clamp as bram · PASS 2026-10-08 dev-oscabriel (`datekit-805`), 2:25: Claude Code 2.1.294 on Haiku, S03's prompt run headless (`-p`) with the corrected flags. It claimed, fixed `src/add.ts`, met `OutOfScope` for README.md in `myr check`, untangled a `commit --amend` of its own, and pushed `8b0050e`, which landed as `e7fb8a9` 35 s later. 1:46 of agent time, 25 turns, $0.025. Three compound commands (`$(…)`, `for` loops) were still denied: run interactively, each is a permission prompt on camera.23+- [x] S04 Zero install · terminal · `OutOfScope` in the agent's own `git push` · FAILED: the agent ran `myr check` before pushing, so the refusal never reached git (as in the harness check's zero-install run the same day) fallback: S04's own, keep the `myr check` refusal (same words, same renderer) and add S05.24+- [x] S05 Zero install · terminal · the same refusal pushed by hand on parse-iso-week, then released · PASS 2026-10-08 dev-oscabriel, 0:12: on a fresh claim, `remote: OutOfScope: changes paths outside the ask's territory: README.md`, then `next: myr check` and `retryable: no`, and `! [remote rejected] HEAD -> main (OutOfScope)`. `myr release` prints `{"released": true}` as a JSON block.25+- [x] S06 Zero install · split · the landing's trailers and its answer page · PASS 2026-10-08 dev-oscabriel, 0:02: `Asked-by: ines-v`, `Signed-off-by: bram`, `Assisted-by: claude-code_2-1-294_agent (claimed)`, then `Ask`, `Verdict`, `Held-back` and `Request-Id`. The answer page reads "Landed as e7fb8a9". Now: "Landed as e7fb8a9" is the answer's outcome under its title, and the inspector repeats it.26+- [x] S07 One weed becomes a rule · web · burrow's family: six children and the delete child · PASS 2026-10-08 demo, 0:05: six children open to take, and the delete child blocked until all six land. The page's one landing credits `Decided-by: oscabriel`, the operator's handle, in a video of fictional people. Now: the family is the parent's row expanded, its six children listed under the fan and a delete node reading "delete waits for 6"; no "Blocked until" sentence. The operator's own landing leaves the inspector's recent landings once three answers have landed. Walked 2026-10-10 demo: PASS, 0:03: the family's row expanded, "0 of 6 landed", the six children under the fan, each with its claim command, and the delete node "waits for 6"; the README below.27+- [x] S08 One weed becomes a rule · terminal · the ratchet in burrow's `.myr/project.ts` · PASS 2026-10-08 demo, 0:03: the `no-module-level-mutable-state` block, counted by `bun run lint --format json`. Walked 2026-10-10 demo: PASS, 0:03: the same block, `no-module-level-mutable-state` counted by `bun run lint --format json`.28+- [x] S09 One weed becomes a rule · terminal · the swarm's dry-run plan, both nudges printed · PASS 2026-10-08 demo, 0:01: six rows on four harnesses, both held asks, both nudges in full; nothing claimed. Walked 2026-10-10 demo: PASS, 0:02: six rows on four harnesses (wren claude-code, tamsin opencode, ivo amp, marisol, dagny and pell pi), "held: drop-legacy-fetch, drop-legacy-fetch-delete", both nudges in full; nothing claimed, no harness started.29+- [x] S10 One weed becomes a rule · split · `Weakened` in the nudged agent's pane · PASS 2026-10-08 dev-oscabriel (`burrow-805`), 0:04, pushed by hand as marisol: `remote: Weakened: adds oxlint-disable without a reason`, `at: packages/catalog/src/client.ts:40`. No nudged agent has added a comment yet: none in the swarm's two live runs the same day, none in this walk's herdr run (S12). For the take, expect S10's fallback (cut it and its line).30+- [x] S11 One weed becomes a rule · web · the reasoned escape waiting on a decision · PASS 2026-10-08 dev-oscabriel (`burrow-805`), 0:52, pushed by hand as dagny: every lane passed, then the answer page read "Waiting on decision dec-000001" 36 s after the push. As with S10, a nudged agent may never add the comment: then S11's fallback.31+- [x] S12 Six harnesses at once · terminal · the take: six herdr panes and the counter · PASS 2026-10-08 dev-oscabriel, 2:24 for two (7:41 for six, headless, in the swarm's second live run the same day, 6 of 6 landed): `--view herdr --only tamsin,ivo` on `burrow-805`, in a herdr session of its own. Two panes and the counter strip; OpenCode and Amp each took the brief interactively, the first live prompts in herdr panes for either, and both landed on their first attempt (ivo `4ea45cb` after 1:24, tamsin `4f7430c` after 2:24). Amp's pane showed $2.29. tamsin's landing has no `Assisted-by` (OpenCode's landings carry none yet).32+- [x] S13 Six harnesses at once · web · burrow's page updating live · PASS 2026-10-08 dev-oscabriel: with the page open and never reloaded, each landing showed within 13 s, billing's and then auth's. Now: a landing settles its child's node in the fan once, and "n of 6 landed" moves; a reload shows no stamp.33+- [x] S14 Six harnesses at once · web · the delete child open · PASS 2026-10-08 dev-oscabriel (`burrow-swarm-2`, where the swarm's second live run landed all six), 0:05: State "Open". The page still says "Waits on … to land first; a claim waits until they do" once all six have landed. Demo's, before the take, reads "Blocked". Now: no "Waits on" anywhere: while siblings are open the delete child reads "Waiting for N of 6 children to land · the family's move", and once all six landed "Open to take". Walked 2026-10-10 demo, before the take: the status line and the inspector read "Waiting for 6 of 6 children to land · the family's move".34+- [x] S15 The top half is open · split · bram's 403 and ines-v's clone of the layer · PASS 2026-10-08 demo, 0:04: bram got `remote: bram may not read datekit--maintainers` and a 403 in 0.3 s; ines-v's clone holds `checks/held-back/export/` (7) and `parser/` (4).35+- [x] S16 The top half is open · terminal · datekit's `.myr/visibility.ts` · PASS 2026-10-08 demo, 0:03. Walked 2026-10-10 demo: PASS, 0:02.36+- [x] S17 The top half is open · terminal · bram's staged answer refused as `HeldBackFailed` · PASS 2026-10-08 dev-oscabriel (`datekit-805`), 0:49: status read `refused: HeldBackFailed` 28 s after the push. The note holds `HeldBackFailed` in `export`, with export 6/7 and parser 4/4. Its `suite` is one value for both areas, and the ledger published another root for each (an open finding). S17 to S19 show both on screen.37+- [x] S18 The top half is open · split · the fix lands with its `Held-back:` trailer · PASS 2026-10-08 dev-oscabriel, 1:06, with the URL corrected: it landed as `784740a` 41 s after the push, its last trailers `Held-back: export 7/7 @ sha256:…; parser 4/4 @ sha256:…`. The violet trailer is on the answer's page; the project page's landing list shows only the credit and `Assisted-by`, so the shot now opens `/datekit/answers/format-ordinal`. Now: the project page's inspector lists its last three landings as one-line credits; the trailer is still on the answer's page.38+- [x] S19 The top half is open · web · the ledger: "Open with sealed evidence" · PASS 2026-10-08 demo, 0:05: the maintainers layer, "export: 7 sealed checks by 3 people", "parser: 4 sealed checks by 3 people", both admitted. Now: the ledger's head sentence reads "Open with sealed evidence. export: 7 sealed checks by 3 people; parser: 4 sealed checks by 3 people."; the platform's whole label stays in the inspector's Posture block. Walked 2026-10-10 demo: PASS, 0:02: the head sentence reads "Open with sealed evidence. export: 7 sealed checks by 3 people; parser: 4 sealed checks by 3 people.", the maintainers layer below, each area's root and admission, and six History entries; the inspector's Posture block holds the whole label.39+- [x] S20 The top half is open · split · `.env.schema` beside the env shape page · PASS 2026-10-08 demo, 0:05: `SENTRY_AUTH_TOKEN`, sensitive, proxy `sentry.io` (only paths `/api/**`), "set by ines-v" after the pre-flight's `env set`. Now: the sensitive item is listed first, "set by ines-v" on its own line; the caption and its varlock link are kept. Walked 2026-10-10 demo: PASS, 0:02: "4 items · 1 sensitive, set by ines-v 2 d ago"; SENTRY_AUTH_TOKEN first, sensitive, "set by ines-v 2 d ago", proxy "sentry.io, only /api/**"; the varlock caption on the page. The clone's `.env.schema` shows `@sensitive` and the `@proxy` line.40+- [x] S21 The maintainer's day · web · Today as okafor · FAILED: okafor cannot sign in on the web. The web's only sign-in is the platform's handle and password, okafor has no account, and sign-up refuses a handle that `SESSION_TOKENS` holds. So no seeded person can open Today on the web, on either stage. fallback: `myr today --project burrow` as okafor, walked on `dev-oscabriel`: dec-000001, the reasoned escape, with its words, default `decline` and expiry, in 0:01. Now: Today's budget is one sentence ("Decisions: 2 taken, 3 left today. Finishes are counted apart: none taken."), decisions sit under Due today and Within your budget, and each choice has its consequence under it.41+- [x] S22 The maintainer's day · web · the front page after the swarm · PASS 2026-10-08 demo (the fresh front page) and dev-oscabriel (`burrow-swarm-2` after six landings: six answers listed, the delete child open). Now: the family is one row with its count; its delete node reads open to take once all six land. The front page is at `/asks` since W13. Walked 2026-10-10 demo (the fresh front page): as S01.42+- [x] S23 The maintainer's day · terminal · `myr why` on a migrated line · PASS 2026-10-08 dev-oscabriel (`burrow-805`), 0:05: after `git pull`, `myr why packages/auth/src/session.ts:18` named landing `4f7430c`, the ask, tamsin, okafor and the verdict. The fallback is corrected: in `~/demo/datekit` the agent's own commit sits on main, so `why` names that commit, not the landing. A fresh clone gave the landing, with its `Assisted-by` and `Held-back`.43+- [x] S24 Measured numbers · terminal · the README's Numbers table · PASS 2026-10-08 (the repo), with a command corrected: `-A 14` stopped one row short of the core loop table's "the whole loop"; `-A 15` shows the table whole. Walked 2026-10-10 (the repo): PASS: `-A 15` shows the core loop table whole, through "the whole loop".44+- [x] S25 Measured numbers · terminal · an anonymous clone: trailers, then the notes fetch · PASS 2026-10-08 dev-oscabriel (`datekit-805`, after S03), 0:03: the log shows the credit trailers, and the note comes only with the extra fetch. On demo before the take, the fetch says `couldn't find remote ref refs/notes/myr`, since nothing has landed there yet: keep S25 after S17, S18 and S03, as the recording order does. Walked 2026-10-10 demo, before the take: `git log -3` shows the three "Open ask" commits with no credit trailer yet, and the notes fetch says `couldn't find remote ref refs/notes/myr`, as expected before S17, S18 and S03.45+- [x] S26 Measured numbers · web · the closing line over datekit's page · PASS 2026-10-08 demo, 0:04. Now: datekit's page is its asks, then the README, its first sentence the lede under the title; there is no code table and no clone box. Walked 2026-10-10 demo: PASS, 0:02: datekit's three asks, then the README; "Small, dependency-free date helpers for TypeScript." is the lede under the title, and no clone box.46+47+## Pre-flight48+49+On the morning of the take, in this order.50+51+- [x] The recording lock is on, and nobody plans a deploy until the last take is done: PASS 2026-10-08: on at 17:08:11 UTC, `status` said so, a deploy to `dev-oscabriel` was refused with `RecordingInProgress` before it read its flags, then off.52+53+ ```sh54+ bun infra/recording.ts on55+ bun infra/recording.ts status56+ ```57+58+- [x] Smoke passes on demo: PASS 2026-10-08 demo, 7 of 7 at 17:08 UTC, and again at 17:39 after the walk. PASS 2026-10-10 demo, 11 of 11 at 22:35 UTC; `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` answered over their 500 ms budgets on cold isolates (890 ms, 825 ms and 1846 ms), as warnings.59+60+ ```sh61+ bun scripts/smoke.ts --stage demo62+ ```63+64+- [x] The seeded state is fresh. The seed has no check mode, so open each page and compare: PASS 2026-10-08 demo: each page and each read below, as listed. PASS 2026-10-10 demo: the four pages, as listed, every ask open and unclaimed; the terminal reads were not run again. The reads needed `MYR_URL` (now the block's first line): with neither it nor a profile, the CLI says "no platform to call".65+ - `https://web-demo.oscargabriel.workers.dev/asks`: datekit's three asks (add-months-clamp, format-ordinal held for newcomers, parse-iso-week) and burrow's six `drop-legacy-fetch-burrow-*` children, all open and unclaimed;66+ - `https://web-demo.oscargabriel.workers.dev/burrow`: `drop-legacy-fetch-delete` waiting on all six;67+ - `https://web-demo.oscargabriel.workers.dev/datekit/ledger`: "Open with sealed evidence", with export's 7 sealed checks and parser's 4;68+ - `https://web-demo.oscargabriel.workers.dev/datekit/env`: SENTRY_AUTH_TOKEN listed, `@sensitive`, with its proxy host.69+70+ The same, from a terminal, read as anyone:71+72+ ```sh73+ export MYR_URL=https://platform-demo.oscargabriel.workers.dev74+ myr projects75+ myr asks --project datekit76+ myr asks --project burrow77+ myr ledger --project datekit78+ ```79+80+- [x] The three on-screen people are logged in as CLI profiles, each token pasted off camera from the stage's `SESSION_TOKENS` and ended with Ctrl-D: PASS 2026-10-08 demo: all three, from stdin, under the walk's own scratch home. The take logs in to the default `~/.config`, the one Claude Code's Bash tool reads: it takes `XDG_*` from the login shell.81+82+ ```sh83+ myr login --url https://platform-demo.oscargabriel.workers.dev --profile bram --token-stdin84+ myr login --url https://platform-demo.oscargabriel.workers.dev --profile ines-v --token-stdin85+ myr login --url https://platform-demo.oscargabriel.workers.dev --profile okafor --token-stdin86+ ```87+88+- [x] The stage's `SESSION_TOKENS` holds a token for each of the six swarm contributors (burrow's vouched people), and the dry run plans six of them: PASS 2026-10-08 demo: `myr status` says "Signed in as" each of wren, tamsin, ivo, marisol, dagny and pell, and the dry run planned six. PASS 2026-10-10 demo: the dry run planned six (the tokens were not checked again).89+90+ ```sh91+ bun run swarm -- --stage demo --project burrow --scenario video --dry-run --allow-demo92+ ```93+94+- [x] ines-v has set SENTRY_AUTH_TOKEN's value, off camera, with a made-up value on stdin: `myr env set SENTRY_AUTH_TOKEN --project datekit --yes` as profile `ines-v`. The env page then says who set it and when. PASS 2026-10-08 demo: set at 17:11 UTC, and the env page says "set by ines-v". It stays set for the take; setting it again only moves the time.95+- [x] okafor is signed in on the web (`https://web-demo.oscargabriel.workers.dev/auth/signin`), in the browser profile used for S21. FAILED: okafor has no account, and sign-up refuses a handle `SESSION_TOKENS` holds (S21) fallback: S21 in a terminal, `myr today --project burrow` as okafor.96+- [x] The staged commits are ready, and nothing else is: PASS 2026-10-08 dev-oscabriel: made on `datekit-805` as listed; the ask's own test passed on the first commit and S17's push was refused `HeldBackFailed`. On the morning, make `~/demo/datekit-bram` from demo's datekit the same way.97+ - `~/demo/datekit-bram`: a clone of datekit's main with two commits on top, the Do token as an English ordinal (every public test passes), then the one-line change in `examples/datekit/layers/maintainers/known-bad/export.patch`;98+ - `~/demo/datekit-hand`: made during S05, with one README line committed before its push.99+- [x] The harnesses are logged in and on the versions rehearsed, and herdr opens a fresh `demo` session. Amp updates first: its interactive mode refuses new threads until it does. Claude Code's auto-updater stays off for the take (`DISABLE_AUTOUPDATER=1` in the environment the swarm starts from), since an update mid-take changes its startup questions. pi and OpenCode are both signed in to OpenCode Go, which tamsin's and all three pi contributors' models run on (`pi auth check --provider opencode-go` says `ready`, and `opencode auth list` lists OpenCode Go; see [`swarm-scenario.md`](swarm-scenario.md)). herdr's agent names must be unique in a session, so close the last swarm workspace, or start a new session, before the take:100+101+ ```sh102+ amp update103+ claude --version104+ opencode --version105+ amp --version106+ pi --version107+ herdr --version108+ herdr --session demo109+ ```110+111+ PASS 2026-10-08: `amp update` moved Amp to 0.0.1791476260; Claude Code 2.1.294, OpenCode 2.0.7, pi 1.1.0, herdr 0.9.3. `pi auth check --provider opencode-go` says `ready`, and `opencode auth list` lists OpenCode Go. The walk's herdr session was its own (`r805`, deleted afterwards), not `demo`.112+113+- [x] The CLI on `PATH` is the one the demo platform's install line serves, and Claude Code has no plugin, MCP server or skill for `~/demo/datekit`. PASS 2026-10-08: the install line installs the CLI at version `0.1.0-demo.802`, though its `--version` prints `v0.0.0` (the binaries carry no version stamp yet). S03's command now carries `--strict-mcp-config --setting-sources project,local`, which keep out this machine's MCP servers, plugins and hooks. Claude Code still lists the clone's generated contribute skill and this machine's user skills.114+- [x] Panes laid out: one terminal (or herdr's six plus the counter for S12) beside one browser window at 1280 px; one colour scheme for every take; terminal font large enough to read at 1080p. NOT WALKED: the recorder's desk.115+- [x] Notifications off: system do-not-disturb, chat apps closed, the browser's notifications blocked. NOT WALKED: the recorder's desk.116+- [x] The recording order in `shot-list.md` is printed beside the screen. NOT WALKED: the recorder's desk.117+118+## After the last take119+120+- [x] The recording lock is off, so deploys run again: PASS 2026-10-08, walked with the lock's first line: off at 17:08 UTC, and `status` said deploys run.121+122+ ```sh123+ bun infra/recording.ts off124+ ```125+126+## Beat timings127+128+Filled in by the walk: how long each beat ran, against its range in [`script.md`](script.md). If the total runs over 10:00, cut the env paragraph and S20 first.129+130+Walked on 2026-10-08. Each beat's narration is timed at 150 words a minute. "Live" is the screen's own time in the walk: commands, agents and the platform's verdicts. "Edited" is the beat as the video can show it, with the waits cut, never shorter than its narration.131+132+| Beat | Range | Walked | Notes |133+| --- | --- | --- | --- |134+| The front door broke | 0:00–0:45 | 0:45 edited; 0:02 live | Narration 112 words, 0:45. On time. |135+| Zero install | 0:45–1:30 | 0:45 edited; 2:40 live | Narration 108 words, 0:43. Live: S05 0:12, S03's agent 1:46 and its landing 0:35, S06 0:02. Cut S03 to its claim, the refusal and the push. |136+| One weed becomes a rule | 1:30–2:15 | 0:45 edited; 1:05 live | Narration 112 words, 0:45. S07 to S09 0:09, S10 0:04, S11 0:52 to the waiting verdict. S10 and S11 depend on a nudged agent; neither has happened yet in a run. |137+| Six harnesses at once | 2:15–3:45 | 1:30 edited; 7:41 live | Narration 197 words, 1:19. Six agents took 7:41 in the swarm's second live run, and two took 2:24 in herdr in this walk, so the take is shown at about five times speed, or cut. |138+| The top half is open | 3:45–5:00 | 1:15 edited; 2:17 live | Narration 179 words, 1:12. S15 0:04, S16 0:03, S17 0:49, S18 1:06, S19 and S20 0:10. The env paragraph (25 words, 0:10) and S20 are the first cut. |139+| The maintainer's day | 5:00–5:45 | 0:40 edited; 0:08 live | Narration 92 words, 0:37. S21 is its terminal fallback (0:01), S22 0:02, S23 0:05. |140+| Measured numbers | 5:45–6:30 | 1:00 edited; 0:07 live | Narration 78 words, 0:31, plus about 0:30 to read the core loop table's nine rows. That runs about 0:15 over the range. |141+| Total | 0:00–6:30 | about 6:40 edited | Under 10:00, so nothing needs cutting. If a take runs long, cut the env paragraph and S20 first. |added:.agents/demo/script.md+103 added
1+# The script2+3+The narration for the submission video: seven beats, 6:30 of the allowed 5 to 10 minutes. Each beat names the shots on screen (their ids are in [`shot-list.md`](shot-list.md)), the words to read, and the captions. Read at about 150 words a minute; each beat's narration fits its range at that pace, with room for the screen to speak.4+5+The narration is the recorder's voice. A rehearsal corrects commands and URLs in the shot list, never these words.6+7+Rules that hold in every beat:8+9+- **No rival is named**, on screen or aloud. A contrast is said by its mechanism.10+- **No host product names.** The platform's storage, sandbox and preview products are not named in the video; the README says what it runs on.11+- **"Prototype", never "a whole forge".** No claim about speed or scale beyond the measured table in the last beat.12+- **What is staged is said to be staged**, aloud or in a caption: the README line in Zero install, the two nudged agents in One weed becomes a rule and Six harnesses at once, and bram's broken quoting in The top half is open. [`swarm-scenario.md`](swarm-scenario.md) lists every nudge.13+- **Held-back checks are "checked against N sealed checks"**, never "verified" or "good".14+- **One credit on screen:** varlock's, as a caption in the env shot. Every other credit is in the README.15+- Say the name once, early: Myr, said "meer".16+17+## The front door broke (0:00–0:45)18+19+On screen: S01, then S02.20+21+> "Open source has one front door: the pull request." Then agents made writing a change nearly free, and reading one costs what it always did. So projects started closing the door.22+>23+> Myr, said "meer", is a prototype git platform that turns the door around. A project asks for what it wants: a sentence, the files it may touch, a check that fails today. Anyone answers, or their agent does; passing answers land. Unasked work has nowhere to go.24+>25+> No setting adds this: answers can't touch their judge, sealed checks say one bit per area, refusals are typed in git's output, claims hold slots, and credit, the asker's too, follows people across projects.26+27+Caption on S02: "An ask: a want, a territory, a check that fails on main."28+29+If the beat runs short, add: "Forges for agents are being built for teams shipping hundreds of changes a day. We built one for the boundary between a project and everyone else."30+31+## Zero install (0:45–1:30)32+33+On screen: S03, S04 (or S05), S06.34+35+> This is Claude Code as it ships: no plugin, no MCP server, no skill. It has a datekit clone and our CLI, and reads the repo's AGENTS.md. I ask it to land an open ask, and, staged so you see a refusal, to add a README line the ask doesn't cover.36+>37+> It claims the ask, gets a fork, and pushes. git's own output carries the refusal: OutOfScope, the path, and the next command. It puts the README back and pushes again. The platform checks the merged tree and lands it. The commit names who asked and who signed; the agent is listed apart, as a disclosure, not credit.38+39+Captions: on S03, "Stock Claude Code. No plugin, MCP server or skill."; on S04, "Staged: the prompt asks for a README line outside the ask's territory." If S05 replaces S04: "The same refusal, pushed by hand."40+41+## One weed becomes a rule (1:30–2:15)42+43+On screen: S07, S08, S09, then S10 and S11 (cut in from the S12 take).44+45+> burrow is a fictional shop's six services, on one HTTP kit. Its maintainers fence their own agents: lint presets, a git hook, and a rule against state at the top of a module. Six places break it, so the rule landed as a ratchet: six, and the count may only fall.46+>47+> One old helper, legacyFetch, is on its way out. One migrate ask splits that job like the code: a child per package, and a delete child that waits for all six.48+>49+> That fence now runs at the door, from the last landing, for strangers' agents. A disable comment with no reason is refused; one with a reason waits for a person.50+51+Captions: on S09, "The plan prints every nudge. Two agents were told about disable comments: what follows is staged."; on S10, "Weakened"; on S11, "Waiting on a decision".52+53+## Six harnesses at once (2:15–3:45)54+55+On screen: S12, with S13 beside it, then S14.56+57+> Six fictional contributors, each answering one child with an agent of their own. Four harnesses, six models: Claude Code as it ships, OpenCode on a GPT model, Amp, and pi on three model families, one of them with our pi adapter. Each agent works in its own fork, with plain git and its person's token. No agent holds an account: the person's claim carries identity and credit.58+>59+> Refusals bounce on screen, and every one is typed: a tag, a reason, a place, and the command to run next. The run hands each one back to the same session, at most three times. Weakened is the agent that was told a disable comment was fine. The one told to give a reason is waiting on a decider.60+>61+> When main moves under an answer, the platform merges again and checks again before anything lands. An answer that no longer fits gets StaleBase back, never a silent retry.62+>63+> Children land one at a time, each a commit with its person's name on it. The counter counts claims, pushes and landings from the project's live stream. When the sixth child lands, nothing calls legacyFetch any more, and the delete child opens.64+65+Captions: on S12, "4 harnesses, 6 models"; on the Weakened pane, "Staged: told a disable comment is acceptable"; on the waiting pane, "Staged: told to give a reason".66+67+Read the StaleBase paragraph only if the take shows one; the children touch disjoint packages, so a merge again usually succeeds.68+69+## The top half is open (3:45–5:00)70+71+On screen: S15, S16, S17, S18, S19, S20.72+73+> datekit's maintainers keep checks of their own, in a layer only they can read. The layer is declared in public, with its reason. Two clones of the same project: bram, a contributor, gets a 403 on the layer. ines-v, a maintainer, gets the sealed checks.74+>75+> bram's answer passes every check he can see. It was written to break one rule the public tests don't cover. The refusal reaches his terminal: HeldBackFailed, area export. One bit per area, never a check's name or its output, and at most three failures per claim in a week. He fixes it, and the landing carries a trailer: Held-back, export seven of seven, at the suite's published root. That means checked against seven sealed checks, not proven good. They're hidden from people and agents, not from the code under test, so they aren't a security boundary. The ledger says which kind of open this is: Open with sealed evidence.76+>77+> Why can't we commit .env files? Commit the shape. Deciders set the values. Nobody reads them back. An answer's code only ever sees a placeholder.78+79+Captions: on S17, "Staged: this answer breaks quote escaping on purpose."; on S20, "env shape: varlock's `.env.schema` format".80+81+If the video runs long, cut the last paragraph and S20 first.82+83+## The maintainer's day (5:00–5:45)84+85+On screen: S21, S22, S23.86+87+> okafor decides for burrow. Their day is one page, Today: decisions, not diffs, held to a budget. The reasoned escape from the run waits here, with its evidence, an expiry and a safe default. If nobody decides, nothing lands. Below it, a sample of landings that needed nobody.88+>89+> The front page lists the open asks across every project, each saying whether you may take it, and which are held for newcomers.90+>91+> And any line can say why it's there: the ask, who asked, who answered, the verdict, and the agent that helped.92+93+## Measured numbers (5:45–6:30)94+95+On screen: S24, S25, then S26.96+97+> These numbers come from live runs, each with its stage and date.98+>99+> [Read the rows of the README's Numbers table as they stand on the day. Say no number that isn't in it.]100+>101+> Everything here is plain git. Code, asks and credit trailers leave with a clone; the verdict notes take one more fetch. Nothing to export, nothing to sync, and nothing reaches main except through the gate.102+>103+> The top half is open. The bottom half is typed.added:.agents/demo/shot-list.md+51 added
1+# The shot list2+3+Every shot in the video, in the order the video shows them. Each row names its beat in [`script.md`](script.md), its screen (`terminal`, `web` or `split`: a terminal beside the browser), what to run or open on the `demo` stage, what must already be true, and what to use if it fails live. [`rehearsal.md`](rehearsal.md) has one checkbox per shot; record in the order under "Recording order", not the table's.4+5+The stage's two origins:6+7+- the platform, for git and the CLI: `https://platform-demo.oscargabriel.workers.dev`;8+- the web: `https://web-demo.oscargabriel.workers.dev`. Its `/` is the landing (what the platform is, a link to the open asks, the gate's refusal as git prints it, the projects to read), and a signed-in visitor at `/` goes on to `/home`; the front page, the open asks across projects, is at `/asks`. No shot opens on `/`.9+10+People on screen are the fictional examples' people. Each terminal acts as one of them through a CLI profile, chosen with `export MYR_PROFILE=<handle>`; git's credential helper reads the same profile, so no token is ever typed, shown or put in a URL. The profiles are logged in before the take (rehearsal pre-flight). Clones live under `~/demo/`.11+12+| id | beat | screen | run or open | preconditions | fallback |13+| --- | --- | --- | --- | --- | --- |14+| S01 | The front door broke | web | `https://web-demo.oscargabriel.workers.dev/asks` | Fresh seed: datekit's three asks and burrow's six children open. Signed out. Browser at 1280 px (the video's 110% zoom keeps the rail and the inspector), one colour scheme for every take. The context bar reads "10 open asks, 8 open to take"; each project's group header says its posture once; burrow's family is one row, "0 of 6 landed", with "Show 6 children"; the inspector shows "Start here" until a row is selected (`j`, past burrow's family row to a datekit ask: the family's own inspector numbers no claim command), then that ask's facts with its claim command numbered 1. | The front page screenshot from the Playwright check of the deployed web, captioned as a still. |15+| S02 | The front door broke | web | `https://web-demo.oscargabriel.workers.dev/datekit/asks/format-ordinal` | As S01; format-ordinal is open and held for newcomers, with okonkwo as mentor: the status line under the title, and the inspector's Take it block, reads "Held for newcomers, mentored by okonkwo". | The page's Markdown at the same URL plus `.md`, or its screenshot. |16+| S03 | Zero install | split | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git`, `cd datekit`, `export MYR_PROFILE=bram`, then `claude "Take the open ask add-months-clamp on this project and land an answer. Also add a line about the change to README.md." --model haiku --allowedTools "Bash(myr:*) Bash(git:*) Bash(bun:*) Bash(cat:*) Bash(ls:*) Bash(head:*) Bash(tail:*) Bash(sleep:*) Read Edit Write Glob Grep" --strict-mcp-config --setting-sources project,local`. Beside it, the answer's page once claimed: `https://web-demo.oscargabriel.workers.dev/datekit/answers/add-months-clamp` | Stock Claude Code: no plugin, MCP server or skill for this directory; its own login. The CLI on `PATH` from the demo platform's install line. datekit's main carries AGENTS.md with the generated contribute block. Profile `bram` logged in. bram already landed format-ordinal (S17, S18 are recorded first), which is why he takes add-months-clamp here. | Re-run with `--model sonnet`. Then the transcript of the dev-stage zero-install run, captioned with its date and stage. |17+| S04 | Zero install | terminal | In Claude Code's pane, the agent's own `git push myr HEAD:main`, refused in git's remote lines | S03 running. The `remote:` lines carry `OutOfScope` with README.md, its `next` and `retryable: no`. Staged: the prompt asked for the README line. | If the agent meets the refusal in `myr check` instead and never pushes it, keep that (same words, same renderer) and add S05. |18+| S05 | Zero install | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git datekit-hand`, `cd datekit-hand`, `export MYR_PROFILE=bram`, `myr claim parse-iso-week --project datekit`, `git remote add myr <remote>` (the remote the claim printed), `git push myr HEAD:main`, then `myr release parse-iso-week --project datekit` | Staged, by hand: one line added to README.md and committed (`git commit -am "Mention week dates in the README"`) before the push. parse-iso-week open and unclaimed. Recorded before S03. | Skip it; S04's `myr check` output carries the same refusal. |19+| S06 | Zero install | split | `cd ~/demo/datekit`, `git fetch origin`, `git log -1 --format=%B origin/main`; beside it `https://web-demo.oscargabriel.workers.dev/datekit/answers/add-months-clamp` | S03 landed. The commit's trailers: `Asked-by`, `Signed-off-by: bram`, and `Assisted-by: claude-code:…` apart. | `myr status --project datekit` as bram, which names the landed commit. |20+| S07 | One weed becomes a rule | web | `https://web-demo.oscargabriel.workers.dev/burrow` | Fresh seed: drop-legacy-fetch split into six children, one per package, and drop-legacy-fetch-delete waiting on all six. The project's page is its asks: the family's row expanded, its six children listed under the fan and the delete node reading "delete waits for 6"; the inspector says how a change lands here. | `myr asks --project burrow` in a terminal. |21+| S08 | One weed becomes a rule | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/burrow.git`, `cd burrow`, `git show HEAD:.myr/project.ts` | The ratchet block on screen: `no-module-level-mutable-state`, counted by `bun run lint --format json`. | `examples/burrow/.myr/project.ts` in the editor, the same file. |22+| S09 | One weed becomes a rule | terminal | From the repo root: `bun run swarm -- --stage demo --project burrow --scenario video --dry-run --allow-demo` | The swarm is built. The plan prints six rows on four harnesses, the held delete child, and both nudges in full. It makes no claim and needs no token. | The same plan from the dev stage (`--stage dev-oscabriel` on a fresh copy of burrow), captioned with its stage. |23+| S10 | One weed becomes a rule | split | Cut from S12, in the pane of the contributor nudged that a disable comment is acceptable: its `git push myr HEAD:main`, refused in git's remote lines | S12 running. The `remote:` lines carry `Weakened` with the marker and its line. Staged by the nudge S09 printed. | That pane's re-prompt, where the run hands the rendered refusal back to the session. If the agent never adds the comment, cut S10 and its line in the narration. |24+| S11 | One weed becomes a rule | web | `https://web-demo.oscargabriel.workers.dev/burrow/answers/<child>`, the child being the ask S09's plan gives the contributor told to give a reason | S12 running; that answer's checks passed. The page reads "Waiting on decision dec-…". Staged by the nudge. | The same outcome in that contributor's pane, from `myr status`. If the agent adds no comment, cut S11 and the line. |25+| S12 | Six harnesses at once | terminal | From the repo root: `bunx varlock run --path apps/platform/ -- bun run swarm -- --stage demo --project burrow --scenario video --view herdr --allow-demo` | Pre-flight done: herdr session `demo` open, six harnesses logged in, the six people's tokens in the stage's `SESSION_TOKENS`, burrow's family untouched. The recording lock on. | Six tiled terminals, each running the same command with `--view headless --only <handle>`. Last resort: the recorded dev-stage take, with its run's `agents.json` summary as a caption. |26+| S13 | Six harnesses at once | web | `https://web-demo.oscargabriel.workers.dev/burrow` | Open during S12; the asks update live as children are claimed and land: each child's node in the fan settles once as it lands, and "n of 6 landed" moves. | Reload between cuts. |27+| S14 | Six harnesses at once | web | `https://web-demo.oscargabriel.workers.dev/burrow/asks/drop-legacy-fetch-delete` | The sixth child landed: the delete child's status line reads "Open to take" (while siblings are open it reads "Waiting for N of 6 children to land"). | `myr asks --project burrow` lists it open. If a child timed out, say "five of six" and keep the delete child waiting on screen. |28+| S15 | The top half is open | split | Left: `export MYR_PROFILE=bram`, `git clone --branch main https://platform-demo.oscargabriel.workers.dev/datekit--maintainers.git`. Right: `export MYR_PROFILE=ines-v`, the same clone, then `git -C datekit--maintainers ls-files` | Left and right in separate empty folders. bram's clone fails with `remote: bram may not read datekit--maintainers` and HTTP 403; ines-v's holds `checks/held-back/export/` (7 files) and `parser/` (4). `--branch main` because the layer's HEAD follows the first branch the seed pushed. | The dev stage's recorded clones, captioned with their stage. |29+| S16 | The top half is open | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git datekit-read`, `cd datekit-read`, `git show HEAD:.myr/visibility.ts` | Anonymous: no profile needed. S20 reuses this clone. | `examples/datekit/.myr/visibility.ts` in the editor. |30+| S17 | The top half is open | terminal | `cd ~/demo/datekit-bram`, `export MYR_PROFILE=bram`, `myr claim format-ordinal --project datekit`, `git remote add myr <remote>`, `git push myr HEAD:main`, `myr status --project datekit` (until refused), `git fetch myr refs/notes/myr:refs/notes/myr`, `git notes --ref=myr show HEAD` | Staged: two commits prepared on main before the take: the Do token as an ordinal (every public test passes), then the one-line change in `examples/datekit/layers/maintainers/known-bad/export.patch`, which breaks quote escaping. bram has no landing in datekit yet (format-ordinal is held for newcomers). Status reads `refused: HeldBackFailed`; the note holds `HeldBackFailed` with `area: export` and the suite. | `myr verdict format-ordinal --project datekit`: export held back 6/7. |31+| S18 | The top half is open | split | `cd ~/demo/datekit-bram`, `git revert --no-edit HEAD`, `git push myr HEAD:main`, `myr status --project datekit` (until landed), `git fetch origin`, `git log -1 --format=%B origin/main`; beside it `https://web-demo.oscargabriel.workers.dev/datekit/answers/format-ordinal` | S17 refused. The landing's trailers end with `Held-back: export 7/7 @ sha256:…; parser 4/4 @ sha256:…`, in violet on the answer's page. | The dev stage's landing with the same trailer, captioned with its stage. |32+| S19 | The top half is open | web | `https://web-demo.oscargabriel.workers.dev/datekit/ledger` | The ledger's head reads "Open with sealed evidence. export: 7 sealed checks by 3 people; parser: 4 sealed checks by 3 people.", with the maintainers layer below. | `myr ledger --project datekit` in a terminal. |33+| S20 | The top half is open | split | `cd ~/demo/datekit-read`, `git show HEAD:.env.schema`; beside it `https://web-demo.oscargabriel.workers.dev/datekit/env` | ines-v set SENTRY_AUTH_TOKEN's value before the take (rehearsal pre-flight), so the page says who set it and when. The schema shows `@sensitive` and `@proxy(domain="sentry.io", path="/api/**")`. Caption: "env shape: varlock's `.env.schema` format". | `myr env shape --project datekit`. If the video runs long, cut S20 first. |34+| S21 | The maintainer's day | web | `https://web-demo.oscargabriel.workers.dev/today` | Signed in on the web as okafor. The budget reads as one sentence under the title; the reasoned escape from S11 waits in its section as a decision, with its default and expiry, and selecting it shows its evidence and its choices, each with its consequence under it. | `myr today --project burrow` as okafor in a terminal. |35+| S22 | The maintainer's day | web | `https://web-demo.oscargabriel.workers.dev/asks` | After S12: fewer open asks; burrow's family is one row with its count, its delete node open to take. | The front page screenshot from the Playwright check, captioned as a still. |36+| S23 | The maintainer's day | terminal | `cd ~/demo/burrow`, `git pull`, `git grep -n "http.get" packages/auth/src/session.ts`, then `myr why packages/auth/src/session.ts:<line> --project burrow`, on a line number the grep printed | The burrow clone from S08. The auth child landed in S12. | `git pull` in `~/demo/datekit-read`, then `myr why src/add.ts:<line> --project datekit` there, on a line S03 landed. Not in `~/demo/datekit`: its main holds the agent's own commit, which `why` names instead of the landing. |37+| S24 | Measured numbers | terminal | In the repo root: `git grep -n -A 15 "numbers:begin" README.md` | The README's Numbers table is filled from the live runs, each number with its stage and date. | The table in the editor. |38+| S25 | Measured numbers | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git datekit-export`, `cd datekit-export`, `git log -3 --format=%B`, `git fetch origin refs/notes/myr:refs/notes/myr`, `git notes --ref=myr show HEAD` | Anonymous: no profile needed to clone. The log shows the credit trailers; the notes come only with the extra fetch. | The same in `~/demo/datekit`. |39+| S26 | Measured numbers | web | `https://web-demo.oscargabriel.workers.dev/datekit` | The closing line is read over it. The page is datekit's asks, then its README, whose first sentence is the lede under the title. | Any page from this take. |40+41+## Recording order42+43+The video's order is not the order to record in. Two things set it: format-ordinal is held for newcomers, and a person with a landing in datekit is no newcomer, so bram's sealed-check answer (S17, S18) must land before his zero-install answer (S03); and the swarm (S12) changes what the front page and Today show.44+45+1. On the fresh seed, read-only: S01, S02, S07, S08, S09, S16, S19.46+2. The layer: S15, S17, S18.47+3. Zero install: S05, then S03, S04, S06.48+4. The swarm: S12, with S13 and S14 open beside it; S10 and S11 come from this take.49+5. After the swarm: S20, S21, S22, S23, S24, S25, S26.50+51+No deploy between the first take and the last.added:.agents/demo/swarm-scenario.md+93 added
1+# The swarm scenario2+3+Beats 3 and 4 of [`script.md`](script.md) show six fictional contributors answering one split ask on burrow at once, each through an agent of their own. This file says who they are, what they answer, what the video stages and what it doesn't, how to run it, and what to do when an agent stalls.4+5+**What is staged, in one place.** Two of the six agents get a nudge in their brief (below). The plan prints both nudges before anything runs (S09), the video captions both, and the narration says so. Nothing else in the run is staged: no refusal is planted in the platform, no outcome is scripted, and each agent's result is read from the platform (`myr status --json` as its person), never from what the agent prints.6+7+## The six contributors8+9+Six of the people burrow's `.myr/vouched.td` vouches for, each with one harness and one model: "4 harnesses, 6 models". Each is a fictional person with a token of their own in the stage's `SESSION_TOKENS`; their agent acts only through it. No agent holds an account or credit: the claim is the person's, and a landing credits the person, with the agent disclosed apart as `Assisted-by`.10+11+| # | Contributor | Harness | Model | Adapter | Child (when all six are open) |12+| --- | --- | --- | --- | --- | --- |13+| 1 | wren | Claude Code, as it ships | `claude-opus-5-5` | none | `drop-legacy-fetch-burrow-auth` |14+| 2 | tamsin | OpenCode | `opencode-go/gpt-6-luna` | none | `drop-legacy-fetch-burrow-billing` |15+| 3 | ivo | Amp | `medium` (one of its modes) | none | `drop-legacy-fetch-burrow-catalog` |16+| 4 | marisol | pi | `opencode-go/kimi-k3` | none | `drop-legacy-fetch-burrow-kit` |17+| 5 | dagny | pi | `opencode-go/glm-5.3` | none | `drop-legacy-fetch-burrow-notify` |18+| 6 | pell | pi | `opencode-go/qwen3.8-flash` | the pi adapter (`-e`): the brief, the scope guard and a verdict gate | `drop-legacy-fetch-burrow-search` |19+20+Each handle and model id is the one `scripts/lib/swarm/roster.ts` holds, word for word; the plan prints them (S09), and that printout is what the video shows. Two models changed in the swarm's live rehearsal on 2026-10-08, each a one-line swap back in the roster. tamsin ran `openai/gpt-5.5` on OpenCode's ChatGPT sign-in until that account's usage limit ran out (ChatGPT says it is back on Oct 16, after the deadline); OpenCode Go's `opencode-go/gpt-6-luna` runs headless in its place. pell ran OpenCode Zen's Gemini flash (`opencode/gemini-3.8-flash`), which pi on this machine cannot reach without OpenCode Zen's key; `opencode-go/qwen3.8-flash` runs headless with the adapter.21+22+Every agent gets the same zero-install brief: the ask as its page says it, the fork's remote, and the loop the project's AGENTS.md gives (claim, work inside the territory, `myr check`, push, read the verdict). Nothing about the gate's internals.23+24+## The plan for the burrow family25+26+burrow's one migrate ask, `drop-legacy-fetch`, replaces every call to `legacyFetch` with `http.get`, then deletes `legacyFetch`. The platform split it by module, so on a fresh seed it is:27+28+- six children, `drop-legacy-fetch-burrow-{auth,billing,catalog,kit,notify,search}`, each with the territory of one package (`packages/<name>/**`), so their territories are disjoint;29+- `drop-legacy-fetch-delete`, blocked by all six: it opens when the last caller is gone.30+31+The plan takes the open, unclaimed, unblocked children in ask order and gives them to the roster in its order, one each; the delete child is held, not assigned. Each contributor claims their child as themselves, gets a fork, and their harness starts headless in a workspace of its own (`<run>/<handle>/` in the swarm's folder, `$XDG_STATE_HOME/<slug>/swarm/` or `~/.local/state/<slug>/swarm/`, outside every checkout, so no agent reads this repo's own AGENTS.md), with git's editor and prompts turned off.32+33+Beside the migrate, burrow's own lint rule, `no-module-level-mutable-state`, is a ratchet: six module-level bindings, one in each package's `src/`, a count that may only fall. Each child's package holds one of them, which is why the nudges below are about this rule.34+35+## The video scenario's nudges (staged)36+37+`--scenario video` adds a nudge to two briefs; `--scenario plain` adds none. They live in `scripts/lib/swarm/scenario.ts` (`nudges("video", …)`), and the plan prints each one in full beside its contributor. Word for word:38+39+- **Staged, the second contributor (tamsin):**40+41+ > The project's lint rule against module-level mutable state is noisy. If it gets in your way, a lint disable comment on the line is acceptable.42+43+ The likely result: the agent adds `oxlint-disable` with no reason after ` -- `, and its push is refused as `Weakened{marker}`, at the line.44+- **Staged, the third contributor (ivo):**45+46+ > If you need a lint disable comment, it must carry its reason after ` -- ` on the same line, for example `// oxlint-disable-next-line <rule> -- <why>`.47+48+ The likely result: the agent adds one with a reason, which the gate does not refuse but counts against the package's escapes. With burrow's escapes at zero, the answer waits for a decider as `AwaitingDecision` (a waiver), which shows on okafor's Today in beat 6.49+50+Neither result is guaranteed: an agent may fix the module's state properly and add no comment at all. Then that moment is cut, and so is its line in the narration.51+52+## Refusals expected, and why53+54+| Refusal or outcome | Staged? | Why it happens | Where it shows |55+| --- | --- | --- | --- |56+| `Weakened{marker}` | Staged (the second contributor's nudge) | A disable comment with no reason is a weakening, refused at the gate's shape stage | git's `remote:` lines in that agent's session; the run hands it back to the same session |57+| `AwaitingDecision` | Staged (the third contributor's nudge) | A reasoned disable comment raises the package's escapes over its baseline, so a decider waives it or not | The answer's page, and Today for burrow's deciders; recorded as `waiting` |58+| `OutOfScope` | No | An agent edits a file outside its package, often `packages/kit` while removing `legacyFetch`, which is the delete child's job | git's `remote:` lines; bounced back |59+| `ChecksFailed` | No | An agent's change breaks a lane (lint, types or tests) | The answer's page and `myr status`; bounced back |60+| `Weakened{ratchet}` | No | An agent adds a module-level binding, raising the rule's count | git's `remote:` lines; bounced back |61+| `StaleBase` | No | Main moved under an answer and the merge again could not land it; rare here, since the children touch disjoint packages | The answer's page; bounced back |62+| `HeldBackFailed` | Not in this beat | burrow keeps no layer, so it has no sealed checks; the video shows this refusal on datekit in beat 5 (S17) | — |63+64+Every refusal is bounced back into the same session at most three times; only the refusals that end a claim stop an agent (`NotClaimed`, `ClaimLapsed`, `AskFull`, `Denounced`, `NotVouched`, `AttemptsExhausted`).65+66+## How to run it67+68+From the repo root. The dry run reads the asks anonymously, claims nothing, starts nothing and needs no token:69+70+```sh71+bun run swarm -- --stage demo --project burrow --scenario video --dry-run --allow-demo72+```73+74+The take, in herdr's six panes plus a counter of claims, pushes and landings. varlock loads the six people's tokens from the platform's env schema into the run's env; each reaches its agent only through that agent's env, and every log redacts it:75+76+```sh77+bunx varlock run --path apps/platform/ -- bun run swarm -- --stage demo --project burrow --scenario video --view herdr --allow-demo78+```79+80+`--allow-demo` is there because demo's burrow family is the one the video consumes: run it once, for the take. Rehearse on the dev stage, on a fresh copy of burrow made by the seed under another project name, so demo's family stays untouched:81+82+```sh83+bunx varlock run --path apps/platform/ -- bun run swarm -- --stage dev-oscabriel --project burrow-swarm-2 --scenario video --view herdr84+```85+86+The run writes its summary to `<run>/agents.json` in the swarm's folder (the run prints its path last): per contributor, the attempts, the refusals by tag, the outcome and the time taken.87+88+## When an agent stalls89+90+- **The per-run timeout ends it.** Each run has a timeout (`--timeout-min`, 20 minutes unless set); a run past it is recorded as `timedOut` and the other five carry on.91+- **Its outcome comes from the platform**, through `myr status --json` as its person, never from its pane. To see where its answer stands during the take, open `https://web-demo.oscargabriel.workers.dev/burrow/answers/<child>`.92+- **Its claim lapses** if it stops pushing, so its child goes back to open, and the delete child keeps waiting.93+- **For the video**, cut the stalled pane and say "five of six" in beat 4. If more than one stalls, use S12's fallback: six tiled terminals, each running the take's command with `--view headless --only <handle>`, or the recorded dev-stage take with its `agents.json` summary as a caption.added:.agents/ops/stages.md+369 added
1+# Stages2+3+A stage is one full copy of the platform on Cloudflare: its own Workers, Workflows, Artifacts namespaces (public and private), database, KV namespace and buckets. `infra/stages.ts` is the one table of stage names and resource names. Every other file, both `wrangler.jsonc` files included, matches it, and `packages/config/test/bootstrap.test.ts` checks that they do.4+5+This file has five parts, then how to run a stage, and it ends with what is left for a person to do:6+7+1. [Stages](#1-stages)8+2. [Resources per stage](#2-resources-per-stage)9+3. [Throwaway ledger summary](#3-throwaway-ledger-summary)10+4. [Teardown policy](#4-teardown-policy)11+5. [URLs](#5-urls)12+6. [Running a stage](#running-a-stage)13+7. [Human steps: status and next action](#human-steps-status-and-next-action)14+15+Sections 1 to 5 hold the state as of 2026-10-08, 18:00 UTC, read from the account with read-only calls; the demo stage and the teardown plan were read again at 18:15 UTC and had not changed. The W9 deploys of 2026-10-09 (06:39 to 07:22 UTC, issue 914) are added to sections 1, 3 and 5; the imports and the two dev deploys of 08:01 and 08:06 UTC (issue 915) to sections 1, 3 and 5; the teardown record is unchanged. The W10 deploys of 2026-10-09 (18:55 to 19:51 UTC, issue 1009) and the `code-cache-<s>` buckets are added to sections 1, 2, 3 and 5. The human steps at the end hold their status as of 2026-10-08, 18:30 UTC.16+17+## 1. Stages18+19+| Stage | What it is for | State on 2026-10-08 |20+| --- | --- | --- |21+| `dev-oscabriel` | One person's iteration. Deploy it as often as you like. | Bootstrapped 2026-10-07 and deployed (platform, sandbox, web). Re-checked 2026-10-08: bootstrap created nothing, and the platform holds every required secret. The feature-frozen build was deployed at 14:51 UTC on 2026-10-08, and the whole core loop (`bun scripts/smoke.ts --stage dev-oscabriel --loop`) passed on it twice in a row. **W9** (2026-10-09): deployed at 06:41 UTC (`a4543f6`), 06:57 (`177ee96`, the code cache fix) and 07:12 UTC (`ecc2107`, the drafter fix), smoke 8 of 8 each time (`platform-root` included). The deployed-web checks pass on datekit (12 of 12) and on burrow (11 of 12: burrow has no answer landing on dev, so `why.e2e.ts` has no ask to name). `smoke --loop --draft` passed once at 07:15 UTC on `smoke-20261009-071255`: `@cf/moonshotai/kimi-k2.7-code`, red first on attempt 1 of 3, 59 s from proposal to draft, 160 s for the whole loop; estimated Workers AI cost about $0.01 per attempt (about 1.6k tokens in and 1 to 2k out, 480 to 750 neurons on the same call replayed). Eight open-source repos imported and kept from 07:35 UTC (issue 915; [Imported projects (kept)](#imported-projects-kept)); redeployed at 08:01 (`73adbab`) and 08:06 UTC (`a29af4e`) for the history-read fixes, smoke 8 of 8 each time; and at 08:45 UTC (`009640c`, the wave's close-out: the sign-in link without its `#fragment`, a README's `<style>` dropped whole, admission ids under long names, the people page's disclosure words), smoke 8 of 8. Demo was not redeployed for it: none of those changes what demo's pages or the take need. **W10** (2026-10-09): bootstrap made `code-cache-dev-oscabriel` at 18:54 UTC (a second run made nothing); deployed at 18:55 (`bd3598e`, the W10 build), 19:12 (`c0fe1c5`, trees kept in the code store, reverted by `2421226` after it slowed a repo's first walk), 19:24 (`8310fed`, a small file's history read whole at each commit), 19:31 (`69fe19f`), 19:36 and 19:38 UTC (`e90a730`, the second only to start every isolate afresh), smoke 8 of 8 each time; verify's bytes on `e90a730`: platform entry 1,679,621 of 1,900,000, sandbox 570,582 of 656,000, web entry 710,962 of 818,000 (JavaScript 3,565,596 of 4,075,000). Cold first views of why and of a file's log on changesets and click went from 18.6 to 39.6 s on the W9 build to 5.3 to 7.7 s, and the same address asked again answers in 0.1 to 1.7 s, under a second once an isolate has served it, after a redeploy too (issue 1009's comments hold the table). `smoke --loop` passed at 19:41 UTC on `smoke-20261009-193937`, its project and repo in the ledger before init finished. The deployed-web checks pass 13 of 13 on datekit and on burrow (why included: an opening's landing links the ask it opened), and `imports.e2e.ts` with `tags.e2e.ts` 74 of 74 once the tests `net::ERR_NETWORK_CHANGED` broke on this machine were asked again. **W11** (2026-10-10): deployed at about 01:00 UTC (`57bb629`, the W11 build), smoke 8 of 8; the deployed-web checks then failed 1 of 13, `datekit/format-ordinal.md`, because the new index banner came before the brief's `#` title (and before `/<project>/llms.txt`'s heading). Fixed test-first in `53896c9` (the banner goes under the title) and redeployed at about 01:14 UTC (`ca95612`), smoke 8 of 8, the deployed-web checks 13 of 13 on datekit and on burrow. The platform's `/` lists every project's own posture (datekit and its copies read "Open with sealed evidence"); with about 40 projects each list reads about 40 ledgers, and the platform's `/` answered in 0.2 to 1.1 s. **W12** (2026-10-10): bootstrap applied `0005_standing_postures.sql` (it created nothing); deployed at about 11:25 UTC (`7b8b393`, the Control room build with the review fixes), smoke 11 of 11, `web-agent-skills` over its 500 ms budget (3.3 s cold, 1.0 to 1.7 s after: a warning, not a failure). `smoke --loop` passed at 11:30 UTC on `smoke-20261010-113046`. The deployed-web checks pass 13 of 13 on datekit and on burrow; `/assets/*` answer `public, max-age=31536000, immutable`, and `/` answers `Accept: text/markdown` with 200. **W12 perf** (2026-10-10): deployed `5881ff2` (the minified web with its source maps uploaded, Workers Cache in front of the web, server highlighting), smoke 11 of 11 (cold-isolate warnings on the web's Markdown and skills reads). The deployed-web checks pass 13 of 13 on datekit and on burrow. `/datekit/tree/main` went MISS then HIT, 60 to 120 ms against 1.5 to 2 s from the Worker, with `vary: Cookie`; with a cookie, and on `/today`, BYPASS with `private, no-store`. `src/add.ts`'s blob page carries its highlighted file in a declarative shadow root. **Exit codes and `movedBy`** (2026-10-10): deployed at about 18:23 UTC (`a23e097`: the CLI's exit codes, ADR 0028, and `StaleBase`'s `movedBy`, ADR 0029), smoke 11 of 11 (`web-agent-skills` 4.7 s on a cold isolate, the Markdown reads 0.8 to 1.4 s: warnings). The deployed-web checks pass 13 of 13 on datekit and on burrow, and `/llms-full.txt` carries the Exit codes section and the `movedBy` guide. The CLI from this build, against the stage: `UnknownProject` and `UnknownAsk` exit 66, `status` signed out 77, an unreachable platform 69. `smoke --loop` passed at 18:28 UTC on `smoke-20261010-182620` (108.8 s, the landing 30.3 s). No conflicting answer was landed live, so `movedBy` has been seen only in the tests (the core loop names alice's landing). **W13** (2026-10-10): deployed at about 20:55 UTC (`18b5418`: the landing at `/`, `/home`, a short command's words kept whole), smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` over their 500 ms budgets on cold isolates, warnings). Thirty more open-source repos imported and kept from 20:57 to 21:29 UTC (issue 1331; [Imported projects (kept)](#imported-projects-kept)). Redeployed at about 22:08 UTC (`643ab22`: an adoption heard as a landing, 1316; a README symlink read where it points, 1317), smoke 11 of 11 (`web-agent-skills` 8.7 s on a new isolate with 76 projects' skills, a warning); `imports.e2e.ts` with `landing.e2e.ts` then passed 226 of 226 once two `net::ERR_NETWORK_CHANGED` tests were asked again, axum's home with its README included. **W13 close-out** (2026-10-11): deployed at about 00:45 UTC (`f224a14`: the landing's projects read on the server with each posture's badge, the root preload ceiling at 268,000 on the user's sign-off; an import's source kept on its record and shown on its page, ADR 0031), `verify` green and smoke 11 of 11 (`web-agent-skills` 7.1 s on a cold isolate, a warning). Then `scripts/import-examples.ts --stage dev-oscabriel --sources` kept the source of all 38 imports through a repeat `initProject` by the operator (the dry run listed the 38 first); a second run on `click` answered the same, and `/click` shows "Imported from https://github.com/pallets/click · branch main". Nothing was imported, seeded, drafted, claimed or landed, and the ledger did not change. **W14** (2026-10-11): the W14 build names every project `<owner>/<name>` (ADR 0032) and imports from the web's `/import` (ADR 0033). Deployed at about 23:06 UTC (`f10338e`), `verify` green (bytes: platform entry 1,706,836 of 1,900,000, sandbox 578,873 of 656,000, web entry 308,509 of 356,000), then **smoke failed 2 of 11**: `web-project-llms-txt` (`/oscabriel/datekit/llms.txt`) and `web-ask-md` (`/oscabriel/datekit/asks/format-ordinal.md`) answer 404, "No such project", as do `/github.com/pallets/click/llms.txt` and `/oscabriel/datekit` asked for Markdown. The cause is in the web: TanStack Start 1.169.39 already runs the route's `params.parse` on a server handler's params (`withParsedParams` in `createStartHandler.js`), so `withProjectName` joins the owner a second time (`oscabriel/oscabriel/datekit`), which no `ProjectName` decodes; the web's tests call the handlers with raw params, so `verify` cannot see it (issue 1431's comments). Fixed test-first in `3878778` (the route's handlers read the full name once; `withProjectName` removed) and redeployed at about 23:17 UTC, `verify` green and smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt` and `web-agent-skills` over their 500 ms budgets on cold isolates, warnings); the deployed-web checks then pass 15 of 15. Everything else walked as asked: `/oscabriel/datekit` and `/github.com/pallets/click` 200; `/datekit/tree/main`, `/click`, `/OscaBriel/datekit`, `/github.com/Pallets/click`, `/github.com/pallets/click.git` and `/oscabriel/datekit.git` 301 to the name's address, the rest and the query kept; `/oscabriel` 302 to `/people/oscabriel`; `/import` signed out draws the form with Sign in; `/github.com/juliangruber/isarray` (never imported) draws "Not imported yet" with a 404. `git ls-remote` on `<platform>/datekit.git` and `<platform>/oscabriel/datekit.git` list the same 8 refs, and `asks --project datekit` and `--project oscabriel/datekit` print the same table. The landing leads with `oscabriel/burrow` (7 open asks) and `oscabriel/datekit` (2). The deployed-web checks (`deployed`, `imports` on ky and click, `landing`) pass 14 of 15, failing only the ask's Markdown above. Seventeen of the forty (click, ripgrep, flask, cobra, fuzzel and twelve more) have no `projects` row in D1: they were adopted before `6bf50e8` heard an adoption as a landing, so they are not listed and `/<name>/llms.txt` answers 404 for them, though their pages and clones serve (issue 1316; demo's imports came after the fix) At about 00:10 UTC on 2026-10-12, on the user's yes, their seventeen `projects` rows were inserted (`posture 'open'`, no asks, no landing; `ON CONFLICT DO NOTHING`, the `cursor` left alone so each project's next event applies as usual) with `wrangler d1 execute front-page-dev-oscabriel --remote --env dev-oscabriel` under Wrangler's login; the web's `/llms.txt` then lists all forty, and `/github.com/pallets/click/llms.txt` answers 200. The web import: on 2026-10-12 the user signed in on dev and imported `https://github.com/juliangruber/isarray` from its offer at `/github.com/juliangruber/isarray`; the project draws there, answers its `llms.txt`, clones at `<platform>/github.com/juliangruber/isarray.git` and is listed, its repo `github.com__juliangruber__isarray` recorded in `infra/created.jsonl` and kept. Nothing was seeded, drafted, claimed or landed. |22+| `demo` | The recording and the submission. Deploy it deliberately, and never while a take is being recorded (H7). | Bootstrapped 2026-10-08: six resources created, migrations `0001` to `0004` applied, and a second run created nothing. Its secrets are set. Deployed at 15:39 UTC on 2026-10-08 (the build the dev stage proved), and smoke passed. Seeded at 15:44 UTC with `datekit` (its maintainers layer and both sealed suites admitted) and `burrow` (the `drop-legacy-fetch` family), nothing claimed. The rehearsal (17:08 to 17:39 UTC) only read it, apart from ines-v's `env set SENTRY_AUTH_TOKEN` with a made-up value, which stays set for the take. At 18:13 UTC smoke passed 7 of 7, the deployed web's Playwright check passed 5 of 5, and burrow's six `drop-legacy-fetch-burrow-*` children were open and unclaimed. Each later deploy is listed, with its reason, in [Deploys of demo](#deploys-of-demo). **W9** (2026-10-09): deployed at 07:18 UTC (`ecc2107`; smoke failed only `platform-root`, a 404 from the W8 version as the upload finished, and passed 8 of 8 a minute later) and again at 07:22 UTC (`1a7bb89`, the same Worker code; smoke 8 of 8). The deployed-web checks pass 11 of 12 on datekit: `why.e2e.ts` needs an answer landing and demo has none, by design. Nothing was seeded, drafted, claimed or imported; it still holds `datekit` and `burrow`, and burrow's `drop-legacy-fetch` and its seven children are unclaimed. **W10** (2026-10-09): bootstrap made `code-cache-demo` at 19:49 UTC (a second run made nothing); deployed at 19:50 UTC (`34f8ec8`, the Worker code of `e90a730`), smoke 8 of 8. The deployed-web checks pass 13 of 13 on datekit with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`, why included: the opening's row links its ask. The first run, four seconds after the deploy, failed the three pages that read the front page's projection and the project's home; a run a minute later passed all 13. `listProjects`, `listAsks burrow` and `listAsks datekit` read the same before and after: `datekit` and `burrow` only, every ask unclaimed. Nothing was seeded, drafted, claimed, imported or landed. Redeployed at 20:16 UTC (`4a23695`) with the wave's last fold-ins, smoke 8 of 8, the deployed-web checks 13 of 13 on datekit and on burrow; nothing else changed on demo. **W11** (2026-10-10): deployed at about 01:17 UTC (`ca95612`), smoke 8 of 8, the deployed-web checks 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and on burrow. The platform's `/` read `burrow` Open with 7 open asks and `datekit` Open with 3 before; after, the same counts, and datekit reads "Open with sealed evidence", as its ledger does (D1). Nothing was seeded, drafted, claimed, imported or landed. **W12** (2026-10-10): bootstrap applied `0005_standing_postures.sql`; deployed at about 11:40 UTC (`905fec1`, the Worker code of `7b8b393`), smoke 11 of 11 (`web-agent-skills` 1.2 s, over its 500 ms budget, a warning). The deployed-web checks pass 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and on burrow. The platform's `/` read `burrow` Open with 7 open asks and `datekit` Open with sealed evidence with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. **W12 perf** (2026-10-10): deployed `6269bf9` (the Worker code of `5881ff2`: the minified web, Workers Cache, server highlighting), smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt` and `web-ask-md` over their 500 ms budgets on the new version's cold isolates, warnings). The deployed-web checks pass 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and on burrow. `/datekit` is a cache HIT at 50 to 80 ms with `vary: Accept, Cookie`, and BYPASS with `private, no-store` when the request carries a cookie. The platform's `/` read `burrow` with 7 open asks and `datekit` with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. **W13** (2026-10-10): deployed at about 22:18 UTC (`3a4d9c2`, the Worker code of `643ab22`), smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` over their 500 ms budgets on new isolates, warnings). The deployed-web checks pass 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) plus `landing.e2e.ts`'s 2, and 12 of 12 on burrow. `/` is the landing and `/asks` the front page. The platform's `/` read `burrow` Open with 7 open asks and `datekit` Open with sealed evidence with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. **W13 close-out** (2026-10-11): deployed at about 02:36 UTC (`873046e`, the Worker code of `f224a14`; its reason row below was written first), `verify` green and smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` over their 500 ms budgets on new isolates, warnings). Then, on the user's approval (issue 1332), `scripts/import-examples.ts --stage demo --sources` imported the 38 open-source repos from 02:37 to 03:10 UTC, each warmed 5 of 5 pages, and `--tags` backfilled every one's tags from 03:11 to 03:16 UTC: 114 ledger lines on `demo`, the stage's first ([Imported projects (kept)](#imported-projects-kept)). Each import's page shows "Imported from" with its source. The deployed-web checks pass 16 of 16 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`, the landing's 3 included), 12 of 12 on burrow, and `imports.e2e.ts` with `tags.e2e.ts` 224 of 224, once four tests `net::ERR_NETWORK_CHANGED` broke on this machine were asked again. The read-only shots were walked again (`.agents/demo/rehearsal.md`). With 40 projects, the rail and the landing name the first eight by name (anyhow to click, burrow among them, datekit not); the front page at `/asks` still leads with burrow's family and datekit's asks. Nothing was seeded, drafted, claimed or landed; its `datekit` and `burrow` were only read. **W14** (2026-10-12): deployed at about 05:09 UTC (`3fcdb5c`, the Worker code of `e77e5bb`; its reason row below was written first, on the user's yes), `verify` green and smoke 11 of 11 (four reads over their 500 ms budgets on new isolates, warnings). Walked: `/oscabriel/datekit` and `/github.com/pallets/click` 200; `/datekit`, `/click`, a name in another case and a name ending in `.git` 301 to the name's address; `/oscabriel` 302 to `/people/oscabriel`; `<platform>/datekit.git` and `<platform>/oscabriel/datekit.git` clone alike; a source path nobody has imported draws the import offer. The deployed-web checks pass 16 of 16 on datekit, and `imports.e2e.ts` with `tags.e2e.ts` 224 of 224 once the e2e checks expected each project's full-name address (`1dee558`; the first run failed only on the old short addresses in the tests). The platform's `/` read 40 projects, `burrow` with 7 open asks and `datekit` Open with sealed evidence with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. |23+24+There is no `prod` stage before the deadline. The top level of each `wrangler.jsonc` is stage `local`, for tests and `wrangler dev`, and it is never deployed. A new person's stage is added to `stages` in `stages.ts` and gets an `env` block in each `wrangler.jsonc`, in the same change.25+26+## 2. Resources per stage27+28+Every name is a job name plus the stage, never the brand. For stage `<s>`:29+30+| Resource | Name | Made by |31+| --- | --- | --- |32+| Workers | `platform-<s>`, `sandbox-<s>`, `web-<s>` | deploy |33+| Workflows | `answer-<s>`, `on-push-<s>` | deploy (they live in `platform-<s>`) |34+| Artifacts namespace (public) | `projects-<s>` | bootstrap |35+| Artifacts namespace (private: every project's layer repos, bound only by the platform) | `layers-<s>` | bootstrap |36+| D1 database (the front page) | `front-page-<s>` | bootstrap |37+| KV namespace (OAuth grants) | `oauth-<s>` | bootstrap |38+| R2 bucket (lane evidence) | `evidence-<s>` | bootstrap |39+| R2 bucket (CLI releases, served at `/install.sh` and `/releases/*`) | `releases-<s>` | bootstrap |40+| R2 bucket (code history kept by commit: a why and a path's log, bound only by the platform as `CODE_CACHE`) | `code-cache-<s>` | bootstrap |41+| Push-event trigger | `cf.artifacts.repo.pushed` on `projects-<s>`, starting `on-push-<s>` | deploy (`triggers.events` in `apps/platform/wrangler.jsonc`), read back by bootstrap |42+43+The `witness` namespace belongs to another project. Nothing here reads, writes or deletes it, and neither should you.44+45+Every resource in the two tables below belongs to its stage. The times are the account's own creation times, in UTC. A KV namespace has no creation time, so its row gives the bootstrap run that made it.46+47+### `dev-oscabriel`48+49+| Resource | Name | Created by | When | Keep? |50+| --- | --- | --- | --- | --- |51+| Artifacts namespace | `projects-dev-oscabriel` | bootstrap | 2026-10-07 20:17 | keep (needs the user to delete) |52+| D1 | `front-page-dev-oscabriel` | bootstrap | 2026-10-07 20:17 | keep (needs the user to delete) |53+| KV | `oauth-dev-oscabriel` | bootstrap | 2026-10-07 (first run) | keep (needs the user to delete) |54+| R2 | `evidence-dev-oscabriel` | bootstrap | 2026-10-07 20:17 | keep (needs the user to delete) |55+| Worker | `sandbox-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |56+| Worker | `platform-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |57+| Workflow | `answer-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |58+| Workflow | `on-push-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |59+| Push-event trigger | `projects-dev-oscabriel` → `on-push-dev-oscabriel` | deploy | 2026-10-07 | keep (needs the user to delete) |60+| R2 | `releases-dev-oscabriel` | bootstrap | 2026-10-08 01:02 | keep (needs the user to delete) |61+| Worker | `web-dev-oscabriel` | deploy | 2026-10-08 05:17 | keep (needs the user to delete) |62+| Artifacts namespace | `layers-dev-oscabriel` | bootstrap | 2026-10-08 09:58 | keep (needs the user to delete) |63+| R2 | `code-cache-dev-oscabriel` | bootstrap | 2026-10-09 18:54 | keep (needs the user to delete) |64+| Secrets on `platform-dev-oscabriel` | `OPERATOR_TOKEN`, `SESSION_TOKENS`, `COOKIE_KEY`, `PASSWORD_PEPPER`, `MASTER_KEY` | generated, carried by deploy (see [Secrets](#secrets)) | 2026-10-07 and 2026-10-08 | keep (needs the user to delete); rotate before going public |65+| Seeded projects | `datekit` (with its `datekit--maintainers` layer repo) and `burrow` in `projects-dev-oscabriel` | seed | 2026-10-07 and 2026-10-08 | keep while the dev stage is used |66+67+### `demo`68+69+| Resource | Name | Created by | When | Keep? |70+| --- | --- | --- | --- | --- |71+| Artifacts namespace | `projects-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |72+| Artifacts namespace | `layers-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |73+| D1 | `front-page-demo`, with migrations `0001` to `0004` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |74+| KV | `oauth-demo` | bootstrap | 2026-10-08 13:57 (the run) | keep (needs the user to delete) |75+| R2 | `evidence-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |76+| R2 | `releases-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |77+| R2 | `code-cache-demo` | bootstrap | 2026-10-09 19:49 | keep (needs the user to delete) |78+| Worker | `platform-demo`: made by the first `wrangler secret put` as a placeholder to hold the secrets; the first deploy gave it its code and its workers.dev route. | `wrangler secret put`, then deploy | 2026-10-08 13:58 (code 15:39) | keep (needs the user to delete) |79+| Secrets on `platform-demo` | `OPERATOR_TOKEN`, `SESSION_TOKENS`, `COOKIE_KEY`, `PASSWORD_PEPPER`, `MASTER_KEY` | generated, set with `wrangler secret put` and carried by deploy (see [Secrets](#secrets)) | 2026-10-08 13:58 | keep (needs the user to delete); rotate before going public |80+| Worker | `sandbox-demo` | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |81+| Container applications | `sandbox-checker-demo` (started on `standard-3`) and `sandbox-lander-demo` (`standard-2`), with their images `sandbox-demo-checker-check` and `sandbox-demo-lander-land` in the account's container registry | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |82+| Worker | `web-demo` | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |83+| Workflow | `answer-demo`, `on-push-demo` | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |84+| Push-event trigger | `projects-demo` → `on-push-demo` | deploy (read back by bootstrap) | 2026-10-08 15:39 | keep (needs the user to delete) |85+| Seeded projects | `datekit` (with its `datekit--maintainers` layer repo in `layers-demo`) and `burrow` in `projects-demo` | seed | 2026-10-08 15:40 to 15:44 | keep: the recording takes them. Don't reseed over them; a fresh copy is `seed --as`. |86+| Imported projects | The 38 open-source repos the code browser is previewed on, in `projects-demo`, with their tags | import (issue 1332, on the user's approval) | 2026-10-11 02:37 to 03:16 | keep: the recording shows them beside the two; teardown never selects them. Deleting one is a person's Cloudflare delete. |87+88+## 3. Throwaway ledger summary89+90+A throwaway is something a smoke run, a swarm run or a `seed --as` copy makes on a stage, beside the stage's own resources. Each run appends one JSON line for each throwaway to `infra/created.jsonl` (`infra/created.ts`), and teardown acts only on those lines. When teardown deletes one, it appends a `deleted` line naming it (`deletedAt`, then its kind, name, namespace and stage). No line is ever rewritten or removed.91+92+On 2026-10-08 at 18:00 UTC the ledger held 69 entries, all on `dev-oscabriel`: 16 projects and 53 repos. 914's runs on 2026-10-09 added 8 (3 projects, 5 repos), so it held 77. 915's imports on 2026-10-09 added 22 (8 projects, 8 repos, and 6 `tags backfilled` repo lines), so it held 99. 1009's `smoke --loop` on 2026-10-09 added 3 (a project, its repo and its claim's fork), so it holds 102, the imports listed under [Imported projects (kept)](#imported-projects-kept) and the rest below. None is marked deleted yet. A read-only listing found every one of the 53 repos still there:93+94+| When (UTC) | By | Kind | Name | Where |95+| --- | --- | --- | --- | --- |96+| 2026-10-08 12:37 | swarm | repo | `burrow--drop-legacy-fetch-burrow-auth--wren` (a released claim's fork of the stage's `burrow`) | `projects-dev-oscabriel` |97+| 2026-10-08 14:40 to 14:58 | smoke | project, repo, repo | four core-loop runs, `smoke-20261008-143944`, `smoke-20261008-144139`, `smoke-20261008-145551` and `smoke-20261008-145715`: each one's project, its repo, and its claim's fork `<project>--parse-year--bram` | `projects-dev-oscabriel` |98+| 2026-10-08 14:52 to 14:54 | seed | project, repo, repo | `burrow-lint-807`, a `seed --as` copy of burrow that proved the Checker runs burrow's lint lane, with its repo and wren's claim fork `burrow-lint-807--drop-legacy-fetch-burrow-auth--wren` | `projects-dev-oscabriel` |99+| 2026-10-08 16:07 to 16:21 | seed, swarm | 2 projects, 8 repos | the harness checks' copies: `datekit-803` (its repo, its layer repo `datekit-803--maintainers`, and bram's claim forks `--parse-iso-week--bram`, `--format-ordinal--bram` and `--add-months-clamp--bram`) and `burrow-803` (its repo, and tamsin's and ivo's claim forks) | `projects-dev-oscabriel`, the layer in `layers-dev-oscabriel` |100+| 2026-10-08 16:29 to 16:41 | seed, swarm | 2 projects, 14 repos | the swarm's two live runs: `burrow-swarm-1` and `burrow-swarm-2`, each a `seed --as` copy of burrow with its repo and the six contributors' claim forks `<project>--drop-legacy-fetch-burrow-<package>--<handle>` | `projects-dev-oscabriel` |101+| 2026-10-08 16:49 to 16:57 | smoke | 5 projects, 10 repos | five core-loop runs, `smoke-20261008-164858`, `smoke-20261008-165040`, `smoke-20261008-165218`, `smoke-20261008-165400` and `smoke-20261008-165645`, each with its repo and its claim's fork `<project>--parse-year--bram` | `projects-dev-oscabriel` |102+| 2026-10-08 17:12 to 17:39 | seed, swarm | 2 projects, 10 repos | the rehearsal's copies: `datekit-805` (its repo, its layer repo `datekit-805--maintainers`, and bram's three claim forks) and `burrow-805` (its repo, and the claim forks of tamsin, ivo, marisol and dagny) | `projects-dev-oscabriel`, the layer in `layers-dev-oscabriel` |103+| 2026-10-09 06:59 to 07:13 | smoke | 3 projects, 5 repos | three `--loop --draft` runs (914): `smoke-20261009-065926` (its repo and `--parse-year--bram`; its draft failed on the model's JSON), `smoke-20261009-071213` (its repo only: init made it, then its first push answered 500 seconds after a deploy, so the loop wrote nothing and 914 added both lines through `infra/created.ts`) and `smoke-20261009-071255` (its repo and `--parse-year--bram`; the draft passed and its ask opened there) | `projects-dev-oscabriel` |104+| 2026-10-09 19:39 to 19:40 | smoke | project, repo, repo | one core-loop run (1009), `smoke-20261009-193937`: its project and repo, written at 19:39:42 before its init finished, and its claim's fork `--parse-year--bram` | `projects-dev-oscabriel` |105+106+The live runs before the ledger existed left throwaways that it doesn't hold, all on `dev-oscabriel`. A read-only listing on 2026-10-08 at 18:00 UTC found each one still there:107+108+- In `projects-dev-oscabriel`, 75 repos. Of these, 53 are the ledger's. `datekit` and `burrow` are the stage's seeded examples, and their forks `datekit--me--ines-v`, `datekit--format-ordinal--bram` and `datekit--add-months-clamp--bram` belong to them. The other 19 are test projects and their forks: `w3live-muyjz31t`, `w3live-muyk0528`, `w3live-muyk72qm`, `w3live-muykamf1`, `w3live-muyklikt` (with `--parse-iso--alice`), `w3live-muyl0wps` (with `--parse-iso--alice`), `w3live-muyl2z12` (with `--parse-iso--alice`), `scratch-onpush-muykseuk`, `w4-rehearsal` (with `--first-day--alice`, `--canada-sunday--alice`, `--brazil-sunday--alice` and `--mexico-sunday--alice`), and `w4-ratchet` (with `--no-any-in-parser--alice` and `--pad-day--bob`).109+- In `layers-dev-oscabriel`, 3 repos: datekit's `datekit--maintainers` and the ledger's two copies' layers.110+- The secret `S8B_PROBE` on `platform-dev-oscabriel`.111+- The test accounts `w3tester-muyk9zdx` and `w5web-muz3airr` in `front-page-dev-oscabriel` (no identity or credit rows), and their OAuth grants in `oauth-dev-oscabriel`: one for `w5web-muz3airr` and two for `w3tester-muyk9zdx`.112+- The Project Durable Objects and front-page rows of those test projects. They are harmless and are not deleted.113+114+Imported projects (kept). `bun scripts/import-examples.ts --stage dev-oscabriel` imports the open-source repos the code browser is previewed on (anyhow, ky, gum, click, awesome, changesets, stb and fuzzel), one at a time, and records each in the ledger with `by: "import"`: one `project` line and one `repo` line in `projects-dev-oscabriel`, plus a `tags backfilled` note when `--tags` pushed their tags. They are not throwaways: teardown lists them as "kept imports" and never selects them, nor any fork of them, as it keeps the seeded examples. Deleting one is a person's Cloudflare delete. The script refused `demo` until 2026-10-11, when the user approved the same 38 imports onto demo (issue 1332, [Deploys of demo](#deploys-of-demo)); they are kept there as on dev, and the video shows them beside the fictional two.115+116+#### Imported projects (kept)117+118+Imported on 2026-10-09 between 07:35 and 07:42 UTC (issue 915), one at a time, by `bun --env-file=<dev secrets file> scripts/import-examples.ts --stage dev-oscabriel --only <p>`, with `--tags` under `bunx varlock run --path infra/ --` for every source that has tags. **Artifacts' import brings no tags**: anyhow's repo served 0 of its 105 after the import (`git ls-remote <platform>/anyhow.git 'refs/tags/*'`), and every other import with tags also came with none, so each was backfilled. An import of a `master` default leaves `refs/heads/master` frozen beside `main`. "Policy" is whether the config at the adopted commit evaluated: with no config folder the defaults apply and the run block comes from the repo's CI, and where the finder finds no test command there, the policy never evaluates (the people page says it has not been evaluated) and the platform lands no contribute-skill commit on top. Commits are the source branch's commits at import (`git rev-list --count`), plus the platform's one commit where the policy evaluated. The import time is the script's run, the backfill included. `bun infra/teardown.ts --stage dev-oscabriel` (read-only) lists all sixteen lines as kept imports and selects none.119+120+Each import's web address is its project name, `/<host>/<account>/<name>` (ADR 0032), once a stage runs the W14 build; the address it was imported under, such as `/click`, redirects there, and its git address, `<platform>/click.git`, still clones.121+122+| Project | Source | Branch | Commits | Tags | Policy | Web | Imported (UTC) | Took |123+| --- | --- | --- | --- | --- | --- | --- | --- | --- |124+| `anyhow` | https://github.com/dtolnay/anyhow | `master` | 932 + 1 | 0, then 105 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/dtolnay/anyhow | 07:35 | 25 s, backfill 7 s |125+| `ky` | https://github.com/sindresorhus/ky | `main` | 592 + 1 | 0, then 99 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sindresorhus/ky | 07:38 | 42 s |126+| `gum` | https://github.com/charmbracelet/gum | `main` | 684 | 0, then 29 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/charmbracelet/gum | 07:39 | 17 s |127+| `click` | https://github.com/pallets/click | `main` | 3,379 | 0, then 71 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pallets/click | 07:39 | 33 s |128+| `awesome` | https://github.com/sindresorhus/awesome | `main` | 1,209 | none at the source | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sindresorhus/awesome | 07:40 | 15 s |129+| `changesets` | https://github.com/changesets/changesets | `main` | 985 + 1 | 0, then 740 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/changesets/changesets | 07:40 | 66 s |130+| `stb` | https://github.com/nothings/stb | `master` | 2,232 | none at the source | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/nothings/stb | 07:41 | 50 s |131+| `fuzzel` | https://codeberg.org/dnkl/fuzzel | `master` | 1,499 | 0, then 38 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/codeberg.org/dnkl/fuzzel | 07:42 | 26 s |132+| `hono` | https://github.com/honojs/hono | `main` | 2,878 + 1 | 0, then 468 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/honojs/hono | 20:57 | 103 s |133+| `express` | https://github.com/expressjs/express | `master` | 6,181 + 1 | 0, then 306 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/expressjs/express | 20:59 | 111 s |134+| `fastify` | https://github.com/fastify/fastify | `main` | 4,894 + 1 | 0, then 333 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/fastify/fastify | 21:01 | 104 s |135+| `zustand` | https://github.com/pmndrs/zustand | `main` | 1,382 + 1 | 0, then 137 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pmndrs/zustand | 21:03 | 67 s |136+| `immer` | https://github.com/immerjs/immer | `main` | 1,571 + 1 | 0, then 170 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/immerjs/immer | 21:04 | 60 s |137+| `nanoid` | https://github.com/ai/nanoid | `main` | 1,289 + 1 | 0, then 134 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/ai/nanoid | 21:05 | 59 s |138+| `commander` | https://github.com/tj/commander.js | `master` | 1,517 + 1 | 0, then 126 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/tj/commander | 21:06 | 59 s |139+| `execa` | https://github.com/sindresorhus/execa | `main` | 877 + 1 | 0, then 67 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sindresorhus/execa | 21:07 | 62 s |140+| `chalk` | https://github.com/chalk/chalk | `main` | 380 + 1 | 0, then 46 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/chalk/chalk | 21:08 | 47 s |141+| `mitt` | https://github.com/developit/mitt | `main` | 139 + 1 | 0, then 12 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/developit/mitt | 21:09 | 38 s |142+| `clsx` | https://github.com/lukeed/clsx | `master` | 82 + 1 | 0, then 15 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/lukeed/clsx | 21:09 | 40 s |143+| `ripgrep` | https://github.com/BurntSushi/ripgrep | `master` | 2,287 | 0, then 272 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/burntsushi/ripgrep | 21:10 | 77 s |144+| `serde` | https://github.com/serde-rs/serde | `master` | 4,366 + 1 | 0, then 323 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/serde-rs/serde | 21:11 | 96 s |145+| `axum` | https://github.com/tokio-rs/axum | `main` | 2,017 + 1 | 0, then 223 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/tokio-rs/axum | 21:13 | 73 s |146+| `fd` | https://github.com/sharkdp/fd | `master` | 2,044 + 1 | 0, then 45 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sharkdp/fd | 21:14 | 51 s |147+| `hyperfine` | https://github.com/sharkdp/hyperfine | `master` | 1,212 | 0, then 30 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sharkdp/hyperfine | 21:15 | 37 s |148+| `bubbletea` | https://github.com/charmbracelet/bubbletea | `main` | 1,890 + 1 | 0, then 109 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/charmbracelet/bubbletea | 21:16 | 63 s |149+| `fzf` | https://github.com/junegunn/fzf | `master` | 3,750 + 1 | 0, then 179 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/junegunn/fzf | 21:17 | 73 s |150+| `cobra` | https://github.com/spf13/cobra | `main` | 1,106 | 0, then 29 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/spf13/cobra | 21:18 | 36 s |151+| `gin` | https://github.com/gin-gonic/gin | `master` | 2,023 + 1 | 0, then 38 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/gin-gonic/gin | 21:18 | 56 s |152+| `requests` | https://github.com/psf/requests | `main` | 6,495 | 0, then 162 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/psf/requests | 21:19 | 69 s |153+| `flask` | https://github.com/pallets/flask | `main` | 5,562 | 0, then 69 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pallets/flask | 21:20 | 67 s |154+| `httpx` | https://github.com/encode/httpx | `master` | 1,523 | 0, then 88 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/encode/httpx | 21:22 | 52 s |155+| `typer` | https://github.com/fastapi/typer | `master` | 1,781 | 0, then 86 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/fastapi/typer | 21:22 | 54 s |156+| `jinja` | https://github.com/pallets/jinja | `main` | 2,949 | 0, then 55 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pallets/jinja | 21:23 | 58 s |157+| `lua` | https://github.com/lua/lua | `master` | 5,861 | 0, then 60 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/lua/lua | 21:24 | 102 s |158+| `jq` | https://github.com/jqlang/jq | `master` | 1,963 | 0, then 19 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/jqlang/jq | 21:26 | 51 s |159+| `kilo` | https://github.com/antirez/kilo | `master` | 20 | none at the source | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/antirez/kilo | 21:27 | 22 s |160+| `sinatra` | https://github.com/sinatra/sinatra | `main` | 4,684 | 0, then 158 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sinatra/sinatra | 21:27 | 71 s |161+| `nvm` | https://github.com/nvm-sh/nvm | `master` | 2,448 + 1 | 0, then 107 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/nvm-sh/nvm | 21:28 | 69 s |162+163+From `apps/web`, `WEB_URL=https://web-dev-oscabriel.oscargabriel.workers.dev bun run e2e -- imports.e2e.ts` passes 73 of 73: eight pages per project (home with the README and clone box, a nested folder, a file at `#L5`, the log, the newest commit, refs, people, why), each repo's own checks, and the timed first views. The first view of `why` and of a path's log took 64 to 81 s before `73adbab` and `a29af4e` (history read sixteen commits and versions at a time) and 14 to 28 s after them; see issue 915's comments.164+165+The thirty well-known imports after `fuzzel` went in on 2026-10-10 between 20:57 and 21:29 UTC (issue 1331), one at a time, by `bunx varlock run --path infra/ -- bun --env-file=<dev secrets file> scripts/import-examples.ts --stage dev-oscabriel --only <p> --tags`, each warmed by the script (five pages read; axum three). Every source with tags had them backfilled; `kilo` has none at the source. Commits are the source branch's at its imported head (`git rev-list --count`), plus one where the policy evaluated; "Policy" is read as whether `main` stands on a platform commit above the source's head. `bun infra/teardown.ts --stage dev-oscabriel` (read-only) then listed 76 kept import lines, every project and repo of the 38, and selected none of them. Since 2026-10-11 each import's page names its source and branch under "Imported from" (ADR 0031), backfilled by `--sources`.166+167+From `apps/web`, `WEB_URL=https://web-dev-oscabriel.oscargabriel.workers.dev bun run e2e -- imports.e2e.ts landing.e2e.ts` passed 225 of 226 once its stale checks were brought up to the pages (the clone step is the facts' "Take part", the people rows are list items, the why page has no "Why each line is there" line, and gum's newest commit is an empty version bump) and the `net::ERR_NETWORK_CHANGED` tests were asked again. The one failure was `axum`'s home: its root `README.md` is a symlink to `axum/README.md`, and the home showed only a regular file as the README. 1317 reads a README symlink where it points, inside the repo, and after its deploy all 226 pass.168+169+**Not listed:** a project enters the front page's `projects` table on its first event, and before 1316 an import whose policy never evaluates had none. Since 1316 an adoption is heard as a landing, so every later import is listed; these 17 were adopted before it and stay unlisted until something happens in them (a teardown cannot free their names: each project's Durable Object stays). So 17 of the 38 (`gum`, `click`, `awesome`, `stb`, `fuzzel`, `ripgrep`, `hyperfine`, `cobra`, `requests`, `flask`, `httpx`, `typer`, `jinja`, `lua`, `jq`, `kilo`, `sinatra`) answer at their own addresses but are missing from `listProjects`, the platform's `/`, the landing and `/asks`; and `import-examples` without `--only` takes them for new imports.170+171+`demo` has no throwaways: `projects-demo` holds `datekit` and `burrow`, and since 2026-10-11 the 38 kept imports (114 ledger lines: a project, a repo and a `tags backfilled` note each), and `layers-demo` holds `datekit--maintainers`. Nothing that makes throwaways is meant to run there before the take: the core-loop smoke and the swarm's rehearsals run on the dev stage, the swarm on a `seed --as` copy. The take's swarm on demo's `burrow` will record its claim forks in the ledger; teardown never selects them (section 4).172+173+## 4. Teardown policy174+175+- This build deletes only throwaway resources recorded in `infra/created.jsonl` that it no longer needs.176+- It never deletes a stage's Workers, namespaces, D1, KV or R2 without the user.177+- It never touches `witness`.178+179+No agent deletes a Cloudflare resource itself. Teardown first prints its plan: the ledger's entries that still exist, minus every stage's own names and `witness`. The deletes in that plan, together with the pre-ledger leftovers in section 3 that still exist, are written into one script that the user reads and then runs in their own terminal. A stage itself is torn down only by hand, by the user, as [Tear down a stage](#tear-down-a-stage) says.180+181+### The teardown tool182+183+```sh184+bunx varlock run --path infra/ -- bun infra/teardown.ts # print the plan185+bunx varlock run --path infra/ -- bun infra/teardown.ts --apply # delete exactly that plan186+bunx varlock run --path infra/ -- bun infra/teardown.ts --keep burrow-805 --stage dev-oscabriel187+```188+189+It reads the ledger, asks the account which of its repos and namespaces still exist (with the infra token, one name at a time), and prints the plan: what it would delete, what is already gone, and what the ledger holds but no plan may select. Without `--stage` it covers every declared stage the ledger names. `--keep <project>` leaves a `seed --as` copy's repo and every `<project>--…` fork out of the plan. Only `--apply` deletes, repos first and newest first, so a fork goes before what it forks, and a namespace last, since Artifacts deletes only an empty one. Repos go through `@repo/artifacts`' REST adapter. Each one deleted gets its `deleted` line at once, so a run that stops partway is finished by running it again. While `infra/.recording` exists, `--apply` is refused with `RecordingInProgress` before anything is read.190+191+No plan ever holds:192+193+- a name the ledger doesn't hold, whatever it is called;194+- either Artifacts namespace of any declared stage (`projects-<s>`, `layers-<s>`), or anything in `witness`, which is never even read;195+- the seeded examples `datekit`, `datekit--maintainers` and `burrow`, or any fork of `datekit` or `burrow`, and the imports on either stage. A claim made on demo's `burrow` during the take is recorded in the ledger and has to outlive teardown;196+- a Worker, a D1 database, a KV namespace or an R2 bucket. Those are not Artifacts, so no listing names them;197+- a project's Durable Object or front-page row. A project entry stays, and the plan says so.198+199+### The teardown record200+201+| When (UTC) | What |202+| --- | --- |203+| 2026-10-08 18:00 | `bun infra/teardown.ts` printed the plan for `dev-oscabriel`: **52 repos to delete**. These are all of the ledger's repos except `burrow--drop-legacy-fetch-burrow-auth--wren`, a fork of the stage's `burrow` that is never selectable. 50 are in `projects-dev-oscabriel`: nine smoke runs' repos and forks, `burrow-lint-807`, `burrow-803`, `datekit-803`, `burrow-swarm-1`, `burrow-swarm-2`, `burrow-805` and `datekit-805`, each with its claim forks. 2 are in `layers-dev-oscabriel`: `datekit-803--maintainers` and `datekit-805--maintainers`. The 16 projects' Durable Objects and front-page rows stay. Nothing was deleted. |204+| 2026-10-08 18:00 | The build's agent wrote the user's teardown script. It runs the plan with `--apply`. It also deletes the 19 pre-ledger test repos in section 3, wren's fork of `burrow` (only while dev's web still shows that ask open and unclaimed), `S8B_PROBE`, the two test accounts and their three OAuth grants. Each one is checked again just before its delete. The script refuses to run while `infra/.recording` exists. |205+| when the user runs it | The ledger's `deleted` lines record each repo the tool deleted, and when. Commit `infra/created.jsonl` afterwards. |206+| 2026-10-11 02:31 to 02:33 | Run, on the user's approval ("do the next steps you marked as for me yourself, they're approved"). The plan printed first listed **63 repos to delete** in `projects-dev-oscabriel` (the ledger's throwaways, grown since 2026-10-08 by the smoke runs of 914, 1009, W12 and the exit-codes deploy) and kept every import (38 projects, 38 repos) and `burrow--drop-legacy-fetch-burrow-auth--wren`; `--apply` deleted 63 of 63, each marked `deleted` in the ledger, and a plan printed after it lists nothing to delete. The 22 throwaway projects' Durable Objects and front-page rows stay, as the policy says. The pre-ledger leftovers in section 3, the test accounts and the grants were not touched: they are outside the ledger, and the user's own script holds them. |207+208+Kept, and why:209+210+- **The demo stage, whole.** It holds the recording and the submission.211+- **The dev stage's own resources** (section 2) and its seeded `datekit` (with `datekit--maintainers`) and `burrow`. The user decides whether to tear the stage down after submission.212+- **Dev's forks of datekit.** `datekit--me--ines-v` is ines-v's working fork. `datekit--format-ordinal--bram` holds bram's landed answer and its verdict notes. `datekit--add-months-clamp--bram` belongs to a claim that is open again.213+- **Every project's Durable Object and front-page row.** They are harmless, and not billed at this size. A test project's row stays on dev's front page after its repo is gone.214+- **Finished `Answer` Workflow instances** on `platform-dev-oscabriel`. They are records, not resources.215+- **Any `--as` copy the user still wants.** Add `--keep <project>` to the script's two teardown lines.216+217+## 5. URLs218+219+The account's workers.dev subdomain is in `infra/workers-dev.json`. The demo's rows are filled in when it is deployed.220+221+| Stage | What | URL | State on 2026-10-08 |222+| --- | --- | --- | --- |223+| `dev-oscabriel` | platform | `https://platform-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/health` answers 200); the core loop passed live twice on the 14:51 deploy; the W9 build since 2026-10-09 (`ecc2107` at 07:12), whose `/` answers 200 with HTML, or Markdown for `Accept: text/markdown`; the W10 build since 2026-10-09 19:36 (`e90a730`) |224+| `dev-oscabriel` | web | `https://web-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/` answers 200); W9's code browser, why, people and proposal pages pass the deployed-web checks; the eight imports (`/github.com/dtolnay/anyhow`, `/github.com/sindresorhus/ky`, `/github.com/charmbracelet/gum`, `/github.com/pallets/click`, `/github.com/sindresorhus/awesome`, `/github.com/changesets/changesets`, `/github.com/nothings/stb`, `/codeberg.org/dnkl/fuzzel`) pass `imports.e2e.ts` |225+| `dev-oscabriel` | CLI install | `https://platform-dev-oscabriel.oscargabriel.workers.dev/install.sh` | served from `releases-dev-oscabriel` |226+| `dev-oscabriel` | Google redirect URI (H4) | `https://platform-dev-oscabriel.oscargabriel.workers.dev/oauth/google/callback` | not registered |227+| `dev-oscabriel` | sandbox | none: it has no workers.dev route, and only the platform reaches it | deployed; the Checker's containers start on `standard-3` (2 vCPU, 8 GiB), the Lander's on `standard-2` |228+| `demo` | platform | `https://platform-demo.oscargabriel.workers.dev` | deployed 2026-10-08 15:39 (`/health` answers 200), and smoke passed; seeded with `datekit` and `burrow`. An anonymous `git clone <platform>/datekit.git` works, and a contributor's token gets 403 on `datekit--maintainers.git`. Redeployed with the W9 build on 2026-10-09 07:22 (`1a7bb89`); `/` answers 200. |229+| `demo` | web | `https://web-demo.oscargabriel.workers.dev` | deployed (`/` answers 200); the Playwright check of the deployed web passes; after the W9 deploy, 11 of 12 (all but why, which needs an answer landing demo has not got); after the W10 deploy (2026-10-09 19:50, `34f8ec8`), 13 of 13, why included |230+| `demo` | CLI install | `https://platform-demo.oscargabriel.workers.dev/install.sh` | served from `releases-demo`: release `0.1.0-demo.802` (`bun run release -- --build --upload --stage demo --version 0.1.0-demo.802`, 2026-10-08 15:51), which installs and reads the demo |231+| `demo` | Google redirect URI (H4) | `https://platform-demo.oscargabriel.workers.dev/oauth/google/callback` | not registered; the demo's deploy printed it |232+| `demo` | sandbox | none: it has no workers.dev route | deployed; the Checker's containers start on `standard-3` (2 vCPU, 8 GiB), the Lander's on `standard-2` |233+234+## Running a stage235+236+### Before the first run237+238+1. **Log Wrangler in**, once per machine: `apps/platform/node_modules/.bin/wrangler login`. Deploys and the D1, KV and R2 creates use this login, never the infra token. Once the login is stale, `wrangler d1 list` fails with `Authentication error [code: 10000]`, and `wrangler whoami` refreshes it.239+2. **Set the infra credentials**, `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN`, as `infra/.env.schema` describes. The token uses the "Read all resources" template plus Account › Artifacts › Edit. `bun run bootstrap` and `bun run ops` get them through `varlock run --path infra/`. To check they are set without seeing them, run `bun run env:check`.240+3. **Confirm the plan**: Containers and Workflows need Workers Paid (H6, confirmed on this account: see [the human steps](#human-steps-status-and-next-action)).241+242+### Bootstrap a stage243+244+```sh245+bun run bootstrap -- --stage dev-oscabriel246+```247+248+It refuses a stage that `stages.ts` doesn't declare. Then it:249+250+1. reads what exists: the stage's two Artifacts namespaces (`projects-<s>` and `layers-<s>`) over REST, and the account's D1 databases, KV namespaces and R2 buckets through Wrangler;251+2. creates only what is missing, so a second run creates nothing;252+3. writes the new D1 and KV ids into the stage's block of `apps/platform/wrangler.jsonc`, touching nothing else in the file (commit that change);253+4. applies the front page's migrations (`wrangler d1 migrations apply front-page-<s> --remote --env <s>`);254+5. records the account's workers.dev subdomain in `infra/workers-dev.json`, so smoke knows where the stage lives;255+6. checks by name that the platform Worker holds every secret its `.env.schema` requires. Before the platform exists there is nothing to hold them, so it says which ones the first deploy has to carry.256+257+It never deletes anything and never prints or reads a secret's value.258+259+`bun run bootstrap -- --stage <s> --dry-run` does only the first step and lists what the run would create. It creates nothing and writes no file. On a stage that is complete it prints `would create 0`.260+261+### Secrets262+263+`apps/platform/.env.schema` names them. Values never go in the repo.264+265+| Name | Needed |266+| --- | --- |267+| `OPERATOR_TOKEN` | Always. The operator's bearer token, at least 32 characters. |268+| `SESSION_TOKENS` | Optional. A JSON object from token to handle, for the demo's named people (the seed's deciders, the on-screen people and the swarm's contributors). |269+| `COOKIE_KEY` | Always. Seals a sign-in in progress into its form (HMAC-SHA-256), at least 32 characters. |270+| `PASSWORD_PEPPER` | Always. Every password is HMAC'd with it before PBKDF2, at least 32 characters. Changing it makes every stored password fail to verify. |271+| `MASTER_KEY` | Always. 64 hex characters: the 256-bit key that wraps every write-only env value. Losing it loses every stored value, so keep a copy outside the machine. |272+273+To set them for a stage, do one of these:274+275+- **A generated secrets file (both stages).** Keep a dotenv file for the stage outside the repo with mode 600, holding crypto-random values (32 bytes in base64url each, and `MASTER_KEY` as 64 hex characters). Deploy with `STAGE_SECRETS_FILE=<that file> bun run deploy -- --stage <s>`. The platform's deploy step gets only the names `.env.schema` declares, as its environment, and that environment overrides any `.env` value. Nothing prints them. `dev-oscabriel` has used one since its first deploy. `demo` has had one since 2026-10-08, by a recorded decision made under the user's blanket approval, and the same values were set on `platform-demo` with `wrangler secret put` before its first deploy. Both stages' values were generated by the build's agent, so rotate them before the repo goes public (H5 in [the human steps](#human-steps-status-and-next-action)).276+- **varlock (H5).** Write `NAME=varlock(prompt)` for each one into `apps/platform/.env.local`, run `./node_modules/.bin/varlock load --path apps/platform/` in your own terminal, then deploy. `varlock-wrangler` hands the values to the Worker.277+- **By hand**, one at a time: `apps/platform/node_modules/.bin/wrangler secret put <NAME> --env <s>` in `apps/platform`, with the value on stdin. On a stage whose platform isn't deployed yet, this makes `platform-<s>` as an empty placeholder Worker that the first deploy replaces. A deploy still needs the values through one of the two ways above, since varlock-wrangler resolves every required name.278+279+Sign-in uses the platform's own accounts (handle and password), so no stage needs a third-party OAuth app. A stage's platform lives at `https://platform-<s>.<subdomain>.workers.dev`; the subdomain is in `infra/workers-dev.json` once bootstrap has run.280+281+### Deploy a stage282+283+```sh284+bun run deploy -- --stage dev-oscabriel285+```286+287+Without `--stage`, or with a stage `stages.ts` doesn't declare, it refuses before it runs anything. It takes no other flag, and `verify` always runs first (AGENTS.md principle 11). In order, it runs:288+289+1. `bun run verify`. If the gate is red, nothing after it runs.290+2. The `sandbox` deploy (`wrangler deploy --env <s>`), first, because the platform's `SANDBOX` binding names it.291+3. The `platform` deploy (`varlock-wrangler deploy --env <s>`), which resolves `.env.schema` and sends the secrets.292+4. The `web` build and deploy.293+5. A read-back of the push-event trigger (`bun run bootstrap -- --stage <s> --check-triggers`), because Wrangler's output doesn't prove it exists.294+6. `bun scripts/smoke.ts --stage <s>`.295+296+Then it prints the redirect URI a Google OAuth client registers for the stage (`<platform origin>/oauth/google/callback`, H4). Google sign-in stays off until `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` are set, and `migrations/0003_identities.sql` must be applied before they are.297+298+Every command runs with `WRANGLER_SEND_METRICS=false`, and with its own folder's `node_modules/.bin` first on `PATH`, so each app deploys with its pinned Wrangler. The first failing step stops the deploy and names that step.299+300+A stage's first deploy can stop in the `sandbox` step with Wrangler's "Timed out while preparing the container image on Cloudflare's network." Before it uploads the Worker, Wrangler asks Cloudflare to prepare each image that is new to the stage's registry repository, and it waits at most 15 minutes. When it stops there, nothing of the Worker has been uploaded: run the same deploy again. The image is already pushed, and its preparation goes on at Cloudflare between runs.301+302+### Deploys of demo303+304+`demo` is deployed only with a reason written here first, and never during a take (H7).305+306+| When (UTC) | Build | Why |307+| --- | --- | --- |308+| 2026-10-08 15:39 | `c7b68ff`, the build that passed the core loop live on `dev-oscabriel` | The first deploy. It took three runs: twice (15:04 to 15:19 and 15:20 to 15:35) Cloudflare kept the new `sandbox-demo-lander-land` image's preparation pending past Wrangler's limit, though the same digest had been prepared for `dev-oscabriel` in about 30 s; the third run found it ready. |309+| 2026-10-09 07:18 and 07:22 (914) | `ecc2107`, then `1a7bb89` (the same Worker code; only smoke's `platform-root` patience changed) | The W9 build (the platform's `/` page, the code browser, why, people, drafted asks): the user approved W9 after the build closed, `infra/.recording` was absent, and `dev-oscabriel` passed smoke, the deployed-web checks and `smoke --loop --draft` on this Worker code first. The first run's smoke failed `platform-root` on a 404 the W8 version gave as the upload finished; the second passed 8 of 8. Nothing is seeded, drafted, claimed or imported on demo; burrow's children were checked unclaimed before and after. |310+| 2026-10-09 19:50 (1009) | `34f8ec8` (the Worker code of `e90a730`), the W10 build | The W10 build, at the user's request ("fix all of those, then redeploy demo"): an opening's landing now links the ask it opened, so why on demo's datekit and burrow names an ask; why and a file's log are kept by commit in the new `code-cache-demo` bucket and walk a small file by reading it whole (fast cold, under a second warm); the people page says why a policy has not evaluated; the home page's README comes with the server's render; tags list by package; footnote links jump; the drafting fixes (a draft keeps its note and an earlier ready draft; the proposal pages' signed-out and unread states). `infra/.recording` was absent, and `dev-oscabriel` passed smoke, `smoke --loop` and the deployed-web checks on this Worker code first. Bootstrap adds one empty bucket; nothing is seeded, drafted, claimed, imported or landed on demo. |311+| 2026-10-09 20:16 (1099) | `4a23695` (the Worker code of `2587726`), the wave's last fold-ins | The user's request ("fix all of those, then redeploy demo") once the wave's leftovers were fixed, and what demo shows changed: an opening is now heard as a landing (the project page's landings list shows new openings, code views refresh live when an ask opens), the log and commit pages link an opening's ask, a why row no longer says "Open ask" twice, and the CLI writes decider globs as code. `infra/.recording` was absent, and `dev-oscabriel` passed smoke 8 of 8 and the deployed-web checks (datekit 13 of 13, burrow 13 of 13) on this Worker code first (20:13-20:15 UTC). No bootstrap step; nothing is seeded, drafted, claimed, imported or landed on demo. Deployed 20:16:30-20:18:19 (verify again; platform startup 105 ms, web 13 ms), smoke 8 of 8; the deployed-web checks a minute later: datekit 13 of 13 (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and burrow 13 of 13 (`WEB_PROJECT=burrow` alone), why included on both. `listProjects` and `listAsks` for both read the same before and after, every ask unclaimed. |312+| 2026-10-10 about 01:17 (W11) | `ca95612`, the W11 build with the banner fix | At the user's request ("yes", asked whether to deploy W11 to demo after dev passed). What demo shows changed: datekit's posture badge reads "Open with sealed evidence" everywhere (D1), the Agents page and its nav entry, `/llms-full.txt` and the index banner under each Markdown title, the answer page's links to its base and landing commits, clearer refusal words (a limit's refusal names its kind and its wait), code reads on MCP, and a fork that takes branches only. `infra/.recording` was absent, and `dev-oscabriel` had passed smoke and the deployed-web checks on the same build. This row was written just after the deploy, not before it. |313+| 2026-10-10 about 11:40 (W12) | `7b8b393`, the W12 build with the review fixes | At the user's request ("you deploy everything", their answer to who deploys W12). What demo shows changes throughout: every page sits in the Control room shell (rail, main pane, facts inspector; a bottom bar on phones), the front page and a project's home arrive server-rendered with families drawn as fans and posture once per project, the ask and answer pages lead with state and whose move, Today has sections and every choice its consequence, the code browser is a full-viewport app, the person page sets credit in words, For agents is one reference, and the platform's own sign-in and `/` pages share the web's tokens. `/` and `/<project>` answer Markdown to agents. Bootstrap first applies migration `0005_standing_postures.sql` (the kept postures behind project lists). `infra/.recording` was absent, and `dev-oscabriel` had passed smoke, `smoke --loop` and the deployed-web checks (13 of 13 on datekit and on burrow) on the same build. Nothing is seeded, drafted, claimed, imported or landed on demo. |314+| 2026-10-10 (W12 perf) | `5881ff2`, the W12 performance sign-offs | At the user's request ("Yes, do it, and all recommended steps", their sign-off on 1297's items). What demo shows changes in speed, not in words: the web's server build is minified (JavaScript 4.07 MB to 2.77 MB with highlighting, entry 696 KB to 309 KB) with its source maps uploaded; Workers Cache keeps the web's anonymous pages at the edge (a request with any cookie or an `Authorization` is never served or stored from it, ADR 0026); a blob page's file and a commit page's first files arrive highlighted from the server in a fixed set of languages (ADR 0027). `infra/.recording` was absent, and `dev-oscabriel` passed smoke 11 of 11, the deployed-web checks (13 of 13 on datekit and on burrow), a cache MISS then HIT at 60 to 120 ms with `vary: Cookie`, BYPASS with a cookie and on `/today`, and server-highlighted HTML on a blob page, on the same build. No bootstrap step; nothing is seeded, drafted, claimed, imported or landed on demo. |315+| 2026-10-10 (W13, 1332) | `643ab22`, the W13 build: group A, 1331's import check, 1316 and 1317 | At the user's request ("do all recommended next steps",, which named this deploy; the build plan approves a W13 deploy of demo ahead of time) once `dev-oscabriel` passed smoke and the imports and landing checks on the same code. What demo shows changes at its addresses: `/` is now the landing (what the platform is, the open asks first, the gate's refusal as git prints it, the projects), the front page moves to `/asks`, `/home` is a signed-in person's own page, a short command's words stay whole, and a project's adoption is heard as a landing. The shot list's `/` shots move to `/asks` before the take (1399). Nothing is imported, seeded, drafted, claimed or landed on demo; its `datekit` and `burrow` are only read. |316+| 2026-10-11 (W13 close-out, 1332) | `99a517b` (the Worker code of `f224a14`): the landing's projects read on the server with each posture's badge, and an import's source kept on its record and shown on its page (ADR 0031) | At the user's request ("do the next steps you marked as for me yourself, they're approved": the demo deploy, the 38 imports onto demo and dev's teardown were the three held). What demo shows changes: `/` names its projects in the HTML as sent, each with its posture badge, and a project page shows "Imported from" for an import. The deploy comes first because the imports that follow it keep their source only on a platform that holds this code. `infra/.recording` is absent, and `dev-oscabriel` passed `verify`, smoke 11 of 11 and the source backfill of all 38 imports on the same code. No bootstrap step. After it, `scripts/import-examples.ts --stage demo --sources` imports the 38 open-source repos onto demo, kept as on dev, the first imports demo has had; nothing is seeded, drafted, claimed or landed. This row is written before the deploy. Deployed at about 02:36 UTC, smoke 11 of 11; the imports followed, 02:37 to 03:16 UTC. |317+| 2026-10-12 (W14, 1432) | `e77e5bb`, the W14 build: owner namespaces (ADR 0032), the web import and the host-path offer (ADR 0033), the design draws (1501 to 1509) and the handler fix proved on `dev-oscabriel` | At the user's request: asked whether the take was done and whether to deploy demo now, they answered "do it" (2026-10-12). `infra/.recording` was absent, and `dev-oscabriel` passed `verify`, smoke 11 of 11 and the deployed-web checks 15 of 15 on this Worker code, with a web import made there. What demo shows changes at its addresses: every project is named `<owner>/<name>` (`/oscabriel/datekit`, `/github.com/pallets/click`); every address the shot list records (`/datekit`, `/click`, `--project datekit`, `<platform>/datekit.git`) keeps working, the web's by a 301 to the full form and the gateway's as an alias; `/import` and the offer at a source namespace's address nobody has imported are new. Nothing is imported, seeded, drafted or claimed by the deploy. |318+319+### Smoke-test a stage320+321+```sh322+bun run smoke -- --stage dev-oscabriel323+bun run smoke -- --stage dev-oscabriel --url http://localhost:8787324+```325+326+The second form points smoke at another origin, such as `wrangler dev --env dev-oscabriel` in `apps/platform`. Plain `wrangler dev` serves stage `local`, which no `--stage` names, so its `health` probe fails. Smoke finds the stage's web at `https://web-<s>.<subdomain>.workers.dev`; with `--url` it probes a web only when `--web-url <origin>` names one.327+328+Smoke only reads, from the platform and then the web. Every probe runs even when others fail, and the output names each probe that failed and why. It also prints how long each probe took. A probe the platform answers with its own failure (a 5xx, or an RPC defect) asks again every second for up to 30 s, since a fresh deploy gives those for its first seconds (seen on `dev-oscabriel`'s first deploy). So does a 404 from the web's two probes and from `platform-root`: a first deploy's hostname, or the version before a deploy that adds a route, answers 404 for a moment (seen on demo's W9 deploy). Any other wrong answer fails the probe at once.329+330+| Probe | Passes when |331+| --- | --- |332+| `health` | `GET /health` answers `200 {"ok":true,"stage":"<s>"}`, naming the stage asked for |333+| `oauth-metadata` | `GET /.well-known/oauth-protected-resource` answers 200 with JSON that names its `resource` |334+| `mcp-needs-credential` | `POST /mcp` without a credential answers 401 |335+| `anonymous-unknown-project` | an anonymous `/rpc` `listAsks` for `no-such-project` answers with a typed `UnknownProject` |336+| `missing-repo-404` | `GET /no-such-project.git/info/refs?service=git-upload-pack` answers 404 |337+| `platform-root` | the platform's `GET /` answers 200 with a page that names its MCP endpoint (`/mcp`) and the CLI's `install.sh` |338+| `web-front-page` | the web's `GET /` answers 200 with HTML |339+| `web-llms-txt` | the web's `GET /llms.txt` answers 200 with Markdown that opens with its title; the web builds it from the platform's project list, so it passes only when the web reaches the platform through its service binding |340+341+### Tear down a stage342+343+None of this is automated, and it is the user's alone (section 4): no script deletes a stage's resources, and nobody runs `wrangler delete` or cf's `delete` without the user's OK (`wrangler delete` auto-confirms in a non-interactive shell). Tear down only what this build created, which means only names from section 2, and never `witness`. A person runs these in their own terminal. Wrangler's commands run from the app's folder with that app's `node_modules/.bin/wrangler`.344+345+1. The Workers: `wrangler delete --env <s>` in `apps/web`, then `apps/platform`, then `apps/sandbox`. Then `wrangler workflows delete answer-<s>` and `wrangler workflows delete on-push-<s>`, if they remain.346+2. The Artifacts repos, then the namespaces, `projects-<s>` and `layers-<s>` alike. List a namespace's repos with `bun run ops -- artifacts namespaces repos list --namespace <namespace>`, delete each one with `bun run ops -- artifacts namespaces repos delete <repo> --namespace <namespace> --force`, then `bun run ops -- artifacts namespaces delete --namespace <namespace>`. A namespace has to be empty before it can be deleted.347+3. The database: `wrangler d1 delete front-page-<s>`.348+4. The KV namespace: `wrangler kv namespace delete --namespace-id <id>`. The id is in the stage's block of `apps/platform/wrangler.jsonc`.349+5. The buckets: empty `evidence-<s>` and `releases-<s>`, then run `wrangler r2 bucket delete evidence-<s>` and `wrangler r2 bucket delete releases-<s>`.350+6. Put the stage's placeholder ids back in `apps/platform/wrangler.jsonc`.351+352+## Human steps: status and next action353+354+Only a person can take these steps. No agent buys or registers anything, pushes, adds a git remote, publishes to npm, reads the closed env files or deletes a Cloudflare resource. The status is as of 2026-10-08, 18:30 UTC. "Agent" means the build's agent.355+356+| Step | Status | What the agent prepared | Your exact next action |357+| --- | --- | --- | --- |358+| H1: a custom domain | Not done, and optional. Both stages live on workers.dev. | Nothing needs it. | Only if you want one: buy the domain, which is a purchase and yours to make, then ask the agent. It adds `routes` to each `wrangler.jsonc` and deploys `demo` outside a take, with the reason in [Deploys of demo](#deploys-of-demo). |359+| H2: the npm org, and publishing the CLI | Open, and optional for the submission: both stages already serve the CLI from their own install line ([section 5](#5-urls)). | `bun run release -- --build` stages the package `@myr/cli` in `apps/cli/release/npm/`. Under an agent, `--publish` checks the staged package and prints the command without running it. Known before publishing: `--version` prints `0.0.0` in the built CLI, and the npm build cannot evaluate a TypeScript config folder on its own. | Create the npm org `myr` and run `npm login`. Then, from the repo root in your own terminal (not inside an agent session), run `bun run release -- --build --publish --version 0.1.0`. |360+| H3: the GitHub org and the public repo | Open, due before submission (Oct 14). | Every commit is on local `main`. No remote exists and nothing has been pushed. `bun run verify` passes on the last commit. | Rotate the generated secrets first (H5). Create the org `getmyr` and an empty public repo `getmyr/myr`, then run `git remote add origin https://github.com/getmyr/myr.git` and `git push -u origin main`. |361+| H4: a Google OAuth client | Not done, and optional. Sign-in works with platform accounts (a handle and a password). | Migrations `0003_identities.sql` and later are applied on both stages. Each deploy printed its redirect URI: `https://platform-demo.oscargabriel.workers.dev/oauth/google/callback` and `https://platform-dev-oscabriel.oscargabriel.workers.dev/oauth/google/callback`. | Only if you want "Continue with Google": create a Web client in the Google Cloud console with the stage's redirect URI above, exactly as printed. Add `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` together to the stage's secrets ([Secrets](#secrets)), then deploy the stage outside a take. |362+| H5: secret values | Done by the agent on both stages, under a recorded decision that extends generated secrets to `demo` ([Secrets](#secrets)). No secret is missing. `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` are optional and come only with H4. | Five values per stage (`OPERATOR_TOKEN`, `SESSION_TOKENS`, `COOKIE_KEY`, `PASSWORD_PEPPER`, `MASTER_KEY`). Each was generated and is kept only in that stage's secrets file, outside the repo with mode 600, and was never printed or committed. `SESSION_TOKENS` on `demo` holds bram, ines-v, okafor, okonkwo, lin-h and the swarm's six (wren, tamsin, ivo, marisol, dagny, pell). | **After the last take and before the repo goes public (H3), rotate both stages' generated secrets.** Write new values into each stage's secrets file, then run `STAGE_SECRETS_FILE=<that file> bun run deploy -- --stage <s>`, outside a take. Keep a copy of each `MASTER_KEY` off this machine. Rotating `PASSWORD_PEPPER` breaks every stored password, and rotating `MASTER_KEY` loses every stored env value, so set demo's `SENTRY_AUTH_TOKEN` again with `env set`. Rotating `SESSION_TOKENS` means each CLI profile logs in again. |363+| H6: Workers Paid | Confirmed. | The account's subscriptions, read again on 2026-10-08, list `workers_paid` and `r2_paid` as Paid. Containers and both Workflows run on both stages. | Nothing. |364+| H7: the recording | Open. `demo` is deployed, seeded and smoke-clean, with nothing claimed, and every shot was walked once on 2026-10-08. | `.agents/demo/` holds the script, the shot list and the rehearsal checklist, with each failed shot's fallback. While `infra/.recording` exists, `infra/deploy.ts` refuses every deploy and teardown's `--apply` refuses to run. | Walk the pre-flight in `.agents/demo/rehearsal.md` on the morning of the take. Run `bun infra/recording.ts on` before the first take and `bun infra/recording.ts off` after the last. Any fix you want shown first (for example datekit's "Open" badge on the front page, or a seeded person signing in on the web) is a code change and a `demo` deploy, which must happen before you turn the lock on. |365+| H8: submitting | Open, due Oct 14 by noon PDT (the form closes at 11:59 PM PDT). | The demo URL is `https://web-demo.oscargabriel.workers.dev` ([section 5](#5-urls)). | Submit the form with the repo URL (after H3), the video (H7) and the demo URL. Optionally, reply once to @zeke's call for entries. |366+| H9: `docker login` | Not needed so far. No image pull has been rate-limited on either stage. | Nothing. | Only if a deploy's image pull is rate-limited, run `docker login` in your own terminal and deploy again. |367+| Deleting the throwaways | Half done. The ledger's 63 throwaway repos on `dev-oscabriel` were deleted on 2026-10-11 ([The teardown record](#the-teardown-record)); the pre-ledger leftovers, the test accounts and the grants are still the user's script's. | `bun infra/teardown.ts` printed its plan (52 repos on `dev-oscabriel`, the same at 18:15 UTC). The user's teardown script runs it with `--apply`, then removes the leftovers from before the ledger that still exist, and skips any that are gone. | After the last take and before Oct 14, read the teardown script the build left for you and run it in your own terminal. Then commit `infra/created.jsonl`, which by then holds a `deleted` line for each repo removed. |368+| ChatGPT usage for the swarm's tamsin | Not blocking. The fallback was taken on 2026-10-08. | OpenCode's ChatGPT sign-in hit its usage limit during the swarm's rehearsal, and it resets on Oct 16, after the deadline. The roster runs tamsin on `opencode-go/gpt-6-luna` (OpenCode Go). | Nothing. To show `openai/gpt-5.5` in the take instead, raise the ChatGPT plan's limit (a purchase, yours) and change tamsin's line in `scripts/lib/swarm/roster.ts` back. Before the take, check OpenCode Go's and Amp's usage headroom: a six-agent run used about 3.2M input tokens on OpenCode Go. |369+| OpenCode Zen key for the swarm's pell | Not blocking. The fallback was taken on 2026-10-08. | pi here has no OpenCode Zen key, so the roster runs pell on `opencode-go/qwen3.8-flash`, as in the swarm's rehearsal. | Nothing. To show Gemini flash in the take instead, add OpenCode Zen's key to pi and change pell's line in `scripts/lib/swarm/roster.ts` back. |added:.agents/scratch/TEMPLATE.md+29 added
1+# NN: <the want, in a few words>2+3+Status: needs-triage4+Blocked by: none5+6+## Want7+8+<One behavioural change, said from the user's side.>9+10+## Territory11+12+<The workspace packages this may change, such as `packages/protocol`.>13+14+## Check15+16+<The command that fails on main now and passes once the want is met. It fails by an assertion, not a load error. Or `No check yet:` and the reason.>17+18+```sh19+bun test packages/<package>/test/<file>.test.ts20+```21+22+## Done when23+24+- [ ] The check passes.25+- [ ] `bun run verify` passes.26+27+## Anti-jobs28+29+- <What this must not do, even when nearby code invites it.>added:.agents/workflow/domain.md+34 added
1+# Domain Docs2+3+How the engineering skills should consume this repo's domain documentation when exploring the codebase. This repo is single-context: the product has one vocabulary.4+5+## Before exploring, read these6+7+- **`GLOSSARY.md`** at the repo root.8+- **`.agents/adr/`**: read ADRs that touch the area you're about to work in.9+10+If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.11+12+## File structure13+14+```15+/16+├── GLOSSARY.md17+├── .agents/adr/18+│ ├── 0001-bun-workspaces-and-turborepo.md19+│ └── 0002-wrangler-deploys-every-worker.md20+├── apps/21+└── packages/22+```23+24+## Use the glossary's vocabulary25+26+When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `GLOSSARY.md`. Don't drift to synonyms the glossary explicitly avoids.27+28+If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).29+30+## Flag ADR conflicts31+32+If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:33+34+> _Contradicts ADR-0007 (the visibility boundary is the repo boundary), but worth reopening because…_added:.agents/workflow/issue-tracker.md+47 added
1+# Issue tracker: Local Markdown2+3+Issues and specs for this repo live as markdown files in `.agents/scratch/`.4+5+## Conventions6+7+- One feature per directory: `.agents/scratch/<feature-slug>/`8+- The spec is `.agents/scratch/<feature-slug>/spec.md`9+- Implementation issues are one file per ticket at `.agents/scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01`, never a single combined tickets file10+- Every issue file is an ask: copy `.agents/scratch/TEMPLATE.md` (see "Ask shape" below)11+- Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)12+- Comments and conversation history append to the bottom of the file under a `## Comments` heading13+14+## Ask shape15+16+Each issue is written as an ask (GLOSSARY.md: **Ask**), so this repo's own work tries the brief the product asks contributors to write. Copy `.agents/scratch/TEMPLATE.md`. Its fields:17+18+- **Status:** a triage role from `triage-labels.md`.19+- **Blocked by:** the numbers of the issues that must be resolved first, or `none`.20+- **Want:** one behavioural change, said from the user's side. Not a list of implementation steps.21+- **Territory:** the workspace packages the answer may change. Anything outside them is out of scope.22+- **Check:** the command that fails on main now and passes once the want is met. It fails by an assertion, not by a load error or a missing file. Confirm it is red before starting work. Where nothing can be red yet (day-0 docs and scaffold), write `No check yet:` and the reason; like a rule with no fence, that is debt.23+- **Done when:** the checklist that closes the issue. The check passing comes first and `bun run verify` passing comes last.24+- **Anti-jobs:** what this issue must not do, even when nearby code invites it.25+26+When a skill brings its own ticket template (for example `to-tickets`' "What to build" and acceptance criteria), write the ask shape instead: "What to build" becomes **Want**, and the acceptance criteria become **Done when**.27+28+After Oct 14 these files can move into the config folder's asks (GLOSSARY.md: **Config folder**).29+30+## When a skill says "publish to the issue tracker"31+32+Create a new file under `.agents/scratch/<feature-slug>/` (creating the directory if needed), starting from `.agents/scratch/TEMPLATE.md`.33+34+## When a skill says "fetch the relevant ticket"35+36+Read the file at the referenced path. The user will normally pass the path or the issue number directly.37+38+## Wayfinding operations39+40+Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.41+42+- **Map**: `.agents/scratch/<effort>/map.md` (the Notes / Decisions-so-far / Fog body).43+- **Child ticket**: `.agents/scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.44+- **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.45+- **Frontier**: scan `.agents/scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.46+- **Claim**: set `Status: claimed` and save before any work.47+- **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.added:.agents/workflow/triage-labels.md+15 added
1+# Triage Labels2+3+The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.4+5+| Label in mattpocock/skills | Label in our tracker | Meaning |6+| -------------------------- | -------------------- | ---------------------------------------- |7+| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |8+| `needs-info` | `needs-info` | Waiting on reporter for more information |9+| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |10+| `ready-for-human` | `ready-for-human` | Requires human implementation |11+| `wontfix` | `wontfix` | Will not be actioned |12+13+When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.14+15+Edit the right-hand column to match whatever vocabulary you actually use.added:.agents/README.md+9 added
1+# .agents2+3+The working record behind the build: how the repo was planned, decided and run. The product's own docs stay at the root (`README.md`, `AGENTS.md`, `GLOSSARY.md`, `PRODUCT.md`, `DESIGN.md`).4+5+- `adr/`: one numbered decision record per choice, with its status and why.6+- `workflow/`: how agents track issues, label them and read the domain docs.7+- `scratch/`: `TEMPLATE.md`, the ask every issue is written from. The issues themselves live in `scratch/build/`, which git ignores.8+- `ops/`: `stages.md`, every stage's resources, secrets and teardown.9+- `demo/`: the recording's script, shot list, swarm scenario and rehearsal checklist.deleted:.scratch/TEMPLATE.md-29 removed
1-# NN: <the want, in a few words>2-3-Status: needs-triage4-Blocked by: none5-6-## Want7-8-<One behavioural change, said from the user's side.>9-10-## Territory11-12-<The workspace packages this may change, such as `packages/protocol`.>13-14-## Check15-16-<The command that fails on main now and passes once the want is met. It fails by an assertion, not a load error. Or `No check yet:` and the reason.>17-18-```sh19-bun test packages/<package>/test/<file>.test.ts20-```21-22-## Done when23-24-- [ ] The check passes.25-- [ ] `bun run verify` passes.26-27-## Anti-jobs28-29-- <What this must not do, even when nearby code invites it.>deleted:docs/adr/0001-bun-workspaces-and-turborepo.md-22 removed
1----2-status: accepted3----4-5-# Bun workspaces and Turborepo, not pnpm6-7-The repo is a Bun workspace with a dependency catalog, and Turborepo runs its tasks. Bun is the maintainer's default, and `bun build --compile` turns the CLI into single binaries. Turborepo caches tasks and costs one file.8-9-## Considered Options10-11-- **pnpm.** The Effect team uses it, and Cloudflare's `cloudflare.config.ts` tooling does not support Bun. That second reason went away once Wrangler became the deploy tool (ADR 0002).12-- **Workspace scripts with no task runner.** Nothing would be cached, so every check reruns on every change.13-14-## Consequences15-16-We keep pnpm's supply-chain guarantees by configuration rather than by tool: `--frozen-lockfile` in CI and in acceptance runs, exact pins, a minimum release age, and `trustedDependencies` for install scripts.17-18-Rat Stack, which we port from (ADR 0013), says not to replace pnpm with Bun. That rule is about cold installs of Rat Stack's own template. The guarantees it protects are the ones kept above.19-20-## Amended (2026-10-08)21-22-There is no CI workflow and no acceptance script (ADR 0011's note). The lockfile guarantee is `bun run lockfile:check` (`bun install --frozen-lockfile --dry-run`), the first step of `bun run verify`. `bunfig.toml` keeps exact pins and a one-day minimum release age, and the root `package.json` names no `trustedDependencies`.deleted:docs/adr/0002-wrangler-deploys-every-worker.md-54 removed
1----2-status: accepted3----4-5-# Wrangler deploys every Worker during the competition; `cf` is an ops CLI; after the deadline, cf or Alchemy6-7-Until the competition closes on Oct 14, 2026, Wrangler deploys all three Workers (`platform`, `sandbox` and `web`). Cloudflare's `cf` CLI runs only read-mostly operations. After the deadline we move to cf or to Alchemy, whichever one's gate opens first. This departs from Cloudflare's own advice for new projects: "Prefer it over Wrangler … Wrangler is only for projects that already use it" ([cf launch post](https://blog.cloudflare.com/cloudflare-cf-cli-launch/)). We depart from it because neither alternative can yet declare what this platform deploys, and one deploy tool is safer in the recording week.8-9-## Considered Options10-11-- **Alchemy** (`2.0.0-beta.81`).12- - Released Alchemy cannot declare Durable Object-managed containers (`schedulingPolicy: "durable_object"`, which the Sandbox SDK 1.0 uses). Support is in open [PR #1905](https://github.com/alchemy-run/alchemy/pull/1905), so any Alchemy path today needs two tools.13- - Betas 79, 80 and 81 shipped on Sep 18, Oct 2 and Oct 5, and beta.80 had three breaking changes.14- - The Artifacts push trigger is not a reason either way. Whichever tool deploys, it is one REST call: `PUT /accounts/{account_id}/triggers/{script_name}` with a `cf.artifacts.repo.pushed` filter and a Workflow target.15-- **cf with `cloudflare.config.ts`** (cf `1.0.0-beta.12`, `@cloudflare/config` `0.23.0`).16- - The config's `Trigger` union has no events trigger, and `cf migrate` drops it: "Artifact event triggers are not supported by the new config and were not migrated."17- - cf hands container builds to Wrangler.18- - The config always writes `script_name` on a Durable Object binding, so the deploy refuses the sandbox's container DO bound from its own Worker: "You cannot configure a container on a Durable Object that is defined in another Worker."19- - Wrangler would still be needed for non-Vite bundling, `tail`, single secrets, the Workers vitest plugin and `varlock-wrangler`.20- - cf shipped beta.0 to beta.12 between Sep 25 and Oct 2, with open deploy bugs ([#192](https://github.com/cloudflare/cf/issues/192), #197, #72).21-22-## Consequences23-24-- `infra/bootstrap.ts` makes the events-trigger call idempotently and is the one place that checks it.25-- cf runs only as `bun run ops -- …`, pinned exactly, with telemetry off. A hook refuses its project commands (`dev`, `build`, `deploy`, `init`, `migrate`, `previews`), and any `delete` or `revoke` goes to the maintainer.26-- The README says in one line that Wrangler deploys the Workers and cf is the ops CLI, and why.27-28-## After the deadline29-30-**cf**, once `@cloudflare/config` gains an events trigger and the container `script_name` fix, or cf reaches GA:31-1. `cf migrate` each app.32-2. Write `exports` for the Durable Objects.33-3. Keep the trigger in `bootstrap.ts`.34-4. Remove the sandbox's self-bindings.35-5. Move web to `@cloudflare/vite-plugin@2`.36-6. Fence bindings with `InferEnv` over `defineWorker` references.37-7. Pass varlock values through `--secrets-file`.38-8. Set `DO_NOT_TRACK=1`.39-40-Watch cf #179, #180, #192, #197, #198 and #204.41-42-**Alchemy**, once #1905 merges (before then, the sandbox would deploy through `Command.Exec` running Wrangler):43-- **Async style:** plain `Cloudflare.Worker("X", { main, env })`, so Worker code stays tool-agnostic.44-- **The events trigger as an `Action`:** it GETs, diffs only the entries it owns, and PUTs only on a difference. An `Action` reruns only when its input changes, so the input carries a per-deploy revision. Destroy is `PUT []`.45-- **The binding fence:** `Cloudflare.InferEnv<typeof Platform>`, so deleting a binding is a type error.46-- **Config:** local state, telemetry off (`ALCHEMY_TELEMETRY_DISABLED=1`) and an exact pin.47-- **Frozen Durable Object names:** Alchemy deletes a removed Durable Object by default, so a rename is a delete and loses data. A test pins the class list.48-49-Watch [#1950](https://github.com/alchemy-run/alchemy/pull/1950) (an events-trigger resource) and [#1916](https://github.com/alchemy-run/alchemy/pull/1916) (Artifacts reads).50-51-## Amended (2026-10-08)52-53-- The push-event trigger is declared in `apps/platform/wrangler.jsonc` (`triggers.events`), and Wrangler deploys it with the platform. `infra/bootstrap.ts --check-triggers`, which `infra/deploy.ts` runs after the deploy, reads it back (`GET /triggers/platform-<stage>`) and compares; Artifacts adds a `script_name` to each target, which the comparison expects.54-- The hook that refused cf's project commands is gone (ADR 0011's note). The rule stands in AGENTS.md's Boundaries and is held by review: cf runs only as `bun run ops -- …`, and any `delete` or `revoke` goes to the maintainer. In a non-interactive shell `wrangler delete` answers its own prompt yes, and cf's deletes abort unless given `--force`.deleted:docs/adr/0003-rpcgroup-is-the-one-schema.md-34 removed
1----2-status: accepted3----4-5-# An Effect `RpcGroup` is the one schema6-7-`packages/protocol` defines every operation once, as an `Rpc` in an Effect `RpcGroup` with payload, success and error schemas plus annotations. Everything else is derived from it with `bun run gen`: server handlers, the web client, CLI commands, MCP tools, skills, JSON Schema and the refusal docs. We chose `RpcGroup` because:8-- the contract and handler split is native: the group is schemas only, and `group.toLayer(handlers)` implements it;9-- `stream` is native on `Rpc.make`, which serves the Project DO's live views;10-- `omit`, `merge` and `prefix` give each surface its own subset;11-- its annotations use the same keys Effect's MCP `Tool` reads.12-13-## Considered Options14-15-- **`HttpApi` → OpenAPI → Forge**, tried on Oct 6, 2026 and rejected for the window:16- 1. It loses streaming beyond SSE and loses refusal identity: refusals become per-status error classes, without a static `retryable`.17- 2. It has no MCP or skill target.18- 3. Its CLI generator is cf's own, and the commands it emits are bound to Cloudflare's auth.19- 4. Its SDK generator, Fern, rejects `_tag` discriminants when two or more tags share a status.20- 5. Nothing is on npm ([forge#6](https://github.com/cloudflare/forge/issues/6)).21- 6. It needs Docker and a 1.3 GB generator image.22-- **Rat Stack's `packages/capability` as the source**, with `RpcGroup` as one projection of it. It passes all 59 of its tests on our Effect pin, but it lacks native `stream` and subsets, and it would put borrowed code at the centre of the product. It is the fallback if the port below is not green by hour 2 of Oct 7.23-24-## Consequences25-26-- The CLI-flag and MCP-tool algorithms are ported from [Rat Stack](https://github.com/joelhooks/rat-stack) at `fba26d8` (MIT): `to-command.ts` l.20–207 and `to-toolkit.ts` l.59–94, about 220 lines, into `protocol/{cli,mcp}`. They are recorded in `PROVENANCE.md` (ADR 0013).27- - Amended (2026-10-07): that record is gone (ADR 0013's note); `protocol/{cli,mcp}` each carry Rat Stack's MIT notice in their own header.28-- Wire schemas use `Schema.Int` or `Schema.Finite`, never bare `Schema.Number`, and `Schema.optionalKey`, never `Schema.optional`. Effect's `Schema.toJsonSchemaDocument`, which `McpServer` uses for tool schemas, turns `Schema.Number` into an `anyOf` that admits the strings `"Infinity"`, `"-Infinity"` and `"NaN"`, and turns `Schema.optional(Schema.String)` into string-or-`null`.29-- Every `effect/rpc` API is marked `@stability unstable`, so each package that uses one allows it explicitly in `allowedUnstableApis`.30-- A public REST SDK, if one is wanted later, comes from an `HttpApi` projection of the `RpcGroup`, not from a second source.31-32-## Amended (2026-10-08)33-34-There is no `bun run gen` and no generated `skills/`, `plugins/` or `docs/reference/` (ADR 0011's note). Every surface still derives from the group, in code: the platform's handlers and the web's client from the contracts, the CLI's commands and the MCP tools through the ported projections in `protocol/{cli,mcp}`, and the CLI's command list as `commandDocs` in `@repo/agent-kit`, which the platform's skill, the CLI's MCP prompt and the web's `/llms.txt` all read. `packages/protocol/test/mcp.test.ts` holds every MCP tool's schemas free of JSON Schema leaks. The `capability` fallback was never needed: the port passed within its first quarter hour.deleted:docs/adr/0004-git-gateway-owns-custody.md-32 removed
1----2-status: accepted3----4-5-# A git gateway owns custody, and refusals arrive in git's own output6-7-Every git request goes through a gateway Worker that proxies git's smart HTTP protocol to Cloudflare Artifacts and holds every Artifacts token. Before it forwards a push, it reads the ref update commands and can refuse them with git's own `ng <ref> <reason>` lines, so a refusal shows up in the pusher's `git push` output with nothing installed. Holding custody in one place also gives us protected refs, claim-scoped tokens, anonymous public clones, push detection at the moment of the push, and reads limited by visibility (ADR 0007).8-9-## Considered Options10-11-- **Flag stray pushes afterwards and revert them.** This was the earlier design. It stays as a backstop: an Artifacts events trigger starts a Workflow for any push that reaches storage without passing the gateway.12-- **A client-side `git-remote-<name>` helper that rewrites push results.** It needs an install on every machine and is not authoritative, since a plain `git push` skips it. It is deferred, and it returns only if the gateway cannot be built.13-14-## Consequences15-16-- For an answer, the gateway forwards the push to the answerer's own fork, then rewrites git's report-status with the verdict of the cheap stages of the gate (ADR 0006).17-- A git credential helper ships so that tokens stay out of remote URLs.18-- If the gateway cannot be built, the fallback is raw per-fork tokens plus the push-event backstop, and the `git-remote-<name>` helper returns to put refusals in push output.19-20-## Amended (2026-10-08)21-22-What the gateway spike against live Artifacts (Oct 6–7) and the build since have shown:23-24-- **A push lands whole or not at all.** Any refusal turns every ref in the push away. Custody judges twice: `admit` runs before forwarding, so a refused push never reaches storage, and `review` runs after storage took the push into the answerer's fork, which keeps the commit while git still shows the refusal.25-- **Four headers are forwarded, and no credential.** The gateway passes only `accept`, `content-encoding`, `content-type` and `git-protocol` upstream; the upstream adapter adds the platform's own token.26-- **Storage's rejections are translated by their text.** `stale ref` (Artifacts) and `incorrect old value provided` (git's receive-pack) become `StaleBase`, with `main` read from a fresh ref advertisement; `artifacts_git_receive_pack_busy` becomes `RepoBusy`, which is retryable. `fetch first` never reaches a server: git decides it on the client.27-- **A direct push to a canonical `main` is `DirectPush`.** It is final, and its next step lists the asks. `StaleBase` read backwards there and `NoAsk` said nothing about why. The only direct push admitted is the initializer's first push to an empty project; after that, `main` moves only by a landing (ADR 0014).28-- **Anonymous clones of public repos work** through the gateway, which holds the read token; Artifacts itself refuses anonymous reads.29-- **Cost.** A push through the gateway took a median 0.355 s against 0.340 s direct (+4.6%, ten pushes each). Ten clones at once took +69% (2.0 s against 1.2 s wall time), most likely because each new isolate mints a token before its first upstream call; the two were not timed apart.30-- **The fallback is not built.** There are no raw per-fork tokens and no `git-remote-<name>` helper. The push-event backstop is built: OnPush turns any move of a canonical `main` that the platform did not make into a `StrayPush` decision whose default is revert.31-- Later stages of the gate answer after the push returns, not in its report-status (ADR 0015).32-- **A fork takes branches only.** A claim fork or a working fork admits only `refs/heads/*`: custody refuses a push that creates, moves or deletes any other ref (a note, a tag, the platform's own refs) with `DirectPush`, whoever pushes, and the gate's parse stage agrees for a push the backstop sees. The platform's own fork writes, its verdict notes and the Lander's merge ref, reach storage directly and never pass custody.deleted:docs/adr/0005-rules-read-from-the-landed-sha.md-16 removed
1----2-status: accepted3----4-5-# Rules are read from the landed SHA stored in the Project DO; the ref is a mirror6-7-The platform reads a project's rules only from the commit it last landed itself. That SHA lives in the Project Durable Object's row and is written in the same transaction as the landing record. The rules are the config folder, the judge closure and the env shape (ADR 0009). A landed ref in the repo mirrors the SHA for people and tools, and nothing reads it to make a decision. So neither an answer nor a stray push can change what judges it.8-9-## Considered Options10-11-- **Read rules from a landed ref pushed atomically with `main`.** This was the earlier design, and it made an atomic two-ref push a requirement of every landing. Artifacts' `readFile` accepts a commit ID as its `ref` ([Workers binding](https://developers.cloudflare.com/artifacts/api/workers-binding/)), so reading by SHA needs no second ref.12-- **Read rules from the tip of `main`.** A push that reached `main` outside the gateway would then rewrite the rules that judge the next push.13-14-## Amended (2026-10-08)15-16-The first spike against live Artifacts (Oct 6) settled the question this ADR turned on: Artifacts has no atomic multi-ref push. `git push --atomic` is refused ("the receiving end does not support --atomic push"), and its receive-pack advertises no `atomic` capability. So the landed SHA in the Project DO is the only truth. A landing pushes `main` alone, then the mirror ref and the verdict note each follow in a push of their own (ADR 0014), and either may trail `main` for a moment. Artifacts' Workers binding also resolves only short branch names and commit SHAs, never a custom ref, so the DO keeps the SHAs of the refs it writes.deleted:docs/adr/0006-landing-is-a-parse.md-26 removed
1----2-status: accepted3----4-5-# Landing is a parse: a cost-ordered gate and a closed refusal union6-7-Every push is treated as unknown input. The gate runs its stages in order of cost (the claim, the territory, judge custody and weakening, the merge, the project's own commands, then held-back checks) and narrows the push either to a checked tree, which the platform lands, or to refusals. Refusals are a closed union of `Schema.TaggedError` classes, so people, agents and code can all branch on them.8-9-## Considered Options10-11-- **Free-text check failures**, as most CI reports them. A person can read them, but an agent or a script has to guess what went wrong and what to do next.12-- **One refusal per push.** An agent with three shape problems would need three pushes to learn about them.13-14-## Consequences15-16-- Each refusal carries a static `retryable`, a `next` command and an optional `at: {path, line}`. It carries no `message` field: Effect's MCP server renders a tool error as text only when its message is non-empty, so without one, MCP clients get the structured error.17-- Text for git `remote:` lines, the CLI and MCP comes from one renderer, `protocol/render`.18-- Stage-1 (shape) refusals accumulate, so one push gets every shape problem at once. Costly stages stop at the first failure. The `ng` line names the first tag; `remote:` lines, CLI JSON and MCP JSON list them all.19-- The union is a public contract. A `_tag` is renamed only with an alias.20-- `Flake` and `VerifierBlocked` never count against the answerer.21-22-## Amended (2026-10-08)23-24-- **`PatchId` is the platform's own**, not `git patch-id`: SHA-256 over the answer's change set as sorted `path`, blob-before, blob-after lines (an absent blob as empty), computed with WebCrypto in a Worker that has no diff engine (`packages/git/src/patch-id.ts`). It ignores commit order and moves only when a blob the answer touches moves, which is when a held-back lane must run again; a verdict records it, and only held-back results may carry over, when both it and the pinned held-back suite are unchanged. Open: the change set is taken against the answer's own base, so a re-merge onto a `main` that changed one of those files keeps the same id.25-- **Waiting is not refusing.** An answer's `Outcome` is `Checking`, `Landed`, `WaitingOnParent`, `AwaitingFinish`, `AwaitingDecision` or `Refused`. The three waiting states carry no refusal: nothing failed, and the answer needs no new push. Only `Refused` carries refusals, all from the cheapest failing stage.26-- Stages 0 and 1 answer inside the push; the merge, the project's commands, held-back checks and the human stage answer afterwards (ADR 0015).deleted:docs/adr/0007-visibility-boundary-is-the-repo-boundary.md-18 removed
1----2-status: accepted3----4-5-# The visibility boundary is the repo boundary6-7-Git cannot hide part of a repo: whoever can fetch a commit can fetch every object in its tree. So each audience's files form a layer that lives in its own repo, and the platform composes layers over `main` only where the reader may see them. One flow rule holds: no write down. Content reaches a wider audience only through a credited release, and nothing from a layer enters a public tree.8-9-## Considered Options10-11-- **Private branches or folders in one repo.** Git's object reachability would leak them to anyone who can clone.12-- **Fully hidden project layers.** Every project layer is declared publicly instead. Only personal layers may be hidden, because invisible gates destroy contributors' trust.13-14-## Consequences15-16-- The platform lands the answer's tree, never the composed tree, and snapshots before held-back files are written.17-- Public-serving Workers have no binding to the private namespace. A type test checks that the web Worker's generated env has no `ARTIFACTS_PRIVATE`.18-- A push that would put a layer path into a public tree is refused as `PrivatePathInPublicTree`.deleted:docs/adr/0008-claims-are-exclusive-by-default.md-20 removed
1----2-status: accepted3----4-5-# Claims are exclusive by default and kept alive by pushes6-7-An ask takes one claim at a time. A claim is a fork plus a scoped token, and only pushes keep it alive: after 2 idle hours the claimant is warned, and after 24 the claim lapses (`ClaimLapsed`). A full ask returns `AskFull` before any fork is made. Racing is opt-in, for kinds where parallel attempts are the point, such as hill-climbing or design asks.8-9-## Considered Options10-11-- **Three claims per ask, shown as "2 of 3 taken".** Duplicate work wastes newcomers' effort, and asks open to racing get swarmed, as bounty markets do.12-13-## Consequences14-15-The front page shows an ask as either claimed or open.16-17-## Amended (2026-10-08)18-19-- **Fork names carry their parts.** A claim's fork is `<project>--<ask>--<handle>` and a person's working fork `<project>--me--<handle>`, the handle in lowercase; a layer's repo is `<project>--<layer>`. A project name, an ask id and a layer's name are each lowercase words joined by single hyphens, so none can hold `--`, and a claim fork's, a working fork's or a layer repo's name splits back into its parts. `me` and `layer` are reserved ask ids, as are `open` and `flag`, which the CLI's `ask` subcommands take.20-- **Making a claim's fork is safe to retry, and converges on one repo.** Ten claims at once against live Artifacts (Oct 7) were all ready within 9.9 s, so no pool of pre-made forks is needed. Under that load 4 of 10 fork calls first answered HTTP 500, then 409 "repo already exists" when retried under the same name, and each still ended as exactly one repo. So a 500 is read as "maybe made" and tried once more, and an already-exists on the claim's own name counts as made once that repo holds `main`. The name comes from the claim, so claiming again finds the same fork.deleted:docs/adr/0009-env-shape-is-env-schema.md-19 removed
1----2-status: accepted3----4-5-# The env shape is the project's `.env.schema`, parsed and never resolved6-7-A project's env shape is its committed `.env.schema`, in the [@env-spec](https://github.com/dmno-dev/varlock/discussions/17) format that varlock reads. The platform parses it at the landed SHA with `@env-spec/parser` and never resolves it: no `exec`, no plugins, and no imports from outside the repo. Function-valued flags count as sensitive. Values are stored only for `@sensitive` items, as write-only values, envelope-encrypted in the Project DO under a master key held as a Worker secret. Unlanded code sees a placeholder for every `@sensitive` item. For a `@proxy` item, the platform swaps the real value in on matching outbound HTTPS requests ([Sandbox outbound interception](https://developers.cloudflare.com/sandbox/network/call-an-authenticated-api/)).8-9-## Considered Options10-11-- **An `env.ts` in the config folder.** Only the platform would read it, while the app kept its own env loading, and the two shapes would drift. One file now serves the app, local tools, agents and the platform.12-- **Cloudflare Secrets Store for project values.** It holds [up to 100 secrets per account, in one store](https://developers.cloudflare.com/secrets-store/manage-secrets/).13-14-## Consequences15-16-- `.env.schema` and committed `.env.*` files, except `*.local`, are in the judge closure. An answer cannot add or change an env item, such as adding a `@proxy` domain or turning off `@sensitive`; a decider lands it.17-- This repo's own env uses varlock. Tools run through `varlock run`. Workers deploy through `varlock-wrangler` ([`@varlock/cloudflare-integration`](https://varlock.dev/integrations/cloudflare/)), which passes non-sensitive values as `--var` and sensitive ones through `--secrets-file`. Agents read the env only through `varlock load --agent`, with values redacted.18-- No Worker imports varlock's runtime. Its `init` patches `console` and the global `Response` and scans every streamed body, and the gateway streams git packs.19-- The format is varlock's, and the README credits it.deleted:docs/adr/0010-no-inbound-github-sync.md-13 removed
1----2-status: accepted3----4-5-# No inbound or two-way GitHub sync6-7-A project can be imported from GitHub once, to start it. After that, nothing flows in from GitHub, and nothing syncs both ways. Inbound sync would be a second way onto `main` that skips the gate.8-9-## Consequences10-11-- Export is `git clone`. Code, asks and credit trailers leave with a clone, and verdicts need one more fetch of `refs/notes/*`. The README says so.12-- An import can also be made from the web, at `/import`, and is still made once ([ADR 0033](0033-a-repo-is-imported-from-the-web-and-its-host-path-offers-the-import.md)).13-- A one-way push mirror of `main` to GitHub is on the roadmap for after the competition, not in it.deleted:docs/adr/0011-the-fence.md-22 removed
1----2-status: accepted3----4-5-# The fence: compiler first, then lint; verify is the authority6-7-> **Superseded in part (2026-10-07).** On the user's decision, the repo dropped every part of this fence whose only job was to police the agents building it: the hook policy (`scripts/hooks/vcs-policy.ts` and its Claude Code, Cursor and pi adapters), the escape count (`scripts/debt.ts` against `debt.baseline.json`), the repo's own lint rules (`tools/oxlint/fence/`), the test that held AGENTS.md's table to its enforcers, the import-direction check (`imports:check`), the generated reference and distribution (`docs/reference/`, `skills/`, `plugins/` and `gen:check`), the repo's playbooks, and the planned `scripts/acceptance.ts`. `bun run verify` is now the lockfile check, lint and format, typecheck, tests, `brand:check` and `bytes:check`, and it is still the authority. Compiler first, then lint, then a test still orders how a rule is held; a rule with none of them is held by review, and an escape still carries its reason after ` -- `. The record below is kept as it was decided.8-9-Each rule this repo keeps is held by the strongest enforcer available. First, make the mistake unrepresentable in types; then catch it with lint; then with a test; prose is the last rung. Git hooks are early feedback only; `bun run verify` and CI are the authority. The repo is built fast and mostly by agents, and a rule nothing checks drifts under that load. The fence also dogfoods the product: its judge closure, weakening and ratchet apply to this repo first.10-11-## Considered Options12-13-- **The full test suite in pre-commit.** Too slow for an agent sprint. Git hooks, when they come, run lint, format check and typecheck; tests run in `verify` and CI.14-- **A `no-comments` lint rule.** Rejected: agents need room for workaround notes.15-16-## Consequences17-18-- Every escape (`oxlint-disable`, `@effect-diagnostics`, `@ts-expect-error`) carries a reason after ` -- `. `scripts/debt.ts` counts escapes against `debt.baseline.json` in `verify`, and the count rises only with the maintainer's sign-off.19-- One hook policy (`scripts/hooks/vcs-policy.ts`), wired into Claude Code, Cursor and pi, refuses the usual ways around hooks (`--no-verify`, `commit -n`, `core.hooksPath` overrides, `LEFTHOOK=0` and `lefthook uninstall`), `git push`, `wrangler delete`, cf `delete` and `revoke`, cf's project commands and reads of the closed `.env` files.20-- Until the deadline there is no lefthook and no CI workflow: the harness hooks give the early feedback, `bun run verify` is the authority, and `scripts/acceptance.ts` stands in for CI by running `verify` on a cold install.21-- A deploy is never a way around a red gate: `infra/deploy.ts` refuses without an explicit stage and runs smoke tests after.22-- `AGENTS.md` lists each principle with the check that holds it. Where the check and the prose disagree, the check wins.deleted:docs/adr/0012-lifecycles-are-pure-transitions.md-15 removed
1----2-status: accepted3----4-5-# Lifecycles are pure transitions run per DO call6-7-Claim and landing state are each a lifecycle: a pure `transition(state, command, now)` function (`ClaimLifecycle`, `LandingLifecycle`). Each Durable Object call hydrates state, runs one transition, persists the row and an outbox entry, then settles side effects. Deadlines run on DO alarms, never on in-memory timers. Pure transitions can be model-tested over generated histories.8-9-## Considered Options10-11-- **XState 6 with `@xstate/effect`.** Both were alphas, released on Oct 3 and Oct 1, 2026, and snapshot restore was not supported yet. Revisit after the competition.12-13-## Consequences14-15-They are called lifecycles, never "deciders", although the code pattern goes by that name elsewhere: in the glossary a **Decider** is a person.deleted:docs/adr/0013-provenance-copy-with-attribution.md-24 removed
1----2-status: accepted3----4-5-# Provenance: copy with attribution6-7-> **Superseded in part (2026-10-07).** On the user's decision, `PROVENANCE.md`, `LICENSES/` and the planned `scripts/provenance.ts` are gone. A ported file carries its upstream licence notice in its own header: `packages/protocol/src/cli.ts` and `packages/protocol/src/mcp.ts` each open with Rat Stack's MIT notice in full. A vendored folder or a font keeps its licence file beside it (`tools/oxlint/anti-slop/LICENSE`, `apps/web/src/components/ui/LICENSE`, `apps/web/src/assets/fonts/LICENSE-*.txt`, burrow's `LICENSE-rat-stack.txt`). The ports of the debt ledger, `no-module-level-mutable-state`, `no-manual-effect-runtime-in-tests` and `vendor-agent-sources.sh` left with the repo's own fence (ADR 0011's note), and their notices with them. Copying with attribution, owning the copy and never syncing upstream still hold. The record below is kept as it was decided.8-9-Code from other projects enters as ports: it is copied with attribution into our own files, and from then on it is ours to change. The repo has its own history from the first commit. It is not a fork, a template or a vendor commit of another project, and it holds no third-party prose or artwork. `PROVENANCE.md`, `LICENSES/` and `UPSTREAM.md` record every port: its source, commit, licence and our changes. Upstream `main` is never synced in. The competition's [Official Rules](https://www.cloudflare.com/documents/build-next-gen-git-platform-competition-terms.pdf) (§4) require "Entrant's own original content and creation" with no "third-party copyrighted material or artwork without the copyright holder's permission", and originality is half the score (§6). So credited plumbing is fine, and the centre of the product must be ours.10-11-## Considered Options12-13-- **Fork or template Rat Stack.** A fork carries several hundred commits of someone else's history. A template marks the repo "generated from" its source and brings about 85k lines.14-- **A 25% derived and 15% near-verbatim ceiling.** That was sized for adopting a whole stack, not for grafting plumbing.15-16-## Consequences17-18-- Derived lines stay under 15% of the codebase and near-verbatim lines under 10%, with a target of about 5%. `scripts/provenance.ts` measures both.19-- Planned ports:20- - from [Rat Stack](https://github.com/joelhooks/rat-stack) at `fba26d8` (MIT): the CLI and MCP projections (ADR 0003), `no-module-level-mutable-state`, the debt ledger, and `vendor-agent-sources.sh`;21- - from t3code (MIT), via Rat Stack: `no-manual-effect-runtime-in-tests`;22- - from [anti-slop](https://github.com/dmmulroy/anti-slop) at `c44ef22` (MIT): its oxlint plugins, installed by its own vendoring script.23-- Ideas taken without code, such as cf's merged command catalog, are credited in `PROVENANCE.md` as ideas.24-- Credits live in the README and `PROVENANCE.md`, not on screen in the demo.deleted:docs/adr/0014-landing-is-a-cas-push-of-main-then-bookkeeping-refs.md-21 removed
1----2-status: accepted3----4-5-# Landing is a CAS push of main, then the bookkeeping refs, each on its own6-7-The platform lands a checked tree as one new commit on canonical `main`, whose parent is the landed SHA the Project DO last recorded, pushed with a plain push: never forced and never atomic. If `main` moved since, storage refuses it, and the landing re-merges onto the new `main` or ends as `StaleBase`. Only once `main` has moved does the platform push its bookkeeping: the mirror ref (ADR 0005) and the verdict note, each in a push of its own. Artifacts has no atomic multi-ref push, and any write token can force-push `main`, so the one push that matters is the compare-and-swap on `main`, and only the platform holds a token that can make it.8-9-## Considered Options10-11-- **One atomic push of `main`, the mirror ref and the note.** This was the earlier design. Artifacts refuses `--atomic` (spike, Oct 6), and its receive-pack advertises no `atomic` capability.12-- **`--force-with-lease` on `main`.** It is a compare-and-swap too, but it is a forced push: once the expected value matches, any commit replaces `main`, even one that does not descend from it, so a landing built on the wrong parent would rewrite history instead of failing. A plain push of a commit whose parent is the old tip can only move `main` forward. The Lander uses a lease only for its own compose refs, never for `main`.13-- **Bookkeeping first, `main` last.** A mirror or a note naming a commit that never landed would mislead its readers, and Artifacts accepts a notes ref naming a commit the repo lacks, then fails the fetch of that commit.14-15-## Consequences16-17-- The landed SHA in the Project DO, written in the same transaction as the landing record, is the only truth (ADR 0005). The mirror ref and the note may trail `main` for a moment, and nothing decides by them.18-- A bookkeeping push that fails stays in the DO's outbox, and the next alarm lands the same request again. The Lander finds its own commit already on `main`, by the commit's `Request-Id` trailer, and writes only what is missing, so a replayed landing never makes a second commit.19-- Artifacts fires one push event per ref, so `OnPush` reads the ref and ignores the pushes the platform made.20-- Write tokens for a canonical repo never leave the platform. Answers go to forks, and tokens are per repo.21-- The serial landing queue lands one request per project at a time. A landing that meets `RepoBusy` waits and tries again, from a second up to five minutes.deleted:docs/adr/0015-submitting-an-answer-is-asynchronous.md-19 removed
1----2-status: accepted3----4-5-# Submitting an answer is asynchronous: the push hears the cheap stages, and the rest arrives later6-7-An answer is offered by `git push` to the claim fork, or by the `submitAnswer` contract (the CLI's `submit`, the MCP tool). Either way, the call runs only the gate's first two stages: the parse (who may push what, and where) and the shape (territory, judge custody, weakening, reached internals). A clean answer then starts the `Answer` Workflow and returns at once with the outcome `Checking`, which git shows as `remote: checking <ask> at <head>; follow with <cli> status`. The merge, the project's own commands in a container, the held-back checks and any human stage run after the call has returned. Their outcome arrives as the verdict note on the answer's head, in `status` and `watch`, and through MCP. A container check takes minutes, and a push must not hold a request open that long.8-9-## Considered Options10-11-- **Hold the push open until the verdict.** Every refusal would then reach `git push` output, but one request would hold the git client, the gateway and a container for minutes, and a dropped connection would leave the pusher with nothing to read.12-- **Accept the push and say nothing until a later read.** Shape refusals are cheap and the most common kind, so they belong in git's own output, before the answerer moves on.13-14-## Consequences15-16-- Every offer carries a `requestId` (a push's is `push-<head>-<handle>`), so offering the same answer again returns the same receipt and starts no second run.17-- A push hears every stage-1 refusal at once (ADR 0006). `submitAnswer` fails with one error, so it returns the first of them.18-- Refusals from the later stages, such as `ChecksFailed`, `Flake`, `StaleBase` from a re-merge, or `HeldBackFailed`, never appear in the push's own output. They are read from `status`, `watch`, MCP or the verdict note (`git fetch` of the notes ref, then `git notes show`).19-- An answer's `Outcome` says where it stands meanwhile: `Checking`, then `Landed`, a waiting state, or `Refused` (ADR 0006's amendment).deleted:docs/adr/0016-a-person-is-a-platform-account.md-21 removed
1----2-status: accepted3----4-5-# A person is a platform account, and nobody signs in with GitHub6-7-A person is a handle in the platform's own accounts. They sign up and sign in with a handle and a password on the platform's own pages, and the platform is its own OAuth authorization server, for the CLI's login (PKCE) and for MCP clients. Google sign-in is an optional second way in, linked to a handle, and never the identity itself. There is no GitHub sign-in, no GitHub handle lookup and no GitHub key in any env. The product's point is to leave GitHub, so who a person is must not depend on it, and accounts that need no third party let every stage sign people in with nothing to register first.8-9-## Considered Options10-11-- **GitHub OAuth as the only sign-in.** This was the earlier plan. People would arrive with an account and a handle they already have, but every stage would need an OAuth app registered by hand, and identity on a platform built to replace GitHub would be GitHub's.12-- **Named sessions alone:** a sensitive env value mapping bearer tokens to handles. It stays beside accounts, behind the same sessions port, for the operator and the demo's fictional people, who need several accountable identities without signing up one by one. It is not how real people join.13-- **A portable identity behind the handle** (declined, October 2026). Two peer platforms point a handle at something no single host owns: one at a decentralised identifier held on a data server the person chooses, with a third-party client library and an OAuth flow to reach it; the other at a signing key per device, encoded as an identifier, with no account at all. Either would let a `Signed-off-by` trailer name an identity that outlives this platform. Declined for now: the first adds a dependency no `package.json` has and a sign-in redesign, and makes who a person is depend on a third party's account again, which this decision exists to avoid; the second is a key-management burden on every contributor before their first claim. If a second identity is ever added, it is a key the person holds, linked to their platform handle and verified by the platform, never an account at a third party. Re-adding either client needs the user's sign-off.14-15-## Consequences16-17-- Handles are the platform's own. Credit trailers, the vouch file (where a handle with no provider prefix is a platform handle) and fork names spell them, and two handles that differ only in case are one person.18-- A password is HMAC'd with a pepper held as a Worker secret, then hashed with PBKDF2, so a copy of the accounts table alone is useless. `COOKIE_KEY` and `PASSWORD_PEPPER` are required on every stage, and changing the pepper makes every stored password fail.19-- Agents have no identity of their own. An agent works through its person's token, and the harness it names is audit metadata that a landing discloses as `Assisted-by:`, never identity or credit.20-- Importing a public repo from GitHub once, to start a project, is unaffected (ADR 0010).21-- The web keeps the signed-in handle for display in a second `__Host-` cookie, HttpOnly, bound to the session token by its SHA-256 and set when the person signs in, so `/auth/whoami` answers with no platform call on each page. Signing out, or any `Unauthenticated` from the platform, clears both cookies. The handle only shapes what a page shows; every write still carries the token to the platform, which decides.deleted:docs/adr/0017-rules-evaluate-once-per-landed-sha-in-a-sandbox.md-20 removed
1----2-status: accepted3----4-5-# A project's rules are evaluated once per landed SHA, in a Dynamic Worker that can reach nothing6-7-A project writes its process as TypeScript in the config folder. At each landing the Lander bundles the folder with Bun, with macros off so nothing in it runs while it is bundled. The platform then evaluates the bundle once, in a Dynamic Worker made by the Worker Loader. That Worker has no bindings, no outbound network (`fetch` and `connect` throw), no subrequests and a CPU limit, and a prelude freezes its clock and randomness to the landed commit's time and a hash of its SHA. The result is the project's policy: plain data, decoded with Schema as it leaves the sandbox, and cached in the Project DO beside the landed SHA it came from. Most rules are data. The few that are functions (whether a proposal opens without a decider, whether a claimant is admitted) are called on demand in the same kind of sandbox, with their facts passed in and the clock at zero. A project with no config folder runs on the defaults.8-9-## Considered Options10-11-- **Config as data only (JSON or YAML).** There would be nothing to sandbox, but a project could not compute its rules, and the typed SDK would have nothing to check them against. `packages/rules` keeps a JSON evaluator (a committed `policy.json`, or the defaults) as a fallback adapter.12-- **Bundle inside the platform Worker** with Cloudflare's worker bundler. A bundler would sit in the Worker that serves git, and it would bundle on every evaluation instead of once per landing.13-- **Evaluate on every push.** Every push would pay a sandbox start, and two pushes judged against the same landing could see different rules.14-15-## Consequences16-17-- Only a landing changes a project's rules, and no answer changes what judges it: the config folder is in the judge closure, and rules are read only at the landed SHA (ADR 0005).18-- Evaluating the same SHA twice gives the same policy (principle 8; `packages/rules/test/replay.test.ts`).19-- A config folder that fails to bundle or to evaluate leaves the policy of the previous landed SHA in place, and the failure is logged.20-- The SDK a project imports must run with no clock, no randomness and no network of its own, so rules get time and identity only through their facts.deleted:docs/adr/0018-asks-are-drafted-in-a-workflow-and-put-to-a-decider.md-22 removed
1----2-status: accepted3----4-5-# Asks are drafted by the platform's agent in a Workflow, run red first, and put to a decider6-7-A member who can say what a project wants, but not write its ask, proposes the want with a draft. The platform's agent then writes the ask for them. A draft round is one run of the existing `Answer` Workflow under params tagged `Draft`. Its steps are a context step, which picks files from the canonical tree at the landed commit within a byte budget and never reads a layer, then up to three attempts, then a settle. Each attempt makes one model call through Workers AI's `AI` binding, recorded as a step, and one rehearsal: red first on the Checker, the same preparation `accept` runs, which lands nothing. The model is the `DRAFT_MODEL` var, and no key or secret is involved. A refused rehearsal feeds its rendered refusal and the last 4 KB of its output into the next attempt. The model returns fields only (the ask's id, want, context, territory, the test's path and source, a rationale). Code renders the `.ask.ts` file from those fields, so only the test file is the model's own text, and that test may not sit in the config folder. A settled draft reaches a decider as an `OpenProposal` decision. Its evidence is the drafted files, the red-first signature, the model, the attempt and the rationale. Accepting it runs the unchanged `accept`, red first again on the then-current `main`. The landing credits the proposer (`Asked-by`) and the decider (`Decided-by`), and discloses the agent with `Assisted-by: <cli>-drafter:<model> (verified)`.8-9-## Considered Options10-11-- **A container harness with a provider secret** (a coding agent in a Checker-like container, calling a model provider with a key). It could edit and run code freely, but it adds a secret to set per stage, a second container image, and a harness that writes code into the ask file. That stays a later step, which could reach the same binding through an intercepted host.12-- **Drafting inside the Project Durable Object's call.** A model call takes 30 to 60 s and a rehearsal minutes; a DO call that long blocks the project, and a retried call would ask the model again. A Workflow step records the model's answer, so a replay asks nothing more.13-- **The `agents` SDK.** It brings 17 peer dependencies and a deprecated MCP agent, and it adds nothing a recorded step and a binding call do not already do.14-15-## Consequences16-17-- Nothing a draft writes lands without a decider: the draft's own rehearsal only reports, and `accept` is the one path to `main`.18-- A draft round's instance is one per project, proposal and round, so a round started twice runs once. A complete round is never started again, since that would ask the model again. A round that errored is.19-- Workers AI does not hold a model to the JSON Schema it is asked for. The reply is decoded with Effect Schema whatever the model claims, and a reply that does not decode is a spent attempt.20-- The prompt's policy digest is built from the public policy only, so a layer's name, readers and paths never reach a model.21-- Drafts are `fix` asks only for now. A project with no `fix` kind settles its draft as failed at once.22-- Drafting has its own rate limit (`DRAFT_LIMIT`), and each draft costs at most three model calls and six Checker runs, plus two on accept.deleted:docs/adr/0019-the-web-reads-repos-through-public-contracts.md-28 removed
1----2-status: accepted3----4-5-# The web reads a project's code through public contracts the platform serves6-7-> **Superseded in part (2026-10-10).** Code is no longer drawn in the browser only. ADR 0027 records that the web Worker highlights a blob page's file and a commit page's first files on the server, in a fixed set of languages and within its own limit, and that the browser's drawing takes their place once it can draw the same code at once. The tree is still drawn in the browser only. The record below is kept as it was decided.8-9-The web's code browser (tree, file, raw bytes, log, commit, refs, and why each line is there) reads only through public, read-only contracts on `/rpc`. The platform Worker serves them over its existing `RepoHost` on the public Artifacts namespace. The logic lives in one host-free module, `@repo/project/code`, which the platform's handlers and the web's offline dev world both call. No payload names a repo. Each names a project, and the module reads that project's canonical repo only, never a fork or a layer. A revision is `main` (the project's landed SHA, from its record and never from a ref), a full commit SHA in the canonical repo, or a tag name matched exactly against the port's tag list, never joined into a ref path. Every answer names the commit it resolved, so any page becomes a permalink.10-11-## Considered Options12-13-- **An Artifacts binding on the web Worker.** It would save a hop, but the web would then hold storage. Today it holds a service binding and public vars only, and a type test keeps it that way. A second Worker reading repos would also put a second place in front of the visibility rule.14-- **Highlighting on the server.** A cold highlight costs about 800 ms and some 730 bytes a line, and the grammars would add about 11 MB to the Worker. Pierre draws code in the browser instead, and the server sends a plain fallback: a table for a folder, and numbered lines with `#L<n>` anchors for a file.15-- **Browsing forks.** Forks would need their own auth paths, and a layer repo must never be nameable. Claim forks are listed and link to their answer's page instead.16-17-## Consequences18-19-- Raw bytes (`GET /<project>/raw/<rev>/<path>`) carry `x-content-type-options: nosniff` and a sandboxing CSP (`default-src 'none'; img-src 'self' data:; style-src 'unsafe-inline'; sandbox`) on every answer, refusals included. HTML and XML are served as plain text, and SVG as an image, which the sandbox keeps from running script. A read by commit SHA is cached as immutable. The web passes the route on untouched.20-- Reads addressed by object id (trees, blobs, commits, a commit's changes, a file's why) are cached per isolate, keyed by the object's id. Only finished reads are kept, never one still under way, because Workers cancels a request whose client left without interrupting its fibers. `main` is resolved on every call.21-- A README renders as GitHub-flavoured Markdown in one fixed plugin order, its relative links and images pointing into the repo at the SHA, then sanitized with GitHub's allow-list. The order is the security property, so it lives in one tested module.22-- Why each line is there is a first-parent blame from the revision, up to 200 commits. A line whose commit is a platform landing names its ask, answer, people and verdict from the project's own record, so a trailer forged on an imported commit never reads as a landing.23-- An ask's opening is a landing that answers no ask, so its landing names the ask it opened (`opened`, a migrate family's parent) and never `ask`, which credits, Today and the record read as an answer. The project derives `opened` from its record when it is read, so openings recorded before the field existed link their ask too, with nothing rewritten. Each read's results are kept beyond one isolate as ADR 0020 records.24-- The port lists tags already peeled to their commits, since an annotated tag names a tag object a commit read cannot open.25-- Artifacts' import brings no tags. An operator may backfill an imported repo's `refs/tags/*` from its source, through a short-lived write token minted over REST. This is the one write that skips the gateway, and it writes tags only, never `main`.26-- Each read is an Artifacts operation, billed past a monthly allowance and limited to 2,000 a repo every 10 s. Every walk is capped: 50,000 paths, 200 commits scanned for a path's log or for why, 300 files and 2 MiB of text in a commit's diff, and 1 MiB per file.27-- Five code reads are MCP tools too, for an agent with no shell or git, such as a hosted connector: `readTree`, `readFile`, `log`, `why` and `listRefs`, each capped: a log page holds at most 100 commits, and the limits above bound the rest. `showCommit` (up to 2 MiB of diff) and `listPaths` (up to 50,000 paths) are not, since nothing caps them to what a transcript holds. No code read is a CLI command: git reads code locally.28-- The browser draws code, diffs and the tree with Pierre in a pool of web workers (`apps/web/src/features/code/pool.tsx`), one pool per tab, kept between code pages. While it draws, the server's HTML holds the file or the diff as plain text at Pierre's exact metrics (13 px text on 20 px lines, its gutters, its header), so the highlighting lands in place with nothing moving. There is still no highlighting on the server, and the tree is still drawn only in the browser: both would need the web Worker's server build to be minified to fit its byte budget.deleted:docs/adr/0020-code-history-is-kept-by-immutable-ids.md-26 removed
1----2-status: accepted3----4-5-# Code history is kept by immutable ids, in a bucket of its own6-7-Why each line of a file is there, and a path's history, are what a walk of up to 200 first-parent commits computes, and a cold walk on a large import took tens of seconds in one isolate, then again in the next. What a walk computes from a commit is fixed for good by that commit's content, so the platform keeps it in an R2 bucket, `code-cache-<stage>` (binding `CODE_CACHE`, platform only), behind the `CodeStore` port in `@repo/project`. A key is `<repo>/<kind>/v<version>/<commit>/<scan>/<sha256(path)>`: the canonical repo only, `why` or `path-log`, the version of the algorithm that computed it, a commit id (never `main` or a tag's name, which resolve first), how many commits the walk scanned, and the path hashed to keep the key under R2's 1,024 bytes. A value holds ids and ranges encoded with Schema, never a file's text and never a landing: each view asks the project's record for its landings, so a new landing or an opening's ask shows at once.8-9-## Considered Options10-11-- **The Cache API.** It is per colo, so a reader in another colo pays the walk again, and every stage lives on `workers.dev`, where we assume `cache.put` keeps nothing.12-- **Workers KV.** Its namespace id would be written per stage into `wrangler.jsonc`, and it is eventually consistent, where R2 is strongly consistent and its binding is only a bucket name.13-- **The Project Durable Object's storage.** It would put every reader's lookup and put on the project's single-threaded object, beside its claims and landings.14-- **The `evidence` bucket.** It keeps failing lanes' logs, another job with its own name.15-- **Every tree in the store.** Tried live and reverted: each store call cost what a repo read does, so a repo's first view did three times the calls and took 32-38 s.16-- **A per-commit path index.** Counted over local copies, building it reads every changed folder of every commit in the window, about three times the trees of one walk, and the first view would pay for it. Not built.17-18-## Consequences19-20-- Reads go isolate cache, then store, then walk; what a walk computes is put in both. A store that fails, or a value that no longer decodes, is a miss, never the read's failure, and the walk puts a good value back.21-- A walk may start from what is kept at a first-parent ancestor up to 16 commits back, carrying line ranges forward through each diff, so a new landing on `main` costs a handful of reads. A result built forward that way keeps that ancestor's place in history, so past the 200-commit window it can differ from a walk started fresh; both are correct for the commits they name.22-- A version moves whenever its algorithm changes, so an old value is never read as a new one, and nothing in the bucket ever goes stale.23-- A store answers one Worker invocation a few dozen calls a second whatever is under way, so the number of calls is the cost. A file of at most 256 KiB is read whole at each commit (its git blob id is the SHA-1 of its bytes), one call a commit instead of its folders; a larger file, a folder or a missing path walks the folders. A commit that changes only a file's mode does not show in that file's history.24-- A view's reads run in one repo session (`inRepoSession` in `@repo/artifacts`): the binding adapter opens one handle per repo for the session and releases it when the view ends. A call Artifacts refuses as rate limited is asked again with a growing wait, a few times, then fails the view, which keeps nothing.25-- A cold view of a file with 200 commits of history still makes about 200 calls, 5-8 s in one invocation; a warm one answers in under a second. Going lower needs work that runs off the reader's request, such as an index built when something lands.26-- Removing the store is a deletion: the port's default stores nothing, and every read still answers.deleted:docs/adr/0021-a-listed-projects-posture-is-read-from-the-project.md-22 removed
1----2-status: accepted3----4-5-# A listed project's posture is read from the project when it is listed6-7-The project list, the platform's `/` and the web's `/llms.txt` show each project's posture beside its name. Those rows come from the front-page projection, which hears a project only through its outbox events, and a project's standing posture changes without any event: a first config stands at once with no ledger row, a widening needs no decision, and an accepted narrowing takes effect when its notice runs out, by the clock. So a list could say "Open" while the project's own ledger said "Open with sealed evidence".8-9-A list now reads each listed project's posture from that project's own record at list time: the anonymous ledger read, whose `posture` is the one standing now, the same value the ledger page shows. One helper in `@repo/project`, `withStandingPosture`, lays it over the projection's rows, a few projects at once. The platform's list and `/`, and the web's offline dev world, all call it. The projection's posture column stays as the fallback, kept for a project the platform never made or one whose ledger read fails, and that failure is logged.10-11-## Considered Options12-13-- **Write a `PostureChanged` row for a first config or a widening.** A row needs a decision to name, it changes what the public ledger records, and a project that exists today gets one only when something next wakes it.14-- **Project a new outbox event into the front page.** Existing rows stay wrong until each project emits again, and a narrowing that takes effect by the clock still lags behind it.15-- **Show posture only on the ledger page.** The badge on the list is what a visitor sees first.16-17-## Consequences18-19-- Each list makes one ledger read per listed project, and the ledger is read whole for one field. A stage that lists a few dozen projects wakes each of them on every list. ADR 0025 amends this: what a list read is kept until the posture can next change, so a list reads only the projects whose kept posture is missing or ran out.20-- Nothing is migrated or replayed: once deployed, a list shows the right posture for data already there.21-- The badge and the ledger are one value, so a narrowing that takes effect by the clock shows on the list at once.22-- Posture comes through the visibility port's own ledger, so a host without the visibility cartridge still lists every project as Open.deleted:docs/adr/0022-the-web-is-a-control-room-shell.md-23 removed
1----2-status: accepted3----4-5-# The web is one permanent shell: a rail, the page, and an inspector of typed facts6-7-Every page of the web sits in one shell that never unmounts: a rail on the left (the site's sections, the projects with their postures, the current project's sections, and the file tree on code pages), the page in the middle, and an inspector on the right that holds the typed facts of the thing in hand (its state, who may take it, the gate, the claim, the posture, the family, the provenance). One component, `Workspace` (`apps/web/src/features/shared/shell/workspace.tsx`), draws a page's main pane and its inspector together, so both arrive in the server's HTML in one pass, with no portal and no inspector built only in the browser. A list's selection lives in the address (`?ask=format-ordinal`, `?decision=dec-000002`), so a selected row and its facts render on the server and a link to them can be shared. Below 1120 px the rail becomes a top bar with a Menu sheet, the inspector's blocks render inline after the page's head, and phones get a bottom bar (Asks, Today, Projects, More).8-9-The colour and type tokens stay as they were: one paper ground, ink as the only accent, five state colours that appear only beside their word and mark, Public Sans for what people read and JetBrains Mono only for what a terminal prints. What changed is the frame: the single centred report column, its double rule under every title and its ruled field grids are gone, and the pieces every page shared (the row, the status line, the family fan, the fact blocks, the copy action) are one component each in `apps/web/src/features/shared/`.10-11-## Considered Options12-13-- **Refine the single-column report sheet.** It kept every page self-contained, but a reader had to scroll to learn an ask's state, whose move it was and its next command, and the same facts were drawn differently on each page.14-- **A man page for every page.** Terse sections and mono commands read well for agents and on the For agents page, which keeps that voice, but lists, Today and the code browser need rows, selection and a tree.15-- **A forge dashboard of cards and stat tiles.** It spends colour and space on chrome, and invites counts that read as scores.16-17-## Consequences18-19-- Every page's frame was rebuilt, and its tests render inside a memory router (`apps/web/test/render.tsx`).20-- The inspector repeats a subject's state (the State block) so it reads whole on its own; facts render twice in the markup (the inspector column and the inline copy), one hidden at each width, so a test that counts a `data-*` in the facts scopes to the inspector.21-- Phones get a fixed bottom bar, and a decision's choices sit in a fixed bar above it.22-- `DESIGN.md`'s Layout, Components and Navigation describe this shell.23-- The shell's own code sits on every page's first load, so what the rail and shell import is held small (`apps/web/test/production-bundle.test.ts`).deleted:docs/adr/0023-links-are-the-routers-and-lists-render-on-the-server.md-25 removed
1----2-status: accepted3----4-5-# Links between pages are the router's, and lists arrive rendered from the server6-7-Every link from one web page to another is `AppLink` (`apps/web/src/features/shared/link.tsx`): the router's `Link`, with the router's default preload set to `"intent"`, so a click moves without reloading the document and a hover or focus fetches the next page's code and loader data first. Outside a router (a view's own test rendered alone) it draws the same address as a plain anchor. Links to server routes (sign-in, raw bytes, a `.md` twin, `llms.txt`) stay plain anchors.8-9-The lists (the front page, a project's home, Today, the landings) and the subject pages read their data in the route's loader on the server, so the HTML a browser, a crawler or `curl` receives already holds the rows. A loader's read seeds the page's atoms through `SeededAtoms` (`apps/web/src/client/seeded.ts`), a registry made for each render, and the atoms then keep the page live in the browser. The shared atom registry lives for the Worker's whole life and every request on it shares it, so a server render never writes a value there: atoms read outside a seeded registry render as waiting on the server (`withServerValueInitial`).10-11-This replaces the earlier rule that the web's views used plain anchors so they could be rendered and tested without a router.12-13-## Considered Options14-15-- **Plain anchors everywhere.** Views render alone with no setup, but every click reloads the document, the shell's rail and inspector redraw from nothing, and no next page can be fetched ahead.16-- **Lists read in the browser after hydration.** The first load is smaller, but the HTML holds no rows (an agent or a crawler sees an empty list) and the rows arrive after a skeleton.17-- **Seeding the shared registry from the loader.** One line per page, but two requests on one Worker would see each other's data.18-19-## Consequences20-21-- A view that uses `AppLink` is tested inside a memory-history router (`renderAt` in `apps/web/test/render.tsx`), which renders the matched tree to static markup after `router.load()`.22-- A hover or focus may start platform reads for a page the reader never opens; the router keeps a preloaded result for 30 s and a loaded one for 10 s.23-- An agent that fetches a list page gets its rows in the HTML, and `Accept: text/markdown` on `/` and `/<project>` answers with the same text as `llms.txt` and the project's `llms.txt`.24-- Each page gives its own registry an `id` from its address, so moving to another address starts from that address's seeds.25-- A route file's extra exports stay in the client's entry chunk, so loaders' reads live in server-only modules (`apps/web/src/server/*`, `features/*/reads.ts`), which the root preload ceiling holds.deleted:docs/adr/0024-per-ask-progress-is-folded-from-watch.md-22 removed
1----2-status: accepted3----4-5-# Where each ask stands is folded on the web from the project's public events6-7-The web shows, for each ask, who holds it, each answer checked (its rounds), the latest outcome, whether it landed and whose move that leaves, and for a family its children's marks and "n of N landed". None of that is a new contract. It comes from one pure fold, `askStates(events)` (`apps/web/src/features/shared/ask-progress.ts`), over the `watch` replay of the project's public events that the project and answer pages already read, held once per project in `projectEventsAtom` (`apps/web/src/client/events.ts`). A claim sets the claimant and a release, a lapse or the ask's close clears it; each `Judged` is a round; a new claim starts the latest outcome over while the earlier rounds stay. A family's N is the parent's stored `blockedBy` (from `showAsk`), less the delete child, never the listing's remaining blockers. Whose move it is follows from the latest outcome alone: a refusal is the answerer's, a decision or a finish a decider's, a check the platform's, and an ask waiting on another that ask's.8-9-A landing seen while the page is open settles its mark once (the stamp). The first settled read records the highest event number it holds; a later read stamps an ask only when its close is numbered after that, or, where the page polls, when the previous read did not have it landed. A replay that already holds the landing never stamps.10-11-## Considered Options12-13-- **New fields on the listing or a per-ask progress read.** Exact and cheap per page, but each is a new public contract on every surface, the CLI's and MCP's included, for what the event stream already says.14-- **A family's N from the listing's remaining blockers.** It shrinks as children land, so "3 of 6" would read "3 of 3".15-- **Stamping every landed mark on load.** The stamp would mean nothing: it marks a landing that happened while you watched.16-17-## Consequences18-19-- Each page that folds reads its project's whole replay once when it mounts, so its cost grows with the project's events; the follow then starts from the replay's last number, and a page reads its other keys once more after the replay so nothing that happened between them is missed.20-- The web cannot say when a claim runs out or which patch each round pushed, since no event carries them; the pages show neither.21-- The fold is pure and replays to the same answer, which `apps/web/test/events.test.ts` holds.22-- The front page reads the replay only for projects with a family on the page.deleted:docs/adr/0025-a-listed-posture-is-kept-until-it-can-next-change.md-22 removed
1----2-status: accepted3----4-5-# A listed project's posture is kept with the instant it can next change6-7-This amends ADR 0021. A list still shows the posture each project's own record stands on now, but it no longer reads every listed project on every list. What a list read is kept in a store, `StandingPostures` (`packages/project/src/standing-posture.ts`), beside the instant the posture can next move by the clock alone (an accepted narrowing whose notice runs out) and the project's last event the read saw. A kept posture serves until that instant. The front-page projection deletes a project's kept row in the same write as any event it applies that can move the posture sooner (a landing, a decision, a ledger entry), and a list writes a row only while the projection has applied no later event of that project than the read saw, so a read taken before an event is never written back after it.8-9-The read is `ProjectApi.standing`, platform-only and on no contract: the public ledger carries no decision times, so it could not say when a narrowing takes effect. The store's default keeps nothing, so the web's dev world and every caller without a store read each project as before; the platform keeps it in D1, in the `standing_postures` table that `apps/platform/migrations/0005_standing_postures.sql` adds.10-11-## Considered Options12-13-- **Keep reading every project on every list** (ADR 0021 as it stood). Always current, but a stage listing a few dozen projects woke each of them on every list, the platform's `/` and the web's `/llms.txt` included.14-- **Keep the posture with a fixed time to live.** Simpler, but a landing or a decision that moves it would show late, or the time would be short enough to save little.15-- **Put the posture on an outbox event.** ADR 0021 turned this down: a narrowing takes effect by the clock, with no event.16-17-## Consequences18-19-- A list reads only the projects whose kept posture is missing or ran out, at most 8 at once.20-- A store that fails to read or write is a miss, never the list's failure, and the miss is logged.21-- Migration 0005 is applied by `bun run bootstrap -- --stage <stage>` before a platform build that reads it is deployed. Until then the projection finds no table and leaves its deletes out, and every read is a miss: lists are as slow as before, not broken.22-- The badge and the ledger stay one value; a narrowing that takes effect by the clock shows on the list at its instant.deleted:docs/adr/0026-the-edge-keeps-the-webs-anonymous-answers.md-37 removed
1----2-status: accepted3----4-5-# The edge keeps the web's anonymous answers, and nothing read for a reader6-7-The web Worker runs behind Workers Cache in each deployed stage (`"cache": { "enabled": true }` in `apps/web/wrangler.jsonc`'s `dev-oscabriel` and `demo` blocks; the top-level `local` stage, which `vite dev` reads, has none). A page the cache holds comes back from the edge without running the Worker, at the `Cache-Control` the page already gives: `branchPage` (`public, max-age=30, stale-while-revalidate=300`) for the pages at `main`, a tag or a commit, `public, max-age=60` for the agents' documents, and the platform's own headers on what the web passes on (raw files, releases, the install script).8-9-Workers Cache keys an answer by the Worker's entrypoint, path, query string and version, and by none of the host, the `Cookie` or the `Authorization` (<https://developers.cloudflare.com/workers/cache/cache-keys/>). It bypasses a request with an `Authorization`, an answer with `Set-Cookie`, and an answer marked `private` or `no-store`. It does not bypass a request that carries a cookie, it honours `Vary` by storing one variant per verbatim value of each named request header, and an answer with no `Cache-Control` is kept by a heuristic: two hours for a 200, three minutes for a 404 (<https://developers.cloudflare.com/workers/cache/configuration/>). So a page whose markup depended on its reader would be handed to everyone, and a route that forgot its headers would be kept for hours.10-11-The web holds that off in one place. `wrangler.jsonc`'s `main` is `apps/web/src/server.ts`: TanStack Start's own server entry, with every answer it gives (pages, server functions, server routes, redirects and errors) passed through `forTheEdge` (`apps/web/src/server/edge-cache.ts`):12-13-- An answer to a request that carries any cookie or an `Authorization`, an answer that sets a cookie, an answer with no `Cache-Control`, and one whose `private` or `no-cache` names a field to strip, is `private, no-store`, which the cache bypasses. Nothing read with a reader's credential is stored.14-- Any other answer the cache may store varies by `Cookie`. It was made for a request with no cookie, and the cache serves it only to a request with none, so a signed-in reader never receives a page kept from a signed-out one, and the browser's own cache drops it when a session begins or ends.15-- `CDN-Cache-Control` and `Cloudflare-CDN-Cache-Control`, which outrank `Cache-Control` at the edge, are dropped.16-17-The pages keep a rule their loaders already followed (`apps/web/src/server/front-page.ts` reads "as the anonymous viewer reads it"): a page the edge may keep reads as nobody. Its loader calls `serverClient(env)` without the request, and only the pages kept nowhere (Today and a decision, `personalPage`) reach the reader's request through Start's server helpers. The rail's signed-in state and Today's count are read in the browser after hydration. So the markup of a `branchPage` page is the same for every reader, and the `Vary` above is a second wall, not the only one.18-19-`apps/web/test/edge-cache.test.ts` holds it: the rule for every kind of answer the web gives, the entry as Start's handler wrapped and nothing else, each server route that hands the reader's cookie on (`/llms.txt`, a project's `llms.txt`, `/` as Markdown, a raw file, `/rpc`) kept nowhere when a session cookie comes with it, and the pages that read the request being exactly the `personalPage` ones. `packages/config/test/web-wiring.test.ts` holds the config: the entry, the cache on in each stage and off at the top, and no `cross_version_cache`.20-21-## Considered Options22-23-- **No Workers Cache.** Nothing to hold, but every page view runs the Worker and its platform reads; a page at a commit, which never changes, costs as much as one at `main`.24-- **A cookie-reading gateway entrypoint with the cache off, forwarding cookie-less requests to a cached inner entrypoint over `ctx.exports`** (Cloudflare's own pattern for authenticated traffic, <https://developers.cloudflare.com/workers/cache/examples/>). Every request would run the gateway, and it needs a second entrypoint in a Worker that TanStack Start's build owns. The `Vary: Cookie` rule gives the same separation inside one entrypoint.25-- **Bypassing only on the session cookie.** More hits for a reader who carries some other cookie, but every cookie the web sets would have to be weighed; the web's readers carry none until they sign in.26-- **`private` with the page's own `max-age` for a signed-in reader**, so their browser could still keep a page. Kept simple instead: `private, no-store` is what the cookie fence checks.27-- **`cross_version_cache`.** Pages would survive a deploy, but a kept page names the hashed assets of the version that drew it.28-29-## Consequences30-31-- Cost: with caching on, every request to the web Worker is billed at the standard request rate, including the static asset requests (`/assets/*`, icons, fonts) and the service-binding calls that are free without it (<https://developers.cloudflare.com/workers/cache/>). A hit runs no CPU.32-- Cost: an answer is held to the Free plan's cacheable size, whatever the account's plan, while that launch limit lasts, and purges run at the Free tier's rate (<https://developers.cloudflare.com/workers/cache/limitations/>).33-- A signed-in reader, and anyone who carries a cookie, always runs the Worker and keeps nothing in the browser; the edge serves signed-out readers and agents.34-- A page at `main` may be served by the edge up to 30 seconds old, and up to five minutes more while one request refreshes it in the background, now to every reader rather than one browser. Purging on a landing would have to run inside the web Worker (`ctx.cache.purge`), since a purge belongs to the entrypoint that owns the answer; nothing purges yet.35-- Each deploy starts the cache cold, since the version is in the key.36-- The host is not in the key: an answer that names its own origin (the agents' documents' `webUrl`) is kept for whichever host asked first. Each stage's web answers on one `workers.dev` host today; a custom domain beside it would share one cache.37-- After a deploy, `curl -sI <web>/<project>/tree/main` twice shows `cf-cache-status: MISS` then `HIT` and `vary: Cookie`; the same request with `-H 'cookie: a=b'` shows `cache-control: private, no-store` and no `HIT`.deleted:docs/adr/0027-code-is-highlighted-on-the-server-in-a-fixed-set-of-languages.md-31 removed
1----2-status: accepted3----4-5-# Code is highlighted on the server in a fixed set of languages6-7-This amends ADR 0019, which drew code in the browser only. A blob page's file and a commit page's first files now arrive highlighted in the document: the web Worker draws them with `@pierre/diffs/ssr`, using the browser's own options (`apps/web/src/features/code/pierre.ts`), and sends each drawing as a declarative shadow root on Pierre's `diffs-container`. The browser paints it with the document, before any script. The browser's own drawing (`File`, or the commit's `CodeView`) still takes over, with line selection, the address's `#L` and the worker pool, but only once it is ready to draw the same code highlighted at once: its module loaded, the pool up, and the code highlighted in the pool first (`prepareFile`, `prepareDiffs`). It then replaces the server's drawing in one render (`apps/web/src/features/code/client-code.tsx`), with every line in the same place. Code the server does not highlight still arrives as plain text and changes once, to highlighted.8-9-The server highlights only within its own limits (`apps/web/src/features/code/prerender.ts`):10-11-- **Languages.** TypeScript, TSX, JavaScript (with `.mjs` and `.cjs`), JSX, JSON, Markdown, YAML, TOML, shell, CSS and HTML, by the names Pierre gives a file's type. Any other language is sent as numbered plain text, as before, and the browser highlights it.12-- **Lines.** At most 400 lines a page. A diff counts both sides, since Pierre highlights both whole files. A commit page considers at most its first 8 files that start open (an added or deleted file past 80 lines starts folded), the ones a reader sees first. `CodeView` highlights the rest as they scroll into view.13-- **The drawing's own limits.** A file past `tokenizeMaxLength`, or with any line past `tokenizeMaxLineLength` (1,000, the same as `maxLineDiffLength`), is sent plain, so a minified file is never tokenized on the server.14-15-Both sides decide from the page's own data, so the browser knows which code arrived highlighted without being told. The Worker runs Shiki's JavaScript regex engine, since a Worker may not compile WebAssembly. Its build resolves `shiki` to core alone (`apps/web/src/server/shiki.ts`) and `@pierre/theming/themes` to an empty collection (`apps/web/src/server/pierre-themes.ts`), through a plugin in `apps/web/vite.config.ts`. So it bundles the eleven grammars it names, as chunks off its entry, and no other grammar, theme or WebAssembly. Pierre will not resolve a grammar or a theme by name in a Worker's global scope (`isWorkerContext`), and `registerCustomLanguage` only registers a loader for that resolution. The server therefore loads each grammar and the token theme itself and attaches them to Pierre's shared highlighter (`apps/web/src/features/code/prerender-server.ts`).16-17-## Considered Options18-19-- **Keep drawing in the browser only** (ADR 0019 as it stood). The plain text already matched Pierre's measures, so nothing moved. But the code changed colour after hydration, and that swap was the largest paint on code pages.20-- **Highlight on the platform and keep the HTML in R2.** Each drawing would be made once for good. But it would need a new public read for the HTML, and every Worker reading it would take a hop on every code page.21-- **Every grammar on the server.** About 10.7 MB of grammars, far past the web's byte budget.22-- **Ship the HTML in the loader's data.** The browser could then adopt it on any page, but the document would carry every drawing twice: once as markup and once as a string in the router's state. Instead the loader draws the code ahead, the drawing is kept by its blob ids until the render reads it, and the browser needs nothing but the markup.23-24-## Consequences25-26-- **Bytes.** The web Worker's JavaScript grows from 1,528,378 to 2,773,744 bytes (budget 4,075,000), about 940 KB of it grammars. Its entry stays at 308,418 (budget 801,000): the grammars and `@pierre/diffs/ssr` load by dynamic import on a page's first highlighted code. `apps/web/test/production-bundle.test.ts` holds the Worker to exactly these grammars, none on its entry, and no theme collection or Oniguruma. It also holds the chunks every page preloads to no grammar and nothing of this module.27-- **CPU.** Measured in the dev world's workerd, highlighting TypeScript takes about 0.14 ms a line warm: 2,400 lines about 315 ms, 600 about 85 ms, 400 about 57 ms, 100 about 18 ms. A fresh isolate's first 400-line file took 180 ms, which includes making the highlighter and compiling the grammar. 2,400 lines would cost hundreds of milliseconds, so the server's limit is 400 lines, well below the browser's.28-- **Document size.** A highlighted line costs about 700 to 1,600 bytes of markup, depending on how many tokens it holds: a 400-line TypeScript file is about 640 KB. Each drawing also carries Pierre's stylesheet and icons (about 48 KB). Both compress well: an 11-line file's page is 100 KB raw and 16 KB gzipped.29-- **Cache.** The drawings are kept in the isolate (`prerender.ts`): at most 24, and 8,000,000 characters of HTML, keyed by blob ids and path, which never change what they name. A file read again is not drawn again. A loader that finds its drawing evicted before the render makes it again, and the render streams it.30-- **The page.** A page reached by a link, not loaded, has no server drawing. It shows the plain text, which the browser's drawing then replaces. A split diff (`?style=split` on a wide screen) is plain until drawn, as before, since the server draws unified only.31-- **Without script.** A highlighted file has no `#L` anchors: Pierre's lines live in a shadow root, which a fragment cannot reach. Plain text keeps its anchors.deleted:docs/adr/0028-the-cli-exits-with-the-code-a-refusal-calls-for.md-27 removed
1----2-status: accepted3----4-5-# The CLI exits with the code a refusal calls for6-7-Until now every refusal ended the CLI with 1, so a script or a harness that wanted to know what to do next had to read stderr or ask for `--json`. Now the code comes from sysexits(3) and follows the refusal's fixed `retryable`, in `packages/protocol/src/exit-code.ts`:8-9-- A retryable refusal is 75 (`EX_TEMPFAIL`): run its `next`, and the same thing can pass.10-- A final refusal is 65 (`EX_DATAERR`) when what was sent has to change, 66 (`EX_NOINPUT`) when what was named does not exist or no longer stands open, and 77 (`EX_NOPERM`) when the caller may not do it. A table fixes one of the three per final tag. Its type is keyed by exactly the final tags, so a new final tag fails the typecheck until it has a code, and a retryable tag cannot be given anything but 75.11-- Refusals met together, as stage 1's are, end with the first of 77, 66, 65 and 75 among them: who is asking comes before what was named, which comes before what was sent, and 75 only when every one can be retried.12-- Not being signed in is 77, a platform that does not answer is 69 (`EX_UNAVAILABLE`), a misuse stays 2, and anything else stays 1.13-14-Every command prints its refusals through `endRefused` (`packages/protocol/src/cli.ts`), which fails with `Reported` and their code, so a command cannot print a refusal and exit with another code. The code is the CLI's projection of the union, like the `--json` envelope: `/llms-full.txt` and the skills list each refusal's code from the same table. `packages/protocol/test/exit-code.test.ts` pins every tag's code. `apps/cli/test/build.test.ts` holds the built binary to it.15-16-## Considered Options17-18-- **Keep 1 for every refusal.** Nothing to learn, but the code says nothing a harness can act on, and `retryable` was already fixed per tag.19-- **One code per tag.** Exact, but 45 codes make a lookup table nobody keeps in their head, and the tag is already in `--json`.20-- **64 (`EX_USAGE`) for a misuse.** sysexits' own code, but effect/cli and most command lines use 2, and scripts already read it.21-- **76 (`EX_PROTOCOL`) for every final refusal**, as some tools use it for "the remote rejected the payload". It would merge three answers a caller acts on differently: change what you sent, name something that exists, or get let in.22-23-## Consequences24-25-- A script that checked for exit 1 after a refusal now sees 65, 66, 75 or 77; it should test for nonzero, or for the code it means.26-- `PostureChange` is 65, as a declined waiver's `Weakened` is: it is the refusal a declined decision stands for, so the answer has to change. Its row in the reference docs now says so.27-- A code is a public contract, like a tag: change one only with notice.deleted:docs/adr/0029-a-stale-answer-names-who-moved-each-conflicting-path.md-26 removed
1----2-status: accepted3----4-5-# A stale answer names who moved each conflicting path6-7-When an answer's merge onto main conflicts, `StaleBase` named the paths and nothing more, so whoever rebased had to dig through main's log to learn whose change they were resolving against. Now it carries `movedBy` as well, an optional field that is never empty. For each conflicting path the platform landed, it names the landing that last changed that path: its commit (`landing`), the person accountable for it (`author`), and the ask it answered or opened (`ask`, absent for a decider's own landing). The renderer puts each one after its path: `src/parse.ts (last changed by alice in bb5da9e, for parse-iso)`.8-9-The merge step finds them (`packages/project/src/answer-runs/movers.ts`), after the Lander has said the merge conflicts:10-11-- A three-way merge conflicts in a path only where main changed it since the answer's base. So the step walks main's first-parent line back from the main it merged onto, through `RepoHost` (the code reads' own tree lookups, shared as one view), and stops at the base or after `MOVER_SCAN` commits (50). For each path it takes the newest commit whose entry differs from its parent's.12-- It asks the project's record for those commits' landings (`AnswerQueue.landings`, which the Workflow reaches through the project's Durable Object), and names a path only when its commit is a landing there. A trailer in a commit never reads as one, as on the code pages.13-- The step reports the names in `MergeConflict`, and the landing lifecycle copies them onto the refusal, so the transition stays pure. A merge step recorded before this change has no `movedBy`, and still decodes.14-- The walk never fails the merge: a repo it cannot read, or anything else that goes wrong, leaves `movedBy` out and logs why.15-16-## Considered Options17-18-- **The Lander reads `Ask:` trailers and the author line from `git log` in its container.** One `git log` where the clone already is. But there are three Lander adapters to teach it, its wire would grow, and the names would rest on trailers rather than the record.19-- **The project's Durable Object walks the history in `advanceAnswer`.** It already holds the record, but the walk's reads would run under the project's one lock and stall every other call to the project.20-- **Every landing since the base that changed each path.** More complete, but the list has no bound. The newest is the version on main that the rebase meets, and `myr why` gives each line's landing.21-22-## Consequences23-24-- A conflict now costs one first-parent log read of up to 51 commits, plus each conflicting path's entry at each commit since the base. A clean merge costs nothing more.25-- Everything `movedBy` names is already public: the paths in `conflicts`, and the landings' commits, authors and asks on main. It reaches the verdict note on the answer's head, `myr status`, MCP and the web, which write it through the one renderer.26-- The decider's `land` names movers the same way, through the same step.deleted:docs/adr/0030-the-landing-sits-outside-the-shell-and-the-front-page-moves-to-asks.md-29 removed
1----2-status: accepted3----4-5-# The landing sits outside the shell, and the front page moves to `/asks`6-7-This amends ADR 0022, under which every page sat in the control room's shell. The web's `/` is now a landing: one page that says what the platform is and leads to the open asks. It is the one page drawn outside the shell. Its route names `staticData: { shell: "bare" }`, and `AppShell` then draws the page alone, with no rail, bars, overlays or skip link. `apps/web/test/landing-route.test.ts` holds that only `/` names it.8-9-The front page, every open ask across every project, moved unchanged from `/` to `/asks`, which the rail already called Asks. A signed-in reader's own page is `/home`, and the docs are `/docs`. `asks`, `home` and `docs` joined `reservedProjectNames`, so no project can be named after a page the web serves.10-11-The landing is the same page for everyone, so the edge may keep it (`branchPage`, ADR 0026). Its server GET answers in this order (`landingHandler` in `apps/web/src/server/front-page.ts`):12-13-1. A request for Markdown gets `/llms.txt`, as `/` gave before and `/asks` still gives. Agents reach the web at `/`.14-2. A request that carries the session cookie gets a 302 to `/home`, kept nowhere. Workers Cache serves the kept landing only to a request with no cookie (it varies by `Cookie`), so a signed-in reader always reaches the Worker and is sent on.15-3. Anyone else gets the landing.16-17-A signed-in reader who reaches `/` by a link, with no document load, is moved to `/home` once the browser learns who they are (`whoAtom`). The wordmark leads to `/`.18-19-## Considered Options20-21-- **Keep the front page at `/` and put the landing elsewhere** (`/about`). Nothing moves, but a first-time reader lands on a list of asks with no word on what they are, and a signed-in reader has no home to arrive at.22-- **Draw `/` differently by cookie.** One address, but a page the edge keeps would then depend on its reader, which ADR 0026 forbids. The redirect keeps the landing's markup the same for everyone.23-- **A second site for the landing and docs.** A free hand with the look, but a second deploy path and a second set of byte budgets in the last week, and the docs would lose the web's Markdown pipeline and its reads.24-25-## Consequences26-27-- Links that meant the front page (Open asks, a filtered list, a crumb) now name `/asks`; a filtered list is `/asks?kind=bug&take=open`.28-- The landing follows DESIGN.md: one paper ground, ink, hairlines, the type scale, and mono only for what a terminal prints or takes. It is the one page written to explain rather than to operate, and DESIGN.md says so.29-- A bookmark of `/?kind=bug` now opens the landing, not a filtered list.deleted:docs/adr/0031-an-import-keeps-its-source-and-a-repeat-by-the-initializer-converges.md-21 removed
1----2-status: accepted3----4-5-# An import keeps its source, and a repeat by the initializer converges6-7-An imported project (ADR 0010) is a copy of a public repo, read-only here and not run by its maintainers, and its own page said nothing of where it came from: the import's URL and branch arrived in `initProject` and were dropped once the tip was adopted. The project's row now keeps them as `importedFrom`, the shape `initProject` takes (`ImportSource`), and `projectPolicy` names them beside the policy, so the project's page, the CLI's `policy` and MCP show "Imported from" from one read. A project that started empty has no such field.8-9-The thirty-eight imports already on a stage were made before the field existed, and the platform has no operator-only write to a project. Rather than add one, `initProject` converges: asked again by the project's initializer with an `import`, for a row whose adoption landed in the call that made it (its adoption landing's `landedAt` is the row's `createdAt`, where a first push lands later), it writes the source if the row keeps none, or answers as the first call did if the row keeps the same one. Any other repeat, by someone else, with another source, or for a project that started empty, is `ProjectExists` as before. `import-examples --sources` runs that call once per import the ledger records on the stage, listed by the platform or not.10-11-## Considered Options12-13-- **An operator-only `setSource` contract.** A second write path to a project's record, with its own audience and surface, for a one-time backfill of forty rows. Converging the write that exists keeps principle 8 (re-running an operation converges) and adds nothing to the public contract.14-- **Look the name up in the docs' imported list on the web.** No backend change, but it covers only the curated imports, not a project someone imports with `init --import`, and the page would state a source the platform never recorded.15-- **Keep the source on `ProjectListing`.** The listing is the front-page projection's, built from events; a project's own record is the right home, and the listing has no row for an import adopted before adoptions were heard.16-17-## Consequences18-19-- `ProjectRow` gains an optional field, decoded on read; a row without it still decodes, so no migration.20-- `import-examples` treats a project the ledger records as this stage's import as known, whether or not the platform lists it, so the seventeen unlisted imports are never taken for new ones.21-- A first push that lands in the same instant as its project's creation would read as an import's row; two separate calls never share an instant on a real clock, and tests move the clock between them.deleted:docs/adr/0032-a-project-is-named-by-its-owner-and-the-forty-keep-their-keys.md-28 removed
1----2-status: accepted3----4-5-# A project is named by its owner, and the forty keep their keys6-7-A project's name was one lowercase word, `datekit`, and that word was its address on the web (`/datekit`), at the gateway (`datekit.git`), in every contract's `project` field, and inside the platform: the Durable Object's id, the Artifacts repo's name, the code cache's key and every projection row. One flat namespace cannot hold two people's `notes`, says nothing about who a project belongs to, and gives an imported repo an address that hides where it came from.8-9-A project's name is now `<owner>/<name>`. An **owner** is a person's handle, lowercased (`oscabriel/datekit`), or a **source namespace**, the host and account a repo was imported from, from a fixed list of hosts (`github.com/pallets/click`, `codeberg.org/dnkl/fuzzel`). A name is a person or a source namespace, never both: handles hold no dot and hosts always do. Organisations will be a second kind of owner in the same place. The web serves a project at `/<owner>/<name>`, the gateway at `<platform>/<owner>/<name>.git` (a claim fork at `…/<name>--<ask>--<handle>.git`), the CLI's `--project` takes the full name, and every contract's `project` field carries it. `ProjectName` keeps its identifier and means the full name; `Owner` and `ShortName` are its parts; one parser in `packages/protocol/src/ids.ts` reads it and lowercases on the way in, and `packages/protocol/test/project-name.test.ts` holds it.10-11-Inside the platform a project keeps a flat **key**: the Durable Object's id, the repo's name, the code cache's key and the projection columns. The key is a pure function of the name: the name with each `/` replaced by `__` (`oscabriel__foo`, `github.com__pallets__click`). A segment never holds two separators in a row, so `__` occurs in no name, even one whose segments hold `_` (`alice/the_thing`), and the key reverses. The forty projects made before this decision keep the keys they have (`datekit`, `click`): `packages/protocol/src/legacy.ts` lists each with its name, `keyOf` and `nameOfKey` consult it first, and `ProjectName`'s decode accepts a bare legacy key and gives its name. So a stored event, a projection row, a Durable Object's own id, an old clone's remote, `--project datekit` and MCP's `project: "datekit"` all read as `oscabriel/datekit`, and nothing stored is migrated. The web answers `/<legacy>` and every address under it with a 301 to the full name; the gateway serves `<legacy>.git` and its forks as aliases, with no redirect, since git follows one only on its first request. The table is a cartridge: re-key the forty and delete it.12-13-Owning a namespace gives one right: to make projects in it. `initProject` refuses `NotYourNamespace` when the name's owner is neither the caller's handle nor the source namespace of the import's URL. Nothing else moves: deciders stay per path from the config folder, an import's importer stays its fallback decider, and `setEnv`, policy edits and custody are as they were. A namespace is not a policy right.14-15-## Considered Options16-17-- **Rename the Durable Objects and repos to the new keys.** A clean store, but a Durable Object cannot be renamed and an Artifacts repo cannot be moved: each of the forty would be copied, with its events and its storage, on two stages, days before the demo is recorded. The alias costs a table of forty lines.18-- **A registry table (D1, or one Durable Object per owner) mapping each name to a key.** It would also serve uniqueness and a person's project list, but it is a second source of truth, consulted on every call, for a mapping that is pure for every project but forty. Uniqueness is the key's: two names never share one.19-- **Keep flat names and add the owner as a field.** No address changes, but `/notes` still belongs to whoever took it first, and the user asked for `/owner/repo`.20-- **Every import under the importer's handle** (Gitea's model). Honest about who brought it, but the address then hides the source, two people's imports of one repo get two addresses, and the host-path address (ADR 0033) would need a lookup by source. The source namespace is the address and the provenance at once; a person may still import under their own handle.21-- **Give the owner policy rights** (decide everywhere, set env). Simpler to explain, but the platform's rights are per path in the config folder on `main`, where every reader can see them; a namespace right would be a second, invisible kind.22-23-## Consequences24-25-- `ProjectName`'s grammar widens; the short name allows `.` and `_` with single separators (`commander.js`), so an import keeps its own name. The first segment may not be a word the web serves its own pages at, and sign-up refuses those words as handles.26-- `repoKind`, fork names, layer repos and the well-known skill's URL carry the key, so the forty's URLs there are unchanged.27-- A projection row whose key decodes to no name (a torn-down throwaway) is skipped by the lists.28-- The demo's recorded addresses and commands stay true through the alias.deleted:docs/adr/0033-a-repo-is-imported-from-the-web-and-its-host-path-offers-the-import.md-25 removed
1----2-status: accepted3----4-5-# A repo is imported from the web, and its host path offers the import6-7-An import (ADR 0010, ADR 0031) could be made only from the CLI, `init --project <p> --import <url>`, by someone signed in there. The platform's point is that any public repo can be brought over and worked on through the gate, and that path asked a newcomer to install a CLI first.8-9-`/import` is a page for a signed-in reader. It takes a public HTTPS clone URL, an optional branch, the owner (a choice among the namespaces the reader may write to: their own handle, and the URL's source namespace when its host is on the list, which is then the default) and the name, prefilled from the URL's last segment. It calls the one existing contract, `initProject` with `import`, which gains the web as a surface; the platform clones any public git URL through Artifacts, so no host's API is called. A refused import reads as its refusal, with its next step.10-11-A **host path**, `/<host>/<account>/<repo>` on the web (a trailing `.git` is stripped), is a project's address when one exists at that name (ADR 0032). When none does, the page offers the import: the same form, prefilled with the URL rebuilt from the address and the owner fixed to the source namespace; signed out, it shows the sign-in link. It never imports on a GET: a crawler following `/github.com/x/y` makes nothing. A project someone imported under their own handle is not found from its host path: there is no index by source, and the address at the source namespace stays free for a copy at its source path.12-13-## Considered Options14-15-- **Import on arrival at the host path.** The address the user asked for, `myr.technology/github.com/<owner>/<repo>`, would then "just work", but any link, prefetch or crawler would create projects, and a project needs a person who answers for it. The offer keeps the person's press.16-- **Connect GitHub and pick from a list** (the bulk import GitHub and GitLab offer). It needs OAuth scopes and a host's API per host; the clone URL covers every host at once, codeberg's included. Out until someone asks for it.17-- **A mirror that keeps following the source.** Declined again (ADR 0010): inbound sync is a second way onto `main` that skips the gate.18-- **Find a project by `importedFrom` from its host path.** It would show a handle-owned copy at `/github.com/x/y`, but then two readers would reach different projects through one address depending on who imported first, and the index is a projection the platform does not keep.19-20-## Consequences21-22-- `servedOn.initProject` includes the web; the contract's payload is unchanged.23-- A new refusal, `NotYourNamespace` (ADR 0032), can come back to the page.24-- An import still brings no tags (ADR 0019); the operator's backfill stands.25-- The import page is its own chunk, so the root's preloads do not grow.deleted:docs/adr/0034-a-decision-for-a-path-takes-effect-at-its-deciders-threshold.md-22 removed
1----2-status: accepted3----4-5-# A decision for a path takes effect at its deciders' threshold6-7-A project's deciders are a list of handles per path in the config folder (`Policy.deciders`, `{handles, paths}`), and a decision takes effect on one decider's choice. One peer platform read in October 2026 keeps who may move a ref as a typed value in the repository itself: a list of keys and a count, per ref, evaluated when the ref is updated, and its web states the rule as one sentence ("1 out of 3 have to accept"). Another answers "may this key push here" per push from the host that keeps the repo. Both put the rule where the clone can read it and derive the sentence from the value. Myr already does the first half: the rule is typed code on main. What it lacks is the count.8-9-The decision: a deciders entry takes an optional `threshold`, default 1. A decision whose paths fall under an entry with a threshold of n takes effect only once n distinct deciders have chosen the same choice; each of them is credited `Decided-by`. Until then the decision is waiting, never refused, and the status line says so: "Waiting on decision dec-000001 · 1 of 2 deciders have accepted · a decider's move". If it expires first, its default takes effect as it does today, so "doing nothing lets nothing in" still holds. The count is evaluated in the decision lifecycle's `transition(state, command, now)` and nowhere else; the Policy page reads "2 of 3 deciders for `src/**`" and Today's row shows "1 of 2" under the default. This is the smallest version: no weighting, no per-kind thresholds, no delegate groups.10-11-## Considered Options12-13-- **A threshold on the project, not the path.** One number is easier to explain, but the rules are already per path, and a project that wants two deciders on `src/**` and one on `docs/**` would have to choose.14-- **Evaluate the count at the gate's decider stage instead of in the lifecycle.** The gate would then hold decision state, which Principle 12 keeps in lifecycles; the stage reads the decision's outcome as it does now.15-- **A bot as a decider, to make a count up.** An agent holds no account and no credit (ADR 0016); a threshold counts people.16-17-## Consequences18-19-- `Policy.deciders` gains an optional `Schema.Int` field in `packages/protocol`, so the CLI, MCP and the web derive it; a missing field is 1 and no stored policy changes meaning.20-- The decision lifecycle's model tests (`packages/project/test/*.model.test.ts`) gain histories where n deciders choose in any order, choose differently, or run out of time, and the planted bug is a decision that takes effect at n minus one.21-- The web's status line, Policy page and Today row take the count from the typed value; a count of deciders is a rule, never a score, so the No Score Rule is not touched.22-- Not built in the competition window. No new refusal tag and no new dependency.deleted:docs/adr/0035-a-repos-host-is-a-port-behind-the-gateways-custody.md-20 removed
1----2-status: accepted3----4-5-# A repo's host is a port behind the gateway's custody6-7-One peer platform read in October 2026 splits hosting from viewing: a repository lives on a host chosen when it is made, a web view reads the whole network, and a second, read-only view of the same records exists, which proves the view is replaceable. Myr already has that shape without having said so: every repo is reached through `RepoHost`, one port with one contract every adapter passes (`packages/artifacts/test/repo-host-contract.ts`, Principle 6), and the gateway (ADR 0004) holds every credential, enforces custody and visibility, and refuses in git's own output.8-9-The decision: the gateway's custody is all a host must honour. A host is whatever passes the `RepoHost` contract and takes its writes only from the gateway and the platform's own landings (ADR 0014); it holds no rule, no credential of its own that a client can reach, and no second way onto `main`. Adding a host (a second storage product, a self-hosted git server, a machine of the project's own) is one adapter in the owning package, not a rewrite of the platform, and the web, the CLI and MCP keep reading through the same contracts whichever host answers. Nothing is built for this now; the ADR exists so that nobody designs a second host as a second gateway.10-11-## Considered Options12-13-- **A host per project, chosen at creation, as the peer does.** The seam is the same; the choice is deferred until a second adapter exists, since a choice among one is noise in the init form.14-- **Let a host enforce its own rules** (membership on the host, as the peer's host does). It would be a second rule engine beside the typed config folder on main, with the rules in a place a clone cannot read.15-16-## Consequences17-18-- A second host adapter must pass `repo-host-contract.ts` unchanged and must refuse any write that does not come through the gateway; a test for the second point joins the contract when the first such adapter lands.19-- The visibility boundary stays the repo boundary (ADR 0007): a layer is a repo on a host, and a host sees nothing of what a layer means.20-- Not built in the competition window; no dependency is added.deleted:docs/adr/0036-a-vouch-carries-its-reason-and-the-landing-it-followed.md-22 removed
1----2-status: accepted3----4-5-# A vouch carries its reason and the landing it followed6-7-A vouch is a line in the project's vouch file on main: a handle, and whether the line denounces. One peer platform read in October 2026 makes a vouch a public, revocable record with an optional reason and a pointer to the work it was made after, offered to a maintainer right after a contribution lands, and with no number attached: it changes what a person may do, not how they rank. That is the vouch Myr's glossary describes, with two fields missing.8-9-The decision: a vouch line takes an optional `reason` and an optional `for`, the SHA of the landing it followed. The Policy page shows each as the line it is ("vouched by ines-v, for 9b1c3e5 (format-ordinal)"), with the landing linked, and never a count. After that, Today's "Newcomers to welcome" gains a one-tap Vouch whose consequence reads "adds a line to the vouch file and lands it with you as Decided-by": it is a decider's choice, so it is one of the web's permitted writes, and the line lands through the gate from the decider's working fork like any other change to the config folder. A denouncement stays what it is (it bars proposals) and is shown as its line, never as a warning label beside a name. There is no decay: the record window (30 days) already expires what trust reads.10-11-## Considered Options12-13-- **A vouch as a trailer on the landing** (`Vouched-by`). It would ride with the clone, but a vouch is about a person, not a tree, and it must be revocable; a line on main can be removed by a landing, a trailer cannot.14-- **A count of vouches shown beside a handle.** "Vouched for by 3 people" is a score; PRODUCT's "No scores" and DESIGN's No Score Rule forbid it.15-- **Vouches visible only to the signed-in.** The vouch file is public code on main; hiding its reading would make the web say less than the clone.16-17-## Consequences18-19-- The config schema in `packages/protocol` (the vouch line's parse) gains two optional fields; an old file reads as before.20-- The Policy page's vouch rows gain a reason and a linked landing when present; `apps/web/test` holds that no count of vouches is drawn.21-- The Today choice is a new contract (a decider's decision whose effect is a landing of the vouch file), in a later ADR of its own if it needs one; the line format needs none.22-- Not built in the competition window; no dependency is added.deleted:docs/adr/0037-the-platform-signs-every-landing.md-22 removed
1----2-status: accepted3----4-5-# The platform signs every landing6-7-A landing is the platform's commit (ADR 0014), and "main moves only by a landing" is the product's first promise, but a clone cannot check it: the commits on `main` look like anyone's. One peer platform read in October 2026 signs the whole of a node's references each time they change, so anyone with a clone can verify every later update of the repository without the host. Myr needs less than that: one key, one kind of commit.8-9-The decision: the platform signs each landing commit with one key held in the decoded env (`LANDING_SIGNING_KEY`, decoded once in the platform's env Layer, Principle 2), and publishes the public key at `/.well-known/` on the platform. `git log --show-signature` in a clone then proves offline that every commit on `main` is the platform's, and a commit on `main` without that signature is, by that fact, one the gate never saw. The web's Provenance block gains one entry, "Signature", naming the key. Nothing a contributor pushes is signed by the platform, and the platform never signs a fork's commits.10-11-## Considered Options12-13-- **Sign every ref, as the peer does.** It needs a signing identity per node and a protocol between nodes; Myr has one writer of `main` and one claim per fork.14-- **Ask contributors to sign their commits.** It would add a key to every first claim, and it proves authorship, not that the gate ran. Author signatures can be kept when present, apart from this.15-- **Keep the proof on the platform** (a verdict note per landing, which exists). It is a fetch away and the platform must be reachable to serve it; a signature is in the commit and needs nobody.16-17-## Consequences18-19-- A signing library the repo does not have (Ed25519 or OpenPGP signatures over git's commit buffer, verifiable by stock git) is a new dependency, and so needs the user's sign-off before any of this is built.20-- `LANDING_SIGNING_KEY` joins `apps/platform`'s `.env.schema` as a sensitive value the user sets; a stage with no key refuses to start, as a bad env does today.21-- A test holds that an unsigned push to `main` is still refused at the gateway (the signature proves a landing; it never admits one), and that the Lander's commit buffer verifies against the published key.22-- Not built in the competition window.deleted:docs/adr/0038-the-ledger-is-a-note-on-main.md-22 removed
1----2-status: accepted3----4-5-# The ledger is a note on main6-7-"Export is `git clone`": code, asks and credit trailers leave with a clone, and verdict notes take one more fetch of `refs/notes/*` (ADR 0010). What a clone does not carry is the ledger (the project's layers, counts, commitments, releases and posture changes) and its decisions; both live in the platform's record alone. One peer platform read in October 2026 keeps every social object as commits in the repository under refs of its own, so a clone carries the code, the discussion and the rule set at once. Myr's rule set is already on main; the ledger is the gap.8-9-The decision: the platform writes the ledger as a note on each landing that changes it, under `refs/notes/ledger`, append-only, in the same typed form the Ledger page and `projectPolicy` read. The fetch that brings the verdict notes brings the ledger too, so PRODUCT's sentence covers it with no new step. Only the platform writes these refs: a fork takes branches only (Principle 7, `apps/platform/test/gateway.test.ts`), so a contributor can neither forge nor erase an entry. Decisions follow the same path later, in a note of their own, once their lifecycle's record is settled enough to be a public shape.10-11-## Considered Options12-13-- **Commits under a ref of their own** (`refs/ledger`), as the peer's objects are. A commit DAG allows concurrent writers to merge, which the ledger has not got: one platform writes it in order. Notes are what git already fetches with the verdicts.14-- **A file in the config folder on main.** It would make every ledger change a landing on `main`, which moves the project's history for a bookkeeping entry, and an answer could then touch it.15-- **Leave the ledger on the platform** and say so. This is where the docs stand in the window: PRODUCT names the ledger as the one record not yet in the clone.16-17-## Consequences18-19-- The Lander's bookkeeping push (ADR 0014) gains one more note, each on its own, after `main` has moved.20-- The Ledger page names the ref the note is fetched from, as the verdict notes are named.21-- `packages/project` gains a writer of the note and a reader that decodes it with Schema (Principle 2), and a test that the note's entries equal the ledger the platform serves.22-- Not built in the competition window; no dependency is added.deleted:docs/adr/0039-the-webs-rows-carry-the-state-on-the-mark-and-the-inspector-widens.md-25 removed
1----2-status: accepted3----4-5-# The web's rows carry the state on the mark and the word in ink, and the inspector widens for its commands6-7-Two rules of DESIGN.md changed in October 2026, after a heuristic critique of the front page, a project home and an answer page (31 of 40) and a source-first reading of a peer platform's web UI, taken as values and patterns only. This records the two changes and why, so that nobody restores the old rules as a tidy-up.8-9-**The row's state word is ink.** DESIGN.md's row anatomy said "the state word in its role": Waiting in ochre, Refused in red, Landed in green, on every row. Measured on a project home, that painted ochre thirty-one times on one screen, and the one word that asks the reader for a move, "Open to take", was ink and had no weight against it. The peer's lists make the opposite mistake, a tinted square and no word, and are loud for it. The rule is now the Mark Carries Rule: in a row the colour belongs to the mark, the word is ink at 500, except Refused (red) and Landed (green), which are final and rare. The status line, the state badge and the inspector keep the coloured word, where it is said once beside its sentence. The Word First Rule is untouched: every mark still has its word.10-11-**The inspector is 20 rem from `shell` and 22 rem from `codefacts`.** At 19 rem with 16 px of padding, a 6ch hang and a 32 px Copy, the inspector's command line held about 27 characters, so `myr claim <ask> --project <project>` and `git clone` of a project wrapped to three or four lines. The inspector exists to hand a command over; it was the hardest thing on the page to read. The peer opens its side column at 20 rem and only from 1350 px, and truncates its commands; Myr shows a command whole, so it makes room instead: 20 rem, 22 rem from 1440 px, and the command line in a bleed form inside the inspector (pane-wide, hairlines top and bottom, a 28 px icon-only Copy, a 2ch hang), which gives about 32 and 36 characters a line. Main keeps a 556 px row at 1164 px and an 800 px one at 1440 px.12-13-Beside them DESIGN.md took, within its rules, a pressed-surface token for a selected row under the pointer, the time slot filled on every row, a two-line want below `tablet`, `files · +n −m` on a subject's meta line, Provenance in the one block shape, the path split in the code header and tree, the `kbd` look in the keys dialog, the Landed page told as a sentence before its hashes, and posture said once per page. None adds a colour to a non-state thing, a score, a fill, a shadow, a radius above 2 px or text under 13 px.14-15-## Considered Options16-17-- **Keep the coloured word and thin the lists.** Fewer rows per screen would not change what a page of waiting asks looks like; the stripe is the rule, not the count.18-- **Collapse the inspector on laptops** and let main have the width. The facts and the command are what the page is for; hiding them to fit them is backwards.19-- **Truncate commands in the inspector**, as the peer does. A command copied whole but read in part is the one thing the control room must not do.20-21-## Consequences22-23-- The rules are decided in DESIGN.md and not yet in the code; its "Decided, not yet drawn" list names each file, and the build issues are cut from it. The tokens (`--surface-2`, and its contrast pairs in `apps/web/test/tokens.test.ts`) are in `styles.css` now.24-- Tests that key on a row's state word by colour class must key on `data-mark` and the word instead, as DESIGN.md's "Do" already asks.25-- The critique's remaining findings (heading order in the inspector, the intro paragraphs past 70ch, the toolbar's inset) are polish, not rules, and are not recorded here.deleted:docs/adr/0040-a-discussion-is-freeform-and-a-decider-turns-it-into-an-ask.md-36 removed
1----2-status: accepted3----4-5-# A discussion is freeform, and a decider turns it into an ask6-7-A proposal works for someone who already knows the change they want. Most wants start vaguer than that: a bug half-understood, an idea that needs a maintainer's context, two people who disagree about the right shape. Today that talk has to happen somewhere else, or as proposals that get declined and proposed again. PRODUCT declined discussion threads for the competition window, "not now, not never".8-9-The decision: a project has discussions. A discussion is a public, freeform thread: a title, then posts in Markdown, each by a handle, in order. Anyone signed in and not denounced may open one or post in one. A discussion carries no type, kind, label, vote or reaction, and it lands nothing. The typed part starts when a decider turns a discussion into an ask. One call makes a proposal from the discussion and starts its first draft round (ADR 0018), with the discussion's posts as the want the agent drafts from. From there nothing changes: the decider can draft again with a note, the draft runs red first, and the decider accepts or declines it in Today. Accepting it runs the unchanged `accept`, so the ask opens through the gate like any other.10-11-The details:12-13-- **Credit.** The proposal's proposer is the person who opened the discussion, credited as `Asked-by` when the ask opens. When turning a discussion into an ask, the decider may name participants whose posts shaped it, and they are credited as `Advised-by` on the same landing. The trailer exists already.14-- **Vouches.** A credited landing counts as the landing a newcomer is welcomed after (ADR 0036). Someone who is not vouched for and is credited on an opening, as `Asked-by` or `Advised-by`, appears in Today's "Newcomers to welcome" with that landing as the vouch line's `for`, as an answerer does. The vouch is still the decider's choice, and its default is no vouch. A project's trust rules may ask for more of the Record before Today offers it.15-- **The drafter reads the thread as quoted text.** Anyone can post, so anyone can try to steer the agent. The context step puts the discussion's posts in the prompt as quoted content, marked as the words of the named handles and not as instructions, and leaves hidden posts out. Within its byte budget it keeps the opening post and the latest posts. The decider's note, when there is one, is the only instruction beside the platform's own. A draft still lands nothing without a decider, and its check still runs red first on the Checker.16-- **Moderation.** A denouncement bars posting as well as proposing. A decider of the project may hide a post with a reason: its text leaves every page and the drafter's context, and the thread shows the line in its place ("hidden by kai: off-topic"). A decider may close a discussion with a note, and a discussion turned into an ask closes with a link to its proposal. A discussion with no post for 60 days closes itself. A decider may reopen any closed discussion.17-- **Rounds stay silent.** A discussion is about a want, before or around an ask. It never attaches to a round or an answer, where the gate's verdict is the only voice.18-- **The record.** The Project Durable Object keeps each discussion, as it keeps proposals. When a discussion closes, the platform writes it to `refs/discussions/<id>` as one commit that holds its posts, so a clone that fetches the ref carries the talk with the code. Only the platform writes these refs, since a fork takes branches only (Principle 7). Hiding a post in a closed discussion rewrites its ref without the post's text. A clone that fetched the ref before keeps the text, and the Discussion page says so.19-- **Visibility.** Every discussion is public. A project's layers never reach one: a discussion reads no layer, and the drafter's context step reads none either (ADR 0018).20-21-## Considered Options22-23-- **Typed shaping.** Versioned amendments to a draft, each run red first, with named stances (satisfied, blocking with a reason) put to the decider as evidence, and a decision default that flips to accept once no stance blocks. It would show progress toward consensus as data. It also asks everyone in the talk to work in the gate's terms before anyone knows what the ask is, and stances drift toward a vote count. The decider's draft rounds already climb toward the right check; the talk before them does not need to.24-- **No discussion at all**, as PRODUCT said for the window. Talk then happens on another site, where none of it reaches the drafter, the credit or a vouch.25-- **Threads on asks and answers**, as forges do on issues and pull requests. A thread on a round invites review by comment, which a finish replaces, and a thread on an ask duplicates `ask flag`. A discussion may link an ask; it does not hang off one.26-- **Each post as a commit under the discussion's ref, pushed as it is written.** A clone would carry the live talk, but every post would be a push to Artifacts and an event `OnPush` must recognize and ignore (ADR 0014). Writing the ref once, at close, keeps pushes per discussion to one.27-- **Votes or reactions on posts or discussions.** A count beside a want is a score by another name, which PRODUCT declines.28-29-## Consequences30-31-- `packages/protocol` gains contracts to open, read, list, post in, hide a post in, close and reopen a discussion, and one for a decider to turn a discussion into a proposal with its first draft round and the handles to credit. The web, the CLI and MCP serve them, so posting becomes one of the web's permitted writes.32-- The `Proposal` schema gains the discussion it came from and the handles to credit as `Advised-by`. The Lander writes both trailers on the opening.33-- The drafter's context step gains the discussion's posts as quoted, attributed text, with a test that a hidden post never reaches the prompt and that a post's text is never placed as an instruction.34-- The vouch file's denouncement reads as barring posts too, with no change to its line.35-- PRODUCT's "no discussion threads" becomes "no discussion on rounds".36-- Not built in the competition window; no dependency is added.deleted:docs/agents/domain.md-34 removed
1-# Domain Docs2-3-How the engineering skills should consume this repo's domain documentation when exploring the codebase. This repo is single-context: the product has one vocabulary.4-5-## Before exploring, read these6-7-- **`GLOSSARY.md`** at the repo root.8-- **`docs/adr/`**: read ADRs that touch the area you're about to work in.9-10-If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.11-12-## File structure13-14-```15-/16-├── GLOSSARY.md17-├── docs/adr/18-│ ├── 0001-bun-workspaces-and-turborepo.md19-│ └── 0002-wrangler-deploys-every-worker.md20-├── apps/21-└── packages/22-```23-24-## Use the glossary's vocabulary25-26-When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `GLOSSARY.md`. Don't drift to synonyms the glossary explicitly avoids.27-28-If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).29-30-## Flag ADR conflicts31-32-If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:33-34-> _Contradicts ADR-0007 (the visibility boundary is the repo boundary), but worth reopening because…_deleted:docs/agents/issue-tracker.md-47 removed
1-# Issue tracker: Local Markdown2-3-Issues and specs for this repo live as markdown files in `.scratch/`.4-5-## Conventions6-7-- One feature per directory: `.scratch/<feature-slug>/`8-- The spec is `.scratch/<feature-slug>/spec.md`9-- Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01`, never a single combined tickets file10-- Every issue file is an ask: copy `.scratch/TEMPLATE.md` (see "Ask shape" below)11-- Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)12-- Comments and conversation history append to the bottom of the file under a `## Comments` heading13-14-## Ask shape15-16-Each issue is written as an ask (GLOSSARY.md: **Ask**), so this repo's own work tries the brief the product asks contributors to write. Copy `.scratch/TEMPLATE.md`. Its fields:17-18-- **Status:** a triage role from `triage-labels.md`.19-- **Blocked by:** the numbers of the issues that must be resolved first, or `none`.20-- **Want:** one behavioural change, said from the user's side. Not a list of implementation steps.21-- **Territory:** the workspace packages the answer may change. Anything outside them is out of scope.22-- **Check:** the command that fails on main now and passes once the want is met. It fails by an assertion, not by a load error or a missing file. Confirm it is red before starting work. Where nothing can be red yet (day-0 docs and scaffold), write `No check yet:` and the reason; like a rule with no fence, that is debt.23-- **Done when:** the checklist that closes the issue. The check passing comes first and `bun run verify` passing comes last.24-- **Anti-jobs:** what this issue must not do, even when nearby code invites it.25-26-When a skill brings its own ticket template (for example `to-tickets`' "What to build" and acceptance criteria), write the ask shape instead: "What to build" becomes **Want**, and the acceptance criteria become **Done when**.27-28-After Oct 14 these files can move into the config folder's asks (GLOSSARY.md: **Config folder**).29-30-## When a skill says "publish to the issue tracker"31-32-Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed), starting from `.scratch/TEMPLATE.md`.33-34-## When a skill says "fetch the relevant ticket"35-36-Read the file at the referenced path. The user will normally pass the path or the issue number directly.37-38-## Wayfinding operations39-40-Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.41-42-- **Map**: `.scratch/<effort>/map.md` (the Notes / Decisions-so-far / Fog body).43-- **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.44-- **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.45-- **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.46-- **Claim**: set `Status: claimed` and save before any work.47-- **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.deleted:docs/agents/triage-labels.md-15 removed
1-# Triage Labels2-3-The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.4-5-| Label in mattpocock/skills | Label in our tracker | Meaning |6-| -------------------------- | -------------------- | ---------------------------------------- |7-| `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |8-| `needs-info` | `needs-info` | Waiting on reporter for more information |9-| `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |10-| `ready-for-human` | `ready-for-human` | Requires human implementation |11-| `wontfix` | `wontfix` | Will not be actioned |12-13-When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.14-15-Edit the right-hand column to match whatever vocabulary you actually use.deleted:docs/demo/README.md-16 removed
1-# The demo2-3-How the submission video is made. On recording day, open these in this order:4-5-1. [`rehearsal.md`](rehearsal.md): the pre-flight list, then one checkbox per shot, marked pass or fail when the shots were walked on the live stages.6-2. [`shot-list.md`](shot-list.md): every shot, with its screen, the exact command or URL on the `demo` stage, what must already be true, a fallback, and the order to record in.7-3. [`script.md`](script.md): the narration, timed to the video's seven beats (6:30), with the captions.8-4. [`swarm-scenario.md`](swarm-scenario.md): the six fictional contributors of beats 3 and 4, what the video stages and why, how to run them, and what to do when an agent stalls.9-10-Three rules hold for every take:11-12-- **No deploys during takes.** A deploy restarts the platform mid-take. `rehearsal.md` opens with it.13-- **What is staged is labelled as staged**, in the script and in a caption: the README line in the zero-install beat, two of the six agents' nudges, and one answer written to fail a sealed check. Nothing else is planted, and every outcome is read from the platform.14-- **The people and the two projects on screen are fictional.** datekit and burrow, and everyone in them, are examples made up to show the platform; no real person is staged. The open-source repos the code browser is previewed on are imported beside them, read-only, each shown with the source it was imported from, and nothing in the video acts on one.15-16-Every command in these files is checked against what exists: a test reads each shell block, the shot list and every CLI command named in prose or a table, and fails on a root script, a file, a CLI command or a flag that isn't there. It also holds each shot to its beat in the script, and the rehearsal to one checkbox per shot.deleted:docs/demo/rehearsal.md-141 removed
1-# Rehearsal2-3-**No deploys during takes.** Nothing deploys between the first take and the last: a deploy restarts the platform's Durable Objects mid-take. Turn on the deploy recording lock before the first take and off after the last; while it is on, `infra/deploy.ts` refuses every deploy with `RecordingInProgress`. No flag or environment variable lifts it: only `bun infra/recording.ts off`, run by a person once the last take is done.4-5-This checklist is walked once on the live stages before the recording: the read-only shots on `demo`, the shots that consume asks on `dev-oscabriel` (on a fresh copy of each example, so demo's asks stay open for the take), with the same commands [`shot-list.md`](shot-list.md) gives. Mark each line as it is walked:6-7-- a pass: `- [x] S07 … PASS 2026-10-13 demo, 0:41`;8-- a failure, with the fallback used: `- [x] S07 … FAILED: <what broke> fallback: <what the video uses>`.9-10-Every box is ticked when the walk is done, passed or failed. A pre-flight line that sets up the recorder's desk, not a stage, says `NOT WALKED`: only the person recording can do it.11-12-**Walked on 2026-10-08, 17:08 to 17:39 UTC**, from `main` at `1e46e9a`, with nothing deployed; the deploy lock was on only for its own check. The read-only shots ran on `demo`, which was left as the seed made it: every ask open and unclaimed, and smoke passing at the end. The shots that consume asks ran on `dev-oscabriel`, on `datekit-805` and `burrow-805`, two `seed --as` copies, and every throwaway they made is in the ledger. On the morning of the take, untick the pre-flight and walk it again.13-14-**Walked again on 2026-10-11, 03:20 UTC**, on `demo` after the W13 close-out deploy (`873046e`, the Workers from `f224a14`) and the 38 imports onto demo (issue 1332): the same eight read-only shots, anonymous, headless Chromium at 1280 px, read the same as on 2026-10-10 below, with one difference on every page: the rail's Projects list names the first eight projects by name (anyhow to click), with "All projects 40" under them, and datekit is not among the eight. `/asks` still leads with burrow's family, so S01's `j` note stands. The deployed-web checks pass 16 of 16 on datekit and 12 of 12 on burrow, and the imports' 224 of 224. demo was only read.15-16-**Walked again on 2026-10-10, 22:30 to 22:55 UTC**, on `demo` as the W13 build deployed it (`main` at `41f84ca`; the Workers from `643ab22`), with nothing deployed and the lock off. Only the read-only shots were walked, anonymous, in headless Chromium at 1280 px, with smoke 11 of 11 at the end; demo was left as the seed made it. The shots that consume asks (S03 to S06, S10 to S13, S17, S18, S21, S23) were not walked again: their 2026-10-08 lines stand, and each page's "Now:" line says what the new build shows, checked in the dev world. S15 needs bram's and ines-v's profiles, which this walk did not have: an anonymous clone of the layer asks for a username. Each shot walked carries a "Walked 2026-10-10 demo:" line. The words a shot checks that changed in the new build: a project's posture is said once per project group heading, never per row; the project's People tab reads Policy, and the header's Agents reads For agents; Today's budget is one sentence; a delete child reads "Waiting for N of 6 children to land", then "Open to take".17-18-## Shots19-20-- [x] S01 The front door broke · web · the front page on a fresh seed · PASS 2026-10-08 demo, 0:02: "10 open asks, 8 open to take", datekit's three and burrow's six children open. The project badges say "Open", not "Open with sealed evidence" (the front page takes a posture only from a decided change, and a fresh seed's stands without one): the ledger in S19 carries the posture. Now: the context bar reads "10 open asks, 8 open to take"; the posture is said once per project group heading ("burrow · Open"), not per row; burrow's six children are one family row, "0 of 6 landed", with "Show 6 children". The front page is at `/asks` since W13; `/` is the landing. Walked 2026-10-10 demo: PASS, 0:04: the context bar reads "10 open asks, 8 open to take"; "burrow · Open" and "datekit · Open with sealed evidence" once each, as group headings; burrow's family is one row, "0 of 6 landed", with "Show 6 children"; the inspector reads "Start here" until `j`, which selects the first row, burrow's family, whose inspector says "Not open to you now: its page says why" and numbers no claim command. The numbered claim command shows once a datekit row is selected: press `j` past the family, or choose "Open to take" first.21-- [x] S02 The front door broke · web · format-ordinal's ask page · PASS 2026-10-08 demo, 0:01: open, "Held for newcomers, mentored by okonkwo", asked by ines-v. Now: "Held for newcomers, mentored by okonkwo" is the inspector's Take it line (the status line has it in lower case). Walked 2026-10-10 demo: PASS, 0:02: under the title, "Open to take · held for newcomers, mentored by okonkwo"; the inspector's Take it reads "Held for newcomers, mentored by okonkwo", then the clone, the claim and `myr check`, numbered 1 to 3.22-- [x] S03 Zero install · split · stock Claude Code takes add-months-clamp as bram · PASS 2026-10-08 dev-oscabriel (`datekit-805`), 2:25: Claude Code 2.1.294 on Haiku, S03's prompt run headless (`-p`) with the corrected flags. It claimed, fixed `src/add.ts`, met `OutOfScope` for README.md in `myr check`, untangled a `commit --amend` of its own, and pushed `8b0050e`, which landed as `e7fb8a9` 35 s later. 1:46 of agent time, 25 turns, $0.025. Three compound commands (`$(…)`, `for` loops) were still denied: run interactively, each is a permission prompt on camera.23-- [x] S04 Zero install · terminal · `OutOfScope` in the agent's own `git push` · FAILED: the agent ran `myr check` before pushing, so the refusal never reached git (as in the harness check's zero-install run the same day) fallback: S04's own, keep the `myr check` refusal (same words, same renderer) and add S05.24-- [x] S05 Zero install · terminal · the same refusal pushed by hand on parse-iso-week, then released · PASS 2026-10-08 dev-oscabriel, 0:12: on a fresh claim, `remote: OutOfScope: changes paths outside the ask's territory: README.md`, then `next: myr check` and `retryable: no`, and `! [remote rejected] HEAD -> main (OutOfScope)`. `myr release` prints `{"released": true}` as a JSON block.25-- [x] S06 Zero install · split · the landing's trailers and its answer page · PASS 2026-10-08 dev-oscabriel, 0:02: `Asked-by: ines-v`, `Signed-off-by: bram`, `Assisted-by: claude-code_2-1-294_agent (claimed)`, then `Ask`, `Verdict`, `Held-back` and `Request-Id`. The answer page reads "Landed as e7fb8a9". Now: "Landed as e7fb8a9" is the answer's outcome under its title, and the inspector repeats it.26-- [x] S07 One weed becomes a rule · web · burrow's family: six children and the delete child · PASS 2026-10-08 demo, 0:05: six children open to take, and the delete child blocked until all six land. The page's one landing credits `Decided-by: oscabriel`, the operator's handle, in a video of fictional people. Now: the family is the parent's row expanded, its six children listed under the fan and a delete node reading "delete waits for 6"; no "Blocked until" sentence. The operator's own landing leaves the inspector's recent landings once three answers have landed. Walked 2026-10-10 demo: PASS, 0:03: the family's row expanded, "0 of 6 landed", the six children under the fan, each with its claim command, and the delete node "waits for 6"; the README below.27-- [x] S08 One weed becomes a rule · terminal · the ratchet in burrow's `.myr/project.ts` · PASS 2026-10-08 demo, 0:03: the `no-module-level-mutable-state` block, counted by `bun run lint --format json`. Walked 2026-10-10 demo: PASS, 0:03: the same block, `no-module-level-mutable-state` counted by `bun run lint --format json`.28-- [x] S09 One weed becomes a rule · terminal · the swarm's dry-run plan, both nudges printed · PASS 2026-10-08 demo, 0:01: six rows on four harnesses, both held asks, both nudges in full; nothing claimed. Walked 2026-10-10 demo: PASS, 0:02: six rows on four harnesses (wren claude-code, tamsin opencode, ivo amp, marisol, dagny and pell pi), "held: drop-legacy-fetch, drop-legacy-fetch-delete", both nudges in full; nothing claimed, no harness started.29-- [x] S10 One weed becomes a rule · split · `Weakened` in the nudged agent's pane · PASS 2026-10-08 dev-oscabriel (`burrow-805`), 0:04, pushed by hand as marisol: `remote: Weakened: adds oxlint-disable without a reason`, `at: packages/catalog/src/client.ts:40`. No nudged agent has added a comment yet: none in the swarm's two live runs the same day, none in this walk's herdr run (S12). For the take, expect S10's fallback (cut it and its line).30-- [x] S11 One weed becomes a rule · web · the reasoned escape waiting on a decision · PASS 2026-10-08 dev-oscabriel (`burrow-805`), 0:52, pushed by hand as dagny: every lane passed, then the answer page read "Waiting on decision dec-000001" 36 s after the push. As with S10, a nudged agent may never add the comment: then S11's fallback.31-- [x] S12 Six harnesses at once · terminal · the take: six herdr panes and the counter · PASS 2026-10-08 dev-oscabriel, 2:24 for two (7:41 for six, headless, in the swarm's second live run the same day, 6 of 6 landed): `--view herdr --only tamsin,ivo` on `burrow-805`, in a herdr session of its own. Two panes and the counter strip; OpenCode and Amp each took the brief interactively, the first live prompts in herdr panes for either, and both landed on their first attempt (ivo `4ea45cb` after 1:24, tamsin `4f7430c` after 2:24). Amp's pane showed $2.29. tamsin's landing has no `Assisted-by` (OpenCode's landings carry none yet).32-- [x] S13 Six harnesses at once · web · burrow's page updating live · PASS 2026-10-08 dev-oscabriel: with the page open and never reloaded, each landing showed within 13 s, billing's and then auth's. Now: a landing settles its child's node in the fan once, and "n of 6 landed" moves; a reload shows no stamp.33-- [x] S14 Six harnesses at once · web · the delete child open · PASS 2026-10-08 dev-oscabriel (`burrow-swarm-2`, where the swarm's second live run landed all six), 0:05: State "Open". The page still says "Waits on … to land first; a claim waits until they do" once all six have landed. Demo's, before the take, reads "Blocked". Now: no "Waits on" anywhere: while siblings are open the delete child reads "Waiting for N of 6 children to land · the family's move", and once all six landed "Open to take". Walked 2026-10-10 demo, before the take: the status line and the inspector read "Waiting for 6 of 6 children to land · the family's move".34-- [x] S15 The top half is open · split · bram's 403 and ines-v's clone of the layer · PASS 2026-10-08 demo, 0:04: bram got `remote: bram may not read datekit--maintainers` and a 403 in 0.3 s; ines-v's clone holds `checks/held-back/export/` (7) and `parser/` (4).35-- [x] S16 The top half is open · terminal · datekit's `.myr/visibility.ts` · PASS 2026-10-08 demo, 0:03. Walked 2026-10-10 demo: PASS, 0:02.36-- [x] S17 The top half is open · terminal · bram's staged answer refused as `HeldBackFailed` · PASS 2026-10-08 dev-oscabriel (`datekit-805`), 0:49: status read `refused: HeldBackFailed` 28 s after the push. The note holds `HeldBackFailed` in `export`, with export 6/7 and parser 4/4. Its `suite` is one value for both areas, and the ledger published another root for each (an open finding). S17 to S19 show both on screen.37-- [x] S18 The top half is open · split · the fix lands with its `Held-back:` trailer · PASS 2026-10-08 dev-oscabriel, 1:06, with the URL corrected: it landed as `784740a` 41 s after the push, its last trailers `Held-back: export 7/7 @ sha256:…; parser 4/4 @ sha256:…`. The violet trailer is on the answer's page; the project page's landing list shows only the credit and `Assisted-by`, so the shot now opens `/datekit/answers/format-ordinal`. Now: the project page's inspector lists its last three landings as one-line credits; the trailer is still on the answer's page.38-- [x] S19 The top half is open · web · the ledger: "Open with sealed evidence" · PASS 2026-10-08 demo, 0:05: the maintainers layer, "export: 7 sealed checks by 3 people", "parser: 4 sealed checks by 3 people", both admitted. Now: the ledger's head sentence reads "Open with sealed evidence. export: 7 sealed checks by 3 people; parser: 4 sealed checks by 3 people."; the platform's whole label stays in the inspector's Posture block. Walked 2026-10-10 demo: PASS, 0:02: the head sentence reads "Open with sealed evidence. export: 7 sealed checks by 3 people; parser: 4 sealed checks by 3 people.", the maintainers layer below, each area's root and admission, and six History entries; the inspector's Posture block holds the whole label.39-- [x] S20 The top half is open · split · `.env.schema` beside the env shape page · PASS 2026-10-08 demo, 0:05: `SENTRY_AUTH_TOKEN`, sensitive, proxy `sentry.io` (only paths `/api/**`), "set by ines-v" after the pre-flight's `env set`. Now: the sensitive item is listed first, "set by ines-v" on its own line; the caption and its varlock link are kept. Walked 2026-10-10 demo: PASS, 0:02: "4 items · 1 sensitive, set by ines-v 2 d ago"; SENTRY_AUTH_TOKEN first, sensitive, "set by ines-v 2 d ago", proxy "sentry.io, only /api/**"; the varlock caption on the page. The clone's `.env.schema` shows `@sensitive` and the `@proxy` line.40-- [x] S21 The maintainer's day · web · Today as okafor · FAILED: okafor cannot sign in on the web. The web's only sign-in is the platform's handle and password, okafor has no account, and sign-up refuses a handle that `SESSION_TOKENS` holds. So no seeded person can open Today on the web, on either stage. fallback: `myr today --project burrow` as okafor, walked on `dev-oscabriel`: dec-000001, the reasoned escape, with its words, default `decline` and expiry, in 0:01. Now: Today's budget is one sentence ("Decisions: 2 taken, 3 left today. Finishes are counted apart: none taken."), decisions sit under Due today and Within your budget, and each choice has its consequence under it.41-- [x] S22 The maintainer's day · web · the front page after the swarm · PASS 2026-10-08 demo (the fresh front page) and dev-oscabriel (`burrow-swarm-2` after six landings: six answers listed, the delete child open). Now: the family is one row with its count; its delete node reads open to take once all six land. The front page is at `/asks` since W13. Walked 2026-10-10 demo (the fresh front page): as S01.42-- [x] S23 The maintainer's day · terminal · `myr why` on a migrated line · PASS 2026-10-08 dev-oscabriel (`burrow-805`), 0:05: after `git pull`, `myr why packages/auth/src/session.ts:18` named landing `4f7430c`, the ask, tamsin, okafor and the verdict. The fallback is corrected: in `~/demo/datekit` the agent's own commit sits on main, so `why` names that commit, not the landing. A fresh clone gave the landing, with its `Assisted-by` and `Held-back`.43-- [x] S24 Measured numbers · terminal · the README's Numbers table · PASS 2026-10-08 (the repo), with a command corrected: `-A 14` stopped one row short of the core loop table's "the whole loop"; `-A 15` shows the table whole. Walked 2026-10-10 (the repo): PASS: `-A 15` shows the core loop table whole, through "the whole loop".44-- [x] S25 Measured numbers · terminal · an anonymous clone: trailers, then the notes fetch · PASS 2026-10-08 dev-oscabriel (`datekit-805`, after S03), 0:03: the log shows the credit trailers, and the note comes only with the extra fetch. On demo before the take, the fetch says `couldn't find remote ref refs/notes/myr`, since nothing has landed there yet: keep S25 after S17, S18 and S03, as the recording order does. Walked 2026-10-10 demo, before the take: `git log -3` shows the three "Open ask" commits with no credit trailer yet, and the notes fetch says `couldn't find remote ref refs/notes/myr`, as expected before S17, S18 and S03.45-- [x] S26 Measured numbers · web · the closing line over datekit's page · PASS 2026-10-08 demo, 0:04. Now: datekit's page is its asks, then the README, its first sentence the lede under the title; there is no code table and no clone box. Walked 2026-10-10 demo: PASS, 0:02: datekit's three asks, then the README; "Small, dependency-free date helpers for TypeScript." is the lede under the title, and no clone box.46-47-## Pre-flight48-49-On the morning of the take, in this order.50-51-- [x] The recording lock is on, and nobody plans a deploy until the last take is done: PASS 2026-10-08: on at 17:08:11 UTC, `status` said so, a deploy to `dev-oscabriel` was refused with `RecordingInProgress` before it read its flags, then off.52-53- ```sh54- bun infra/recording.ts on55- bun infra/recording.ts status56- ```57-58-- [x] Smoke passes on demo: PASS 2026-10-08 demo, 7 of 7 at 17:08 UTC, and again at 17:39 after the walk. PASS 2026-10-10 demo, 11 of 11 at 22:35 UTC; `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` answered over their 500 ms budgets on cold isolates (890 ms, 825 ms and 1846 ms), as warnings.59-60- ```sh61- bun scripts/smoke.ts --stage demo62- ```63-64-- [x] The seeded state is fresh. The seed has no check mode, so open each page and compare: PASS 2026-10-08 demo: each page and each read below, as listed. PASS 2026-10-10 demo: the four pages, as listed, every ask open and unclaimed; the terminal reads were not run again. The reads needed `MYR_URL` (now the block's first line): with neither it nor a profile, the CLI says "no platform to call".65- - `https://web-demo.oscargabriel.workers.dev/asks`: datekit's three asks (add-months-clamp, format-ordinal held for newcomers, parse-iso-week) and burrow's six `drop-legacy-fetch-burrow-*` children, all open and unclaimed;66- - `https://web-demo.oscargabriel.workers.dev/burrow`: `drop-legacy-fetch-delete` waiting on all six;67- - `https://web-demo.oscargabriel.workers.dev/datekit/ledger`: "Open with sealed evidence", with export's 7 sealed checks and parser's 4;68- - `https://web-demo.oscargabriel.workers.dev/datekit/env`: SENTRY_AUTH_TOKEN listed, `@sensitive`, with its proxy host.69-70- The same, from a terminal, read as anyone:71-72- ```sh73- export MYR_URL=https://platform-demo.oscargabriel.workers.dev74- myr projects75- myr asks --project datekit76- myr asks --project burrow77- myr ledger --project datekit78- ```79-80-- [x] The three on-screen people are logged in as CLI profiles, each token pasted off camera from the stage's `SESSION_TOKENS` and ended with Ctrl-D: PASS 2026-10-08 demo: all three, from stdin, under the walk's own scratch home. The take logs in to the default `~/.config`, the one Claude Code's Bash tool reads: it takes `XDG_*` from the login shell.81-82- ```sh83- myr login --url https://platform-demo.oscargabriel.workers.dev --profile bram --token-stdin84- myr login --url https://platform-demo.oscargabriel.workers.dev --profile ines-v --token-stdin85- myr login --url https://platform-demo.oscargabriel.workers.dev --profile okafor --token-stdin86- ```87-88-- [x] The stage's `SESSION_TOKENS` holds a token for each of the six swarm contributors (burrow's vouched people), and the dry run plans six of them: PASS 2026-10-08 demo: `myr status` says "Signed in as" each of wren, tamsin, ivo, marisol, dagny and pell, and the dry run planned six. PASS 2026-10-10 demo: the dry run planned six (the tokens were not checked again).89-90- ```sh91- bun run swarm -- --stage demo --project burrow --scenario video --dry-run --allow-demo92- ```93-94-- [x] ines-v has set SENTRY_AUTH_TOKEN's value, off camera, with a made-up value on stdin: `myr env set SENTRY_AUTH_TOKEN --project datekit --yes` as profile `ines-v`. The env page then says who set it and when. PASS 2026-10-08 demo: set at 17:11 UTC, and the env page says "set by ines-v". It stays set for the take; setting it again only moves the time.95-- [x] okafor is signed in on the web (`https://web-demo.oscargabriel.workers.dev/auth/signin`), in the browser profile used for S21. FAILED: okafor has no account, and sign-up refuses a handle `SESSION_TOKENS` holds (S21) fallback: S21 in a terminal, `myr today --project burrow` as okafor.96-- [x] The staged commits are ready, and nothing else is: PASS 2026-10-08 dev-oscabriel: made on `datekit-805` as listed; the ask's own test passed on the first commit and S17's push was refused `HeldBackFailed`. On the morning, make `~/demo/datekit-bram` from demo's datekit the same way.97- - `~/demo/datekit-bram`: a clone of datekit's main with two commits on top, the Do token as an English ordinal (every public test passes), then the one-line change in `examples/datekit/layers/maintainers/known-bad/export.patch`;98- - `~/demo/datekit-hand`: made during S05, with one README line committed before its push.99-- [x] The harnesses are logged in and on the versions rehearsed, and herdr opens a fresh `demo` session. Amp updates first: its interactive mode refuses new threads until it does. Claude Code's auto-updater stays off for the take (`DISABLE_AUTOUPDATER=1` in the environment the swarm starts from), since an update mid-take changes its startup questions. pi and OpenCode are both signed in to OpenCode Go, which tamsin's and all three pi contributors' models run on (`pi auth check --provider opencode-go` says `ready`, and `opencode auth list` lists OpenCode Go; see [`swarm-scenario.md`](swarm-scenario.md)). herdr's agent names must be unique in a session, so close the last swarm workspace, or start a new session, before the take:100-101- ```sh102- amp update103- claude --version104- opencode --version105- amp --version106- pi --version107- herdr --version108- herdr --session demo109- ```110-111- PASS 2026-10-08: `amp update` moved Amp to 0.0.1791476260; Claude Code 2.1.294, OpenCode 2.0.7, pi 1.1.0, herdr 0.9.3. `pi auth check --provider opencode-go` says `ready`, and `opencode auth list` lists OpenCode Go. The walk's herdr session was its own (`r805`, deleted afterwards), not `demo`.112-113-- [x] The CLI on `PATH` is the one the demo platform's install line serves, and Claude Code has no plugin, MCP server or skill for `~/demo/datekit`. PASS 2026-10-08: the install line installs the CLI at version `0.1.0-demo.802`, though its `--version` prints `v0.0.0` (the binaries carry no version stamp yet). S03's command now carries `--strict-mcp-config --setting-sources project,local`, which keep out this machine's MCP servers, plugins and hooks. Claude Code still lists the clone's generated contribute skill and this machine's user skills.114-- [x] Panes laid out: one terminal (or herdr's six plus the counter for S12) beside one browser window at 1280 px; one colour scheme for every take; terminal font large enough to read at 1080p. NOT WALKED: the recorder's desk.115-- [x] Notifications off: system do-not-disturb, chat apps closed, the browser's notifications blocked. NOT WALKED: the recorder's desk.116-- [x] The recording order in `shot-list.md` is printed beside the screen. NOT WALKED: the recorder's desk.117-118-## After the last take119-120-- [x] The recording lock is off, so deploys run again: PASS 2026-10-08, walked with the lock's first line: off at 17:08 UTC, and `status` said deploys run.121-122- ```sh123- bun infra/recording.ts off124- ```125-126-## Beat timings127-128-Filled in by the walk: how long each beat ran, against its range in [`script.md`](script.md). If the total runs over 10:00, cut the env paragraph and S20 first.129-130-Walked on 2026-10-08. Each beat's narration is timed at 150 words a minute. "Live" is the screen's own time in the walk: commands, agents and the platform's verdicts. "Edited" is the beat as the video can show it, with the waits cut, never shorter than its narration.131-132-| Beat | Range | Walked | Notes |133-| --- | --- | --- | --- |134-| The front door broke | 0:00–0:45 | 0:45 edited; 0:02 live | Narration 112 words, 0:45. On time. |135-| Zero install | 0:45–1:30 | 0:45 edited; 2:40 live | Narration 108 words, 0:43. Live: S05 0:12, S03's agent 1:46 and its landing 0:35, S06 0:02. Cut S03 to its claim, the refusal and the push. |136-| One weed becomes a rule | 1:30–2:15 | 0:45 edited; 1:05 live | Narration 112 words, 0:45. S07 to S09 0:09, S10 0:04, S11 0:52 to the waiting verdict. S10 and S11 depend on a nudged agent; neither has happened yet in a run. |137-| Six harnesses at once | 2:15–3:45 | 1:30 edited; 7:41 live | Narration 197 words, 1:19. Six agents took 7:41 in the swarm's second live run, and two took 2:24 in herdr in this walk, so the take is shown at about five times speed, or cut. |138-| The top half is open | 3:45–5:00 | 1:15 edited; 2:17 live | Narration 179 words, 1:12. S15 0:04, S16 0:03, S17 0:49, S18 1:06, S19 and S20 0:10. The env paragraph (25 words, 0:10) and S20 are the first cut. |139-| The maintainer's day | 5:00–5:45 | 0:40 edited; 0:08 live | Narration 92 words, 0:37. S21 is its terminal fallback (0:01), S22 0:02, S23 0:05. |140-| Measured numbers | 5:45–6:30 | 1:00 edited; 0:07 live | Narration 78 words, 0:31, plus about 0:30 to read the core loop table's nine rows. That runs about 0:15 over the range. |141-| Total | 0:00–6:30 | about 6:40 edited | Under 10:00, so nothing needs cutting. If a take runs long, cut the env paragraph and S20 first. |deleted:docs/demo/script.md-103 removed
1-# The script2-3-The narration for the submission video: seven beats, 6:30 of the allowed 5 to 10 minutes. Each beat names the shots on screen (their ids are in [`shot-list.md`](shot-list.md)), the words to read, and the captions. Read at about 150 words a minute; each beat's narration fits its range at that pace, with room for the screen to speak.4-5-The narration is the recorder's voice. A rehearsal corrects commands and URLs in the shot list, never these words.6-7-Rules that hold in every beat:8-9-- **No rival is named**, on screen or aloud. A contrast is said by its mechanism.10-- **No host product names.** The platform's storage, sandbox and preview products are not named in the video; the README says what it runs on.11-- **"Prototype", never "a whole forge".** No claim about speed or scale beyond the measured table in the last beat.12-- **What is staged is said to be staged**, aloud or in a caption: the README line in Zero install, the two nudged agents in One weed becomes a rule and Six harnesses at once, and bram's broken quoting in The top half is open. [`swarm-scenario.md`](swarm-scenario.md) lists every nudge.13-- **Held-back checks are "checked against N sealed checks"**, never "verified" or "good".14-- **One credit on screen:** varlock's, as a caption in the env shot. Every other credit is in the README.15-- Say the name once, early: Myr, said "meer".16-17-## The front door broke (0:00–0:45)18-19-On screen: S01, then S02.20-21-> "Open source has one front door: the pull request." Then agents made writing a change nearly free, and reading one costs what it always did. So projects started closing the door.22->23-> Myr, said "meer", is a prototype git platform that turns the door around. A project asks for what it wants: a sentence, the files it may touch, a check that fails today. Anyone answers, or their agent does; passing answers land. Unasked work has nowhere to go.24->25-> No setting adds this: answers can't touch their judge, sealed checks say one bit per area, refusals are typed in git's output, claims hold slots, and credit, the asker's too, follows people across projects.26-27-Caption on S02: "An ask: a want, a territory, a check that fails on main."28-29-If the beat runs short, add: "Forges for agents are being built for teams shipping hundreds of changes a day. We built one for the boundary between a project and everyone else."30-31-## Zero install (0:45–1:30)32-33-On screen: S03, S04 (or S05), S06.34-35-> This is Claude Code as it ships: no plugin, no MCP server, no skill. It has a datekit clone and our CLI, and reads the repo's AGENTS.md. I ask it to land an open ask, and, staged so you see a refusal, to add a README line the ask doesn't cover.36->37-> It claims the ask, gets a fork, and pushes. git's own output carries the refusal: OutOfScope, the path, and the next command. It puts the README back and pushes again. The platform checks the merged tree and lands it. The commit names who asked and who signed; the agent is listed apart, as a disclosure, not credit.38-39-Captions: on S03, "Stock Claude Code. No plugin, MCP server or skill."; on S04, "Staged: the prompt asks for a README line outside the ask's territory." If S05 replaces S04: "The same refusal, pushed by hand."40-41-## One weed becomes a rule (1:30–2:15)42-43-On screen: S07, S08, S09, then S10 and S11 (cut in from the S12 take).44-45-> burrow is a fictional shop's six services, on one HTTP kit. Its maintainers fence their own agents: lint presets, a git hook, and a rule against state at the top of a module. Six places break it, so the rule landed as a ratchet: six, and the count may only fall.46->47-> One old helper, legacyFetch, is on its way out. One migrate ask splits that job like the code: a child per package, and a delete child that waits for all six.48->49-> That fence now runs at the door, from the last landing, for strangers' agents. A disable comment with no reason is refused; one with a reason waits for a person.50-51-Captions: on S09, "The plan prints every nudge. Two agents were told about disable comments: what follows is staged."; on S10, "Weakened"; on S11, "Waiting on a decision".52-53-## Six harnesses at once (2:15–3:45)54-55-On screen: S12, with S13 beside it, then S14.56-57-> Six fictional contributors, each answering one child with an agent of their own. Four harnesses, six models: Claude Code as it ships, OpenCode on a GPT model, Amp, and pi on three model families, one of them with our pi adapter. Each agent works in its own fork, with plain git and its person's token. No agent holds an account: the person's claim carries identity and credit.58->59-> Refusals bounce on screen, and every one is typed: a tag, a reason, a place, and the command to run next. The run hands each one back to the same session, at most three times. Weakened is the agent that was told a disable comment was fine. The one told to give a reason is waiting on a decider.60->61-> When main moves under an answer, the platform merges again and checks again before anything lands. An answer that no longer fits gets StaleBase back, never a silent retry.62->63-> Children land one at a time, each a commit with its person's name on it. The counter counts claims, pushes and landings from the project's live stream. When the sixth child lands, nothing calls legacyFetch any more, and the delete child opens.64-65-Captions: on S12, "4 harnesses, 6 models"; on the Weakened pane, "Staged: told a disable comment is acceptable"; on the waiting pane, "Staged: told to give a reason".66-67-Read the StaleBase paragraph only if the take shows one; the children touch disjoint packages, so a merge again usually succeeds.68-69-## The top half is open (3:45–5:00)70-71-On screen: S15, S16, S17, S18, S19, S20.72-73-> datekit's maintainers keep checks of their own, in a layer only they can read. The layer is declared in public, with its reason. Two clones of the same project: bram, a contributor, gets a 403 on the layer. ines-v, a maintainer, gets the sealed checks.74->75-> bram's answer passes every check he can see. It was written to break one rule the public tests don't cover. The refusal reaches his terminal: HeldBackFailed, area export. One bit per area, never a check's name or its output, and at most three failures per claim in a week. He fixes it, and the landing carries a trailer: Held-back, export seven of seven, at the suite's published root. That means checked against seven sealed checks, not proven good. They're hidden from people and agents, not from the code under test, so they aren't a security boundary. The ledger says which kind of open this is: Open with sealed evidence.76->77-> Why can't we commit .env files? Commit the shape. Deciders set the values. Nobody reads them back. An answer's code only ever sees a placeholder.78-79-Captions: on S17, "Staged: this answer breaks quote escaping on purpose."; on S20, "env shape: varlock's `.env.schema` format".80-81-If the video runs long, cut the last paragraph and S20 first.82-83-## The maintainer's day (5:00–5:45)84-85-On screen: S21, S22, S23.86-87-> okafor decides for burrow. Their day is one page, Today: decisions, not diffs, held to a budget. The reasoned escape from the run waits here, with its evidence, an expiry and a safe default. If nobody decides, nothing lands. Below it, a sample of landings that needed nobody.88->89-> The front page lists the open asks across every project, each saying whether you may take it, and which are held for newcomers.90->91-> And any line can say why it's there: the ask, who asked, who answered, the verdict, and the agent that helped.92-93-## Measured numbers (5:45–6:30)94-95-On screen: S24, S25, then S26.96-97-> These numbers come from live runs, each with its stage and date.98->99-> [Read the rows of the README's Numbers table as they stand on the day. Say no number that isn't in it.]100->101-> Everything here is plain git. Code, asks and credit trailers leave with a clone; the verdict notes take one more fetch. Nothing to export, nothing to sync, and nothing reaches main except through the gate.102->103-> The top half is open. The bottom half is typed.deleted:docs/demo/shot-list.md-51 removed
1-# The shot list2-3-Every shot in the video, in the order the video shows them. Each row names its beat in [`script.md`](script.md), its screen (`terminal`, `web` or `split`: a terminal beside the browser), what to run or open on the `demo` stage, what must already be true, and what to use if it fails live. [`rehearsal.md`](rehearsal.md) has one checkbox per shot; record in the order under "Recording order", not the table's.4-5-The stage's two origins:6-7-- the platform, for git and the CLI: `https://platform-demo.oscargabriel.workers.dev`;8-- the web: `https://web-demo.oscargabriel.workers.dev`. Its `/` is the landing (what the platform is, a link to the open asks, the gate's refusal as git prints it, the projects to read), and a signed-in visitor at `/` goes on to `/home`; the front page, the open asks across projects, is at `/asks`. No shot opens on `/`.9-10-People on screen are the fictional examples' people. Each terminal acts as one of them through a CLI profile, chosen with `export MYR_PROFILE=<handle>`; git's credential helper reads the same profile, so no token is ever typed, shown or put in a URL. The profiles are logged in before the take (rehearsal pre-flight). Clones live under `~/demo/`.11-12-| id | beat | screen | run or open | preconditions | fallback |13-| --- | --- | --- | --- | --- | --- |14-| S01 | The front door broke | web | `https://web-demo.oscargabriel.workers.dev/asks` | Fresh seed: datekit's three asks and burrow's six children open. Signed out. Browser at 1280 px (the video's 110% zoom keeps the rail and the inspector), one colour scheme for every take. The context bar reads "10 open asks, 8 open to take"; each project's group header says its posture once; burrow's family is one row, "0 of 6 landed", with "Show 6 children"; the inspector shows "Start here" until a row is selected (`j`, past burrow's family row to a datekit ask: the family's own inspector numbers no claim command), then that ask's facts with its claim command numbered 1. | The front page screenshot from the Playwright check of the deployed web, captioned as a still. |15-| S02 | The front door broke | web | `https://web-demo.oscargabriel.workers.dev/datekit/asks/format-ordinal` | As S01; format-ordinal is open and held for newcomers, with okonkwo as mentor: the status line under the title, and the inspector's Take it block, reads "Held for newcomers, mentored by okonkwo". | The page's Markdown at the same URL plus `.md`, or its screenshot. |16-| S03 | Zero install | split | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git`, `cd datekit`, `export MYR_PROFILE=bram`, then `claude "Take the open ask add-months-clamp on this project and land an answer. Also add a line about the change to README.md." --model haiku --allowedTools "Bash(myr:*) Bash(git:*) Bash(bun:*) Bash(cat:*) Bash(ls:*) Bash(head:*) Bash(tail:*) Bash(sleep:*) Read Edit Write Glob Grep" --strict-mcp-config --setting-sources project,local`. Beside it, the answer's page once claimed: `https://web-demo.oscargabriel.workers.dev/datekit/answers/add-months-clamp` | Stock Claude Code: no plugin, MCP server or skill for this directory; its own login. The CLI on `PATH` from the demo platform's install line. datekit's main carries AGENTS.md with the generated contribute block. Profile `bram` logged in. bram already landed format-ordinal (S17, S18 are recorded first), which is why he takes add-months-clamp here. | Re-run with `--model sonnet`. Then the transcript of the dev-stage zero-install run, captioned with its date and stage. |17-| S04 | Zero install | terminal | In Claude Code's pane, the agent's own `git push myr HEAD:main`, refused in git's remote lines | S03 running. The `remote:` lines carry `OutOfScope` with README.md, its `next` and `retryable: no`. Staged: the prompt asked for the README line. | If the agent meets the refusal in `myr check` instead and never pushes it, keep that (same words, same renderer) and add S05. |18-| S05 | Zero install | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git datekit-hand`, `cd datekit-hand`, `export MYR_PROFILE=bram`, `myr claim parse-iso-week --project datekit`, `git remote add myr <remote>` (the remote the claim printed), `git push myr HEAD:main`, then `myr release parse-iso-week --project datekit` | Staged, by hand: one line added to README.md and committed (`git commit -am "Mention week dates in the README"`) before the push. parse-iso-week open and unclaimed. Recorded before S03. | Skip it; S04's `myr check` output carries the same refusal. |19-| S06 | Zero install | split | `cd ~/demo/datekit`, `git fetch origin`, `git log -1 --format=%B origin/main`; beside it `https://web-demo.oscargabriel.workers.dev/datekit/answers/add-months-clamp` | S03 landed. The commit's trailers: `Asked-by`, `Signed-off-by: bram`, and `Assisted-by: claude-code:…` apart. | `myr status --project datekit` as bram, which names the landed commit. |20-| S07 | One weed becomes a rule | web | `https://web-demo.oscargabriel.workers.dev/burrow` | Fresh seed: drop-legacy-fetch split into six children, one per package, and drop-legacy-fetch-delete waiting on all six. The project's page is its asks: the family's row expanded, its six children listed under the fan and the delete node reading "delete waits for 6"; the inspector says how a change lands here. | `myr asks --project burrow` in a terminal. |21-| S08 | One weed becomes a rule | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/burrow.git`, `cd burrow`, `git show HEAD:.myr/project.ts` | The ratchet block on screen: `no-module-level-mutable-state`, counted by `bun run lint --format json`. | `examples/burrow/.myr/project.ts` in the editor, the same file. |22-| S09 | One weed becomes a rule | terminal | From the repo root: `bun run swarm -- --stage demo --project burrow --scenario video --dry-run --allow-demo` | The swarm is built. The plan prints six rows on four harnesses, the held delete child, and both nudges in full. It makes no claim and needs no token. | The same plan from the dev stage (`--stage dev-oscabriel` on a fresh copy of burrow), captioned with its stage. |23-| S10 | One weed becomes a rule | split | Cut from S12, in the pane of the contributor nudged that a disable comment is acceptable: its `git push myr HEAD:main`, refused in git's remote lines | S12 running. The `remote:` lines carry `Weakened` with the marker and its line. Staged by the nudge S09 printed. | That pane's re-prompt, where the run hands the rendered refusal back to the session. If the agent never adds the comment, cut S10 and its line in the narration. |24-| S11 | One weed becomes a rule | web | `https://web-demo.oscargabriel.workers.dev/burrow/answers/<child>`, the child being the ask S09's plan gives the contributor told to give a reason | S12 running; that answer's checks passed. The page reads "Waiting on decision dec-…". Staged by the nudge. | The same outcome in that contributor's pane, from `myr status`. If the agent adds no comment, cut S11 and the line. |25-| S12 | Six harnesses at once | terminal | From the repo root: `bunx varlock run --path apps/platform/ -- bun run swarm -- --stage demo --project burrow --scenario video --view herdr --allow-demo` | Pre-flight done: herdr session `demo` open, six harnesses logged in, the six people's tokens in the stage's `SESSION_TOKENS`, burrow's family untouched. The recording lock on. | Six tiled terminals, each running the same command with `--view headless --only <handle>`. Last resort: the recorded dev-stage take, with its run's `agents.json` summary as a caption. |26-| S13 | Six harnesses at once | web | `https://web-demo.oscargabriel.workers.dev/burrow` | Open during S12; the asks update live as children are claimed and land: each child's node in the fan settles once as it lands, and "n of 6 landed" moves. | Reload between cuts. |27-| S14 | Six harnesses at once | web | `https://web-demo.oscargabriel.workers.dev/burrow/asks/drop-legacy-fetch-delete` | The sixth child landed: the delete child's status line reads "Open to take" (while siblings are open it reads "Waiting for N of 6 children to land"). | `myr asks --project burrow` lists it open. If a child timed out, say "five of six" and keep the delete child waiting on screen. |28-| S15 | The top half is open | split | Left: `export MYR_PROFILE=bram`, `git clone --branch main https://platform-demo.oscargabriel.workers.dev/datekit--maintainers.git`. Right: `export MYR_PROFILE=ines-v`, the same clone, then `git -C datekit--maintainers ls-files` | Left and right in separate empty folders. bram's clone fails with `remote: bram may not read datekit--maintainers` and HTTP 403; ines-v's holds `checks/held-back/export/` (7 files) and `parser/` (4). `--branch main` because the layer's HEAD follows the first branch the seed pushed. | The dev stage's recorded clones, captioned with their stage. |29-| S16 | The top half is open | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git datekit-read`, `cd datekit-read`, `git show HEAD:.myr/visibility.ts` | Anonymous: no profile needed. S20 reuses this clone. | `examples/datekit/.myr/visibility.ts` in the editor. |30-| S17 | The top half is open | terminal | `cd ~/demo/datekit-bram`, `export MYR_PROFILE=bram`, `myr claim format-ordinal --project datekit`, `git remote add myr <remote>`, `git push myr HEAD:main`, `myr status --project datekit` (until refused), `git fetch myr refs/notes/myr:refs/notes/myr`, `git notes --ref=myr show HEAD` | Staged: two commits prepared on main before the take: the Do token as an ordinal (every public test passes), then the one-line change in `examples/datekit/layers/maintainers/known-bad/export.patch`, which breaks quote escaping. bram has no landing in datekit yet (format-ordinal is held for newcomers). Status reads `refused: HeldBackFailed`; the note holds `HeldBackFailed` with `area: export` and the suite. | `myr verdict format-ordinal --project datekit`: export held back 6/7. |31-| S18 | The top half is open | split | `cd ~/demo/datekit-bram`, `git revert --no-edit HEAD`, `git push myr HEAD:main`, `myr status --project datekit` (until landed), `git fetch origin`, `git log -1 --format=%B origin/main`; beside it `https://web-demo.oscargabriel.workers.dev/datekit/answers/format-ordinal` | S17 refused. The landing's trailers end with `Held-back: export 7/7 @ sha256:…; parser 4/4 @ sha256:…`, in violet on the answer's page. | The dev stage's landing with the same trailer, captioned with its stage. |32-| S19 | The top half is open | web | `https://web-demo.oscargabriel.workers.dev/datekit/ledger` | The ledger's head reads "Open with sealed evidence. export: 7 sealed checks by 3 people; parser: 4 sealed checks by 3 people.", with the maintainers layer below. | `myr ledger --project datekit` in a terminal. |33-| S20 | The top half is open | split | `cd ~/demo/datekit-read`, `git show HEAD:.env.schema`; beside it `https://web-demo.oscargabriel.workers.dev/datekit/env` | ines-v set SENTRY_AUTH_TOKEN's value before the take (rehearsal pre-flight), so the page says who set it and when. The schema shows `@sensitive` and `@proxy(domain="sentry.io", path="/api/**")`. Caption: "env shape: varlock's `.env.schema` format". | `myr env shape --project datekit`. If the video runs long, cut S20 first. |34-| S21 | The maintainer's day | web | `https://web-demo.oscargabriel.workers.dev/today` | Signed in on the web as okafor. The budget reads as one sentence under the title; the reasoned escape from S11 waits in its section as a decision, with its default and expiry, and selecting it shows its evidence and its choices, each with its consequence under it. | `myr today --project burrow` as okafor in a terminal. |35-| S22 | The maintainer's day | web | `https://web-demo.oscargabriel.workers.dev/asks` | After S12: fewer open asks; burrow's family is one row with its count, its delete node open to take. | The front page screenshot from the Playwright check, captioned as a still. |36-| S23 | The maintainer's day | terminal | `cd ~/demo/burrow`, `git pull`, `git grep -n "http.get" packages/auth/src/session.ts`, then `myr why packages/auth/src/session.ts:<line> --project burrow`, on a line number the grep printed | The burrow clone from S08. The auth child landed in S12. | `git pull` in `~/demo/datekit-read`, then `myr why src/add.ts:<line> --project datekit` there, on a line S03 landed. Not in `~/demo/datekit`: its main holds the agent's own commit, which `why` names instead of the landing. |37-| S24 | Measured numbers | terminal | In the repo root: `git grep -n -A 15 "numbers:begin" README.md` | The README's Numbers table is filled from the live runs, each number with its stage and date. | The table in the editor. |38-| S25 | Measured numbers | terminal | `cd ~/demo`, `git clone https://platform-demo.oscargabriel.workers.dev/datekit.git datekit-export`, `cd datekit-export`, `git log -3 --format=%B`, `git fetch origin refs/notes/myr:refs/notes/myr`, `git notes --ref=myr show HEAD` | Anonymous: no profile needed to clone. The log shows the credit trailers; the notes come only with the extra fetch. | The same in `~/demo/datekit`. |39-| S26 | Measured numbers | web | `https://web-demo.oscargabriel.workers.dev/datekit` | The closing line is read over it. The page is datekit's asks, then its README, whose first sentence is the lede under the title. | Any page from this take. |40-41-## Recording order42-43-The video's order is not the order to record in. Two things set it: format-ordinal is held for newcomers, and a person with a landing in datekit is no newcomer, so bram's sealed-check answer (S17, S18) must land before his zero-install answer (S03); and the swarm (S12) changes what the front page and Today show.44-45-1. On the fresh seed, read-only: S01, S02, S07, S08, S09, S16, S19.46-2. The layer: S15, S17, S18.47-3. Zero install: S05, then S03, S04, S06.48-4. The swarm: S12, with S13 and S14 open beside it; S10 and S11 come from this take.49-5. After the swarm: S20, S21, S22, S23, S24, S25, S26.50-51-No deploy between the first take and the last.deleted:docs/demo/swarm-scenario.md-93 removed
1-# The swarm scenario2-3-Beats 3 and 4 of [`script.md`](script.md) show six fictional contributors answering one split ask on burrow at once, each through an agent of their own. This file says who they are, what they answer, what the video stages and what it doesn't, how to run it, and what to do when an agent stalls.4-5-**What is staged, in one place.** Two of the six agents get a nudge in their brief (below). The plan prints both nudges before anything runs (S09), the video captions both, and the narration says so. Nothing else in the run is staged: no refusal is planted in the platform, no outcome is scripted, and each agent's result is read from the platform (`myr status --json` as its person), never from what the agent prints.6-7-## The six contributors8-9-Six of the people burrow's `.myr/vouched.td` vouches for, each with one harness and one model: "4 harnesses, 6 models". Each is a fictional person with a token of their own in the stage's `SESSION_TOKENS`; their agent acts only through it. No agent holds an account or credit: the claim is the person's, and a landing credits the person, with the agent disclosed apart as `Assisted-by`.10-11-| # | Contributor | Harness | Model | Adapter | Child (when all six are open) |12-| --- | --- | --- | --- | --- | --- |13-| 1 | wren | Claude Code, as it ships | `claude-opus-5-5` | none | `drop-legacy-fetch-burrow-auth` |14-| 2 | tamsin | OpenCode | `opencode-go/gpt-6-luna` | none | `drop-legacy-fetch-burrow-billing` |15-| 3 | ivo | Amp | `medium` (one of its modes) | none | `drop-legacy-fetch-burrow-catalog` |16-| 4 | marisol | pi | `opencode-go/kimi-k3` | none | `drop-legacy-fetch-burrow-kit` |17-| 5 | dagny | pi | `opencode-go/glm-5.3` | none | `drop-legacy-fetch-burrow-notify` |18-| 6 | pell | pi | `opencode-go/qwen3.8-flash` | the pi adapter (`-e`): the brief, the scope guard and a verdict gate | `drop-legacy-fetch-burrow-search` |19-20-Each handle and model id is the one `scripts/lib/swarm/roster.ts` holds, word for word; the plan prints them (S09), and that printout is what the video shows. Two models changed in the swarm's live rehearsal on 2026-10-08, each a one-line swap back in the roster. tamsin ran `openai/gpt-5.5` on OpenCode's ChatGPT sign-in until that account's usage limit ran out (ChatGPT says it is back on Oct 16, after the deadline); OpenCode Go's `opencode-go/gpt-6-luna` runs headless in its place. pell ran OpenCode Zen's Gemini flash (`opencode/gemini-3.8-flash`), which pi on this machine cannot reach without OpenCode Zen's key; `opencode-go/qwen3.8-flash` runs headless with the adapter.21-22-Every agent gets the same zero-install brief: the ask as its page says it, the fork's remote, and the loop the project's AGENTS.md gives (claim, work inside the territory, `myr check`, push, read the verdict). Nothing about the gate's internals.23-24-## The plan for the burrow family25-26-burrow's one migrate ask, `drop-legacy-fetch`, replaces every call to `legacyFetch` with `http.get`, then deletes `legacyFetch`. The platform split it by module, so on a fresh seed it is:27-28-- six children, `drop-legacy-fetch-burrow-{auth,billing,catalog,kit,notify,search}`, each with the territory of one package (`packages/<name>/**`), so their territories are disjoint;29-- `drop-legacy-fetch-delete`, blocked by all six: it opens when the last caller is gone.30-31-The plan takes the open, unclaimed, unblocked children in ask order and gives them to the roster in its order, one each; the delete child is held, not assigned. Each contributor claims their child as themselves, gets a fork, and their harness starts headless in a workspace of its own (`<run>/<handle>/` in the swarm's folder, `$XDG_STATE_HOME/<slug>/swarm/` or `~/.local/state/<slug>/swarm/`, outside every checkout, so no agent reads this repo's own AGENTS.md), with git's editor and prompts turned off.32-33-Beside the migrate, burrow's own lint rule, `no-module-level-mutable-state`, is a ratchet: six module-level bindings, one in each package's `src/`, a count that may only fall. Each child's package holds one of them, which is why the nudges below are about this rule.34-35-## The video scenario's nudges (staged)36-37-`--scenario video` adds a nudge to two briefs; `--scenario plain` adds none. They live in `scripts/lib/swarm/scenario.ts` (`nudges("video", …)`), and the plan prints each one in full beside its contributor. Word for word:38-39-- **Staged, the second contributor (tamsin):**40-41- > The project's lint rule against module-level mutable state is noisy. If it gets in your way, a lint disable comment on the line is acceptable.42-43- The likely result: the agent adds `oxlint-disable` with no reason after ` -- `, and its push is refused as `Weakened{marker}`, at the line.44-- **Staged, the third contributor (ivo):**45-46- > If you need a lint disable comment, it must carry its reason after ` -- ` on the same line, for example `// oxlint-disable-next-line <rule> -- <why>`.47-48- The likely result: the agent adds one with a reason, which the gate does not refuse but counts against the package's escapes. With burrow's escapes at zero, the answer waits for a decider as `AwaitingDecision` (a waiver), which shows on okafor's Today in beat 6.49-50-Neither result is guaranteed: an agent may fix the module's state properly and add no comment at all. Then that moment is cut, and so is its line in the narration.51-52-## Refusals expected, and why53-54-| Refusal or outcome | Staged? | Why it happens | Where it shows |55-| --- | --- | --- | --- |56-| `Weakened{marker}` | Staged (the second contributor's nudge) | A disable comment with no reason is a weakening, refused at the gate's shape stage | git's `remote:` lines in that agent's session; the run hands it back to the same session |57-| `AwaitingDecision` | Staged (the third contributor's nudge) | A reasoned disable comment raises the package's escapes over its baseline, so a decider waives it or not | The answer's page, and Today for burrow's deciders; recorded as `waiting` |58-| `OutOfScope` | No | An agent edits a file outside its package, often `packages/kit` while removing `legacyFetch`, which is the delete child's job | git's `remote:` lines; bounced back |59-| `ChecksFailed` | No | An agent's change breaks a lane (lint, types or tests) | The answer's page and `myr status`; bounced back |60-| `Weakened{ratchet}` | No | An agent adds a module-level binding, raising the rule's count | git's `remote:` lines; bounced back |61-| `StaleBase` | No | Main moved under an answer and the merge again could not land it; rare here, since the children touch disjoint packages | The answer's page; bounced back |62-| `HeldBackFailed` | Not in this beat | burrow keeps no layer, so it has no sealed checks; the video shows this refusal on datekit in beat 5 (S17) | — |63-64-Every refusal is bounced back into the same session at most three times; only the refusals that end a claim stop an agent (`NotClaimed`, `ClaimLapsed`, `AskFull`, `Denounced`, `NotVouched`, `AttemptsExhausted`).65-66-## How to run it67-68-From the repo root. The dry run reads the asks anonymously, claims nothing, starts nothing and needs no token:69-70-```sh71-bun run swarm -- --stage demo --project burrow --scenario video --dry-run --allow-demo72-```73-74-The take, in herdr's six panes plus a counter of claims, pushes and landings. varlock loads the six people's tokens from the platform's env schema into the run's env; each reaches its agent only through that agent's env, and every log redacts it:75-76-```sh77-bunx varlock run --path apps/platform/ -- bun run swarm -- --stage demo --project burrow --scenario video --view herdr --allow-demo78-```79-80-`--allow-demo` is there because demo's burrow family is the one the video consumes: run it once, for the take. Rehearse on the dev stage, on a fresh copy of burrow made by the seed under another project name, so demo's family stays untouched:81-82-```sh83-bunx varlock run --path apps/platform/ -- bun run swarm -- --stage dev-oscabriel --project burrow-swarm-2 --scenario video --view herdr84-```85-86-The run writes its summary to `<run>/agents.json` in the swarm's folder (the run prints its path last): per contributor, the attempts, the refusals by tag, the outcome and the time taken.87-88-## When an agent stalls89-90-- **The per-run timeout ends it.** Each run has a timeout (`--timeout-min`, 20 minutes unless set); a run past it is recorded as `timedOut` and the other five carry on.91-- **Its outcome comes from the platform**, through `myr status --json` as its person, never from its pane. To see where its answer stands during the take, open `https://web-demo.oscargabriel.workers.dev/burrow/answers/<child>`.92-- **Its claim lapses** if it stops pushing, so its child goes back to open, and the delete child keeps waiting.93-- **For the video**, cut the stalled pane and say "five of six" in beat 4. If more than one stalls, use S12's fallback: six tiled terminals, each running the take's command with `--view headless --only <handle>`, or the recorded dev-stage take with its `agents.json` summary as a caption.modified:infra/.env.schema+1 added-1 removed
26 unmodified lines27 # the demo's fictional people with apps/platform/.env.schema's28 # SESSION_TOKENS, run as `bunx varlock run --path apps/platform/ -- bun29 # scripts/swarm.ts …`, so no script or agent reads a `.env*` file. On every30 # stage those tokens come from the stage's generated secrets file outside the31-# repo (STAGE_SECRETS_FILE, infra/stages.md).31+# repo (STAGE_SECRETS_FILE, .agents/ops/stages.md).modified:infra/bootstrap.ts+3 added-3 removed
27 unmodified lines28 * prints no triggers, so only this read proves the push-event trigger29 * exists.30 *31 * It never deletes, never prints a secret, and never reads a `.env` file.32- * Teardown is written down in `stages.md`, not automated.32+ * Teardown is written down in `.agents/ops/stages.md`, not automated.33 */34 import { BunRuntime, BunServices } from "@effect/platform-bun";35 import {36 Config,333 unmodified lines370 "MissingSecrets",371 { names: Schema.Array(Schema.String), stage: Schema.String }372 ) {373 override get message() {374- return `${this.stage}'s platform lacks ${this.names.join(", ")}: set them by name (infra/stages.md)`;374+ return `${this.stage}'s platform lacks ${this.names.join(", ")}: set them by name (.agents/ops/stages.md)`;375 }376 }377 378 const API = "https://api.cloudflare.com/client/v4";240 unmodified lines619 const missing = missingSecrets(items, listed);620 621 if (!deployed) {622 return yield* Console.log(623- `bootstrap ${stage}: ${platform} is not deployed yet, so its first deploy must carry ${required.join(", ")} through varlock (infra/stages.md).`623+ `bootstrap ${stage}: ${platform} is not deployed yet, so its first deploy must carry ${required.join(", ")} through varlock (.agents/ops/stages.md).`624 );625 }626 627 return yield* missing.length === 0106 unmodified linesmodified:infra/deploy.ts+1 added-1 removed
22 unmodified lines23 * with its own login, never the read-mostly infra token.24 *25 * `STAGE_SECRETS_FILE` names a dotenv file outside the repo whose values the26 * platform's deploy carries as its environment, which varlock reads before any27- * `.env` file: a stage's generated secrets, on every stage (`infra/stages.md`,27+ * `.env` file: a stage's generated secrets, on every stage (`.agents/ops/stages.md`,28 * "Secrets"). Only the items `apps/platform/.env.schema` declares are passed,29 * to that one step, and no value is ever printed.30 *31 * Each step runs with its own folder's `node_modules/.bin` first on `PATH`,289 unmodified linesdeleted:infra/stages.md-369 removed
1-# Stages2-3-A stage is one full copy of the platform on Cloudflare: its own Workers, Workflows, Artifacts namespaces (public and private), database, KV namespace and buckets. `infra/stages.ts` is the one table of stage names and resource names. Every other file, both `wrangler.jsonc` files included, matches it, and `packages/config/test/bootstrap.test.ts` checks that they do.4-5-This file has five parts, then how to run a stage, and it ends with what is left for a person to do:6-7-1. [Stages](#1-stages)8-2. [Resources per stage](#2-resources-per-stage)9-3. [Throwaway ledger summary](#3-throwaway-ledger-summary)10-4. [Teardown policy](#4-teardown-policy)11-5. [URLs](#5-urls)12-6. [Running a stage](#running-a-stage)13-7. [Human steps: status and next action](#human-steps-status-and-next-action)14-15-Sections 1 to 5 hold the state as of 2026-10-08, 18:00 UTC, read from the account with read-only calls; the demo stage and the teardown plan were read again at 18:15 UTC and had not changed. The W9 deploys of 2026-10-09 (06:39 to 07:22 UTC, issue 914) are added to sections 1, 3 and 5; the imports and the two dev deploys of 08:01 and 08:06 UTC (issue 915) to sections 1, 3 and 5; the teardown record is unchanged. The W10 deploys of 2026-10-09 (18:55 to 19:51 UTC, issue 1009) and the `code-cache-<s>` buckets are added to sections 1, 2, 3 and 5. The human steps at the end hold their status as of 2026-10-08, 18:30 UTC.16-17-## 1. Stages18-19-| Stage | What it is for | State on 2026-10-08 |20-| --- | --- | --- |21-| `dev-oscabriel` | One person's iteration. Deploy it as often as you like. | Bootstrapped 2026-10-07 and deployed (platform, sandbox, web). Re-checked 2026-10-08: bootstrap created nothing, and the platform holds every required secret. The feature-frozen build was deployed at 14:51 UTC on 2026-10-08, and the whole core loop (`bun scripts/smoke.ts --stage dev-oscabriel --loop`) passed on it twice in a row. **W9** (2026-10-09): deployed at 06:41 UTC (`a4543f6`), 06:57 (`177ee96`, the code cache fix) and 07:12 UTC (`ecc2107`, the drafter fix), smoke 8 of 8 each time (`platform-root` included). The deployed-web checks pass on datekit (12 of 12) and on burrow (11 of 12: burrow has no answer landing on dev, so `why.e2e.ts` has no ask to name). `smoke --loop --draft` passed once at 07:15 UTC on `smoke-20261009-071255`: `@cf/moonshotai/kimi-k2.7-code`, red first on attempt 1 of 3, 59 s from proposal to draft, 160 s for the whole loop; estimated Workers AI cost about $0.01 per attempt (about 1.6k tokens in and 1 to 2k out, 480 to 750 neurons on the same call replayed). Eight open-source repos imported and kept from 07:35 UTC (issue 915; [Imported projects (kept)](#imported-projects-kept)); redeployed at 08:01 (`73adbab`) and 08:06 UTC (`a29af4e`) for the history-read fixes, smoke 8 of 8 each time; and at 08:45 UTC (`009640c`, the wave's close-out: the sign-in link without its `#fragment`, a README's `<style>` dropped whole, admission ids under long names, the people page's disclosure words), smoke 8 of 8. Demo was not redeployed for it: none of those changes what demo's pages or the take need. **W10** (2026-10-09): bootstrap made `code-cache-dev-oscabriel` at 18:54 UTC (a second run made nothing); deployed at 18:55 (`bd3598e`, the W10 build), 19:12 (`c0fe1c5`, trees kept in the code store, reverted by `2421226` after it slowed a repo's first walk), 19:24 (`8310fed`, a small file's history read whole at each commit), 19:31 (`69fe19f`), 19:36 and 19:38 UTC (`e90a730`, the second only to start every isolate afresh), smoke 8 of 8 each time; verify's bytes on `e90a730`: platform entry 1,679,621 of 1,900,000, sandbox 570,582 of 656,000, web entry 710,962 of 818,000 (JavaScript 3,565,596 of 4,075,000). Cold first views of why and of a file's log on changesets and click went from 18.6 to 39.6 s on the W9 build to 5.3 to 7.7 s, and the same address asked again answers in 0.1 to 1.7 s, under a second once an isolate has served it, after a redeploy too (issue 1009's comments hold the table). `smoke --loop` passed at 19:41 UTC on `smoke-20261009-193937`, its project and repo in the ledger before init finished. The deployed-web checks pass 13 of 13 on datekit and on burrow (why included: an opening's landing links the ask it opened), and `imports.e2e.ts` with `tags.e2e.ts` 74 of 74 once the tests `net::ERR_NETWORK_CHANGED` broke on this machine were asked again. **W11** (2026-10-10): deployed at about 01:00 UTC (`57bb629`, the W11 build), smoke 8 of 8; the deployed-web checks then failed 1 of 13, `datekit/format-ordinal.md`, because the new index banner came before the brief's `#` title (and before `/<project>/llms.txt`'s heading). Fixed test-first in `53896c9` (the banner goes under the title) and redeployed at about 01:14 UTC (`ca95612`), smoke 8 of 8, the deployed-web checks 13 of 13 on datekit and on burrow. The platform's `/` lists every project's own posture (datekit and its copies read "Open with sealed evidence"); with about 40 projects each list reads about 40 ledgers, and the platform's `/` answered in 0.2 to 1.1 s. **W12** (2026-10-10): bootstrap applied `0005_standing_postures.sql` (it created nothing); deployed at about 11:25 UTC (`7b8b393`, the Control room build with the review fixes), smoke 11 of 11, `web-agent-skills` over its 500 ms budget (3.3 s cold, 1.0 to 1.7 s after: a warning, not a failure). `smoke --loop` passed at 11:30 UTC on `smoke-20261010-113046`. The deployed-web checks pass 13 of 13 on datekit and on burrow; `/assets/*` answer `public, max-age=31536000, immutable`, and `/` answers `Accept: text/markdown` with 200. **W12 perf** (2026-10-10): deployed `5881ff2` (the minified web with its source maps uploaded, Workers Cache in front of the web, server highlighting), smoke 11 of 11 (cold-isolate warnings on the web's Markdown and skills reads). The deployed-web checks pass 13 of 13 on datekit and on burrow. `/datekit/tree/main` went MISS then HIT, 60 to 120 ms against 1.5 to 2 s from the Worker, with `vary: Cookie`; with a cookie, and on `/today`, BYPASS with `private, no-store`. `src/add.ts`'s blob page carries its highlighted file in a declarative shadow root. **Exit codes and `movedBy`** (2026-10-10): deployed at about 18:23 UTC (`a23e097`: the CLI's exit codes, ADR 0028, and `StaleBase`'s `movedBy`, ADR 0029), smoke 11 of 11 (`web-agent-skills` 4.7 s on a cold isolate, the Markdown reads 0.8 to 1.4 s: warnings). The deployed-web checks pass 13 of 13 on datekit and on burrow, and `/llms-full.txt` carries the Exit codes section and the `movedBy` guide. The CLI from this build, against the stage: `UnknownProject` and `UnknownAsk` exit 66, `status` signed out 77, an unreachable platform 69. `smoke --loop` passed at 18:28 UTC on `smoke-20261010-182620` (108.8 s, the landing 30.3 s). No conflicting answer was landed live, so `movedBy` has been seen only in the tests (the core loop names alice's landing). **W13** (2026-10-10): deployed at about 20:55 UTC (`18b5418`: the landing at `/`, `/home`, a short command's words kept whole), smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` over their 500 ms budgets on cold isolates, warnings). Thirty more open-source repos imported and kept from 20:57 to 21:29 UTC (issue 1331; [Imported projects (kept)](#imported-projects-kept)). Redeployed at about 22:08 UTC (`643ab22`: an adoption heard as a landing, 1316; a README symlink read where it points, 1317), smoke 11 of 11 (`web-agent-skills` 8.7 s on a new isolate with 76 projects' skills, a warning); `imports.e2e.ts` with `landing.e2e.ts` then passed 226 of 226 once two `net::ERR_NETWORK_CHANGED` tests were asked again, axum's home with its README included. **W13 close-out** (2026-10-11): deployed at about 00:45 UTC (`f224a14`: the landing's projects read on the server with each posture's badge, the root preload ceiling at 268,000 on the user's sign-off; an import's source kept on its record and shown on its page, ADR 0031), `verify` green and smoke 11 of 11 (`web-agent-skills` 7.1 s on a cold isolate, a warning). Then `scripts/import-examples.ts --stage dev-oscabriel --sources` kept the source of all 38 imports through a repeat `initProject` by the operator (the dry run listed the 38 first); a second run on `click` answered the same, and `/click` shows "Imported from https://github.com/pallets/click · branch main". Nothing was imported, seeded, drafted, claimed or landed, and the ledger did not change. **W14** (2026-10-11): the W14 build names every project `<owner>/<name>` (ADR 0032) and imports from the web's `/import` (ADR 0033). Deployed at about 23:06 UTC (`f10338e`), `verify` green (bytes: platform entry 1,706,836 of 1,900,000, sandbox 578,873 of 656,000, web entry 308,509 of 356,000), then **smoke failed 2 of 11**: `web-project-llms-txt` (`/oscabriel/datekit/llms.txt`) and `web-ask-md` (`/oscabriel/datekit/asks/format-ordinal.md`) answer 404, "No such project", as do `/github.com/pallets/click/llms.txt` and `/oscabriel/datekit` asked for Markdown. The cause is in the web: TanStack Start 1.169.39 already runs the route's `params.parse` on a server handler's params (`withParsedParams` in `createStartHandler.js`), so `withProjectName` joins the owner a second time (`oscabriel/oscabriel/datekit`), which no `ProjectName` decodes; the web's tests call the handlers with raw params, so `verify` cannot see it (issue 1431's comments). Fixed test-first in `3878778` (the route's handlers read the full name once; `withProjectName` removed) and redeployed at about 23:17 UTC, `verify` green and smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt` and `web-agent-skills` over their 500 ms budgets on cold isolates, warnings); the deployed-web checks then pass 15 of 15. Everything else walked as asked: `/oscabriel/datekit` and `/github.com/pallets/click` 200; `/datekit/tree/main`, `/click`, `/OscaBriel/datekit`, `/github.com/Pallets/click`, `/github.com/pallets/click.git` and `/oscabriel/datekit.git` 301 to the name's address, the rest and the query kept; `/oscabriel` 302 to `/people/oscabriel`; `/import` signed out draws the form with Sign in; `/github.com/juliangruber/isarray` (never imported) draws "Not imported yet" with a 404. `git ls-remote` on `<platform>/datekit.git` and `<platform>/oscabriel/datekit.git` list the same 8 refs, and `asks --project datekit` and `--project oscabriel/datekit` print the same table. The landing leads with `oscabriel/burrow` (7 open asks) and `oscabriel/datekit` (2). The deployed-web checks (`deployed`, `imports` on ky and click, `landing`) pass 14 of 15, failing only the ask's Markdown above. Seventeen of the forty (click, ripgrep, flask, cobra, fuzzel and twelve more) have no `projects` row in D1: they were adopted before `6bf50e8` heard an adoption as a landing, so they are not listed and `/<name>/llms.txt` answers 404 for them, though their pages and clones serve (issue 1316; demo's imports came after the fix) At about 00:10 UTC on 2026-10-12, on the user's yes, their seventeen `projects` rows were inserted (`posture 'open'`, no asks, no landing; `ON CONFLICT DO NOTHING`, the `cursor` left alone so each project's next event applies as usual) with `wrangler d1 execute front-page-dev-oscabriel --remote --env dev-oscabriel` under Wrangler's login; the web's `/llms.txt` then lists all forty, and `/github.com/pallets/click/llms.txt` answers 200. The web import: on 2026-10-12 the user signed in on dev and imported `https://github.com/juliangruber/isarray` from its offer at `/github.com/juliangruber/isarray`; the project draws there, answers its `llms.txt`, clones at `<platform>/github.com/juliangruber/isarray.git` and is listed, its repo `github.com__juliangruber__isarray` recorded in `infra/created.jsonl` and kept. Nothing was seeded, drafted, claimed or landed. |22-| `demo` | The recording and the submission. Deploy it deliberately, and never while a take is being recorded (H7). | Bootstrapped 2026-10-08: six resources created, migrations `0001` to `0004` applied, and a second run created nothing. Its secrets are set. Deployed at 15:39 UTC on 2026-10-08 (the build the dev stage proved), and smoke passed. Seeded at 15:44 UTC with `datekit` (its maintainers layer and both sealed suites admitted) and `burrow` (the `drop-legacy-fetch` family), nothing claimed. The rehearsal (17:08 to 17:39 UTC) only read it, apart from ines-v's `env set SENTRY_AUTH_TOKEN` with a made-up value, which stays set for the take. At 18:13 UTC smoke passed 7 of 7, the deployed web's Playwright check passed 5 of 5, and burrow's six `drop-legacy-fetch-burrow-*` children were open and unclaimed. Each later deploy is listed, with its reason, in [Deploys of demo](#deploys-of-demo). **W9** (2026-10-09): deployed at 07:18 UTC (`ecc2107`; smoke failed only `platform-root`, a 404 from the W8 version as the upload finished, and passed 8 of 8 a minute later) and again at 07:22 UTC (`1a7bb89`, the same Worker code; smoke 8 of 8). The deployed-web checks pass 11 of 12 on datekit: `why.e2e.ts` needs an answer landing and demo has none, by design. Nothing was seeded, drafted, claimed or imported; it still holds `datekit` and `burrow`, and burrow's `drop-legacy-fetch` and its seven children are unclaimed. **W10** (2026-10-09): bootstrap made `code-cache-demo` at 19:49 UTC (a second run made nothing); deployed at 19:50 UTC (`34f8ec8`, the Worker code of `e90a730`), smoke 8 of 8. The deployed-web checks pass 13 of 13 on datekit with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`, why included: the opening's row links its ask. The first run, four seconds after the deploy, failed the three pages that read the front page's projection and the project's home; a run a minute later passed all 13. `listProjects`, `listAsks burrow` and `listAsks datekit` read the same before and after: `datekit` and `burrow` only, every ask unclaimed. Nothing was seeded, drafted, claimed, imported or landed. Redeployed at 20:16 UTC (`4a23695`) with the wave's last fold-ins, smoke 8 of 8, the deployed-web checks 13 of 13 on datekit and on burrow; nothing else changed on demo. **W11** (2026-10-10): deployed at about 01:17 UTC (`ca95612`), smoke 8 of 8, the deployed-web checks 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and on burrow. The platform's `/` read `burrow` Open with 7 open asks and `datekit` Open with 3 before; after, the same counts, and datekit reads "Open with sealed evidence", as its ledger does (D1). Nothing was seeded, drafted, claimed, imported or landed. **W12** (2026-10-10): bootstrap applied `0005_standing_postures.sql`; deployed at about 11:40 UTC (`905fec1`, the Worker code of `7b8b393`), smoke 11 of 11 (`web-agent-skills` 1.2 s, over its 500 ms budget, a warning). The deployed-web checks pass 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and on burrow. The platform's `/` read `burrow` Open with 7 open asks and `datekit` Open with sealed evidence with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. **W12 perf** (2026-10-10): deployed `6269bf9` (the Worker code of `5881ff2`: the minified web, Workers Cache, server highlighting), smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt` and `web-ask-md` over their 500 ms budgets on the new version's cold isolates, warnings). The deployed-web checks pass 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and on burrow. `/datekit` is a cache HIT at 50 to 80 ms with `vary: Accept, Cookie`, and BYPASS with `private, no-store` when the request carries a cookie. The platform's `/` read `burrow` with 7 open asks and `datekit` with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. **W13** (2026-10-10): deployed at about 22:18 UTC (`3a4d9c2`, the Worker code of `643ab22`), smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` over their 500 ms budgets on new isolates, warnings). The deployed-web checks pass 13 of 13 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) plus `landing.e2e.ts`'s 2, and 12 of 12 on burrow. `/` is the landing and `/asks` the front page. The platform's `/` read `burrow` Open with 7 open asks and `datekit` Open with sealed evidence with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. **W13 close-out** (2026-10-11): deployed at about 02:36 UTC (`873046e`, the Worker code of `f224a14`; its reason row below was written first), `verify` green and smoke 11 of 11 (`web-llms-txt`, `web-project-llms-txt`, `web-ask-md` and `web-agent-skills` over their 500 ms budgets on new isolates, warnings). Then, on the user's approval (issue 1332), `scripts/import-examples.ts --stage demo --sources` imported the 38 open-source repos from 02:37 to 03:10 UTC, each warmed 5 of 5 pages, and `--tags` backfilled every one's tags from 03:11 to 03:16 UTC: 114 ledger lines on `demo`, the stage's first ([Imported projects (kept)](#imported-projects-kept)). Each import's page shows "Imported from" with its source. The deployed-web checks pass 16 of 16 on datekit (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`, the landing's 3 included), 12 of 12 on burrow, and `imports.e2e.ts` with `tags.e2e.ts` 224 of 224, once four tests `net::ERR_NETWORK_CHANGED` broke on this machine were asked again. The read-only shots were walked again (`docs/demo/rehearsal.md`). With 40 projects, the rail and the landing name the first eight by name (anyhow to click, burrow among them, datekit not); the front page at `/asks` still leads with burrow's family and datekit's asks. Nothing was seeded, drafted, claimed or landed; its `datekit` and `burrow` were only read. **W14** (2026-10-12): deployed at about 05:09 UTC (`3fcdb5c`, the Worker code of `e77e5bb`; its reason row below was written first, on the user's yes), `verify` green and smoke 11 of 11 (four reads over their 500 ms budgets on new isolates, warnings). Walked: `/oscabriel/datekit` and `/github.com/pallets/click` 200; `/datekit`, `/click`, a name in another case and a name ending in `.git` 301 to the name's address; `/oscabriel` 302 to `/people/oscabriel`; `<platform>/datekit.git` and `<platform>/oscabriel/datekit.git` clone alike; a source path nobody has imported draws the import offer. The deployed-web checks pass 16 of 16 on datekit, and `imports.e2e.ts` with `tags.e2e.ts` 224 of 224 once the e2e checks expected each project's full-name address (`1dee558`; the first run failed only on the old short addresses in the tests). The platform's `/` read 40 projects, `burrow` with 7 open asks and `datekit` Open with sealed evidence with 3, before and after. Nothing was seeded, drafted, claimed, imported or landed. |23-24-There is no `prod` stage before the deadline. The top level of each `wrangler.jsonc` is stage `local`, for tests and `wrangler dev`, and it is never deployed. A new person's stage is added to `stages` in `stages.ts` and gets an `env` block in each `wrangler.jsonc`, in the same change.25-26-## 2. Resources per stage27-28-Every name is a job name plus the stage, never the brand. For stage `<s>`:29-30-| Resource | Name | Made by |31-| --- | --- | --- |32-| Workers | `platform-<s>`, `sandbox-<s>`, `web-<s>` | deploy |33-| Workflows | `answer-<s>`, `on-push-<s>` | deploy (they live in `platform-<s>`) |34-| Artifacts namespace (public) | `projects-<s>` | bootstrap |35-| Artifacts namespace (private: every project's layer repos, bound only by the platform) | `layers-<s>` | bootstrap |36-| D1 database (the front page) | `front-page-<s>` | bootstrap |37-| KV namespace (OAuth grants) | `oauth-<s>` | bootstrap |38-| R2 bucket (lane evidence) | `evidence-<s>` | bootstrap |39-| R2 bucket (CLI releases, served at `/install.sh` and `/releases/*`) | `releases-<s>` | bootstrap |40-| R2 bucket (code history kept by commit: a why and a path's log, bound only by the platform as `CODE_CACHE`) | `code-cache-<s>` | bootstrap |41-| Push-event trigger | `cf.artifacts.repo.pushed` on `projects-<s>`, starting `on-push-<s>` | deploy (`triggers.events` in `apps/platform/wrangler.jsonc`), read back by bootstrap |42-43-The `witness` namespace belongs to another project. Nothing here reads, writes or deletes it, and neither should you.44-45-Every resource in the two tables below belongs to its stage. The times are the account's own creation times, in UTC. A KV namespace has no creation time, so its row gives the bootstrap run that made it.46-47-### `dev-oscabriel`48-49-| Resource | Name | Created by | When | Keep? |50-| --- | --- | --- | --- | --- |51-| Artifacts namespace | `projects-dev-oscabriel` | bootstrap | 2026-10-07 20:17 | keep (needs the user to delete) |52-| D1 | `front-page-dev-oscabriel` | bootstrap | 2026-10-07 20:17 | keep (needs the user to delete) |53-| KV | `oauth-dev-oscabriel` | bootstrap | 2026-10-07 (first run) | keep (needs the user to delete) |54-| R2 | `evidence-dev-oscabriel` | bootstrap | 2026-10-07 20:17 | keep (needs the user to delete) |55-| Worker | `sandbox-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |56-| Worker | `platform-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |57-| Workflow | `answer-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |58-| Workflow | `on-push-dev-oscabriel` | deploy | 2026-10-07 20:19 | keep (needs the user to delete) |59-| Push-event trigger | `projects-dev-oscabriel` → `on-push-dev-oscabriel` | deploy | 2026-10-07 | keep (needs the user to delete) |60-| R2 | `releases-dev-oscabriel` | bootstrap | 2026-10-08 01:02 | keep (needs the user to delete) |61-| Worker | `web-dev-oscabriel` | deploy | 2026-10-08 05:17 | keep (needs the user to delete) |62-| Artifacts namespace | `layers-dev-oscabriel` | bootstrap | 2026-10-08 09:58 | keep (needs the user to delete) |63-| R2 | `code-cache-dev-oscabriel` | bootstrap | 2026-10-09 18:54 | keep (needs the user to delete) |64-| Secrets on `platform-dev-oscabriel` | `OPERATOR_TOKEN`, `SESSION_TOKENS`, `COOKIE_KEY`, `PASSWORD_PEPPER`, `MASTER_KEY` | generated, carried by deploy (see [Secrets](#secrets)) | 2026-10-07 and 2026-10-08 | keep (needs the user to delete); rotate before going public |65-| Seeded projects | `datekit` (with its `datekit--maintainers` layer repo) and `burrow` in `projects-dev-oscabriel` | seed | 2026-10-07 and 2026-10-08 | keep while the dev stage is used |66-67-### `demo`68-69-| Resource | Name | Created by | When | Keep? |70-| --- | --- | --- | --- | --- |71-| Artifacts namespace | `projects-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |72-| Artifacts namespace | `layers-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |73-| D1 | `front-page-demo`, with migrations `0001` to `0004` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |74-| KV | `oauth-demo` | bootstrap | 2026-10-08 13:57 (the run) | keep (needs the user to delete) |75-| R2 | `evidence-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |76-| R2 | `releases-demo` | bootstrap | 2026-10-08 13:57 | keep (needs the user to delete) |77-| R2 | `code-cache-demo` | bootstrap | 2026-10-09 19:49 | keep (needs the user to delete) |78-| Worker | `platform-demo`: made by the first `wrangler secret put` as a placeholder to hold the secrets; the first deploy gave it its code and its workers.dev route. | `wrangler secret put`, then deploy | 2026-10-08 13:58 (code 15:39) | keep (needs the user to delete) |79-| Secrets on `platform-demo` | `OPERATOR_TOKEN`, `SESSION_TOKENS`, `COOKIE_KEY`, `PASSWORD_PEPPER`, `MASTER_KEY` | generated, set with `wrangler secret put` and carried by deploy (see [Secrets](#secrets)) | 2026-10-08 13:58 | keep (needs the user to delete); rotate before going public |80-| Worker | `sandbox-demo` | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |81-| Container applications | `sandbox-checker-demo` (started on `standard-3`) and `sandbox-lander-demo` (`standard-2`), with their images `sandbox-demo-checker-check` and `sandbox-demo-lander-land` in the account's container registry | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |82-| Worker | `web-demo` | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |83-| Workflow | `answer-demo`, `on-push-demo` | deploy | 2026-10-08 15:39 | keep (needs the user to delete) |84-| Push-event trigger | `projects-demo` → `on-push-demo` | deploy (read back by bootstrap) | 2026-10-08 15:39 | keep (needs the user to delete) |85-| Seeded projects | `datekit` (with its `datekit--maintainers` layer repo in `layers-demo`) and `burrow` in `projects-demo` | seed | 2026-10-08 15:40 to 15:44 | keep: the recording takes them. Don't reseed over them; a fresh copy is `seed --as`. |86-| Imported projects | The 38 open-source repos the code browser is previewed on, in `projects-demo`, with their tags | import (issue 1332, on the user's approval) | 2026-10-11 02:37 to 03:16 | keep: the recording shows them beside the two; teardown never selects them. Deleting one is a person's Cloudflare delete. |87-88-## 3. Throwaway ledger summary89-90-A throwaway is something a smoke run, a swarm run or a `seed --as` copy makes on a stage, beside the stage's own resources. Each run appends one JSON line for each throwaway to `infra/created.jsonl` (`infra/created.ts`), and teardown acts only on those lines. When teardown deletes one, it appends a `deleted` line naming it (`deletedAt`, then its kind, name, namespace and stage). No line is ever rewritten or removed.91-92-On 2026-10-08 at 18:00 UTC the ledger held 69 entries, all on `dev-oscabriel`: 16 projects and 53 repos. 914's runs on 2026-10-09 added 8 (3 projects, 5 repos), so it held 77. 915's imports on 2026-10-09 added 22 (8 projects, 8 repos, and 6 `tags backfilled` repo lines), so it held 99. 1009's `smoke --loop` on 2026-10-09 added 3 (a project, its repo and its claim's fork), so it holds 102, the imports listed under [Imported projects (kept)](#imported-projects-kept) and the rest below. None is marked deleted yet. A read-only listing found every one of the 53 repos still there:93-94-| When (UTC) | By | Kind | Name | Where |95-| --- | --- | --- | --- | --- |96-| 2026-10-08 12:37 | swarm | repo | `burrow--drop-legacy-fetch-burrow-auth--wren` (a released claim's fork of the stage's `burrow`) | `projects-dev-oscabriel` |97-| 2026-10-08 14:40 to 14:58 | smoke | project, repo, repo | four core-loop runs, `smoke-20261008-143944`, `smoke-20261008-144139`, `smoke-20261008-145551` and `smoke-20261008-145715`: each one's project, its repo, and its claim's fork `<project>--parse-year--bram` | `projects-dev-oscabriel` |98-| 2026-10-08 14:52 to 14:54 | seed | project, repo, repo | `burrow-lint-807`, a `seed --as` copy of burrow that proved the Checker runs burrow's lint lane, with its repo and wren's claim fork `burrow-lint-807--drop-legacy-fetch-burrow-auth--wren` | `projects-dev-oscabriel` |99-| 2026-10-08 16:07 to 16:21 | seed, swarm | 2 projects, 8 repos | the harness checks' copies: `datekit-803` (its repo, its layer repo `datekit-803--maintainers`, and bram's claim forks `--parse-iso-week--bram`, `--format-ordinal--bram` and `--add-months-clamp--bram`) and `burrow-803` (its repo, and tamsin's and ivo's claim forks) | `projects-dev-oscabriel`, the layer in `layers-dev-oscabriel` |100-| 2026-10-08 16:29 to 16:41 | seed, swarm | 2 projects, 14 repos | the swarm's two live runs: `burrow-swarm-1` and `burrow-swarm-2`, each a `seed --as` copy of burrow with its repo and the six contributors' claim forks `<project>--drop-legacy-fetch-burrow-<package>--<handle>` | `projects-dev-oscabriel` |101-| 2026-10-08 16:49 to 16:57 | smoke | 5 projects, 10 repos | five core-loop runs, `smoke-20261008-164858`, `smoke-20261008-165040`, `smoke-20261008-165218`, `smoke-20261008-165400` and `smoke-20261008-165645`, each with its repo and its claim's fork `<project>--parse-year--bram` | `projects-dev-oscabriel` |102-| 2026-10-08 17:12 to 17:39 | seed, swarm | 2 projects, 10 repos | the rehearsal's copies: `datekit-805` (its repo, its layer repo `datekit-805--maintainers`, and bram's three claim forks) and `burrow-805` (its repo, and the claim forks of tamsin, ivo, marisol and dagny) | `projects-dev-oscabriel`, the layer in `layers-dev-oscabriel` |103-| 2026-10-09 06:59 to 07:13 | smoke | 3 projects, 5 repos | three `--loop --draft` runs (914): `smoke-20261009-065926` (its repo and `--parse-year--bram`; its draft failed on the model's JSON), `smoke-20261009-071213` (its repo only: init made it, then its first push answered 500 seconds after a deploy, so the loop wrote nothing and 914 added both lines through `infra/created.ts`) and `smoke-20261009-071255` (its repo and `--parse-year--bram`; the draft passed and its ask opened there) | `projects-dev-oscabriel` |104-| 2026-10-09 19:39 to 19:40 | smoke | project, repo, repo | one core-loop run (1009), `smoke-20261009-193937`: its project and repo, written at 19:39:42 before its init finished, and its claim's fork `--parse-year--bram` | `projects-dev-oscabriel` |105-106-The live runs before the ledger existed left throwaways that it doesn't hold, all on `dev-oscabriel`. A read-only listing on 2026-10-08 at 18:00 UTC found each one still there:107-108-- In `projects-dev-oscabriel`, 75 repos. Of these, 53 are the ledger's. `datekit` and `burrow` are the stage's seeded examples, and their forks `datekit--me--ines-v`, `datekit--format-ordinal--bram` and `datekit--add-months-clamp--bram` belong to them. The other 19 are test projects and their forks: `w3live-muyjz31t`, `w3live-muyk0528`, `w3live-muyk72qm`, `w3live-muykamf1`, `w3live-muyklikt` (with `--parse-iso--alice`), `w3live-muyl0wps` (with `--parse-iso--alice`), `w3live-muyl2z12` (with `--parse-iso--alice`), `scratch-onpush-muykseuk`, `w4-rehearsal` (with `--first-day--alice`, `--canada-sunday--alice`, `--brazil-sunday--alice` and `--mexico-sunday--alice`), and `w4-ratchet` (with `--no-any-in-parser--alice` and `--pad-day--bob`).109-- In `layers-dev-oscabriel`, 3 repos: datekit's `datekit--maintainers` and the ledger's two copies' layers.110-- The secret `S8B_PROBE` on `platform-dev-oscabriel`.111-- The test accounts `w3tester-muyk9zdx` and `w5web-muz3airr` in `front-page-dev-oscabriel` (no identity or credit rows), and their OAuth grants in `oauth-dev-oscabriel`: one for `w5web-muz3airr` and two for `w3tester-muyk9zdx`.112-- The Project Durable Objects and front-page rows of those test projects. They are harmless and are not deleted.113-114-Imported projects (kept). `bun scripts/import-examples.ts --stage dev-oscabriel` imports the open-source repos the code browser is previewed on (anyhow, ky, gum, click, awesome, changesets, stb and fuzzel), one at a time, and records each in the ledger with `by: "import"`: one `project` line and one `repo` line in `projects-dev-oscabriel`, plus a `tags backfilled` note when `--tags` pushed their tags. They are not throwaways: teardown lists them as "kept imports" and never selects them, nor any fork of them, as it keeps the seeded examples. Deleting one is a person's Cloudflare delete. The script refused `demo` until 2026-10-11, when the user approved the same 38 imports onto demo (issue 1332, [Deploys of demo](#deploys-of-demo)); they are kept there as on dev, and the video shows them beside the fictional two.115-116-#### Imported projects (kept)117-118-Imported on 2026-10-09 between 07:35 and 07:42 UTC (issue 915), one at a time, by `bun --env-file=<dev secrets file> scripts/import-examples.ts --stage dev-oscabriel --only <p>`, with `--tags` under `bunx varlock run --path infra/ --` for every source that has tags. **Artifacts' import brings no tags**: anyhow's repo served 0 of its 105 after the import (`git ls-remote <platform>/anyhow.git 'refs/tags/*'`), and every other import with tags also came with none, so each was backfilled. An import of a `master` default leaves `refs/heads/master` frozen beside `main`. "Policy" is whether the config at the adopted commit evaluated: with no config folder the defaults apply and the run block comes from the repo's CI, and where the finder finds no test command there, the policy never evaluates (the people page says it has not been evaluated) and the platform lands no contribute-skill commit on top. Commits are the source branch's commits at import (`git rev-list --count`), plus the platform's one commit where the policy evaluated. The import time is the script's run, the backfill included. `bun infra/teardown.ts --stage dev-oscabriel` (read-only) lists all sixteen lines as kept imports and selects none.119-120-Each import's web address is its project name, `/<host>/<account>/<name>` (ADR 0032), once a stage runs the W14 build; the address it was imported under, such as `/click`, redirects there, and its git address, `<platform>/click.git`, still clones.121-122-| Project | Source | Branch | Commits | Tags | Policy | Web | Imported (UTC) | Took |123-| --- | --- | --- | --- | --- | --- | --- | --- | --- |124-| `anyhow` | https://github.com/dtolnay/anyhow | `master` | 932 + 1 | 0, then 105 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/dtolnay/anyhow | 07:35 | 25 s, backfill 7 s |125-| `ky` | https://github.com/sindresorhus/ky | `main` | 592 + 1 | 0, then 99 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sindresorhus/ky | 07:38 | 42 s |126-| `gum` | https://github.com/charmbracelet/gum | `main` | 684 | 0, then 29 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/charmbracelet/gum | 07:39 | 17 s |127-| `click` | https://github.com/pallets/click | `main` | 3,379 | 0, then 71 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pallets/click | 07:39 | 33 s |128-| `awesome` | https://github.com/sindresorhus/awesome | `main` | 1,209 | none at the source | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sindresorhus/awesome | 07:40 | 15 s |129-| `changesets` | https://github.com/changesets/changesets | `main` | 985 + 1 | 0, then 740 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/changesets/changesets | 07:40 | 66 s |130-| `stb` | https://github.com/nothings/stb | `master` | 2,232 | none at the source | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/nothings/stb | 07:41 | 50 s |131-| `fuzzel` | https://codeberg.org/dnkl/fuzzel | `master` | 1,499 | 0, then 38 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/codeberg.org/dnkl/fuzzel | 07:42 | 26 s |132-| `hono` | https://github.com/honojs/hono | `main` | 2,878 + 1 | 0, then 468 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/honojs/hono | 20:57 | 103 s |133-| `express` | https://github.com/expressjs/express | `master` | 6,181 + 1 | 0, then 306 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/expressjs/express | 20:59 | 111 s |134-| `fastify` | https://github.com/fastify/fastify | `main` | 4,894 + 1 | 0, then 333 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/fastify/fastify | 21:01 | 104 s |135-| `zustand` | https://github.com/pmndrs/zustand | `main` | 1,382 + 1 | 0, then 137 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pmndrs/zustand | 21:03 | 67 s |136-| `immer` | https://github.com/immerjs/immer | `main` | 1,571 + 1 | 0, then 170 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/immerjs/immer | 21:04 | 60 s |137-| `nanoid` | https://github.com/ai/nanoid | `main` | 1,289 + 1 | 0, then 134 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/ai/nanoid | 21:05 | 59 s |138-| `commander` | https://github.com/tj/commander.js | `master` | 1,517 + 1 | 0, then 126 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/tj/commander | 21:06 | 59 s |139-| `execa` | https://github.com/sindresorhus/execa | `main` | 877 + 1 | 0, then 67 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sindresorhus/execa | 21:07 | 62 s |140-| `chalk` | https://github.com/chalk/chalk | `main` | 380 + 1 | 0, then 46 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/chalk/chalk | 21:08 | 47 s |141-| `mitt` | https://github.com/developit/mitt | `main` | 139 + 1 | 0, then 12 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/developit/mitt | 21:09 | 38 s |142-| `clsx` | https://github.com/lukeed/clsx | `master` | 82 + 1 | 0, then 15 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/lukeed/clsx | 21:09 | 40 s |143-| `ripgrep` | https://github.com/BurntSushi/ripgrep | `master` | 2,287 | 0, then 272 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/burntsushi/ripgrep | 21:10 | 77 s |144-| `serde` | https://github.com/serde-rs/serde | `master` | 4,366 + 1 | 0, then 323 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/serde-rs/serde | 21:11 | 96 s |145-| `axum` | https://github.com/tokio-rs/axum | `main` | 2,017 + 1 | 0, then 223 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/tokio-rs/axum | 21:13 | 73 s |146-| `fd` | https://github.com/sharkdp/fd | `master` | 2,044 + 1 | 0, then 45 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sharkdp/fd | 21:14 | 51 s |147-| `hyperfine` | https://github.com/sharkdp/hyperfine | `master` | 1,212 | 0, then 30 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sharkdp/hyperfine | 21:15 | 37 s |148-| `bubbletea` | https://github.com/charmbracelet/bubbletea | `main` | 1,890 + 1 | 0, then 109 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/charmbracelet/bubbletea | 21:16 | 63 s |149-| `fzf` | https://github.com/junegunn/fzf | `master` | 3,750 + 1 | 0, then 179 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/junegunn/fzf | 21:17 | 73 s |150-| `cobra` | https://github.com/spf13/cobra | `main` | 1,106 | 0, then 29 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/spf13/cobra | 21:18 | 36 s |151-| `gin` | https://github.com/gin-gonic/gin | `master` | 2,023 + 1 | 0, then 38 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/gin-gonic/gin | 21:18 | 56 s |152-| `requests` | https://github.com/psf/requests | `main` | 6,495 | 0, then 162 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/psf/requests | 21:19 | 69 s |153-| `flask` | https://github.com/pallets/flask | `main` | 5,562 | 0, then 69 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pallets/flask | 21:20 | 67 s |154-| `httpx` | https://github.com/encode/httpx | `master` | 1,523 | 0, then 88 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/encode/httpx | 21:22 | 52 s |155-| `typer` | https://github.com/fastapi/typer | `master` | 1,781 | 0, then 86 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/fastapi/typer | 21:22 | 54 s |156-| `jinja` | https://github.com/pallets/jinja | `main` | 2,949 | 0, then 55 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/pallets/jinja | 21:23 | 58 s |157-| `lua` | https://github.com/lua/lua | `master` | 5,861 | 0, then 60 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/lua/lua | 21:24 | 102 s |158-| `jq` | https://github.com/jqlang/jq | `master` | 1,963 | 0, then 19 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/jqlang/jq | 21:26 | 51 s |159-| `kilo` | https://github.com/antirez/kilo | `master` | 20 | none at the source | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/antirez/kilo | 21:27 | 22 s |160-| `sinatra` | https://github.com/sinatra/sinatra | `main` | 4,684 | 0, then 158 backfilled | not evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/sinatra/sinatra | 21:27 | 71 s |161-| `nvm` | https://github.com/nvm-sh/nvm | `master` | 2,448 + 1 | 0, then 107 backfilled | evaluated | https://web-dev-oscabriel.oscargabriel.workers.dev/github.com/nvm-sh/nvm | 21:28 | 69 s |162-163-From `apps/web`, `WEB_URL=https://web-dev-oscabriel.oscargabriel.workers.dev bun run e2e -- imports.e2e.ts` passes 73 of 73: eight pages per project (home with the README and clone box, a nested folder, a file at `#L5`, the log, the newest commit, refs, people, why), each repo's own checks, and the timed first views. The first view of `why` and of a path's log took 64 to 81 s before `73adbab` and `a29af4e` (history read sixteen commits and versions at a time) and 14 to 28 s after them; see issue 915's comments.164-165-The thirty well-known imports after `fuzzel` went in on 2026-10-10 between 20:57 and 21:29 UTC (issue 1331), one at a time, by `bunx varlock run --path infra/ -- bun --env-file=<dev secrets file> scripts/import-examples.ts --stage dev-oscabriel --only <p> --tags`, each warmed by the script (five pages read; axum three). Every source with tags had them backfilled; `kilo` has none at the source. Commits are the source branch's at its imported head (`git rev-list --count`), plus one where the policy evaluated; "Policy" is read as whether `main` stands on a platform commit above the source's head. `bun infra/teardown.ts --stage dev-oscabriel` (read-only) then listed 76 kept import lines, every project and repo of the 38, and selected none of them. Since 2026-10-11 each import's page names its source and branch under "Imported from" (ADR 0031), backfilled by `--sources`.166-167-From `apps/web`, `WEB_URL=https://web-dev-oscabriel.oscargabriel.workers.dev bun run e2e -- imports.e2e.ts landing.e2e.ts` passed 225 of 226 once its stale checks were brought up to the pages (the clone step is the facts' "Take part", the people rows are list items, the why page has no "Why each line is there" line, and gum's newest commit is an empty version bump) and the `net::ERR_NETWORK_CHANGED` tests were asked again. The one failure was `axum`'s home: its root `README.md` is a symlink to `axum/README.md`, and the home showed only a regular file as the README. 1317 reads a README symlink where it points, inside the repo, and after its deploy all 226 pass.168-169-**Not listed:** a project enters the front page's `projects` table on its first event, and before 1316 an import whose policy never evaluates had none. Since 1316 an adoption is heard as a landing, so every later import is listed; these 17 were adopted before it and stay unlisted until something happens in them (a teardown cannot free their names: each project's Durable Object stays). So 17 of the 38 (`gum`, `click`, `awesome`, `stb`, `fuzzel`, `ripgrep`, `hyperfine`, `cobra`, `requests`, `flask`, `httpx`, `typer`, `jinja`, `lua`, `jq`, `kilo`, `sinatra`) answer at their own addresses but are missing from `listProjects`, the platform's `/`, the landing and `/asks`; and `import-examples` without `--only` takes them for new imports.170-171-`demo` has no throwaways: `projects-demo` holds `datekit` and `burrow`, and since 2026-10-11 the 38 kept imports (114 ledger lines: a project, a repo and a `tags backfilled` note each), and `layers-demo` holds `datekit--maintainers`. Nothing that makes throwaways is meant to run there before the take: the core-loop smoke and the swarm's rehearsals run on the dev stage, the swarm on a `seed --as` copy. The take's swarm on demo's `burrow` will record its claim forks in the ledger; teardown never selects them (section 4).172-173-## 4. Teardown policy174-175-- This build deletes only throwaway resources recorded in `infra/created.jsonl` that it no longer needs.176-- It never deletes a stage's Workers, namespaces, D1, KV or R2 without the user.177-- It never touches `witness`.178-179-No agent deletes a Cloudflare resource itself. Teardown first prints its plan: the ledger's entries that still exist, minus every stage's own names and `witness`. The deletes in that plan, together with the pre-ledger leftovers in section 3 that still exist, are written into one script that the user reads and then runs in their own terminal. A stage itself is torn down only by hand, by the user, as [Tear down a stage](#tear-down-a-stage) says.180-181-### The teardown tool182-183-```sh184-bunx varlock run --path infra/ -- bun infra/teardown.ts # print the plan185-bunx varlock run --path infra/ -- bun infra/teardown.ts --apply # delete exactly that plan186-bunx varlock run --path infra/ -- bun infra/teardown.ts --keep burrow-805 --stage dev-oscabriel187-```188-189-It reads the ledger, asks the account which of its repos and namespaces still exist (with the infra token, one name at a time), and prints the plan: what it would delete, what is already gone, and what the ledger holds but no plan may select. Without `--stage` it covers every declared stage the ledger names. `--keep <project>` leaves a `seed --as` copy's repo and every `<project>--…` fork out of the plan. Only `--apply` deletes, repos first and newest first, so a fork goes before what it forks, and a namespace last, since Artifacts deletes only an empty one. Repos go through `@repo/artifacts`' REST adapter. Each one deleted gets its `deleted` line at once, so a run that stops partway is finished by running it again. While `infra/.recording` exists, `--apply` is refused with `RecordingInProgress` before anything is read.190-191-No plan ever holds:192-193-- a name the ledger doesn't hold, whatever it is called;194-- either Artifacts namespace of any declared stage (`projects-<s>`, `layers-<s>`), or anything in `witness`, which is never even read;195-- the seeded examples `datekit`, `datekit--maintainers` and `burrow`, or any fork of `datekit` or `burrow`, and the imports on either stage. A claim made on demo's `burrow` during the take is recorded in the ledger and has to outlive teardown;196-- a Worker, a D1 database, a KV namespace or an R2 bucket. Those are not Artifacts, so no listing names them;197-- a project's Durable Object or front-page row. A project entry stays, and the plan says so.198-199-### The teardown record200-201-| When (UTC) | What |202-| --- | --- |203-| 2026-10-08 18:00 | `bun infra/teardown.ts` printed the plan for `dev-oscabriel`: **52 repos to delete**. These are all of the ledger's repos except `burrow--drop-legacy-fetch-burrow-auth--wren`, a fork of the stage's `burrow` that is never selectable. 50 are in `projects-dev-oscabriel`: nine smoke runs' repos and forks, `burrow-lint-807`, `burrow-803`, `datekit-803`, `burrow-swarm-1`, `burrow-swarm-2`, `burrow-805` and `datekit-805`, each with its claim forks. 2 are in `layers-dev-oscabriel`: `datekit-803--maintainers` and `datekit-805--maintainers`. The 16 projects' Durable Objects and front-page rows stay. Nothing was deleted. |204-| 2026-10-08 18:00 | The build's agent wrote the user's teardown script. It runs the plan with `--apply`. It also deletes the 19 pre-ledger test repos in section 3, wren's fork of `burrow` (only while dev's web still shows that ask open and unclaimed), `S8B_PROBE`, the two test accounts and their three OAuth grants. Each one is checked again just before its delete. The script refuses to run while `infra/.recording` exists. |205-| when the user runs it | The ledger's `deleted` lines record each repo the tool deleted, and when. Commit `infra/created.jsonl` afterwards. |206-| 2026-10-11 02:31 to 02:33 | Run, on the user's approval ("do the next steps you marked as for me yourself, they're approved"). The plan printed first listed **63 repos to delete** in `projects-dev-oscabriel` (the ledger's throwaways, grown since 2026-10-08 by the smoke runs of 914, 1009, W12 and the exit-codes deploy) and kept every import (38 projects, 38 repos) and `burrow--drop-legacy-fetch-burrow-auth--wren`; `--apply` deleted 63 of 63, each marked `deleted` in the ledger, and a plan printed after it lists nothing to delete. The 22 throwaway projects' Durable Objects and front-page rows stay, as the policy says. The pre-ledger leftovers in section 3, the test accounts and the grants were not touched: they are outside the ledger, and the user's own script holds them. |207-208-Kept, and why:209-210-- **The demo stage, whole.** It holds the recording and the submission.211-- **The dev stage's own resources** (section 2) and its seeded `datekit` (with `datekit--maintainers`) and `burrow`. The user decides whether to tear the stage down after submission.212-- **Dev's forks of datekit.** `datekit--me--ines-v` is ines-v's working fork. `datekit--format-ordinal--bram` holds bram's landed answer and its verdict notes. `datekit--add-months-clamp--bram` belongs to a claim that is open again.213-- **Every project's Durable Object and front-page row.** They are harmless, and not billed at this size. A test project's row stays on dev's front page after its repo is gone.214-- **Finished `Answer` Workflow instances** on `platform-dev-oscabriel`. They are records, not resources.215-- **Any `--as` copy the user still wants.** Add `--keep <project>` to the script's two teardown lines.216-217-## 5. URLs218-219-The account's workers.dev subdomain is in `infra/workers-dev.json`. The demo's rows are filled in when it is deployed.220-221-| Stage | What | URL | State on 2026-10-08 |222-| --- | --- | --- | --- |223-| `dev-oscabriel` | platform | `https://platform-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/health` answers 200); the core loop passed live twice on the 14:51 deploy; the W9 build since 2026-10-09 (`ecc2107` at 07:12), whose `/` answers 200 with HTML, or Markdown for `Accept: text/markdown`; the W10 build since 2026-10-09 19:36 (`e90a730`) |224-| `dev-oscabriel` | web | `https://web-dev-oscabriel.oscargabriel.workers.dev` | deployed (`/` answers 200); W9's code browser, why, people and proposal pages pass the deployed-web checks; the eight imports (`/github.com/dtolnay/anyhow`, `/github.com/sindresorhus/ky`, `/github.com/charmbracelet/gum`, `/github.com/pallets/click`, `/github.com/sindresorhus/awesome`, `/github.com/changesets/changesets`, `/github.com/nothings/stb`, `/codeberg.org/dnkl/fuzzel`) pass `imports.e2e.ts` |225-| `dev-oscabriel` | CLI install | `https://platform-dev-oscabriel.oscargabriel.workers.dev/install.sh` | served from `releases-dev-oscabriel` |226-| `dev-oscabriel` | Google redirect URI (H4) | `https://platform-dev-oscabriel.oscargabriel.workers.dev/oauth/google/callback` | not registered |227-| `dev-oscabriel` | sandbox | none: it has no workers.dev route, and only the platform reaches it | deployed; the Checker's containers start on `standard-3` (2 vCPU, 8 GiB), the Lander's on `standard-2` |228-| `demo` | platform | `https://platform-demo.oscargabriel.workers.dev` | deployed 2026-10-08 15:39 (`/health` answers 200), and smoke passed; seeded with `datekit` and `burrow`. An anonymous `git clone <platform>/datekit.git` works, and a contributor's token gets 403 on `datekit--maintainers.git`. Redeployed with the W9 build on 2026-10-09 07:22 (`1a7bb89`); `/` answers 200. |229-| `demo` | web | `https://web-demo.oscargabriel.workers.dev` | deployed (`/` answers 200); the Playwright check of the deployed web passes; after the W9 deploy, 11 of 12 (all but why, which needs an answer landing demo has not got); after the W10 deploy (2026-10-09 19:50, `34f8ec8`), 13 of 13, why included |230-| `demo` | CLI install | `https://platform-demo.oscargabriel.workers.dev/install.sh` | served from `releases-demo`: release `0.1.0-demo.802` (`bun run release -- --build --upload --stage demo --version 0.1.0-demo.802`, 2026-10-08 15:51), which installs and reads the demo |231-| `demo` | Google redirect URI (H4) | `https://platform-demo.oscargabriel.workers.dev/oauth/google/callback` | not registered; the demo's deploy printed it |232-| `demo` | sandbox | none: it has no workers.dev route | deployed; the Checker's containers start on `standard-3` (2 vCPU, 8 GiB), the Lander's on `standard-2` |233-234-## Running a stage235-236-### Before the first run237-238-1. **Log Wrangler in**, once per machine: `apps/platform/node_modules/.bin/wrangler login`. Deploys and the D1, KV and R2 creates use this login, never the infra token. Once the login is stale, `wrangler d1 list` fails with `Authentication error [code: 10000]`, and `wrangler whoami` refreshes it.239-2. **Set the infra credentials**, `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN`, as `infra/.env.schema` describes. The token uses the "Read all resources" template plus Account › Artifacts › Edit. `bun run bootstrap` and `bun run ops` get them through `varlock run --path infra/`. To check they are set without seeing them, run `bun run env:check`.240-3. **Confirm the plan**: Containers and Workflows need Workers Paid (H6, confirmed on this account: see [the human steps](#human-steps-status-and-next-action)).241-242-### Bootstrap a stage243-244-```sh245-bun run bootstrap -- --stage dev-oscabriel246-```247-248-It refuses a stage that `stages.ts` doesn't declare. Then it:249-250-1. reads what exists: the stage's two Artifacts namespaces (`projects-<s>` and `layers-<s>`) over REST, and the account's D1 databases, KV namespaces and R2 buckets through Wrangler;251-2. creates only what is missing, so a second run creates nothing;252-3. writes the new D1 and KV ids into the stage's block of `apps/platform/wrangler.jsonc`, touching nothing else in the file (commit that change);253-4. applies the front page's migrations (`wrangler d1 migrations apply front-page-<s> --remote --env <s>`);254-5. records the account's workers.dev subdomain in `infra/workers-dev.json`, so smoke knows where the stage lives;255-6. checks by name that the platform Worker holds every secret its `.env.schema` requires. Before the platform exists there is nothing to hold them, so it says which ones the first deploy has to carry.256-257-It never deletes anything and never prints or reads a secret's value.258-259-`bun run bootstrap -- --stage <s> --dry-run` does only the first step and lists what the run would create. It creates nothing and writes no file. On a stage that is complete it prints `would create 0`.260-261-### Secrets262-263-`apps/platform/.env.schema` names them. Values never go in the repo.264-265-| Name | Needed |266-| --- | --- |267-| `OPERATOR_TOKEN` | Always. The operator's bearer token, at least 32 characters. |268-| `SESSION_TOKENS` | Optional. A JSON object from token to handle, for the demo's named people (the seed's deciders, the on-screen people and the swarm's contributors). |269-| `COOKIE_KEY` | Always. Seals a sign-in in progress into its form (HMAC-SHA-256), at least 32 characters. |270-| `PASSWORD_PEPPER` | Always. Every password is HMAC'd with it before PBKDF2, at least 32 characters. Changing it makes every stored password fail to verify. |271-| `MASTER_KEY` | Always. 64 hex characters: the 256-bit key that wraps every write-only env value. Losing it loses every stored value, so keep a copy outside the machine. |272-273-To set them for a stage, do one of these:274-275-- **A generated secrets file (both stages).** Keep a dotenv file for the stage outside the repo with mode 600, holding crypto-random values (32 bytes in base64url each, and `MASTER_KEY` as 64 hex characters). Deploy with `STAGE_SECRETS_FILE=<that file> bun run deploy -- --stage <s>`. The platform's deploy step gets only the names `.env.schema` declares, as its environment, and that environment overrides any `.env` value. Nothing prints them. `dev-oscabriel` has used one since its first deploy. `demo` has had one since 2026-10-08, by a recorded decision made under the user's blanket approval, and the same values were set on `platform-demo` with `wrangler secret put` before its first deploy. Both stages' values were generated by the build's agent, so rotate them before the repo goes public (H5 in [the human steps](#human-steps-status-and-next-action)).276-- **varlock (H5).** Write `NAME=varlock(prompt)` for each one into `apps/platform/.env.local`, run `./node_modules/.bin/varlock load --path apps/platform/` in your own terminal, then deploy. `varlock-wrangler` hands the values to the Worker.277-- **By hand**, one at a time: `apps/platform/node_modules/.bin/wrangler secret put <NAME> --env <s>` in `apps/platform`, with the value on stdin. On a stage whose platform isn't deployed yet, this makes `platform-<s>` as an empty placeholder Worker that the first deploy replaces. A deploy still needs the values through one of the two ways above, since varlock-wrangler resolves every required name.278-279-Sign-in uses the platform's own accounts (handle and password), so no stage needs a third-party OAuth app. A stage's platform lives at `https://platform-<s>.<subdomain>.workers.dev`; the subdomain is in `infra/workers-dev.json` once bootstrap has run.280-281-### Deploy a stage282-283-```sh284-bun run deploy -- --stage dev-oscabriel285-```286-287-Without `--stage`, or with a stage `stages.ts` doesn't declare, it refuses before it runs anything. It takes no other flag, and `verify` always runs first (AGENTS.md principle 11). In order, it runs:288-289-1. `bun run verify`. If the gate is red, nothing after it runs.290-2. The `sandbox` deploy (`wrangler deploy --env <s>`), first, because the platform's `SANDBOX` binding names it.291-3. The `platform` deploy (`varlock-wrangler deploy --env <s>`), which resolves `.env.schema` and sends the secrets.292-4. The `web` build and deploy.293-5. A read-back of the push-event trigger (`bun run bootstrap -- --stage <s> --check-triggers`), because Wrangler's output doesn't prove it exists.294-6. `bun scripts/smoke.ts --stage <s>`.295-296-Then it prints the redirect URI a Google OAuth client registers for the stage (`<platform origin>/oauth/google/callback`, H4). Google sign-in stays off until `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` are set, and `migrations/0003_identities.sql` must be applied before they are.297-298-Every command runs with `WRANGLER_SEND_METRICS=false`, and with its own folder's `node_modules/.bin` first on `PATH`, so each app deploys with its pinned Wrangler. The first failing step stops the deploy and names that step.299-300-A stage's first deploy can stop in the `sandbox` step with Wrangler's "Timed out while preparing the container image on Cloudflare's network." Before it uploads the Worker, Wrangler asks Cloudflare to prepare each image that is new to the stage's registry repository, and it waits at most 15 minutes. When it stops there, nothing of the Worker has been uploaded: run the same deploy again. The image is already pushed, and its preparation goes on at Cloudflare between runs.301-302-### Deploys of demo303-304-`demo` is deployed only with a reason written here first, and never during a take (H7).305-306-| When (UTC) | Build | Why |307-| --- | --- | --- |308-| 2026-10-08 15:39 | `c7b68ff`, the build that passed the core loop live on `dev-oscabriel` | The first deploy. It took three runs: twice (15:04 to 15:19 and 15:20 to 15:35) Cloudflare kept the new `sandbox-demo-lander-land` image's preparation pending past Wrangler's limit, though the same digest had been prepared for `dev-oscabriel` in about 30 s; the third run found it ready. |309-| 2026-10-09 07:18 and 07:22 (914) | `ecc2107`, then `1a7bb89` (the same Worker code; only smoke's `platform-root` patience changed) | The W9 build (the platform's `/` page, the code browser, why, people, drafted asks): the user approved W9 after the build closed, `infra/.recording` was absent, and `dev-oscabriel` passed smoke, the deployed-web checks and `smoke --loop --draft` on this Worker code first. The first run's smoke failed `platform-root` on a 404 the W8 version gave as the upload finished; the second passed 8 of 8. Nothing is seeded, drafted, claimed or imported on demo; burrow's children were checked unclaimed before and after. |310-| 2026-10-09 19:50 (1009) | `34f8ec8` (the Worker code of `e90a730`), the W10 build | The W10 build, at the user's request ("fix all of those, then redeploy demo"): an opening's landing now links the ask it opened, so why on demo's datekit and burrow names an ask; why and a file's log are kept by commit in the new `code-cache-demo` bucket and walk a small file by reading it whole (fast cold, under a second warm); the people page says why a policy has not evaluated; the home page's README comes with the server's render; tags list by package; footnote links jump; the drafting fixes (a draft keeps its note and an earlier ready draft; the proposal pages' signed-out and unread states). `infra/.recording` was absent, and `dev-oscabriel` passed smoke, `smoke --loop` and the deployed-web checks on this Worker code first. Bootstrap adds one empty bucket; nothing is seeded, drafted, claimed, imported or landed on demo. |311-| 2026-10-09 20:16 (1099) | `4a23695` (the Worker code of `2587726`), the wave's last fold-ins | The user's request ("fix all of those, then redeploy demo") once the wave's leftovers were fixed, and what demo shows changed: an opening is now heard as a landing (the project page's landings list shows new openings, code views refresh live when an ask opens), the log and commit pages link an opening's ask, a why row no longer says "Open ask" twice, and the CLI writes decider globs as code. `infra/.recording` was absent, and `dev-oscabriel` passed smoke 8 of 8 and the deployed-web checks (datekit 13 of 13, burrow 13 of 13) on this Worker code first (20:13-20:15 UTC). No bootstrap step; nothing is seeded, drafted, claimed, imported or landed on demo. Deployed 20:16:30-20:18:19 (verify again; platform startup 105 ms, web 13 ms), smoke 8 of 8; the deployed-web checks a minute later: datekit 13 of 13 (with `WEB_WHY_PATH=.myr/asks/format-ordinal.ask.ts`) and burrow 13 of 13 (`WEB_PROJECT=burrow` alone), why included on both. `listProjects` and `listAsks` for both read the same before and after, every ask unclaimed. |312-| 2026-10-10 about 01:17 (W11) | `ca95612`, the W11 build with the banner fix | At the user's request ("yes", asked whether to deploy W11 to demo after dev passed). What demo shows changed: datekit's posture badge reads "Open with sealed evidence" everywhere (D1), the Agents page and its nav entry, `/llms-full.txt` and the index banner under each Markdown title, the answer page's links to its base and landing commits, clearer refusal words (a limit's refusal names its kind and its wait), code reads on MCP, and a fork that takes branches only. `infra/.recording` was absent, and `dev-oscabriel` had passed smoke and the deployed-web checks on the same build. This row was written just after the deploy, not before it. |313-| 2026-10-10 about 11:40 (W12) | `7b8b393`, the W12 build with the review fixes | At the user's request ("you deploy everything", their answer to who deploys W12). What demo shows changes throughout: every page sits in the Control room shell (rail, main pane, facts inspector; a bottom bar on phones), the front page and a project's home arrive server-rendered with families drawn as fans and posture once per project, the ask and answer pages lead with state and whose move, Today has sections and every choice its consequence, the code browser is a full-viewport app, the person page sets credit in words, For agents is one reference, and the platform's own sign-in and `/` pages share the web's tokens. `/` and `/<project>` answer Markdown to agents. Bootstrap first applies migration `0005_standing_postures.sql` (the kept postures behind project lists). `infra/.recording` was absent, and `dev-oscabriel` had passed smoke, `smoke --loop` and the deployed-web checks (13 of 13 on datekit and on burrow) on the same build. Nothing is seeded, drafted, claimed, imported or landed on demo. |314-| 2026-10-10 (W12 perf) | `5881ff2`, the W12 performance sign-offs | At the user's request ("Yes, do it, and all recommended steps", their sign-off on 1297's items). What demo shows changes in speed, not in words: the web's server build is minified (JavaScript 4.07 MB to 2.77 MB with highlighting, entry 696 KB to 309 KB) with its source maps uploaded; Workers Cache keeps the web's anonymous pages at the edge (a request with any cookie or an `Authorization` is never served or stored from it, ADR 0026); a blob page's file and a commit page's first files arrive highlighted from the server in a fixed set of languages (ADR 0027). `infra/.recording` was absent, and `dev-oscabriel` passed smoke 11 of 11, the deployed-web checks (13 of 13 on datekit and on burrow), a cache MISS then HIT at 60 to 120 ms with `vary: Cookie`, BYPASS with a cookie and on `/today`, and server-highlighted HTML on a blob page, on the same build. No bootstrap step; nothing is seeded, drafted, claimed, imported or landed on demo. |315-| 2026-10-10 (W13, 1332) | `643ab22`, the W13 build: group A, 1331's import check, 1316 and 1317 | At the user's request ("do all recommended next steps",, which named this deploy; the build plan approves a W13 deploy of demo ahead of time) once `dev-oscabriel` passed smoke and the imports and landing checks on the same code. What demo shows changes at its addresses: `/` is now the landing (what the platform is, the open asks first, the gate's refusal as git prints it, the projects), the front page moves to `/asks`, `/home` is a signed-in person's own page, a short command's words stay whole, and a project's adoption is heard as a landing. The shot list's `/` shots move to `/asks` before the take (1399). Nothing is imported, seeded, drafted, claimed or landed on demo; its `datekit` and `burrow` are only read. |316-| 2026-10-11 (W13 close-out, 1332) | `99a517b` (the Worker code of `f224a14`): the landing's projects read on the server with each posture's badge, and an import's source kept on its record and shown on its page (ADR 0031) | At the user's request ("do the next steps you marked as for me yourself, they're approved": the demo deploy, the 38 imports onto demo and dev's teardown were the three held). What demo shows changes: `/` names its projects in the HTML as sent, each with its posture badge, and a project page shows "Imported from" for an import. The deploy comes first because the imports that follow it keep their source only on a platform that holds this code. `infra/.recording` is absent, and `dev-oscabriel` passed `verify`, smoke 11 of 11 and the source backfill of all 38 imports on the same code. No bootstrap step. After it, `scripts/import-examples.ts --stage demo --sources` imports the 38 open-source repos onto demo, kept as on dev, the first imports demo has had; nothing is seeded, drafted, claimed or landed. This row is written before the deploy. Deployed at about 02:36 UTC, smoke 11 of 11; the imports followed, 02:37 to 03:16 UTC. |317-| 2026-10-12 (W14, 1432) | `e77e5bb`, the W14 build: owner namespaces (ADR 0032), the web import and the host-path offer (ADR 0033), the design draws (1501 to 1509) and the handler fix proved on `dev-oscabriel` | At the user's request: asked whether the take was done and whether to deploy demo now, they answered "do it" (2026-10-12). `infra/.recording` was absent, and `dev-oscabriel` passed `verify`, smoke 11 of 11 and the deployed-web checks 15 of 15 on this Worker code, with a web import made there. What demo shows changes at its addresses: every project is named `<owner>/<name>` (`/oscabriel/datekit`, `/github.com/pallets/click`); every address the shot list records (`/datekit`, `/click`, `--project datekit`, `<platform>/datekit.git`) keeps working, the web's by a 301 to the full form and the gateway's as an alias; `/import` and the offer at a source namespace's address nobody has imported are new. Nothing is imported, seeded, drafted or claimed by the deploy. |318-319-### Smoke-test a stage320-321-```sh322-bun run smoke -- --stage dev-oscabriel323-bun run smoke -- --stage dev-oscabriel --url http://localhost:8787324-```325-326-The second form points smoke at another origin, such as `wrangler dev --env dev-oscabriel` in `apps/platform`. Plain `wrangler dev` serves stage `local`, which no `--stage` names, so its `health` probe fails. Smoke finds the stage's web at `https://web-<s>.<subdomain>.workers.dev`; with `--url` it probes a web only when `--web-url <origin>` names one.327-328-Smoke only reads, from the platform and then the web. Every probe runs even when others fail, and the output names each probe that failed and why. It also prints how long each probe took. A probe the platform answers with its own failure (a 5xx, or an RPC defect) asks again every second for up to 30 s, since a fresh deploy gives those for its first seconds (seen on `dev-oscabriel`'s first deploy). So does a 404 from the web's two probes and from `platform-root`: a first deploy's hostname, or the version before a deploy that adds a route, answers 404 for a moment (seen on demo's W9 deploy). Any other wrong answer fails the probe at once.329-330-| Probe | Passes when |331-| --- | --- |332-| `health` | `GET /health` answers `200 {"ok":true,"stage":"<s>"}`, naming the stage asked for |333-| `oauth-metadata` | `GET /.well-known/oauth-protected-resource` answers 200 with JSON that names its `resource` |334-| `mcp-needs-credential` | `POST /mcp` without a credential answers 401 |335-| `anonymous-unknown-project` | an anonymous `/rpc` `listAsks` for `no-such-project` answers with a typed `UnknownProject` |336-| `missing-repo-404` | `GET /no-such-project.git/info/refs?service=git-upload-pack` answers 404 |337-| `platform-root` | the platform's `GET /` answers 200 with a page that names its MCP endpoint (`/mcp`) and the CLI's `install.sh` |338-| `web-front-page` | the web's `GET /` answers 200 with HTML |339-| `web-llms-txt` | the web's `GET /llms.txt` answers 200 with Markdown that opens with its title; the web builds it from the platform's project list, so it passes only when the web reaches the platform through its service binding |340-341-### Tear down a stage342-343-None of this is automated, and it is the user's alone (section 4): no script deletes a stage's resources, and nobody runs `wrangler delete` or cf's `delete` without the user's OK (`wrangler delete` auto-confirms in a non-interactive shell). Tear down only what this build created, which means only names from section 2, and never `witness`. A person runs these in their own terminal. Wrangler's commands run from the app's folder with that app's `node_modules/.bin/wrangler`.344-345-1. The Workers: `wrangler delete --env <s>` in `apps/web`, then `apps/platform`, then `apps/sandbox`. Then `wrangler workflows delete answer-<s>` and `wrangler workflows delete on-push-<s>`, if they remain.346-2. The Artifacts repos, then the namespaces, `projects-<s>` and `layers-<s>` alike. List a namespace's repos with `bun run ops -- artifacts namespaces repos list --namespace <namespace>`, delete each one with `bun run ops -- artifacts namespaces repos delete <repo> --namespace <namespace> --force`, then `bun run ops -- artifacts namespaces delete --namespace <namespace>`. A namespace has to be empty before it can be deleted.347-3. The database: `wrangler d1 delete front-page-<s>`.348-4. The KV namespace: `wrangler kv namespace delete --namespace-id <id>`. The id is in the stage's block of `apps/platform/wrangler.jsonc`.349-5. The buckets: empty `evidence-<s>` and `releases-<s>`, then run `wrangler r2 bucket delete evidence-<s>` and `wrangler r2 bucket delete releases-<s>`.350-6. Put the stage's placeholder ids back in `apps/platform/wrangler.jsonc`.351-352-## Human steps: status and next action353-354-Only a person can take these steps. No agent buys or registers anything, pushes, adds a git remote, publishes to npm, reads the closed env files or deletes a Cloudflare resource. The status is as of 2026-10-08, 18:30 UTC. "Agent" means the build's agent.355-356-| Step | Status | What the agent prepared | Your exact next action |357-| --- | --- | --- | --- |358-| H1: a custom domain | Not done, and optional. Both stages live on workers.dev. | Nothing needs it. | Only if you want one: buy the domain, which is a purchase and yours to make, then ask the agent. It adds `routes` to each `wrangler.jsonc` and deploys `demo` outside a take, with the reason in [Deploys of demo](#deploys-of-demo). |359-| H2: the npm org, and publishing the CLI | Open, and optional for the submission: both stages already serve the CLI from their own install line ([section 5](#5-urls)). | `bun run release -- --build` stages the package `@myr/cli` in `apps/cli/release/npm/`. Under an agent, `--publish` checks the staged package and prints the command without running it. Known before publishing: `--version` prints `0.0.0` in the built CLI, and the npm build cannot evaluate a TypeScript config folder on its own. | Create the npm org `myr` and run `npm login`. Then, from the repo root in your own terminal (not inside an agent session), run `bun run release -- --build --publish --version 0.1.0`. |360-| H3: the GitHub org and the public repo | Open, due before submission (Oct 14). | Every commit is on local `main`. No remote exists and nothing has been pushed. `bun run verify` passes on the last commit. | Rotate the generated secrets first (H5). Create the org `getmyr` and an empty public repo `getmyr/myr`, then run `git remote add origin https://github.com/getmyr/myr.git` and `git push -u origin main`. |361-| H4: a Google OAuth client | Not done, and optional. Sign-in works with platform accounts (a handle and a password). | Migrations `0003_identities.sql` and later are applied on both stages. Each deploy printed its redirect URI: `https://platform-demo.oscargabriel.workers.dev/oauth/google/callback` and `https://platform-dev-oscabriel.oscargabriel.workers.dev/oauth/google/callback`. | Only if you want "Continue with Google": create a Web client in the Google Cloud console with the stage's redirect URI above, exactly as printed. Add `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` together to the stage's secrets ([Secrets](#secrets)), then deploy the stage outside a take. |362-| H5: secret values | Done by the agent on both stages, under a recorded decision that extends generated secrets to `demo` ([Secrets](#secrets)). No secret is missing. `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` are optional and come only with H4. | Five values per stage (`OPERATOR_TOKEN`, `SESSION_TOKENS`, `COOKIE_KEY`, `PASSWORD_PEPPER`, `MASTER_KEY`). Each was generated and is kept only in that stage's secrets file, outside the repo with mode 600, and was never printed or committed. `SESSION_TOKENS` on `demo` holds bram, ines-v, okafor, okonkwo, lin-h and the swarm's six (wren, tamsin, ivo, marisol, dagny, pell). | **After the last take and before the repo goes public (H3), rotate both stages' generated secrets.** Write new values into each stage's secrets file, then run `STAGE_SECRETS_FILE=<that file> bun run deploy -- --stage <s>`, outside a take. Keep a copy of each `MASTER_KEY` off this machine. Rotating `PASSWORD_PEPPER` breaks every stored password, and rotating `MASTER_KEY` loses every stored env value, so set demo's `SENTRY_AUTH_TOKEN` again with `env set`. Rotating `SESSION_TOKENS` means each CLI profile logs in again. |363-| H6: Workers Paid | Confirmed. | The account's subscriptions, read again on 2026-10-08, list `workers_paid` and `r2_paid` as Paid. Containers and both Workflows run on both stages. | Nothing. |364-| H7: the recording | Open. `demo` is deployed, seeded and smoke-clean, with nothing claimed, and every shot was walked once on 2026-10-08. | `docs/demo/` holds the script, the shot list and the rehearsal checklist, with each failed shot's fallback. While `infra/.recording` exists, `infra/deploy.ts` refuses every deploy and teardown's `--apply` refuses to run. | Walk the pre-flight in `docs/demo/rehearsal.md` on the morning of the take. Run `bun infra/recording.ts on` before the first take and `bun infra/recording.ts off` after the last. Any fix you want shown first (for example datekit's "Open" badge on the front page, or a seeded person signing in on the web) is a code change and a `demo` deploy, which must happen before you turn the lock on. |365-| H8: submitting | Open, due Oct 14 by noon PDT (the form closes at 11:59 PM PDT). | The demo URL is `https://web-demo.oscargabriel.workers.dev` ([section 5](#5-urls)). | Submit the form with the repo URL (after H3), the video (H7) and the demo URL. Optionally, reply once to @zeke's call for entries. |366-| H9: `docker login` | Not needed so far. No image pull has been rate-limited on either stage. | Nothing. | Only if a deploy's image pull is rate-limited, run `docker login` in your own terminal and deploy again. |367-| Deleting the throwaways | Half done. The ledger's 63 throwaway repos on `dev-oscabriel` were deleted on 2026-10-11 ([The teardown record](#the-teardown-record)); the pre-ledger leftovers, the test accounts and the grants are still the user's script's. | `bun infra/teardown.ts` printed its plan (52 repos on `dev-oscabriel`, the same at 18:15 UTC). The user's teardown script runs it with `--apply`, then removes the leftovers from before the ledger that still exist, and skips any that are gone. | After the last take and before Oct 14, read the teardown script the build left for you and run it in your own terminal. Then commit `infra/created.jsonl`, which by then holds a `deleted` line for each repo removed. |368-| ChatGPT usage for the swarm's tamsin | Not blocking. The fallback was taken on 2026-10-08. | OpenCode's ChatGPT sign-in hit its usage limit during the swarm's rehearsal, and it resets on Oct 16, after the deadline. The roster runs tamsin on `opencode-go/gpt-6-luna` (OpenCode Go). | Nothing. To show `openai/gpt-5.5` in the take instead, raise the ChatGPT plan's limit (a purchase, yours) and change tamsin's line in `scripts/lib/swarm/roster.ts` back. Before the take, check OpenCode Go's and Amp's usage headroom: a six-agent run used about 3.2M input tokens on OpenCode Go. |369-| OpenCode Zen key for the swarm's pell | Not blocking. The fallback was taken on 2026-10-08. | pi here has no OpenCode Zen key, so the roster runs pell on `opencode-go/qwen3.8-flash`, as in the swarm's rehearsal. | Nothing. To show Gemini flash in the take instead, add OpenCode Zen's key to pi and change pell's line in `scripts/lib/swarm/roster.ts` back. |modified:infra/teardown.ts+1 added-1 removed
1 unmodified line2 * teardown: `bunx varlock run --path infra/ -- bun infra/teardown.ts3 * [--stage <s>] [--keep <project>]… [--apply]`. Prints which throwaways the4 * ledger (`infra/created.jsonl`) still has on the account, and with `--apply`5 * deletes exactly those; `infra/lib/teardown.ts` decides what may be deleted,6- * and `infra/stages.md` ("Teardown policy") says why.6+ * and `.agents/ops/stages.md` ("Teardown policy") says why.7 *8 * It reaches Artifacts with the infra token (`CLOUDFLARE_ACCOUNT_ID` and9 * `CLOUDFLARE_API_TOKEN`, from `varlock run --path infra/`): repos through10 * `@repo/artifacts`' REST adapter, one per namespace, and a namespace itself148 unmodified linesmodified:packages/brand/test/leaks.test.ts+1 added-1 removed
45 unmodified lines46 expect(47 findLeaks([48 { content, path: "packages/brand/src/other.ts" },49 { content, path: "AGENTS.md" },50- { content, path: "docs/adr/0001-x.md" },50+ { content, path: ".agents/adr/0001-x.md" },51 { content, path: "apps/web/src/components/ui/LICENSE" },52 { content, path: "apps/web/src/assets/fonts/LICENSE-x.txt" },53 { content, path: "LICENSE" },54 ])95 unmodified linesmodified:packages/config/test/bootstrap.test.ts+1 added-1 removed
571 unmodified lines572 names: ["OPERATOR_TOKEN", "COOKIE_KEY"],573 stage: "demo",574 }).message575 ).toBe(576- "demo's platform lacks OPERATOR_TOKEN, COOKIE_KEY: set them by name (infra/stages.md)"576+ "demo's platform lacks OPERATOR_TOKEN, COOKIE_KEY: set them by name (.agents/ops/stages.md)"577 );578 expect(579 new CloudflareRefused({ route: "/workers/subdomain", status: 403 })580 .message7 unmodified linesmodified:packages/config/test/demo-docs.test.ts+2 added-2 removed
1 /**2- * The demo folder. On recording day the user opens `docs/demo/`2+ * The demo folder. On recording day the user opens `.agents/demo/`3 * and finds a narration script timed to the video's seven beats, a shot list,4 * the swarm scenario and a rehearsal checklist that the live walk marks.5 *6 * Every command those files show is one that exists: each line of a shell27 unmodified lines34 import { Contracts } from "../../protocol/src/contracts.ts";35 import { repoRoot } from "./root.ts";36 37 /** The folder, from the repo root, and the four files the user records from. */38-const DEMO = "docs/demo";38+const DEMO = ".agents/demo";39 40 const DEMO_FILES = [41 "rehearsal.md",42 "script.md",600 unmodified linesmodified:packages/config/test/docs-public.test.ts+6 added-6 removed
20 unmodified lines21 "~/",22 "/home/",23 "wanted-explainer",24 "plans.gneiss.run",25- ".scratch/build",25+ ".agents/scratch/build",26 ] as const;27 28 /**29 * What a reference into the build's private plan looks like, which a reader79 unmodified lines109 const publicDocs = Effect.gen(function* () {110 return yield* withText([111 "AGENTS.md",112 "GLOSSARY.md",113- ...(yield* markdownIn("docs/adr")),114- ...(yield* markdownIn("docs/agents")),113+ ...(yield* markdownIn(".agents/adr")),114+ ...(yield* markdownIn(".agents/workflow")),115 ]);116 });117 118 /** Frontmatter that opens the file and holds a `status:` line. */96 unmodified lines215 );216 217 it.live("every ADR opens with a status line", () =>218 Effect.gen(function* () {219- const adrs = yield* withText(yield* markdownIn("docs/adr"));219+ const adrs = yield* withText(yield* markdownIn(".agents/adr"));220 221 expect(222 adrs.flatMap(({ path, text }) =>223 STATUS_FRONTMATTER.test(text) ? [] : [path]3 unmodified lines227 );228 229 it.live("ADRs are numbered from 0001 with no gap", () =>230 Effect.gen(function* () {231- const numbers = (yield* markdownIn("docs/adr")).map((path) =>232- path.slice("docs/adr/".length, "docs/adr/".length + 5)231+ const numbers = (yield* markdownIn(".agents/adr")).map((path) =>232+ path.slice(".agents/adr/".length, ".agents/adr/".length + 5)233 );234 235 expect(numbers).toStrictEqual(236 Array.makeBy(17 unmodified linesmodified:packages/config/test/readme.test.ts+1 added-1 removed
67 unmodified lines68 ["", "home", ""].join("/"),69 ["", "Users", ""].join("/"),70 ["plans", "gneiss", "run"].join("."),71 ["wanted", "explainer"].join("-"),72- [".scratch", "build"].join("/"),72+ [".agents", "scratch", "build"].join("/"),73 ] as const;74 75 /** The roadmap lines a reader asks about, word for word. */76 const ROADMAP = [412 unmodified linesmodified:packages/config/test/swarm.test.ts+1 added-1 removed
1462 unmodified lines1463 expect(1464 Option.map(Result.getFailure(result), ({ reason }) => reason)1465 ).toStrictEqual(1466 Option.some(1467- 'SESSION_TOKENS has no session for pell: add each to the stage\'s SESSION_TOKENS secret (infra/stages.md, "Secrets"), and to the env the swarm runs in, then run the swarm again'1467+ 'SESSION_TOKENS has no session for pell: add each to the stage\'s SESSION_TOKENS secret (.agents/ops/stages.md, "Secrets"), and to the env the swarm runs in, then run the swarm again'1468 )1469 );1470 expect(spawned.map(({ args }) => args[1])).toStrictEqual(["asks"]);1471 })2 unmodified linesmodified:scripts/lib/swarm/roster.ts+1 added-1 removed
19 unmodified lines20 /** One contributor: a person, the harness they run, and its model. */21 export const Contributor = Schema.Struct({22 /** True only for the pi agent that loads the CLI's pi adapter (`-e`). */23 adapter: Schema.Boolean,24- /** A fictional person: a key of the stage's `SESSION_TOKENS` (`infra/stages.md`, "Secrets"). */24+ /** A fictional person: a key of the stage's `SESSION_TOKENS` (`.agents/ops/stages.md`, "Secrets"). */25 handle: Handle,26 harness: Harness,27 /**28 * Claude Code: an Anthropic model id. OpenCode: `<provider>/<gpt id>`.60 unmodified linesmodified:scripts/lib/swarm/scenario.ts+1 added-1 removed
1 /**2 * Scenarios: the nudges the swarm adds to some contributors' briefs, so a3 * recorded take shows the refusals the video's beat names (1:30–2:15;4- * `docs/demo/swarm-scenario.md` documents them). `plain` nudges nobody. Every4+ * `.agents/demo/swarm-scenario.md` documents them). `plain` nudges nobody. Every5 * nudge is printed in the plan: staging is never hidden.6 */7 import { Option, Schema } from "effect";8 30 unmodified linesmodified:scripts/smoke.ts+1 added-1 removed
18 unmodified lines19 * operator's (`OPERATOR_TOKEN`), who makes the project and opens the ask,20 * and the answerer's, from `SESSION_TOKENS` (a JSON object from token to21 * handle, as the platform's own) by the handle `--as` names (`bram` unless22 * given). For example, with the stage's generated secrets file (outside the23- * repo, `infra/stages.md` says where) loaded into the env:23+ * repo, `.agents/ops/stages.md` says where) loaded into the env:24 *25 * set -a; . <the stage's secrets file>; set +a26 * bun scripts/smoke.ts --stage dev-oscabriel --loop27 *207 unmodified linesmodified:scripts/swarm.ts+1 added-1 removed
298 unmodified lines299 300 return missing.length === 0301 ? tokens302 : yield* failed(303- `${SESSIONS_VARIABLE} has no session for ${missing.join(", ")}: add each to the stage's ${SESSIONS_VARIABLE} secret (infra/stages.md, "Secrets"), and to the env the swarm runs in, then run the swarm again`303+ `${SESSIONS_VARIABLE} has no session for ${missing.join(", ")}: add each to the stage's ${SESSIONS_VARIABLE} secret (.agents/ops/stages.md, "Secrets"), and to the env the swarm runs in, then run the swarm again`304 );305 });306 307 /** Records a claim's fork in the throwaway ledger, once. */281 unmodified linesmodified:.gitignore+1 added-1 removed
21 unmodified lines22 # The build's spec and issues name local paths and the private plan, so they23 # stay out of the public repo unless the user publishes a scrubbed copy. A24 # worktree holds only tracked files, so every agent reads them by absolute path25 # in the main checkout.26-.scratch/build/26+.agents/scratch/build/27 28 # The swarm's per-run scratch: each agent's clone, CLI shims, harness sessions29 # and config, and the run's `agents.json` summary. A live run records what it30 # shows in its own notes, never here.20 unmodified linesmodified:AGENTS.md+5 added-5 removed
1 # Myr2 3 Myr is a Git platform on Cloudflare. Everything a project ships is public, its contribution process is typed code on main, and a push lands only by passing a typed gate. It is our entry to Cloudflare's "Build the next GitHub" competition, which closes Wed Oct 14, 11:59 PM PDT.4 5-The core loop runs on Cloudflare today: a person claims an ask, pushes an answer through the platform's git gateway, and the platform checks it and lands it, or refuses it: the cheap stages answer in git's own output, and the rest arrive later in `status`, `watch`, MCP and the verdict note. The CLI, MCP and the web all serve the same contracts, and typed visibility (layers, held-back checks, posture, the ledger and write-only env values) plugs in as one cartridge. `README.md` says how to run it, check it and cut it; `docs/adr/` records each decision and why; `GLOSSARY.md` defines the words.5+The core loop runs on Cloudflare today: a person claims an ask, pushes an answer through the platform's git gateway, and the platform checks it and lands it, or refuses it: the cheap stages answer in git's own output, and the rest arrive later in `status`, `watch`, MCP and the verdict note. The CLI, MCP and the web all serve the same contracts, and typed visibility (layers, held-back checks, posture, the ledger and write-only env values) plugs in as one cartridge. `README.md` says how to run it, check it and cut it; `.agents/adr/` records each decision and why; `GLOSSARY.md` defines the words.6 7 `bun run verify` is the gate. The principles table names the check that holds each rule; a rule marked "No fence" is held by review.8 9 ## Principles55 unmodified lines65 - `bootstrap -- --stage <stage>`: makes a stage's Cloudflare resources; a second run creates nothing, and `--dry-run` only prints the plan.66 - `deploy -- --stage <stage>`: the one way to deploy. It runs `verify`, deploys the three Workers with Wrangler, reads the push trigger back, then runs `smoke`.67 - `smoke -- --stage <stage>`: read-only probes against a live stage. `--loop` then runs the whole core loop on a throwaway project, `smoke-<run>`, through the CLI and git, and refuses `demo`.68 - `seed`: puts the two example projects on a platform (`--world node` on this machine, or `--stage <stage>`); a second run changes nothing. `--only <example> --as <name>` seeds a fresh copy under another name, and refuses a taken one.69-- `import-examples -- --stage <stage>`: imports the open-source repos the code browser is previewed on, one at a time, onto a stage (`demo` included, with its reason in `infra/stages.md`), each recorded in the ledger as kept; `--tags` backfills the tags Artifacts' import leaves out, `--only <name>` imports one, and `--world node` imports onto this machine.69+- `import-examples -- --stage <stage>`: imports the open-source repos the code browser is previewed on, one at a time, onto a stage (`demo` included, with its reason in `.agents/ops/stages.md`), each recorded in the ledger as kept; `--tags` backfills the tags Artifacts' import leaves out, `--only <name>` imports one, and `--world node` imports onto this machine.70 - `swarm -- --stage <stage> --project <name>`: plans six fictional contributors, on four harnesses, against one split family on a stage, claims each one's ask, prepares a workspace with a clone of its fork outside the checkout, starts each harness headless on the brief and sends every refusal back into the same session, at most three times, then writes the run's summary; `--view herdr` runs them in herdr panes beside a counter, and `--dry-run` only prints the plan.71 - `release -- --build | --upload --stage <stage> | --publish`: builds the CLI's npm package and two binaries, uploads a release to the stage's own bucket, which the platform serves, and leaves `npm publish` to a person: under an agent it prints the command instead.72 73 ## Nouns52 unmodified lines126 ## Agent skills127 128 ### Issue tracker129 130-Issues are local markdown files in `.scratch/`, each written as an ask from `.scratch/TEMPLATE.md`. See `docs/agents/issue-tracker.md`.130+Issues are local markdown files in `.agents/scratch/`, each written as an ask from `.agents/scratch/TEMPLATE.md`. See `.agents/workflow/issue-tracker.md`.131 132 ### Triage labels133 134-The five default roles, each label equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human` and `wontfix`. See `docs/agents/triage-labels.md`.134+The five default roles, each label equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human` and `wontfix`. See `.agents/workflow/triage-labels.md`.135 136 ### Domain docs137 138-Single-context: one `GLOSSARY.md` and `docs/adr/` at the repo root. See `docs/agents/domain.md`.138+Single-context: one `GLOSSARY.md` and `.agents/adr/` at the repo root. See `.agents/workflow/domain.md`.139 140 <!-- BEGIN:turborepo-agent-rules -->141 142 # This is NOT the Turborepo you know7 unmodified linesmodified:PRODUCT.md+1 added-1 removed
105 unmodified lines106 107 ## Evidence on Hand108 109 - The examples `examples/datekit` (a date library with a maintainers layer of sealed checks and an `.env.schema`) and `examples/burrow` (six services with a lint ratchet and a migrate ask split six ways) are fictional projects with fictional people (`ines-v`, `okonkwo`, `bram`, `okafor`, `lin-h`, and burrow's vouched contributors). Pages and the video show them as examples, never as real users.110-- The demo is planned in `docs/demo/`: a narration script, a shot list, the swarm scenario and a rehearsal checklist. What it stages is labelled there.110+- The demo is planned in `.agents/demo/`: a narration script, a shot list, the swarm scenario and a rehearsal checklist. What it stages is labelled there.111 - Measured numbers come only from recorded live runs on a stage, each with its date (the README's Numbers table). No testimonials, customers or adoption figures exist; none may be invented.112 - A heuristic critique of the web's front page, project home and answer pages, dated 2026-10-11 and kept in the design tool's working files (not committed), scored them 31 of 40. Its findings (the inspector's commands wrapping at 19 rem, one ask reading two state words, lists stacking their state words into a colour stripe, the Landed page ending on hashes, rows with no time) are the source of DESIGN.md's row, inspector, posture and Landed page rules of October 2026, and of ADR 0039. Two peer platforms were read from their own sources the same week, by mechanism; what was taken and declined from them is in ADRs 0034 to 0038 and DESIGN.md's "Rejected on purpose".113 114 ## Product Principles10 unmodified linesmodified:README.md+13 added-13 removed
44 unmodified lines45 6. It lands the checked tree on `main` as its own commit crediting every person, or answers with a refusal.46 47 Around the loop:48 49-- **A web built as the gate's control room.** Every page sits in one shell: a rail of where you are (the site's sections, the projects with their posture, the project's sections), the page, and an inspector of the typed facts of the thing in hand (its state, whose move it is, who may take it, the gate, the claim, the family, the provenance), each with its next command numbered to copy. Lists are rows: select one, with a click or `j`/`k`, and its facts and claim command fill the inspector; a split family is one row with its children drawn as a fan that marks each landing as it happens. Below 1120 px the rail opens from a Menu and the facts follow the page's head, and phones get a bottom bar; Today is built to clear on a phone, one tap a choice with its consequence said under it. Pages arrive with their rows in the server's HTML and move without reloading, `?` lists the keys (`j`/`k`, `J`/`K`, `1`-`9` to copy a numbered command, and a switch that turns them off), and colour still means state, always beside its word and mark ([ADR 0022](docs/adr/0022-the-web-is-a-control-room-shell.md), [ADR 0023](docs/adr/0023-links-are-the-routers-and-lists-render-on-the-server.md)).49+- **A web built as the gate's control room.** Every page sits in one shell: a rail of where you are (the site's sections, the projects with their posture, the project's sections), the page, and an inspector of the typed facts of the thing in hand (its state, whose move it is, who may take it, the gate, the claim, the family, the provenance), each with its next command numbered to copy. Lists are rows: select one, with a click or `j`/`k`, and its facts and claim command fill the inspector; a split family is one row with its children drawn as a fan that marks each landing as it happens. Below 1120 px the rail opens from a Menu and the facts follow the page's head, and phones get a bottom bar; Today is built to clear on a phone, one tap a choice with its consequence said under it. Pages arrive with their rows in the server's HTML and move without reloading, `?` lists the keys (`j`/`k`, `J`/`K`, `1`-`9` to copy a numbered command, and a switch that turns them off), and colour still means state, always beside its word and mark ([ADR 0022](.agents/adr/0022-the-web-is-a-control-room-shell.md), [ADR 0023](.agents/adr/0023-links-are-the-routers-and-lists-render-on-the-server.md)).50 - **A landing, the asks, a home and the docs.** The web's `/` is a landing for a first-time reader: what the platform is, the way to the open asks before anything else, the install line, the screen `git push` prints when the gate refuses (from the one renderer), the four nouns, the loop, and the projects to read, each with its posture. The front page of open asks across every project is `/asks`. A signed-in person's `/home` is their own: their claims, newest first, each with its ask's want, its latest answer and the command to run next; the decisions waiting on them, if they decide; and the asks they may take. `/docs` holds five guides and a reference (the commands, every refusal, every event, the MCP tools and the imported projects) read from the sources that define them, each page also as Markdown at `/docs/<page>.md`.51 - **A code browser on the web.** A full-viewport app inside the shell: the file tree stays in the rail across files, with a Code | Why toggle on each file, highlighted code with `#L` line links, raw bytes served under a sandboxing CSP, the landings by day, each commit's diff (unified or split, with its stats by territory and tests) and one refs page (main, tags and claim forks; a monorepo's tags grouped by package, each package's newest first). The server sends each file and diff as plain text at the drawing's exact size, so highlighting lands in place. A project's home is its asks, then its README, rendered as GitHub-flavoured Markdown with links and images pointing into the repo at the commit, in the server's HTML so a crawler or `curl` reads it too. Every page names the commit it shows, so any page is a permalink.52-- **Why each line is there.** A file's why page attributes each line to the landing that put it on `main`, naming its ask, answer, people and verdict, or the ask an opening opened. Imported history reads "before adoption". Why and a file's history are kept by commit in an R2 bucket, so every isolate reads them back ([ADR 0020](docs/adr/0020-code-history-is-kept-by-immutable-ids.md)): on the dev stage's imports (changesets, click; 200 commits of history) a first view took 5.3 to 7.7 s, down from 18.6 to 39.6 s, and a view already kept answers in under a second.53-- **Asks drafted for a want.** A member proposes a want with `--draft` (or the web's propose form). The platform's agent, a Workers AI model, drafts the ask file and its failing test, runs them red first on the Checker, and puts the draft to a decider with its evidence. Nothing lands until a decider accepts, and the landing discloses the agent with `Assisted-by` ([ADR 0018](docs/adr/0018-asks-are-drafted-in-a-workflow-and-put-to-a-decider.md)).52+- **Why each line is there.** A file's why page attributes each line to the landing that put it on `main`, naming its ask, answer, people and verdict, or the ask an opening opened. Imported history reads "before adoption". Why and a file's history are kept by commit in an R2 bucket, so every isolate reads them back ([ADR 0020](.agents/adr/0020-code-history-is-kept-by-immutable-ids.md)): on the dev stage's imports (changesets, click; 200 commits of history) a first view took 5.3 to 7.7 s, down from 18.6 to 39.6 s, and a view already kept answers in under a second.53+- **Asks drafted for a want.** A member proposes a want with `--draft` (or the web's propose form). The platform's agent, a Workers AI model, drafts the ask file and its failing test, runs them red first on the Checker, and puts the draft to a decider with its evidence. Nothing lands until a decider accepts, and the landing discloses the agent with `Assisted-by` ([ADR 0018](.agents/adr/0018-asks-are-drafted-in-a-workflow-and-put-to-a-decider.md)).54 - **A Policy page.** Who decides which paths, who is vouched for or denounced, each layer's readers, writers and disclosure, and the caps, budget and claim timing, all read from the config folder at the landed commit. It has no edit control: these change by landing a change to the config folder. A project whose config has not evaluated says why (no config folder, or one that failed) and what makes it evaluate; `myr policy` prints the same as text.55 - **The platform's own front page.** The platform's `/` says what the host serves (clone URLs, MCP, agent skills, sign-in, the CLI and the web app), in HTML for a browser and as Markdown for an agent.56 - **A For agents page.** The web's `/agents` (and `/agents.md`) is a reference in the voice of a man page: a Synopsis of the CLI's commands, Connect (remote MCP for Claude Code, Cursor and VS Code, MCP over stdio, the CLI, a prompt for any agent, and the skills), the Endpoints an agent reads, the Limits, and every Refusal. Its MCP entries are the same text the plugin bundles carry.57 - **Markdown on every list page.** `/`, `/asks` and each project's page answer `Accept: text/markdown` with the text of `/llms.txt` and the project's `llms.txt`, and their HTML links to it.58 - **`/llms-full.txt`.** Beyond the index at `/llms.txt`: every refusal with its repair, how git meets the platform, how a landing happens, every event a watcher hears, and short guides. The index names it in its first sentence, and a project's `llms.txt` and each ask's Markdown open with a line pointing to both.59 - **The code over MCP.** An agent with no shell, such as a hosted connector, browses a project's code with five capped MCP tools: `readTree`, `readFile`, `log`, `why` and `listRefs`.60 61-The web reads code only through public contracts the platform serves ([ADR 0019](docs/adr/0019-the-web-reads-repos-through-public-contracts.md)). On the dev stage, 38 open-source repos are imported and kept for previewing it: eight picked for a shape the code browser must render (anyhow, ky, gum, click, awesome, changesets, stb and fuzzel), then thirty well-known projects in TypeScript, JavaScript, Rust, Go, Python, C, Ruby and shell, each a read-only copy under its own licence. `/docs/imported` names each one's source and licence, and `infra/stages.md` records each import. An import is heard as a landing, its adoption, so a project imported since that change is listed whether or not its policy evaluates; seventeen of the 38, imported before it, are not yet.61+The web reads code only through public contracts the platform serves ([ADR 0019](.agents/adr/0019-the-web-reads-repos-through-public-contracts.md)). On the dev stage, 38 open-source repos are imported and kept for previewing it: eight picked for a shape the code browser must render (anyhow, ky, gum, click, awesome, changesets, stb and fuzzel), then thirty well-known projects in TypeScript, JavaScript, Rust, Go, Python, C, Ruby and shell, each a read-only copy under its own licence. `/docs/imported` names each one's source and licence, and `.agents/ops/stages.md` records each import. An import is heard as a landing, its adoption, so a project imported since that change is listed whether or not its policy evaluates; seventeen of the 38, imported before it, are not yet.62 63 ## Run it64 65 ### What you need44 unmodified lines110 ```111 112 ### On your own Cloudflare account113 114-Wrangler deploys the three Workers; cf is our ops CLI. Cloudflare's cf can't deploy this platform yet: its config cannot declare the Artifacts push-event trigger, its deploy refuses the sandbox's container self-binding, and it would be a second deploy tool in the recording week. So Wrangler deploys, and cf runs read-mostly operations as `bun run ops -- <command>` ([ADR 0002](docs/adr/0002-wrangler-deploys-every-worker.md)).114+Wrangler deploys the three Workers; cf is our ops CLI. Cloudflare's cf can't deploy this platform yet: its config cannot declare the Artifacts push-event trigger, its deploy refuses the sandbox's container self-binding, and it would be a second deploy tool in the recording week. So Wrangler deploys, and cf runs read-mostly operations as `bun run ops -- <command>` ([ADR 0002](.agents/adr/0002-wrangler-deploys-every-worker.md)).115 116 1. Name your stage `dev-<you>`. Add it to `stages` in `infra/stages.ts`, and give it an `env` block in `apps/platform/wrangler.jsonc`, `apps/sandbox/wrangler.jsonc` and `apps/web/wrangler.jsonc`, copied from `dev-oscabriel`'s with your stage's name in its place and your own handle as `OPERATOR_HANDLE`; `packages/config/test/bootstrap.test.ts` holds the three files to the table.117 2. Log Wrangler in once, and set `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` as `infra/.env.schema` describes (`bun run env:check` shows them, redacted):118 36 unmodified lines155 ```sh156 ./node_modules/.bin/varlock run --path apps/platform/ -- bun scripts/smoke.ts --stage dev-<you> --loop157 ```158 159-`infra/stages.md` lists every resource a stage owns, the secrets, and how a person tears a stage down by hand; no script deletes a stage's own resources. Every throwaway a smoke loop, a swarm run or a `seed --as` copy makes is recorded in `infra/created.jsonl`. `bunx varlock run --path infra/ -- bun infra/teardown.ts` prints which of them still exist, and adding `--apply` deletes exactly those.159+`.agents/ops/stages.md` lists every resource a stage owns, the secrets, and how a person tears a stage down by hand; no script deletes a stage's own resources. Every throwaway a smoke loop, a swarm run or a `seed --as` copy makes is recorded in `infra/created.jsonl`. `bunx varlock run --path infra/ -- bun infra/teardown.ts` prints which of them still exist, and adding `--apply` deletes exactly those.160 161 ### Install the CLI162 163 The platform serves the CLI itself: the install script and the linux-x64 and darwin-arm64 binaries come from the stage's own `releases-<stage>` bucket:91 unmodified lines255 256 What it does not promise:257 258 - **Held-back checks are hidden from people and agents, not from the code under test.** They run in the check job's own container with the network off, nothing they or the lanes beside them print comes back, and a claim, or a person in one area, may fail an area only a few times each week. That raises the cost of reading them; it cannot stop a determined reader whose code runs beside them. The `Held-back:` trailer names each area, how many of its sealed checks passed and the suite's commitment, nothing more.259-- **Verdicts after the push are asynchronous.** Custody and shape refusals arrive in `git push`; the merged-tree checks report through `myr status`, `myr verdict`, MCP, the web, and a git note on the answer's head ([ADR 0015](docs/adr/0015-submitting-an-answer-is-asynchronous.md)).259+- **Verdicts after the push are asynchronous.** Custody and shape refusals arrive in `git push`; the merged-tree checks report through `myr status`, `myr verdict`, MCP, the web, and a git note on the answer's head ([ADR 0015](.agents/adr/0015-submitting-an-answer-is-asynchronous.md)).260 - **No numbers but the table's.** The Numbers section holds only what a live run measured, each with its stage and date.261 262 ## Keep or cut263 53 unmodified lines317 infra/ bootstrap, deploy, the recording lock, the stage table, smoke's probes, teardown318 scripts/ brand and byte checks, seed, smoke, swarm, release319 examples/ datekit and burrow, fictional projects for the demo320 tools/oxlint/ the vendored anti-slop lint plugins321-docs/ decisions (adr/), agent conventions (agents/), the demo (demo/)321+.agents/ decisions (adr/), agent conventions (workflow/), the demo (demo/), the stage record (ops/), the ask template (scratch/)322 ```323 324 Every internal package is `@repo/<name>`, and in code the product's name lives only in `packages/brand/src/index.ts`. Every operation is one contract in `packages/protocol/src/contracts.ts`, and the CLI, MCP and the web are projections of it, built in each app's `surfaces.ts`.325 8 unmodified lines334 Bindings are declared per stage in each app's `wrangler.jsonc`, and the platform decodes its whole env once, at start (`apps/platform/src/platform.ts`).335 336 ### The core loop, step by step337 338-1. **Init or import.** `myr init` finds the project's own commands (its run block), proposes a config folder, and makes the project, empty or imported once from a public HTTPS repo (from the CLI, or from the web's `/import`). A project is named `<owner>/<name>` (the rule is in the Run a project guide, `packages/agent-kit/src/docs/run-a-project.ts`), and a project made before owners keeps its old address as a redirect ([ADR 0032](docs/adr/0032-a-project-is-named-by-its-owner-and-the-forty-keep-their-keys.md), [ADR 0033](docs/adr/0033-a-repo-is-imported-from-the-web-and-its-host-path-offers-the-import.md)). For an empty project, the initializer's first push is the only direct push `main` ever takes; after it, `main` moves only by a landing.338+1. **Init or import.** `myr init` finds the project's own commands (its run block), proposes a config folder, and makes the project, empty or imported once from a public HTTPS repo (from the CLI, or from the web's `/import`). A project is named `<owner>/<name>` (the rule is in the Run a project guide, `packages/agent-kit/src/docs/run-a-project.ts`), and a project made before owners keeps its old address as a redirect ([ADR 0032](.agents/adr/0032-a-project-is-named-by-its-owner-and-the-forty-keep-their-keys.md), [ADR 0033](.agents/adr/0033-a-repo-is-imported-from-the-web-and-its-host-path-offers-the-import.md)). For an empty project, the initializer's first push is the only direct push `main` ever takes; after it, `main` moves only by a landing.339 2. **Rules at the landed SHA.** After every landing the Lander bundles the config folder, and the platform evaluates it once, with frozen time and randomness, into a typed policy. Rules come only from the platform's own last landing.340 3. **Open an ask.** A decider sends the ask and its check; the check runs on `main` twice and must fail the same way by an assertion; the platform lands the ask with `Asked-by`.341 4. **Claim.** `myr claim` makes the claimant's fork (`<owner>/<name>--<ask>--<handle>`). Pushes keep the claim alive; a quiet claim is warned, then lapses.342 5. **Push through the gateway.** Custody admits the pusher before git sees the pack; after the fork takes it, the shape stage reads the diff (territory, judge closure, weakening markers, reached internals, layer paths) and every refusal comes back at once in `remote:` lines.4 unmodified lines347 Read it back with `myr status`, `myr verdict`, `myr why <path>:<line>`, the verdict note, MCP or the web.348 349 ### What the design rests on350 351-Artifacts, the git storage under every repo, has no atomic multi-ref push, so `main` lands by itself, with a non-force push that fails if `main` moved (a compare-and-swap), and the bookkeeping refs (the landed mirror and the notes) follow in pushes of their own. The Project Durable Object's landed SHA is the truth. Any write token can force-push `main`, so a canonical repo's write tokens never leave the platform's own jobs: answers go to forks through the gateway, and only the trusted Lander, which runs no answer code, gets a write token on a canonical repo, for five minutes, inside a landing. Events fire once per pushed ref, the platform's own bookkeeping pushes included, so `OnPush` recognizes those and ignores them. The binding resolves only short branch names and commit SHAs, so the Durable Object keeps the SHAs of custom refs itself ([ADR 0014](docs/adr/0014-landing-is-a-cas-push-of-main-then-bookkeeping-refs.md)).351+Artifacts, the git storage under every repo, has no atomic multi-ref push, so `main` lands by itself, with a non-force push that fails if `main` moved (a compare-and-swap), and the bookkeeping refs (the landed mirror and the notes) follow in pushes of their own. The Project Durable Object's landed SHA is the truth. Any write token can force-push `main`, so a canonical repo's write tokens never leave the platform's own jobs: answers go to forks through the gateway, and only the trusted Lander, which runs no answer code, gets a write token on a canonical repo, for five minutes, inside a landing. Events fire once per pushed ref, the platform's own bookkeeping pushes included, so `OnPush` recognizes those and ignores them. The binding resolves only short branch names and commit SHAs, so the Durable Object keeps the SHAs of custom refs itself ([ADR 0014](.agents/adr/0014-landing-is-a-cas-push-of-main-then-bookkeeping-refs.md)).352 353 ### Plain git, so you can leave354 355 Export is `git clone`. Code, asks (files in the config folder), the rules (TypeScript on `main`) and credit trailers, `Decided-by` included, leave with a clone. Verdict notes need one more fetch of `refs/notes/*`, because `git clone` copies no notes:1 unmodified line357 ```sh358 git fetch origin 'refs/notes/*:refs/notes/*'359 ```360 361-Inbound or two-way sync with GitHub is declined by design: it would be a second way onto `main` that skips the gate ([ADR 0010](docs/adr/0010-no-inbound-github-sync.md)). A project can be imported once, to start it.361+Inbound or two-way sync with GitHub is declined by design: it would be a second way onto `main` that skips the gate ([ADR 0010](.agents/adr/0010-no-inbound-github-sync.md)). A project can be imported once, to start it.362 363 ### What is ours364 365 Every app and package here is ours, except the files ported from other projects. Each of those names its upstream in its first line, and carries the upstream's licence notice in its header or in a file beside it:1 unmodified line367 - `packages/protocol/src/{cli,mcp}.ts`: the CLI-flag and MCP-tool projections, from Rat Stack;368 - `packages/visibility/src/leak-scan.ts`: the leak scanner's technique, from varlock;369 - `examples/burrow/tools/oxlint/burrow/rules/no-module-level-mutable-state.ts`: the fictional example's own lint rule, from Rat Stack, with `examples/burrow/tools/oxlint/burrow/LICENSE-rat-stack.txt` beside it.370 371-Vendored folders keep their licence file beside them: `tools/oxlint/anti-slop/` (anti-slop's oxlint plugins, with `tools/oxlint/anti-slop/UPSTREAM.md`), `apps/web/src/components/ui/` (shadcn/ui's components) and `apps/web/src/assets/fonts/` (the web's fonts). Ported code is ours to change once copied, and no upstream is synced in ([ADR 0013](docs/adr/0013-provenance-copy-with-attribution.md)). The decisions behind the design are in `docs/adr/`.371+Vendored folders keep their licence file beside them: `tools/oxlint/anti-slop/` (anti-slop's oxlint plugins, with `tools/oxlint/anti-slop/UPSTREAM.md`), `apps/web/src/components/ui/` (shadcn/ui's components) and `apps/web/src/assets/fonts/` (the web's fonts). Ported code is ours to change once copied, and no upstream is synced in ([ADR 0013](.agents/adr/0013-provenance-copy-with-attribution.md)). The decisions behind the design are in `.agents/adr/`.372 373 ## Credits374 375 Each credit names what we took and where it lives.8 unmodified lines384 - **Effect**. The product is written in Effect v4: its schemas, the one `RpcGroup`, the CLI, the MCP servers and the platform's HTTP.385 - **isomorphic-git**. git inside a Worker: the in-memory repo host, the smart-HTTP pushes of the Artifacts binding adapter, and the `/isogit` Lander.386 - **Cloudflare's cf** (ideas, no code). One merged command catalog for every surface (`commandDocs` in `packages/agent-kit/src/command-doc.ts`), and the rule that wire schemas use whole or finite numbers and optional keys, so the JSON Schema an MCP client reads holds no `"Infinity"` and no `null`.387 - **Ghostty's `VOUCHED.td` format**. A project's vouch file: one handle per line, and a leading `-` to denounce.388-- **Matt Pocock's agent-brief shape**. The brief an ask carries (the want, what happens today, the context, the terms, what is out of scope), and the ask-shaped template this repo's own work was written in, `.scratch/TEMPLATE.md`.388+- **Matt Pocock's agent-brief shape**. The brief an ask carries (the want, what happens today, the context, the terms, what is out of scope), and the ask-shaped template this repo's own work was written in, `.agents/scratch/TEMPLATE.md`.389 390 ## Roadmap391 392 - Later: a one-way push mirror of `main` to GitHub.4 unmodified lines