From 2dfc3124c1da805d90a369d4e58c8fe9230e3fec Mon Sep 17 00:00:00 2001 From: manager Date: Mon, 28 Sep 2026 21:15:25 +0000 Subject: [PATCH 1/3] Widget: Sonnet 5.5 replaces Sonnet 5 Anthropic released Claude Sonnet 5.5 (claude-sonnet-5-5) on 2026-09-28 and Wolf ordered every Sonnet 5 default moved to it. The widget reaches Claude through the subscription relay, which now runs Claude Code 2.1.284 and answers claude-sonnet-5-5 (live probe 200, cli transport, track t1). Co-Authored-By: Claude Opus 5.5 --- src/lib/widget/llmClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/widget/llmClient.ts b/src/lib/widget/llmClient.ts index 961458dd..a12cddd4 100644 --- a/src/lib/widget/llmClient.ts +++ b/src/lib/widget/llmClient.ts @@ -14,7 +14,7 @@ import { relayConfigured, } from '@lib/library/magic/relay'; -export const CLAUDE_MODEL = 'claude-sonnet-5'; +export const CLAUDE_MODEL = 'claude-sonnet-5-5'; export const claudeConfigured = relayConfigured; From 9600d14cd5127826eb316b2b4912083fa76470fd Mon Sep 17 00:00:00 2001 From: manager Date: Tue, 13 Oct 2026 10:00:38 +0000 Subject: [PATCH 2/3] feat(ai-atlas): Article and Ladder tabs in the header row The header row after the brand now holds three tabs: ATLAS (the map), ARTICLE and LADDER. They replace the welcome banner and the meta label. The article carries its nine-step decomposition board; the ladder keeps its climb and the level modal. Words come from readings.json, written by scripts/ai-atlas/strip-readings.mjs from the source pages, which keeps only what the tabs render. Tab labels are pushable page words. Co-Authored-By: Claude Opus 5.5 --- scripts/ai-atlas/strip-readings.mjs | 123 +++ src/lib/aiAtlas/adapter.ts | 6 + src/lib/aiAtlas/readings.json | 511 ++++++++++++ src/lib/aiAtlas/readings.tsx | 816 +++++++++++++++++++ src/pages/ai-atlas.tsx | 1009 ++++++++++++----------- src/styles/ai-atlas.css | 1171 +++++++++++++++++++++++++++ 6 files changed, 3163 insertions(+), 473 deletions(-) create mode 100644 scripts/ai-atlas/strip-readings.mjs create mode 100644 src/lib/aiAtlas/readings.json create mode 100644 src/lib/aiAtlas/readings.tsx diff --git a/scripts/ai-atlas/strip-readings.mjs b/scripts/ai-atlas/strip-readings.mjs new file mode 100644 index 00000000..9493e048 --- /dev/null +++ b/scripts/ai-atlas/strip-readings.mjs @@ -0,0 +1,123 @@ +#!/usr/bin/env node +/* Strip the Article and Ladder pages to the words the Atlas tabs render. + + Their source is another project's static site (index.html, ladder.js and + app.js in its public folder). Those files carry the author's own notes + (copy-gate comments, hidden drafts, design remarks) that never ship. This + script keeps only the visible paragraphs, the ladder data and the board's + step names and tips, and writes src/lib/aiAtlas/readings.json. Run it + after every refresh of that site: + + node scripts/ai-atlas/strip-readings.mjs + + Every run writes one line to logs/ai-atlas-readings.jsonl (gitignored, UTC). */ +import { appendFileSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'; +import { join } from 'node:path'; +import vm from 'node:vm'; + +const root = new URL('../../', import.meta.url); +const out = new URL('src/lib/aiAtlas/readings.json', root); +const journal = new URL('logs/ai-atlas-readings.jsonl', root); +const record = { at: new Date().toISOString(), action: 'strip-readings' }; + +const decode = s => + s + .replace(/ /g, ' ') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'|'/g, "'") + .replace(/&/g, '&'); + +/* A paragraph becomes runs of plain text and marked text. A mark keeps its + kind only: key (red) or see (blue). Every other tag is dropped. */ +const segments = html => { + const body = html.replace(/<\/?span[^>]*>/g, ''); + const runs = []; + const re = /([\s\S]*?)<\/mark>/g; + let last = 0; + const push = (t, m) => { + const text = decode(t.replace(/<[^>]+>/g, '')).replace(/\s+/g, ' '); + if (text) runs.push(m ? { t: text, m } : { t: text }); + }; + for (const match of body.matchAll(re)) { + push(body.slice(last, match.index)); + push(match[2], match[1]); + last = match.index + match[0].length; + } + push(body.slice(last)); + return runs; +}; + +const pick = (obj, keys) => + Object.fromEntries( + keys.filter(k => obj[k] !== undefined).map(k => [k, obj[k]]), + ); + +const literal = (src, name) => { + const m = new RegExp(`var ${name} = ([\\[{][\\s\\S]*?[\\]}]);\\n`).exec(src); + if (!m) throw new Error(`${name} not found`); + return vm.runInNewContext(`(${m[1]})`); +}; + +try { + const dir = process.argv[2]; + if (!dir) throw new Error('usage: strip-readings.mjs '); + + const html = readFileSync(join(dir, 'index.html'), 'utf8') + .replace(//g, '') + .replace(/]*\bhidden\b[\s\S]*?<\/ol>/g, ''); + const paras = [...html.matchAll(/

