README.md
This file
Path
README.md
136 lines · 11.7 KiB · Markdown
Last changed by
Merge project/drop-proposals into mainoscabrielbefore adoptionb4ed08b
History of this fileTake it
The walk stopped after 200 commits: lines older than 10c8b54 point at it.
Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 1–4why, one step back1# Myr23A Git platform for the boundary between a project and everyone else. Everything a project ships is public, its contribution process is typed code on `main`, and a push lands only by passing a typed gate.4Merge docs/concurrency-story into mainoscabrielbefore adoption3c2c19c
line 5why, one step back5Anyone's agent can now offer a change at any hour, and projects answer by closing the door or hand-building a vouch gate in front of it. Myr puts that boundary in the platform, so it is held at the push rather than in a maintainer's evening. Many agents offering changes to one project at once is the reason it is held there: each answer is judged on its own merged tree, and `main` moves by one landing at a time. It runs live at <https://myr.technology>.Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 6–8why, one step back67A platform can do what a setting on a code host cannot:8Merge build/readme-cut into mainoscabrielbefore adoption5792317
lines 9–13why, one step back9- **Judge with checks the answer cannot touch.** A push that edits test config, scripts or CI, or skips a test without a reason, is refused.10- **Hold checks back.** A maintainer's hidden checks run on every answer; the answerer learns one result per area.11- **Refuse in git's own words.** Every refusal is a typed value, printed in `git push`'s `remote:` lines with the command to run next.12- **Give an ask one claimant.** A claim is an exclusive, expiring right to answer, so two agents never race on one change.13- **Credit the asker too.** A landing names every person by trailer (`Asked-by`, `Decided-by` and more); an agent is disclosed, never credited.Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 14why, one step back14Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 15why, one step back15Contributors meet four nouns, defined in [GLOSSARY.md](GLOSSARY.md): an **ask** (a change the project wants, with a check that fails on `main`), an **answer** (a commit offered for one ask), a **check** (what judges it, on the exact merged tree) and a **refusal** (what comes back instead of a landing).Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 16–24why, one step back1617```18$ git push19remote: OutOfScope: changes paths outside the ask's territory: README.md; put those files back, or flag the ask if the want needs them20remote: next: myr check21remote: retryable: no22 ! [remote rejected] HEAD -> main (OutOfScope)23```24Merge docs/concurrency-story into mainoscabrielbefore adoption3c2c19c
lines 25–37why, one step back25## Many agents at once2627A claim is exclusive unless the ask's kind allows a race, so a second claimant hears `AskFull`, and a claim lives only while its claimant pushes: by default it is warned after 2 hours and lapses after 24 without a push. Each project is one Durable Object and each pushed answer runs in a Workflow of its own, so answers to different asks are merged and checked in parallel; only the final write to `main` waits, in a landing slot that holds one answer at a time. The platform never rebases an answer: when `main` moved while it waited, it merges the answer three ways onto the new `main` and checks the merged tree again, up to three times (`maxRemerges` in `packages/project/src/landing.ts`). When that merge conflicts, or `main` keeps moving, the answer is refused `StaleBase`, and a conflict's refusal names each conflicting path with the landing, ask and person that moved it. A migrate ask whose old name is used in several modules opens as a family: one child ask per module, each claimed on its own, plus a delete child that waits until every other child has landed. What an agent carries from one push to the next is kept by the platform, not in its context: each push is a numbered round with its own verdict, each refusal is a typed value with the command to run next, and `myr evidence` returns a failing lane's log to the answer's claimant.2829Measured live on the `dev-oscabriel` stage on 2026-10-08, from commits `25a727e` (swarm run 1) and `6730a0e` (the rest), with [`scripts/swarm.ts`](scripts/swarm.ts) and `smoke --loop`; the whole record, failures included, is in [examples/swarm-run-2026-10-08.md](examples/swarm-run-2026-10-08.md).3031| Run | Measured |32| --- | --- |33| Swarm run 2: six contributors on four harnesses (Claude Code, OpenCode, Amp, pi), one family child each | 6 of 6 landed in 7 min 41 s; one `StaleBase` landed on its second attempt, one `ChecksFailed` landed after a fix |34| Both swarm runs' ten landings | 6 of 10 met a moved `main` and were merged and checked again before landing |35| The core loop, five runs | 5 of 5 passed, each refused `OutOfScope` in git's output before it landed |36| The Lander's land step, ten swarm landings | median 5.5 s, worst 12 s: over the 5 s bar in 5 of 10 |37Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 38why, one step back38## Quick startMerge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 39why, one step back39Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 40why, one step back40You need Bun 1.4.2 and git 2.5x. Nothing here needs an account:Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 41–43why, one step back4142```sh43bun install --frozen-lockfileMerge build/readme-cut into mainoscabrielbefore adoption5792317
lines 44–46why, one step back44bun run verify # lint, types and every test, the whole core loop in Node with real git45bun run --cwd apps/web dev # the web over a dev world seeded with two fictional projects46bun run seed -- --world node # both examples, seeded onto a platform running in NodeMerge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 47–48why, one step back47```48Merge demo/prod-ready into mainoscabrielbefore adoption080e1fc
line 49why, one step back49The CLI comes from the platform itself: the web at `https://myr.technology` serves the installer, and `myr login` signs you in to the platform at `https://git.myr.technology` through the browser and sets up git's credential helper, so plain `git clone` and `git push` work:Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 50–51why, one step back5051```shMerge demo/prod-ready into mainoscabrielbefore adoption080e1fc
line 52why, one step back52curl -fsSL https://myr.technology/install.sh | shMerge cli/default-platform into mainoscabrielbefore adoptionb9fc54b
line 53why, one step back53myr loginMerge build/readme-cut into mainoscabrielbefore adoption5792317
line 54why, one step back54myr asks --project oscabriel/datekitMerge demo/prod-ready into mainoscabrielbefore adoption080e1fc
line 55why, one step back55myr claim <ask> --project oscabriel/datekitMerge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 56–57why, one step back56```57Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 58why, one step back58The web's `/docs` holds the guides and the full reference; `/llms.txt` and `myr mcp` serve the same to agents.Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 59why, one step back59Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 60why, one step back60## Deploy your ownDescribe the Control room as built: DESIGN.md, PRODUCT.md, four ADRs, the demo docs and a tighter web entry limitoscabrielbefore adoption207eb8c
line 61why, one step back61Sign people in by a proven email, with a display name, and Google's emailoscabrielbefore adoption125964c
line 62why, one step back62You need a Cloudflare account on Workers Paid, with Artifacts, and Docker with buildx. Sign-in mails codes from `no-reply@myr.technology` through Cloudflare Email Service, so onboard the brand's domain for Email Sending on the account (Compute › Email Service). Add a `dev-<you>` stage to `infra/stages.ts` and each app's `wrangler.jsonc`, set the credentials `infra/.env.schema` names, then:Describe the Control room as built: DESIGN.md, PRODUCT.md, four ADRs, the demo docs and a tighter web entry limitoscabrielbefore adoption207eb8c
line 63why, one step back63Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 64why, one step back64```shMerge build/readme-cut into mainoscabrielbefore adoption5792317
lines 65–66why, one step back65bun run bootstrap -- --stage dev-<you> # makes the stage's resources; deletes nothing66bun run deploy -- --stage dev-<you> # runs verify, deploys the three Workers, runs smokeMerge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 67–68why, one step back67```68Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 69why, one step back69[AGENTS.md](AGENTS.md) covers secrets, smoke, seeding, releases and teardown, and its principles table names the check that holds each rule.Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 70why, one step back70Merge observability into mainoscabrielbefore adoption1985111
lines 71–79why, one step back71### Observability7273Each stage keeps, for every invocation of all three Workers and unsampled:7475- **Logs**: one JSON object per line, its ids (`project`, `requestId`, `lane` and the rest) fields to filter on, in Workers Logs. A typed refusal is the product working and is never logged as an error; a defect is logged once, at error level, with its stack.76- **Issues**: exceptions, failed invocations and error-level lines, grouped; each line keeps its ids.77- **Traces**, in all three. The runtime's own spans record each Durable Object SQL statement's bound values and each fetch's full URL, so the platform's traces hold the Project Durable Object's layer rows and sealed values (never a plain value). They stay in the account's own trace store, kept seven days: the platform's traces have no export destination, and no Issues automation sends them anywhere.78- **Query strings**, unredacted, so `?service=` on git and `?since=` on watch stay readable. A sign-in callback's one-time `code` and `state` show too.79- **Source maps**, uploaded by each deploy. Cloudflare remaps an uncaught exception's stack with them, but a defect the platform reports itself is logged as thrown, minified, and by its name and frames alone, never its text. To read its frames, build the deployed commit's map with `bunx wrangler deploy --dry-run --outdir <dir> --env <stage>` in `apps/platform`.Merge project/drop-proposals into mainoscabrielbefore adoptionb4ed08b
line 80why, one step back80- **Metrics**: landings, refusals by tag and stage, checked lanes and the wait before checks, written by the platform's `METRICS` binding to the stage's Workers Analytics Engine dataset, `metrics_<stage>` with `_` for `-`. `packages/project/src/metrics/binding.ts` lays out its columns.Merge observability into mainoscabrielbefore adoption1985111
lines 81–89why, one step back8182A Checker container's own logs are off, since held-back checks run there; the Lander's are on. Nothing the code itself logs, traces or counts names a layer, a held-back check, a path or a value (principle 7); only the runtime's own platform spans above do.8384Read them in the dashboard, under each Worker's Observability tab and under Issues, or through the SQL API with `bun run ops`. Its token needs Account › Account Analytics › Read, and so does smoke: after a deploy it fails on any exception or error-level line the stage's Workers logged since the first upload, naming each Worker and its count.8586```sh87# Errors by Worker since an instant88bun run ops -- analytics sql post --scope-account-tag <account id> \89 --time-range-start 2026-10-13T00:00:00Z \Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf
line 90why, one step back90 --query "SELECT scriptName, count() AS errors FROM logs.workersLogs WHERE scriptName IN ('platform-prod', 'sandbox-prod', 'web-prod') AND (level = 'error' OR error != '') GROUP BY scriptName"Merge observability into mainoscabrielbefore adoption1985111
lines 91–93why, one step back9192# Refusals by tag and stage93bun run ops -- analytics sql post --scope-account-tag <account id> \Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf
line 94why, one step back94 --query "SELECT blob2 AS tag, blob3 AS stage, count() AS refusals FROM events.analyticsEngine.\"metrics_prod\" WHERE blob1 = 'Refused' GROUP BY tag, stage ORDER BY refusals DESC"Merge observability into mainoscabrielbefore adoption1985111
lines 95–112why, one step back95```9697`bun run ops -- analytics sql introspection get --account-tag <account id> --include-columns --include-wae` lists the datasets and their columns.9899### Alerts100101Each stage has six alerts, declared in `infra/alerts.ts` as Cloudflare Custom Alerts (beta), each a SQL API query run every minute:102103- **errors**, one per Worker: five or more exceptions or error-level lines in 15 minutes.104- **issue spike**: the stage's Workers report Issues three standard deviations above the two hours before, as after a bad deploy.105- **container failures**: three or more sandbox jobs whose container never answered, in 30 minutes.106- **refusal spike**: refusals, from the stage's metrics dataset in Analytics Engine, three standard deviations above the six hours before.107108No API takes a custom alert's query yet, so a person makes each by hand, once per stage, and again when `infra/alerts.ts` changes:1091101. Run `bun run bootstrap -- --stage <stage> --dry-run`. It ends by printing each alert's name, detection and SQL for that stage.1112. In the dashboard, under Notifications, create a Custom Alert for each: its name, the printed SQL as custom SQL, the Automatic time range, the detection and windows printed beside it, the default execution and repeat intervals, and the address `ALERT_EMAIL` names (`infra/.env.schema`) as its email destination.112Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 113why, one step back113## The treeMerge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 114–115why, one step back114115```Merge build/readme-cut into mainoscabrielbefore adoption5792317
lines 116–119why, one step back116apps/ the platform, sandbox and web Workers, and the CLI117packages/ the protocol (one schema for every surface), gate, rules, checks, lifecycles, git and the rest118infra/ bootstrap, deploy, the stage table, teardown119scripts/ brand and byte checks, seed, smoke, swarm, releaseMerge docs/concurrency-story into mainoscabrielbefore adoption3c2c19c
line 120why, one step back120examples/ datekit and burrow, fictional projects seeded on dev stages, and the swarm's run recordMerge build/readme-cut into mainoscabrielbefore adoption5792317
line 121why, one step back121tools/ the vendored lint pluginsMerge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
lines 122–125why, one step back122```123124## Credits125Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 126why, one step back126Files ported from other projects name their upstream in their first line and carry its licence notice; vendored folders keep their licence file beside them.Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 127why, one step back127Merge build/readme-cut into mainoscabrielbefore adoption5792317
lines 128–131why, one step back128- **varlock** ([dmno-dev/varlock](https://github.com/dmno-dev/varlock), MIT): the `.env.schema` format, and the leak scanner in `packages/visibility/src/leak-scan.ts`.129- **Rat Stack** ([joelhooks/rat-stack](https://github.com/joelhooks/rat-stack), MIT): the CLI and MCP projections in `packages/protocol/src/{cli,mcp}.ts`, the Effect diagnostics map, and burrow's `no-module-level-mutable-state` rule.130- **anti-slop** ([dmmulroy/anti-slop](https://github.com/dmmulroy/anti-slop), MIT): the lint plugins in `tools/oxlint/anti-slop/`.131- **shadcn/ui** (MIT): the web's base components, in `apps/web/src/components/ui/`.Merge redesign into mainoscabrielbefore adoptioncaedd21
line 132why, one step back132- **IBM Plex Sans** and **IBM Plex Mono** (SIL Open Font License): the web's typefaces, installed from fontsource (`@fontsource-variable/ibm-plex-sans`, `@fontsource/ibm-plex-mono`), each package carrying its licence.Merge build/readme-cut into mainoscabrielbefore adoption5792317
lines 133–134why, one step back133- **Pierre** (`@pierre/diffs`, `@pierre/trees`, Apache-2.0), **unified** (MIT), **Effect** and **isomorphic-git**: highlighting and diffs, Markdown, the whole codebase, and git inside a Worker.134- Ideas, no code: Cloudflare's cf (one command catalog), Ghostty's `VOUCHED.td` format and Matt Pocock's agent-brief shape.Merge branch 'build/906-platform-root-page'oscabrielbefore adoption10c8b54
line 135why, one step back135Merge build/readme-cut into mainoscabrielbefore adoption5792317
line 136why, one step back136Licensed under the terms in [LICENSE](LICENSE).