Skip to content
Myr

README.md

This file

Path

README.md

123 lines · 9.2 KiB · Markdown

Last changed by

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

History of this file

Take it

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 1–4why, one step back
1# Myr
23A 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.4

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

line 5why, one step back
5Anyone'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. It runs live at <https://myr.technology>.

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 6–8why, one step back
6
7A platform can do what a setting on a code host cannot:8

Merge build/readme-cut into mainoscabrielbefore adoption5792317

lines 9–13why, one step back
9- **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/704-readme'oscabrielbefore adoption9bac11d

line 14why, one step back
14

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 15why, one step back
15Contributors 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/704-readme'oscabrielbefore adoption9bac11d

lines 16–24why, one step back
16
17```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```24

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 25why, one step back
25## Quick start

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

line 26why, one step back
26

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 27why, one step back
27You need Bun 1.4.2 and git 2.5x. Nothing here needs an account:

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 28–30why, one step back
28
29```sh30bun install --frozen-lockfile

Merge build/readme-cut into mainoscabrielbefore adoption5792317

lines 31–33why, one step back
31bun run verify # lint, types and every test, the whole core loop in Node with real git
32bun run --cwd apps/web dev # the web over a dev world seeded with two fictional projects33bun run seed -- --world node # both examples, seeded onto a platform running in Node

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 34–35why, one step back
34```
35

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 36why, one step back
36The CLI comes from the platform itself; `myr login` signs you in through the browser and sets up git's credential helper, so plain `git clone` and `git push` work:

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 37–38why, one step back
37
38```sh

Merge build/readme-cut into mainoscabrielbefore adoption5792317

lines 39–42why, one step back
39curl -fsSL <origin>/install.sh | sh
40myr login --url <origin>41myr asks --project oscabriel/datekit42myr claim <ask>

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 43–44why, one step back
43```
44

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 45why, one step back
45The web's `/docs` holds the guides and the full reference; `/llms.txt` and `myr mcp` serve the same to agents.

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

line 46why, one step back
46

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 47why, one step back
47## Deploy your own

Describe the Control room as built: DESIGN.md, PRODUCT.md, four ADRs, the demo docs and a tighter web entry limitoscabrielbefore adoption207eb8c

line 48why, one step back
48

Sign people in by a proven email, with a display name, and Google's emailoscabrielbefore adoption125964c

line 49why, one step back
49You 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 50why, one step back
50

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

line 51why, one step back
51```sh

Merge build/readme-cut into mainoscabrielbefore adoption5792317

lines 52–53why, one step back
52bun run bootstrap -- --stage dev-<you> # makes the stage's resources; deletes nothing
53bun run deploy -- --stage dev-<you> # runs verify, deploys the three Workers, runs smoke

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 54–55why, one step back
54```
55

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 56why, one step back
56[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/704-readme'oscabrielbefore adoption9bac11d

line 57why, one step back
57

Merge observability into mainoscabrielbefore adoption1985111

lines 58–76why, one step back
58### Observability
5960Each stage keeps, for every invocation of all three Workers and unsampled:6162- **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.63- **Issues**: exceptions, failed invocations and error-level lines, grouped; each line keeps its ids.64- **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.65- **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.66- **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`.67- **Metrics**: landings, refusals by tag and stage, checked lanes, the wait before checks and draft rounds, 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.6869A 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.7071Read 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.7273```sh74# Errors by Worker since an instant75bun run ops -- analytics sql post --scope-account-tag <account id> \76 --time-range-start 2026-10-13T00:00:00Z \

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

line 77why, one step back
77 --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 78–80why, one step back
78
79# Refusals by tag and stage80bun run ops -- analytics sql post --scope-account-tag <account id> \

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

line 81why, one step back
81 --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 82–99why, one step back
82```
8384`bun run ops -- analytics sql introspection get --account-tag <account id> --include-columns --include-wae` lists the datasets and their columns.8586### Alerts8788Each stage has six alerts, declared in `infra/alerts.ts` as Cloudflare Custom Alerts (beta), each a SQL API query run every minute:8990- **errors**, one per Worker: five or more exceptions or error-level lines in 15 minutes.91- **issue spike**: the stage's Workers report Issues three standard deviations above the two hours before, as after a bad deploy.92- **container failures**: three or more sandbox jobs whose container never answered, in 30 minutes.93- **refusal spike**: refusals, from the stage's metrics dataset in Analytics Engine, three standard deviations above the six hours before.9495No 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:96971. Run `bun run bootstrap -- --stage <stage> --dry-run`. It ends by printing each alert's name, detection and SQL for that stage.982. 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.99

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 100why, one step back
100## The tree

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 101–102why, one step back
101
102```

Merge build/readme-cut into mainoscabrielbefore adoption5792317

lines 103–106why, one step back
103apps/ the platform, sandbox and web Workers, and the CLI
104packages/ the protocol (one schema for every surface), gate, rules, checks, lifecycles, git and the rest105infra/ bootstrap, deploy, the stage table, teardown106scripts/ brand and byte checks, seed, smoke, swarm, release

Merge infra/drop-demo into mainoscabrielbefore adoptionc49b6bf

line 107why, one step back
107examples/ datekit and burrow, fictional projects seeded on dev stages

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 108why, one step back
108tools/ the vendored lint plugins

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

lines 109–112why, one step back
109```
110111## Credits112

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 113why, one step back
113Files 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/704-readme'oscabrielbefore adoption9bac11d

line 114why, one step back
114

Merge build/readme-cut into mainoscabrielbefore adoption5792317

lines 115–118why, one step back
115- **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`.
116- **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.117- **anti-slop** ([dmmulroy/anti-slop](https://github.com/dmmulroy/anti-slop), MIT): the lint plugins in `tools/oxlint/anti-slop/`.118- **shadcn/ui** (MIT): the web's base components, in `apps/web/src/components/ui/`.

Merge redesign into mainoscabrielbefore adoptioncaedd21

line 119why, one step back
119- **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 120–121why, one step back
120- **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.
121- Ideas, no code: Cloudflare's cf (one command catalog), Ghostty's `VOUCHED.td` format and Matt Pocock's agent-brief shape.

Merge branch 'build/704-readme'oscabrielbefore adoption9bac11d

line 122why, one step back
122

Merge build/readme-cut into mainoscabrielbefore adoption5792317

line 123why, one step back
123Licensed under the terms in [LICENSE](LICENSE).