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/tools/make-screens.mjs # 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 / tools / make-screens.mjs` 129 lines · 11948 bytes Raw Blame History 1 // make-screens.mjs -- writes the plain first-run mockups (every screen except 04 and 05b) into the current directory. 2 // cd docs/design/screens && node ../tools/make-screens.mjs 3 import { writeFileSync } from "node:fs"; 4 const page = (file, title, tag, cls, body) => writeFileSync(file, ` 5 6 7 8 9 ${title} 10 11 12 13
14
${tag}
15 ${body.trim().split("\n").map((l) => " " + l).join("\n")} 16
17 18 19 20 21 `); 22 const says = (text, top, at, extra = "") => `

${text}

`; 23 const btns = (top, items) => `
\n${items.map(([t, href, lit]) => `
${t}
`).join("\n")}\n
`; 24 const choices = (top, items) => `
\n${items.map(([t, w, href, lit]) => `
${t}${w}Enter
`).join("\n")}\n
`; 25 const found = (top, rows) => `
\n${rows.map(([l, v, cls = ""]) => ` ${l}${v}`).join("\n")}\n
`; 26 const bar = (text, focus = false) => `
${text}
`; 27 28 page("01-power-on.html", "Screen 1: power on", "1 · power on (the maker's logo natively; a black window in aienos-run; we draw nothing)", "", ``); 29 30 page("02-night.html", "Screen 2: the night", "2 · the night (still at 11.8 s; live reference: ../boot/night.html)", "", ` 31
32
Play the night with its sound
Next screen
`); 33 34 page("03-allen-arrives.html", "Screen 3: Allen arrives", "3 · Allen arrives", "sky", ` 35 ${says("Hello. I'm Allen.", 640, 0)} 36 ${says("I'm going to look after this computer with you.", 690, 1400)} 37 ${bar('What would you like this computer to do best?').replace('class="bar rise"', 'class="bar rise" data-at="3600"')} 38 39
next
`); 40 41 page("03b-still-starting.html", "Screen 3, slow: still starting", "3 · slow step: what Allen says when a step passes its budget (here 5 s)", "sky", ` 42 ${says('Still starting. The disk is slow to answer.', 640, 0)} 43
`); 44 45 page("04b-something-else.html", "Screen 4: something else", "4 · something else: Allen says what he understood", "sky", ` 46 ${says("You want a quiet computer for writing. I'll keep things simple and save power.", 640, 0, ' data-wrap="900"')} 47 ${btns(760, [["That's right", "05-getting-to-know.html", true], ["Not quite", "04-intent.html"]])} 48 ${bar('I mostly write, and I like it quiet', true)}`); 49 50 page("05-getting-to-know.html", "Screen 5: getting to know this computer", "5 · getting to know this computer (example values; each line eases in as soon as it is known)", "sky", ` 51 ${says("Getting to know this computer.", 590, 0)} 52 ${found(652, [["Screen", "2560 by 1440, 144 times a second"], ["Graphics", "NVIDIA GeForce RTX 4070, 12 GB of its own memory"], ["Processor", "AMD Ryzen 7 7800X3D, 8 cores"], ["Memory", "32 GB"], ["Storage", "1 TB fast drive, 2 TB drive"], ["Network", "wired, connected"], ["Sound", "speakers and a microphone"], ["Keyboard and mouse", "working"]])} 53
54 55
next
`); 56 57 page("06-consent.html", "Screen 6: the one consent", "6 · the one consent (the list holds only what changes the machine)", "sky", ` 58 ${says("Here's what I'd like to set up:", 560, 0)} 59
60

Use my own drivers for the graphics, network and storage

61

Set your screen to 144 times a second

62

Run the AI on your graphics card

63

Build drivers for the 2 parts I can't drive yet

64

I won't touch your other drives, and you can undo any of this.

65
66 ${btns(880, [["Set it up", "07a-games.html", true], ["Show me each one", "06b-show-each.html"], ["Not now", "09-ready.html"]])}`); 67 68 page("06b-show-each.html", "Screen 6: one at a time", "6 · show me each one (1 of 4)", "sky", ` 69

1 of 4

70 ${says("Use my own drivers for the graphics, network and storage?", 640, 120, ' data-wrap="900"')} 71 ${btns(740, [["Yes", "06b-show-each.html", true], ["Skip", "06b-show-each.html"]])}`); 72 73 page("07a-games.html", "Screen 7a: making games smoother", "7a · play games smoothly (example values; every number measured on this machine)", "sky", ` 74 ${says("Making games smoother.", 590, 0)} 75 ${found(652, [["Screen", "set to 144 times a second", ""], ["Graphics", "using my driver", ""], ["Processor", "keeping the fast cores free for the game", ""], ["Measured here", "118 frames a second in my test scene (before: 97)", ""]])} 76

I can't tune this graphics card's clock speed yet. I'm building a driver that can.

