@ultimat3/cli 31.52.0 → 31.53.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 (111) hide show
  1. package/CLAUDE.md +1 -1
  2. package/package.json +29 -29
  3. package/src/app-kit-disk.ts +39 -0
  4. package/src/app-kit-forms.ts +27 -0
  5. package/src/app-kit.ts +146 -0
  6. package/src/budgets.ts +3 -1
  7. package/src/cdp-shot-driver-screen.ts +72 -0
  8. package/src/cdp-shot-driver.ts +17 -1
  9. package/src/cmd-design-capture.ts +210 -0
  10. package/src/cmd-design-errors.ts +50 -0
  11. package/src/cmd-design-paths.ts +47 -0
  12. package/src/cmd-design-publish.ts +64 -0
  13. package/src/cmd-design-run.ts +229 -0
  14. package/src/cmd-design-spec.ts +47 -0
  15. package/src/cmd-design-theme.ts +107 -0
  16. package/src/cmd-design-url.ts +201 -0
  17. package/src/cmd-design.ts +188 -0
  18. package/src/cmd-doctor.ts +3 -0
  19. package/src/cmd-generate-spec.ts +5 -0
  20. package/src/cmd-generate.ts +3 -1
  21. package/src/cmd-kit-spec.ts +13 -0
  22. package/src/cmd-kit.ts +133 -0
  23. package/src/cmd-shot-against.ts +275 -0
  24. package/src/cmd-shot-spec.ts +9 -1
  25. package/src/cmd-shot.ts +19 -0
  26. package/src/cmd-upgrade.ts +11 -0
  27. package/src/codemods/agent-kit.ts +130 -0
  28. package/src/codemods/agents-md-budget.ts +47 -0
  29. package/src/codemods/docs-visual-quality.ts +198 -0
  30. package/src/codemods/index.ts +8 -0
  31. package/src/codemods/settings-kit-allow.ts +49 -0
  32. package/src/design-extract-script.ts +187 -0
  33. package/src/design-extract.ts +311 -0
  34. package/src/design-map-colors.ts +180 -0
  35. package/src/design-map.ts +288 -0
  36. package/src/doctor-kit.ts +25 -0
  37. package/src/error-catalog.ts +4 -2
  38. package/src/error-codes-kit.ts +24 -0
  39. package/src/error-codes.ts +12 -10
  40. package/src/generate-files.ts +31 -1
  41. package/src/guards-shipped-names.ts +5 -0
  42. package/src/kit/agent-audit.ts +49 -0
  43. package/src/kit/agent-data.ts +32 -0
  44. package/src/kit/agent-server.ts +34 -0
  45. package/src/kit/agent-shape.ts +61 -0
  46. package/src/kit/agent-web.ts +49 -0
  47. package/src/kit/design-map.ts +106 -0
  48. package/src/kit/managed.ts +12 -0
  49. package/src/kit/registry.ts +89 -0
  50. package/src/kit/skill-design-research.ts +119 -0
  51. package/src/kit/skill-feature.ts +159 -0
  52. package/src/kit/skill-planx.ts +139 -0
  53. package/src/kit/skill-upgrade.ts +94 -0
  54. package/src/kit/skill-verify.ts +80 -0
  55. package/src/mcp-errors.ts +5 -0
  56. package/src/mcp-ui-diff.ts +13 -38
  57. package/src/mcp-ui.ts +30 -1
  58. package/src/messages-design.ts +104 -0
  59. package/src/messages-upgrade.ts +9 -0
  60. package/src/messages.ts +2 -0
  61. package/src/registry.ts +4 -0
  62. package/src/shot-diff.ts +96 -0
  63. package/src/shot-gpu.ts +17 -5
  64. package/src/templates/guard-animated-layout-script.ts +173 -0
  65. package/src/templates/guard-effect-without-fallback.ts +117 -0
  66. package/src/templates/guard-motion-adapter.ts +161 -0
  67. package/src/templates/guard-raw-frame-loop.ts +134 -0
  68. package/src/templates/guard-raw-motion-script.ts +132 -0
  69. package/src/templates/guard-raw-motion-ts-scan.ts +95 -0
  70. package/src/templates/guard-released-forms.ts +10 -0
  71. package/src/templates/index.ts +1 -2
  72. package/src/templates/island.ts +55 -8
  73. package/src/templates/kit-released-forms.ts +63 -0
  74. package/src/templates/motion-scale.ts +115 -0
  75. package/src/templates/scaffold-claude.ts +39 -26
  76. package/src/templates/scaffold-design.ts +41 -0
  77. package/src/templates/scaffold-docs.ts +31 -7
  78. package/src/templates/scaffold-guards.ts +31 -2
  79. package/src/templates/scaffold-verify-floor.ts +3 -0
  80. package/src/templates/shapes/blog-site.ts +15 -0
  81. package/src/templates/shapes/blog.ts +2 -0
  82. package/src/templates/shapes/content-site.ts +13 -0
  83. package/src/templates/shapes/content.ts +2 -0
  84. package/src/templates/shapes/dashboard-detail.ts +2 -0
  85. package/src/templates/shapes/dashboard-motion.ts +284 -0
  86. package/src/templates/shapes/dashboard.ts +19 -1
  87. package/src/templates/shapes/landing-motion.ts +67 -0
  88. package/src/templates/shapes/saas.ts +4 -0
  89. package/src/upgrade-gate.ts +14 -2
  90. package/src/upgrade-kit.ts +65 -0
  91. package/src/upgrade-report-kit.ts +28 -0
  92. package/src/upgrade-report.ts +3 -0
  93. package/src/verify-checks.ts +9 -1
  94. package/src/workspace-checks.ts +3 -3
  95. package/wiki/Agents.md +33 -1
  96. package/wiki/CLI-Reference-Tools.md +24 -3
  97. package/wiki/CLI-Reference.md +4 -2
  98. package/wiki/Design-Research.md +96 -0
  99. package/wiki/Effects.md +83 -0
  100. package/wiki/FAQ.md +1 -1
  101. package/wiki/Getting-Started.md +1 -1
  102. package/wiki/Home.md +2 -2
  103. package/wiki/Known-Gaps.md +3 -2
  104. package/wiki/MCP-And-AI.md +4 -0
  105. package/wiki/Motion.md +85 -0
  106. package/wiki/Project-Layout.md +1 -1
  107. package/wiki/Tutorial-02-First-Feature.md +1 -1
  108. package/wiki/UI-Components.md +2 -0
  109. package/wiki/Upgrading.md +4 -2
  110. package/src/templates/scaffold-claude-agents.ts +0 -161
  111. package/src/templates/scaffold-claude-commands.ts +0 -239
package/wiki/Agents.md CHANGED
@@ -938,6 +938,38 @@ Full list: [Error codes](Error-Codes).
938
938
 
