Elffuss BraidHub

utopia-ia/elffuss-braid public

README: one image per theme, and every claim checked against the code

The banner and the diagram now choose their image by colour scheme alone,
both wide. For a reader who has chosen a theme, GitHub rewrites the
colour-scheme media queries of a <picture>, so the sources that also
tested the width showed the tall images on wide screens. The phone and
tall variants are gone, and hero.py and diagram.py no longer make them;
the wide images they make are the committed ones, byte for byte.

Corrected against the code, the help texts and the article:

- braid derive computes generation numbers, skip pointers and
  changed-path filters ahead of time; braid blame computes its records
  per file. All are kept in the store.
- Sparse checkouts are partly there: hub clone --paths fetches some trees
  and holds no working copy, and there is no sparse working copy yet.
- The article says a proper merge queue doesn't make much sense at agent
  scale, and invests in post-merge testing instead.
- braid resolve exists: it marks conflicts settled, and the agent edits
  the files.
- braid commit given paths scans only those.
- A workspace has no shared index and takes no repository-wide lock.
- A conflict's range stops before end, and the JSON shown is what the
  command shown prints.
- verify runs when it is run, and lands a revert only with --revert:
  in the status line, the Spanish part, the comparison table and the
  note on a red main.
- bench/run.py has not been run again for the ratio table; the store's
  size was measured later, 2.5 to 3.1 times what git gc --aggressive
  packs on four public histories, as format v1 section 7 says.
- Any HTTP cache can keep a public repository's objects; a private
  one's are Cache-Control: private.
Changeseta7cf83d0dfa470d02bcd6b562d7212aa84a5044b867fc527879405376c94891f
AuthorKikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 18:15 +02:00
CommitterKikoCis <KikoCis@users.noreply.github.com> · 2026-10-21 18:15 +02:00
Parents7786b13399e6

Browse the files at this changeset

7 files changed

