@ultimat3/cli 31.47.1 → 31.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/package.json +29 -29
  2. package/src/cmd-drill.ts +20 -1
  3. package/src/cmd-heavy-spec.ts +28 -0
  4. package/src/cmd-heavy.ts +160 -0
  5. package/src/cmd-test.ts +13 -3
  6. package/src/cmd-upgrade.ts +17 -4
  7. package/src/codemods/docs-many-agents.ts +30 -0
  8. package/src/codemods/index.ts +2 -0
  9. package/src/doctor-advisory-floors.ts +30 -8
  10. package/src/error-codes-tooling.ts +9 -3
  11. package/src/exec.ts +11 -3
  12. package/src/heavy-cores.ts +51 -0
  13. package/src/heavy-env.ts +19 -0
  14. package/src/heavy-errors.ts +36 -0
  15. package/src/heavy-flock.ts +73 -0
  16. package/src/heavy-ledger.ts +358 -0
  17. package/src/heavy-memory.ts +67 -0
  18. package/src/heavy-weights.ts +47 -0
  19. package/src/heavy.ts +290 -0
  20. package/src/local-cli.ts +6 -5
  21. package/src/mcp-errors.ts +3 -0
  22. package/src/messages.ts +11 -0
  23. package/src/registry.ts +2 -0
  24. package/src/role-replicator.ts +5 -3
  25. package/src/runtime-cache.ts +24 -3
  26. package/src/runtime-overrides.ts +4 -2
  27. package/src/templates/guard-released-forms.ts +5 -5
  28. package/src/templates/scaffold-claude-agents.ts +9 -6
  29. package/src/templates/scaffold-claude-commands.ts +1 -1
  30. package/src/templates/scaffold-docs.ts +5 -4
  31. package/src/test-batches.ts +9 -3
  32. package/src/test-shards.ts +3 -3
  33. package/src/test-slots.ts +35 -161
  34. package/src/verify-checks.ts +4 -3
  35. package/src/verify-coverage-run.ts +5 -4
  36. package/src/verify-deadline.ts +18 -2
  37. package/src/verify-heavy-steps.ts +26 -0
  38. package/src/verify-test-run.ts +3 -2
  39. package/src/verify-tests.ts +27 -20
  40. package/wiki/Building-Your-Own-Base.md +15 -2
  41. package/wiki/CI-Parallel-Gate.md +2 -3
  42. package/wiki/CLI-Reference.md +24 -12
  43. package/wiki/Caching-And-Invalidation.md +1 -1
  44. package/wiki/Configuration.md +22 -4
  45. package/wiki/Home.md +1 -0
  46. package/wiki/Interface-Rules.md +1 -1
  47. package/wiki/Known-Gaps.md +1 -1
  48. package/wiki/Mail.md +1 -1
  49. package/wiki/Many-Agents.md +60 -0
  50. package/wiki/Testing.md +5 -5
  51. package/wiki/Tutorial-01-First-App.md +2 -2
@@ -231,14 +231,31 @@ its config into a variable first.
231
231
  | ~~`cache.driver`~~ | — | — | **Deleted in 9.0.0.** Refused at boot since 25.0.0 (`X_CONFIG_INVALID`, naming the replacement). It was the second way to ask for Redis and the losing one: the ladder is built from `cache.tiers`, so `driver: 'redis'` beside `tiers: ['request-memo', 'lru']` asked for a rung nothing built. Name `redis` in `tiers` |
232
232
  | ~~`cache.urlEnv`~~ | — | — | **Deleted in 9.0.0** and refused at boot since 25.0.0, `database.urlEnv`'s defect verbatim: the Redis tier reads the literal `REDIS_URL`, so `urlEnv: 'MY_REDIS'` made nothing read `MY_REDIS` |
233
233
 