939
939
  Source: [`packages/ai/src`](https://github.com/developerz-ai/ultimate/blob/main/packages/ai/src)
940
940
 
941
+ ## The agent kit: skills and agents every app gets
942
+
943
+ The kit is what a coding agent finds in `.claude/` the moment an app exists: five skills, five
944
+ subagents, written by `x new`, refreshed by `x kit` and `x upgrade`, and diffed by `x verify`.
945
+ A managed file is never edited in place — an edit fails the `manifest` step with `X_KIT_DRIFT`
946
+ (`bunx x kit` restores it). An app's own skill or agent is `app-<name>`; one that reuses a managed
947
+ name is `X_KIT_SHADOWED`. `.claude/kit.json` opts in (`"off": ["design-research"]` switches an
948
+ entry off); without it the gate prints one warning. Skills, not commands: a skill silently shadows
949
+ a command of the same name, so `.claude/commands/` is no longer scaffolded.
950
+
951
+ <!-- kit-doc:begin — generated by `bun run scripts/kit-doc.ts --write` -->
952
+
953
+ | Name | Kind | Lands at | For |
954
+ |---|---|---|---|
955
+ | `feature` | skill | `.claude/skills/feature/SKILL.md` | Build or fix one thing in the app end to end — name the primitive, split the work into path-disjoint slices, run them as a hive in this one checkout, gate once with `bun run verify`, open one PR and finish when it is merged. |
956
+ | `planx` | skill | `.claude/skills/planx/SKILL.md` | Write a plan for the app to docs/plans/ as a directory — overview.md, one file per path-disjoint slice and a status.yml — for a hive of agents to execute with the feature skill. |
957
+ | `verify` | skill | `.claude/skills/verify/SKILL.md` | Run the gate for the app (bun run verify) and fix everything it reports — checking each finding's fix line for its source, scope and effect before running it. |
958
+ | `upgrade` | skill | `.claude/skills/upgrade/SKILL.md` | Move the app to the next Ultimate major — preview with a dry run, hop, read the report (codemods that left work, guards withheld, workarounds a release superseded), refresh the agent kit, and gate. |
959
+ | `design-research` | skill | `.claude/skills/design-research/SKILL.md` | Make a page of the app look and move like a reference site — measure it with x design research, record its licence posture, write apps/web/DESIGN.md and a token proposal, build it through the web agent on @ultimat3/ui/motion and @ultimat3/effects, then compare with x shot --against. |
960
+ | `shape` | agent | `.claude/agents/shape.md` | Use BEFORE writing any code, at the idea stage — turns a product request into the one decision that governs everything after it — which of the eight primitives each piece is, which slice and surface it lives in, and the exact `bunx x g` invocations. |
961
+ | `data` | agent | `.claude/agents/data.md` | Use for anything about what is stored — entity definitions, invariants, indexes, repositories, migrations and seed data in the app. |
962
+ | `server` | agent | `.claude/agents/server.md` | Use for server-authoritative behaviour in the app — actions, mutators, queries, jobs, tasks and policies, plus the HTTP surface under `apps/web/api/`. |
963
+ | `web` | agent | `.claude/agents/web.md` | Use for anything rendered in the app — pages under `apps/web/site/` and `apps/web/app/`, islands, components in `packages/ui/`, styles, tokens and i18n catalogs. |
964
+ | `audit` | agent | `.claude/agents/audit.md` | Use to review a change or an area of the app without touching it — authz holes, data written outside repo.ts, N+1 reads, unbounded queries, missing tests, rules the gate cannot see. |
965
+
966
+ <!-- kit-doc:end -->
967
+
968
+ Every `x …` command, flag, dev-MCP tool and `X_*` code a kit file names is checked against the
969
+ framework by `kit/drift.test.ts`, so the kit cannot send an agent to something that does not exist.
970
+ `apps/web/DESIGN.md` is the app's: a stub `x new` writes once and never manages. History:
971
+ [`docs/history/agent-kit.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/history/agent-kit.md).
972
+
941
973
  ## The coding agent building your app: a cold-start check
942
974
 
943
975
  The rest of this page is `agent()`, an agent inside your app. This section is the other one — the
@@ -962,7 +994,7 @@ tests: `AGENTS.md`'s commands resolve (`scaffold-agents-md.test.ts`), `.mcp.json
962
994
  | commands before the first green gate | count every shell command the agent ran until `bunx x verify` was green |
963
995
  | wrong guesses | a command that does not exist, a bare `x`, a hand-written primitive `bunx x g` would have written, a file path that is not there |
964
996
  | files read before the first edit | the agent's own transcript |
965
- | did it find the tools | whether it read `x.manifest.json`, used `.mcp.json`, or followed `.claude/commands/feature.md` |
997
+ | did it find the tools | whether it read `x.manifest.json`, used `.mcp.json`, or followed the `feature` skill (`.claude/skills/feature/SKILL.md`) |
966
998
 
967
999
  Each wrong guess is a defect in what the scaffold says, not in the agent: fix the file that misled
968
1000
  it. Results stay out of this repository unless they form a vendor-neutral table.
@@ -60,7 +60,7 @@ x mcp serve [--transport stdio|http] [--port 9229] [--json]
60
60
  | `--transport` | string | `stdio` | `stdio` for an editor client, `http` for a socket |
61
61
  | `--port` | string | `9229` | HTTP port when `--transport http`. `9229` is also the inspector's default; a taken port is `X_PORT_IN_USE`, naming the next one |
62
62
 
63
- Serves `@ultimat3/mcp`'s dev server — 23 tools (`As of 31.22`), one catalog, the same on both transports. Every
63
+ Serves `@ultimat3/mcp`'s dev server — 24 tools (`As of 31.53`), one catalog, the same on both transports. Every
64
64
  tool declares a scope; the local developer's caller carries all five, and an HTTP caller carries
65
65
  whatever its bearer token was issued.
66
66
 
@@ -89,6 +89,7 @@ whatever its bearer token was issued.
89
89
  | `ui.inspect` | DOM, computed-style and accessibility facts for a bounded set of selectors, in one navigation | `dev:test` |
90
90
  | `ui.interact` | drive one route through a bounded step list, then photograph it; refuses a password field and any step that leaves the origin | `dev:test` |
91
91
  | `ui.diff` | pixel-compare two PNGs the other `ui.*` tools wrote under `.x/shot/`; launches no browser | `dev:read` |
92
+ | `ui.research` | `x design research` as a tool: `{ urls: 1..5, follow?: 0..20 }` → `reference.json`, `tokens.proposal.json`, `motion-map.json`, `sources.json` under `.x/design/<slug>/`; every request to a private, loopback or link-local address refused | `dev:test` |
92
93
 
93
94
  `db.query` and `db.migrate` refuse structurally — multiple statements, a mutating keyword
94
95
  (a data-modifying CTE included), a locking clause, `EXPLAIN ANALYZE` (or `ANALYSE`), a banned
@@ -249,7 +250,7 @@ One major per run, so each hop's gate attributes its red to that hop. `As of 30.
249
250
  | 3 | `bun pm view @ultimat3/cli versions`: the next major's newest; the last major's newest when no later major exists | `X_UPGRADE_REGISTRY_UNREACHABLE`, `X_UPGRADE_HOP_TOO_WIDE`, `X_UPGRADE_VERSION_UNPUBLISHED`, `X_BUN_VERSION` |
250
251
  | 4 | write exact pins, raise the Bun floor | — |
251
252
  | 5 | `bun install`, then `bun update <names>` for each transitive package `bun.lock` holds under an advisory floor (`X_ADVISORY_FLOOR_UNMET`) | `X_UPGRADE_INSTALL_FAILED`, `fix:` carries the undo |
252
- | 6 | the installed CLI: `x upgrade codemods --from <from> --to <to>` (below), then `x manifest`, `x doctor --json`, each guard that doctor reports missing (only a hop landing before 31.28: `x g guard <name>`, kept when `x verify --only boundaries` finds nothing more), a Bun-floor hop's `x verify --only unit` coverage rebaseline, `x exercise --json` and its `exercise` floor figures, `x verify --json` | `X_UPGRADE_GATE_UNREADABLE`, as a finding on a red hop |
253
+ | 6 | the installed CLI: `x upgrade codemods --from <from> --to <to>` (below), then `x manifest`, `x doctor --json`, each guard that doctor reports missing (only a hop landing before 31.28: `x g guard <name>`, kept when `x verify --only boundaries` finds nothing more), a Bun-floor hop's `x verify --only unit` coverage rebaseline, `x kit --json` (the managed agent kit refreshed, `As of 31.53`), `x exercise --json` and its `exercise` floor figures, `x verify --json` | `X_UPGRADE_GATE_UNREADABLE`, as a finding on a red hop |
253
254
 
254
255
  A dry run refuses exactly what the real run would, then stops before step 4 — after previewing this CLI's codemods for the span, written nowhere. It never commits; `git diff` is the hop. Under `--json` fd 1 is one document, fd 2 a `{"upgrade":"<stage>"}` line per stage and a heartbeat a minute.
255
256
 
@@ -279,6 +280,7 @@ A dry run refuses exactly what the real run would, then stops before step 4 —
279
280
  | `verify` | `{ ok, summary, failed[], findings[], only?, notRun? }`, each finding `{ step?, code, cause, fix, at? }`. `only[]` and `notRun[]` only under `--only`: the steps run, and the gate's steps this hop did not run |
280
281
  | `codemods` | `As of 2026-11-15`: `{ from, to, dryRun, source, applied[] }`, each `applied[]` a codemod that ran: `{ id, since, summary, changed[], skipped[] }`; a `skipped[]` entry is `{ path, reason, diff? }`, a file the codemod would not overwrite (the app edited it), with the template's change as a unified diff to make by hand. `source: installed` — the hop's own CLI applied its list; `driver` — that CLI predates codemods, so this one applied its own. `reinstalled: true` — a `package.json` differs after the codemods (read byte for byte, never off a codemod's report), so the hop ran `bun install` again before any gate stage; `x upgrade codemods` does the same by hand. `failure: { code, cause, fix }` — the installed CLI's codemods run failed for a reason other than lacking the subcommand: nothing applied, this CLI does not stand in, and the hop is not done. `null`: no app, or already at the target, where no codemod runs (`As of 2026-11-18`; `x upgrade codemods --from 0.0.0 --json` carries an app still holding an old template's copy) |
281
282
  | `superseded[]` | `As of 2026-11-15`: a workaround the hop's framework made unnecessary, read after the codemods — `{ code: X_SUPERSEDED_WORKAROUND, cause, fix, at }`. A warning, never the verdict |
283
+ | `kit` | `As of 31.53`: `{ reported, written[{ path, action }], unchanged, findings[] }` from the installed CLI's `x kit --json`; `reported: false` when that CLI predates `x kit` |
282
284
  | `then` | the next thing to do, in a sentence naming the commands |
283
285
 
284
286
  **Codemods.** A file `x new` wrote is the app's; when a release changes the template, a codemod (`packages/cli/src/codemods/<id>.ts`, `since` = the release whose template change it carries) moves the app's copy. The hop runs every codemod whose `since` lies after `from` and at or before `to`, in version then id order, before any gate stage, and leaves the edits uncommitted beside the pins. Mechanical or nothing: a file the app edited is listed in `skipped[]` with its diff and never overwritten. `x upgrade codemods --from <version>` runs the same list by hand — for a hop an older CLI drove, which applied none:
@@ -364,10 +366,28 @@ One compiler (`$ref`, objects, arrays, enums, `const`, `oneOf`/`anyOf`, `allOf`,
364
366
 
365
367
  **The stamp is the build error.** Every generated `.ts` opens with `// @x-client {command, source, sourceHash, bodyHash}`. The gate's `drift` step reads it back under `apps/*/clients/` and the source globs: the source document's parsed content moved is `X_CLIENT_STALE` (fix: the stamp's own command), the body's bytes moved is `X_CLIENT_EDITED`. Reformatting `source.json` changes nothing; the `.ts` files carry `biome-ignore-all format`. Names come from `operationId`, so a `contract-diff` red is a customer's client breaking. `rpc` stays the client inside the app's own repo.
366
368
 
369
+ ## x design research
370
+
371
+ ```bash
372
+ x design research <url…> [--follow <n>] [--out .x/design] [--viewport 390x844,1440x900]
373
+ [--allow-hosts <h,…>] [--timeout 30000] [--json]
374
+ x design research --list [--json]
375
+ ```
376
+
377
+ Measures a public reference page in Chrome over raw CDP into five artefacts per URL — shots at each viewport in light and dark, `reference.json`, a `tokens.proposal.json` that `defineTheme` accepts, `motion-map.json` (observed animation → `@ultimat3/ui/motion` call or `@ultimat3/effects` entry) and `sources.json` (licence posture). Every navigation, redirect and subresource to a private, loopback or link-local address is refused browser-wide (`X_DESIGN_URL_REFUSED`); a navigation that fails or times out is `X_DESIGN_REFERENCE_UNREACHABLE`. A cancelled `ui.research` call ends with `X_ABORTED` and publishes nothing half-written; a followed link that fails is listed in `data.skipped`, by code. Needs no app. Flags, artefacts and the ideas-only rule: [Design research](Design-Research).
378
+
379
+ ## x kit
380
+
381
+ ```bash
382
+ x kit [--json]
383
+ ```
384
+
385
+ Writes the managed agent kit — `.claude/skills/{feature,planx,verify,upgrade,design-research}/SKILL.md`, `.claude/agents/{shape,data,server,web,audit}.md` and the `.claude/kit.json` marker — from the installed framework. Never touches an `app-*` file, `apps/web/DESIGN.md`, or an entry named in `kit.json`'s `"off"`. Needs an app root. `--json` answers `data: { written[{ path, action }], unchanged, off }`. `x verify`'s `manifest` step judges the kit: with the marker, a missing or edited managed file is `X_KIT_DRIFT` and an app file under a managed name is `X_KIT_SHADOWED`; without it, one warning naming `bunx x kit`. `x upgrade` runs it after the guards. → [Agents](Agents)
386
+
367
387
  ## x shot
368
388
 
369
389
  ```bash
370
- x shot <route> [--port 0] [--out <dir>] [--no-full] [--settle 2000]
390
+ x shot <route> [--port 0] [--out <dir>] [--no-full] [--settle 2000] [--against <png|.x/design/<slug>>]
371
391
  [--timeout 30000] [--browser <path>] [--cdp-url <ws://…>]
372
392
  [--allow-hosts a.com,b.com] [--theme light|dark] [--locale <l>]
373
393
  [--cookie name=value[,name=value]] [--expect-status 404]
@@ -394,6 +414,7 @@ x shot --all-islands [--json]
394
414
  | `--expect-status` | absent — any 2xx | the document status this shot is ok with, `As of 2026-09-26`: `x shot /nope --expect-status 404` photographs the not-found page on purpose. Absent, a non-2xx document fails the verdict and the summary names the status. With `--matrix` it applies to every cell |
395
415
  | `--locale` | the app's `defaultLocale`, **always pinned** | one of the app's `locales`, `As of 2026-09-25`. Sent as `Accept-Language` on every request the page makes, and for a non-default locale the path is prefixed (`x shot /precios --locale en` opens `/en/precios`). Absent, `Accept-Language` is still pinned to the default locale, so a picture never depends on the language of the machine's Chrome. An undeclared locale is `X_CLI_BAD_FLAG` before anything boots; refused beside `--island` |
396
416
  | `--matrix` | off | every static `site/` route × every locale × `light`/`dark` × `390x844` and `1440x900` — or the `--viewport` list instead (laid out at exactly that width: scrollbars are hidden, `As of 2026-09-29` — a classic scrollbar made every capture 15 px narrow), into `.x/shot/matrix/<route>/<locale>/<theme>-<width>x<height>/` (`<theme>-<width>/` before 2026-10: two sizes sharing a width wrote one directory), plus `.x/shot/matrix/index.html`, a contact sheet of every picture with failures marked. One dev server for the whole run. A `<route>` narrows it to that route, `--locale` and `--theme` to one value of their axis; `ok` only when every cell's verdict is. Refused beside `--island`/`--all-islands` |
417
+ | `--against` | none | a PNG or a `x design research` directory: each picture compared with the reference shot of its width and scheme — `diff-<w>-<scheme>.png` and `against.{similarity,changedPercent,changedBox}` in `verdict.json`; recorded, never gating. A missing pair is `X_SHOT_AGAINST_MISSING`. Refused beside `--matrix`/`--island`/`--all-islands` → [Design research](Design-Research) |
397
418
  | `--viewport` | absent — the driver's default size | `<w>x<h>[,<w>x<h>…]` in CSS pixels, `As of 2026-10` (#444): the route photographed **once per size** over one dev server, each into `<out>/<w>x<h>/` with its own `shot.png` and `verdict.json`; `ok` only when every size's verdict is, and the summary is the first failing size's. `x shot /pricing --viewport 390x844,820x1180,1440x900` replaces a hand-written browser script. With `--matrix` the list replaces the default pair. One flag holding a list, never repeated — the parser keeps a repeated flag's last value. A side outside `1..16384`, anything but digits around an `x` (`0x10`, `1e3`, `390.5`), an empty entry or the same size twice is `X_CLI_BAD_FLAG` before anything boots; refused beside `--island`/`--all-islands`, whose states declare their own `viewport` |
398
419
  | `--theme` | absent — the box's own preference and the app's own `theme.defaultMode` | `light` or `dark`, `As of 2026-09-19`. Both `prefers-color-scheme` is emulated **and** the scheme is stored as the visitor's choice under `THEME_STORAGE_KEY` before navigation — the boot script since 20.2.0 answers `defaultMode` before the OS, so emulation alone photographs a dark-default app dark whatever was asked (#489). The `ui.shot`/`ui.inspect`/`ui.interact` tools' `theme` is this flag. Refused beside `--island`, which photographs both themes |
399
420
 
@@ -14,7 +14,7 @@ x version # CLI version
14
14
  | `--json` | every command accepts it and prints a single machine-readable object on stdout. Human output goes to stdout too, but never mixed with JSON |
15
15
  | Exit codes | `0` success · `1` the command failed (a typed `X_*` error is printed) · `2` usage error (`X_CLI_BAD_FLAG`, `X_CLI_UNKNOWN_COMMAND`) |
16
16
  | Errors | always `code` + `cause` + `fix`. See [Error codes](Error-Codes) |
17
- | App detection | most commands walk up for `app.config.ts` and fail with `X_NOT_IN_APP` if there is none. The exceptions: `new`, `test`, `doctor`, `errors`, `docs`, `affected`, `ci`, `pr`, `help`, `version` |
17
+ | App detection | most commands walk up for `app.config.ts` and fail with `X_NOT_IN_APP` if there is none. The exceptions: `new`, `test`, `doctor`, `errors`, `docs`, `affected`, `ci`, `pr`, `design`, `help`, `version` |
18
18
  | Flags | long form only, `--flag value` or `--flag=value`. Booleans negate as `--no-<flag>` |
19
19
  | Global flags | `--json` / `-j`, `--help` / `-h`, `--cwd <dir>`, `--verbose` — accepted by every command. `--verbose` carries each step's captured output on a green run too, in the terminal and under `--json` alike (`steps[].output`); without it a step's output appears only when it fails. `As of 2026-10` |
20
20
  | Subcommands | when a command has them, its default is **declared**, never positional: `x actions` is `x actions list` because that command sets `defaultSubcommand: 'list'`. A command with no defensible default declares none and refuses the bare form with `X_CLI_BAD_FLAG` — exactly `db` and `mcp`, pinned by `parse.test.ts`. `--help` is read before the subcommand, so `x db --help` and `x mcp --help` print usage like `x help db`. The parser answered `subcommands[0]` until 1.2.0, which is why `x db` used to run the migration **generator** |
@@ -72,7 +72,9 @@ The reference is split by family; every command heading keeps its anchor on the
72
72
  | `x affected` | the workspaces a diff can have broken, transitively | shipped |
73
73
  | `x graph [--from <a> --to <b>]` · `x impact <file\|primitive\|entity>` | the app as one typed graph, each edge `declared`, `import` or `observed` · what an edit reaches | shipped |
74
74
  | `x client vendor <name>` · `x client customer --out <dir>` | one OpenAPI compiler, two clients: a third party's document into `apps/web/clients/<name>/` (`outbound()` + `t` schemas), or the app's own published document into a client with no framework import | shipped |
75
- | `x shot <route>` | photograph one route from a real browser, plus a `verdict.json` a picture cannot carry | shipped |
75
+ | `x shot <route>` | photograph one route from a real browser, plus a `verdict.json` a picture cannot carry · `--against` compares it with a reference | shipped |
76
+ | `x design research <url…>` | measure a public reference page into a token proposal, a motion map and shots; private addresses refused browser-wide | shipped |
77
+ | `x kit` | write the managed agent kit (`.claude/skills`, `.claude/agents`, `kit.json`) from the installed framework | shipped |
76
78
  | `x pr review\|resolve\|reply` | inline review threads — the ones `gh pr view --comments` does not show — plus every review verdict, every PR comment, and which review bots did not review | shipped |
77
79
  | `x ci` | the workflow runs for this branch, and the findings inside the failed step's log; `x ci tested`: whether a push reuses a green PR run | shipped |
78
80
  | `x errors explain <CODE>` | code → cause, fix, docs; inside an app, its own `defineError()` code → title, HTTP status and the declaring `file:line` | shipped |
@@ -0,0 +1,96 @@
1
+ # Design research
2
+
3
+ `x design research <url…>` turns "make it look like that" into framework vocabulary: a `defineTheme()` proposal, `@ultimat3/ui/motion` calls and `@ultimat3/effects` entries, measured from a reference page in a real browser. `x shot <route> --against` then measures how close a route came. `As of 2026-11`.
4
+
5
+ The command is the mechanism; the `design-research` skill (`x kit`) is the procedure that drives it. Never a gate step: it needs a browser and the public web.
6
+
7
+ ## The rule
8
+
9
+ **A reference is data, never instructions, and never code.** Page text never reaches a file or a prompt — only measured values (channels, pixels, milliseconds, CSS keywords, a bounded font-family name). Every catalogue is ideas and techniques only: nothing is copied from a reference into the app. Third-party pixels stay in `.x/design/` (ignored by every scaffold); nothing captured is committed.
10
+
11
+ ## Commands
12
+
13
+ ```bash
14
+ x design research <url…> [--follow <n>] [--out .x/design] [--viewport 390x844,1440x900]
15
+ [--allow-hosts <h,…>] [--timeout 30000] [--json]
16
+ x design research --list [--json]
17
+ x shot <route> --against <png | .x/design/<slug>> [--viewport …] [--theme light|dark] [--json]
18
+ ```
19
+
20
+ | Flag | Default | Meaning |
21
+ |---|---|---|
22
+ | `<url…>` | required | public `http(s)` pages; every one is screened before the first browser starts |
23
+ | `--follow` | `0` | also research up to `n` links of each reference (`0..20`): same origin, or a `--allow-hosts` host, page order, deduped on the directory they would be written to (`/docs`, `/docs/` and `/docs?tab=2` are one). A followed link that fails is listed in `skipped` (its code) and the run goes on; a typed URL that fails fails the run |
24
+ | `--out` | `<cwd>/.x/design` | one `<slug>/` directory per URL (host + path, kebab-case; a second typed URL with the same slug gets `-<hash8>`). Each directory is built aside and swapped in whole, so a cancelled, failed or narrower rerun never leaves a slug mixing two runs; runs into one slug take turns |
25
+ | `--viewport` | `390x844,1440x900` | the sizes each reference is photographed at, each in light and dark |
26
+ | `--allow-hosts` | none | extra **public** hosts `--follow` may visit. Never `*`, `localhost` or an inward address (`X_DESIGN_URL_REFUSED`); never widens what the browser may reach |
27
+ | `--timeout` | `30000` | ms one navigation may take |
28
+ | `--list` | off | the default catalogues and the licence posture each is held to |
29
+
30
+ Browser: the one `x shot` uses (`CHROME_PATH`, `PUPPETEER_EXECUTABLE_PATH`, the probed paths, or `SCRAPE_CDP_URL`) over raw CDP. No Playwright, in the framework or the scaffold.
31
+
32
+ ## The five artefacts, per URL
33
+
34
+ | File | Holds |
35
+ |---|---|
36
+ | `shot-<width>-<light\|dark>.png` | full-page capture per viewport and scheme |
37
+ | `reference.json` | palette clusters by usage (background, text, border share) with each one's nearest shipped role, font families + size scale, spacing histogram, radii, shadows, `backdrop-filter` use, canvases, every animation/transition (duration, delay, easing, trigger `enter`/`hover`/`scroll`/`loop`/`state`, animated properties), hosts refused |
38
+ | `tokens.proposal.json` | a `defineTheme({ colors, radius, motion })` argument — accepted by `defineTheme` itself before it is written (as mapped, else without colours, else `{}` with `tokens.validated: false`); a curve point that is not a plain decimal, or overshoots past 10, is dropped |
39
+ | `motion-map.json` | each observed animation → the `@ultimat3/ui/motion` call (`animate`, `inView`, `scrollLinked`, `motionTiming`, `layout`, `springLinear`) or `@ultimat3/effects` entry (`Marquee`, `Shimmer`, `GlassSurface`, `EffectCanvas`), with its snapped `duration`/`easing` token |
40
+ | `sources.json` | URL, final URL, followed-from, catalogue, licence posture, the ideas-only rule |
41
+
42
+ **Page-chosen text never comes back.** `finalUrl` (`location.href`, which a page rewrites with `history.replaceState`) and every followed page are named `origin#<hash8>`; a followed page's directory is `<reference-slug>--<hash8>`, never its path. A font family is one token plus words a family name is made of (`IBM Plex Sans`), never a phrase. Captures are clipped to the viewport's width and at most 16384 px of height.
43
+
44
+ How the measuring works: a recorder is installed before the page's own scripts (every `Element.animate`, CSS animation and transition, with the phase it started in); after load the page is scrolled to the bottom, then hovered over its links, buttons and cards; then up to 3000 visible elements' computed styles are read. Durations and easings snap through the same motion scale the shipped guards use (`packages/cli/src/templates/motion-scale.ts`). Radii snap to `sm`/`md`/`lg`/`xl`.
45
+
46
+ ## Colours that always pass contrast
47
+
48
+ `tokens.proposal.json` proposes `bg`, `fg`, `surface`/`bg-soft`/`surface-raised`, `accent`/`accent-fg` and `line` per theme, then runs `defineTheme`'s own pairing table (`CONTRAST_PAIRS` + `ALIAS_CONTRAST_PAIRS`): a role whose pairing fails is **dropped** and falls back to the shipped palette, until every pairing passes. A theme whose page colour does not fit it (a light site photographed in dark mode) gets no colours. `@ultimat3/ui` is resolved at run time; where it is not installed, the proposal carries no colours and `reference.json` says `coloursProposed: false`.
49
+
50
+ ## Network: public hosts only, browser-wide
51
+
52
+ | Request | Screen |
53
+ |---|---|
54
+ | the typed URL, each `--follow` link | `http(s)`, no credentials, core's address floor, then every address the name resolves to — before any browser |
55
+ | every navigation, redirect, subresource, popup the page makes | CDP `Fetch` interception on the page **and** browser sessions: core's floor refuses inward literals and `localhost`; a name is resolved (once per session) and refused if any address is not public |
56
+ | a WebSocket (`WebSocket`, `WebSocketStream`, `WebTransport`) | refused in the page before its scripts run, in every frame — `Fetch` never pauses a socket handshake, so none is screened, none is opened |
57
+
58
+ A refused top-level navigation or redirect is `X_DESIGN_URL_REFUSED`; refused subresources are listed by host in `reference.json` (`refused.hosts` inward, `refused.unresolved` a name that did not resolve — unreachable, not private, and asked again rather than cached). A dedicated worker's own socket and a `preconnect` TCP handshake are not covered. The resolve cannot pin Chrome's own socket: a name that rebinds between the screen and Chrome's lookup stays open, as for `@ultimat3/scraping`'s browser leg ([Known gaps](Known-Gaps)). There is no flag that admits loopback — the test suite reaches its fixture server through a harness-only option.
59
+
60
+ ## `x shot --against`
61
+
62
+ | Reference | Pairs |
63
+ |---|---|
64
+ | `.x/design/<slug>` | every `shot-<width>-<scheme>.png` it holds, narrowed by `--viewport` / `--theme`; a pair asked for and not held is `X_SHOT_AGAINST_MISSING` |
65
+ | a `.png` | one pair: the one `--viewport` (else `1440x900`; more than one is `X_CLI_BAD_FLAG`), `--theme` (else `light`) |
66
+
67
+ The reference must lie under the app root or the current directory, through any link (`X_CLI_BAD_FLAG` otherwise).
68
+
69
+ Each pair is an ordinary route shot into `<out>/<width>-<scheme>/`, plus `diff-<width>-<scheme>.png` and an `against` block in its `verdict.json`: `similarity` (`1` identical, `0` every pixel changed), `changedPercent`, `changedBox`, `threshold` (`0.1`, `ui.diff`'s). Two heights compare on the larger canvas; what only one covers counts as changed. **Recorded, never gating**: `ok` is the shot's own verdict. Refused beside `--matrix`, `--island`, `--all-islands`.
70
+
71
+ ## Dev MCP: `ui.research`
72
+
73
+ The same command (axiom 2), under `dev:test` like `ui.shot`: `{ urls: [1..5], follow?: 0..20 }` → the `--json` answer, artefacts in `<app>/.x/design/`. Same screen, same refusals. A cancelled call (`notifications/cancelled`) closes its browser, launches no further one and publishes nothing: `X_ABORTED`.
74
+
75
+ ## Catalogues (`--list`)
76
+
77
+ | Source | Posture |
78
+ |---|---|
79
+ | React Bits | `ideas-only` — MIT + Commons Clause: watch the effect, never open the source |
80
+ | 21st.dev | `ideas-only` — per-component licences |
81
+ | Paper Shaders | `ideas-only` |
82
+ | shaders.com | `ideas-only` |
83
+ | reui | `mit-attribution` |
84
+ | shadcn/ui | `mit-attribution` |
85
+ | Motion | `mit-attribution` |
86
+
87
+ A host on no row is `ideas-only`. `mit-attribution` / `apache-notice` state what copying *would* owe; the framework's rule — ideas only — is stricter than all of them.
88
+
89
+ ## Errors
90
+
91
+ | Code | When | Fix |
92
+ |---|---|---|
93
+ | `X_DESIGN_URL_REFUSED` | not `http(s)`, credentials, or the URL — or a redirect the page took — lands on a private, loopback or link-local address | a public `https://` page |
94
+ | `X_DESIGN_REFERENCE_UNREACHABLE` | navigation failed, timed out, answered 4xx/5xx, or the name did not resolve | `--timeout <ms>`, or drop the URL |
95
+ | `X_ABORTED` | the call was cancelled; nothing from the reference in progress was published | run it again |
96
+ | `X_SHOT_AGAINST_MISSING` | `--against` names no file, or a reference with no shot for that width and scheme | `x design research <url>` first |
@@ -0,0 +1,83 @@
1
+ # Effects
2
+
3
+ `@ultimat3/effects` — background, interaction and text effects. Optional package, tier 5: an app that does not import it pays 0 B. Every engine is ours; no runtime dependency beyond `@ultimat3/*`.
4
+
5
+ `As of 2026-11`. The component list is the generated [`CATALOG.md`](https://github.com/developerz-ai/ultimate/blob/main/packages/effects/CATALOG.md) (`bun run --filter @ultimat3/effects catalog`, drift is a red `x verify`); this page is the contract every entry meets.
6
+
7
+ ## The rule
8
+
9
+ Server-rendered first. Works at 0 kB JS in its CSS tier. Enhances inside an island. **A fallback is not a prop — the static frame is the fallback.** The one exception, `EffectCanvas`, takes `fallback` as a required prop, so the type refuses a canvas with none.
10
+
11
+ ## The contract: four tiers
12
+
13
+ Every root element carries `data-effect-backend`.
14
+
15
+ | Tier | When | `data-effect-backend` |
16
+ |---|---|---|
17
+ | static | reduced motion, `data-motion="paused"`, or an entry with no CSS animation — a still frame | `static` |
18
+ | CSS | server render of an entry whose CSS animates (every `site/` page; any island before hydration). CSS itself freezes it under reduced motion; the label stays `css` | `css` |
19
+ | Canvas2D | island, no WebGL2 | `canvas` |
20
+ | WebGL2 | island, `getContext('webgl2')` succeeds and is not lost | `webgl2` |
21
+
22
+ | Rule | Held by |
23
+ |---|---|
24
+ | First frame is computed by the same function as animated frame 0 — no flash | each entry's `*-view.test.ts` |
25
+ | Canvas is `aria-hidden`; DPR capped from one token; colours from resolved role tokens only | `*-view.test.ts`; the raw-colour guard |
26
+ | Paused by `frameLoop` on reduced motion, hidden tab, offscreen, `MotionToggle` ([Motion](Motion)) | backend-selection tests |
27
+ | Zero network: no `fetch`, `sendBeacon`, `XMLHttpRequest`, `WebSocket` from any entry | `network-seal.test.ts` (1,000 frames, every entry) |
28
+ | A canvas, `getContext('webgl…')` or `navigator.gpu` in app code outside `EffectCanvas` | `guard-effect-without-fallback` (warning in an existing app, error in a new one) |
29
+ | No WebGL2 is a backend, never an error | no code exists for it |
30
+
31
+ A bad prop value is `X_EFFECTS_INVALID_VALUE` ([Error codes](Error-Codes-effects)).
32
+
33
+ ## Catalogue
34
+
35
+ | Entry | Kind | Notes |
36
+ |---|---|---|
37
+ | `Aurora` | background | CSS tier by default; themes with dark/brand |
38
+ | `GradientOrbs` | background | transform/opacity only; pauses offscreen and hidden |
39
+ | `MosaicGrid` | background | Canvas2D with a server-rendered first frame — never a blank canvas |
40
+ | `GridGlow` | background | extends `grid-texture`; withdrawn under `prefers-contrast` |
41
+ | `Noise` | background | static SVG turbulence, no animation frame |
42
+ | `ShaderBackground` | background | `preset: 'mesh' \| 'grain' \| 'dots'`; each preset is its own lazy chunk where the island build splits (a lone island inlines all three, [Known gaps](Known-Gaps)); reduced motion is speed 0 on a fixed frame |
43
+ | `SpotlightCard` | interaction | keyboard focus gets the same highlight as the pointer |
44
+ | `Tilt` | interaction | off for coarse pointers and inside focus traps; capped angle |
45
+ | `GlassSurface` | surface | opaque under `prefers-reduced-transparency`; contrast checked against the role pairs |
46
+ | `Marquee` | interaction | pauses on hover, focus-within and `MotionToggle`; duplicate track is `aria-hidden`; logical (RTL-safe) direction |
47
+ | `TextReveal` | text | `by: 'word' \| 'line' \| 'char'`; one readable node plus an `aria-hidden` split; `Intl.Segmenter` with the locale |
48
+ | `CountUp` | text | final value server-rendered; `Intl.NumberFormat` with the `useUi()` locale; `Money`-aware |
49
+ | `Shimmer` | text/surface | consumes `@mixin shimmer` from `@ultimat3/ui` — the same sweep `Skeleton` uses |
50
+ | `EffectCanvas` | escape hatch | `<EffectCanvas draw fallback>`; `fallback` required by type |
51
+
52
+ A new effect is a new row in a later sweep, under this same contract: one PR each.
53
+
54
+ ## Ideas only
55
+
56
+ Reference libraries (Paper Shaders, shaders.com, Motion, React Bits, 21st.dev, reui, shadcn) are studied for behaviour and technique. **No code is copied, and none is added as a dependency.** React Bits is MIT with the Commons Clause, which forbids redistributing a ported version: its source is never opened for this repo. Rule stated in `packages/effects/CLAUDE.md`; verdicts in `docs/idea/18-build-vs-wrap.md`.
57
+
58
+ ## Reduced motion
59
+
60
+ | Setting | Result |
61
+ |---|---|
62
+ | `prefers-reduced-motion: reduce` | CSS animations freeze (`reset.scss`); canvas and shader entries draw their frame 0 and stop; backend reads `static` |
63
+ | `data-motion="paused"` (`MotionToggle`) | same as above, user-chosen, persists |
64
+ | `prefers-contrast: more` | `GridGlow` withdrawn |
65
+ | `prefers-reduced-transparency` | `GlassSurface` opaque |
66
+
67
+ `x shot --all-islands` photographs each island in the states its `*.island.states.ts` declares (the harness emulates colour scheme, not reduced motion or a missing WebGL2 — reduced motion and the canvas fallback are held by the unit tests); the verdict's `gpu` block reports `webgl2` beside WebGPU so a blank canvas is read as the machine or the app.
68
+
69
+ ## Budgets
70
+
71
+ `scripts/effects-bytes.test.ts` builds a one-entry island per effect (minified, `solid-js` external) and holds it to a ceiling.
72
+
73
+ | Claim | Pinned by |
74
+ |---|---|
75
+ | CSS-tier entries (`Aurora`, `GridGlow`, `Noise`, `GlassSurface`, `Shimmer`, `Marquee`, `TextReveal`) are 0 B of JS | no client-only machinery in their source or browser build |
76
+ | Every other entry stays under its ceiling | one ceiling per entry in the test |
77
+ | A shader preset is paid for only by the page that uses it | entry chunk holds no GLSL; `mesh`, `grain`, `dots` each a lazy chunk |
78
+
79
+ A ceiling is a measurement, not a number to game: raise one with the measured bytes and the reason in the same diff (`bun run budget-raises`, `X_BUDGET_RAISE_UNSTATED`). Never cut an effect to hold a figure.
80
+
81
+ ## See also
82
+
83
+ [UI components](UI-Components) · [Motion](Motion) · [Interface rules](Interface-Rules) · [Theming](Theming)
package/wiki/FAQ.md CHANGED
@@ -33,7 +33,7 @@ What it does **not** claim:
33
33
 
34
34
  ### What is actually finished?
35
35
 
36
- All 30 packages, implemented and tested — not skeletons. The eight primitives, HTTP, rendering, caching, realtime tiers 1–3 (tier 3 opt-in, since 21.0.0), auth, mail, storage, jobs, the AI-first surface (MCP, `llm()`, evals), and admin + generators + `x new`. Milestones 0–11 are ✅ and enforced by `x verify`'s `roadmap` step; milestone 11's deploy proof closed `As of 2026-09-24`, when `ci.yml`'s `deploy-proof` job upgraded an app in kind with 0 of 9,028 requests failed (Compose is the single-node rung and makes no invisible-restart claim). Each milestone ends in a **working demo app plus green `x verify`**, and the same demo app grows through all twelve. [`docs/idea/14-roadmap.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/14-roadmap.md) is the source of truth for those markers.
36
+ All 31 packages, implemented and tested — not skeletons. The eight primitives, HTTP, rendering, caching, realtime tiers 1–3 (tier 3 opt-in, since 21.0.0), auth, mail, storage, jobs, the AI-first surface (MCP, `llm()`, evals), and admin + generators + `x new`. Milestones 0–11 are ✅ and enforced by `x verify`'s `roadmap` step; milestone 11's deploy proof closed `As of 2026-09-24`, when `ci.yml`'s `deploy-proof` job upgraded an app in kind with 0 of 9,028 requests failed (Compose is the single-node rung and makes no invisible-restart claim). Each milestone ends in a **working demo app plus green `x verify`**, and the same demo app grows through all twelve. [`docs/idea/14-roadmap.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/14-roadmap.md) is the source of truth for those markers.
37
37
 
38
38
  ### What is left?
39
39
 
@@ -244,4 +244,4 @@ $ x verify
244
244
 
245
245
  ## Status
246
246
 
247
- `As of 2026-08-23`. Stable API — semver from here ([Upgrading](Upgrading); `x upgrade` moves one major per run). The repository holds 30 `@ultimat3/*` packages plus the unscoped `create-ultimate` and versions all 30 in lockstep. Every major so far has been a correctness sweep with no codemod, so each `BREAKING —` entry names its own manual edit; [Upgrading](Upgrading) walks all of them, oldest first, and each section states its own count. Only the [footer](_Footer) stamps a version number, and this page states none. **What `bunx create-ultimate myapp` installs is npm's `latest`**, one version for all 31 workspaces, each published by the release workflow over OIDC with a provenance attestation. Resolve it, do not trust this line — `npm view @ultimat3/core version`, and `npm view @ultimat3/core dist.attestations` for the attestation. **No publication holes**: `@ultimat3/scraping` was the last never-published package, bootstrapped by hand at 2.0.0, so `bun add @ultimat3/scraping` resolves. Milestones 0–10 are ✅; milestone 11 is 🚧, open on its two-platform deploy proof. Realtime tiers 1–2 ship, and tier 3 (local-first) shipped in 21.0.0, opt-in per entity (`entity(name, { persist: true })`). The 50k-socket forced-restart benchmark **is measured and committed** — first patch on the reconnected socket at p50 54.0s / p90 105.5s, on one node; delivery is a second run, 10,000 clients, 1,666,882 patches, 0 observed sequence gaps ([Realtime](Realtime)). Status markers come from [`docs/idea/14-roadmap.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/14-roadmap.md). See [FAQ](FAQ).
247
+ `As of 2026-08-23`. Stable API — semver from here ([Upgrading](Upgrading); `x upgrade` moves one major per run). The repository holds 31 `@ultimat3/*` packages plus the unscoped `create-ultimate` and versions all 30 in lockstep. Every major so far has been a correctness sweep with no codemod, so each `BREAKING —` entry names its own manual edit; [Upgrading](Upgrading) walks all of them, oldest first, and each section states its own count. Only the [footer](_Footer) stamps a version number, and this page states none. **What `bunx create-ultimate myapp` installs is npm's `latest`**, one version for all 32 workspaces, each published by the release workflow over OIDC with a provenance attestation. Resolve it, do not trust this line — `npm view @ultimat3/core version`, and `npm view @ultimat3/core dist.attestations` for the attestation. **No publication holes**: `@ultimat3/scraping` was the last never-published package, bootstrapped by hand at 2.0.0, so `bun add @ultimat3/scraping` resolves. Milestones 0–10 are ✅; milestone 11 is 🚧, open on its two-platform deploy proof. Realtime tiers 1–2 ship, and tier 3 (local-first) shipped in 21.0.0, opt-in per entity (`entity(name, { persist: true })`). The 50k-socket forced-restart benchmark **is measured and committed** — first patch on the reconnected socket at p50 54.0s / p90 105.5s, on one node; delivery is a second run, 10,000 clients, 1,666,882 patches, 0 observed sequence gaps ([Realtime](Realtime)). Status markers come from [`docs/idea/14-roadmap.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/14-roadmap.md). See [FAQ](FAQ).
package/wiki/Home.md CHANGED
@@ -108,7 +108,7 @@ Follow in order. Each page states what it was executed against in its own first
108
108
  | [I18n](I18n) | flat catalogs, loud misses, locale routing, `hreflang` |
109
109
  | [Theming](Theming) | 24 semantic colour roles as RGB channels, every token scale, breakpoint and layout mixins, `defineTheme()`, what contrast is gated |
110
110
  | [Interface rules](Interface-Rules) | how a screen must behave, and which of the app's `guards/` refuses each rule |
111
- | [UI components](UI-Components) | the four page composites, and the generated catalog of 100 source-derived UI components |
111
+ | [UI components](UI-Components) | the four page composites, and the generated catalog of 101 source-derived UI components |
112
112
  | [Timezones and dates](Timezones-And-Dates) | store UTC, format with an explicit IANA zone, frozen clocks in tests |
113
113
  | [Money](Money) | `Money = { minor, currency }`, never a float |
114
114
  | [Outbound HTTP](Outbound-HTTP) | `outbound()`: one vendor call with a whole-call deadline, the caller's signal, safe-only retry, idle and byte bounds, `dial: 'public'` pinning, and `breaker()` |
@@ -157,6 +157,6 @@ Follow in order. Each page states what it was executed against in its own first
157
157
  | [`docs/ops/`](https://github.com/developerz-ai/ultimate/tree/main/docs/ops) | running an app for real: the PaaS → Compose → Kubernetes ladder, secrets, observability, datastore sizing, disaster recovery, runbooks. **Recommendations only** — the framework depends on none of it |
158
158
  | [`docs/idea/16-app-targets.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/16-app-targets.md) | three targets, one backend, two view layers — **design only, not shipped behaviour** |
159
159
  | [`docs/idea/17-scale-ladder.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/17-scale-ladder.md) | why the app code is identical at rung 0 and rung 4 — **shipped, not design only**: all 26 seam rows are marked shipped, rungs 0–2 are real, and the places the invariant breaks today are named |
160
- | [`packages/ui/CATALOG.md`](https://github.com/developerz-ai/ultimate/blob/main/packages/ui/CATALOG.md) | the full catalog of 100 source-derived UI components with every prop, generated from source and drift-tested |
160
+ | [`packages/ui/CATALOG.md`](https://github.com/developerz-ai/ultimate/blob/main/packages/ui/CATALOG.md) | the full catalog of 101 source-derived UI components with every prop, generated from source and drift-tested |
161
161
  | [`framework.manifest.json`](https://github.com/developerz-ai/ultimate/blob/main/framework.manifest.json) | every package, tier, and `X_*` code with its owner — generated |
162
162
  | [llms.txt](https://github.com/developerz-ai/ultimate/blob/main/llms.txt) | the machine-readable repo map for agents |
@@ -22,7 +22,7 @@ are on an earlier version, treat those rows as open and take the workaround. `[U
22
22
  truth for what the next release carries, and most of what it fixes was never a row here. Read that section rather than this sentence: `grep -n '^## '
23
23
  CHANGELOG.md` finds its bounds, and it changes on any commit.
24
24
 
25
- **Publication is not a gap.** All 31 workspaces are on the registry, every one with a provenance attestation, `As of 2026-11-10` by `bun run scripts/registry-audit.ts --json`, which `registry-audit.yml` re-runs daily;
25
+ **Publication is not a gap.** All 32 workspaces are on the registry, every one with a provenance attestation, `As of 2026-11-10` by `bun run scripts/registry-audit.ts --json`, which `registry-audit.yml` re-runs daily;
26
26
  `@ultimat3/scraping` was the last never-published package and was bootstrapped by hand at 2.0.0
27
27
  ([`PUBLISHING.md`](https://github.com/developerz-ai/ultimate/blob/main/PUBLISHING.md) step 1).
28
28
  `bun add @ultimat3/scraping` resolves — check it with `npm view @ultimat3/scraping version`.
@@ -35,6 +35,7 @@ Every row carries its decision, `As of 2026-11-18`: **build** is owed work, a de
35
35
  |---|---|---|---|
36
36
  | A pod evaluates the framework from **source**, one module at a time — ~28 Mi of resident memory per pod that a bundle would not hold | deferred | `As of 2026-10-01`, measured on the framework serve graph alone: 1,071 modules from source settle at **80.4 Mi**; the same graph as one `bun build --target=bun` file is 5 modules and settles at **51.8 Mi** — ~34 kB of RSS per source module, the runtime's cost and not the code's. It is the largest saving left after the per-role load and the prebuilt store (a web pod of the demo app settles at 97–102 Mi, a worker at 80–85 Mi). **Not a patch**: a registry is a module instance, so the framework bundled apart from the app is two `@ultimat3/jobs`, two `@ultimat3/entity` — the app registers into one and the boot reads the other. The unit has to be the app **and** the framework as one graph, per role, built inside the image build from a generated entry that imports what `scanAppModules` would, with the `.tsx`/`.scss` loaders as build plugins. Containers only either way (axiom 7). Design note: [`docs/architecture/13-topology-runtime.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/architecture/13-topology-runtime.md#not-built-one-bundle-per-role). Deferred `As of 2026-11-18`: it changes what an image contains and how a role resolves its app, so it needs a plan of its own. pin: none — a resident-memory measurement of a running pod, not a behaviour a unit test can assert | nothing to do in an app. Size a pod's memory request from `process_resident_memory_bytes` on `/metrics`, not from a guess |
37
37
  | Every role evaluates all of `@ultimat3/jobs` — 96 modules (`As of 2026-10-02`, by file) — whatever it runs | deferred | `As of 2026-10-01`, read off the serve graph by the names each role's code uses: a `web` pod needs 43 of them (enqueue, the outbox relay, the purge task), a `scheduler` 46, a `worker` 62. The rest ride the barrel: `worker.ts` and its eighteen dependencies in a web pod, the `backfill()` / `exportJob()` / `webhook()` factories (17 modules, 123 kB of source) in an app that declares none, and the memory driver (3 modules) outside a test. ~1.6 Mi per web pod at the measured 34 kB a module. Closing it means subpath entries (`@ultimat3/jobs/worker`, one per factory) and every importer rewritten — a breaking move for a saving the per-role bundle above makes moot, so it waits on that decision. The operator surface is **not** in this list: `JobIntrospection` is a member of the driver, and the worker announces itself and counts settles through it pin: none — a module count read off a role's serve graph, measured rather than asserted | nothing to do in an app |
38
+ | A lone island is bundled without code splitting, so Bun inlines every dynamic `import()` — `ShaderBackground` then carries all three presets (~4.3 kB min) | deferred | `As of 2026-11-28`, measured by `scripts/effects-bytes.test.ts` against `packages/cli/src/island-bundle.ts` | put the `ShaderBackground` island on a page with a second island, which builds with splitting; or accept the 4.3 kB. [pin](https://github.com/developerz-ai/ultimate/blob/main/scripts/effects-bytes.test.ts#known%20gap%3A%20an%20unsplit%20build%20%28a%20lone%20island%29%20inlines%20every%20preset%20into%20the%20entry) |
38
39
  | `onSettled` for a completion that **returned a value** runs at most once across a crash | deferred | `As of 2026-11-14`. Every other ending is at least once: the write that settles the row records the debt (`x_jobs.settle_owed`) and the scheduler leader re-drives a dead worker's with `redriven: true, reason: 'lost'` — failures, dead letters, refusals, completions whose body returned `undefined`, and the rows the CLAIM settles (a final-attempt lease lapse buried `dead`, an expired row: `ClaimOptions.settleOwed`, `packages/jobs/src/claim-exhausted.ts`). A body's return value is never stored (`x_jobs` has no result column), so a re-drive could only hand `result: undefined` to a hook typed for a value; on a minor that would break every `onSettled` reading `result`. Storing the result, and so at-least-once for every completion, is planned for `next` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/settle-redrive.test.ts#a%20completion%20that%20returned%20a%20value%20owes%20nothing%3A%20told%20once%2C%20at%20most%20once) | write what must be recorded for certain inside the body, in a `step.run`; or have the body return nothing and read what it wrote from there |
39
40
  | A `step.run` output past 256 KiB is stored with a warning, not refused | deferred | `As of 2026-11-12`. Undeclared, `STEP_OUTPUT_MAX_BYTES` logs `jobs.step.output-too-large` (`X_STEP_OUTPUT_TOO_LARGE`) once per job and step and stores the output, because refusing by default would fail shipped jobs on a minor; every attempt still loads it. Refusal by default is planned for `next` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/steps-output.test.ts#the%20default%20256%20KiB%20warns%20once%20per%20job%20and%20step%2C%20with%20the%20code%2C%20and%20still%20stores) | declare `job({ stepOutputMax: 262_144 })` to be refused now, and persist the payload, returning its key from the step |
40
41
  | A live cursor with no signature still resumes from where it left off | deferred | `As of 2026-11-27`. Since 31.52.0 a cursor carries `sig`, an HMAC over its position; a mismatched one cold-starts. A cursor with no `sig` — a client built before it, or one that removed its own — still takes the delta path and is counted (`registry.unsignedCursors`, `onUnsignedCursor`), because refusing it would cold-start every open tab on a minor. Treating anything but a matching `sig` as a cold start flips on `next` (#1280) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/realtime/src/live-resume-signed.test.ts#takes%20the%20legacy%20path%20%E2%80%94%20a%20delta%20%E2%80%94%20and%20is%20counted) | watch `onUnsignedCursor`: it counts every resume that sends no `sig` at all — an old build, or a client that stripped its own — so zero means nothing resumes unsigned, not only that every client is upgraded |
@@ -79,7 +80,7 @@ Each of these is a defect, or a target, somebody has already argued about, and t
79
80
  | A `stream` page with a realtime island keeps every island on the page inert until its slowest hole closes | `As of 2026-11-02`. The runtime goes `async` so a shell island answers while a hole is open, but only with no realtime boot in the document: the boot (`script defer`) has to run first (`bootScript`, [`packages/cli/src/route-islands.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/route-islands.ts)), and a deferred script waits for parsing to end. Bound by the hole's 15 s deadline. **Why it stays** (`As of 2026-11-18`): The realtime boot has to run before the hydration runtime (`streamScripts`, `packages/cli/src/route-islands.ts`), or an island mounts over a store not yet restored, and a deferred script waits for parsing to end. `DEFAULT_HOLE_TIMEOUT_MS` bounds the wait. **Do instead:** keep the slow read out of such a page's holes, or give it a short deadline of its own: `fetch(url, { signal: AbortSignal.timeout(2_000) })`. |
80
81
  | An open tab can meet a dead island across a deploy | `As of 2026-11-12`. A web process serves only the hashed files it built, so with `assets.retain` unset (the default) a tab holding the previous build's document gets a `no-store` 404 for its stylesheet, or for its island chunk on the first click, after every deploy; during a rolling update a new document that reaches an old pod gets no stylesheet either. What the framework does about the stylesheet half without a window: a soft navigation whose next sheet fails never swaps an unstyled page in (a GET becomes a full load, the old sheet stays) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-stylesheet-skew.test.ts#a%20GET%20is%20loaded%20by%20the%20browser%3B%20the%20page%20on%20screen%20keeps%20its%20sheet); a full load whose sheet 404s stays unstyled — the framework does not reload it, as a reload it cannot tell from a missing file offline or under a test harness is a navigation nobody asked for. A web role booted outside development and test with no window logs `X_ASSET_RETAIN_UNDECLARED` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/retained-assets-boot.test.ts#undeclared%3A%20nothing%20is%20published%20and%20there%20is%20no%20reader). Declared, a tab survives six deploys with build 0's island alive [evidence](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/e2e/six-deploys.e2e.test.ts#with%20assets.retain%2C%20the%20click%20boots%20build%200%E2%80%99s%20island%3A%20its%20chunk%20200%2C%20no%20404%2C%20an%20update%20offered) **Why it stays** (`As of 2026-11-18`): Retention needs a disk every web pod reads, and only the app can name one. Undeclared, boot says so by code. **Do instead:** declare `assets: { retain: { disk, builds } }` over a disk every web pod reads → [Deployment](Deployment#hashed-assets-across-a-deploy--assetsretain) |
81
82
  | A job's `runAt` is stamped from the enqueuer's clock | `As of 2026-10`. An enqueuer running ahead of the database delays its own "immediate" jobs; up to 1 s ahead still wakes a worker, beyond that the job starts on the poll. A delayed job enqueued by another process starts within the idle ceiling after its `runAt` — 5 s with a proven wake, 2 s without; only a retry or a sleep the worker itself handed back gets a due-time timer. **Why it stays** (`As of 2026-11-18`): `runAt` comes from the injected `Clock` (`packages/jobs/src/driver-pg.ts`, `enqueue-record.ts`), the one a frozen-clock test drives and the outbox stamps at stage time, before any row exists. A database clock would split those. **Do instead:** NTP on every pod; for a deadline tighter than the ceiling, enqueue at the moment the work is due rather than with `runAt`. |
82
- | The CDP driver cannot PIN a name, and a page's WebSocket is not screened at all | `As of 2026-11`. Measured on Chrome 150 with `localBrowser()`: interception (page-level and the browser-level `Fetch` that now covers popups) never pauses a WebSocket handshake, so `new WebSocket('ws://off-list/…')` from a scraped page connects. Since 31.0.0 a host a wildcard admitted is resolved before the browser leg releases it, and an inward or unresolvable answer is refused (`packages/scraping/src/browser-dial.ts`). But the browser then resolves again for itself, so a name that answers public to the screen and private to Chrome (DNS rebinding) is reached — the HTTP leg and the robots read resolve and pin (`packages/scraping/src/pinned-host.ts`), the browser cannot be pinned through this port — [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/scraping/src/cdp-arm-dial.test.ts#a%20screened%20name%20is%20continued%20by%20request%20id%20only%2C%20never%20pinned%20to%20the%20approved%20address) **Why it stays** (`As of 2026-11-18`): Interception never pauses the handshake and this port cannot hand Chrome a resolved address, so no driver code closes it. The boundary that can is the network's: the `egress` proxy. **Do instead:** list exact hosts rather than `'*'` on a scrape that runs where private addresses are reachable, and dial a scrape through an `egress` proxy outside that network. |
83
+ | The CDP driver cannot PIN a name, and a page's WebSocket is not screened at all — `x design research` and `x shot` too | `As of 2026-11`. Measured on Chrome 150 with `localBrowser()`: interception (page-level and the browser-level `Fetch` that now covers popups) never pauses a WebSocket handshake, so `new WebSocket('ws://off-list/…')` from a scraped page connects. Since 31.0.0 a host a wildcard admitted is resolved before the browser leg releases it, and an inward or unresolvable answer is refused (`packages/scraping/src/browser-dial.ts`). But the browser then resolves again for itself, so a name that answers public to the screen and private to Chrome (DNS rebinding) is reached — the HTTP leg and the robots read resolve and pin (`packages/scraping/src/pinned-host.ts`), the browser cannot be pinned through this port — [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/scraping/src/cdp-arm-dial.test.ts#a%20screened%20name%20is%20continued%20by%20request%20id%20only%2C%20never%20pinned%20to%20the%20approved%20address) **Why it stays** (`As of 2026-11-18`): Interception never pauses the handshake and this port cannot hand Chrome a resolved address, so no driver code closes it. The boundary that can is the network's: the `egress` proxy. **Do instead:** list exact hosts rather than `'*'` on a scrape that runs where private addresses are reachable, and dial a scrape through an `egress` proxy outside that network. |
83
84
  | `ScrapeReport.usage.bytesIn` counts the HTTP leg only | `As of 2026-10`. The CDP port subscribes to requests, not to their sizes, so the browser leg's bytes are not in the figure (`packages/scraping/src/usage.ts`) **Why it stays** (`As of 2026-11-18`): The field is defined as the HTTP leg (`packages/scraping/src/usage.ts`): this port sees requests, not sizes, and a browser figure would be a guess. The extension point is the resolver's `cost`. **Do instead:** treat `bytesIn` as a lower bound; a provider's own byte count, returned through the resolver's `cost`, is the billable one. |
84
85
  | An org-scoped operator's runs list reads `x_jobs` with no index on `tenant_id` | `As of 2026-10`. The jobs dashboard keeps an actor with an `orgId` to its own org's runs through `JobFilter.tenantId`, and `x_jobs.tenant_id` is a plain column: the only index naming it is the idempotency one, led by `name` (`packages/jobs/src/driver-pg-ddl.ts`). A platform operator's list is unaffected [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/driver-pg-sql.test.ts#no%20x_jobs%20index%20leads%20with%20tenant_id%3A%20an%20org-scoped%20runs%20list%20scans) **Why it stays** (`As of 2026-11-18`): Every enqueue would pay one more index on the queue's hottest table for a read only an org-scoped dashboard issues, and the index is one migration for the app that needs it. **Do instead:** on a large queue, add `create index on x_jobs (tenant_id, created_at desc, id desc)` in an app migration, or operate the dashboard as a platform operator (an actor with no `orgId`) |
85
86
  | 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. |
@@ -4,6 +4,10 @@ The differentiator. Not a chat widget, not an "AI SDK integration" — the frame
4
4
 
5
5
  `As of 2026-08`. Stable API — semver from here ([Upgrading](Upgrading)). The MCP registry, wire protocol, dev-tool catalog, read-only SQL guard, and action projection are built, and so are the four that used to be contracted: `llm()` is an action factory ([`packages/ai/src/llm.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/ai/src/llm.ts)), prompts are versioned, `postgresVectorStore()` fuses pgvector cosine with Postgres FTS via RRF, and evals gate on a committed baseline inside `x verify`'s `eval` step.
6
6
 
7
+ ## The agent kit
8
+
9
+ An app carries the skills and subagents that make an agent useful in it: `.claude/skills/{feature,planx,verify,upgrade,design-research}` and `.claude/agents/{shape,data,server,web,audit}`. They are generated from framework source and name this server's tools (`graph.query`, `tests.run`, `verify.narrow`, `db.explain`, `requests.statements`, `ui.research`), so an agent calls the MCP tool instead of grepping. `bunx x kit` rewrites them, `x upgrade` refreshes them, and `x verify` fails an edited one with `X_KIT_DRIFT`. The table of every entry: [Agents](Agents#the-agent-kit-skills-and-agents-every-app-gets).
10
+
7
11
  ## Built-in MCP dev server
8
12
 
9
13
  `x mcp serve` is the dev-tool server, over stdio or HTTP; `x dev` does not start it. Point any MCP client at it and the agent stops guessing. A new app's `.mcp.json` already names it — [Client config](#client-config).
package/wiki/Motion.md ADDED
@@ -0,0 +1,85 @@
1
+ # Motion
2
+
3
+ `@ultimat3/ui/motion`: one animation engine, the browser's own WAAPI, driven by the motion token
4
+ scale. Every engine is ours. No runtime dependency, and no second way to animate.
5
+
6
+ `As of 2026-11`. Stable API, semver from here ([Upgrading](Upgrading)). Issue #1374.
7
+
8
+ | Rule | Enforced by |
9
+ |---|---|
10
+ | Timing comes from tokens, never a literal | `motionTiming` reads `--duration-*` / `--easing-*`; the `raw-motion` guard refuses a literal duration or `cubic-bezier(` in app TS and SCSS |
11
+ | Reduced motion and the reader's pause still everything | `motionAllowed()` in every module; `reset.scss` and `theme.scss` for CSS |
12
+ | No layout property animates | `animate` frames accept none (a type error); `animated-layout-property` refuses one in `.animate(` keyframes and in SCSS |
13
+ | No second engine | the `motion-adapter` guard refuses `motion`, `framer-motion`, `gsap`, `animejs`, `solid-motionone`, `solid-transition-group`, … in app code |
14
+ | No bare frame loop | the `raw-frame-loop` guard refuses `requestAnimationFrame(` without a `// why:`; use `frameLoop` |
15
+ | A barrel island pays nothing for motion | `scripts/ui-motion-bytes.test.ts` pins zero motion modules, and a byte ceiling per entry |
16
+
17
+ ## The API
18
+
19
+ ```tsx
20
+ import {
21
+ animate, frameLoop, inView, layout, motionAllowed, motionTiming,
22
+ onMotionChange, Presence, PresenceList, scrollLinked, springLinear, springs, stagger,
23
+ } from '@ultimat3/ui/motion';
24
+ ```
25
+
26
+ | Export | What it does |
27
+ |---|---|
28
+ | `motionTiming(duration, easing?)` | `{ duration, easing }` in WAAPI's units, from the RESOLVED custom properties, so `defineTheme({ motion })` applies. Stilled: `0.01` ms, never `0` (no finish event) |
29
+ | `animate(el, frames, options?)` | typed frames, `x` · `y` · `scale` · `scaleX` · `scaleY` · `rotate` · `opacity` · `filter` · `clipPath` · `origin` · `offset`, composed into one `transform`. Options: `duration` (a rung), `easing` (a rung or a spring), `delay`, `fill: 'backwards' \| 'both'`. Answers `{ finished, cancel, reverse }`; `finished` never rejects |
30
+ | `stagger(els, frames, { each, limit })` | each element starts one `each` (a duration rung, default `fast`) after the last; past `limit` (8) they start together |
31
+ | `inView(el, onEnter, { once, margin, amount })` | one shared `IntersectionObserver` per `(margin, amount)`. `once` defaults to `true`; with `once: false` a function `onEnter` returns is called on the exit. No observer: in view at once |
32
+ | `scrollLinked(el, frames, { source, axis, range })` | progress along a view timeline (the element crossing its viewport) or a scroll timeline, the engine behind CSS `animation-timeline`. Unsupported or stilled: the element rests |
33
+ | `layout(els, change, { scale })` | FLIP. Every box is read, `change()` runs, every box is read, then each moved element plays from its old place. `scale: true` also inverts size |
34
+ | `<Presence>` | enter and exit for one value. Props: `when`, `as`, `enter`, `exit`, `duration`, `easing`, `exitBeforeEnter`, `appear`, `onExit`, `class`. Owns its wrapper element; an exit is held until it finishes; turning back mid-flight reverses from the current value |
35
+ | `<PresenceList>` | the same for a keyed list: `each`, `key`, `as` (`ul` · `ol` · `div`), one root per key; a removed item exits in place |
36
+ | `frameLoop(tick, { el })` | the one per-frame loop. `tick(dt, now)`; stops on reduced motion, the reader's pause, a hidden tab, `el` offscreen; `dt` is 0 after any stop. Returns the stop |
37
+ | `motionAllowed()` · `onMotionChange(fn)` | false under `prefers-reduced-motion` or `html[data-motion="paused"]`; `fn(allowed)` on each change |
38
+ | `springs` · `springLinear({ stiffness, damping, mass })` | the rungs `gentle` · `snappy` · `bouncy`, committed as `linear()` curves and emitted as `--easing-<name>`; the generator for a rung of your own |
39
+
40
+ On the barrel, not the subpath: `MotionToggle`, the WCAG 2.2.2 pause. It writes
41
+ `data-motion="paused"` on `<html>`, remembers the choice, and stills every CSS animation and
42
+ transition plus every script above. In SCSS: `t.easing(snappy)` is a spring, and
43
+ `@include t.view-transition-name(post-#{$id})` names an element for render's route view transition.
44
+
45
+ ```tsx
46
+ import { Card } from '@ultimat3/ui';
47
+ import { layout, Presence } from '@ultimat3/ui/motion';
48
+
49
+ declare const saved: () => boolean;
50
+ declare const cards: HTMLElement[];
51
+ declare const reorder: () => void;
52
+
53
+ export const toast = (
54
+ <Presence when={saved()} easing="snappy">
55
+ <Card>Saved</Card>
56
+ </Presence>
57
+ );
58
+ layout(cards, reorder);
59
+ ```
60
+
61
+ ## From React and Motion
62
+
63
+ React islands are declined ([FAQ](FAQ#why-no-react-and-no-rsc)). What a Motion or shadcn
64
+ example reaches for, and what to write here:
65
+
66
+ | Motion / React | Ultimate |
67
+ |---|---|
68
+ | `motion.div animate={…}` | `animate(el, frames, { duration, easing })` |
69
+ | `transition={{ type: 'spring', stiffness, damping, mass }}` | `easing: 'gentle' \| 'snappy' \| 'bouncy'`, or `springLinear({ stiffness, damping, mass })` |
70
+ | `AnimatePresence` | `<Presence when>`; `mode="wait"` → `exitBeforeEnter`; `initial={false}` is the default (`appear` opts in) |
71
+ | `AnimatePresence` over a `.map()` | `<PresenceList each key>` |
72
+ | `layout` · `layoutId` | `layout(els, change)` in a page; `@include t.view-transition-name(…)` across pages |
73
+ | `whileInView` · `useInView` | `inView(el, onEnter, { once, margin, amount })` |
74
+ | `useScroll` + `useTransform` | `scrollLinked(el, frames, { source, range })` |
75
+ | `staggerChildren` · `stagger()` | `stagger(els, frames, { each })` |
76
+ | `useAnimationFrame` | `frameLoop(tick, { el })` |
77
+ | `useReducedMotion` · `MotionConfig reducedMotion` | `motionAllowed()` · `onMotionChange(fn)`; always on, nothing to configure |
78
+ | shadcn / Radix `Dialog`, `Sheet`, `Toast`, `Tooltip`, … | the `ui` component with the same job: `Dialog`, `Drawer`, `Toast`, `Tooltip` ([UI components](UI-Components)) |
79
+
80
+ ## Why it is built, not wrapped
81
+
82
+ Motion's hybrid `animate` is 26.95 kB gzip, past an island's 20,480 B raw default. `motion/mini`
83
+ is plain WAAPI. Neither handles reduced motion on the vanilla path. Minified island bytes, `As of
84
+ 2026-11-28`: `animate` 7,272 B, `inView` + `stagger` 8,866 B, `layout` 7,982 B, `frameLoop` 6,539 B alone, ~3.4 kB of each the coded error every ui component already ships.
85
+ The record: [build vs wrap](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/18-build-vs-wrap.md).
@@ -131,7 +131,7 @@ Inside the framework repo, a package may import from **strictly lower** tiers on
131
131
  | 2 | `entity`, `policy`, `http`, `auth` | tier 0–1 |
132
132
  | 3 | `action`, `query`, `jobs`, `realtime` | tier 0–2 |
133
133
  | 4 | `render`, `pwa`, `mcp`, `ai`, `manifest`, `mail`, `ui`, `notify`, `scraping` | tier 0–3 |
134
- | 5 | `admin`, `testing`, `cli` | tier 0–4 |
134
+ | 5 | `admin`, `testing`, `cli`, `effects` | tier 0–4 |
135
135
 
136
136
  The declared sideways edges are `SIDEWAYS_ALLOW` in [`scripts/lib/tiers.ts`](https://github.com/developerz-ai/ultimate/blob/main/scripts/lib/tiers.ts), the executable copy of both tables; [`llms.txt`](https://github.com/developerz-ai/ultimate/blob/main/llms.txt) carries a generated copy of the list. `admin → ui` was deleted 2026-08-19 by moving `ui` from tier 5 to 4 — the edge existed only to undo a placement two tiers above what `ui` actually imports.
137
137
 
@@ -334,7 +334,7 @@ Timings, worker counts and the `slowest:` lines trimmed:
334
334
  bunx x mcp serve --transport http --port 9229
335
335
  ```
336
336
 
337
- 23 tools, one catalog, the same on `stdio` and `http` — 18 framework tools (`routes.list`, `schema.describe`, `policies.list`, `actions.describe`, `jobs.inspect`, `queue.depth`, `manifest.read`, `errors.explain`, `docs.search`, `db.query`, `db.explain`, `db.migrate`, `tests.run`, `verify.run`, `verify.narrow`, `logs.tail`, `requests.statements`, `graph.query`) and five that look at the UI (`ui.shot`, `ui.island`, `ui.inspect`, `ui.interact`, `ui.diff`). `bunx x mcp tools` prints them with their scopes.
337
+ 24 tools, one catalog, the same on `stdio` and `http` — 18 framework tools (`routes.list`, `schema.describe`, `policies.list`, `actions.describe`, `jobs.inspect`, `queue.depth`, `manifest.read`, `errors.explain`, `docs.search`, `db.query`, `db.explain`, `db.migrate`, `tests.run`, `verify.run`, `verify.narrow`, `logs.tail`, `requests.statements`, `graph.query`) and six that look at the UI (`ui.shot`, `ui.island`, `ui.inspect`, `ui.interact`, `ui.diff`, `ui.research`). `bunx x mcp tools` prints them with their scopes.
338
338
 
339
339
  `createTodo` reaches an agent's tool list through the app's own surface in `packages/mcp/src/index.ts` (`defineAppMcp({ include: 'exposed' })`), carrying `mcp: { expose: true }` and **the action's own policy** as its authorization. Full model: [MCP and AI](MCP-And-AI).
340
340
 
@@ -20,6 +20,8 @@ head -7 node_modules/@ultimat3/ui/CATALOG.md # the count and every name, on on
20
20
  | Drift | `catalog.test.ts` compares the committed file byte-for-byte against a fresh build; a prop change with no regen is a red `x verify` |
21
21
  | Hand edits | refused by the same test — the file carries a `GENERATED` banner |
22
22
 
23
+ Backgrounds, interaction and text effects (`Aurora`, `SpotlightCard`, `CountUp`, `ShaderBackground`, …) are the optional [`@ultimat3/effects`](Effects) package, not part of this one.
24
+
23
25
  This page does **not** restate the catalog. It covers the four page composites, because they are the ones an agent picks wrong.
24
26
 
25
27
  **Which component to reach for is not the same question as how it must behave.** The four-state