Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/docs/design/DESIGN.md # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / docs / design / DESIGN.md` 438 lines · 17436 bytes Raw Blame History Rendered 1 --- 2 version: alpha 3 name: Allen 4 description: A night sky with one calm light in the middle. Allen's look on every screen AienOS draws. 5 colors: 6 primary: "#ECF0FC" 7 night: "#060812" 8 hint: "#96A0C4" 9 faint: "#828CB0" 10 glow: "#96AAFF" 11 mist: "#C8D2FF" 12 ink: "#4056C4" 13 warm: "#FFD496" 14 warm-soft: "#FFDEB4" 15 heart: "#FFD2AA" 16 heart-core: "#FFECD6" 17 halo: "#3C4AD2" 18 halo-violet: "#705CFF" 19 sky-glow: "#6E82FF" 20 panel: "#0C1026" 21 lit: "#3B446F" 22 typography: 23 voice: 24 fontFamily: Quicksand 25 fontSize: 27px 26 fontWeight: 400 27 lineHeight: 40px 28 letterSpacing: "0.02em" 29 body: 30 fontFamily: Quicksand 31 fontSize: 21px 32 fontWeight: 500 33 lineHeight: 30px 34 letterSpacing: "0.01em" 35 small: 36 fontFamily: Quicksand 37 fontSize: 16px 38 fontWeight: 500 39 lineHeight: 22px 40 letterSpacing: "0.02em" 41 title: 42 fontFamily: Quicksand 43 fontSize: 40px 44 fontWeight: 300 45 lineHeight: 52px 46 letterSpacing: "0.04em" 47 rounded: 48 sm: 8px 49 md: 14px 50 panel: 22px 51 pill: 999px 52 spacing: 53 xs: 4px 54 sm: 8px 55 md: 16px 56 lg: 24px 57 xl: 40px 58 xxl: 72px 59 bar-width: 720px 60 bar-height: 54px 61 bar-bottom: 96px 62 text-width: 900px 63 words-below-centre: 250px 64 components: 65 page: 66 backgroundColor: "{colors.night}" 67 textColor: "{colors.primary}" 68 typography: "{typography.body}" 69 allen-says: 70 backgroundColor: "{colors.night}" 71 textColor: "{colors.primary}" 72 typography: "{typography.voice}" 73 allen-title: 74 backgroundColor: "{colors.night}" 75 textColor: "{colors.primary}" 76 typography: "{typography.title}" 77 hint-text: 78 backgroundColor: "{colors.night}" 79 textColor: "{colors.hint}" 80 typography: "{typography.small}" 81 fine-print: 82 backgroundColor: "{colors.night}" 83 textColor: "{colors.faint}" 84 typography: "{typography.small}" 85 input-bar: 86 backgroundColor: "{colors.night}" 87 textColor: "{colors.primary}" 88 typography: "{typography.body}" 89 rounded: "{rounded.pill}" 90 height: 54px 91 width: 720px 92 input-bar-caret: 93 backgroundColor: "{colors.night}" 94 textColor: "{colors.glow}" 95 choice: 96 backgroundColor: "{colors.panel}" 97 textColor: "{colors.mist}" 98 typography: "{typography.body}" 99 rounded: "{rounded.md}" 100 padding: 16px 101 choice-lit: 102 backgroundColor: "{colors.lit}" 103 textColor: "{colors.primary}" 104 typography: "{typography.body}" 105 rounded: "{rounded.md}" 106 padding: 16px 107 button-primary: 108 backgroundColor: "{colors.lit}" 109 textColor: "{colors.primary}" 110 typography: "{typography.body}" 111 rounded: "{rounded.pill}" 112 padding: 14px 113 button-primary-hover: 114 backgroundColor: "{colors.lit}" 115 textColor: "{colors.warm-soft}" 116 button-secondary: 117 backgroundColor: "{colors.panel}" 118 textColor: "{colors.mist}" 119 rounded: "{rounded.pill}" 120 padding: 14px 121 panel: 122 backgroundColor: "{colors.panel}" 123 textColor: "{colors.primary}" 124 rounded: "{rounded.panel}" 125 padding: 24px 126 found-line: 127 backgroundColor: "{colors.night}" 128 textColor: "{colors.primary}" 129 typography: "{typography.body}" 130 found-line-label: 131 backgroundColor: "{colors.night}" 132 textColor: "{colors.hint}" 133 typography: "{typography.body}" 134 state-word: 135 backgroundColor: "{colors.night}" 136 textColor: "{colors.glow}" 137 typography: "{typography.small}" 138 state-word-needs-you: 139 backgroundColor: "{colors.night}" 140 textColor: "{colors.warm}" 141 typography: "{typography.small}" 142 focus-ring: 143 backgroundColor: "{colors.night}" 144 textColor: "{colors.mist}" 145 orb-halo: 146 backgroundColor: "{colors.halo}" 147 orb-halo-violet: 148 backgroundColor: "{colors.halo-violet}" 149 orb-heart: 150 backgroundColor: "{colors.heart}" 151 orb-heart-core: 152 backgroundColor: "{colors.heart-core}" 153 water: 154 backgroundColor: "{colors.ink}" 155 sky-wash: 156 backgroundColor: "{colors.sky-glow}" 157 --- 158 159 ## Overview 160 161 Allen's look is a night sky with one calm light in the middle. The sky is the stage and Allen is the only actor. 162 Everything a person reads sits in the centre or in one bar at the bottom. There are no windows, menus, tabs, 163 sidebars or progress bars. Every change eases in and nothing cuts. 164 165 This file is the one place the look is written down. The native kernel (boot and setup), the `aienos-run` 166 windows on Windows, macOS and Linux, the Try page on aienos.com and the docs read their values from the three 167 files generated from it (`docs/design/tokens/allen_tokens.h`, `allen_tokens.rs`, `allen-tokens.css`). Change a 168 value here, run `cargo run -p allen-design-tokens -- generate`, and every surface follows. A test fails if the 169 generated files fall behind this one. 170 171 Where the values come from: the colours, sizes, clocks and curves are read from the iMac kernel's drawing code 172 (`native/kernel/ui/` on `feat/allen-boot-everywhere`, the same bytes the iMac runs, commit `0930240`), not from 173 screenshots. Each token below names its source line. The web font, glass panels and entrance motion come from the 174 Allen design-language skill. 175 176 ## Colors 177 178 Light on dark, cool blues for everything calm, one warm colour for what is lit or alive. 179 180 - **Night (#060812):** the sky behind everything. `allen_ui.c` 254, `CK_RGB(6, 8, 18)`. 181 - **Primary (#ECF0FC):** the words Allen says and the words a person types. `allen_ui.c` 279. 182 - **Hint (#96A0C4):** labels, placeholders, the left half of a found line ("Graphics:"). `allen_ui.c` 271. 183 - **Faint (#828CB0):** fine print, footers. `allen_ui.c` 300. 184 - **Glow (#96AAFF):** edges, focus halos, calm state words ("ready"). `allen_ui.c` 293. 185 - **Mist (#C8D2FF):** secondary buttons, unlit choices, links. `allen_ui.c` 509. 186 - **Ink (#4056C4):** deep accents, the cool water. Design language. 187 - **Warm (#FFD496):** a fresh letter, anything that needs the person ("waiting for you"). `allen_ui.c` 230. 188 - **Warm-soft (#FFDEB4):** hover glow on a primary action. `allen_ui.c` 431. 189 - **Heart (#FFD2AA) and Heart-core (#FFECD6):** the warm light at the centre of Allen's mind. `mind.c` 263, 264. 190 - **Halo (#3C4AD2) and Halo-violet (#705CFF):** the faint light round the mind. `mind.c` 228, 229. 191 - **Sky-glow (#6E82FF):** the faint wash near the top of the sky. `allen_ui.c` 260. 192 - **Panel (#0C1026):** glass behind a group of choices, drawn at 58% to 84% over the sky. Design language. 193 - **Lit (#3B446F):** the solid colour of a lit choice or primary button: Glow at 34% over Panel. Web surfaces 194 draw it as a gradient from `rgb(150 170 255 / .34)` to `rgb(84 104 224 / .30)`. 195 196 There is no red and no green. Nothing on a first-run screen is an error; a problem is a sentence in Primary with 197 its state word in Warm. 198 199 ## Typography 200 201 Allen's own typeface is drawn in pen strokes by the kernel (`allen_font.c`); there is no font file. Web and runner 202 surfaces use Quicksand (OFL), the nearest match. Weight and size carry the hierarchy; one family only. 203 204 | Role | Kernel cap height at 1080p | Kernel stroke weight | Web size / weight | 205 |---|---|---|---| 206 | voice (what Allen says) | 19 px | 1000 | 27 px / 400 | 207 | body (choices, found lines) | 15 px | 1150 | 21 px / 500 | 208 | small (hints, state words) | 11 px | 1250 | 16 px / 500 | 209 | title ("Allen is ready.") | web only | n/a | 40 px / 300 | 210 211 ```allen-tokens 212 native-type: 213 voice-cap: 19px 214 body-cap: 15px 215 small-cap: 11px 216 voice-weight: "1000" 217 body-weight: "1150" 218 small-weight: "1250" 219 line: 40px 220 wrap: 900px 221 ``` 222 223 Native surfaces (the kernel and anything that draws through it) use the `native-type` tokens with Allen's stroke 224 typeface. Mockups in `docs/design/screens/` draw their words with the same strokes, exported from `allen_font.c`, so 225 what a builder sees in a mockup is what the kernel can draw. 226 227 Web sizes are the kernel cap height divided by 0.70, Quicksand's cap height as a share of its size (INFERRED from 228 the font's published metrics; not measured on a rendered glyph yet). Allen's line height is 40 px 229 (`allen_ui.c` 186) and his text wraps at 900 px (`allen_ui.c` 191). 230 231 ## Layout 232 233 Every Allen surface lays out on a 1920 by 1080 design grid scaled by `k = min(width / 1920, height / 1080)` 234 (`allen_ui.c` `scale_for`), so a phone, a laptop and a 5K iMac show the same picture. 235 236 - Allen's centre is at 50% across and 40% down (`allen_ui.c` 853). 237 - His words start 250 px below the centre (`words_top`) and wrap at 900 px. 238 - The input bar is 720 by 54 px, centred, its bottom edge 96 px above the screen's bottom (`allen_ui.c` 871). 239 - The spacing scale is xs 4, sm 8, md 16, lg 24, xl 40, xxl 72. Groups of choices stack with md between rows and 240 xl between a question and its choices. 241 - Found lines (screen 5) line up on one column: label right-aligned in Hint, value left-aligned in Primary. 242 243 ## Elevation & Depth 244 245 Depth comes from light, not shadows. The sky is the floor. Glass panels sit just above it with a 1 px edge in Glow 246 at 14% to 16% and an 18 px backdrop blur, and only where a group of choices needs holding together. Allen's mind 247 is the brightest thing on screen. Nothing else glows unless it is lit or needs the person. 248 249 ## Shapes 250 251 Round and soft. Fields and buttons are pills (`rounded.pill`). Choice rows use `rounded.md` (14 px). Panels use 252 `rounded.panel` (22 px). There are no sharp corners, no icons in rounded squares and no dividing rules. 253 254 ## Components 255 256 - `allen-says` is how Allen speaks: Primary on the night in the voice size, letter by letter (35 ms each), each 257 fresh letter starting Warm and cooling to Primary over 900 ms. 258 - `input-bar` is the only text field. It is always at the bottom, a pill on the night at 55%. Its caret is a Glow bar that breathes (1.1 s) instead of blinking and holds still for 0.5 s after each key (`allen_ui.c` 284). 259 On focus its edge turns Mist at 55% with a 28 px Sky-glow halo at 22%. 260 - `choice` and `choice-lit` are the answers to a question. One is always lit (the first, unless the person moved). 261 The lit one is `Lit` with Primary words and a Glow edge; the others are Mist words on Panel. 262 - `button-primary` is light, not paint: the Lit gradient with a Mist edge; on hover the edge and words turn 263 Warm-soft. `button-secondary` is a Mist outline on Panel. "Not now" is always a secondary button. 264 - `found-line` and `found-line-label` are one line of what Allen found on screen 5. 265 - `state-word` is a calm word in Glow ("ready", "building a driver for it"); `state-word-needs-you` is Warm 266 ("waiting for you"). 267 - `orb-*` are the lights that make Allen's mind (halo, violet halo, heart). Web surfaces that cannot draw the 268 mind use a crop of the kernel's own render (`allen-1-formed.png`), never a drawn or generated orb. 269 270 ## Motion 271 272 Motion explains a change and then stops. The tokens are in the block below; the generator reads it. 273 274 ```allen-tokens 275 motion: 276 ease-smooth: "cubic-bezier(0.3333, 0, 0.6667, 1)" 277 ease-out: "cubic-bezier(0.3333, 1, 0.6667, 1)" 278 ease-enter: "cubic-bezier(0.22, 0.61, 0.36, 1)" 279 frame: 16ms 280 letter: 35ms 281 letter-cool: 900ms 282 word-rise: 600ms 283 words-fade: 450ms 284 read-base: 6000ms 285 read-per-letter: 70ms 286 state-blend: 700ms 287 choice-lit: 100ms 288 dawn: 900ms 289 dusk: 4000ms 290 dusk-fallback: 1400ms 291 bar-rest: 9000ms 292 bar-rise: 900ms 293 caret-breath: 1100ms 294 caret-hold: 500ms 295 mind-form: 3000ms 296 enter-rise: 10px 297 enter-blur: 3px 298 heartbeat: 299 breath-period: 5500ms 300 breath-depth: "0.030" 301 think-pulse-period: 900ms 302 heart-idle: "0.195" 303 heart-listen: "0.273" 304 heart-think: "0.469" 305 heart-speak: "0.313" 306 heart-ease-speak: 80ms 307 heart-ease: 400ms 308 ``` 309 310 - `ease-smooth` is the kernel's `ck_smooth` (3t² − 2t³) and `ease-out` is `ck_ease_out` (1 − (1 − t)³); both 311 Bezier forms are exact, not fitted. `ease-enter` is the design language's curve for web entrances. 312 - Entrances rise: from opacity 0, 10 px lower and 3 px blurred, to rest, over `word-rise`. 313 - A lit choice must light within 100 ms of the key or click (`choice-lit`), so the person knows they were heard. 314 - Dusk (going to sleep) gathers inward over 4 s and is longer than the dawn; dawn is 0.9 s and calm. 315 - The heartbeat: at rest Allen breathes, his size swelling ±3.0% over 5.5 s (`mind.c` 173). While thinking his 316 heart pulses every 0.9 s (`mind.c` 144). Heart brightness per mood is the kernel's 50, 70, 120 and 80 out of 256. 317 318 ## Boot sequence 319 320 The night is one clock, identical on every machine. Values from `night.h` and `chirp.h`. 321 322 ```allen-tokens 323 boot: 324 holes-appear: 2600ms 325 fade-end: 6800ms 326 spiral: 6000ms 327 merge: 12000ms 328 ripple-run: 3600ms 329 gone: 15200ms 330 allen-born: 12300ms 331 allen-formed: 15300ms 332 centre-x: "0.50" 333 centre-y: "0.40" 334 sound: 335 chirp-rate: 48000Hz 336 chirp-from: 200Hz 337 chirp-to: 1000Hz 338 chirp-peak: "0.70" 339 chirp-in: 40ms 340 chirp-rise: 600ms 341 chirp-start: 11400ms 342 chirp-end: 12300ms 343 ``` 344 345 - 0 to 6.8 s the eyes adjust: brightest stars first, then faint ones, then the Milky Way, in patches. 346 - 2.6 s two black holes start to bend the starlight, then show their shadows, circling. 347 - 6.0 s they spiral in, faster and closer (separation as τ^¼, angle as τ^⅝, τ the time left). 348 - 11.4 s the sound comes in; 12.0 s they merge and a ripple runs out through the stars; the sound ends by 12.3 s. 349 - 12.3 s Allen starts to gather from the merger's light; he is formed by 15.3 s; the last black hole is gone by 15.2 s. 350 - The maths, frame by frame, is in `docs/design/boot/MATHS.md`. 351 352 ## Sound 353 354 There is one sound: the chirp of two black holes merging, raised into hearing (200 Hz rising to 1000 Hz over 355 0.6 s, loudness following pitch to the ⅔ power, peak 70% of full scale at the merger, a 0.3 s ring). It is made 356 from the formula at boot; there is no sound file. 357 358 - First run plays it once with the night. Nothing else in first run makes a sound. Typing, choosing and finishing 359 are silent; Allen's light shows them. 360 - No sound device: the night plays silent and nobody is told. 361 - A person who turns sound off is never asked again. 362 363 ## Voice 364 365 Every word a person reads goes through the humanizer skill. Allen is a person speaking to one other person. 366 367 - Short sentences, everyday words. Say what Allen is doing, then stop. 368 - Name hardware by what it does, then its maker ("Graphics: NVIDIA GeForce RTX 4070"). 369 - Never on screen: my own part names (Aienux, Interplane, Store, kernel, contract, driver ABI), error codes, 370 file paths, port numbers. 371 - No marketing words (seamless, powerful, blazing, magic, effortless, stunning), no exclamation marks, no 372 "Great!", no "Oops", no emoji. 373 - Numbers only when measured on this machine. "I couldn't measure this yet." is a full answer. 374 - Questions are about intent and consent only, each asked once, each with "Not now". 375 - Allen says "I" and "you". He does not apologise twice or reassure ("Don't worry"). 376 377 ## Accessibility 378 379 Contrast is measured by the generator (`cargo run -p allen-design-tokens -- check`), WCAG 2.2 relative luminance, 380 on the solid colours; a pair below its floor fails the build. 381 382 ```allen-tokens 383 contrast: 384 primary-on-night: "7.0" 385 hint-on-night: "4.5" 386 faint-on-night: "4.5" 387 mist-on-panel: "4.5" 388 primary-on-lit: "4.5" 389 warm-on-night: "4.5" 390 glow-on-night: "4.5" 391 primary-on-panel: "7.0" 392 warm-soft-on-lit: "4.5" 393 drawn-alpha: 394 hint: "1.0" 395 faint: "1.0" 396 kernel-today-alpha: 397 hint: "0.586" 398 faint: "0.430" 399 reduced-motion: 400 night: still 401 letter: 0ms 402 word-rise: 0ms 403 state-blend: 150ms 404 dusk: 400ms 405 breath-depth: "0" 406 think-pulse-period: 0ms 407 keys: 408 next: ArrowDown ArrowRight Tab 409 previous: ArrowUp ArrowLeft Shift+Tab 410 choose: Enter Space 411 not-now: Escape 412 speak: any letter 413 ``` 414 415 - Contrast is measured as drawn: a colour drawn at part opacity over the night is blended first (`drawn-alpha`), 416 then measured. Hint and Faint must be drawn opaque. The kernel today draws the bar's "Speak to Allen" hint at 417 150/256 and the footer at 110/256 (`allen_ui.c` 271, 300); `kernel-today-alpha` keeps those for the report, 418 which shows them below the floor. That is a finding for the kernel's owner, not a waiver. 419 - Measured ratios (the generator's output, `cargo run -p allen-design-tokens -- check`) are in 420 `docs/design/tokens/contrast.txt`. 421 - Reduced motion (the host's or the person's setting): the night shows its last frame (the merger's light, Allen 422 formed) with no orbit and no ripple; text appears whole; blends shorten to 150 ms; Allen does not breathe or 423 pulse, his heart brightness alone shows his mood. The chirp still plays unless sound is off. 424 - Reduced motion on the very first boot (when the runner or firmware says so): the 15.2 s night is replaced by a 425 0.9 s dawn onto its last frame, then Allen arrives. The night is never forced on someone who asked for less motion. 426 - Keyboard only: every screen works with the keys above and nothing else. Focus is always visible as a Mist edge 427 with a Sky-glow halo. Typing letters anywhere goes to the input bar. 428 - Touch: every target is at least 44 by 44 px. Every choice has words; nothing is colour alone. 429 430 ## Do's and Don'ts 431 432 - **Do** read a value from the generated files. **Don't** type a colour or a duration into a surface. 433 - **Do** keep one lit thing per screen. **Don't** light two buttons. 434 - **Do** say what is happening in one line when a step is slower than its budget. **Don't** show a bar that jumps 435 or a spinner with no words. 436 - **Do** use the kernel's own renders for the sky and Allen on the web. **Don't** use a stock starfield, a 437 generated orb or a bright screenshot. 438 - **Don't** add red, green, a second font, icons in rounded squares, or a second sound.