234
- **The per-tier byte caps and TTLs are constructor options, not config** — the same shape as the realtime caps above. `cache.memo.maxBytes`, `cache.lru.maxBytes`, `cache.redis.*` and `cache.ttl.*` are not fields and never were; writing one is `TS2353`, excess property on `Input<CacheConfig>`, and `X_CONFIG_INVALID` at boot.
234
+ **A rung's limits are constructor options, set in `runtime.ts`, never config** `As of 2026-11`. The boot builds `lru` and `redis` with their defaults; `cacheTiers` replaces the rung of the same name, and that is the one way to change a limit:
235
+
236
+ ```ts
237
+ // apps/web/runtime.ts — `cache.tiers` still decides which rungs exist
238
+ import { lruTier, redisTier } from '@ultimat3/cache';
239
+
240
+ export const runtime = {
241
+ cacheTiers: [
242
+ lruTier({ maxBytes: 128 * 1024 * 1024 }),
243
+ redisTier({ maxValueBytes: 2 * 1024 * 1024, jitterFraction: 0.1 }),
244
+ ],
245
+ };
246
+ ```
247
+
248
+ `cache.memo.maxBytes`, `cache.lru.maxBytes`, `cache.redis.*` and `cache.ttl.*` are not fields and never were: writing one is `TS2353`, excess property on `Input<CacheConfig>`, and `X_CONFIG_INVALID` at boot. A bad value is refused where the tier is built (`X_CACHE_LIMIT_INVALID`, `X_CACHE_JITTER_INVALID`). There is no entry-count limit: both rungs are bounded in bytes.
249
+
250
+ A supplied `redisTier` with no `client` uses core's client: `REDIS_URL`, then `VALKEY_URL`, then `redis://localhost:6379`. The refusal the boot's own `redis` rung gets for an unset URL does not apply to it; the boot logs `cache.tier.default-redis` instead.
235
251
 
236
252
  | Option | Where | Default | Effect |
237
253
  |---|---|---|---|
238
254
  | `maxBytes` | `lruTier({ … })` | 64 MiB | byte budget for the whole tier; a single value over it is `X_CACHE_TOO_LARGE` rather than a silent drop |
239
- | `defaultTtlMs` | same | `60_000` | applied when a `set` omits `ttlMs` |
240
- | `jitterFraction` | same | `DEFAULT_TTL_JITTER_FRACTION` | TTL spread in `[0, 1)`; `0` disables it, which is how a stampede is reproduced in a test |
241
- | `clock` / `rng` | same | system | injected so a jittered expiry is deterministic |
255
+ | `maxValueBytes` | `redisTier({ … })` | 1 MiB | the largest encoded value one `set` may write; over it is `X_CACHE_TOO_LARGE` |
256
+ | `defaultTtlMs` | `lruTier({ … })` | `60_000` | applied when a `set` omits `ttlMs` |
257
+ | `jitterFraction` | `lruTier({ … })`, `redisTier({ … })` | `DEFAULT_TTL_JITTER_FRACTION` | TTL spread in `[0, 1)`; `0` disables it, which is how a stampede is reproduced in a test |
258
+ | `clock` / `rng` | `lruTier({ … })`, `redisTier({ … })` | system | injected so a jittered expiry is deterministic |
242
259
  | `loadDeadlineMs` | `cacheStack(tiers, { … })` | `30_000` | how long one `load()` may hold its key before a later reader starts its own. Frees the KEY, never the load — the wedged call runs on. Anchored to `http`'s own request timeout: a load still running at 30 s has no reader left to serve |
243
260
  | `schedule` | same | `setTimeout` | injected so the deadline above is provable without a test waiting one out |
244
261
 
@@ -526,6 +543,7 @@ mail: { retainMime: { maxBytes: 262_144 } },
526
543
  | `SES_CONFIGURATION_SET` | — | SES only, optional: the configuration set that publishes delivery events |
527
544
  | `MAIL_FROM` | — | required by SMTP, Resend and SES; the memory and unconfigured drivers do not read it. `Name <addr>`; also the envelope sender and the `Message-ID` domain |
528
545
  | `MAIL_POOL_SIZE` | — | SMTP connections open at once. Default `4`, whole number ≥ 1 |