modified README.md +31 −26
@@ -1,7 +1,6 @@
11 <picture>
2- <source media="(max-width: 1011px) and (prefers-color-scheme: dark)" srcset="docs/assets/hero-phone-dark.svg">
3- <source media="(max-width: 1011px)" srcset="docs/assets/hero-phone-light.svg">
42 <source media="(prefers-color-scheme: dark)" srcset="docs/assets/hero-dark.svg">
3+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/hero-light.svg">
54 <img src="docs/assets/hero-light.svg" width="100%" alt="Elffuss Braid: many agents, one main, no retry loop. Under it, a terminal shows three agents landing on main in turn: agent-a lands as a fast-forward, agent-b is rebased onto it, and agent-c, which changed the same line of shipping.toml as agent-a, gets a conflict, so main did not move and braid exits with status 2.">
65 </picture>
76
@@ -44,13 +43,13 @@
4443 | A changeset lists the files changed against its first parent | The same, plus the root tree id; the bytes are [frozen](docs/spec/format-v1.md) | ✅ done |
4544 | Data is content-addressed and never changes, so any cache can serve it | BLAKE3 ids; BraidHub serves every object by id as immutable | ✅ done |
4645 | Commits take no lock, only moving a branch is serial, and the server does the rebases | Agents commit in parallel; `braid land` rebases path by path onto whatever landed first, in one short step taken in turn, locally or on BraidHub | ✅ done |
47-| A commit costs what it changes, not what the repository weighs | Landing rebases only the paths a change touches, and `braid change create` needs no working copy; but `braid commit` scans the whole working copy, and at the last measurement was slower than git on large trees ([measured](#measured-against-git)) | partly |
48-| Derived data for blame, path history and ancestry, computed from the parents | Generation numbers, skip pointers, changed-path filters and blame records, computed once and kept (`braid derive`); BraidHub serves history and diffs, not blame | ✅ done locally |
46+| A commit costs what it changes, not what the repository weighs | Landing rebases only the paths a change touches, and `braid change create` needs no working copy; but `braid commit` scans the whole working copy by default (given paths, only those), and at the last measurement was slower than git on large trees ([measured](#measured-against-git)) | partly |
47+| Derived data for blame, path history and ancestry, computed from the parents | Generation numbers, skip pointers and changed-path filters, which `braid derive` can compute ahead of time, and blame records, which `braid blame` computes per file, all kept in the store; BraidHub serves history and diffs, not blame | ✅ done locally |
4948 | Every query is an API, and the working copy is optional | `--json` on every command; `braid hub show`, `ls`, `cat`, `log` and `diff` read a repository with no clone; `braid change create --land` writes with no checkout | first version |
50-| Sparse and virtualized checkouts | `braid hub clone --paths` brings only the trees under some paths; a virtual file system is planned (milestone 7) | first version |
49+| Sparse and virtualized checkouts | `braid hub clone --paths` fetches only the trees under some paths, with no working copy (`cat-object`, `log` and `change create --land` work there); no sparse working copy yet; a virtual file system is planned (milestone 7) | partly |
5150 | The daemon, the caches and the server answer the same requests | BraidHub is the server; a per-machine daemon and cache tiers are planned (milestones 6 and 7) | planned |
52-| No merge queue: test after merging, bisect, revert | [`braid verify --revert`](#keeping-main-green) bisects to the changeset that broke the tests and lands its revert | ✅ new in 0.1.1 |
53-| Concurrent changes can conflict, and agents fix them | A conflict comes back as data, with the command to run `next`, and `main` does not move; braid has no resolver of its own | ✅ done |
51+| A proper merge queue doesn't make much sense at agent scale; invest in post-merge testing instead, and automate bisect and revert | [`braid verify --revert`](#keeping-main-green) bisects to the changeset that broke the tests and lands its revert | ✅ new in 0.1.1 |
52+| Concurrent changes can conflict, and agents fix them | A conflict comes back as data, with the command to run `next`, and `main` does not move; braid does not settle conflicts itself: the agent edits the files (`braid resolve` only marks them settled) | ✅ done |
5453 | Hermetic simulations and fuzzing | Deterministic simulation of agents landing at once, with injected faults; crash and power-loss tests; five fuzz targets | ✅ done |
5554 | Permissions per directory, semantic approval rules, monitoring agents ("superfans") | BraidHub's permissions are per repository, and its change requests take reviews and approvals | not in braid |
5655 | Clients are always online | Braid works offline on one machine; BraidHub is the authority when several machines share a repository | no, by design |
@@ -58,7 +57,8 @@
5857 ## Three agents, one main
5958
6059 Three agents change a small shop at once, each in a workspace of its own:
61-no index to fight over, no lock. Then they land on `main`, in turn.
60+no shared index, no repository-wide lock. Then they land on `main`, in
61+turn.
6262
6363 ![Three agents commit at the same time, each in its own workspace, and land on main in turn: the first is a fast-forward, the second is rebased onto it, and the third changed the same line as the first, so main does not move and braid reports the conflict with exit status 2](docs/assets/demo-agents.gif)
6464
@@ -126,7 +126,7 @@
126126 <details>
127127 <summary>The same conflict as an agent reads it, with --json</summary>
128128
129-`braid land --json`, abridged:
129+`braid land --workspace agent-c --agent agent-c --json`, abridged:
130130
131131 ```json
132132 {
@@ -145,9 +145,10 @@
145145 ```
146146
147147 `base` is what both sides started from, `branch` what `main` holds now and
148-`workspace` the agent's own change; lines count from 0, and `end` is left
149-out. Exit status 2 also means a command line that braid could not parse, so
150-an agent reads `outcome` too. `braid land --help` describes every field.
148+`workspace` the agent's own change; lines count from 0, and a range stops
149+before `end`. Exit status 2 also means a command line that braid could not
150+parse, so an agent reads `outcome` too. `braid land --help` describes every
151+field.
151152
152153 </details>
153154
@@ -219,7 +220,7 @@
219220 | Landing | `git push`, rejected whenever another agent got in first | waits for CI on the changes ahead of it | `braid land`: one short step, taken in turn |
220221 | Retries | grow with the agents: 5.2 per push with 16, [in one run](#measured-against-git) | none | none: a change that fell behind is rebased |
221222 | A conflict | markers, and messages written for people | the change leaves the queue | exit status 2, `main` does not move, JSON with `next` |
222-| A change that breaks the build | lands | is stopped before it lands | lands, and [`braid verify`](#keeping-main-green) then lands its revert |
223+| A change that breaks the build | lands | is stopped before it lands | lands, and [`braid verify --revert`](#keeping-main-green) then lands its revert |
223224
224225 So braid trades the queue's guarantee for landings that never wait for CI:
225226 between a landing and the next `braid verify`, `main` can be red, and
@@ -232,7 +233,7 @@
232233 |---|---|---|
233234 | Unit of change | a commit: a full tree snapshot | a changeset: the files that changed against the first parent, plus the root tree id |
234235 | Many writers | one index per working tree | one workspace per agent over a shared append-only store; creating a change takes no repository lock |
235-| Fetching | negotiated packs, built for each client | immutable objects by id, which any HTTP cache can serve |
236+| Fetching | negotiated packs, built for each client | immutable objects by id; any HTTP cache can serve a public repository's, and a private one's carry `Cache-Control: private` |
236237 | Large directories | rewritten whole on every change | split into content-defined nodes; an edit rewrites only its path |
237238 | Large files | a separate extension | content-defined chunks, deduplicated across versions |
238239 | Hash | SHA-1 by default | BLAKE3 |
@@ -246,9 +247,8 @@
246247 ## How it works
247248
248249 <picture>
249- <source media="(max-width: 1011px) and (prefers-color-scheme: dark)" srcset="docs/assets/how-it-works-tall-dark.svg">
250- <source media="(max-width: 1011px)" srcset="docs/assets/how-it-works-tall-light.svg">
251250 <source media="(prefers-color-scheme: dark)" srcset="docs/assets/how-it-works-dark.svg">
251+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/how-it-works-light.svg">
252252 <img src="docs/assets/how-it-works-light.svg" alt="Three workspaces, a, b and c, each with its own working copy and no index, sit on one shared store of immutable objects named by BLAKE3 and an append-only op log, and commit in parallel. Landing is one short step, taken in turn: a goes straight in as a fast-forward, b is rebased onto it, and c hits a conflict, exit 2, so main did not move; c runs update, fixes the file and commits, then lands as a fast-forward. The strands braid into main, which git sync sends to any git remote as a fast-forward, with a lease. A dashed box marks a daemon and caches as planned.">
253253 </picture>
254254
@@ -390,9 +390,9 @@
390390 | 6 | Server: [BraidHub](#braidhub) with GitHub sign-in, landing over HTTP, GitHub mirrors and sparse clones; caching tiers | first version; caching planned |
391391 | 7 | Daemon, virtual file system, WebAssembly core | planned |
392392
393-New in 0.1.1: `braid revert`, and `braid verify`, which tests a branch's
394-head, bisects a failure and lands the revert of the changeset that caused
395-it.
393+New in 0.1.1: `braid revert`, and `braid verify`, which runs when you run
394+it: one run tests a branch's head, bisects a failure to the changeset that
395+caused it and, with `--revert`, lands that changeset's revert.
396396
397397 Each milestone ships when its tests pass: golden vectors and fuzzing for
398398 the format, crash and many-process tests for the store, bit-for-bit round
@@ -411,12 +411,16 @@
411411 ratio against git on the same machine, with the script that reproduces
412412 it. At commit `5330054`, braid was faster when many agents landed at
413413 once, and slower at importing and storing history, and at status and
414- commit on large trees. Much of that has been worked on since, and has
415- not been measured again.
414+ commit on large trees. Much of that has been worked on since, but
415+ `bench/run.py` has not been run again for the ratio table. A later
416+ measurement of the store's size, on the imported histories of four
417+ public repositories, found 2.5 to 3.1 times what `git gc --aggressive`
418+ packs them into
419+ ([format v1, section 7](docs/spec/format-v1.md#7-storage-not-hashed-versioned-on-its-own)).
416420 - **`main` can be red for a while.** Braid lands first and tests after,
417421 and merges are textual: two changes can merge cleanly and still break
418- the build together, until [`braid verify`](#keeping-main-green) reverts
419- one of them.
422+ the build together, until
423+ [`braid verify --revert`](#keeping-main-green) reverts one of them.
420424 - **Not there yet:** garbage collection, so nothing is ever removed from a
421425 store, and shallow or SHA-256 git repositories, which the git bridge
422426 refuses. `log -- <path>` and `blame` follow first parents and, on
@@ -550,9 +554,10 @@
550554 corto que dan por turnos: si un cambio se ha quedado atrás, braid le hace
551555 rebase sobre lo que haya aterrizado antes, y un conflicto vuelve como
552556 datos, sin mover `main`. `braid verify`, nuevo en la 0.1.1, ejecuta los
553-tests después de aterrizar, localiza con bisect el changeset que los rompió
554-y aterriza el cambio que lo deshace. Git se queda en los bordes, así que
555-GitHub y Gitea siguen funcionando.
557+tests cada vez que lo lanzas tras aterrizar; si fallan, localiza con bisect
558+el changeset que los rompió y, con `--revert`, aterriza el cambio que lo
559+deshace. Git se queda en los bordes, así que GitHub y Gitea siguen
560+funcionando.
556561
557562 Se inspira en las ideas que Anthropic publicó sobre Scion, su sistema
558563 interno de control de versiones. Es una implementación independiente: no
deleted docs/assets/hero-phone-dark.svg +0 −66
@@ -1,66 +0,0 @@
1-<!-- SPDX-License-Identifier: Apache-2.0
2- Copyright (c) 2026 UtopiaIA
3- Made by scripts/demos/hero.py from the agents recording: edit that, not this. -->
4-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 808" width="720" height="808" role="img" aria-labelledby="hero-title hero-desc">
5-<title id="hero-title">Elffuss Braid: Many agents. One main. No retry loop.</title>
6-<desc id="hero-desc">Three agents land on main in turn: agent-a as a fast-forward, agent-b rebased onto it, and agent-c with a conflict, so main did not move and braid exits with status 2.</desc>
7-<style>
8-.s { fill: none; stroke-width: 9.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
9-.sa { stroke: #c8a06a; } .sb { stroke: #54dcc6; } .sc { stroke: #8272ff; }
10-.tag { font-family: 'Iowan Old Style', Georgia, 'Palatino Linotype', Palatino, serif; font-size: 58px; font-weight: 600; letter-spacing: -0.3px; fill: #eae8f2; }
11-.url { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; font-size: 20px; letter-spacing: 1px; fill: #7f7ca0; }
12-.ln { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; font-size: 24px; white-space: pre; }
13-/* plays once, then holds: the last frame is the file as written */
14-@media (prefers-reduced-motion: no-preference) {
15- .s { animation: draw 1.5s cubic-bezier(.22, .61, .36, 1) both; }
16- .sb { animation-delay: .15s; } .sc { animation-delay: .3s; }
17- .tag { animation: show .8s ease-out .45s both; }
18- .url { animation: show .8s ease-out .8s both; }
19- .term { animation: show .5s ease-out 1s both; }
20- .ln { animation: show .3s ease-out both; }
21-}
22-@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
23-@keyframes show { from { opacity: 0; } to { opacity: 1; } }
24-</style>
25-<defs>
26-<clipPath id="hero-card"><rect width="720" height="808" rx="24"/></clipPath>
27-<radialGradient id="hero-glow0" cx="0.12" cy="0.02" r="0.62"><stop offset="0" stop-color="#54dcc6" stop-opacity="0.2"/><stop offset="1" stop-color="#54dcc6" stop-opacity="0"/></radialGradient>
28-<radialGradient id="hero-glow1" cx="0.9" cy="0.02" r="0.66"><stop offset="0" stop-color="#8272ff" stop-opacity="0.24"/><stop offset="1" stop-color="#8272ff" stop-opacity="0"/></radialGradient>
29-<radialGradient id="hero-glow2" cx="0.3" cy="1.05" r="0.7"><stop offset="0" stop-color="#c8a06a" stop-opacity="0.12"/><stop offset="1" stop-color="#c8a06a" stop-opacity="0"/></radialGradient>
30-</defs>
31-<g clip-path="url(#hero-card)">
32-<rect width="720" height="808" fill="#090a11"/>
33-<rect width="720" height="808" fill="url(#hero-glow0)"/>
34-<rect width="720" height="808" fill="url(#hero-glow1)"/>
35-<rect width="720" height="808" fill="url(#hero-glow2)"/>
36-</g>
37-<rect x=".5" y=".5" width="719" height="807" rx="23.5" fill="none" stroke="rgba(150,146,184,.22)"/>
38-<g transform="translate(20.10 24) scale(0.7)">
39-<defs><mask id="hero-cut0" maskUnits="userSpaceOnUse" x="0" y="0" width="320" height="96"><rect x="0" y="0" width="320" height="96" fill="#fff"/><path d="M38.67 21.01C41.17 21.11 43.67 22.42 46.17 24.77C48.67 27.12 51.17 30.51 53.67 34.5C56.17 38.49 58.67 43.08 61.17 47.69C63.67 52.3 66.17 56.92 68.67 60.96M84.67 74.99C87.17 74.89 89.67 73.58 92.17 71.23C94.67 68.88 97.17 65.49 99.67 61.5C102.17 57.51 104.67 52.92 107.17 48.31C109.67 43.7 112.17 39.08 114.67 35.04M130.67 21.01C133.17 21.11 135.67 22.42 138.17 24.77C140.67 27.12 143.17 30.51 145.67 34.5C148.17 38.49 150.67 43.08 153.17 47.69C155.67 52.3 158.17 56.92 160.67 60.96M176.67 74.99C179.17 74.89 181.67 73.58 184.17 71.23C186.67 68.88 189.17 65.49 191.67 61.5C194.17 57.51 196.67 52.92 199.17 48.31C201.67 43.7 204.17 39.08 206.67 35.04M222.67 21.01C225.17 21.11 227.67 22.42 230.17 24.77C232.67 27.12 235.17 30.51 237.67 34.5C240.17 38.49 242.67 43.08 245.17 47.69C247.67 52.3 250.17 56.92 252.67 60.96M268.67 74.99C271.11 74.89 273.56 73.64 276 71.38C278.44 69.13 280.89 65.88 283.33 62.03C285.78 58.18 288.22 53.73 290.67 49.23C293.11 44.73 295.56 40.18 298 36.13" fill="none" stroke="#000" stroke-width="18.5" stroke-linecap="butt"/></mask><mask id="hero-cut1" maskUnits="userSpaceOnUse" x="0" y="0" width="320" height="96"><rect x="0" y="0" width="320" height="96" fill="#fff"/><path d="M22 32.94C23.78 35.66 25.56 38.71 27.33 41.91C29.11 45.1 30.89 48.43 32.67 51.68C34.44 54.92 36.22 58.09 38 60.96M54 74.99C56.5 74.89 59 73.58 61.5 71.23C64 68.88 66.5 65.49 69 61.5C71.5 57.51 74 52.92 76.5 48.31C79 43.7 81.5 39.08 84 35.04M100 21.01C102.5 21.11 105 22.42 107.5 24.77C110 27.12 112.5 30.51 115 34.5C117.5 38.49 120 43.08 122.5 47.69C125 52.3 127.5 56.92 130 60.96M146 74.99C148.5 74.89 151 73.58 153.5 71.23C156 68.88 158.5 65.49 161 61.5C163.5 57.51 166 52.92 168.5 48.31C171 43.7 173.5 39.08 176 35.04M192 21.01C194.5 21.11 197 22.42 199.5 24.77C202 27.12 204.5 30.51 207 34.5C209.5 38.49 212 43.08 214.5 47.69C217 52.3 219.5 56.92 222 60.96M238 74.99C240.5 74.89 243 73.58 245.5 71.23C248 68.88 250.5 65.49 253 61.5C255.5 57.51 258 52.92 260.5 48.31C263 43.7 265.5 39.08 268 35.04" fill="none" stroke="#000" stroke-width="18.5" stroke-linecap="butt"/></mask><mask id="hero-cut2" maskUnits="userSpaceOnUse" x="0" y="0" width="320" height="96"><rect x="0" y="0" width="320" height="96" fill="#fff"/><path d="M23.33 74.99C25.83 74.89 28.33 73.58 30.83 71.23C33.33 68.88 35.83 65.49 38.33 61.5C40.83 57.51 43.33 52.92 45.83 48.31C48.33 43.7 50.83 39.08 53.33 35.04M69.33 21.01C71.83 21.11 74.33 22.42 76.83 24.77C79.33 27.12 81.83 30.51 84.33 34.5C86.83 38.49 89.33 43.08 91.83 47.69C94.33 52.3 96.83 56.92 99.33 60.96M115.33 74.99C117.83 74.89 120.33 73.58 122.83 71.23C125.33 68.88 127.83 65.49 130.33 61.5C132.83 57.51 135.33 52.92 137.83 48.31C140.33 43.7 142.83 39.08 145.33 35.04M161.33 21.01C163.83 21.11 166.33 22.42 168.83 24.77C171.33 27.12 173.83 30.51 176.33 34.5C178.83 38.49 181.33 43.08 183.83 47.69C186.33 52.3 188.83 56.92 191.33 60.96M207.33 74.99C209.83 74.89 212.33 73.58 214.83 71.23C217.33 68.88 219.83 65.49 222.33 61.5C224.83 57.51 227.33 52.92 229.83 48.31C232.33 43.7 234.83 39.08 237.33 35.04M253.33 21.01C255.83 21.11 258.33 22.42 260.83 24.77C263.33 27.12 265.83 30.51 268.33 34.5C270.83 38.49 273.33 43.08 275.83 47.69C278.33 52.3 280.83 56.92 283.33 60.96" fill="none" stroke="#000" stroke-width="18.5" stroke-linecap="butt"/></mask></defs>
40-<path class="s sa" d="M22 74.94C25.83 75.42 29.67 73 33.5 68.35C37.33 63.7 41.17 56.89 45 49.84C48.83 42.79 52.67 35.58 56.5 30.26C60.33 24.93 64.17 21.55 68 21.06C71.83 20.58 75.67 23 79.5 27.65C83.33 32.3 87.17 39.11 91 46.16C94.83 53.21 98.67 60.42 102.5 65.74C106.33 71.07 110.17 74.45 114 74.94C117.83 75.42 121.67 73 125.5 68.35C129.33 63.7 133.17 56.89 137 49.84C140.83 42.79 144.67 35.58 148.5 30.26C152.33 24.93 156.17 21.55 160 21.06C163.83 20.58 167.67 23 171.5 27.65C175.33 32.3 179.17 39.11 183 46.16C186.83 53.21 190.67 60.42 194.5 65.74C198.33 71.07 202.17 74.45 206 74.94C209.83 75.42 213.67 73 217.5 68.35C221.33 63.7 225.17 56.89 229 49.84C232.83 42.79 236.67 35.58 240.5 30.26C244.33 24.93 248.17 21.55 252 21.06C255.83 20.58 259.67 23 263.5 27.65C267.33 32.3 271.17 39.11 275 46.16C278.83 53.21 282.67 60.42 286.5 65.74C290.33 71.07 294.17 74.45 298 74.94" mask="url(#hero-cut0)" pathLength="1"/>
41-<path class="s sb" d="M22 36.13C25.83 29.78 29.67 24.75 33.5 22.46C37.33 20.17 41.17 20.64 45 23.75C48.83 26.86 52.67 32.56 56.5 39.25C60.33 45.94 64.17 53.52 68 59.87C71.83 66.22 75.67 71.25 79.5 73.54C83.33 75.83 87.17 75.36 91 72.25C94.83 69.14 98.67 63.44 102.5 56.75C106.33 50.06 110.17 42.48 114 36.13C117.83 29.78 121.67 24.75 125.5 22.46C129.33 20.17 133.17 20.64 137 23.75C140.83 26.86 144.67 32.56 148.5 39.25C152.33 45.94 156.17 53.52 160 59.87C163.83 66.22 167.67 71.25 171.5 73.54C175.33 75.83 179.17 75.36 183 72.25C186.83 69.14 190.67 63.44 194.5 56.75C198.33 50.06 202.17 42.48 206 36.13C209.83 29.78 213.67 24.75 217.5 22.46C221.33 20.17 225.17 20.64 229 23.75C232.83 26.86 236.67 32.56 240.5 39.25C244.33 45.94 248.17 53.52 252 59.87C255.83 66.22 259.67 71.25 263.5 73.54C267.33 75.83 271.17 75.36 275 72.25C278.83 69.14 282.67 63.44 286.5 56.75C290.33 50.06 294.17 42.48 298 36.13" mask="url(#hero-cut1)" pathLength="1"/>
42-<path class="s sc" d="M22 32.94C25.83 38.8 29.67 46.26 33.5 53.19C37.33 60.13 41.17 66.46 45 70.41C48.83 74.35 52.67 75.86 56.5 74.5C60.33 73.14 64.17 68.93 68 63.06C71.83 57.2 75.67 49.74 79.5 42.81C83.33 35.87 87.17 29.54 91 25.59C94.83 21.65 98.67 20.14 102.5 21.5C106.33 22.86 110.17 27.07 114 32.94C117.83 38.8 121.67 46.26 125.5 53.19C129.33 60.13 133.17 66.46 137 70.41C140.83 74.35 144.67 75.86 148.5 74.5C152.33 73.14 156.17 68.93 160 63.06C163.83 57.2 167.67 49.74 171.5 42.81C175.33 35.87 179.17 29.54 183 25.59C186.83 21.65 190.67 20.14 194.5 21.5C198.33 22.86 202.17 27.07 206 32.94C209.83 38.8 213.67 46.26 217.5 53.19C221.33 60.13 225.17 66.46 229 70.41C232.83 74.35 236.67 75.86 240.5 74.5C244.33 73.14 248.17 68.93 252 63.06C255.83 57.2 259.67 49.74 263.5 42.81C267.33 35.87 271.17 29.54 275 25.59C278.83 21.65 282.67 20.14 286.5 21.5C290.33 22.86 294.17 27.07 298 32.94" mask="url(#hero-cut2)" pathLength="1"/>
43-</g>
44-<text class="url" x="688" y="66" text-anchor="end">braid.elffuss.com</text>
45-<text class="tag" x="32" y="166">Many agents.</text>
46-<text class="tag" x="32" y="234">One main.</text>
47-<text class="tag" x="32" y="302">No retry loop.</text>
48-<g class="term">
49-<rect x="24" y="338" width="672" height="442" rx="16" fill="#0e0f18" stroke="rgba(150,146,184,.28)"/>
50-<rect x="25" y="360" width="3" height="398" fill="#c8a06a"/>
51-<rect x="28" y="360" width="3" height="398" fill="#54dcc6"/>
52-<rect x="31" y="360" width="3" height="398" fill="#8272ff"/>
53-</g>
54-<text class="ln" x="58" y="382" xml:space="preserve" style="animation-delay: 1.10s"><tspan fill="#7f7ca0"># landing on main is one short step that</tspan></text>
55-<text class="ln" x="58" y="416" xml:space="preserve" style="animation-delay: 1.32s"><tspan fill="#7f7ca0"># they take in turn</tspan></text>
56-<text class="ln" x="58" y="450" xml:space="preserve" style="animation-delay: 1.54s"><tspan fill="#c8a06a">[agent-a]</tspan><tspan fill="#7f7ca0"> $ </tspan><tspan fill="#eae8f2">braid land</tspan></text>
57-<text class="ln" x="58" y="484" xml:space="preserve" style="animation-delay: 1.76s"><tspan fill="#b3afce">Landed 0b042deed1e6 on main (fast-forward)</tspan></text>
58-<text class="ln" x="58" y="518" xml:space="preserve" style="animation-delay: 1.98s"><tspan fill="#54dcc6">[agent-b]</tspan><tspan fill="#7f7ca0"> $ </tspan><tspan fill="#eae8f2">braid land</tspan></text>
59-<text class="ln" x="58" y="552" xml:space="preserve" style="animation-delay: 2.20s"><tspan fill="#b3afce">Landed on main as 4ac41391a609,</tspan></text>
60-<text class="ln" x="58" y="586" xml:space="preserve" style="animation-delay: 2.42s"><tspan fill="#b3afce"> rebased onto 0b042deed1e6</tspan></text>
61-<text class="ln" x="58" y="620" xml:space="preserve" style="animation-delay: 2.64s"><tspan fill="#8272ff">[agent-c]</tspan><tspan fill="#7f7ca0"> $ </tspan><tspan fill="#eae8f2">braid land</tspan></text>
62-<text class="ln" x="58" y="654" xml:space="preserve" style="animation-delay: 2.86s"><tspan fill="#b3afce">fc89c7629ad1 conflicts with main at</tspan></text>
63-<text class="ln" x="58" y="688" xml:space="preserve" style="animation-delay: 3.08s"><tspan fill="#b3afce"> 4ac41391a609; main did not move:</tspan></text>
64-<text class="ln" x="58" y="722" xml:space="preserve" style="animation-delay: 3.30s"><tspan fill="#b3afce"> CONTENT shipping.toml (1 region)</tspan></text>
65-<text class="ln" x="58" y="756" xml:space="preserve" style="animation-delay: 3.52s"><tspan fill="#e779cf">exit status 2</tspan></text>
66-</svg>
deleted docs/assets/hero-phone-light.svg +0 −66
@@ -1,66 +0,0 @@
1-<!-- SPDX-License-Identifier: Apache-2.0
2- Copyright (c) 2026 UtopiaIA
3- Made by scripts/demos/hero.py from the agents recording: edit that, not this. -->
4-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 808" width="720" height="808" role="img" aria-labelledby="hero-title hero-desc">
5-<title id="hero-title">Elffuss Braid: Many agents. One main. No retry loop.</title>
6-<desc id="hero-desc">Three agents land on main in turn: agent-a as a fast-forward, agent-b rebased onto it, and agent-c with a conflict, so main did not move and braid exits with status 2.</desc>
7-<style>
8-.s { fill: none; stroke-width: 9.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
9-.sa { stroke: #a77a3a; } .sb { stroke: #13917f; } .sc { stroke: #5b4ae6; }
10-.tag { font-family: 'Iowan Old Style', Georgia, 'Palatino Linotype', Palatino, serif; font-size: 58px; font-weight: 600; letter-spacing: -0.3px; fill: #15141f; }
11-.url { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; font-size: 20px; letter-spacing: 1px; fill: #5f5b7d; }
12-.ln { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; font-size: 24px; white-space: pre; }
13-/* plays once, then holds: the last frame is the file as written */
14-@media (prefers-reduced-motion: no-preference) {
15- .s { animation: draw 1.5s cubic-bezier(.22, .61, .36, 1) both; }
16- .sb { animation-delay: .15s; } .sc { animation-delay: .3s; }
17- .tag { animation: show .8s ease-out .45s both; }
18- .url { animation: show .8s ease-out .8s both; }
19- .term { animation: show .5s ease-out 1s both; }
20- .ln { animation: show .3s ease-out both; }
21-}
22-@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
23-@keyframes show { from { opacity: 0; } to { opacity: 1; } }
24-</style>
25-<defs>
26-<clipPath id="hero-card"><rect width="720" height="808" rx="24"/></clipPath>
27-<radialGradient id="hero-glow0" cx="0.12" cy="0.02" r="0.62"><stop offset="0" stop-color="#13917f" stop-opacity="0.1"/><stop offset="1" stop-color="#13917f" stop-opacity="0"/></radialGradient>
28-<radialGradient id="hero-glow1" cx="0.9" cy="0.02" r="0.66"><stop offset="0" stop-color="#5b4ae6" stop-opacity="0.09"/><stop offset="1" stop-color="#5b4ae6" stop-opacity="0"/></radialGradient>
29-<radialGradient id="hero-glow2" cx="0.3" cy="1.05" r="0.7"><stop offset="0" stop-color="#a77a3a" stop-opacity="0.08"/><stop offset="1" stop-color="#a77a3a" stop-opacity="0"/></radialGradient>
30-</defs>
31-<g clip-path="url(#hero-card)">
32-<rect width="720" height="808" fill="#f6f4ee"/>
33-<rect width="720" height="808" fill="url(#hero-glow0)"/>
34-<rect width="720" height="808" fill="url(#hero-glow1)"/>
35-<rect width="720" height="808" fill="url(#hero-glow2)"/>
36-</g>
37-<rect x=".5" y=".5" width="719" height="807" rx="23.5" fill="none" stroke="rgba(21,20,31,.12)"/>
38-<g transform="translate(20.10 24) scale(0.7)">
39-<defs><mask id="hero-cut0" maskUnits="userSpaceOnUse" x="0" y="0" width="320" height="96"><rect x="0" y="0" width="320" height="96" fill="#fff"/><path d="M38.67 21.01C41.17 21.11 43.67 22.42 46.17 24.77C48.67 27.12 51.17 30.51 53.67 34.5C56.17 38.49 58.67 43.08 61.17 47.69C63.67 52.3 66.17 56.92 68.67 60.96M84.67 74.99C87.17 74.89 89.67 73.58 92.17 71.23C94.67 68.88 97.17 65.49 99.67 61.5C102.17 57.51 104.67 52.92 107.17 48.31C109.67 43.7 112.17 39.08 114.67 35.04M130.67 21.01C133.17 21.11 135.67 22.42 138.17 24.77C140.67 27.12 143.17 30.51 145.67 34.5C148.17 38.49 150.67 43.08 153.17 47.69C155.67 52.3 158.17 56.92 160.67 60.96M176.67 74.99C179.17 74.89 181.67 73.58 184.17 71.23C186.67 68.88 189.17 65.49 191.67 61.5C194.17 57.51 196.67 52.92 199.17 48.31C201.67 43.7 204.17 39.08 206.67 35.04M222.67 21.01C225.17 21.11 227.67 22.42 230.17 24.77C232.67 27.12 235.17 30.51 237.67 34.5C240.17 38.49 242.67 43.08 245.17 47.69C247.67 52.3 250.17 56.92 252.67 60.96M268.67 74.99C271.11 74.89 273.56 73.64 276 71.38C278.44 69.13 280.89 65.88 283.33 62.03C285.78 58.18 288.22 53.73 290.67 49.23C293.11 44.73 295.56 40.18 298 36.13" fill="none" stroke="#000" stroke-width="18.5" stroke-linecap="butt"/></mask><mask id="hero-cut1" maskUnits="userSpaceOnUse" x="0" y="0" width="320" height="96"><rect x="0" y="0" width="320" height="96" fill="#fff"/><path d="M22 32.94C23.78 35.66 25.56 38.71 27.33 41.91C29.11 45.1 30.89 48.43 32.67 51.68C34.44 54.92 36.22 58.09 38 60.96M54 74.99C56.5 74.89 59 73.58 61.5 71.23C64 68.88 66.5 65.49 69 61.5C71.5 57.51 74 52.92 76.5 48.31C79 43.7 81.5 39.08 84 35.04M100 21.01C102.5 21.11 105 22.42 107.5 24.77C110 27.12 112.5 30.51 115 34.5C117.5 38.49 120 43.08 122.5 47.69C125 52.3 127.5 56.92 130 60.96M146 74.99C148.5 74.89 151 73.58 153.5 71.23C156 68.88 158.5 65.49 161 61.5C163.5 57.51 166 52.92 168.5 48.31C171 43.7 173.5 39.08 176 35.04M192 21.01C194.5 21.11 197 22.42 199.5 24.77C202 27.12 204.5 30.51 207 34.5C209.5 38.49 212 43.08 214.5 47.69C217 52.3 219.5 56.92 222 60.96M238 74.99C240.5 74.89 243 73.58 245.5 71.23C248 68.88 250.5 65.49 253 61.5C255.5 57.51 258 52.92 260.5 48.31C263 43.7 265.5 39.08 268 35.04" fill="none" stroke="#000" stroke-width="18.5" stroke-linecap="butt"/></mask><mask id="hero-cut2" maskUnits="userSpaceOnUse" x="0" y="0" width="320" height="96"><rect x="0" y="0" width="320" height="96" fill="#fff"/><path d="M23.33 74.99C25.83 74.89 28.33 73.58 30.83 71.23C33.33 68.88 35.83 65.49 38.33 61.5C40.83 57.51 43.33 52.92 45.83 48.31C48.33 43.7 50.83 39.08 53.33 35.04M69.33 21.01C71.83 21.11 74.33 22.42 76.83 24.77C79.33 27.12 81.83 30.51 84.33 34.5C86.83 38.49 89.33 43.08 91.83 47.69C94.33 52.3 96.83 56.92 99.33 60.96M115.33 74.99C117.83 74.89 120.33 73.58 122.83 71.23C125.33 68.88 127.83 65.49 130.33 61.5C132.83 57.51 135.33 52.92 137.83 48.31C140.33 43.7 142.83 39.08 145.33 35.04M161.33 21.01C163.83 21.11 166.33 22.42 168.83 24.77C171.33 27.12 173.83 30.51 176.33 34.5C178.83 38.49 181.33 43.08 183.83 47.69C186.33 52.3 188.83 56.92 191.33 60.96M207.33 74.99C209.83 74.89 212.33 73.58 214.83 71.23C217.33 68.88 219.83 65.49 222.33 61.5C224.83 57.51 227.33 52.92 229.83 48.31C232.33 43.7 234.83 39.08 237.33 35.04M253.33 21.01C255.83 21.11 258.33 22.42 260.83 24.77C263.33 27.12 265.83 30.51 268.33 34.5C270.83 38.49 273.33 43.08 275.83 47.69C278.33 52.3 280.83 56.92 283.33 60.96" fill="none" stroke="#000" stroke-width="18.5" stroke-linecap="butt"/></mask></defs>
40-<path class="s sa" d="M22 74.94C25.83 75.42 29.67 73 33.5 68.35C37.33 63.7 41.17 56.89 45 49.84C48.83 42.79 52.67 35.58 56.5 30.26C60.33 24.93 64.17 21.55 68 21.06C71.83 20.58 75.67 23 79.5 27.65C83.33 32.3 87.17 39.11 91 46.16C94.83 53.21 98.67 60.42 102.5 65.74C106.33 71.07 110.17 74.45 114 74.94C117.83 75.42 121.67 73 125.5 68.35C129.33 63.7 133.17 56.89 137 49.84C140.83 42.79 144.67 35.58 148.5 30.26C152.33 24.93 156.17 21.55 160 21.06C163.83 20.58 167.67 23 171.5 27.65C175.33 32.3 179.17 39.11 183 46.16C186.83 53.21 190.67 60.42 194.5 65.74C198.33 71.07 202.17 74.45 206 74.94C209.83 75.42 213.67 73 217.5 68.35C221.33 63.7 225.17 56.89 229 49.84C232.83 42.79 236.67 35.58 240.5 30.26C244.33 24.93 248.17 21.55 252 21.06C255.83 20.58 259.67 23 263.5 27.65C267.33 32.3 271.17 39.11 275 46.16C278.83 53.21 282.67 60.42 286.5 65.74C290.33 71.07 294.17 74.45 298 74.94" mask="url(#hero-cut0)" pathLength="1"/>
41-<path class="s sb" d="M22 36.13C25.83 29.78 29.67 24.75 33.5 22.46C37.33 20.17 41.17 20.64 45 23.75C48.83 26.86 52.67 32.56 56.5 39.25C60.33 45.94 64.17 53.52 68 59.87C71.83 66.22 75.67 71.25 79.5 73.54C83.33 75.83 87.17 75.36 91 72.25C94.83 69.14 98.67 63.44 102.5 56.75C106.33 50.06 110.17 42.48 114 36.13C117.83 29.78 121.67 24.75 125.5 22.46C129.33 20.17 133.17 20.64 137 23.75C140.83 26.86 144.67 32.56 148.5 39.25C152.33 45.94 156.17 53.52 160 59.87C163.83 66.22 167.67 71.25 171.5 73.54C175.33 75.83 179.17 75.36 183 72.25C186.83 69.14 190.67 63.44 194.5 56.75C198.33 50.06 202.17 42.48 206 36.13C209.83 29.78 213.67 24.75 217.5 22.46C221.33 20.17 225.17 20.64 229 23.75C232.83 26.86 236.67 32.56 240.5 39.25C244.33 45.94 248.17 53.52 252 59.87C255.83 66.22 259.67 71.25 263.5 73.54C267.33 75.83 271.17 75.36 275 72.25C278.83 69.14 282.67 63.44 286.5 56.75C290.33 50.06 294.17 42.48 298 36.13" mask="url(#hero-cut1)" pathLength="1"/>
42-<path class="s sc" d="M22 32.94C25.83 38.8 29.67 46.26 33.5 53.19C37.33 60.13 41.17 66.46 45 70.41C48.83 74.35 52.67 75.86 56.5 74.5C60.33 73.14 64.17 68.93 68 63.06C71.83 57.2 75.67 49.74 79.5 42.81C83.33 35.87 87.17 29.54 91 25.59C94.83 21.65 98.67 20.14 102.5 21.5C106.33 22.86 110.17 27.07 114 32.94C117.83 38.8 121.67 46.26 125.5 53.19C129.33 60.13 133.17 66.46 137 70.41C140.83 74.35 144.67 75.86 148.5 74.5C152.33 73.14 156.17 68.93 160 63.06C163.83 57.2 167.67 49.74 171.5 42.81C175.33 35.87 179.17 29.54 183 25.59C186.83 21.65 190.67 20.14 194.5 21.5C198.33 22.86 202.17 27.07 206 32.94C209.83 38.8 213.67 46.26 217.5 53.19C221.33 60.13 225.17 66.46 229 70.41C232.83 74.35 236.67 75.86 240.5 74.5C244.33 73.14 248.17 68.93 252 63.06C255.83 57.2 259.67 49.74 263.5 42.81C267.33 35.87 271.17 29.54 275 25.59C278.83 21.65 282.67 20.14 286.5 21.5C290.33 22.86 294.17 27.07 298 32.94" mask="url(#hero-cut2)" pathLength="1"/>
43-</g>
44-<text class="url" x="688" y="66" text-anchor="end">braid.elffuss.com</text>
45-<text class="tag" x="32" y="166">Many agents.</text>
46-<text class="tag" x="32" y="234">One main.</text>
47-<text class="tag" x="32" y="302">No retry loop.</text>
48-<g class="term">
49-<rect x="24" y="338" width="672" height="442" rx="16" fill="#0e0f18" stroke="rgba(21,20,31,.22)"/>
50-<rect x="25" y="360" width="3" height="398" fill="#c8a06a"/>
51-<rect x="28" y="360" width="3" height="398" fill="#54dcc6"/>
52-<rect x="31" y="360" width="3" height="398" fill="#8272ff"/>
53-</g>
54-<text class="ln" x="58" y="382" xml:space="preserve" style="animation-delay: 1.10s"><tspan fill="#7f7ca0"># landing on main is one short step that</tspan></text>
55-<text class="ln" x="58" y="416" xml:space="preserve" style="animation-delay: 1.32s"><tspan fill="#7f7ca0"># they take in turn</tspan></text>
56-<text class="ln" x="58" y="450" xml:space="preserve" style="animation-delay: 1.54s"><tspan fill="#c8a06a">[agent-a]</tspan><tspan fill="#7f7ca0"> $ </tspan><tspan fill="#eae8f2">braid land</tspan></text>
57-<text class="ln" x="58" y="484" xml:space="preserve" style="animation-delay: 1.76s"><tspan fill="#b3afce">Landed 0b042deed1e6 on main (fast-forward)</tspan></text>
58-<text class="ln" x="58" y="518" xml:space="preserve" style="animation-delay: 1.98s"><tspan fill="#54dcc6">[agent-b]</tspan><tspan fill="#7f7ca0"> $ </tspan><tspan fill="#eae8f2">braid land</tspan></text>
59-<text class="ln" x="58" y="552" xml:space="preserve" style="animation-delay: 2.20s"><tspan fill="#b3afce">Landed on main as 4ac41391a609,</tspan></text>
60-<text class="ln" x="58" y="586" xml:space="preserve" style="animation-delay: 2.42s"><tspan fill="#b3afce"> rebased onto 0b042deed1e6</tspan></text>
61-<text class="ln" x="58" y="620" xml:space="preserve" style="animation-delay: 2.64s"><tspan fill="#8272ff">[agent-c]</tspan><tspan fill="#7f7ca0"> $ </tspan><tspan fill="#eae8f2">braid land</tspan></text>
62-<text class="ln" x="58" y="654" xml:space="preserve" style="animation-delay: 2.86s"><tspan fill="#b3afce">fc89c7629ad1 conflicts with main at</tspan></text>
63-<text class="ln" x="58" y="688" xml:space="preserve" style="animation-delay: 3.08s"><tspan fill="#b3afce"> 4ac41391a609; main did not move:</tspan></text>
64-<text class="ln" x="58" y="722" xml:space="preserve" style="animation-delay: 3.30s"><tspan fill="#b3afce"> CONTENT shipping.toml (1 region)</tspan></text>
65-<text class="ln" x="58" y="756" xml:space="preserve" style="animation-delay: 3.52s"><tspan fill="#e779cf">exit status 2</tspan></text>
66-</svg>
deleted docs/assets/how-it-works-tall-dark.svg +0 −35
@@ -1,35 +0,0 @@
1-<!-- SPDX-License-Identifier: Apache-2.0
2- Copyright (c) 2026 UtopiaIA
3- Made by scripts/demos/diagram.py from the site's diagram: edit that, not this. -->
4-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 836" width="360" height="836" role="img" aria-labelledby="dgm-title">
5-<title id="dgm-title">How braid works: workspaces commit in parallel over one shared store, land on main in turn, and git sync sends main to any git remote</title>
6-<style>
7-.band { fill: rgba(22, 23, 38, .62); stroke: rgba(150, 146, 184, .28); }
8-.card { fill: rgb(22, 23, 38); stroke: rgba(150, 146, 184, .28); }
9-.acc-a { fill: #c8a06a; }
10-.acc-b { fill: #54dcc6; }
11-.acc-c { fill: #8272ff; }
12-.lb { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
13-.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
14-.hi { fill: #eae8f2; }
15-.dim { fill: #b3afce; }
16-.muted { fill: #8e8bb0; }
17-.strong { font-weight: 600; }
18-.t-a { fill: #c8a06a; }
19-.t-b { fill: #54dcc6; }
20-.t-c { fill: #8272ff; }
21-.t-x { fill: #e779cf; }
22-.strand { fill: none; stroke-linecap: round; stroke-linejoin: round; }
23-.st-a { stroke: #c8a06a; }
24-.st-b { stroke: #54dcc6; }
25-.st-c { stroke: #8272ff; }
26-.post { fill: #7f7ca0; }
27-.knot { fill: none; stroke: #e779cf; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
28-.loop { fill: none; stroke: #8272ff; stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; }
29-.ar { fill: #b3afce; }
30-.ar-c { fill: #8272ff; }
31-.flow { fill: none; stroke: #b3afce; stroke-width: 2; }
32-.box { fill: rgb(22, 23, 38); stroke: rgba(150, 146, 184, .28); }
33-.ghost { fill: none; stroke: #7f7ca0; stroke-dasharray: 6 6; }
34-</style>
35-<rect class="band" x="1" y="10" width="358" height="214" rx="16"/><text class="lb hi strong" font-size="13"><tspan x="14" y="34">one shared store</tspan></text><text class="lb dim" font-size="12.5"><tspan x="14" y="54">immutable objects named by BLAKE3</tspan><tspan x="14" y="70.25">append-only op log</tspan></text><text class="lb mono dim" font-size="12.5"><tspan x="14" y="100">commit: in parallel</tspan></text><rect class="card" x="8" y="112" width="104" height="100" rx="10"/><rect class="acc-b" x="17" y="124" width="4" height="76" rx="2"/><text class="lb mono hi" font-size="13"><tspan x="29" y="136">workspace</tspan><tspan x="29" y="152.9">b</tspan></text><text class="lb dim" font-size="12"><tspan x="29" y="169">own working</tspan><tspan x="29" y="184.6">copy</tspan><tspan x="29" y="200.2">no index</tspan></text><rect class="card" x="128" y="112" width="104" height="100" rx="10"/><rect class="acc-a" x="137" y="124" width="4" height="76" rx="2"/><text class="lb mono hi" font-size="13"><tspan x="149" y="136">workspace</tspan><tspan x="149" y="152.9">a</tspan></text><text class="lb dim" font-size="12"><tspan x="149" y="169">own working</tspan><tspan x="149" y="184.6">copy</tspan><tspan x="149" y="200.2">no index</tspan></text><rect class="card" x="248" y="112" width="104" height="100" rx="10"/><rect class="acc-c" x="257" y="124" width="4" height="76" rx="2"/><text class="lb mono hi" font-size="13"><tspan x="269" y="136">workspace</tspan><tspan x="269" y="152.9">c</tspan></text><text class="lb dim" font-size="12"><tspan x="269" y="169">own working</tspan><tspan x="269" y="184.6">copy</tspan><tspan x="269" y="200.2">no index</tspan></text><defs><mask id="dt-m-b" maskUnits="userSpaceOnUse" x="0" y="0" width="360" height="836"><rect width="360" height="836" fill="#fff"/><path d="M184.29 512.9C184.2 515.15 183.02 517.4 180.9 519.65C178.79 521.9 175.74 524.15 172.15 526.4C168.56 528.65 164.43 530.9 160.28 533.15C156.13 535.4 151.97 537.65 148.33 539.9" fill="none" stroke="#000" stroke-width="16.65"/><path d="M135.71 554.3C135.8 556.55 136.98 558.8 139.1 561.05C141.21 563.3 144.26 565.55 147.85 567.8C151.44 570.05 155.57 572.3 159.72 574.55C163.87 576.8 168.03 579.05 171.67 581.3" fill="none" stroke="#000" stroke-width="16.65"/><path d="M184.29 595.7C184.2 597.95 183.02 600.2 180.9 602.45C178.79 604.7 175.74 606.95 172.15 609.2C168.56 611.45 164.43 613.7 160.28 615.95C156.13 618.2 151.97 620.45 148.33 622.7" fill="none" stroke="#000" stroke-width="16.65"/></mask><mask id="dt-m-a" maskUnits="userSpaceOnUse" x="0" y="0" width="360" height="836"><rect width="360" height="836" fill="#fff"/><path d="M139.24 506C141.38 508.23 144.43 510.47 148.01 512.7C151.59 514.93 155.7 517.17 159.82 519.4C163.93 521.63 168.06 523.87 171.67 526.1" fill="none" stroke="#000" stroke-width="16.65"/><path d="M184.29 540.5C184.2 542.75 183.02 545 180.9 547.25C178.79 549.5 175.74 551.75 172.15 554C168.56 556.25 164.43 558.5 160.28 560.75C156.13 563 151.97 565.25 148.33 567.5" fill="none" stroke="#000" stroke-width="16.65"/><path d="M135.71 581.9C135.8 584.15 136.98 586.4 139.1 588.65C141.21 590.9 144.26 593.15 147.85 595.4C151.44 597.65 155.57 599.9 159.72 602.15C163.87 604.4 168.03 606.65 171.67 608.9" fill="none" stroke="#000" stroke-width="16.65"/></mask><mask id="dt-m-c" maskUnits="userSpaceOnUse" x="0" y="0" width="360" height="836"><rect width="360" height="836" fill="#fff"/><path d="M135.71 526.7C135.8 528.95 136.98 531.2 139.1 533.45C141.21 535.7 144.26 537.95 147.85 540.2C151.44 542.45 155.57 544.7 159.72 546.95C163.87 549.2 168.03 551.45 171.67 553.7" fill="none" stroke="#000" stroke-width="16.65"/><path d="M184.29 568.1C184.2 570.35 183.02 572.6 180.9 574.85C178.79 577.1 175.74 579.35 172.15 581.6C168.56 583.85 164.43 586.1 160.28 588.35C156.13 590.6 151.97 592.85 148.33 595.1" fill="none" stroke="#000" stroke-width="16.65"/><path d="M135.71 609.5C135.78 611.23 136.48 612.95 137.77 614.67C139.05 616.4 140.91 618.12 143.21 619.85C145.51 621.58 148.25 623.3 151.21 625.02C154.18 626.75 157.37 628.48 160.55 630.2" fill="none" stroke="#000" stroke-width="16.65"/></mask></defs><rect class="post" x="68.72" y="472" width="56" height="8" rx="4"/><rect class="post" x="195.28" y="472" width="56" height="8" rx="4"/><text class="lb hi" font-size="12.5"><tspan x="197.28" y="502">land</tspan><tspan x="197.28" y="518.25">one short step,</tspan><tspan x="197.28" y="534.5">taken in turn</tspan></text><path class="strand st-a" d="M160 212C160 302 160 391 160 481C160 496 152.63 508.35 142.43 516.35C138.04 519.8 135.56 523.25 135.71 526.7C135.85 530.15 138.61 533.6 143.21 537.05C147.81 540.5 154.19 543.95 160.55 547.4C166.91 550.85 173.17 554.3 177.57 557.75C181.96 561.2 184.44 564.65 184.29 568.1C184.15 571.55 181.39 575 176.79 578.45C172.19 581.9 165.81 585.35 159.45 588.8C153.09 592.25 146.83 595.7 142.43 599.15C138.04 602.6 135.56 606.05 135.71 609.5C135.85 612.95 138.61 616.4 143.21 619.85C147.81 623.3 154.19 626.75 160.55 630.2" stroke-width="8.55" mask="url(#dt-m-a)"/><path class="strand st-b" d="M52 212C52 251.33 52 290.67 52 330C52 410 138 390 138 450C138 458.67 138 467.33 138 476C138 486 129.66 496 139.24 506C142.54 509.45 148.07 512.9 154.25 516.35C160.43 519.8 167.19 523.25 172.63 526.7C178.06 530.15 182.1 533.6 183.61 537.05C185.12 540.5 184.07 543.95 180.76 547.4C177.46 550.85 171.93 554.3 165.75 557.75C159.57 561.2 152.81 564.65 147.37 568.1C141.94 571.55 137.9 575 136.39 578.45C134.88 581.9 135.93 585.35 139.24 588.8C142.54 592.25 148.07 595.7 154.25 599.15C160.43 602.6 167.19 606.05 172.63 609.5C178.06 612.95 182.1 616.4 183.61 619.85C185.12 623.3 184.07 626.75 180.76 630.2" stroke-width="8.55" mask="url(#dt-m-b)"/><path class="strand st-c" d="M306 212C306 266.67 306 321.33 306 376C306 446 182 412 182 450C182 458.67 182 467.33 182 476C182 486 172.46 496 181.32 506C184.37 509.45 185.11 512.9 183.32 516.35C181.54 519.8 177.25 523.25 171.67 526.7C166.09 530.15 159.28 533.6 153.18 537.05C147.07 540.5 141.74 543.95 138.68 547.4C135.63 550.85 134.89 554.3 136.68 557.75C138.46 561.2 142.75 564.65 148.33 568.1C153.91 571.55 160.72 575 166.82 578.45C172.93 581.9 178.26 585.35 181.32 588.8C184.37 592.25 185.11 595.7 183.32 599.15C181.54 602.6 177.25 606.05 171.67 609.5C166.09 612.95 159.28 616.4 153.18 619.85C147.07 623.3 141.74 626.75 138.68 630.2" stroke-width="8.55" mask="url(#dt-m-c)"/><text class="lb mono t-b" font-size="12.5"><tspan x="63" y="250">rebased</tspan></text><text class="lb mono t-a" font-size="12.5"><tspan x="172" y="250">fast-forward</tspan></text><path class="knot" d="M306 260 C306 278.2 309.9 297.7 324.2 297.7 C338.5 297.7 338.5 276.9 324.2 276.9 C309.9 276.9 306 295.1 306 312"/><text class="lb t-x" text-anchor="end" font-size="12.5"><tspan x="290" y="290">conflict · exit 2</tspan><tspan x="290" y="306.25">main did not move</tspan></text><path class="loop" d="M337 270C350 256 337 238 336 223"/><path class="ar ar-c" d="M336 215 L339.76 222.06 L332.24 222.06 Z"/><text class="lb mono t-c" text-anchor="end" font-size="12.5"><tspan x="290" y="334">update</tspan><tspan x="290" y="350.25">fix</tspan><tspan x="290" y="366.5">commit</tspan></text><text class="lb mono t-c" text-anchor="end" font-size="12.5"><tspan x="290" y="385.5">fast-forward</tspan></text><text class="lb mono hi" font-size="14"><tspan x="200" y="573.1">main</tspan></text><path class="flow" d="M160 642.2 L160 663.2"/><path class="ar" d="M160 669.2 L156.24 662.14 L163.76 662.14 Z"/><rect class="box" x="30" y="672.2" width="260" height="58" rx="12"/><text class="lb mono hi" font-size="14"><tspan x="46" y="696.2">git sync</tspan></text><text class="lb dim" font-size="12.5"><tspan x="46" y="716.2">any git remote</tspan></text><text class="lb dim" font-size="12.5"><tspan x="32" y="750.2">fast-forward, with a lease</tspan></text><rect class="ghost" x="30" y="768.2" width="260" height="54" rx="12"/><text class="lb muted" font-size="12.5"><tspan x="46" y="791.2">planned:</tspan><tspan x="46" y="807.45">daemon · caches</tspan></text></svg>
deleted docs/assets/how-it-works-tall-light.svg +0 −35
@@ -1,35 +0,0 @@
1-<!-- SPDX-License-Identifier: Apache-2.0
2- Copyright (c) 2026 UtopiaIA
3- Made by scripts/demos/diagram.py from the site's diagram: edit that, not this. -->
4-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 836" width="360" height="836" role="img" aria-labelledby="dgm-title">
5-<title id="dgm-title">How braid works: workspaces commit in parallel over one shared store, land on main in turn, and git sync sends main to any git remote</title>
6-<style>
7-.band { fill: rgba(255, 255, 255, .72); stroke: rgba(21, 20, 31, .22); }
8-.card { fill: #fff; stroke: rgba(21, 20, 31, .22); }
9-.acc-a { fill: #a77a3a; }
10-.acc-b { fill: #13917f; }
11-.acc-c { fill: #5b4ae6; }
12-.lb { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
13-.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
14-.hi { fill: #15141f; }
15-.dim { fill: #3f3c57; }
16-.muted { fill: #5f5b7d; }
17-.strong { font-weight: 600; }
18-.t-a { fill: #7d5a1f; }
19-.t-b { fill: #0b6f61; }
20-.t-c { fill: #4b3bd1; }
21-.t-x { fill: #a2307f; }
22-.strand { fill: none; stroke-linecap: round; stroke-linejoin: round; }
23-.st-a { stroke: #a77a3a; }
24-.st-b { stroke: #13917f; }
25-.st-c { stroke: #5b4ae6; }
26-.post { fill: #5f5b7d; }
27-.knot { fill: none; stroke: #a2307f; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
28-.loop { fill: none; stroke: #5b4ae6; stroke-width: 2; stroke-dasharray: 5 5; stroke-linecap: round; }
29-.ar { fill: #3f3c57; }
30-.ar-c { fill: #5b4ae6; }
31-.flow { fill: none; stroke: #3f3c57; stroke-width: 2; }
32-.box { fill: #fff; stroke: rgba(21, 20, 31, .22); }
33-.ghost { fill: none; stroke: #5f5b7d; stroke-dasharray: 6 6; }
34-</style>
35-<rect class="band" x="1" y="10" width="358" height="214" rx="16"/><text class="lb hi strong" font-size="13"><tspan x="14" y="34">one shared store</tspan></text><text class="lb dim" font-size="12.5"><tspan x="14" y="54">immutable objects named by BLAKE3</tspan><tspan x="14" y="70.25">append-only op log</tspan></text><text class="lb mono dim" font-size="12.5"><tspan x="14" y="100">commit: in parallel</tspan></text><rect class="card" x="8" y="112" width="104" height="100" rx="10"/><rect class="acc-b" x="17" y="124" width="4" height="76" rx="2"/><text class="lb mono hi" font-size="13"><tspan x="29" y="136">workspace</tspan><tspan x="29" y="152.9">b</tspan></text><text class="lb dim" font-size="12"><tspan x="29" y="169">own working</tspan><tspan x="29" y="184.6">copy</tspan><tspan x="29" y="200.2">no index</tspan></text><rect class="card" x="128" y="112" width="104" height="100" rx="10"/><rect class="acc-a" x="137" y="124" width="4" height="76" rx="2"/><text class="lb mono hi" font-size="13"><tspan x="149" y="136">workspace</tspan><tspan x="149" y="152.9">a</tspan></text><text class="lb dim" font-size="12"><tspan x="149" y="169">own working</tspan><tspan x="149" y="184.6">copy</tspan><tspan x="149" y="200.2">no index</tspan></text><rect class="card" x="248" y="112" width="104" height="100" rx="10"/><rect class="acc-c" x="257" y="124" width="4" height="76" rx="2"/><text class="lb mono hi" font-size="13"><tspan x="269" y="136">workspace</tspan><tspan x="269" y="152.9">c</tspan></text><text class="lb dim" font-size="12"><tspan x="269" y="169">own working</tspan><tspan x="269" y="184.6">copy</tspan><tspan x="269" y="200.2">no index</tspan></text><defs><mask id="dt-m-b" maskUnits="userSpaceOnUse" x="0" y="0" width="360" height="836"><rect width="360" height="836" fill="#fff"/><path d="M184.29 512.9C184.2 515.15 183.02 517.4 180.9 519.65C178.79 521.9 175.74 524.15 172.15 526.4C168.56 528.65 164.43 530.9 160.28 533.15C156.13 535.4 151.97 537.65 148.33 539.9" fill="none" stroke="#000" stroke-width="16.65"/><path d="M135.71 554.3C135.8 556.55 136.98 558.8 139.1 561.05C141.21 563.3 144.26 565.55 147.85 567.8C151.44 570.05 155.57 572.3 159.72 574.55C163.87 576.8 168.03 579.05 171.67 581.3" fill="none" stroke="#000" stroke-width="16.65"/><path d="M184.29 595.7C184.2 597.95 183.02 600.2 180.9 602.45C178.79 604.7 175.74 606.95 172.15 609.2C168.56 611.45 164.43 613.7 160.28 615.95C156.13 618.2 151.97 620.45 148.33 622.7" fill="none" stroke="#000" stroke-width="16.65"/></mask><mask id="dt-m-a" maskUnits="userSpaceOnUse" x="0" y="0" width="360" height="836"><rect width="360" height="836" fill="#fff"/><path d="M139.24 506C141.38 508.23 144.43 510.47 148.01 512.7C151.59 514.93 155.7 517.17 159.82 519.4C163.93 521.63 168.06 523.87 171.67 526.1" fill="none" stroke="#000" stroke-width="16.65"/><path d="M184.29 540.5C184.2 542.75 183.02 545 180.9 547.25C178.79 549.5 175.74 551.75 172.15 554C168.56 556.25 164.43 558.5 160.28 560.75C156.13 563 151.97 565.25 148.33 567.5" fill="none" stroke="#000" stroke-width="16.65"/><path d="M135.71 581.9C135.8 584.15 136.98 586.4 139.1 588.65C141.21 590.9 144.26 593.15 147.85 595.4C151.44 597.65 155.57 599.9 159.72 602.15C163.87 604.4 168.03 606.65 171.67 608.9" fill="none" stroke="#000" stroke-width="16.65"/></mask><mask id="dt-m-c" maskUnits="userSpaceOnUse" x="0" y="0" width="360" height="836"><rect width="360" height="836" fill="#fff"/><path d="M135.71 526.7C135.8 528.95 136.98 531.2 139.1 533.45C141.21 535.7 144.26 537.95 147.85 540.2C151.44 542.45 155.57 544.7 159.72 546.95C163.87 549.2 168.03 551.45 171.67 553.7" fill="none" stroke="#000" stroke-width="16.65"/><path d="M184.29 568.1C184.2 570.35 183.02 572.6 180.9 574.85C178.79 577.1 175.74 579.35 172.15 581.6C168.56 583.85 164.43 586.1 160.28 588.35C156.13 590.6 151.97 592.85 148.33 595.1" fill="none" stroke="#000" stroke-width="16.65"/><path d="M135.71 609.5C135.78 611.23 136.48 612.95 137.77 614.67C139.05 616.4 140.91 618.12 143.21 619.85C145.51 621.58 148.25 623.3 151.21 625.02C154.18 626.75 157.37 628.48 160.55 630.2" fill="none" stroke="#000" stroke-width="16.65"/></mask></defs><rect class="post" x="68.72" y="472" width="56" height="8" rx="4"/><rect class="post" x="195.28" y="472" width="56" height="8" rx="4"/><text class="lb hi" font-size="12.5"><tspan x="197.28" y="502">land</tspan><tspan x="197.28" y="518.25">one short step,</tspan><tspan x="197.28" y="534.5">taken in turn</tspan></text><path class="strand st-a" d="M160 212C160 302 160 391 160 481C160 496 152.63 508.35 142.43 516.35C138.04 519.8 135.56 523.25 135.71 526.7C135.85 530.15 138.61 533.6 143.21 537.05C147.81 540.5 154.19 543.95 160.55 547.4C166.91 550.85 173.17 554.3 177.57 557.75C181.96 561.2 184.44 564.65 184.29 568.1C184.15 571.55 181.39 575 176.79 578.45C172.19 581.9 165.81 585.35 159.45 588.8C153.09 592.25 146.83 595.7 142.43 599.15C138.04 602.6 135.56 606.05 135.71 609.5C135.85 612.95 138.61 616.4 143.21 619.85C147.81 623.3 154.19 626.75 160.55 630.2" stroke-width="8.55" mask="url(#dt-m-a)"/><path class="strand st-b" d="M52 212C52 251.33 52 290.67 52 330C52 410 138 390 138 450C138 458.67 138 467.33 138 476C138 486 129.66 496 139.24 506C142.54 509.45 148.07 512.9 154.25 516.35C160.43 519.8 167.19 523.25 172.63 526.7C178.06 530.15 182.1 533.6 183.61 537.05C185.12 540.5 184.07 543.95 180.76 547.4C177.46 550.85 171.93 554.3 165.75 557.75C159.57 561.2 152.81 564.65 147.37 568.1C141.94 571.55 137.9 575 136.39 578.45C134.88 581.9 135.93 585.35 139.24 588.8C142.54 592.25 148.07 595.7 154.25 599.15C160.43 602.6 167.19 606.05 172.63 609.5C178.06 612.95 182.1 616.4 183.61 619.85C185.12 623.3 184.07 626.75 180.76 630.2" stroke-width="8.55" mask="url(#dt-m-b)"/><path class="strand st-c" d="M306 212C306 266.67 306 321.33 306 376C306 446 182 412 182 450C182 458.67 182 467.33 182 476C182 486 172.46 496 181.32 506C184.37 509.45 185.11 512.9 183.32 516.35C181.54 519.8 177.25 523.25 171.67 526.7C166.09 530.15 159.28 533.6 153.18 537.05C147.07 540.5 141.74 543.95 138.68 547.4C135.63 550.85 134.89 554.3 136.68 557.75C138.46 561.2 142.75 564.65 148.33 568.1C153.91 571.55 160.72 575 166.82 578.45C172.93 581.9 178.26 585.35 181.32 588.8C184.37 592.25 185.11 595.7 183.32 599.15C181.54 602.6 177.25 606.05 171.67 609.5C166.09 612.95 159.28 616.4 153.18 619.85C147.07 623.3 141.74 626.75 138.68 630.2" stroke-width="8.55" mask="url(#dt-m-c)"/><text class="lb mono t-b" font-size="12.5"><tspan x="63" y="250">rebased</tspan></text><text class="lb mono t-a" font-size="12.5"><tspan x="172" y="250">fast-forward</tspan></text><path class="knot" d="M306 260 C306 278.2 309.9 297.7 324.2 297.7 C338.5 297.7 338.5 276.9 324.2 276.9 C309.9 276.9 306 295.1 306 312"/><text class="lb t-x" text-anchor="end" font-size="12.5"><tspan x="290" y="290">conflict · exit 2</tspan><tspan x="290" y="306.25">main did not move</tspan></text><path class="loop" d="M337 270C350 256 337 238 336 223"/><path class="ar ar-c" d="M336 215 L339.76 222.06 L332.24 222.06 Z"/><text class="lb mono t-c" text-anchor="end" font-size="12.5"><tspan x="290" y="334">update</tspan><tspan x="290" y="350.25">fix</tspan><tspan x="290" y="366.5">commit</tspan></text><text class="lb mono t-c" text-anchor="end" font-size="12.5"><tspan x="290" y="385.5">fast-forward</tspan></text><text class="lb mono hi" font-size="14"><tspan x="200" y="573.1">main</tspan></text><path class="flow" d="M160 642.2 L160 663.2"/><path class="ar" d="M160 669.2 L156.24 662.14 L163.76 662.14 Z"/><rect class="box" x="30" y="672.2" width="260" height="58" rx="12"/><text class="lb mono hi" font-size="14"><tspan x="46" y="696.2">git sync</tspan></text><text class="lb dim" font-size="12.5"><tspan x="46" y="716.2">any git remote</tspan></text><text class="lb dim" font-size="12.5"><tspan x="32" y="750.2">fast-forward, with a lease</tspan></text><rect class="ghost" x="30" y="768.2" width="260" height="54" rx="12"/><text class="lb muted" font-size="12.5"><tspan x="46" y="791.2">planned:</tspan><tspan x="46" y="807.45">daemon · caches</tspan></text></svg>
modified scripts/demos/diagram.py +30 −29
@@ -1,11 +1,16 @@
11 #!/usr/bin/env python3
22 # SPDX-License-Identifier: Apache-2.0
33 # Copyright (c) 2026 UtopiaIA
4-"""Exports the site's "How it works" diagram for the README, in English, as
5-standalone SVGs: wide, and tall for narrow screens, each dark and light.
4+"""Exports the site's wide "How it works" diagram for the README, in
5+English, as standalone SVGs, dark and light.
66
77 usage: diagram.py <site/index.html> <site/site.css> <out dir>
88
9+The site's tall diagram, for narrow screens, stays on the site: for a
10+reader who has chosen a theme, GitHub rewrites the colour-scheme media
11+queries of a README's <picture>, and a source that also tests the screen's
12+width then shows on wide screens too.
13+
914 The site's diagram tells the scene of crates/cli/tests/three_agents.rs, where
1015 c lands as a fast-forward, a is rebased with 1 path merged, and b conflicts.
1116 The README tells the scene of docs/assets/demo-agents.gif and of its quick
@@ -24,7 +29,7 @@
2429
2530 SITE, CSS, OUT = sys.argv[1:4]
2631 ROUND = {"a": "b", "b": "c", "c": "a"}
27-SIZES = {"wide": (1000, 408), "tall": (360, 836)}
32+WIDTH, HEIGHT = 1000, 408
2833 TITLE = ("How braid works: workspaces commit in parallel over one shared store, "
2934 "land on main in turn, and git sync sends main to any git remote")
3035
@@ -71,38 +76,34 @@
7176 svg, n = re.subn(r"(>workspace(?: |</tspan><tspan [^>]*>))([abc])<",
7277 lambda m: f"{m[1]}{ROUND[m[2]]}<", svg)
7378 assert n == 3, n
74- svg, wide = re.subn(r">rebased · 1 path merged<", ">rebased<", svg)
75- svg, tall = re.subn(r"<tspan [^>]*>1 path</tspan><tspan [^>]*>merged</tspan>", "", svg)
76- assert wide + tall == 1, (wide, tall)
79+ svg, n = re.subn(r">rebased · 1 path merged<", ">rebased<", svg)
80+ assert n == 1, n
7781 return svg
7882
7983
8084 def main():
8185 html = open(SITE, encoding="utf-8").read()
8286 css = open(CSS, encoding="utf-8").read()
83- themes = tokens(css)
84- for shape, (width, height) in SIZES.items():
85- svg = re.search(rf'<svg class="dgm dgm-{shape}".*?</svg>', html, re.S).group(0)
86- svg = relabel(english(svg))
87- svg, n = re.subn(r"^<svg [^>]*>", "", svg)
88- assert n == 1
89- used = set(re.findall(r'class="([^"]+)"', svg))
90- used = {c for group in used for c in group.split()}
91- suffix = "" if shape == "wide" else "-tall"
92- for theme, values in themes.items():
93- out = (
94- "<!-- SPDX-License-Identifier: Apache-2.0\n Copyright (c) 2026 UtopiaIA\n"
95- " Made by scripts/demos/diagram.py from the site's diagram: edit that, not this. -->\n"
96- f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {width} {height}" '
97- f'width="{width}" height="{height}" role="img" aria-labelledby="dgm-title">\n'
98- f'<title id="dgm-title">{TITLE}</title>\n'
99- f"<style>\n{rules(css, values, used)}\n</style>\n"
100- f"{svg}\n"
101- )
102- name = os.path.join(OUT, f"how-it-works{suffix}-{theme}.svg")
103- with open(name, "w", encoding="utf-8") as f:
104- f.write(out)
105- print(name, len(out.encode()), "bytes")
87+ svg = re.search(r'<svg class="dgm dgm-wide".*?</svg>', html, re.S).group(0)
88+ svg = relabel(english(svg))
89+ svg, n = re.subn(r"^<svg [^>]*>", "", svg)
90+ assert n == 1
91+ used = set(re.findall(r'class="([^"]+)"', svg))
92+ used = {c for group in used for c in group.split()}
93+ for theme, values in tokens(css).items():
94+ out = (
95+ "<!-- SPDX-License-Identifier: Apache-2.0\n Copyright (c) 2026 UtopiaIA\n"
96+ " Made by scripts/demos/diagram.py from the site's diagram: edit that, not this. -->\n"
97+ f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {WIDTH} {HEIGHT}" '
98+ f'width="{WIDTH}" height="{HEIGHT}" role="img" aria-labelledby="dgm-title">\n'
99+ f'<title id="dgm-title">{TITLE}</title>\n'
100+ f"<style>\n{rules(css, values, used)}\n</style>\n"
101+ f"{svg}\n"
102+ )
103+ name = os.path.join(OUT, f"how-it-works-{theme}.svg")
104+ with open(name, "w", encoding="utf-8") as f:
105+ f.write(out)
106+ print(name, len(out.encode()), "bytes")
106107
107108
108109 main()
modified scripts/demos/hero.py +42 −69
@@ -14,11 +14,11 @@
1414 whose story changed stops it, rather than giving a banner that no longer
1515 matches.
1616
17-It writes, each one a final frame that CSS animates in once where the
18-reader allows motion:
19-
20- hero-dark.svg, hero-light.svg 1280 wide
21- hero-phone-dark.svg, hero-phone-light.svg 720 wide, for narrow screens
17+It writes hero-dark.svg and hero-light.svg, 1280 wide, each a final frame
18+that CSS animates in once where the reader allows motion. There is no
19+narrow variant: for a reader who has chosen a theme, GitHub rewrites the
20+colour-scheme media queries of a README's <picture>, and a source that
21+also tests the screen's width then shows on wide screens too.
2222
2323 The terminal stays dark in both themes, as on the site. No scripts, no
2424 external fonts or images: GitHub shows these files through <img>.
@@ -28,7 +28,6 @@
2828 import os
2929 import re
3030 import sys
31-import textwrap
3231
3332 SITE, SOURCE, OUT = sys.argv[1:4]
3433
@@ -62,16 +61,15 @@
6261 TERM = {"bg": "#0e0f18", "text": "#eae8f2", "dim": "#b3afce", "muted": "#7f7ca0",
6362 "exit": "#e779cf", "agent-a": "#c8a06a", "agent-b": "#54dcc6", "agent-c": "#8272ff"}
6463
65-# Each layout: canvas width, side margin, logo scale and place, the URL, the
66-# tagline (font size, baselines, one line or three), and the terminal (top,
67-# font size, line height, and the column a line wraps at; 0 for none).
68-LAYOUTS = {
69- "": dict(width=1280, margin=48, logo=(.75, 24), url=(22, 70),
70- tagline=(50, [158], False), term=(194, 24, 35, 0)),
71- "-phone": dict(width=720, margin=32, logo=(.7, 24), url=(20, 66),
72- tagline=(58, [166, 234, 302], True), term=(338, 24, 34, 42)),
73-}
74-TAGLINE = ["Many agents.", "One main.", "No retry loop."]
64+# The canvas and its side margin, the logo's scale and top, the font size
65+# and baseline of the URL and of the tagline, and the terminal's top, font
66+# size and line height.
67+WIDTH, MARGIN = 1280, 48
68+LOGO_SCALE, LOGO_TOP = .75, 24
69+URL_SIZE, URL_BASE = 22, 70
70+TAG_SIZE, TAG_BASE = 50, 158
71+TERM_TOP, SIZE, STEP = 194, 24, 35
72+TAGLINE = "Many agents. One main. No retry loop."
7573
7674
7775 def transcript(path):
@@ -101,21 +99,6 @@
10199 return lines
102100
103101
104-def wrap(line, width):
105- """Breaks a line at word boundaries, after a comma or a semicolon when
106- one comes early enough; a comment goes on as a comment, the rest two
107- spaces in."""
108- if not width or len(line) <= width:
109- return [line]
110- if line.startswith("# "):
111- return ["# " + part for part in textwrap.wrap(line[2:], width - 2)]
112- cut = max(line.rfind(", ", 0, width), line.rfind("; ", 0, width))
113- if cut > 0:
114- return [line[:cut + 1]] + wrap(" " + line[cut + 2:], width)
115- return textwrap.wrap(line, width, subsequent_indent=" ",
116- break_long_words=False, break_on_hyphens=False)
117-
118-
119102 def colours(line):
120103 """The coloured runs of one line: a prompt, a note, the exit status or
121104 braid's output."""
@@ -141,27 +124,20 @@
141124 return defs, paths
142125
143126
144-def build(theme, layout, lines, defs, paths):
145- t, L = THEMES[theme], LAYOUTS[layout]
146- width, margin = L["width"], L["margin"]
147- scale, logo_top = L["logo"]
148- url_size, url_base = L["url"]
149- tag_size, tag_bases, stacked = L["tagline"]
150- term_top, size, step, columns = L["term"]
151-
152- shown = [part for line in lines for part in wrap(line, columns)]
153- first = term_top + 44
154- term_h = 44 + step * (len(shown) - 1) + 24
155- height = term_top + term_h + (40 if not layout else 28)
156- term_x, term_w = margin - (0 if not layout else 8), width - 2 * margin + (0 if not layout else 16)
127+def build(theme, lines, defs, paths):
128+ t = THEMES[theme]
129+ first = TERM_TOP + 44
130+ term_h = 44 + STEP * (len(lines) - 1) + 24
131+ height = TERM_TOP + term_h + 40
132+ term_x, term_w = MARGIN, WIDTH - 2 * MARGIN
157133 text_x = term_x + 34
158134
159135 out = []
160136 w = out.append
161137 w("<!-- SPDX-License-Identifier: Apache-2.0\n Copyright (c) 2026 UtopiaIA\n"
162138 " Made by scripts/demos/hero.py from the agents recording: edit that, not this. -->")
163- w(f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {width} {height}" '
164- f'width="{width}" height="{height}" role="img" aria-labelledby="hero-title hero-desc">')
139+ w(f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {WIDTH} {height}" '
140+ f'width="{WIDTH}" height="{height}" role="img" aria-labelledby="hero-title hero-desc">')
165141 w("<title id=\"hero-title\">Elffuss Braid: Many agents. One main. No retry loop.</title>")
166142 w("<desc id=\"hero-desc\">Three agents land on main in turn: agent-a as a fast-forward, "
167143 "agent-b rebased onto it, and agent-c with a conflict, so main did not move and braid "
@@ -171,10 +147,10 @@
171147 w(f".s {{ fill: none; stroke-width: 9.5; stroke-linecap: round; stroke-linejoin: round; "
172148 f"stroke-dasharray: 1 2; stroke-dashoffset: 0; }}")
173149 w(f".sa {{ stroke: {sa}; }} .sb {{ stroke: {sb}; }} .sc {{ stroke: {sc}; }}")
174- w(f".tag {{ font-family: {SERIF}; font-size: {tag_size}px; font-weight: 600; "
150+ w(f".tag {{ font-family: {SERIF}; font-size: {TAG_SIZE}px; font-weight: 600; "
175151 f"letter-spacing: -0.3px; fill: {t['tagline']}; }}")
176- w(f".url {{ font-family: {MONO}; font-size: {url_size}px; letter-spacing: 1px; fill: {t['url']}; }}")
177- w(f".ln {{ font-family: {MONO}; font-size: {size}px; white-space: pre; }}")
152+ w(f".url {{ font-family: {MONO}; font-size: {URL_SIZE}px; letter-spacing: 1px; fill: {t['url']}; }}")
153+ w(f".ln {{ font-family: {MONO}; font-size: {SIZE}px; white-space: pre; }}")
178154 w("/* plays once, then holds: the last frame is the file as written */")
179155 w("@media (prefers-reduced-motion: no-preference) {")
180156 w(" .s { animation: draw 1.5s cubic-bezier(.22, .61, .36, 1) both; }")
@@ -189,41 +165,39 @@
189165 w("</style>")
190166
191167 w("<defs>")
192- w(f'<clipPath id="hero-card"><rect width="{width}" height="{height}" rx="24"/></clipPath>')
168+ w(f'<clipPath id="hero-card"><rect width="{WIDTH}" height="{height}" rx="24"/></clipPath>')
193169 for i, (colour, opacity, cx, cy, r) in enumerate(t["glows"]):
194170 w(f'<radialGradient id="hero-glow{i}" cx="{cx}" cy="{cy}" r="{r}">'
195171 f'<stop offset="0" stop-color="{colour}" stop-opacity="{opacity}"/>'
196172 f'<stop offset="1" stop-color="{colour}" stop-opacity="0"/></radialGradient>')
197173 w("</defs>")
198174 w('<g clip-path="url(#hero-card)">')
199- w(f'<rect width="{width}" height="{height}" fill="{t["ground"]}"/>')
175+ w(f'<rect width="{WIDTH}" height="{height}" fill="{t["ground"]}"/>')
200176 for i in range(len(t["glows"])):
201- w(f'<rect width="{width}" height="{height}" fill="url(#hero-glow{i})"/>')
177+ w(f'<rect width="{WIDTH}" height="{height}" fill="url(#hero-glow{i})"/>')
202178 w("</g>")
203- w(f'<rect x=".5" y=".5" width="{width - 1}" height="{height - 1}" rx="23.5" fill="none" '
179+ w(f'<rect x=".5" y=".5" width="{WIDTH - 1}" height="{height - 1}" rx="23.5" fill="none" '
204180 f'stroke="{t["edge"]}"/>')
205181
206182 # The logo's strands start 17 units in, counting their round caps.
207- w(f'<g transform="translate({margin - 17 * scale:.2f} {logo_top}) scale({scale})">')
183+ w(f'<g transform="translate({MARGIN - 17 * LOGO_SCALE:.2f} {LOGO_TOP}) scale({LOGO_SCALE})">')
208184 w(defs)
209185 w(paths)
210186 w("</g>")
211- w(f'<text class="url" x="{width - margin}" y="{url_base}" text-anchor="end">braid.elffuss.com</text>')
212- words = TAGLINE if stacked else [" ".join(TAGLINE)]
213- for base, text in zip(tag_bases, words):
214- w(f'<text class="tag" x="{margin}" y="{base}">{html.escape(text)}</text>')
187+ w(f'<text class="url" x="{WIDTH - MARGIN}" y="{URL_BASE}" text-anchor="end">braid.elffuss.com</text>')
188+ w(f'<text class="tag" x="{MARGIN}" y="{TAG_BASE}">{html.escape(TAGLINE)}</text>')
215189
216190 w('<g class="term">')
217- w(f'<rect x="{term_x}" y="{term_top}" width="{term_w}" height="{term_h}" rx="16" '
191+ w(f'<rect x="{term_x}" y="{TERM_TOP}" width="{term_w}" height="{term_h}" rx="16" '
218192 f'fill="{TERM["bg"]}" stroke="{t["term_edge"]}"/>')
219193 for i, colour in enumerate((TERM["agent-a"], TERM["agent-b"], TERM["agent-c"])):
220- w(f'<rect x="{term_x + 1 + 3 * i}" y="{term_top + 22}" width="3" height="{term_h - 44}" '
194+ w(f'<rect x="{term_x + 1 + 3 * i}" y="{TERM_TOP + 22}" width="3" height="{term_h - 44}" '
221195 f'fill="{colour}"/>')
222196 w("</g>")
223- for i, line in enumerate(shown):
197+ for i, line in enumerate(lines):
224198 runs = "".join(f'<tspan fill="{TERM[c]}">{html.escape(s, quote=False)}</tspan>'
225199 for s, c in colours(line))
226- w(f'<text class="ln" x="{text_x}" y="{first + i * step}" xml:space="preserve" '
200+ w(f'<text class="ln" x="{text_x}" y="{first + i * STEP}" xml:space="preserve" '
227201 f'style="animation-delay: {1.1 + .22 * i:.2f}s">{runs}</text>')
228202 w("</svg>")
229203 return "\n".join(out) + "\n"
@@ -232,13 +206,12 @@
232206 def main():
233207 lines = transcript(SOURCE)
234208 defs, paths = logo_parts()
235- for layout in LAYOUTS:
236- for theme in THEMES:
237- name = os.path.join(OUT, f"hero{layout}-{theme}.svg")
238- svg = build(theme, layout, lines, defs, paths)
239- with open(name, "w", encoding="utf-8") as f:
240- f.write(svg)
241- print(name, len(svg.encode()), "bytes")
209+ for theme in THEMES:
210+ name = os.path.join(OUT, f"hero-{theme}.svg")
211+ svg = build(theme, lines, defs, paths)
212+ with open(name, "w", encoding="utf-8") as f:
213+ f.write(svg)
214+ print(name, len(svg.encode()), "bytes")
242215
243216
244217 main()