77 ${btns(900, [["Next", "07b-ai-fit.html", true]])}`); 78 79 page("07b-ai-fit.html", "Screen 7b: finding the best way to run an AI", "7b · run an AI model here (fit from the model's measured size, not a table)", "sky", ` 80 ${says("Finding the best way to run an AI here.", 590, 0)} 81

Your graphics card has 12 GB of its own memory. Models up to about 14 billion parameters fit on it. The 30 billion one fits if I share it with main memory, but it runs slower.

82 ${btns(800, [["Next", "07c-one-found.html", true]])}`); 83 84 page("07c-one-found.html", "Screen 7c: one model found", "7c · which AI: exactly one found (lit choice is taken after 10 s, and Allen says so)", "sky", ` 85 ${says("I found Qwen 30B on this computer. I'll use it.", 640, 0)} 86 ${btns(720, [["Use it", "09-ready.html", true], ["Choose another", "07c-several.html"]])} 87

I'll go with this in 10 seconds

`); 88 89 page("07c-several.html", "Screen 7c: several found", "7c · which AI: several found (best fit first and lit)", "sky", ` 90 ${says("I found three. The first one fits this computer best.", 600, 0)} 91 ${choices(660, [["Qwen 30B", "Runs on your graphics card", "09-ready.html", true], ["Llama 8B", "Runs on your graphics card, quicker, shorter answers", "09-ready.html"], ["Qwen 27B on the Spark", "On the Spark next door, fast", "09-ready.html"], ["Connect my own", "Claude, ChatGPT or another service", "07c-connect.html"]])}`); 92 93 page("07c-none.html", "Screen 7c: none found", "7c · which AI: none found", "sky", ` 94 ${says("I didn't find an AI model on this computer.", 620, 0)} 95 ${choices(690, [["Get one for me", "The 30B model, an 18 GB download", "09-ready.html", true], ["Connect my own", "Claude, ChatGPT or another service", "07c-connect.html"]])} 96

Not now

`); 97 98 page("07c-connect.html", "Screen 7c: connect my own", "7c · connect my own: which service", "sky", ` 99 ${says("Which service?", 620, 0)} 100 ${btns(690, [["Claude", "07c-key.html", true], ["ChatGPT", "07c-key.html"], ["Another service", "07c-key.html"]])}`); 101 102 page("07c-key.html", "Screen 7c: paste a key", "7c · paste your key (checking it with one short request)", "sky", ` 103 ${says("Paste your key for Claude. I'll keep it sealed on this computer and won't show it again.", 620, 0, ' data-wrap="900"')} 104

Checking the key

105 ${bar('********************************', true)}`); 106 107 page("07c-key-failed.html", "Screen 7c: the key did not work", "7c · the key did not work", "sky", ` 108 ${says("That key didn't work. Claude said the key isn't valid. Try again?", 620, 0, ' data-wrap="900"')} 109 ${btns(720, [["Try again", "07c-key.html", true], ["Use a different service", "07c-connect.html"]])}`); 110 111 page("08-hardware.html", "Screen 8: setting up your hardware", "8 · setting up your hardware (six state words, nothing else)", "sky", ` 112 ${says("Setting up your hardware.", 590, 0)} 113 ${found(652, [["Graphics (AMD Radeon Pro 580)", "ready, my driver", "state"], ["Network (Broadcom)", "ready, my driver", "state"], ["Wi-Fi (Broadcom BCM4360)", "building a driver for it", "state"], ["Webcam", "ready, the maker's driver", "state"]])} 114

Building a driver can take a while. You can keep using the computer.

115 ${bar('Speak to Allen')}`); 116 117 page("08b-turn-on.html", "Screen 8: the second consent", "8 · the second consent (only when a built driver is ready)", "sky", ` 118 ${says("I built a driver for your Wi-Fi and tested it without touching the real one. Turn it on?", 620, 0, ' data-wrap="900"')} 119 ${btns(740, [["Turn it on", "09-ready.html", true], ["Not now", "09-ready.html"]])}`); 120 121 page("08c-put-back.html", "Screen 8: it failed, the old one is back", "8 · a built driver failed on the real device: Allen undoes it by himself", "sky", ` 122 ${says("That didn't work on the real Wi-Fi. I've put the old driver back, and I'll keep working on it.", 640, 0, ' data-wrap="900"')} 123 ${bar('Speak to Allen')}`); 124 125 page("09-ready.html", "Screen 9: Allen is ready", "9 · Allen is ready", "sky", ` 126 ${says("Allen is ready.", 600, 0)} 127

Games will use your screen at 144 times a second. Your AI is Qwen 30B, on your graphics card. I'm still building a driver for your Wi-Fi and I'll tell you when it's ready.

128 ${says("Ask me anything, or tell me what you'd like to do.", 800, 900)} 129 ${bar('Speak to Allen', true)}`);