546
+ | `MAIL_TIMEOUT_MS` | — | SMTP only: the deadline for any single read or write. Default `30000`, whole number from 1 to 2147483647 (the most a timer holds); anything else is `X_CONFIG_INVALID` at boot |
529
547
 
530
548
  The list is `MAIL_ENV_KEYS` in `packages/mail/src/driver-env.ts`, `As of 2026-10`. More than one of
531
549
  `SMTP_URL`, `RESEND_API_KEY` and `SES_REGION` is `X_CONFIG_INVALID`: a process delivers through
package/wiki/Home.md CHANGED
@@ -91,6 +91,7 @@ Follow in order. Each page states what it was executed against in its own first
91
91
  | [Client navigation](Client-Navigation) | soft navigation over server-rendered pages: one config line per surface, swap, prefetch, history, focus |
92
92
  | [MCP and AI](MCP-And-AI) | the dev MCP server, every action as a tool, the `llm()` gateway, evals |
93
93
  | [Agents](Agents) | `agent()` as an action factory, tools as real actions, `hive()`, `agentJob()`, and the at-least-once trap |
94
+ | [Working with many agents](Many-Agents) | a worker runs its own files, the coordinator runs the gate once; the machine's memory ledger and core cap |
94
95
  | [Admin dashboard](Admin-Dashboard) | `defineAdmin()` serving list, detail and form per entity with no host code; filters, scopes, sections, related rows, actions with `when` and `batch`, the audit log, the jobs dashboard; zero JavaScript; its MCP surface |
95
96
  | [Scraping](Scraping) | `scrape()` as a job factory, the driver-blind page vocabulary, robots and host gates, per-run egress, a rented CDP browser, usage, sealed sessions, mid-run prompts |
96
97
  | [Auth](Auth) | sessions, OAuth, MFA, API keys and service tokens — the output is an `Actor` |
@@ -346,7 +346,7 @@ Read as a review checklist. Each one is a defect on sight.
346
346
  | live regions and the focus trap | `packages/ui/src/a11y.ts` |
347
347
  | the toast queue's rules | `packages/ui/src/toast/toast-state.ts` |
348
348
  | a list's URL state (sort, cursor, limit, `q`) | `packages/ui/src/list-url.ts` |
349
- | your app's guards | `guards/` in the app root — `x new` writes every name in `SHIPPED_GUARD_NAMES`, `x g guard <name>` adds one, `x doctor` lists the shipped ones missing |
349
+ | your app's guards | `guards/` in the app root — `x new` writes only `guards/shipped.json`, `x g guard <name>` adds one of your own, `x doctor` lists any copy of a shipped guard still held |
350
350
 
351
351
  Components, props and token vocabulary: [UI components](UI-Components). Colour roles and the
352
352
  contrast table: [Theming](Theming). Seeing a component in a state you cannot click to:
@@ -83,7 +83,7 @@ Each of these is a defect, or a target, somebody has already argued about, and t
83
83
  | Retry-from-step on the jobs dashboard is a free-text field | `As of 2026-10`. `job.retry-from-step` takes `{ step: t.string.min(1) }` (`packages/admin/src/jobs/job-actions.ts`); the run's detail page shows its steps, but the form does not offer them as a choice. **Why it stays** (`As of 2026-11-18`): An action's `input` is one static schema shared by the form, the MCP tool and the audit entry, so it has no per-row list of choices to offer. **Do instead:** copy the step name from the run's `steps` section on the same page. |
84
84
  | The admin MCP batch tool takes `ids` only | `As of 2026-10`. A `batch` action is one MCP tool, `admin.action.<name>`, and it takes the rows by id; "all matching" — the list's own filter — is a screen control only. **Why it stays** (`As of 2026-11-18`): An agent names every row it changes, so the per-row gate and the `<entity>:<n> rows` confirmation state a set it chose. "All matching" stays a control a person reads the list beside. **Do instead:** list the rows with `admin.<entity>.list` and its `where`, then pass their ids. |
