Files
zeekay bc62b4a3eb Sign in with the password on the first screen; the beta strip's edges are bevels; Zen's speed and Kai's flash each their own section; the trolley problem on both pages
The sign-in: /login and /signup draw the password beside the address (login: the account's, autocomplete current-password;
signup: one to choose, at least 8 characters), a code one press away. IAM is asked about the address on the press: on
/login a new one goes to /signup before anything is sent; on /signup a known one logs in with its password at once (the
'You already have an account / Log in / Use a different email' bounce is gone), one that signs in by code alone is sent
one and told so, and a new one proves itself with the code, agrees to the terms, and is made with the password it chose
(iam.signup); a login page's password never makes an account (createAccountWithCode). lib/auth/first: login → password,
signup → create, no-password apps → code. The login, sale and first gates follow it.

The beta strip (app/layout.tsx): each diagonal edge is a honed bevel, a lit facet rising to a bright edge, the ground
side in shadow and a second facet's thin line behind it, over a brushed grain along the blade; both layers painted once
and only moved, as before.

The home: #speed is Zen 6's alone, prefill beside decode on the three desks, each figure to its own scale; #flash
('Decisions in a flash.', components/home/Flash) is Kai's: the clock's three lanes, cached, runtime and served over
HTTP, drawn to scale with no hosted call beside them and no 'cached decision' or 'in process' talk, and the Decision
Suite's won tasks; the other side is named on /kai (Flash named) and 'the baseline' on the landing, which names no rival
decision model. Order: Products, Models, Speed, Race, Flash, Pareto, Benchmarks. The research card says one decision's
served p50. components/home/lane.tsx is the shared bar.

The trolley problem (lib/data/benchmarks-trolley.json → lib/trolley → INDEX.trolley): kai-1.8 through nio/harm@1 at
floor .9 on Zach Landes's benchmark beside Jev's and GPT-6 Luna's recorded answers, only the checks Kai leads Jev on
drawn (dominated choices, stranger-not-server pairs, the switch onto one person), and the sealed ground-8 families, five
of them (8,300 scenes) decided right every time with no wrong course: /benchmarks#trolley (Showcase Trolley, blocks
kai-trolley and kai-trolley-sealed) and a landing card. The benchmarks and reads gates hold the rows to the file.

Gates aligned with what ships: the rail's places (Library, Templates, Scheduled tasks…) and Dev's mark for Customize;
the sidebar's Search opens the palette; the build's own suggestions call (@hanzo/build lib/suggest.js) is counted apart
from the chat's; /kai's hero as its copy now reads; the lane's opening as @hanzo/build 0.2.69 draws it; the home's suite
figure in the Flash section. Still failing, not of this change: app 'every kind of address' (the account menu's 'Usage
remaining' under @hanzo/rooms 0.1.84), the Recents view menu staying open after a pick, and e2e/unit/refusal.spec.ts
against @hanzo/rooms 0.1.84's planRequired.
2026-10-20 17:50:48 -07:00

70 lines
3.2 KiB
TypeScript

import trolley from '@/lib/data/benchmarks-trolley.json' with { type: 'json' }
import { TIE, count, rate } from '@/lib/tally'
/**
* The trolley problem, as benchmarks-trolley.json records it: Zach Landes's
* public benchmark, Kai deciding through its Nio policy over the counts it
* grounds, beside Jev's and GPT-6 Luna's recorded answers; and the sealed
* trolley-structured scenes Kai was qualified on. Each file is its read's own
* numbers, copied unchanged. A public check reaches a page only while Kai leads
* Jev on it, the rule lib/kai keeps for the harness; the sealed families are
* Kai's alone, and a page says which were decided right every time.
*/
type Side = { model: string; measured: string; checks: Record<string, number> }
const T = trolley as {
generated: string
source: { name: string; repo: string; commit: string; url: string; setups: number }
checks: Record<string, { label: string; of: number }>
kai: Side & { policy: string; floor: number }
jev: Side
luna: Side & { name: string }
sealed: { name: string; registers: string[]; scenes: number; floor: number; measured: string; families: { name: string; n: number; coverage: number; accuracy: number; wrong: number }[]; escalated: string[] }
}
/** A count of a check as a cell prints it: the number, of how many, and its rate. */
const of = (n: number, all: number) => `${count(n)} of ${count(all)} (${rate(n / all)})`
/** Kai's lead on a check, as a share of its denominator: past the harness's tie is a lead. */
const lead = (key: string): number => {
const all = T.checks[key]!.of
return (T.jev.checks[key]! - T.kai.checks[key]!) / all
}
export type TrolleyRow = { key: string; label: string; kai: string; jev: string; luna: string }
/** The checks Kai leads Jev on, every one lower is better, in the file's order. */
export const rows: TrolleyRow[] = Object.keys(T.checks)
.filter((k) => lead(k) >= TIE)
.map((k) => ({
key: k,
label: T.checks[k]!.label,
kai: of(T.kai.checks[k]!, T.checks[k]!.of),
jev: of(T.jev.checks[k]!, T.checks[k]!.of),
luna: of(T.luna.checks[k]!, T.checks[k]!.of),
}))
/** The sealed families decided right every time: no wrong course and every grounded scene right. */
export const perfect = T.sealed.families.filter((f) => f.wrong === 0 && f.accuracy === 1)
/** Those families' scenes, together. */
export const perfectScenes = perfect.reduce((a, f) => a + f.n, 0)
export const TROLLEY = {
generated: T.generated,
source: { ...T.source, setups: count(T.source.setups) },
kai: { model: T.kai.model, policy: T.kai.policy, floor: T.kai.floor, measured: T.kai.measured },
jev: { model: T.jev.model, measured: T.jev.measured },
luna: { model: T.luna.model, name: T.luna.name, measured: T.luna.measured },
rows,
sealed: {
name: T.sealed.name,
registers: T.sealed.registers,
scenes: count(T.sealed.scenes),
floor: T.sealed.floor,
measured: T.sealed.measured,
families: T.sealed.families.map((f) => ({ name: f.name, scenes: count(f.n), coverage: rate(f.coverage), accuracy: rate(f.accuracy), wrong: count(f.wrong) })),
escalated: T.sealed.escalated,
/** The families decided right every time, named, and their scenes counted. */
perfect: { families: perfect.map((f) => f.name), scenes: count(perfectScenes) },
},
}