([\s\S]*?)<\/p>/g)]; + if (!paras.length || paras[0][1] !== 'lead') + throw new Error('article lead not found'); + + const app = readFileSync(join(dir, 'app.js'), 'utf8'); + const steps = literal(app, 'STEPS'); + const tips = literal(app, 'TIPS'); + + const sandbox = { window: {} }; + vm.runInNewContext(readFileSync(join(dir, 'ladder.js'), 'utf8'), sandbox); + const L = sandbox.window.LADDER; + if (!L || !Array.isArray(L.rungs)) throw new Error('ladder data not found'); + + const readings = { + article: { + lead: segments(paras[0][2]), + paras: paras.slice(1).map(p => segments(p[2])), + board: { steps, tips }, + }, + ladder: { + stages: L.stages.map(s => pick(s, ['id', 'label'])), + tracks: pick(L.tracks, ['think', 'skill']), + perspective: pick(L.perspective, ['was', 'think']), + toolsLabel: L.toolsLabel, + closing: L.closing, + rungs: L.rungs.map(r => + pick(r, [ + 'n', + 'stage', + 'title', + 'sub', + 'was', + 'think', + 'skill', + 'text', + 'tools', + ]), + ), + }, + }; + writeFileSync(out, JSON.stringify(readings, null, 2) + '\n'); + Object.assign(record, { + ok: true, + paragraphs: paras.length, + rungs: L.rungs.length, + steps: steps.length, + }); +} catch (e) { + Object.assign(record, { ok: false, error: String(e.message).slice(0, 300) }); + process.exitCode = 1; +} +mkdirSync(new URL('logs/', root), { recursive: true }); +appendFileSync(journal, JSON.stringify(record) + '\n'); +console.log(JSON.stringify(record)); diff --git a/src/lib/aiAtlas/adapter.ts b/src/lib/aiAtlas/adapter.ts index edeacea2..63dc373c 100644 --- a/src/lib/aiAtlas/adapter.ts +++ b/src/lib/aiAtlas/adapter.ts @@ -30,6 +30,9 @@ export const PAGE_TEXT_DEFAULTS: Record = { ringTerritoriesTitle: 'Mechanisms', ringTerritoriesDesc: 'Every topic opens its own card.', metaLabel: 'TERMINAL DOCUMENTATION', + tabAtlas: 'Atlas', + tabArticle: 'Article', + tabLadder: 'Ladder', topicsPlaceholder: 'The Atlas', stagesAria: 'Project to Result, clockwise', }; @@ -56,6 +59,9 @@ export const SHORT_LABEL_KEYS = new Set([ 'ringProjectsLabel', 'ringTerritoriesLabel', 'metaLabel', + 'tabAtlas', + 'tabArticle', + 'tabLadder', 'topicsPlaceholder', ]); export const SHORT_LABEL_MAX = 40; diff --git a/src/lib/aiAtlas/readings.json b/src/lib/aiAtlas/readings.json new file mode 100644 index 00000000..23877aa3 --- /dev/null +++ b/src/lib/aiAtlas/readings.json @@ -0,0 +1,511 @@ +{ + "article": { + "lead": [ + { + "t": "Vibe coding narrowed the gap between people in tech", + "m": "key" + }, + { + "t": ", so the edge now belongs to whoever can solve the hardest problems solo with AI agents." + } + ], + "paras": [ + [ + { + "t": "Even where engineers still lead, the lead got shorter. What was ten years ahead a year ago is perhaps two years ahead now. And the gap closed because of vibe coding. Basically, you build software by telling an AI agent what you want, and that " + }, + { + "t": "enables solo building end to end", + "m": "key" + }, + { + "t": "." + } + ], + [ + { + "t": "From the market’s perspective, a year ago " + }, + { + "t": "you were worth as much as the complexity of the problems you could see as a product or business person", + "m": "see" + }, + { + "t": ". But to solve them, you needed a whole team. Now that limit is gone, and you can solve the problem you saw on your own." + } + ], + [ + { + "t": "So today you are worth as much as the complexity of the problems you can solve.", + "m": "key" + } + ], + [ + { + "t": "In turn, " + }, + { + "t": "complex problems require a higher mastery of working with LLM agents", + "m": "key" + }, + { + "t": ". That mastery starts with questions, because any sophisticated software begins with them. " + }, + { + "t": "What to ask takes business and product expertise.", + "m": "see" + }, + { + "t": " " + }, + { + "t": "How to ask is a second skill.", + "m": "key" + }, + { + "t": " " + }, + { + "t": "It means framing the question, decomposing the answer and choosing the next question.", + "m": "key" + } + ], + [ + { + "t": "Then at some point you realize that an LLM works on coherence, much as a brain does. It will answer any question with whatever fits best with what it was given, and it follows your framing. " + }, + { + "t": "So whoever does not learn to talk to an LLM properly becomes delusional.", + "m": "key" + }, + { + "t": " " + }, + { + "t": "The cure is evals and benchmarks", + "m": "key" + }, + { + "t": ". Evals test your work, and benchmarks test your choice of model." + } + ], + [ + { + "t": "The next thing you hit is the " + }, + { + "t": "context window", + "m": "key" + }, + { + "t": ". One start of an agent on a task is one run. A run sees only what fits in its context window. A complex problem does not fit one context window. Past a point the window fills with everything the task has touched, and the model gets dumber and starts to hallucinate. That is " + }, + { + "t": "context rot", + "m": "key" + }, + { + "t": "." + } + ], + [ + { + "t": "So you split the work into runs, and one agent’s output becomes the next agent’s input. Then you decide what each run sees and what it never sees. That is " + }, + { + "t": "context routing", + "m": "key" + }, + { + "t": ". Runs, handoffs and context routing together make " + }, + { + "t": "orchestration", + "m": "key" + }, + { + "t": ". This is how you solve a problem too big for one context window. However, at some point you understand that " + }, + { + "t": "orchestration without evals at each step is a delusion at scale", + "m": "key" + }, + { + "t": ". Primarily because the error of the first run becomes a fact for every run after it. So you decide to build an eval for each step, and one for the whole chain too." + } + ], + [ + { + "t": "After a while some steps turn routine and no longer need a model, so you " + }, + { + "t": "replace it with code", + "m": "key" + }, + { + "t": ". Code is cheaper and deterministic (which means it gives the same output every time). Where a step still needs a model, benchmarks tell you which one, or whether to add a second." + } + ], + [ + { + "t": "But every run still starts from zero, and whatever the system figured out yesterday is gone by the next one. So you give it " + }, + { + "t": "memory", + "m": "key" + }, + { + "t": " that outlives a single context window and is shared between runs. Decisions go there, gotchas, what you tried and what failed. Only what passed an eval goes into memory, and a failure is stored as a failure. Otherwise the system starts remembering its own mistakes as facts." + } + ], + [ + { + "t": "Up to this point the orchestrator is you. You decide which run goes next, what it sees and where its output goes. Then you write an onboarding protocol, a short file that tells a new agent who it is and how it joins the system. Now " + }, + { + "t": "your agents start calling each other instead of you", + "m": "key" + }, + { + "t": ". One drafts, another pushes back, the first one revises, and it all settles against your evals. A program now picks who wakes up and collects the results, and you step in only for the real decisions." + } + ], + [ + { + "t": "At some point " + }, + { + "t": "the system runs on its own", + "m": "key" + }, + { + "t": ". You wake up, read what it built overnight, make sure you and your agents learned the gotchas, and set the next batch of tasks. Most of your time now goes into shaping a task the system can deliver by itself. So you are back to asking questions, only now you ask them of the whole system instead of one model. This is sophisticated orchestration, and " + }, + { + "t": "it lets one person solve problems that used to take a whole team.", + "m": "key" + } + ] + ], + "board": { + "steps": [ + "Context window", + "Runs", + "Context routing", + "Evals", + "Code", + "Benchmarks", + "Memory", + "Orchestrator", + "Autonomy" + ], + "tips": { + "Context window": "Everything the model can see at once.", + "Files": "Everything the task touched ends up in the same window.", + "Tool output": "Everything the task touched ends up in the same window.", + "Old answers": "Everything the task touched ends up in the same window.", + "Logs": "Everything the task touched ends up in the same window.", + "Notes": "Everything the task touched ends up in the same window.", + "Task brief": "Everything the task touched ends up in the same window.", + "Raw source": "Everything the task touched ends up in the same window.", + "More files": "This no longer fits, so the model loses it and starts to hallucinate.", + "More logs": "This no longer fits, so the model loses it and starts to hallucinate.", + "Run": "One run: one agent with one context window.", + "Run A": "One run with its own context window. Its output becomes the next run’s input.", + "Run B": "One run with its own context window. Its output becomes the next run’s input.", + "Run C": "One run with its own context window. Its output becomes the next run’s input.", + "Eval": "A check on this step. If it fails, the output goes no further.", + "Chain eval": "A check on the result of the whole chain.", + "Code": "This step became routine, so code does it now. Cheaper and the same output every time.", + "Test": "An ordinary software test that checks the code does what it should.", + "Other vendor": "Benchmarks showed a model from another vendor does this step better.", + "Second model": "A second model works on the same step next to the first one.", + "Memory": "What the system learned. Only what passed an eval is written here.", + "Orchestrator": "A program that picks who works next and collects the results." + } + } + }, + "ladder": { + "stages": [ + { + "id": "solo", + "label": "Stage I. Solo: you and one run" + }, + { + "id": "orch", + "label": "Stage II. Orchestration: you and a system of runs" + } + ], + "tracks": { + "think": "Thinking", + "skill": "Vibecoding skills" + }, + "perspective": { + "was": "Wrong perspective", + "think": "Right perspective" + }, + "toolsLabel": "Tools", + "closing": "At that point you have stopped renting a model to talk to and started owning the system around it.", + "rungs": [ + { + "n": 0, + "stage": "solo", + "title": "Chat", + "sub": "You ask, it answers. It talks, you act.", + "was": "It knows the answer.", + "think": "It predicts a likely answer, and a likely answer can be wrong.", + "skill": "You decided to check what ChatGPT, Claude or Gemini says before you use it.", + "text": [ + "You open ChatGPT, Claude or Gemini and type. Behind each chat there is an LLM, a large language model: GPT from OpenAI, Claude from Anthropic, Gemini from Google.", + "An LLM is a compressed statistical model of language. It predicts the next piece of text, so a wrong answer sounds as sure as a right one.", + "Most LLM users are here. This is important to understand, because these are the people LLM companies actually build their features for." + ], + "tools": ["ChatGPT, Claude or Gemini, in the browser or on the phone"] + }, + { + "n": 1, + "stage": "solo", + "title": "Agent", + "sub": "You let it run commands on its own.", + "was": "AI is something I ask for advice.", + "think": "AI is something I hand work to.", + "skill": "You decided to run Claude Code or Codex in a terminal with bypass mode on and let it act.", + "text": [ + "The same models also come as agents that work on your computer. Claude Code runs on Claude, Codex runs on GPT.", + "You switch on bypass mode, so it stops asking your permission, and let it run commands on its own. This is where your chatbox becomes an agent, because agency means it acts by itself. Every time you start it on a task, that is one run.", + "Before you let it act, keep the project in git and save a version before every run, so a run that breaks something is undone by going back to that version. Read what it changed before you accept it, and never let it see your passwords and keys.", + "From here two things grow in parallel. One is its mind: memory, context, judgment. The other is its hands, the tools it can touch: the terminal, files, the web, other services through their APIs, and MCP servers, which are plug-ins that connect it to those services.", + "Connect it to your calendar through an MCP server, and it books the meeting itself instead of telling you how." + ], + "tools": [ + "Claude Code, Codex or another vendor’s command-line agent", + "A terminal with permission to act", + "Git" + ] + }, + { + "n": 2, + "stage": "solo", + "title": "Standing instructions", + "sub": "The file it reads every time.", + "was": "It remembers what I told it last time.", + "think": "It knows only what is written down for it.", + "skill": "You decided to keep a global CLAUDE.md and one per project.", + "text": [ + "You find CLAUDE.md, the instruction file the agent reads every time you start it, but you barely touch it. So it runs on whatever it happened to pick up from talking to you.", + "Later you learn there are two of them. The global one says who the agent always is, and the project one says what this project needs." + ], + "tools": ["CLAUDE.md for Claude Code", "AGENTS.md for Codex"] + }, + { + "n": 3, + "stage": "solo", + "title": "Context rot", + "sub": "You keep adding to the file and the model gets dumber.", + "was": "The more I give it, the smarter it gets.", + "think": "Past a point, more context makes it dumber.", + "skill": "You decided to keep CLAUDE.md under 200 lines and move the rest into documents it opens when needed.", + "text": [ + "The context window is everything the model sees at once. Whatever is outside it does not exist for the model.", + "You keep adding to CLAUDE.md, the task pulls in more and more files, and at some point the window gets so full that the model gets dumber and starts making things up. That is context rot.", + "An agent is only as honest as its context, so you learn to keep the file tight, global and project files together under about 200 lines. Everything else goes into documents the agent opens only when it needs them." + ] + }, + { + "n": 4, + "stage": "solo", + "title": "The question", + "sub": "One goal per request, with everything that goal needs.", + "was": "A bad answer means a weak model.", + "think": "A bad answer usually means a bad question.", + "skill": "You decided to put one goal in each request and say what the answer must contain.", + "text": [ + "You stop throwing a wish into the box and start framing the question. You say what exactly you want and what the answer must contain, and after reading the answer you choose the next question.", + "An LLM works with meaning the way a person does, so how you frame the question changes the answer you get. It also follows your framing, so a leading question gets you agreement. Whoever talks to it badly becomes delusional." + ] + }, + { + "n": 5, + "stage": "solo", + "title": "Evals", + "sub": "You stop guessing and start measuring.", + "was": "It looks right, so it works.", + "think": "Nothing works until a test says so.", + "skill": "You decided to write tests and bring in a Judge agent that checks the first one.", + "text": [ + "You write evals, small tests that prove the result still works. Before the run starts, you write down what done means.", + "Almost everyone skips this step, and this is where you start measuring instead of hoping.", + "Here you also bring in a Judge agent, a second model whose job is to check the first one. It can be your QA agent, or in my case, The Order. The idea is to automate your evaluation." + ], + "tools": [ + "The test runners you already use", + "A Judge agent", + "Scripts that read the output and say pass or fail" + ] + }, + { + "n": 6, + "stage": "solo", + "title": "Benchmarks", + "sub": "The same task on another model, another vendor.", + "was": "I found my model.", + "think": "The best model for my task changes every few months.", + "skill": "You decided to write a script that sends the same task to several vendors and scores each with your evals.", + "text": [ + "You run your own task on models from different vendors and compare speed, cost and how often the eval passes. Which model is good at what changes every few months, so you keep track.", + "Picking the wrong model can be a costly mistake, and from inside one chat you will never see it." + ], + "tools": [ + "A subscription or an API key per vendor", + "One script that sends the same prompt to each", + "Your evals from LVL 5 as the score" + ] + }, + { + "n": 7, + "stage": "orch", + "title": "Decomposition", + "sub": "One context window runs out, so you split the work into several runs.", + "was": "One smart agent can do the whole thing.", + "think": "A big problem is a chain of small runs.", + "skill": "You decided to start subagents and pass files from one run to the next.", + "text": [ + "The task no longer fits into one context window, so you cut it into subtasks. Each subtask gets its own run with a fresh context window, and one agent’s output becomes the next agent’s input.", + "You feel the cost right away: handoffs between agents, and drift away from the goal. Over time you learn to split only when the work does not fit one context window." + ], + "tools": [ + "Subagents, which are agents your agent starts for one piece of the work", + "Task queues", + "Plain files passed from one run to the next" + ] + }, + { + "n": 8, + "stage": "orch", + "title": "Context routing", + "sub": "Who gets which part of the context, and who never sees it.", + "was": "Give every agent everything, just in case.", + "think": "What a run does not see cannot mislead it.", + "skill": "You decided to keep a list per step of what the run receives and where it may write.", + "text": [ + "Each run gets what its step needs: the task description, the previous output, the files it must read. It does not get anything that could bias it.", + "Up to LVL 11 you are the one who decides this for every step, so the orchestrator is you. At LVL 12 a program takes over that role." + ], + "tools": [ + "A list per step of what the run receives", + "Inputs it can read but not change", + "A rule for what a run may write and where" + ] + }, + { + "n": 9, + "stage": "orch", + "title": "Evals at every step", + "sub": "And one on the whole chain.", + "was": "I check the result at the end.", + "think": "Every step needs its own check, or the first mistake spreads through the chain.", + "skill": "You decided to put an eval between runs, so a failed step passes nothing on.", + "text": [ + "A mistake in the first run becomes a fact for every run after it. So each step gets its own eval, and the whole chain gets one too.", + "Orchestration without evals at each step is a delusion at scale. A step that fails its eval does not pass its output on." + ], + "tools": ["The same evals from LVL 5, now placed between runs"] + }, + { + "n": 10, + "stage": "orch", + "title": "Code over model", + "sub": "You tear down half of what you built.", + "was": "More AI makes the system better.", + "think": "Wherever a step is predictable, code does it better than a model.", + "skill": "You decided to turn routine steps into ordinary functions and hooks that check the output.", + "text": [ + "At some point you tear down half of what you built to make it leaner. Every step that became routine turns into code.", + "Code is cheaper and gives the same output every time, and you test it like any other function. The model stays only where there is real uncertainty.", + "A lean core is easier to manage and, importantly, to trust." + ], + "tools": [ + "Ordinary functions", + "Schedulers", + "Validation scripts", + "Hooks that check the agent’s output before it lands" + ] + }, + { + "n": 11, + "stage": "orch", + "title": "Memory", + "sub": "What survives a session and is shared between runs.", + "was": "Each session is a fresh start.", + "think": "What the system learned has to outlive the session, if it passed an eval.", + "skill": "You decided to give each agent a memory file and every run a shared store to search.", + "text": [ + "You find MEMORY.md, memory that outlives one context window and is shared between agents. Decisions go there, gotchas, what you tried and what failed.", + "Only what passed an eval goes into memory, and a failure is stored as a failure. Work accumulates, and smart-in-the-moment turns into smart-over-time." + ], + "tools": [ + "A memory file per agent", + "A shared store every run can search", + "Full-text search over past sessions" + ] + }, + { + "n": 12, + "stage": "orch", + "title": "Agents call each other", + "sub": "An orchestrator picks who wakes, hands off, collects.", + "was": "I have to drive every step myself.", + "think": "My job is the decisions, and the agents handle the handoffs.", + "skill": "You decided to write an onboarding protocol and a message format your agents share.", + "text": [ + "You write an onboarding protocol that tells a new agent who it is and how it joins. Now your agents call each other instead of you.", + "One drafts, the Judge pushes back, the first one revises, and it all settles against your evals. You step in only for the real decisions." + ], + "tools": [ + "A list of agents and how to reach each", + "A message format they all use", + "An orchestrator with a cap on how many times a task can bounce between agents" + ] + }, + { + "n": 13, + "stage": "orch", + "title": "Autonomy", + "sub": "Your agents run on their own.", + "was": "My work is doing the task.", + "think": "My work is shaping tasks the system can deliver without me.", + "skill": "You decided to set up schedules and watchers, so the system runs overnight and leaves logs.", + "text": [ + "Your daily routine is to wake up and see what they built during the night. You make sure you and your agents learned the gotchas. Then you build the next batch of tasks.", + "Most of your own time goes into shaping a task that fits your system, so it delivers by itself.", + "Without you, no agent spends money, deletes anything or publishes anything." + ], + "tools": [ + "Schedules", + "Watchers that alert you", + "Logs, so every mechanism leaves a trail you can read in the morning" + ] + }, + { + "n": 14, + "stage": "orch", + "title": "Departments", + "sub": "Teams of agents, each with its own discipline.", + "was": "I run a set of agents.", + "think": "I run something closer to a company.", + "skill": "You decided to group your agents into departments, each with its own Judge, and let a product manager agent run whole projects through them.", + "text": [ + "Highly speculative, I’m not here yet.", + "You build departments of agents: marketing, business development, engineering with devs and QAs. Each has its own Judge and follows the protocol, and all of them know about each other.", + "Next you bring in a product manager agent that builds whole projects overnight using your departments. Nobody has shipped this yet." + ] + }, + { + "n": 15, + "stage": "orch", + "title": "???", + "sub": "One day." + } + ] + } +} diff --git a/src/lib/aiAtlas/readings.tsx b/src/lib/aiAtlas/readings.tsx new file mode 100644 index 00000000..4e2addfe --- /dev/null +++ b/src/lib/aiAtlas/readings.tsx @@ -0,0 +1,816 @@ +/* The Article and Ladder tabs of the Atlas. Their words come from + readings.json, which scripts/ai-atlas/strip-readings.mjs writes from the + source pages; this file only draws them. The board under the article and + the climb on the ladder keep the behaviour of the source pages: the board + builds up in nine steps, the climb reveals row by row as it scrolls in, + and a rung opens its detail in a modal. */ +import React, { + forwardRef, + memo, + useEffect, + useImperativeHandle, + useRef, + useState, +} from 'react'; + +type Run = { t: string; m?: 'key' | 'see' }; +type Rung = { + n: number; + stage: string; + title: string; + sub: string; + was?: string; + think?: string; + skill?: string; + text?: string[]; + tools?: string[]; +}; +export type Readings = { + article: { + lead: Run[]; + paras: Run[][]; + board: { steps: string[]; tips: Record }; + }; + ladder: { + stages: { id: string; label: string }[]; + tracks: { think: string; skill: string }; + perspective?: { was: string; think: string }; + toolsLabel: string; + closing: string; + rungs: Rung[]; + }; +}; + +const still = () => + typeof window !== 'undefined' && + !!window.matchMedia && + window.matchMedia('(prefers-reduced-motion: reduce)').matches; + +const runs = (list: Run[]) => + list.map((r, i) => + r.m ? ( + + {r.t} + + ) : ( + {r.t} + ), + ); + +export function ArticleView({ article }: { article: Readings['article'] }) { + return ( +

+

{runs(article.lead)}

+ {article.paras.map((p, i) => ( +

+ {runs(p)} +

+ ))} + +
+ ); +} + +/* Decomposition board: nine steps in the order of the article. Every + element has one fixed place on a 1000x470 stage and fades in or out with + the step, so the stage never resizes and only what the paragraph adds + appears. Drawn into the SVG once on mount. */ +function DecompBoard({ board }: { board: Readings['article']['board'] }) { + const scrollRef = useRef(null); + const stepsRef = useRef(null); + const stageRef = useRef(null); + + useEffect(() => { + const scroller = scrollRef.current; + const stepsBar = stepsRef.current; + const stage = stageRef.current; + if (!scroller || !stepsBar || !stage) return; + return drawBoard(scroller, stepsBar, stage, board); + }, [board]); + + return ( +
+
+
+ +
+
+ ); +} + +function drawBoard( + scroller: HTMLDivElement, + stepsBar: HTMLDivElement, + stage: SVGSVGElement, + board: Readings['article']['board'], +) { + const NS = 'http://www.w3.org/2000/svg'; + const el = (name: string, attrs: Record, parent?: Element) => { + const n = document.createElementNS(NS, name); + Object.keys(attrs || {}).forEach(k => n.setAttribute(k, attrs[k])); + if (parent) parent.appendChild(n); + return n as SVGElement; + }; + const STEPS = board.steps; + const TIPS = board.tips; + const LAST = STEPS.length; + const TH = 44, + Y = 236, + CY = 258; + const RUN_W = 112, + EV_W = 64; + const RX: Record = { a: 140, b: 348, c: 556 }; + const EX: Record = { a: 260, b: 468, c: 676 }; + const CH_X = 764, + CH_W = 104, + OUT_X = 892, + OUT_W = 108; + /* The whole context inventory across the top, and what each run's own + window receives from it. */ + const INV = [ + { id: 'brief', label: 'Task brief' }, + { id: 'raw', label: 'Raw source' }, + { id: 'files', label: 'Files' }, + { id: 'tools', label: 'Tool output' }, + { id: 'logs', label: 'Logs' }, + { id: 'notes', label: 'Notes' }, + ]; + const INV_X: Record = {}; + INV.forEach((s, i) => { + INV_X[s.id] = 15 + i * 164; + }); + const ROW_SRC: Record = { + a: ['brief', 'raw'], + b: ['files'], + c: ['brief', 'logs'], + }; + const WIN: Record = { + a: ['Task brief', 'Raw source'], + b: ['Output of A', 'Files'], + c: ['Output of B', 'Task brief', 'Logs'], + }; + const FX: Record = { + a: RX.a - 42, + b: RX.b - 42, + c: RX.c - 42, + }; + const FY = 80, + FW = 196, + FH = 100; + + stage.textContent = ''; + stepsBar.textContent = ''; + const defs = el('defs', {}, stage); + const pat = el( + 'pattern', + { id: 'd-dots', width: 24, height: 24, patternUnits: 'userSpaceOnUse' }, + defs, + ); + el('circle', { cx: 1, cy: 1, r: 1, fill: 'rgba(42, 42, 42, 0.16)' }, pat); + el( + 'rect', + { x: 0, y: 0, width: 1000, height: 470, fill: 'url(#d-dots)' }, + stage, + ); + const gBack = el('g', {}, stage); + const gLinks = el('g', {}, stage); + const gDrops = el('g', {}, stage); + const gTiles = el('g', {}, stage); + + const items: { node: SVGElement; from: number; until: number }[] = []; + let current = 1, + picked = 'a'; + const tipFor = (label: string, g: SVGElement) => { + if (g.classList.contains('src')) { + return g.classList.contains('is-off') + ? 'The selected run never sees this. That is the point of routing.' + : 'A piece of context. Routing decides which runs get it and which never see it.'; + } + if (g.classList.contains('chip')) { + return /^Output of/.test(label) + ? label.replace('Output of ', 'The result of Run ') + + ', routed in as this run’s input.' + : 'Routed into this window. The run sees this and nothing else.'; + } + if (label === 'Output') + return current === 1 + ? 'The window is too full, so the result gets worse. That is context rot.' + : 'The finished result of the whole chain.'; + if (label === 'You') + return g.dataset.bottom + ? 'You step in only for the real decisions.' + : 'You decide which run goes next and what it sees.'; + return TIPS[label] || ''; + }; + /* One-line tips on hover, focus or tap, ordered for this board on + 2026-10-10. copy-gate: wolf-asked "on-hover oneliners explaining stuff" */ + const tipBox = document.createElement('div'); + tipBox.className = 'd-tip'; + tipBox.setAttribute('aria-hidden', 'true'); + scroller.appendChild(tipBox); + const showTip = (node: SVGElement, label: string) => { + const text = tipFor(label, node); + if (!text) return; + tipBox.textContent = text; + const box = scroller.getBoundingClientRect(), + r = node.getBoundingClientRect(); + const w = tipBox.offsetWidth, + h = tipBox.offsetHeight; + let left = r.left - box.left + scroller.scrollLeft + r.width / 2 - w / 2; + left = Math.max(0, Math.min(left, scroller.scrollWidth - w)); + let top = r.top - box.top - h - 8; + if (top < 0) top = r.bottom - box.top + 8; + tipBox.style.left = Math.round(left) + 'px'; + tipBox.style.top = Math.round(top) + 'px'; + tipBox.classList.add('is-on'); + }; + const hideTip = () => tipBox.classList.remove('is-on'); + const withTip = (node: SVGElement, label: string) => { + node.addEventListener('pointerenter', () => showTip(node, label)); + node.addEventListener('pointerleave', hideTip); + node.addEventListener('focus', () => showTip(node, label)); + node.addEventListener('blur', hideTip); + node.addEventListener('click', () => showTip(node, label)); + return node; + }; + const span = (node: SVGElement, from: number, until?: number) => { + node.classList.add('d-el'); + items.push({ node, from, until: until || LAST }); + return node; + }; + const tile = ( + x: number, + y: number, + w: number, + label: string, + cls: string, + from: number, + until?: number, + h?: number, + ) => { + const g = el('g', { class: 'd-tile ' + cls }, gTiles); + /* Each kind has its own shape: pills for actors and checks, sharp code. */ + const rx = /\b(actor|eval)\b/.test(cls) ? 22 : /\bcode\b/.test(cls) ? 0 : 4; + el('rect', { x, y, width: w, height: h || TH, rx }, g); + const t = el( + 'text', + { + x: x + w / 2, + y: y + (h || TH) / 2, + 'text-anchor': 'middle', + 'dominant-baseline': 'central', + }, + g, + ); + t.textContent = label; + withTip(g, label); + return span(g, from, until); + }; + const link = ( + d: string, + cls: string, + from: number, + until?: number, + parent?: SVGElement, + ) => + span( + el('path', { d, class: 'd-link ' + (cls || '') }, parent || gLinks), + from, + until, + ); + const label = ( + x: number, + y: number, + text: string, + from: number, + until?: number, + ) => { + const t = span(el('text', { x, y, class: 'd-label' }, gBack), from, until); + t.textContent = text; + return t; + }; + const line = (x1: number, x2: number, from: number, until?: number) => + link('M' + x1 + ' ' + CY + ' L' + x2 + ' ' + CY, 'main', from, until); + const curve = (x1: number, y1: number, x2: number, y2: number) => { + const mx = (x1 + x2) / 2; + return `M${x1} ${y1} C${mx} ${y1}, ${mx} ${y2}, ${x2} ${y2}`; + }; + const drop = (x1: number, y1: number, x2: number, y2: number) => { + const my = (y1 + y2) / 2; + return `M${x1} ${y1} C${x1} ${my}, ${x2} ${my}, ${x2} ${y2}`; + }; + const arc = (x1: number, x2: number, top: number) => + `M${x1} ${Y} C${x1} ${top}, ${x2} ${top}, ${x2} ${Y}`; + + /* 1. Context window: one run, and everything the task touched piled into + one window. */ + span( + el( + 'rect', + { x: 180, y: 72, width: 560, height: 338, rx: 4, class: 'd-frame' }, + gBack, + ), + 1, + 1, + ); + withTip(label(180, 60, 'Context window', 1, 1), 'Context window'); + ( + [ + [200, 92, 'Task brief'], + [570, 92, 'Raw source'], + [200, 152, 'Files'], + [570, 152, 'Tool output'], + [200, 300, 'Old answers'], + [390, 300, 'Notes'], + [580, 300, 'Logs'], + ] as [number, number, string][] + ).forEach(c => tile(c[0], c[1], 150, c[2], 'ctx', 1, 1, 40)); + ( + [ + [640, 392, 'More files'], + [420, 426, 'More logs'], + ] as [number, number, string][] + ).forEach(c => tile(c[0], c[1], 150, c[2], 'ctx lost', 1, 1, 40)); + tile(404, Y, RUN_W, 'Run', 'run', 1, 1); + line(124, 404, 1, 1); + line(516, OUT_X, 1, 1); + + /* Who starts the work: you, until a program takes that role. */ + tile(0, Y, 124, 'You', 'actor', 1, 7); + tile(0, Y, 124, 'Orchestrator', 'actor orch', 8); + const out = tile(OUT_X, Y, OUT_W, 'Output', 'out', 1); + + /* 2. Runs: one run's output becomes the next run's input. */ + const picks: Record = { a: [], b: [], c: [] }; + picks.a.push(tile(RX.a, Y, RUN_W, 'Run A', 'run pick', 2)); + picks.b.push(tile(RX.b, Y, RUN_W, 'Run B', 'run pick', 2, 4)); + picks.c.push(tile(RX.c, Y, RUN_W, 'Run C', 'run pick', 2, 5)); + line(124, RX.a, 2); + line(RX.a + RUN_W, RX.b, 2, 3); + line(RX.b + RUN_W, RX.c, 2, 3); + line(RX.c + RUN_W, OUT_X, 2, 3); + + /* 3. Context routing: the whole inventory on top, and each run's own + window holding only what was routed in. */ + const srcTiles: Record = {}; + INV.forEach(s => { + srcTiles[s.id] = tile(INV_X[s.id], 4, 150, s.label, 'src', 3, LAST, 40); + }); + const frames: Record = {}; + const drops: Record = { a: [], b: [], c: [] }; + ['a', 'b', 'c'].forEach(r => { + /* The windows appear empty on the Runs step, filled on Context routing. */ + frames[r] = span( + el( + 'rect', + { x: FX[r], y: FY, width: FW, height: FH, rx: 4, class: 'd-win' }, + gBack, + ), + 2, + ); + label(FX[r], FY - 8, 'Context of ' + r.toUpperCase(), 2); + WIN[r].forEach((name, k) => + tile(FX[r] + 12, FY + 12 + k * 30, FW - 24, name, 'chip', 3, LAST, 24), + ); + link(`M${RX[r] + 56} ${FY + FH} L${RX[r] + 56} ${Y}`, 'main', 2); + ROW_SRC[r].forEach(sid => { + drops[r].push( + link( + drop(INV_X[sid] + 75, 44, FX[r] + FW / 2, FY), + 'flow', + 3, + LAST, + gDrops, + ), + ); + }); + }); + /* A run's result arrives in the next window as its input. */ + link(drop(RX.a + RUN_W, Y, FX.b + 12, FY + 24), 'hand', 2); + link(drop(RX.b + RUN_W, Y, FX.c + 12, FY + 24), 'hand', 2); + + /* 4. Evals: one per step and one on the whole chain. */ + tile(EX.a, Y, EV_W, 'Eval', 'eval', 4); + tile(EX.b, Y, EV_W, 'Eval', 'eval', 4, 4); + tile(EX.c, Y, EV_W, 'Eval', 'eval', 4); + tile(CH_X, Y, CH_W, 'Chain eval', 'eval', 4); + line(RX.a + RUN_W, EX.a, 4); + line(EX.a + EV_W, RX.b, 4); + line(RX.b + RUN_W, EX.b, 4); + line(EX.b + EV_W, RX.c, 4); + line(RX.c + RUN_W, EX.c, 4); + line(EX.c + EV_W, CH_X, 4); + line(CH_X + CH_W, OUT_X, 4); + + /* 5. Code: the step that turned routine is code now, checked by a test. */ + picks.b.push(tile(RX.b, Y, RUN_W, 'Code', 'code pick', 5)); + tile(EX.b, Y, EV_W, 'Test', 'eval', 5); + + /* 6. Benchmarks: a different vendor on step C, and a second model next + to it. */ + picks.c.push(tile(RX.c, Y, RUN_W, 'Other vendor', 'run pick', 6)); + tile(RX.c, 292, RUN_W, 'Second model', 'run', 6); + link(curve(EX.b + EV_W, CY, RX.c, 314), 'main', 6); + link(curve(RX.c + RUN_W, 314, EX.c, CY), 'main', 6); + + /* 7. Memory: only what passed an eval is written; runs read it. */ + tile(140, 380, 600, 'Memory', 'mem', 7); + [EX.a, EX.b, EX.c].forEach(x => + link(`M${x + EV_W / 2} ${Y + TH} L${x + EV_W / 2} 380`, 'mem', 7), + ); + link(`M${RX.a + 30} 380 L${RX.a + 30} ${Y + TH}`, 'mem hand', 7); + link(`M${RX.c + 30} 380 L${RX.c + 30} 336`, 'mem hand', 7); + + /* 8. Orchestrator: agents call each other, an eval pushes back, you step + in for real decisions. */ + link(arc(EX.a + EV_W / 2, RX.a + 90, 192), 'hand back', 8); + link(arc(EX.c + EV_W / 2, RX.c + 90, 192), 'hand back', 8); + tile(0, 400, 124, 'You', 'actor', 8).dataset.bottom = '1'; + link(`M62 400 L62 ${Y + TH}`, 'hand you', 8); + + /* 9. Autonomy: the system runs on its own; its output comes back to you + as the next batch of tasks. */ + link( + `M${OUT_X + OUT_W / 2} ${Y + TH} C${OUT_X + OUT_W / 2} 470, 62 470, 62 444`, + 'hand loop', + 9, + ); + + const pick = (id: string) => { + picked = id; + Object.keys(picks).forEach(r => { + const on = r === id && current >= 3; + picks[r].forEach(g => { + g.classList.toggle('is-on', on); + g.setAttribute('aria-pressed', on ? 'true' : 'false'); + }); + drops[r].forEach(p => p.classList.toggle('is-on', on)); + frames[r].classList.toggle('is-on', on); + }); + INV.forEach(s => + srcTiles[s.id].classList.toggle( + 'is-off', + current >= 3 && ROW_SRC[id].indexOf(s.id) < 0, + ), + ); + }; + const stepButtons: HTMLButtonElement[] = []; + const setStep = (n: number) => { + current = n; + hideTip(); + items.forEach(it => { + const vis = n >= it.from && n <= it.until; + it.node.classList.toggle('is-hidden', !vis); + /* What this step adds stays marked while the step is shown. */ + it.node.classList.toggle('is-new', vis && n > 1 && it.from === n); + if (it.node.classList.contains('pick')) + it.node.setAttribute('tabindex', vis && n >= 3 ? '0' : '-1'); + }); + out.classList.toggle('is-rot', n === 1); + stage.classList.toggle('no-pick', n < 3); + stage.classList.toggle('is-auto', n === LAST); + stepButtons.forEach((b, i) => + b.setAttribute('aria-pressed', i + 1 === n ? 'true' : 'false'), + ); + pick(picked); + }; + STEPS.forEach((text, i) => { + const b = document.createElement('button'); + b.type = 'button'; + b.className = 'd-step'; + b.textContent = text; + b.addEventListener('click', () => setStep(i + 1)); + b.addEventListener('keydown', e => { + if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return; + e.preventDefault(); + const j = Math.min( + LAST, + Math.max(1, current + (e.key === 'ArrowRight' ? 1 : -1)), + ); + stepButtons[j - 1].focus(); + setStep(j); + }); + stepsBar.appendChild(b); + stepButtons.push(b); + }); + Object.keys(picks).forEach(r => { + picks[r].forEach(g => { + g.setAttribute('role', 'button'); + g.addEventListener('click', () => { + if (current >= 3) pick(r); + }); + g.addEventListener('keydown', (e: Event) => { + const k = (e as KeyboardEvent).key; + if ((k === 'Enter' || k === ' ') && current >= 3) { + e.preventDefault(); + pick(r); + } + }); + }); + }); + setStep(1); + + return () => { + stage.textContent = ''; + stepsBar.textContent = ''; + tipBox.remove(); + }; +} + +/* Ladder: the climb, and a level's detail in a modal when its tile is + clicked. The climb is rendered once and never re-rendered, so the reveal + classes set on its rows stay where the observer put them. */ +export function LadderView({ ladder }: { ladder: Readings['ladder'] }) { + const modal = useRef<{ open: (n: number) => void }>(null); + return ( +
+ modal.current?.open(n)} /> +

{ladder.closing}

+ +
+ ); +} + +const Climb = memo(function Climb({ + ladder, + onOpen, +}: { + ladder: Readings['ladder']; + onOpen: (n: number) => void; +}) { + const climbRef = useRef(null); + const listRef = useRef(null); + const onOpenRef = useRef(onOpen); + onOpenRef.current = onOpen; + const stageOf: Record = {}; + ladder.rungs.forEach(r => { + stageOf[r.n] = r.stage; + }); + + useEffect(() => { + const wrap = climbRef.current; + const climb = listRef.current; + if (!wrap || !climb) return; + /* The rail runs from the first node centre to the last; the red route + over it climbs to the newest rung shown. Offsets are summed up to the + list and ignore transforms, so rows still rising measure where they + will land. */ + const cNodes = Array.from(climb.querySelectorAll('.c-n')); + const cRows = cNodes.map(n => n.closest('.c-rung') as HTMLElement); + let cTop = -1; + const mid = (el: HTMLElement) => { + let y = el.offsetHeight / 2; + for ( + let x: HTMLElement | null = el; + x && x !== climb; + x = x.offsetParent as HTMLElement | null + ) + y += x.offsetTop; + return y; + }; + const placeRail = () => { + if (!cNodes.length) return; + const a = mid(cNodes[0]), + z = mid(cNodes[cNodes.length - 1]); + climb.style.setProperty('--rail-top', Math.round(a) + 'px'); + climb.style.setProperty( + '--rail-h', + Math.max(0, Math.round(z - a)) + 'px', + ); + climb.style.setProperty( + '--route', + cTop < 0 + ? '0' + : ((mid(cNodes[cTop]) - a) / Math.max(1, z - a)).toFixed(4), + ); + }; + const showRow = (li: HTMLElement) => { + li.classList.add('is-in'); + const k = cRows.indexOf(li); + if (k <= cTop) return; + if (cTop >= 0) cRows[cTop].classList.remove('is-top'); + cTop = k; + li.classList.add('is-top'); + placeRail(); + }; + const reveal = (li: HTMLElement) => + li.classList.contains('c-rung') ? showRow(li) : li.classList.add('is-in'); + /* Rows reveal as they scroll into view; without motion or without an + observer every row is shown at once. */ + const items = Array.from(climb.children) as HTMLElement[]; + let io: IntersectionObserver | null = null; + if (still() || !('IntersectionObserver' in window)) { + items.forEach(reveal); + } else { + wrap.classList.add('is-armed'); + io = new IntersectionObserver( + entries => { + entries.forEach(en => { + if (!en.isIntersecting) return; + io?.unobserve(en.target); + reveal(en.target as HTMLElement); + }); + }, + { rootMargin: '0px 0px -15% 0px' }, + ); + items.forEach(li => io!.observe(li)); + } + const onClick = (e: MouseEvent) => { + const go = (e.target as HTMLElement).closest('.c-go'); + if (go) onOpenRef.current(Number(go.dataset.n)); + }; + climb.addEventListener('click', onClick); + window.addEventListener('resize', placeRail); + placeRail(); + /* Webfonts change line heights once they land, so the rail is measured + again. */ + let alive = true; + document.fonts?.ready.then(() => alive && placeRail()); + return () => { + alive = false; + io?.disconnect(); + climb.removeEventListener('click', onClick); + window.removeEventListener('resize', placeRail); + }; + }, []); + + const wing = (side: 'think' | 'skill', r: Rung) => { + if (!r[side]) return
; + /* On the first row only, two labels say which belief is wrong and + which is right. */ + const guide = + side === 'think' && r.was && ladder.perspective && r === ladder.rungs[0]; + return ( +
+ {ladder.tracks[side]} + {guide &&

{ladder.perspective!.was}

} + {side === 'think' && r.was && ( +

+ {r.was} +

+ )} + {guide &&

{ladder.perspective!.think}

} +

{r[side]}

+
+ ); + }; + + let ci = 0; + return ( +
+
+

{ladder.tracks.think}

+ +

{ladder.tracks.skill}

+
+
    + {ladder.stages.map(st => ( + +
  1. + {st.label} +
  2. + {ladder.rungs + .filter(r => r.stage === st.id) + .map(r => { + const inner = ( + <> + LVL {r.n} + {r.title} + + ); + return ( +
  3. + {wing('think', r)} + {r.text ? ( + + ) : ( +
    {inner}
    + )} + {wing('skill', r)} +
  4. + ); + })} +
    + ))} +
+
+ ); +}); + +/* The modal fades and rises in, fades out, and closes on Esc, the close + button or a click outside. */ +const LevelModal = forwardRef< + { open: (n: number) => void }, + { ladder: Readings['ladder'] } +>(function LevelModal({ ladder }, ref) { + const dialog = useRef(null); + const body = useRef(null); + const [n, setN] = useState(null); + const [out, setOut] = useState(false); + const r = n == null ? null : ladder.rungs.find(x => x.n === n) || null; + + useImperativeHandle(ref, () => ({ + open: (next: number) => { + const d = dialog.current; + if (!d || !d.showModal) return; + setOut(false); + setN(next); + if (!d.open) d.showModal(); + d.scrollTop = 0; + body.current?.focus({ preventScroll: true }); + }, + })); + + const close = () => { + const d = dialog.current; + if (!d || !d.open || out) return; + if (still()) { + d.close(); + return; + } + setOut(true); + }; + + return ( + { + e.preventDefault(); + close(); + }} + onClick={e => { + if (e.target === dialog.current) close(); + }} + onAnimationEnd={e => { + if (e.target !== dialog.current || !out) return; + setOut(false); + dialog.current?.close(); + }} + > + + ); +}); diff --git a/src/pages/ai-atlas.tsx b/src/pages/ai-atlas.tsx index f0882679..4c38c5dc 100644 --- a/src/pages/ai-atlas.tsx +++ b/src/pages/ai-atlas.tsx @@ -9,6 +9,8 @@ import React, { import { adaptGuide, copy, PAGE_TEXT_DEFAULTS } from '@lib/aiAtlas/adapter'; import bundledGuide from '@lib/aiAtlas/guide.json'; +import { ArticleView, LadderView, Readings } from '@lib/aiAtlas/readings'; +import readingsData from '@lib/aiAtlas/readings.json'; import { securityPassage, securityRadii } from '@lib/aiAtlas/securityPassage'; import SeoGenerator from '@components/SeoGenerator'; @@ -858,6 +860,10 @@ function InkConsume() { } type ViewMode = 'environment' | 'security'; +/* The header tabs: the map, and the two readings that sit beside it. */ +type Tab = 'atlas' | 'article' | 'ladder'; +const READING_TABS: Tab[] = ['article', 'ladder']; +const readings = readingsData as Readings; function DoctrinePanel({ t }: { t: T }) { return ( @@ -1261,6 +1267,24 @@ export function AiAtlasApp({ const [hoverNode, setHoverNode] = useState(null); const [linkHoverNode, setLinkHoverNode] = useState(null); const [viewMode, setViewMode] = useState(initialView); + const [tab, setTab] = useState('atlas'); + const tabPending = useRef(false); + const changeTab = (next: Tab) => { + if (next === tab || tabPending.current) return; + tabPending.current = true; + const stage = document.querySelector('.view-stage'); + stage?.classList.add('is-leaving'); + setTimeout( + () => { + setTab(next); + setFocusedNode(null); + stage?.classList.remove('is-leaving'); + tabPending.current = false; + window.scrollTo({ top: 0 }); + }, + matchMedia('(prefers-reduced-motion: reduce)').matches ? 1 : 240, + ); + }; const hasHover = useHasHover(); /* mark while AI Atlas is mounted so the global navbar can @@ -1291,6 +1315,12 @@ export function AiAtlasApp({ if (typeof window === 'undefined') return; const sync = () => { const hash = window.location.hash.replace(/^#/, '').toLowerCase(); + if ((READING_TABS as string[]).includes(hash)) { + setTab(hash as Tab); + setFocusedNode(null); + return; + } + setTab('atlas'); if (hash === 'security') { setViewMode('security'); setFocusedNode(null); @@ -1315,14 +1345,15 @@ export function AiAtlasApp({ useEffect(() => { if (typeof window === 'undefined') return; let desired = ''; - if (viewMode === 'security') desired = '#security'; + if (tab !== 'atlas') desired = '#' + tab; + else if (viewMode === 'security') desired = '#security'; else if (focusedNode) desired = '#' + focusedNode; const current = window.location.hash; if (current !== desired) { const url = window.location.pathname + window.location.search + desired; window.history.replaceState(null, '', url); } - }, [viewMode, focusedNode]); + }, [tab, viewMode, focusedNode]); const metrics = null; useEffect(() => { @@ -1557,538 +1588,570 @@ export function AiAtlasApp({ )}
- {t.welcomeBanner} - -
- {t.metaLabel} +
-
-
- {viewMode === 'environment' && ( -
setHoverNode(null)} - > - {consuming && } + {tab !== 'atlas' && ( +
+ {tab === 'article' ? ( + + ) : ( + + )} +
+ )} - +
+ {viewMode === 'environment' && ( +
setHoverNode(null)} > - {data.projects.members.map((p: any) => ( - - ))} - - {(() => { - const ringMeta = [ - { key: 'order', r: data.order.r, defaultTheta: 90 }, - { key: 'devEnv', r: data.devEnv.r, defaultTheta: 270 }, - { key: 'projects', r: data.projects.r, defaultTheta: 270 }, - { - key: 'territories', - r: data.territoryR, - defaultTheta: 270, - }, - ]; - return ringMeta.map(rm => { - const cfg = rL(rm.key); - const ringHL = `ring:${rm.key}`; - return ( - - ); - }); - })()} - - {data.projects.members.map((p: any) => ( - - ))} + {consuming && } - {data.reception && ( - <> - - + {data.projects.members.map((p: any) => ( + - - )} - - - - - - - - {data.projects.members - .slice(0, -1) - .map((p: any, i: number) => { - const r = data.projects.r * HALF, - start = p.theta + 16, - end = p.theta + 44; - const a = POL(data.projects.r, start), - b = POL(data.projects.r, end); - const active = - selectedStage?.id === p.id || - (i === 4 && - selectedStage?.id === data.projects.members[5].id); + ))} + + {(() => { + const ringMeta = [ + { key: 'order', r: data.order.r, defaultTheta: 90 }, + { key: 'devEnv', r: data.devEnv.r, defaultTheta: 270 }, + { + key: 'projects', + r: data.projects.r, + defaultTheta: 270, + }, + { + key: 'territories', + r: data.territoryR, + defaultTheta: 270, + }, + ]; + return ringMeta.map(rm => { + const cfg = rL(rm.key); + const ringHL = `ring:${rm.key}`; return ( - ); - })} - - {data.projects.members.flatMap((p: any) => - p.support.map((id: string) => ( + }); + })()} + + {data.projects.members.map((p: any) => ( + + ))} + + {data.reception && ( + <> + + + + )} + + + + + + + + {data.projects.members + .slice(0, -1) + .map((p: any, i: number) => { + const r = data.projects.r * HALF, + start = p.theta + 16, + end = p.theta + 44; + const a = POL(data.projects.r, start), + b = POL(data.projects.r, end); + const active = + selectedStage?.id === p.id || + (i === 4 && + selectedStage?.id === data.projects.members[5].id); + return ( + + ); + })} + + {data.projects.members.flatMap((p: any) => + p.support.map((id: string) => ( + + )), + )} + + {(data.relations || []).map(([a, b]: string[]) => ( - )), - )} - - {(data.relations || []).map(([a, b]: string[]) => ( - - ))} - - {data.projects.members - .filter((p: any) => p.leadDiamond) - .map((p: any) => ( - ))} - {data.projects.members - .filter((p: any) => p.leadDiamond2) - .map((p: any) => ( - - ))} + {data.projects.members + .filter((p: any) => p.leadDiamond) + .map((p: any) => ( + + ))} - {data.projects.members.flatMap((p: any) => - p.children - .filter((c: any) => !c.noSpoke) - .map((c: any) => ( + {data.projects.members + .filter((p: any) => p.leadDiamond2) + .map((p: any) => ( - )), - )} - - onSelect('wolf')} - onMouseEnter={() => onSelect('wolf', 'hover')} - onMouseLeave={() => onSelect(null, 'hover')} - style={{ cursor: 'pointer' }} - > - - - - - 天 - - - WOLF - - - {(data.apex && data.apex.sub) || t.apexFounderFallback} - - - - + ))} + + {data.projects.members.flatMap((p: any) => + p.children + .filter((c: any) => !c.noSpoke) + .map((c: any) => ( + + )), + )} - {data.reception && ( - <> - onSelect('wolf')} + onMouseEnter={() => onSelect('wolf', 'hover')} + onMouseLeave={() => onSelect(null, 'hover')} + style={{ cursor: 'pointer' }} + > + - - - - )} + + 天 + + + WOLF + + + {(data.apex && data.apex.sub) || t.apexFounderFallback} + + - {data.devEnv.members.map((n: any) => ( - ))} - {data.projects.members - .filter((p: any) => p.id !== 'terminal') - .map((p: any) => ( + {data.reception && ( + <> + + + + + )} + + {data.devEnv.members.map((n: any) => ( ))} - {data.projects.members - .filter((p: any) => p.leadDiamond) - .map((p: any) => { - const id = `lead-${p.id}`; - return ( + {data.projects.members + .filter((p: any) => p.id !== 'terminal') + .map((p: any) => ( - ); - })} + ))} - {data.projects.members - .filter((p: any) => p.id === 'terminal') - .map((p: any) => ( - - ))} + {data.projects.members + .filter((p: any) => p.leadDiamond) + .map((p: any) => { + const id = `lead-${p.id}`; + return ( + + ); + })} - {data.projects.members - .filter((p: any) => p.leadDiamond2) - .map((p: any) => { - const id = `lead2-${p.id}`; - return ( + {data.projects.members + .filter((p: any) => p.id === 'terminal') + .map((p: any) => ( - ); - })} + ))} - {data.projects.members.flatMap((p: any) => - p.children.map((c: any) => { - const labelForWidth = c.redacted - ? t.redactedPlaceholder - : c.label; + {data.projects.members + .filter((p: any) => p.leadDiamond2) + .map((p: any) => { + const id = `lead2-${p.id}`; + return ( + + ); + })} + + {data.projects.members.flatMap((p: any) => + p.children.map((c: any) => { + const labelForWidth = c.redacted + ? t.redactedPlaceholder + : c.label; + return ( + 12 ? 190 : 165} + h={42} + redactedPlaceholder={t.redactedPlaceholder} + /> + ); + }), + )} + + {(() => { + if ( + !focusId || + focusId.startsWith('ring:') || + !points[focusId] + ) + return null; + const node = points[focusId].node; + if (!node) return null; + let w: number, h: number; + if (focusId === 'order') { + w = 170; + h = 50; + } else if (focusId.startsWith('lead-')) { + w = 140; + h = 38; + } else if ( + data.devEnv.members.some((n: any) => n.id === focusId) + ) { + w = focusId === 'tools' ? 200 : 170; + h = node.sub ? 66 : 48; + } else if ( + data.projects.members.some((p: any) => p.id === focusId) + ) { + w = 210; + h = node.sub ? 72 : 52; + } else { + const lw = node.redacted + ? t.redactedPlaceholder + : node.label; + w = lw.length > 12 ? 190 : 165; + h = 42; + } return ( 12 ? 190 : 165} - h={42} + w={w} + h={h} redactedPlaceholder={t.redactedPlaceholder} /> ); - }), - )} - - {(() => { - if ( - !focusId || - focusId.startsWith('ring:') || - !points[focusId] - ) - return null; - const node = points[focusId].node; - if (!node) return null; - let w: number, h: number; - if (focusId === 'order') { - w = 170; - h = 50; - } else if (focusId.startsWith('lead-')) { - w = 140; - h = 38; - } else if ( - data.devEnv.members.some((n: any) => n.id === focusId) - ) { - w = focusId === 'tools' ? 200 : 170; - h = node.sub ? 66 : 48; - } else if ( - data.projects.members.some((p: any) => p.id === focusId) - ) { - w = 210; - h = node.sub ? 72 : 52; - } else { - const lw = node.redacted - ? t.redactedPlaceholder - : node.label; - w = lw.length > 12 ? 190 : 165; - h = 42; - } - return ( - - ); - })()} - - - - - - -
- )} + })()} + - {viewMode === 'security' && ( - - )} -
+ + + + +
+ )} - -
+ {viewMode === 'security' && ( + + )} +
+ + + + )} Date: Tue, 13 Oct 2026 10:55:53 +0000 Subject: [PATCH 3/3] feat(ai-atlas): emphasized header tabs, momiji leaves, STORY tab and legend The header tabs become an ink-framed switch with the fill sliding to the selected tab, a line icon per tab, and momiji leaves falling behind the unselected ones (seeded after mount, paused on hover, gone under reduced motion). ARTICLE is renamed STORY (hash stays #article). The story frame carries a legend for the red and blue marks in its top padding. Legend labels are pushable page words. Ported from the look accepted on the Terminal's Atlas on 2026-10-13. Co-Authored-By: Claude Opus 5.5 --- src/lib/aiAtlas/adapter.ts | 4 +- src/lib/aiAtlas/readings.tsx | 62 +++++++- src/pages/ai-atlas.tsx | 13 +- src/styles/ai-atlas.css | 273 +++++++++++++++++++++++++++++++---- 4 files changed, 321 insertions(+), 31 deletions(-) diff --git a/src/lib/aiAtlas/adapter.ts b/src/lib/aiAtlas/adapter.ts index 63dc373c..bb8ca621 100644 --- a/src/lib/aiAtlas/adapter.ts +++ b/src/lib/aiAtlas/adapter.ts @@ -31,8 +31,10 @@ export const PAGE_TEXT_DEFAULTS: Record = { ringTerritoriesDesc: 'Every topic opens its own card.', metaLabel: 'TERMINAL DOCUMENTATION', tabAtlas: 'Atlas', - tabArticle: 'Article', + tabArticle: 'Story', tabLadder: 'Ladder', + legendKey: 'Key thesis', + legendSee: 'Product & business', topicsPlaceholder: 'The Atlas', stagesAria: 'Project to Result, clockwise', }; diff --git a/src/lib/aiAtlas/readings.tsx b/src/lib/aiAtlas/readings.tsx index 4e2addfe..5fedead6 100644 --- a/src/lib/aiAtlas/readings.tsx +++ b/src/lib/aiAtlas/readings.tsx @@ -57,9 +57,69 @@ const runs = (list: Run[]) => ), ); -export function ArticleView({ article }: { article: Readings['article'] }) { +/* Momiji leaves behind a header tab: six per tab, each falling at its own + pace from a random point of its fall, so they never drop at once. Seeded + after mount, so the server and the first client render agree. */ +const LEAF_TONES = [ + 'var(--red, #b3392b)', + 'var(--gold, #c08a2c)', + '#c4573a', + '#a8642a', +]; +export function TabLeaves() { + const [leaves, setLeaves] = useState([]); + useEffect(() => { + const rnd = (a: number, b: number) => a + Math.random() * (b - a); + setLeaves( + Array.from({ length: 6 }, (_, i) => { + const dur = rnd(5200, 8600); + const size = rnd(8, 13).toFixed(1) + 'px'; + return [ + { + left: rnd(4, 92).toFixed(1) + '%', + animationDuration: dur.toFixed(0) + 'ms', + animationDelay: (-rnd(0, dur)).toFixed(0) + 'ms', + ['--leaf-drift' as any]: rnd(-28, 28).toFixed(0) + 'px', + }, + { + width: size, + height: size, + background: LEAF_TONES[i % LEAF_TONES.length], + animationDuration: rnd(1800, 3000).toFixed(0) + 'ms', + animationDelay: (-rnd(0, 3000)).toFixed(0) + 'ms', + ['--leaf-spin' as any]: + (Math.random() < 0.5 ? -1 : 1) * rnd(24, 48) + 'deg', + opacity: Number(rnd(0.35, 0.7).toFixed(2)), + }, + ]; + }), + ); + }, []); + return ( + + ); +} + +export function ArticleView({ + article, + legend, +}: { + article: Readings['article']; + legend: { key: string; see: string }; +}) { return (
+ {/* What the red and blue marks mean, in the frame's top padding. */} +
+ {legend.key} + {legend.see} +

{runs(article.lead)}

{article.paras.map((p, i) => (

diff --git a/src/pages/ai-atlas.tsx b/src/pages/ai-atlas.tsx index 4c38c5dc..57ea1af6 100644 --- a/src/pages/ai-atlas.tsx +++ b/src/pages/ai-atlas.tsx @@ -9,7 +9,12 @@ import React, { import { adaptGuide, copy, PAGE_TEXT_DEFAULTS } from '@lib/aiAtlas/adapter'; import bundledGuide from '@lib/aiAtlas/guide.json'; -import { ArticleView, LadderView, Readings } from '@lib/aiAtlas/readings'; +import { + ArticleView, + LadderView, + Readings, + TabLeaves, +} from '@lib/aiAtlas/readings'; import readingsData from '@lib/aiAtlas/readings.json'; import { securityPassage, securityRadii } from '@lib/aiAtlas/securityPassage'; @@ -1598,6 +1603,7 @@ export function AiAtlasApp({ onClick={() => changeTab(k)} > {t['tab' + k[0].toUpperCase() + k.slice(1)]} + ))} @@ -1607,7 +1613,10 @@ export function AiAtlasApp({ {tab !== 'atlas' && (

{tab === 'article' ? ( - + ) : ( )} diff --git a/src/styles/ai-atlas.css b/src/styles/ai-atlas.css index 8a2fc173..5c61945b 100644 --- a/src/styles/ai-atlas.css +++ b/src/styles/ai-atlas.css @@ -2219,48 +2219,267 @@ body.darkTheme .ai-atlas-root .feature-modal__body::-webkit-scrollbar-thumb { so the dark theme follows: one red, Atlas blue for the product side, gold for the human side, EB Garamond and JetBrains Mono. ============================================================ */ -.ai-atlas-root .atlas-tabs { - display: inline-flex; - align-items: baseline; - gap: 22px; -} +/* Header tabs: an ink-framed switch in the language of the rail's + ENVIRONMENT / SECURITY toggle, the ink fill sliding to the selected tab + over 420ms. Each tab carries a line icon (a currentColor mask), and + momiji leaves fall behind the unselected ones; they pause on hover, fade + out on the selected tab and are removed under reduced motion. The STORY + legend sits in the frame's top padding so no line of the story moves. + Accepted by Wolf on docs-terminal on 2026-10-13. */ .ai-atlas-root .atlas-tab { margin: 0; - padding: 0; border: 0; background: none; - font: inherit; - letter-spacing: 0.22em; text-transform: uppercase; - color: var(--ink-3); cursor: pointer; - text-decoration: underline; - text-decoration-color: transparent; - text-decoration-thickness: 2px; - text-underline-offset: 6px; - transition: - color 240ms cubic-bezier(0.4, 0, 0.2, 1), - text-decoration-color 240ms cubic-bezier(0.4, 0, 0.2, 1); } -.ai-atlas-root .atlas-tab:hover { - color: var(--ink); + +.ai-atlas-root .doc-header .header-left { + align-items: center; } -.ai-atlas-root .atlas-tab[aria-pressed='true'] { - color: var(--ink); +.ai-atlas-root .atlas-tabs { + position: relative; + display: inline-grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + align-items: stretch; + gap: 0; + margin-left: 16px; + border: 1px solid var(--ink); + background: var(--paper); + isolation: isolate; + overflow: hidden; + vertical-align: middle; +} +.ai-atlas-root .atlas-tabs::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: calc(100% / 3); + height: 100%; + background: var(--ink-fill, var(--ink)); + z-index: 0; + transition: transform 420ms cubic-bezier(0.5, 0.05, 0.2, 1); +} +.ai-atlas-root + .atlas-tabs:has(.atlas-tab:nth-child(2)[aria-pressed='true'])::before { + transform: translateX(100%); +} +.ai-atlas-root + .atlas-tabs:has(.atlas-tab:nth-child(3)[aria-pressed='true'])::before { + transform: translateX(200%); +} +.ai-atlas-root .atlas-tabs .atlas-tab { + position: relative; + z-index: 1; + padding: 12px 32px; + font-family: var(--mono); + font-size: 16px; font-weight: 600; - text-decoration-color: var(--red); + line-height: 24px; + letter-spacing: 0.22em; + text-align: center; + color: var(--ink); + text-decoration: none; + transition: + color 320ms ease, + background-color 240ms cubic-bezier(0.4, 0, 0.2, 1); +} +.ai-atlas-root .atlas-tabs .atlas-tab + .atlas-tab { + border-left: 1px solid var(--ink); +} +.ai-atlas-root .atlas-tabs .atlas-tab:hover { + background: var(--paper-2, rgba(42, 42, 42, 0.08)); +} +.ai-atlas-root .atlas-tabs .atlas-tab[aria-pressed='true'] { + color: var(--paper); + background: transparent; } -.ai-atlas-root .atlas-tab:focus-visible { +.ai-atlas-root .atlas-tabs .atlas-tab:focus-visible { outline: 2px solid var(--red); - outline-offset: 4px; - border-radius: var(--r); + outline-offset: -4px; +} +@media (max-width: 640px) { + .ai-atlas-root .atlas-tabs { + display: grid; + width: 100%; + margin: 16px 0 0; + } + .ai-atlas-root .atlas-tabs .atlas-tab { + padding: 12px 8px; + letter-spacing: 0.14em; + } } @media (prefers-reduced-motion: reduce) { - .ai-atlas-root .atlas-tab { + .ai-atlas-root .atlas-tabs::before, + .ai-atlas-root .atlas-tabs .atlas-tab { transition: none; } } +.ai-atlas-root .atlas-tabs .atlas-tab { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 12px; +} +.ai-atlas-root .atlas-tabs .atlas-tab::before { + content: ''; + flex: none; + width: 20px; + height: 20px; + background: currentColor; + -webkit-mask: var(--tab-ico) center/contain no-repeat; + mask: var(--tab-ico) center/contain no-repeat; + transform-origin: 50% 100%; +} +.ai-atlas-root .atlas-tabs .atlas-tab:nth-child(1) { + --tab-ico: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%224.5%22%2F%3E%3Cpath%20d%3D%22M12%201.5v4M12%2018.5v4M1.5%2012h4M18.5%2012h4%22%2F%3E%3C%2Fsvg%3E'); +} +.ai-atlas-root .atlas-tabs .atlas-tab:nth-child(2) { + --tab-ico: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M5%202.5h10l4%204v15H5z%22%2F%3E%3Cpath%20d%3D%22M15%202.5v4h4M8.5%2011h7M8.5%2014.5h7M8.5%2018h4.5%22%2F%3E%3C%2Fsvg%3E'); +} +.ai-atlas-root .atlas-tabs .atlas-tab:nth-child(3) { + --tab-ico: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22square%22%20stroke-linejoin%3D%22miter%22%3E%3Cpath%20d%3D%22M7%202v20M17%202v20M7%206h10M7%2010.5h10M7%2015h10M7%2019.5h10%22%2F%3E%3C%2Fsvg%3E'); +} + +.ai-atlas-root .atlas-tabs .atlas-tab { + overflow: hidden; +} +.ai-atlas-root .atlas-tabs .tab-leaves { + position: absolute; + inset: 0; + z-index: -1; + pointer-events: none; + overflow: hidden; + opacity: 1; + transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1); +} +.ai-atlas-root .atlas-tabs .atlas-tab[aria-pressed='true'] .tab-leaves { + opacity: 0; +} +.ai-atlas-root .atlas-tabs .tab-leaf { + position: absolute; + top: 0; + display: block; + animation-name: atlas-leaf-fall; + animation-timing-function: linear; + animation-iteration-count: infinite; +} +.ai-atlas-root .atlas-tabs .tab-leaf i { + display: block; + -webkit-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%201l1.6%204.6%203.1-2.1-.6%204.4%204.6-1.2-2.5%203.8%204.3%201.6-4.3%201.9%202%203.4-4.2-.9-.5%203.8-2.7-2.7-.3%206.3h-1l-.3-6.3-2.7%202.7-.5-3.8-4.2.9%202-3.4-4.3-1.9%204.3-1.6-2.5-3.8%204.6%201.2-.6-4.4%203.1%202.1z%22%2F%3E%3C%2Fsvg%3E') + center/contain no-repeat; + mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M12%201l1.6%204.6%203.1-2.1-.6%204.4%204.6-1.2-2.5%203.8%204.3%201.6-4.3%201.9%202%203.4-4.2-.9-.5%203.8-2.7-2.7-.3%206.3h-1l-.3-6.3-2.7%202.7-.5-3.8-4.2.9%202-3.4-4.3-1.9%204.3-1.6-2.5-3.8%204.6%201.2-.6-4.4%203.1%202.1z%22%2F%3E%3C%2Fsvg%3E') + center/contain no-repeat; + animation-name: atlas-leaf-sway; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; + animation-direction: alternate; +} +.ai-atlas-root .atlas-tabs .atlas-tab:hover .tab-leaf, +.ai-atlas-root .atlas-tabs .atlas-tab:hover .tab-leaf i { + animation-play-state: paused; +} +@keyframes atlas-leaf-fall { + 0% { + transform: translate(0, -16px); + opacity: 0; + } + 12% { + opacity: 1; + } + 88% { + opacity: 1; + } + 100% { + transform: translate(var(--leaf-drift), 64px); + opacity: 0; + } +} +@keyframes atlas-leaf-sway { + 0% { + transform: translateX(-6px) rotate(calc(var(--leaf-spin) * -1)); + } + 100% { + transform: translateX(6px) rotate(var(--leaf-spin)); + } +} +@media (max-width: 640px) { + .ai-atlas-root .atlas-tabs .atlas-tab { + flex-direction: column; + gap: 4px; + } + .ai-atlas-root .atlas-tabs .atlas-tab::before { + width: 16px; + height: 16px; + } +} +@media (prefers-reduced-motion: reduce) { + .ai-atlas-root .atlas-tabs .tab-leaves { + display: none; + } +} + +.ai-atlas-root .rd .rd-legend { + position: absolute; + top: 16px; + right: 48px; + display: flex; + gap: 24px; + align-items: center; + font-family: var(--mono); + font-size: 14px; + line-height: 20px; + letter-spacing: 0.18em; + text-transform: uppercase; + color: var(--ink-3); + pointer-events: none; + animation: rd-legend-in 400ms cubic-bezier(0.4, 0, 0.2, 1) both; +} +.ai-atlas-root .rd .rd-legend-item { + display: inline-flex; + align-items: center; + gap: 8px; + white-space: nowrap; +} +.ai-atlas-root .rd .rd-legend-item::before { + content: ''; + width: 8px; + height: 8px; + transform: rotate(45deg); + background: var(--key); +} +.ai-atlas-root .rd .rd-legend-see::before { + background: var(--see); +} +@keyframes rd-legend-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@media (max-width: 640px) { + .ai-atlas-root .rd .rd-thesis { + padding-top: 56px; + } + .ai-atlas-root .rd .rd-legend { + top: 20px; + left: 16px; + right: 16px; + gap: 16px; + font-size: 12px; + letter-spacing: 0.12em; + } +} +@media (prefers-reduced-motion: reduce) { + .ai-atlas-root .rd .rd-legend { + animation: none; + } +} + .ai-atlas-root .rd { --bg: var(--paper); --surface: var(--panel-bg); @@ -2342,7 +2561,7 @@ body.darkTheme .ai-atlas-root .feature-modal__body::-webkit-scrollbar-thumb { } @media (max-width: 640px) { .ai-atlas-root .rd .rd-thesis { - padding: var(--sp-3) var(--sp-2); + padding: 56px var(--sp-2) var(--sp-3); } .ai-atlas-root .rd .lead { font-size: var(--fs-para); @@ -2948,7 +3167,7 @@ html:has(.ai-atlas-root .rd .l-modal[open]) { } @media (max-width: 480px) { .ai-atlas-root .rd .rd-thesis { - padding: var(--sp-2); + padding: 56px var(--sp-2) var(--sp-2); } } .ai-atlas-root .rd .decomp {