85
85
  | No counts on the jobs dashboard's state tabs | `As of 2026-10`. `stats()` counts per queue across every tenant, so a count on a tab would show an org-scoped operator other orgs' numbers; the tabs carry none and the overview's tiles carry the counts, for a platform operator only. A per-tenant count is a second query nothing issues yet. **Why it stays** (`As of 2026-11-18`): A per-tenant count per tab is one more read per state on every page view, over a column with no leading index (the org-scoped runs-list row). **Do instead:** a platform operator reads the overview tiles; an org-scoped operator reads a tab's own page. |
86
- | `x drill` proves one node per role on one machine, and drills no object store and no CDN | `As of 2026-11-06`. The fleet is one `web`, one `worker` (and one `sync` for `nats-down`) on one host, every dependency a local container behind a Bun TCP proxy: a multi-node NATS cluster, a Postgres failover to a real standby, a real S3 bucket and a real CDN in front of the web role are never faulted. `nats-down`'s sync lane is proven on a stand-in node (`packages/testing/src/drill-sync.test.ts`), not on `examples/dummy`, whose transport is in-memory; its client subscribes to nothing by default, so a gap counts only what the node volunteers. CI runs four of the nine (`fault-drills`, `roll-before-migrate` among them) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/testing/src/drills.test.ts#the%20nine%20drills%2C%20once%20each) **Why it stays** (`As of 2026-11-18`): A drill runs where a CI runner or one machine can hold the whole fleet. A real standby, bucket or CDN is a staging environment, which is the app's. **Do instead:** the rest by hand: `x drill --list --json`, then `x drill <name> --json` with `docker/test-services.env` loaded. A multi-node or object-store fault is a staging drill of your own, against [`docs/ops/06-runbooks.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/06-runbooks.md) |
86
+ | `x drill` proves one node per role on one machine, and drills no object store and no CDN | `As of 2026-11-06`. The fleet is one `web`, one `worker` (one `sync` for `nats-down`, and one of every role for `roll-before-migrate`) on one host, every dependency a local container behind a Bun TCP proxy: a multi-node NATS cluster, a Postgres failover to a real standby, a real S3 bucket and a real CDN in front of the web role are never faulted. `nats-down`'s sync lane is proven on a stand-in node (`packages/testing/src/drill-sync.test.ts`), not on `examples/dummy`, whose transport is in-memory; its client subscribes to nothing by default, so a gap counts only what the node volunteers. CI runs four of the nine (`fault-drills`, `roll-before-migrate` among them) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/testing/src/drills.test.ts#the%20nine%20drills%2C%20once%20each) **Why it stays** (`As of 2026-11-18`): A drill runs where a CI runner or one machine can hold the whole fleet. A real standby, bucket or CDN is a staging environment, which is the app's. **Do instead:** the rest by hand: `x drill --list --json`, then `x drill <name> --json` with `docker/test-services.env` loaded. A multi-node or object-store fault is a staging drill of your own, against [`docs/ops/06-runbooks.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/06-runbooks.md) |
87
87
  | `x cache`'s `stats` | removed from the registry `As of 2026-11-15`, where it was planned and exited `X_NOT_IMPLEMENTED`; now `X_CLI_UNKNOWN_COMMAND`, exit 1 as before. A hit rate is `cache.hit`/`cache.miss` on each serving process's instrumentation bus (`packages/cache/src/tiers.ts`), and no process aggregates them: the `/_x` cache panel shows the tag graph and the invalidation log, not hits. The route is a counter on each role's `/metrics`, read by whatever scrapes it; a CLI process has served nothing to count |
88
88
  | `x status` for sync, scheduler and replicator | `As of 2026-11-15`, `x status` reads every live worker's build from `x_job_workers` and samples each `--url` origin's `/readyz` for `x-ultimate-build`. No fleet-wide record exists for the other roles: a sync node keeps its connected clients' builds in its own memory (the `/_x` live panel in `x dev`), and the scheduler and replicator write no row. Each answers `/readyz` on its health port, so `x status --url http://<pod>:9091` reads one pod; the build-ID distribution of connected clients needs an aggregate the realtime package does not keep (`data.unrecorded` names these roles) |
89
89
  | `api/**/route.ts` | not a file kind — owner decision 1 ([#648](https://github.com/developerz-ai/ultimate/issues/648)), `As of 2026-10`. `api/` holds the action and query projections `defineApi()` collects; a route file there is refused at registration (`X_ROUTE_FILE_INVALID`), and 26.0.0 deleted `ROUTE_FILENAME`'s `api` row ([#709](https://github.com/developerz-ai/ultimate/issues/709)). A wire format an action cannot speak — a webhook receiver, an OAuth endpoint — is a plain HTTP route in the `routes` runtime override ([Configuration](Configuration)) |
package/wiki/Mail.md CHANGED
@@ -55,7 +55,7 @@ between environments — the credential does.
55
55
  |---|---|
56
56
  | nothing set, `development` / `test` | `memoryMailDriver()` — caught in the `/_x` mail panel, never sent |
57
57
  | nothing set, `staging` / `production` | `unconfiguredMailDriver(...)` — every send is `X_MAIL_CREDENTIAL_MISSING`; the boot still succeeds, so an app that sends no mail deploys |
58
- | `SMTP_URL` + `MAIL_FROM` | `smtpMailDriver(...)` — ESMTP over `Bun.connect`, STARTTLS required unless `allowInsecure` |
58
+ | `SMTP_URL` + `MAIL_FROM` | `smtpMailDriver(...)` — ESMTP over `Bun.connect`, STARTTLS required unless `allowInsecure`. `MAIL_POOL_SIZE`, `MAIL_TIMEOUT_MS` optional |
59
59
  | `RESEND_API_KEY` + `MAIL_FROM` | `resendMailDriver(...)` — one `POST /emails` with an `Idempotency-Key` |
60
60
  | `SES_REGION` + `SES_ACCESS_KEY_ID` + `SES_SECRET_ACCESS_KEY` + `MAIL_FROM` | `sesMailDriver(...)` — one SES v2 `SendEmail` with the raw MIME, SigV4-signed, no SDK. `SES_SESSION_TOKEN`, `SES_ENDPOINT`, `SES_CONFIGURATION_SET` optional |
61
61
 
@@ -0,0 +1,60 @@
1
+ # Working with many agents
2
+
3
+ **A parallel worker runs its own files. The coordinator runs the whole gate, once, at the end.** Every other rule on this page exists so that this one holds when several agents, in several checkouts and repositories, share one machine. `As of 2026-11-18`.
4
+
5
+ | Who | Runs | Never runs |
6
+ |---|---|---|
7
+ | a worker with a file set | `bun test ./its/file.test.ts`, `x test --filter <path>` over up to 3 files, `biome check <its paths>` | `x verify`, `bun run verify`, a whole `x test`, `bun run coverage` |
8
+ | the coordinator | `bun run verify` (or `x verify`) once, after the workers land | a second gate beside the first |
9
+ | a read-only agent (research, explore) | one command at a time, output bounded with `head` | any build, test, typecheck or index run |
10
+
11
+ **Read-only fan-out has its own limit.** Those agents write nothing, so they take no file set, but each is a whole session no ledger can see: its memory is outside the machine's accounting. Start a handful, not one per question.
12
+
13
+ ## The machine ledger
14
+
15
+ One ledger per machine and user, at `/tmp/ultimate-heavy-<uid>`, shared by every checkout and every Ultimate app on the machine. It admits **half of the memory this process may use** (the smallest of RAM and every cgroup `memory.max` above it). Each heavy run reserves its measured peak first, in arrival order, and waits when it does not fit.
16
+
17
+ | Enters the ledger | Reserves |
18
+ |---|---|
19
+ | `tsc -b` of a monorepo (`x verify`'s `typecheck`, `bun run typecheck` at this repository's root) | 6,016 MB, plus this checkout's one-compiler lock |
20
+ | `tsc -p .` of an app (`x verify --only typecheck`) | 768 MB, plus the same lock |
21
+ | `biome check .` (`x verify --only lint`) | 2,112 MB |
22
+ | every batch of `bun test` workers (`x test`, `x verify`'s suites) | 704 MB + 1,280 MB per worker |
23
+ | an e2e lane (`x test e2e`, `x verify --only e2e`) | 3,072 MB |
24
+ | one coverage unit (`bun run coverage`), one heavy `bun run preflight` step | 704 MB + 1,280 MB per worker |
25
+ | anything under `x heavy run` | `--mb`, default a monorepo typecheck |
26
+
27
+ **What does not enter it, stated:** a bare `bun test ./path`; `x test` selecting 3 files or fewer; an app's own `bun run typecheck` and `bun run lint` scripts (raw `tsc` and `biome`: a scaffolded agent brief says `bunx x verify --only typecheck` instead); `x build`, including the one `budgets` runs; the `drift`, `exercise` and `contract-diff` steps; `x dev`; the test services in Docker; the agent sessions themselves. Those are why only half the memory is offered.
28
+
29
+ Every entry is an `flock(2)`, and a holder hands the locked descriptor to the command it starts, so the kernel frees a reservation only when the holder **and** that command are gone. Kill a wrapper with `kill -9` and its reservation lasts until the command it started exits; a killed waiter leaves the queue at once. Descendants keep it only by inheritance: a shell's background job does, and a process started through `Bun.spawn` or `node:child_process` does not, because both close the descriptor. So a daemon a shell left running keeps the reservation until it stops (`x heavy status` names the run), and workers a killed `bun` command leaves behind are unaccounted. `As of 2026-11-18`, Bun 1.4.4.
30
+
31
+ ```sh
32
+ x heavy status # who runs, who waits, load, memory
33
+ x heavy status --json
34
+ x heavy run --label suite --mb 4096 -- bun run test # any command, in any repository
35
+ ```
36
+
37
+ A waiter prints one line on stderr saying its position and who holds the memory, and again only when that changes, so `--json` output stays one document. `x heavy run` passes the exit code through and forwards stop signals. A process started inside a reservation inherits it (`ULTIMATE_HEAVY_HOLD`) and never queues behind its own parent. Time spent queued does not count against an `x verify` step's deadline.
38
+
39
+ ## Cores
40
+
41
+ Locally a run takes **at most 4 cores**, fewer when other sessions' runnable tasks already fill the machine, and never below 2. Test workers are capped per batch, so a run narrows and widens as the machine changes; `tsc` and `biome` get the cap as `GOMAXPROCS` and `RAYON_NUM_THREADS`. `--workers N` is taken as written. CI takes every core.
42
+
43
+ ## Switches
44
+
45
+ | Variable | Effect |
46
+ |---|---|
47
+ | `ULTIMATE_HEAVY_MEMORY=8g` | what the ledger admits; `0` turns it off |
48
+ | `ULTIMATE_HEAVY_CORES=6` | the local core ceiling |
49
+ | `ULTIMATE_HEAVY_DIR=<path>` | another ledger; also opts a test run in |
50
+ | `ULTIMATE_TEST_SLOTS=0` | test workers skip the ledger |
51
+
52
+ Admission is off under `CI`, inside `bun test` (a fixture's `x test` must not queue behind real work), and on **Windows**, which has no `flock`: the core cap still applies there and `x heavy status` says why admission is off. A ledger that cannot work is reported as `X_HEAVY_LEDGER_UNAVAILABLE` and the command goes ahead; it never fails a run.
53
+
54
+ ## Re-measuring a weight
55
+
56
+ Each figure sits in [`packages/cli/src/heavy-weights.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/heavy-weights.ts) beside its command. Re-read one on a clean snapshot:
57
+
58
+ ```sh
59
+ GOMAXPROCS=4 bun run scripts/heavy-peak.ts -- node_modules/.bin/tsc -b --pretty false
60
+ ```
package/wiki/Testing.md CHANGED
@@ -1387,10 +1387,10 @@ gates at once — and it is held to a **memory budget**, not to whatever looks f
1387
1387
  what it chose and why — `3 workers (budget 4.0 GB)`. `ULTIMATE_TEST_MEMORY_BUDGET=3g` replaces
1388
1388
  the budget, `ULTIMATE_TEST_MAX_WORKERS=2` caps the width, `--workers N` wins over both. Total RAM,
1389
1389
  never "free": page cache counts as free, and two gates each planning on it took a 45 GB box down.
1390
- - **One budget per machine.** Each batch of workers leases that many slots from a pool of lock
1391
- files under the OS temp dir (one per worker the budget allows; a dead holder's slot is taken
1392
- over). A second `x test` or `x verify` on the same box gets what is left and runs narrower, or
1393
- waits for one slot, instead of doubling the memory. `ULTIMATE_TEST_SLOTS=0` turns it off.
1390
+ - **One budget per machine.** Each batch of workers reserves its measured memory in the
1391
+ [machine ledger](Many-Agents), at most 4 cores locally. A second `x test` or `x verify` on the
1392
+ same box runs narrower or queues instead of doubling the memory; a selection of 3 files or fewer
1393
+ runs free. `ULTIMATE_TEST_SLOTS=0` turns it off.
1394
1394
  - **No per-file isolation by default.** A worker keeps one global and one module registry across
1395
1395
  the files it runs (`bun test --parallel=N --no-isolate`) — measured 2-5x faster than `--isolate`
1396
1396
  at the same width. Between two files the testing preload hands the next file the process it would
@@ -1521,7 +1521,7 @@ This table is a hand-synced copy of it ([Contributing](Contributing)).
1521
1521
  |---|---|
1522
1522
  | `typecheck` | any error; `any` is banned by lint, not tolerated by a cast |
1523
1523
  | `lint` | biome only: formatting, `any`, default exports, unused imports. **Not** raw colours, bare `Error`, untranslated strings or unzoned dates — biome ignores `.scss` entirely and those are guards, one row down |
1524
- | `boundaries` | `site/` → `app/`, routes → DB, services → HTTP, tier violations in framework packages, **and every file in the app's own `guards/`** — every name in `SHIPPED_GUARD_NAMES` (`packages/cli/src/templates/scaffold-guards.ts`) that `x new` writes, or the ones you kept → [Interface rules](Interface-Rules) |
1524
+ | `boundaries` | `site/` → `app/`, routes → DB, services → HTTP, tier violations in framework packages, **and every guard**: every name in `SHIPPED_GUARD_NAMES` (`packages/cli/src/templates/scaffold-guards.ts`), run from the installed framework at the severity `guards/shipped.json` gives it, and every file of your own in `guards/` → [Interface rules](Interface-Rules) |
1525
1525
  | `filesize` | a source file over 500 lines |
1526
1526
  | `package-shape` | a workspace package missing `README.md`, `CLAUDE.md`, `tsconfig.json`, or `src/index.ts` |
1527
1527
  | `errors` | an `X_*` code with no runnable fix or no docs page |
@@ -223,8 +223,8 @@ myapp/
223
223
  │ └── ui/ app components on semantic tokens
224
224
  ├── docker/ Dockerfile, .dockerignore, dev + prod compose, helm/
225
225
  ├── guards/ one rule per file, run by `x verify`'s boundaries step.
226
- │ Every name in SHIPPED_GUARD_NAMES ships; `x doctor`
227
- │ lists any missing. Delete one by deleting its file
226
+ │ Shipped ones run from the framework; shipped.json
227
+ │ sets each one's severity (`off` turns it off)
228
228
  ├── bin/ setup.ts — `bun run setup`; `dev` and `verify` are x's own
229
229
  └── CLAUDE.md AGENTS.md what an agent reads first: one file, AGENTS.md a symlink
230
230
  ```