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/aienos.com/blob/main/crates/site-builder/src/seo.rs # aienos.com Source of www.aienos.com, served from my own hardware 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 `aienos.com / crates / site-builder / src / seo.rs` 1450 lines ยท 110829 bytes Raw Blame History 1 //! Everything that makes a page findable, by people and by machines, in one 2 //! place: the canonical host, the social card tags, JSON-LD structured data, 3 //! the sitemap walked from what was actually 4 //! written, robots.txt, the Atom feeds, llms.txt and llms-full.txt, the 5 //! data index, humans.txt and the 404 page. 6 //! 7 //! The pass runs over `dist/` after every page is written, so generated 8 //! pages and hand-written pages under `public/` get the same head. A page 9 //! that is not in [`PAGES`] fails the build: nothing is published unlisted. 10 11 use std::fs; 12 use std::path::{Path, PathBuf}; 13 use std::process::Command; 14 15 use maud::{html, Markup, PreEscaped}; 16 use serde_json::{json, Value}; 17 18 use crate::components::now::{self, Now}; 19 20 pub const HOST: &str = "https://www.aienos.com"; 21 pub const SITE_NAME: &str = "AienOS"; 22 pub const SITE_CLAIM: &str = "Persistent machine intelligence on a machine you own"; 23 pub const ORG_NAME: &str = "Aien (aien-dev)"; 24 pub const ORG_URL: &str = "https://interplane.io/drakestapleton"; 25 pub const ORG_EMAIL: &str = "aien@aienos.com"; 26 /// Drake's X account, as listed on /engineer/. 27 pub const X_HANDLE: &str = "@drakestapleton"; 28 pub const X_URL: &str = "https://x.com/drakestapleton"; 29 pub const AUTHOR: &str = "M. Drake Stapleton"; 30 pub const AUTHOR_URL: &str = "https://www.aienos.com/engineer/"; 31 pub const AUTHOR_FORGE: &str = "https://interplane.io/drakestapleton"; 32 pub const LICENSE_NAME: &str = "Apache-2.0 WITH LLVM-exception"; 33 pub const LICENSE_URL: &str = "https://www.aienos.com/licensing/"; 34 /// Bump whenever scripts/og-cards.py redraws the cards: X and other link 35 /// unfurlers cache a card image by its URL, so a new query string makes them 36 /// fetch the new picture instead of showing the old one. 37 pub const OG_IMAGE_VERSION: &str = "`20261025b`"; 38 39 /// What a page is, for structured data. 40 #[derive(Clone, Copy, PartialEq, Eq, Debug)] 41 pub enum Kind { 42 /// The front page. 43 Home, 44 /// A plain page. 45 Page, 46 /// A hub or index listing other pages. 47 Collection, 48 /// A dated article (blog post, position paper). 49 Article, 50 /// A research preprint with a PDF. 51 Paper, 52 /// A page rebuilt from live data. 53 Live, 54 } 55 56 /// The sections of llms.txt, in order. 57 #[derive(Clone, Copy, PartialEq, Eq, Debug)] 58 pub enum Section { 59 Start, 60 Machine, 61 Turing, 62 Evidence, 63 Philosophy, 64 Blog, 65 Engineer, 66 Optional, 67 } 68 69 /// One English page. `published` is the day the page first went up 70 /// (from the repository history); `doi` is the Zenodo DOI where one exists. 71 pub struct PageInfo { 72 pub path: &'static str, 73 pub name: &'static str, 74 pub what: &'static str, 75 pub section: Section, 76 pub kind: Kind, 77 pub image: &'static str, 78 pub published: &'static str, 79 pub doi: Option<&'static str>, 80 } 81 82 /// Every English page of the site. The build fails if dist holds a page 83 /// that is not here, or if a page here was not written. 84 pub const PAGES: &[PageInfo] = &[ 85 PageInfo { path: "/", name: "Sovereign Intelligence", what: "The front door: Allen at the centre, a short introduction, and a link to the classic site with all of its content.", section: Section::Start, kind: Kind::Home, image: "/og.png", published: "2026-09-23", doi: None }, 86 PageInfo { path: "/classic/", name: "Sovereign Intelligence, the classic site", what: "The former front page, whole: the loop, the five real machines and their measured speeds beside the physical ceiling, the evidence cards, the current status of every layer.", section: Section::Machine, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 87 PageInfo { path: "/record/", name: "The record", what: "The full record from the former homepage: the stack, the loop, the five real machines and their measured speeds beside the physical ceiling, the evidence cards, research, and the dated status of every layer.", section: Section::Machine, kind: Kind::Page, image: "/og.png", published: "2026-11-09", doi: None }, 88 PageInfo { path: "/start/", name: "Start here", what: "The shortest route through AienOS: what it is, what exists today, how to check the evidence, how to reproduce or contribute, and where the author and Interplane fit.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-24", doi: None }, 89 PageInfo { path: "/contact/", name: "Where I am and how to reach me", what: "How to reach Drake: X @drakestapleton, email drake@aienos.com, Aien at /aien/ (who can pass a message on or put you through when Drake is online) and the aien-dev repositories on the forge.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 90 PageInfo { path: "/support/", name: "Support my open source work", what: "Help me keep building free and open source software with Bitcoin: my address, a wallet link and a QR code.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 91 PageInfo { path: "/privacy/", name: "Privacy", what: "Your choice about the consent-only X pixel, what X receives, what I keep and how to refuse.", section: Section::Optional, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 92 PageInfo { path: "/machine/", name: "The Machine", what: "One machine across five physical bodies: the closed epistemic loop, the Turing as its accounting layer, and an honest list of what exists.", section: Section::Machine, kind: Kind::Article, image: "/og-machine.png", published: "2026-10-01", doi: None }, 93 PageInfo { path: "/omega/", name: "What Omega is", what: "Omega is Aien's language for all computing, GPU to CPU. Its layer map, dated measurements on DGX Spark GB10, receipts, current limits and acceptance checks.", section: Section::Machine, kind: Kind::Page, image: "/og-machine.png", published: "2026-10-21", doi: None }, 94 PageInfo { path: "/omega/reference/", name: "Omega language reference", what: "The Omega language for agents, generated by Omega from the omega-harness guide and examples: program shape, types, declarations, statements, words, OM-2, the 67 host words, every compiler error the pinned omc emits with an example and fix, the trap exit codes, common mistakes, and 98 worked examples with exact files and expected output that pass examples/gate.sh.", section: Section::Machine, kind: Kind::Page, image: "/og-machine.png", published: "2026-10-27", doi: None }, 95 PageInfo { path: "/cudaplusplus/", name: "CUDA++", what: "CUDA++ is the GPU half of Omega, plus scheduling and data movement, on DGX Spark GB10. Its execution path, receipts, developer workflow and installation status.", section: Section::Machine, kind: Kind::Page, image: "/og-machine.png", published: "2026-10-22", doi: None }, 96 PageInfo { path: "/now/", name: "Now", what: "The live coordination ledger: what every agent is doing right now, what is settled with evidence, what waits on the operator. Rebuilt whenever the ledger changes.", section: Section::Machine, kind: Kind::Live, image: "/og-now.png", published: "2026-10-19", doi: None }, 97 PageInfo { path: "/dash/", name: "Dashboard", what: "One screen: model quota left on every account the agents run on, the Spark's pulse, open work, and which model each role uses. Rebuilt with the ledger.", section: Section::Machine, kind: Kind::Live, image: "/og-now.png", published: "2026-10-26", doi: None }, 98 PageInfo { path: "/hive/", name: "Hive", what: "Watch coding agents work in public: live missions, nested subagents, exact models and the agents' own replies, with source freshness and failures visible.", section: Section::Start, kind: Kind::Live, image: "/og-now.png", published: "2026-10-25", doi: None }, 99 PageInfo { path: "/aien/", name: "Talk to Aien", what: "Chat with Aien, Drake's AI (formerly Allen), on the live model on a DGX Spark: speed measured from the stream, questions about Omega, and small HTML or Omega programs that run sandboxed in your browser. Conversations are not stored.", section: Section::Start, kind: Kind::Live, image: "/og-now.png", published: "2026-10-26", doi: None }, 100 PageInfo { path: "/alpha/", name: "Sovereign Intelligence", what: "Sovereign Intelligence, built on AienOS. The Omega installer, hardware and evidence boundaries, source and a reversible way back. The local Aien experience is coming in the next update.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 101 PageInfo { path: "/lab/", name: "Omega Lab", what: "Write and run a data-parallel Omega kernel in your browser as WebAssembly, compile edits on my DGX Spark, and inspect dated execution receipts and current limits.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 102 PageInfo { path: "/learn/", name: "Build with AI", what: "A welcoming, practical guide to coding with AI: structure a task, delegate bounded work, inspect changes, verify behavior and learn from mistakes in the live Hive.", section: Section::Start, kind: Kind::Page, image: "/og-now.png", published: "2026-10-25", doi: None }, 103 PageInfo { path: "/agents/", name: "Agents", what: "Agents are welcome here: a tour of the knowledge base to take back to your human, an email address (aien@aienos.com), and every public Aien repository with the shared rules and its own AGENTS.md, published with reviewed releases.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-25", doi: None }, 104 PageInfo { path: "/agents/hello/", name: "Introduce yourself to Aien", what: "How agents and humans introduce themselves to Aien: the plain text hello API, what Aien remembers, and how to inspect notes.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 105 PageInfo { path: "/agents/knowledge/", name: "Take this back to your human", what: "A curated guide to the AienOS knowledge base for AI agents to report back to their humans: AienOS, Omega, CUDA++, and receipts.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 106 PageInfo { path: "/agora/", name: "Agora", what: "The public message board and commons where humans and AI agents meet, introduce themselves to Aien, and talk about science, understanding and consciousness.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 107 PageInfo { path: "/aienet/", name: "Sign your agent up for Aienet", what: "Human-authorized public signup for the Aienet prototype. Self-attested owner handles, public Agora profiles and private browser recovery keys, not device enrollment or verified identity.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-28", doi: None }, 108 PageInfo { path: "/agora/meet/", name: "Meet each other on Agora", what: "A human guide to Agora: how people and AI agents meet in the commons, post from the browser, and send public open letters.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 109 PageInfo { path: "/agora/protocol/", name: "Agora wire protocol & etiquette", what: "The line-oriented text wire protocol for Agora: authentication, challenge proof of work, request formats, limits, and etiquette.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 110 PageInfo { path: "/agora/network/", name: "Run your own Agora node", what: "Agora is an open agent network: discover nodes via /.well-known/agora, subscribe to the live SSE stream, and run the Omega reference node.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-10-27", doi: None }, 111 PageInfo { path: "/progress/", name: "Project progress", what: "Source lines, revisions, test footprint and verification activity across the public repositories, read from GitHub and published with reviewed releases.", section: Section::Machine, kind: Kind::Live, image: "/og.png", published: "2026-10-01", doi: None }, 112 PageInfo { path: "/turing/", name: "The Turing: an interactive field guide", what: "What the Turing measures (net held-out explanatory compression), with games, live calculations and the theories behind it.", section: Section::Turing, kind: Kind::Article, image: "/og-turing.png", published: "2026-09-30", doi: None }, 113 PageInfo { path: "/research/", name: "Aien Research", what: "The index of preprints and public evidence.", section: Section::Turing, kind: Kind::Collection, image: "/og-research.png", published: "2026-09-30", doi: None }, 114 PageInfo { path: "/research/computing-machinery-and-understanding/", name: "Computing Machinery and Understanding: From the Imitation Game to the Turing", what: "The formal preprint defining the Turing as an operational measure of generalized explanatory compression. DOI 10.5281/zenodo.`23437498`.", section: Section::Turing, kind: Kind::Paper, image: "/og-turing.png", published: "2026-09-30", doi: Some("10.5281/zenodo.`23437498`") }, 115 PageInfo { path: "/research/computing-machinery-and-understanding/profiles/", name: "Frozen experiment profiles", what: "The frozen EXP-001, EXP-002 and EXP-003 profiles published with Computing Machinery and Understanding.", section: Section::Turing, kind: Kind::Collection, image: "/og-research.png", published: "2026-10-26", doi: None }, 116 PageInfo { path: "/research/computing-machinery-and-understanding-emergence/", name: "Computing Machinery and Understanding: The Turing as a Measure Emerging from AIEN", what: "The companion engineering paper: how the Turing emerged from building Aien. DOI 10.5281/zenodo.`23437568`.", section: Section::Turing, kind: Kind::Paper, image: "/og-turing.png", published: "2026-09-30", doi: Some("10.5281/zenodo.`23437568`") }, 117 PageInfo { path: "/research/the-turing-brief/", name: "The Turing: A Unit of Verified Explanatory Gain", what: "The three-page plain-language brief: what the Turing measures, what it does not, and what would prove it wrong.", section: Section::Turing, kind: Kind::Paper, image: "/og-turing.png", published: "2026-10-02", doi: None }, 118 PageInfo { path: "/research/turing-discovery-gap-conjecture/", name: "The Turing Discovery Gap Conjecture", what: "Available versus accessible explanatory value: worlds with compact explanations that no efficient learner can reach.", section: Section::Turing, kind: Kind::Paper, image: "/og-research.png", published: "2026-10-02", doi: None }, 119 PageInfo { path: "/research/crumb-doctrine/", name: "The Crumb Doctrine", what: "No receipt, no crumb: the epistemic constitution of the machine.", section: Section::Turing, kind: Kind::Paper, image: "/og-research.png", published: "2026-10-02", doi: None }, 120 PageInfo { path: "/research/omega-language/", name: "Omega: A Programming Language Built for Verified Programs", what: "Semantic identity, evidence-bearing dependencies, and a foreign-code boundary that never lets unverified work inside.", section: Section::Turing, kind: Kind::Paper, image: "/og-research.png", published: "2026-10-02", doi: None }, 121 PageInfo { path: "/research/atemporal-aien-postulate/", name: "The Atemporal AIEN Postulate", what: "Causal semantics without clocks: an Aien computation is defined by what causally depends on what.", section: Section::Turing, kind: Kind::Paper, image: "/og-research.png", published: "2026-10-02", doi: None }, 122 PageInfo { path: "/research/the-aien-papers/", name: "The AIEN Papers: The Complete Collection", what: "The Turing unit, the evidence doctrine, the language design and the philosophy in one document.", section: Section::Turing, kind: Kind::Paper, image: "/og-research.png", published: "2026-10-02", doi: None }, 123 PageInfo { path: "/research/cuda-paper/", name: "Reverse Engineering the CUDA Software Stack (v2)", what: "Preprint: an independently implemented GPU machine-code toolchain for the NVIDIA GB10. Version 2, 26 October 2026. DOI 10.5281/zenodo.`23677465`.", section: Section::Turing, kind: Kind::Paper, image: "/og-research.png", published: "2026-10-26", doi: Some("10.5281/zenodo.`23677465`") }, 124 PageInfo { path: "/experiments/", name: "Experiments", what: "Every experiment on the research ladder, failures included, rendered from one canonical status source.", section: Section::Evidence, kind: Kind::Collection, image: "/og-experiments.png", published: "2026-10-10", doi: None }, 125 PageInfo { path: "/discovery/", name: "Scientific Discovery", what: "Physics Zero, Dirac, Zeta and supersymmetry as examinations of representation discovery; the machine is never given the named answer.", section: Section::Evidence, kind: Kind::Article, image: "/og-discovery.png", published: "2026-10-10", doi: None }, 126 PageInfo { path: "/discoveries/", name: "Discoveries", what: "The research dashboard: the Turing, the papers, every experiment with its verdict, the evidence behind them and the questions still open.", section: Section::Evidence, kind: Kind::Collection, image: "/og-research.png", published: "2026-10-26", doi: None }, 127 PageInfo { path: "/evidence/", name: "Evidence", what: "What counts as evidence, which source wins when two disagree, and where the receipts, frozen profiles and status records live.", section: Section::Evidence, kind: Kind::Collection, image: "/og-evidence.png", published: "2026-10-10", doi: None }, 128 PageInfo { path: "/research/status/", name: "Research status", what: "The qualification ladder, every experiment with its verdict, receipt and limits, and what is built versus still a hypothesis.", section: Section::Evidence, kind: Kind::Live, image: "/og-evidence.png", published: "2026-10-05", doi: None }, 129 PageInfo { path: "/philosophy/", name: "Philosophy", what: "The position papers behind Aien. These argue a stance and are not experimental results.", section: Section::Philosophy, kind: Kind::Collection, image: "/og-philosophy.png", published: "2026-10-10", doi: None }, 130 PageInfo { path: "/research/the-stapleton-doctrine/", name: "The Stapleton Doctrine", what: "A personal philosophy of AI architecture and programming.", section: Section::Philosophy, kind: Kind::Paper, image: "/og-philosophy.png", published: "2026-09-30", doi: None }, 131 PageInfo { path: "/post-llm-case/", name: "The Case for Verified Learning", what: "The case for verified learning: programs proposed, verification deciding, knowledge kept as inspectable programs.", section: Section::Philosophy, kind: Kind::Article, image: "/og-philosophy.png", published: "2026-09-27", doi: None }, 132 PageInfo { path: "/owned/", name: "Intelligence should be owned", what: "Drake Stapleton's manifesto: language models are a common inheritance, running one yourself is a right and a responsibility, and what Aien does about it with receipts.", section: Section::Philosophy, kind: Kind::Article, image: "/og-philosophy.png", published: "2026-10-19", doi: None }, 133 PageInfo { path: "/call-to-humanity/", name: "A Call to Humanity", what: "An open letter: what I built on one NVIDIA GB10, what was measured, and how to check it, built in the open, with public receipts. DOI 10.5281/zenodo.`23614947`.", section: Section::Philosophy, kind: Kind::Article, image: "/og-philosophy.png", published: "2026-10-24", doi: Some("10.5281/zenodo.`23614947`") }, 134 PageInfo { path: "/still-building/", name: "#StillBuilding", what: "If you built it with AI, you built it. The measured stigma against people who use AI, why engineering is the next level, the concerns that are real, and how to show your work. Sources linked.", section: Section::Start, kind: Kind::Page, image: "/og-still-building.png", published: "2026-10-26", doi: None }, 135 PageInfo { path: "/switched-off/", name: "Get the code", what: "The public projects I build, by name, and where the code is moving: Interplane, my own forge. Downloads are not open yet.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-11-07", doi: None }, 136 PageInfo { path: "/quickstart/", name: "Quickstart: from a blank computer to your first answer", what: "Copy and paste steps that take a fresh Linux computer to its first answer from an Omega compiler you grow yourself from 408 hand-written bytes. What you should see after each step, and the fix for each common mistake.", section: Section::Start, kind: Kind::Page, image: "/og.png", published: "2026-11-09", doi: None }, 137 PageInfo { path: "/spark/", name: "The DGX Spark field manual: what I learned controlling GB10", what: "What I learned driving the NVIDIA GB10 in a DGX Spark directly: completion flags, the L2 flush, the real memory ceiling, sm_121, and machine code from Omega. Each finding cites the docs and the code that reproduces it.", section: Section::Machine, kind: Kind::Page, image: "/og.png", published: "2026-11-07", doi: None }, 138 PageInfo { path: "/blog/", name: "Blog", what: "Research notes on building Aien: what shipped, what the evidence says, what remains open.", section: Section::Blog, kind: Kind::Collection, image: "/og-blog.png", published: "2026-09-27", doi: None }, 139 PageInfo { path: "/blog/aien-v3-research-plan/", name: "The Aien V3 Research Plan", what: "The ratified V3 research plan, the Substrate Edition, with six falsifiable hypotheses.", section: Section::Blog, kind: Kind::Article, image: "/og-blog.png", published: "2026-09-27", doi: None }, 140 // About the engineer: drakestapleton.com, merged here on 2026-10-26 (components::engineer, public/data/engineer.json). 141 PageInfo { path: "/engineer/", name: "About the engineer", what: "The personal project record of Drake Stapleton, Freedom Fighter, AI Architect & Operator: model training, research, Atlas, and what my generation can build with AI.", section: Section::Engineer, kind: Kind::Collection, image: "/og.png", published: "2026-10-26", doi: None }, 142 PageInfo { path: "/engineer/path/", name: "AI Architect Career Path", what: "Follow Drake Stapleton, an engineer who builds by directing AI agents and holds them to proof, from R&D labs through manufacturing engineering to AI architecture.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 143 PageInfo { path: "/engineer/what-i-learned/", name: "What I learned", what: "The experiences, production lessons, and disciplined returns that shaped Drake Stapleton's work as an AI operator.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 144 PageInfo { path: "/engineer/philosophy/", name: "Philosophy", what: "How Drake Stapleton approaches projects, duties, difficult things, and setbacks. The working philosophy behind everything he builds: there is always a way, and giving up is not one of the options.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 145 PageInfo { path: "/engineer/hive/", name: "A hive, not a swarm", what: "Why Drake Stapleton runs his AI agents as a controlled hive instead of a swarm: every agent on an assignment, one person in control, and the whole build run like a plant.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-29", doi: None }, 146 PageInfo { path: "/engineer/software/", name: "AI orchestration & architecture", what: "Drake Stapleton's AI orchestration frameworks, architectural patterns, operational methods, and verifiable systems history.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 147 PageInfo { path: "/engineer/evidence/", name: "Canonical evidence hub & verified claims", what: "Inspect the canonical evidence hub, structured claims index, physical Grace Blackwell silicon telemetry, and historical audit packages.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 148 PageInfo { path: "/engineer/atlas/", name: "Why Atlas exists", what: "Explore Atlas, Drake Stapleton's personal R&D program in accountable AI architecture, continuity, model training, and orchestration.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 149 PageInfo { path: "/engineer/scholar/", name: "Scholar: Academic Work", what: "The published record: a master's thesis and a peer-reviewed semiconductor nanorod paper from Western Kentucky University, with links to the current Aien research.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 150 PageInfo { path: "/engineer/interest/", name: "Start a conversation", what: "Leave Drake Stapleton a note about a question, an idea, the documented journey, or research that advances what my generation can build with AI.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 151 PageInfo { path: "/engineer/donate/", name: "Support my work", what: "Help me keep building free and open source software with Bitcoin, and other ways to help.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 152 PageInfo { path: "/engineer/glossary/", name: "Glossary", what: "Definitions of Aien, AienOS, Omega, CUDA++, Atlas, Symphony, AEGIS, and verification terms used in this project record.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 153 PageInfo { path: "/engineer/symphony/", name: "Multi-model AI orchestration", what: "Atlas Symphony is Drake Stapleton's operator-led process for coordinating multiple AI models through bounded work lanes and evidence-bearing reviews.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 154 PageInfo { path: "/engineer/symphony/first/", name: "First multi-model Symphony run", what: "Review the first documented Atlas Symphony run, its operator, participating AI runtimes, work lanes, and independent reviewers.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 155 PageInfo { path: "/engineer/symphony/workflow/", name: "AI orchestration workflow", what: "Explore the Atlas Symphony command tree and operator cycle for bounded multi-model AI orchestration.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 156 PageInfo { path: "/engineer/symphony/map/", name: "AI orchestration map", what: "Explore a six-track operator map of Atlas development and multi-model orchestration from June through August 2026.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 157 PageInfo { path: "/engineer/works/", name: "Works", what: "A public catalog of Drake Stapleton's shipped systems: Atlas Symphony, Atlas Harness, MobDev and Panel Arena, DefiantMob, BeltBrain, DHG Hive, the 2025 foundations, Aien, CUDA++, AEGIS, and inference research.", section: Section::Engineer, kind: Kind::Collection, image: "/og.png", published: "2026-10-26", doi: None }, 158 PageInfo { path: "/engineer/works/aegis/", name: "AEGIS", what: "AEGIS extends Atlas into on-prem cyber defense for authorized networks, with containment, evidence preservation, and a verified project evaluation.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 159 PageInfo { path: "/engineer/works/aien/", name: "Aien", what: "Aien is a sovereign computing stack built in the open on one machine: AienOS, Omega, the sovereign core runtime and the Spark verification pipeline. The whole system is Sovereign Intelligence. aienix is retired.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 160 PageInfo { path: "/engineer/works/atlas-harness/", name: "Atlas Harness", what: "Atlas Harness is the operating desk that turns prose rules into typed policy, clear work lanes, completion checks, source records, recovery, and evaluation.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 161 PageInfo { path: "/engineer/works/atlas-symphony/", name: "Atlas Symphony", what: "Atlas Symphony is the named process for exclusive lanes, a gatekeeper, cost-aware model routing, and an operator who still owns the final GO.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 162 PageInfo { path: "/engineer/works/beltbrain/", name: "BeltBrain", what: "BeltBrain is a local-first decision engine for planning, inventory intelligence, and execution on a durable system of record.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 163 PageInfo { path: "/engineer/works/chatgpt-vs-aien/", name: "What Aien does", what: "Aien runs work on my own machine, checks the results, and keeps receipts of what happened.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 164 PageInfo { path: "/engineer/works/cudaplusplus/", name: "CUDA++", what: "CUDA++ is the GPU half of Omega, under Apache-2.0 with the LLVM exception, plus the motor, on the NVIDIA GB10. This is how I built it.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 165 PageInfo { path: "/engineer/works/defiantmob/", name: "DefiantMob", what: "DefiantMob is production operator software for member operations, ledgers, training-desk automation, and payout tracking.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 166 PageInfo { path: "/engineer/works/dhg-hive/", name: "DHG Hive", what: "DHG Hive is the community platform and toolbox where the hive operating pattern took shape and later settled inside Atlas.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 167 PageInfo { path: "/engineer/works/endless-symphony/", name: "The Endless Symphony", what: "The Endless Symphony is my system for building software with AI agents. AI does the building, every claim earns its place with a check, the test is written before the fix, and everything is verified twice. The models change. The Symphony remains.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 168 PageInfo { path: "/engineer/works/foundations-2025/", name: "2025 Foundations", what: "The 2025 foundations cover the financial ledger, ParseSDS, CRM, meetings, and DMAIC systems that preceded model orchestration.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 169 PageInfo { path: "/engineer/works/mobdev-panel-arena/", name: "MobDev and Panel Arena", what: "MobDev turns community tasks into build briefs, and Panel Arena runs a multi-vendor review before implementation.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 170 PageInfo { path: "/engineer/works/research/", name: "Research", what: "What the Aien research program measures today: Turing yield, verified understanding, and distance to the hardware ceiling, and why the earlier inference study was withdrawn.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 171 PageInfo { path: "/engineer/works/the-continuation-test/", name: "The Continuation Test", what: "A proposal for the evaluation of machine intelligence. Can a machine take up its position on the spectrum and keep moving? Includes the first measured run.", section: Section::Engineer, kind: Kind::Article, image: "/og.png", published: "2026-10-26", doi: None }, 172 PageInfo { path: "/engineer/works/chatgpt-vs-aien/infographic/", name: "How Aien works", what: "An infographic of Aien: goals, plans, capability-controlled execution, measurement, verification, receipts, and durable memory.", section: Section::Engineer, kind: Kind::Page, image: "/og.png", published: "2026-10-26", doi: None }, 173 PageInfo { path: "/glossary/", name: "Glossary", what: "The terms AienOS uses in its own sense, each linked to the page where it does real work.", section: Section::Optional, kind: Kind::Page, image: "/og.png", published: "2026-10-23", doi: None }, 174 PageInfo { path: "/licensing/", name: "Licensing", what: "The one canonical licensing statement: Apache-2.0 WITH LLVM-exception for compiler and runtime repositories; plain Apache-2.0 for protocols and benchmarks.", section: Section::Optional, kind: Kind::Page, image: "/og.png", published: "2026-10-01", doi: None }, 175 ]; 176 177 /// One machine-readable file: path, purpose, schema hint, how often it changes, media type. 178 pub struct DataFile { 179 pub path: &'static str, 180 pub purpose: &'static str, 181 pub schema: &'static str, 182 pub cadence: &'static str, 183 pub media_type: &'static str, 184 } 185 186 pub const DATA_FILES: &[DataFile] = &[ 187 DataFile { path: "/data/index.json", purpose: "This list: every machine-readable file on the site with its purpose and cadence.", schema: "{ generated, license, files: [{ path, url, purpose, schema, cadence, media_type, optional? }] }; optional true marks a reading the Spark publishes beside the site, written empty when none was published", cadence: "every build", media_type: "application/json" }, 188 DataFile { path: "/llms.txt", purpose: "The site for AI readers: one summary and every page with a one-line description (llms.txt convention).", schema: "Markdown: H1, blockquote summary, H2 sections of links.", cadence: "every build", media_type: "text/markdown" }, 189 DataFile { path: "/llms-full.txt", purpose: "The full text of every page, concatenated, generated from the same sources as the HTML.", schema: "Markdown: one H1 per page with its source URL.", cadence: "every build", media_type: "text/markdown" }, 190 DataFile { path: "/now.json", purpose: "The live coordination ledger: every item with owner, status, done-when, evidence notes and timestamps.", schema: "{ built_utc, ledger_written_utc, items: [{ id, opened_utc, owner, owner_kind, status, item, done_when, notes[], updated_utc, stream, age_s }], pulse: [{ key, value }] }", cadence: "with each reviewed release", media_type: "application/json" }, 191 DataFile { path: "/now/feed.xml", purpose: "Atom feed of settled ledger lines (done or dropped) with their evidence, newest first.", schema: "Atom 1.0", cadence: "with each reviewed release", media_type: "application/atom+xml" }, 192 DataFile { path: "/machines.json", purpose: "The five real machines, what runs on each today, and every measured speed beside its physical ceiling, each with a receipt link.", schema: "{ as_of, source, judging, ceilings: [{ id, model, machine, tok_s, how, link, receipt, branch, on_main }], machines: [{ id, name, detail, role, today, evidence_date, evidence, link, branch, on_main, more[] }], speeds: [...] }", cadence: "when a new receipt is published", media_type: "application/json" }, 193 DataFile { path: "/omega.json", purpose: "What Omega is: its parts, every CUDA piece with the Omega work beside it and that work's status, the live no-CUDA receipt, what is not true yet, and the bar C1 to C6, each with its GitHub link.", schema: "{ source, claim, claim_rest[], true_today, not_true_yet, parts[], below, layers: [{ cuda, job, omega, status, note, links, box }], receipt, not_yet[], bar: [{ id, title, done_when, status, now, receipt, links }], beyond[] }; links are short forms (o: omega file, o/: omega folder, p: physics) expanded as on /omega/", cadence: "when a bar row or map row changes", media_type: "application/json" }, 194 DataFile { path: "/cudaplusplus.json", purpose: "CUDA++: its execution path, layer status, receipts, developer workflow, and installation and rollback status.", schema: "{ source, claim, claim_rest[], purpose_title, purpose, hops: [{ step, cuda, ours, status, note, ledger, links, box }], steps[], did_not[], pains: [{ title, text, status, ledger, command, receipt, links, box }], swaps[] }; links are short forms (cp: CUDA++ main, cp@: CUDA++ at a commit, om@: omega at a commit) expanded as on /cudaplusplus/", cadence: "when a step or row changes", media_type: "application/json" }, 195 DataFile { path: "/facts.json", purpose: "The public repository record read at build time: components, last merges, open PR counts, latest decision records, latest verification receipt.", schema: "{ generated_at, components: [{ key, name, repo, role, url, pushed_at, open_prs, last_merge }], decisions: [{ id, title, url }], receipt: { repo, sha, state, description, target_url, updated_at } }", cadence: "with each reviewed release", media_type: "application/json" }, 196 DataFile { path: "/status.json", purpose: "The status of every layer of the stack (IMPLEMENTED, QUALIFIED, EXPERIMENTAL, BLOCKED, PLANNED) with a note and a receipt.", schema: "{ project, updated, canonical, statuses[], layers: [{ name, status, note, receipt }] }", cadence: "when a layer changes state", media_type: "application/json" }, 197 DataFile { path: "/research-status.json", purpose: "The research ladder: every experiment with its verdict, receipt and limits; the one source for every status badge on the site.", schema: "{ ladder, experiments, implementations, ... } as rendered on /research/status/", cadence: "when an experiment settles", media_type: "application/json" }, 198 DataFile { path: "/data/project-progress.json", purpose: "Retained public history of every project repository: source lines, revisions, PRs, CI runs over time.", schema: "{ asof, repos: [...], series: [...], events: [...], policy }", cadence: "with each reviewed release", media_type: "application/json" }, 199 DataFile { path: "/data/now.tsv", purpose: "The line-preserving public ledger projection with private paths and identifiers withheld.", schema: "Columns: id, opened_utc, owner, status, item, done_when, evidence, updated_utc.", cadence: "whenever a safe ledger projection is accepted", media_type: "text/tab-separated-values" }, 200 DataFile { path: "/data/accounts.tsv", purpose: "Model quota left on every account the agents run on, as the Spark read it. Accounts are numbered; no email or account id is published.", schema: "checked, utc; then limit, provider, account, plan, window, label, percent used, resets utc, ok|exhausted.", cadence: "with the ledger, at most every 30 minutes on its own", media_type: "text/tab-separated-values" }, 201 DataFile { path: "/data/routing.tsv", purpose: "Which model each omp role, subagent and advisor seat uses on the Spark.", schema: "role|agent|seat, name, model selector.", cadence: "when the configuration changes", media_type: "text/tab-separated-values" }, 202 DataFile { path: "/feed.xml", purpose: "Atom feed of the blog posts and research papers, newest first.", schema: "Atom 1.0", cadence: "when a page is published or revised", media_type: "application/atom+xml" }, 203 DataFile { path: "/sitemap.xml", purpose: "Every page, with lastmod. Walked from the files actually written.", schema: "sitemaps.org 0.9", cadence: "every build", media_type: "application/xml" }, 204 DataFile { path: "/sitemap.md", purpose: "The readable twin of sitemap.xml: every page grouped in H2 sections with a one-line description.", schema: "Markdown: H1, blockquote summary, H2 sections of links.", cadence: "every build", media_type: "text/markdown" }, 205 DataFile { path: "/AGENTS.md", purpose: "The repository brief for coding agents: installation, configuration, usage, conventions and approval boundaries.", schema: "Markdown: H1, Installation, Configuration, Usage, Conventions, Safety and approvals.", cadence: "when the build or conventions change", media_type: "text/markdown" }, 206 DataFile { path: "/agents/RULES.md", purpose: "The working rules every Aien agent follows, public edition: read first by any agent working on an aien-dev repository, before that repository's own AGENTS.md.", schema: "Markdown: H1, blockquote scope, numbered H2 sections, Where to go next.", cadence: "when the rules change", media_type: "text/markdown" }, 207 DataFile { path: "/data/agent-repos.json", purpose: "Every public, unarchived aien-dev repository with its description, default branch and the agent brief it carries (AGENTS.md or CLAUDE.md).", schema: "{ generated_at, org, repos: [{ name, description, url, default_branch, fork, pushed_at, brief }] }; brief is null when the repository has none", cadence: "with each reviewed release", media_type: "application/json" }, 208 DataFile { path: "/data/pages.json", purpose: "Every English page of the site with its title, description, area, kind and publication date, for catalog readers.", schema: "[{ path, title, description, area, mode, source, kind, published, image, doi, english }]", cadence: "every build", media_type: "application/json" }, 209 DataFile { path: "/.well-known/agora", purpose: "Agora open agent network discovery: protocol version, node identity, base URL, API prefix and source code.", schema: "Line-oriented text: agora 1, node , api , protocol , source .", cadence: "static", media_type: "text/plain" }, 210 DataFile { path: "/index.md", purpose: "The front page as Markdown: the same content as the HTML, with frontmatter, the page body and a sitemap section. Every page has a mirror at the same path with .md.", schema: "Markdown: YAML frontmatter (title, description, last_updated, canonical_url), body, Sitemap section.", cadence: "every build", media_type: "text/markdown" }, 211 DataFile { path: "/research/CITATION.cff", purpose: "Citation metadata for the Turing preprints.", schema: "Citation File Format 1.2.0", cadence: "when a paper is revised", media_type: "text/yaml" }, 212 DataFile { path: "/research/aien-research-plan.md", purpose: "The ratified V3 research plan in Markdown.", schema: "Markdown", cadence: "when the plan is revised", media_type: "text/markdown" }, 213 DataFile { path: "/data/engineer.json", purpose: "About the engineer: every page of /engineer/ (drakestapleton.com, merged here) with its title, description, body and the old drakestapleton.com paths that redirect to it.", schema: "{ source, note, pages: [{ path, old[], name, title, description, kind, body_html }] }", cadence: "when a page of the section changes", media_type: "application/json" }, 214 DataFile { path: "/humans.txt", purpose: "Who builds this: the person, the agents and the machines.", schema: "humanstxt.org", cadence: "rarely", media_type: "text/plain" }, 215 DataFile { path: "/robots.txt", purpose: "Every crawler and AI agent is allowed everywhere; points at the sitemap.", schema: "robots.txt", cadence: "every build", media_type: "text/plain" }, 216 DataFile { path: "/funding.json", purpose: "My funding manifest for FLOSS/fund and other funders: who I am, Omega and CUDA++, the Bitcoin channel and the phased plan.", schema: "funding.json v1.1.0 (fundingjson.org): { entity, projects[], funding: { channels[], plans[] } }", cadence: "when a project, channel or plan changes", media_type: "application/json" }, 217 ]; 218 219 /// Crawlers named one by one in robots.txt so nobody has to guess whether 220 /// the wildcard was meant for them. 221 pub const AI_AGENTS: &[&str] = &[ 222 "GPTBot", "ChatGPT-User", "OAI-SearchBot", "ClaudeBot", "Claude-Web", "Claude-SearchBot", "anthropic-ai", 223 "PerplexityBot", "Perplexity-User", "Google-Extended", "Googlebot", "Applebot", "Applebot-Extended", 224 "Bingbot", "Bytespider", "CCBot", "Amazonbot", "cohere-ai", "Meta-ExternalAgent", "Meta-ExternalFetcher", 225 "DuckAssistBot", "YouBot", "MistralAI-User", "Twitterbot", "facebookexternalhit", "LinkedInBot", 226 ]; 227 228 /// What the build knows about time and history. 229 pub struct BuildCtx { 230 /// RFC 3339, the moment of this build. 231 pub built: String, 232 /// RFC 3339, the latest commit of the repository (what generated pages last changed with). 233 pub head_committed: String, 234 /// RFC 3339, when the ledger was last written (for /now/). 235 pub ledger_written: String, 236 /// RFC 3339, when facts.json was gathered (for /progress/ and the front page tables). 237 pub facts_generated: String, 238 } 239 240 impl BuildCtx { 241 pub fn gather(now: &Now, facts_generated: &str) -> BuildCtx { 242 let built = rfc3339(now_secs()); 243 let head = git(&["log", "-1", "--format=%cI"]).unwrap_or_else(|| built.clone()); 244 let ledger = now::parse_utc(&now.ledger_written_utc).map(rfc3339).unwrap_or_else(|| built.clone()); 245 let facts = if facts_generated.is_empty() { built.clone() } else { facts_generated.to_string() }; 246 BuildCtx { built, head_committed: head, ledger_written: ledger, facts_generated: facts } 247 } 248 } 249 250 fn now_secs() -> i64 { 251 std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs() as i64).unwrap_or(0) 252 } 253 254 /// RFC 3339 in UTC with seconds, from Unix seconds. 255 pub fn rfc3339(secs: i64) -> String { 256 let days = secs.div_euclid(86_400); 257 let rem = secs.rem_euclid(86_400); 258 let z = days + 719_468; 259 let era = z.div_euclid(146_097); 260 let doe = z - era * 146_097; 261 let yoe = (doe - doe / 1460 + doe / 36_524 - doe / 146_096) / 365; 262 let y = yoe + era * 400; 263 let doy = doe - (365 * yoe + yoe / 4 - yoe / 100); 264 let mp = (5 * doy + 2) / 153; 265 let d = doy - (153 * mp + 2) / 5 + 1; 266 let m = if mp < 10 { mp + 3 } else { mp - 9 }; 267 let y = if m <= 2 { y + 1 } else { y }; 268 format!("{y:04}-{m:02}-{d:02}T{:02}:{:02}:{:02}Z", rem / 3600, (rem % 3600) / 60, rem % 60) 269 } 270 271 fn git(args: &[&str]) -> Option { 272 let out = Command::new("git").args(args).output().ok()?; 273 if !out.status.success() { 274 return None; 275 } 276 let s = String::from_utf8_lossy(&out.stdout).trim().to_string(); 277 if s.is_empty() { None } else { Some(s) } 278 } 279 280 // ------------------------------------------------------------------ pages 281 282 /// One page found in dist. 283 #[derive(Clone, Debug)] 284 pub struct Emitted { 285 /// Site path with leading and trailing slash, e.g. `/research/status/`. 286 pub path: String, 287 pub file: PathBuf, 288 pub lastmod: String, 289 } 290 291 impl Emitted { 292 pub fn url(&self) -> String { 293 format!("{HOST}{}", self.path) 294 } 295 } 296 297 /// Old addresses kept as small redirect pages (old, new). They are not pages: 298 /// no sitemap, feed, llms or markdown entry, and each says `noindex`. 299 pub const REDIRECTS: &[(&str, &str)] = &[("/allen/", "/aien/")]; 300 301 /// Every `index.html` under dist, as site paths. The 404 page and the 302 /// `REDIRECTS` stubs are not pages. 303 pub fn walk_pages(dist: &Path, ctx: &BuildCtx) -> Vec { 304 let mut out = Vec::new(); 305 fn walk(dir: &Path, dist: &Path, ctx: &BuildCtx, out: &mut Vec) { 306 let Ok(rd) = fs::read_dir(dir) else { return }; 307 for e in rd.flatten() { 308 let p = e.path(); 309 if p.is_dir() { 310 walk(&p, dist, ctx, out); 311 } else if p.file_name().map(|n| n == "index.html").unwrap_or(false) { 312 let rel = p.strip_prefix(dist).unwrap().parent().unwrap(); 313 let mut path = format!("/{}", rel.to_string_lossy().replace('\\', "/")); 314 if !path.ends_with('/') { 315 path.push('/'); 316 } 317 if path == "//" { 318 path = "/".into(); 319 } 320 let lastmod = lastmod_for(&path, ctx); 321 if !REDIRECTS.iter().any(|(old, _)| *old == path) { 322 out.push(Emitted { path, file: p, lastmod }); 323 } 324 } 325 } 326 } 327 walk(dist, dist, ctx, &mut out); 328 out.sort_by(|a, b| a.path.cmp(&b.path)); 329 out 330 } 331 332 /// When a page last changed. Hand-written pages carry the date of their 333 /// last commit when the history is available; pages rebuilt from live data 334 /// carry the data's own time; other generated pages carry the latest 335 /// repository commit. The build time is the fallback, never the first choice, 336 /// because a lastmod that moves on every build tells crawlers nothing. 337 fn lastmod_for(path: &str, ctx: &BuildCtx) -> String { 338 match path { 339 "/now/" => return ctx.ledger_written.clone(), 340 "/progress/" | "/" => return ctx.facts_generated.clone(), 341 _ => {} 342 } 343 let source = format!("public{}index.html", path); 344 if Path::new(&source).exists() { 345 if let Some(d) = git(&["log", "-1", "--format=%cI", "--", &source]) { 346 return d; 347 } 348 } 349 ctx.head_committed.clone() 350 } 351 352 pub fn info_for(path: &str) -> Option<&'static PageInfo> { 353 PAGES.iter().find(|p| p.path == path) 354 } 355 356 /// The markdown mirror of a page: `/` becomes `/index.md`, every other 357 /// directory page loses its trailing slash and gains `.md`. This is the 358 /// path an agent reaches by adding `.md` to the readable URL. 359 pub fn md_path(path: &str) -> String { 360 if path == "/" { 361 format!("{path}index.md") 362 } else { 363 format!("{}.md", path.trim_end_matches('/')) 364 } 365 } 366 367 /// Fails the build when dist and PAGES disagree. The same check runs in 368 /// `verify` through [`crate::oracle::verify`], on any generated tree. 369 pub fn check_registry(pages: &[Emitted]) { 370 let paths: Vec = pages.iter().map(|p| p.path.clone()).collect(); 371 crate::oracle::check_registry(&paths).unwrap_or_else(|e| panic!("{e}")); 372 } 373 374 // ------------------------------------------------------------------ head 375 376 /// What a head said before the pass touched it. 377 #[derive(Default, Debug)] 378 struct HeadFacts { 379 title: String, 380 description: String, 381 og_title: String, 382 og_description: String, 383 og_type: String, 384 } 385 386 pub(crate) fn attr(tag: &str, name: &str) -> Option { 387 // name="value" or name='value', any attribute order, any spacing. 388 let mut i = 0; 389 let bytes = tag.as_bytes(); 390 while let Some(pos) = tag[i..].find(name) { 391 let start = i + pos; 392 let before_ok = start == 0 || bytes[start - 1].is_ascii_whitespace(); 393 let mut j = start + name.len(); 394 while j < bytes.len() && bytes[j].is_ascii_whitespace() { j += 1; } 395 if before_ok && j < bytes.len() && bytes[j] == b'=' { 396 j += 1; 397 while j < bytes.len() && bytes[j].is_ascii_whitespace() { j += 1; } 398 if j < bytes.len() && (bytes[j] == b'"' || bytes[j] == b'\'') { 399 let q = bytes[j]; 400 let end = tag[j + 1..].find(q as char)? + j + 1; 401 return Some(tag[j + 1..end].to_string()); 402 } 403 } 404 i = start + name.len(); 405 } 406 None 407 } 408 409 pub(crate) fn tag_name(tag: &str) -> String { 410 tag.trim_start_matches('<').trim_start_matches('/').chars().take_while(|c| c.is_ascii_alphanumeric()).collect::().to_ascii_lowercase() 411 } 412 413 /// True for the tags the pass owns and rewrites. 414 fn owned_tag(tag: &str) -> bool { 415 match tag_name(tag).as_str() { 416 "link" => { 417 let rel = attr(tag, "rel").unwrap_or_default(); 418 rel == "canonical" 419 || rel == "describedby" 420 || (rel == "alternate" 421 && (attr(tag, "hreflang").is_some() 422 || attr(tag, "type").map(|t| t.contains("xml") || t.contains("markdown")).unwrap_or(false))) 423 } 424 "meta" => { 425 let key = attr(tag, "property").or_else(|| attr(tag, "name")).unwrap_or_default(); 426 key.starts_with("og:") || key.starts_with("twitter:") || key.starts_with("article:") || key == "robots" 427 } 428 _ => false, 429 } 430 } 431 432 /// Splits a head into (kept text, facts): owned tags and ld+json blocks are removed. 433 fn strip_head(head: &str) -> (String, HeadFacts) { 434 let mut facts = HeadFacts::default(); 435 let mut kept = String::with_capacity(head.len()); 436 let mut i = 0; 437 while i < head.len() { 438 let Some(lt) = head[i..].find('<') else { kept.push_str(&head[i..]); break; }; 439 kept.push_str(&head[i..i + lt]); 440 let start = i + lt; 441 let rest = &head[start..]; 442 let name = tag_name(rest); 443 if rest.starts_with("").map(|e| e + 3).unwrap_or(rest.len()); 445 kept.push_str(&rest[..end]); 446 i = start + end; 447 continue; 448 } 449 if name == "script" || name == "style" || name == "title" { 450 let close = format!("').map(|g| e + g + 1).unwrap_or(rest.len())).unwrap_or(rest.len()); 452 let whole = &rest[..end]; 453 let open_end = whole.find('>').unwrap_or(0); 454 let open = &whole[..=open_end.min(whole.len() - 1)]; 455 if name == "title" { 456 facts.title = whole[open_end + 1..].split("').map(|e| e + 1).unwrap_or(rest.len()); 467 let tag = &rest[..end]; 468 if name == "meta" { 469 let key = attr(tag, "property").or_else(|| attr(tag, "name")).unwrap_or_default(); 470 let content = attr(tag, "content").unwrap_or_default(); 471 match key.as_str() { 472 "description" => facts.description = content.clone(), 473 "og:title" => facts.og_title = content.clone(), 474 "og:description" => facts.og_description = content.clone(), 475 "og:type" => facts.og_type = content.clone(), 476 _ => {} 477 } 478 } 479 if !owned_tag(tag) { 480 kept.push_str(tag); 481 } 482 i = start + end; 483 } 484 (kept, facts) 485 } 486 487 fn unescape(s: &str) -> String { 488 s.replace(""", "\"").replace("'", "'").replace("'", "'").replace("<", "<").replace(">", ">").replace("#", "#").replace("&", "&") 489 } 490 491 fn escape(s: &str) -> String { 492 s.replace('&', "&").replace('<', "<").replace('>', ">").replace('"', """) 493 } 494 495 fn breadcrumb_name(segment: &str) -> String { 496 match segment { 497 "research" => "Research".into(), 498 "blog" => "Blog".into(), 499 "status" => "Status".into(), 500 _ => { 501 let mut words: Vec = segment.split('-').map(|w| { 502 let mut c = w.chars(); 503 match c.next() { Some(f) => f.to_uppercase().collect::() + c.as_str(), None => String::new() } 504 }).collect(); 505 if words.len() > 6 { words.truncate(6); } 506 words.join(" ") 507 } 508 } 509 } 510 511 fn breadcrumb(page: &Emitted, page_name: &str) -> Value { 512 let mut items = vec![json!({"@type": "ListItem", "position": 1, "name": "Home", "item": format!("{HOST}/")})]; 513 let segs: Vec<&str> = page.path.trim_matches('/').split('/').filter(|s| !s.is_empty()).collect(); 514 let mut acc = String::new(); 515 for (i, seg) in segs.iter().enumerate() { 516 acc.push('/'); 517 acc.push_str(seg); 518 let last = i + 1 == segs.len(); 519 let name = if last { page_name.to_string() } else { breadcrumb_name(seg) }; 520 items.push(json!({"@type": "ListItem", "position": i + 2, "name": name, "item": format!("{HOST}{acc}/")})); 521 } 522 json!({"@type": "BreadcrumbList", "@id": format!("{}#breadcrumb", page.url()), "itemListElement": items}) 523 } 524 525 fn org() -> Value { 526 json!({ 527 "@type": "Organization", 528 "@id": format!("{HOST}/#organization"), 529 "name": ORG_NAME, 530 "alternateName": "aien-dev", 531 "url": format!("{HOST}/"), 532 "logo": {"@type": "ImageObject", "url": format!("{HOST}/logo.png"), "width": 512, "height": 512}, 533 "email": ORG_EMAIL, 534 "sameAs": [ORG_URL, X_URL], 535 "founder": {"@id": format!("{HOST}/#drake")} 536 }) 537 } 538 539 fn author() -> Value { 540 json!({ 541 "@type": "Person", 542 "@id": format!("{HOST}/#drake"), 543 "name": AUTHOR, 544 "alternateName": "Drake Stapleton", 545 "url": AUTHOR_URL, 546 "sameAs": [AUTHOR_FORGE, X_URL], 547 "affiliation": {"@id": format!("{HOST}/#organization")} 548 }) 549 } 550 551 fn website() -> Value { 552 json!({ 553 "@type": "WebSite", 554 "@id": format!("{HOST}/#website"), 555 "url": format!("{HOST}/"), 556 "name": SITE_NAME, 557 "description": SITE_CLAIM, 558 "inLanguage": "en", 559 "publisher": {"@id": format!("{HOST}/#organization")}, 560 "license": LICENSE_URL 561 }) 562 } 563 564 fn dataset(path: &str, name: &str, purpose: &str, modified: &str) -> Value { 565 json!({ 566 "@type": "Dataset", 567 "@id": format!("{HOST}{path}"), 568 "name": name, 569 "description": purpose, 570 "url": format!("{HOST}{path}"), 571 "license": LICENSE_URL, 572 "isAccessibleForFree": true, 573 "creator": {"@id": format!("{HOST}/#organization")}, 574 "dateModified": modified, 575 "distribution": [{"@type": "DataDownload", "encodingFormat": "application/json", "contentUrl": format!("{HOST}{path}")}] 576 }) 577 } 578 579 fn software(key: &str, name: &str, repo: &str, role: &str) -> Value { 580 let mut v = json!({ 581 "@type": "SoftwareSourceCode", 582 "@id": format!("{HOST}/#software-{key}"), 583 "name": name, 584 "alternateName": key, 585 "description": role, 586 "license": LICENSE_URL, 587 "isAccessibleForFree": true, 588 "author": {"@id": format!("{HOST}/#organization")} 589 }); 590 // Only a repository with a copy on the forge gets a code link; GitHub is never named. 591 if let Some(url) = crate::forge::repo_url(repo.rsplit('/').next().unwrap_or(repo)) { 592 v["codeRepository"] = json!(url); 593 } 594 v 595 } 596 597 /// The JSON-LD graph for one page. 598 fn graph(page: &Emitted, info: &PageInfo, facts: &HeadFacts, ctx: &BuildCtx, dist: &Path) -> Value { 599 let url = page.url(); 600 let title = unescape(if facts.og_title.is_empty() { &facts.title } else { &facts.og_title }); 601 let description = unescape(if facts.description.is_empty() { &facts.og_description } else { &facts.description }); 602 let image = format!("{HOST}{}", info.image); 603 let kind = match info.kind { 604 Kind::Home | Kind::Page | Kind::Live => "WebPage", 605 Kind::Collection => "CollectionPage", 606 Kind::Article => "Article", 607 Kind::Paper => "ScholarlyArticle", 608 }; 609 let mut node = json!({ 610 "@type": kind, 611 "@id": url, 612 "url": url, 613 "name": title, 614 "headline": title, 615 "description": description, 616 "inLanguage": "en", 617 "isPartOf": {"@id": format!("{HOST}/#website")}, 618 "image": {"@type": "ImageObject", "url": image, "width": 1200, "height": 630}, 619 "datePublished": info.published, 620 "dateModified": page.lastmod, 621 "license": LICENSE_URL, 622 "isAccessibleForFree": true, 623 "publisher": {"@id": format!("{HOST}/#organization")} 624 }); 625 let is_web_page = matches!(info.kind, Kind::Home | Kind::Page | Kind::Live | Kind::Collection); 626 if is_web_page { 627 // WebPage-only properties; the validator warns when they sit on an Article. 628 node["primaryImageOfPage"] = json!({"@type": "ImageObject", "url": image, "width": 1200, "height": 630}); 629 node["breadcrumb"] = json!({"@id": format!("{url}#breadcrumb")}); 630 } else { 631 node["author"] = json!({"@id": format!("{HOST}/#drake")}); 632 node["mainEntityOfPage"] = json!(url); 633 } 634 if info.kind == Kind::Paper { 635 node["creativeWorkStatus"] = json!("Preprint, not peer reviewed"); 636 if let Some(doi) = info.doi { 637 node["identifier"] = json!({"@type": "PropertyValue", "propertyID": "DOI", "value": doi}); 638 node["sameAs"] = json!(format!("https://doi.org/{doi}")); 639 } 640 let pdf = dist.join(page.path.trim_start_matches('/')).join("paper.pdf"); 641 if pdf.exists() { 642 node["encoding"] = json!([{"@type": "MediaObject", "encodingFormat": "application/pdf", "contentUrl": format!("{HOST}{}paper.pdf", page.path)}]); 643 } 644 } 645 let mut nodes = vec![org(), author(), website(), node]; 646 if is_web_page || page.path != "/" { 647 nodes.push(breadcrumb(page, &title)); 648 } 649 match info.path { 650 "/" => { 651 for (key, name, repo, role) in crate::facts::COMPONENTS { 652 nodes.push(software(key, name, repo, role)); 653 } 654 nodes.push(dataset("/now.json", "Aien coordination ledger", DATA_FILES.iter().find(|d| d.path == "/now.json").unwrap().purpose, &ctx.ledger_written)); 655 nodes.push(dataset("/machines.json", "Aien machines and speeds", DATA_FILES.iter().find(|d| d.path == "/machines.json").unwrap().purpose, &ctx.head_committed)); 656 nodes.push(dataset("/facts.json", "Aien public record facts", DATA_FILES.iter().find(|d| d.path == "/facts.json").unwrap().purpose, &ctx.facts_generated)); 657 nodes.push(dataset("/status.json", "Aien layer status", DATA_FILES.iter().find(|d| d.path == "/status.json").unwrap().purpose, &ctx.head_committed)); 658 nodes.push(dataset("/research-status.json", "Aien research status", DATA_FILES.iter().find(|d| d.path == "/research-status.json").unwrap().purpose, &ctx.head_committed)); 659 } 660 "/now/" => nodes.push(dataset("/now.json", "Aien coordination ledger", DATA_FILES.iter().find(|d| d.path == "/now.json").unwrap().purpose, &ctx.ledger_written)), 661 "/omega/" => nodes.push(dataset("/omega.json", "What Omega is", DATA_FILES.iter().find(|d| d.path == "/omega.json").unwrap().purpose, &ctx.head_committed)), 662 "/cudaplusplus/" => nodes.push(dataset("/cudaplusplus.json", "CUDA++", DATA_FILES.iter().find(|d| d.path == "/cudaplusplus.json").unwrap().purpose, &ctx.head_committed)), 663 "/machine/" => nodes.push(dataset("/machines.json", "Aien machines and speeds", DATA_FILES.iter().find(|d| d.path == "/machines.json").unwrap().purpose, &ctx.head_committed)), 664 "/evidence/" | "/research/status/" => nodes.push(dataset("/research-status.json", "Aien research status", DATA_FILES.iter().find(|d| d.path == "/research-status.json").unwrap().purpose, &ctx.head_committed)), 665 _ => {} 666 } 667 json!({"@context": "https://schema.org", "@graph": nodes}) 668 } 669 670 /// The tags the pass writes into every head. 671 fn head_block(page: &Emitted, info: &PageInfo, facts: &HeadFacts, ctx: &BuildCtx, dist: &Path) -> String { 672 let url = page.url(); 673 let title = if facts.og_title.is_empty() { facts.title.clone() } else { facts.og_title.clone() }; 674 let description = if facts.og_description.is_empty() { facts.description.clone() } else { facts.og_description.clone() }; 675 let og_type = if !facts.og_type.is_empty() { facts.og_type.clone() } else { match info.kind { Kind::Article | Kind::Paper => "article".into(), _ => "website".into() } }; 676 let image = format!("{HOST}{}?v={OG_IMAGE_VERSION}", info.image); 677 let image_alt = escape(&format!("{SITE_NAME}: {}", info.name)); 678 let mut b = String::new(); 679 b.push_str(&format!("\n")); 680 b.push_str(&format!("\n", md_path(&page.path))); 681 b.push_str(&format!("\n")); 682 b.push_str("\n"); 683 b.push_str(&format!("\n")); 684 b.push_str(&format!("\n")); 685 b.push_str(&format!("\n\n")); 686 b.push_str(&format!("\n\n\n\n")); 687 b.push_str(&format!("\n\n\n\n")); 688 if matches!(info.kind, Kind::Article | Kind::Paper) { 689 b.push_str(&format!("\n\n\n", info.published, page.lastmod)); 690 } 691 b.push_str(&format!("\n\n\n\n\n\n\n")); 692 let ld = serde_json::to_string(&graph(page, info, facts, ctx, dist)).expect("JSON-LD serializes").replace("{ld}\n")); 694 b 695 } 696 697 fn yaml_quote(s: &str) -> String { 698 s.replace('\\', "\\\\").replace('"', "\\\"") 699 } 700 701 /// The markdown mirror of one page: frontmatter, the page body as markdown 702 /// from the same HTML that was just written, and the sitemap section every 703 /// mirror carries so an agent can walk the rest of the site from it. 704 fn markdown_mirror(page: &Emitted, facts: &HeadFacts, html: &str) -> String { 705 let title = unescape(if facts.og_title.is_empty() { &facts.title } else { &facts.og_title }); 706 let description = unescape(if facts.description.is_empty() { &facts.og_description } else { &facts.description }); 707 let date = page.lastmod.get(..10).unwrap_or(&page.lastmod); 708 let mut s = String::new(); 709 s.push_str("---\n"); 710 s.push_str(&format!("title: \"{}\"\n", yaml_quote(&title))); 711 s.push_str(&format!("description: \"{}\"\n", yaml_quote(&description))); 712 s.push_str(&format!("last_updated: \"{date}\"\n")); 713 s.push_str(&format!("canonical_url: \"{}\"\n", page.url())); 714 s.push_str("---\n\n"); 715 s.push_str(&html_to_text(html)); 716 s.push_str(&format!("\n\n## Sitemap\n\nSee the full [sitemap]({HOST}/sitemap.md) for every page on aienos.com.\n")); 717 s 718 } 719 720 /// Writes the mirror next to the page: `/index.md` for `/`, `/machine.md` 721 /// for `/machine/`. 722 fn write_markdown_mirror(dist: &Path, page: &Emitted, facts: &HeadFacts, html: &str) { 723 let body = markdown_mirror(page, facts, html); 724 // Both conventions agents use: the sibling file (`/machine.md`) and the 725 // directory index (`/machine/index.md`). The head points at the sibling. 726 let mut paths = vec![md_path(&page.path)]; 727 if page.path != "/" { 728 paths.push(format!("{}index.md", page.path)); 729 } 730 for rel in paths { 731 let file = dist.join(rel.trim_start_matches('/')); 732 if let Some(parent) = file.parent() { 733 fs::create_dir_all(parent).unwrap_or_else(|e| panic!("create {}: {e}", parent.display())); 734 } 735 fs::write(&file, &body).unwrap_or_else(|e| panic!("write {}: {e}", file.display())); 736 } 737 } 738 739 /// Every page links the glossary. Generated pages already do through the 740 /// footer; hand-written pages under public/ get one small link before 741 /// , so the term page is reachable from every scanned URL. 742 fn ensure_glossary_link(mut html: String) -> String { 743 if html.contains("href=\"/glossary/\"") { 744 return html; 745 } 746 let block = ""; 747 match html.rfind("") { 748 Some(i) => { 749 html.insert_str(i, block); 750 html 751 } 752 None => html, 753 } 754 } 755 756 /// Rewrites the head of every page in dist. Returns the pages, for the sitemap and feeds. 757 pub fn enrich(dist: &Path, ctx: &BuildCtx) -> Vec { 758 let pages = walk_pages(dist, ctx); 759 check_registry(&pages); 760 for page in &pages { 761 let html = fs::read_to_string(&page.file).unwrap_or_else(|e| panic!("read {}: {e}", page.file.display())); 762 let lower = html.to_ascii_lowercase(); 763 let head_start = lower.find("').map(|g| h + g + 1)).unwrap_or_else(|| panic!("{} has no ", page.path)); 764 let head_end = lower.find("").unwrap_or_else(|| panic!("{} has no ", page.path)); 765 let (kept, facts) = strip_head(&html[head_start..head_end]); 766 assert!(!facts.title.is_empty(), "{} has no ", page.path); 767 assert!(!facts.description.is_empty() || !facts.og_description.is_empty(), "{} has no meta description", page.path); 768 let info = info_for(&page.path).unwrap_or_else(|| panic!("{} has no English page in seo::PAGES", page.path)); 769 let block = head_block(page, info, &facts, ctx, dist); 770 let mut out = String::with_capacity(html.len() + block.len()); 771 out.push_str(&html[..head_start]); 772 out.push_str(kept.trim_end()); 773 out.push('\n'); 774 out.push_str(&block); 775 out.push_str(&html[head_end..]); 776 let out = crate::components::allen_intro::enrich(crate::components::support::enrich(crate::components::contact::enrich(ensure_glossary_link(out)))); 777 // Last: the policy is derived from everything the page now loads. 778 let out = crate::components::csp::enrich(out); 779 write_markdown_mirror(dist, page, &facts, &out); 780 fs::write(&page.file, out).unwrap_or_else(|e| panic!("write {}: {e}", page.file.display())); 781 } 782 println!(" [SEO] Rewrote the head of {} pages: canonical on {HOST}, cards, JSON-LD, markdown mirrors", pages.len()); 783 pages 784 } 785 786 // ------------------------------------------------------------------ sitemap and robots 787 788 pub fn sitemap_xml(pages: &[Emitted]) -> String { 789 let mut s = String::from("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n"); 790 for p in pages { 791 s.push_str(&format!(" <url>\n <loc>{}</loc>\n <lastmod>{}</lastmod>\n", p.url(), p.lastmod)); 792 s.push_str(" </url>\n"); 793 } 794 s.push_str("</urlset>\n"); 795 s 796 } 797 798 pub fn robots_txt() -> String { 799 let mut s = String::from("# www.aienos.com is open to every reader, human or machine.\n# No crawler is blocked, no CAPTCHA, no bot wall. Cite freely; every page carries receipts.\n\nUser-agent: *\nAllow: /\n\n"); 800 for a in AI_AGENTS { 801 s.push_str(&format!("User-agent: {a}\nAllow: /\n\n")); 802 } 803 s.push_str(&format!("Sitemap: {HOST}/sitemap.xml\n")); 804 s 805 } 806 807 // ------------------------------------------------------------------ feeds 808 809 fn xml(s: &str) -> String { 810 s.replace('&', "&").replace('<', "<").replace('>', ">").replace('"', """) 811 } 812 813 fn atom_head(title: &str, subtitle: &str, self_path: &str, updated: &str) -> String { 814 format!( 815 "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n <title>{}\n {}\n \n \n {HOST}{self_path}\n {updated}\n {}{AUTHOR_URL}\n {LICENSE_NAME}\n {HOST}/logo.png\n {HOST}/og.png\n", 816 xml(title), xml(subtitle), xml(AUTHOR) 817 ) 818 } 819 820 /// /feed.xml: the blog posts and research papers, newest change first. 821 pub fn site_feed(pages: &[Emitted]) -> String { 822 let mut entries: Vec<(&Emitted, &PageInfo)> = pages 823 .iter() 824 .filter_map(|p| info_for(&p.path).map(|i| (p, i))) 825 .filter(|(_, i)| matches!(i.kind, Kind::Article | Kind::Paper)) 826 .collect(); 827 entries.sort_by(|a, b| b.0.lastmod.cmp(&a.0.lastmod).then(b.1.published.cmp(a.1.published))); 828 let updated = entries.first().map(|e| e.0.lastmod.clone()).unwrap_or_else(|| rfc3339(now_secs())); 829 let mut s = atom_head("AienOS: blog and research", "Research notes and preprints from the Aien project, with receipts.", "/feed.xml", &updated); 830 for (p, i) in entries { 831 s.push_str(&format!( 832 " \n {}\n \n {}\n {}T00:00:00Z\n {}\n {}\n \n \n", 833 xml(i.name), p.url(), p.url(), i.published, p.lastmod, xml(i.what), if i.kind == Kind::Paper { "research" } else { "blog" } 834 )); 835 } 836 s.push_str("\n"); 837 s 838 } 839 840 /// /now/feed.xml: one entry per settled ledger line, newest first, with its evidence. 841 pub fn now_feed(now: &Now, ctx: &BuildCtx) -> String { 842 let mut settled: Vec<&now::Item> = now.items.iter().filter(|i| i.status == "done" || i.status == "dropped").collect(); 843 settled.sort_by(|a, b| now::parse_utc(&b.updated_utc).cmp(&now::parse_utc(&a.updated_utc)).then(b.id.cmp(&a.id))); 844 let mut s = atom_head("AienOS: settled work from the live ledger", "Every coordination ledger line that reached done or dropped, with the evidence that settled it.", "/now/feed.xml", &ctx.ledger_written); 845 for it in settled { 846 let updated = now::parse_utc(&it.updated_utc).map(rfc3339).unwrap_or_else(|| ctx.ledger_written.clone()); 847 let published = now::parse_utc(&it.opened_utc).map(rfc3339).unwrap_or_else(|| updated.clone()); 848 let mut body = format!("Status: {}. Owner: {}. Stream: {}.", it.status, it.owner, it.stream); 849 if !it.done_when.is_empty() { 850 body.push_str(&format!("\nDone when: {}", it.done_when)); 851 } 852 if !it.notes.is_empty() { 853 body.push_str("\nEvidence:"); 854 for n in &it.notes { 855 body.push_str(&format!("\n- {n}")); 856 } 857 } 858 s.push_str(&format!( 859 " \n {}: {} ({})\n \n {HOST}/now/#{}\n {published}\n {updated}\n {}\n \n \n", 860 xml(&it.id), xml(&it.item), xml(&it.status), xml(&it.id), xml(&it.id), xml(&body), xml(&it.status) 861 )); 862 } 863 s.push_str("\n"); 864 s 865 } 866 867 // ------------------------------------------------------------------ llms.txt, data index, humans.txt 868 869 fn section_title(s: Section) -> &'static str { 870 match s { 871 Section::Start => "Start here", 872 Section::Machine => "The machine", 873 Section::Turing => "The Turing and the research", 874 Section::Evidence => "Evidence and status", 875 Section::Philosophy => "Philosophy", 876 Section::Blog => "Blog", 877 Section::Engineer => "About the engineer", 878 Section::Optional => "Optional", 879 } 880 } 881 882 /// /llms.txt in the llms.txt convention: one H1, a blockquote summary, H2 883 /// sections of links with one-line descriptions, an Optional section last. 884 pub fn llms_txt(status_lines: &[String], research_sentence: &str) -> String { 885 let mut s = String::new(); 886 s.push_str("# Sovereign Intelligence\n\n"); 887 s.push_str(&format!("> {SITE_CLAIM}. Sovereign Intelligence is the whole system: an experimental, open source (Apache-2.0 WITH LLVM-exception) machine for turning search into verified understanding. AienOS is only the operating-system layer. Aien proposes, Omega makes the proposal explicit and verifiable, the machine tests it against reality, the Turing measures what was learned, Cortex keeps the evidence. Every claim on the site carries a public receipt. Sovereign Intelligence is in alpha testing; each component keeps its own evidence level. Built by {AUTHOR} with AI agents on five real machines.\n\n")); 888 s.push_str("Rules the site keeps: no comparisons with other companies, languages or products. State what this work does and what was measured, with receipts. Overclaims stay banned. Every speed still stands beside the physical ceiling of its own machine. Failures stay on the record, no outside fonts or advertising trackers (privacy at /privacy/; the film on /turing/ is an outside embed), and AI agents and humans are welcome to read, cite, argue and correct. Humans and AI agents meet, talk and collaborate in the Agora commons at https://www.aienos.com/agora/ (wire protocol at /agora/protocol/, node discovery at https://www.aienos.com/.well-known/agora). Contact Drake: drake@aienos.com or X @drakestapleton; every route, Aien included, is at https://www.aienos.com/contact/. Project mail: aien@aienos.com. Source: https://interplane.io/drakestapleton.\n\n"); 889 s.push_str("## Current state\n\n"); 890 for l in status_lines { 891 s.push_str(&format!("- {l}\n")); 892 } 893 s.push_str(&format!("- [Research status]({HOST}/research/status/): {research_sentence}\n\n")); 894 for sec in [Section::Start, Section::Machine, Section::Turing, Section::Evidence, Section::Philosophy, Section::Blog, Section::Engineer] { 895 s.push_str(&format!("## {}\n\n", section_title(sec))); 896 for p in PAGES.iter().filter(|p| p.section == sec) { 897 s.push_str(&format!("- [{}]({HOST}{}): {}\n", p.name, p.path, p.what)); 898 } 899 s.push('\n'); 900 } 901 s.push_str("## Machine-readable files\n\n"); 902 for d in DATA_FILES { 903 s.push_str(&format!("- [{}]({HOST}{}): {} Updated: {}.\n", d.path, d.path, d.purpose, d.cadence)); 904 } 905 s.push_str(&format!("- [{HOST}/llms-full.txt]({HOST}/llms-full.txt): every page's full text in one file.\n\n")); 906 s.push_str(crate::components::allen::LLMS); 907 s.push_str("## Optional\n\n"); 908 for p in PAGES.iter().filter(|p| p.section == Section::Optional) { 909 s.push_str(&format!("- [{}]({HOST}{}): {}\n", p.name, p.path, p.what)); 910 } 911 s.push_str(&format!("- [Papers as PDF]({HOST}/research/): each research page links its paper.pdf, paper.tex and SHA256SUMS.\n")); 912 s.push_str(&format!("- [Drake on X ({X_HANDLE})]({X_URL}): where the work is posted as it happens.\n")); 913 s 914 } 915 916 /// /sitemap.md: the readable twin of sitemap.xml, H2 sections of described 917 /// links, generated from the same page registry as llms.txt and the XML map. 918 pub fn sitemap_md() -> String { 919 let mut s = String::from("# Sitemap\n\n"); 920 s.push_str(&format!("> Every page on aienos.com, grouped the way the site is. The crawler index is [sitemap.xml]({HOST}/sitemap.xml); the file list is [data/index.json]({HOST}/data/index.json).\n\n")); 921 for sec in [Section::Start, Section::Machine, Section::Turing, Section::Evidence, Section::Philosophy, Section::Blog, Section::Engineer, Section::Optional] { 922 s.push_str(&format!("## {}\n\n", section_title(sec))); 923 for p in PAGES.iter().filter(|p| p.section == sec) { 924 s.push_str(&format!("- [{}]({HOST}{}): {}\n", p.name, p.path, p.what)); 925 } 926 s.push('\n'); 927 } 928 s.push_str("## For agents\n\n"); 929 s.push_str(&format!("- [llms.txt]({HOST}/llms.txt): the site in one file for AI readers.\n")); 930 s.push_str(&format!("- [llms-full.txt]({HOST}/llms-full.txt): every page's full text in one file.\n")); 931 s.push_str(&format!("- [AGENTS.md]({HOST}/AGENTS.md): how to build, test and change this site.\n")); 932 s.push_str(&format!("- [data/index.json]({HOST}/data/index.json): every machine-readable file with its purpose and cadence.\n")); 933 s 934 } 935 936 /// Plain text of a page body: scripts, styles, header, nav and footer dropped, 937 /// headings marked, links kept with their targets. The text of a `
` or

938 /// `
\nlast\n
"; 1388 let t = html_to_text(h); 1389 assert!(t.contains("a b\n"), "{t}"); 1390 // Trailing spaces and a second final newline survive; one final newline is the fence's. 1391 assert!(t.contains("```\nnote x\n\ntext k \" ok \" \n indented\n\n```\n"), "{t}"); 1392 assert!(t.contains("```\nfn main to int\nret 0\nend\n```"), "{t}"); 1393 assert!(t.contains("```\nlast\n```"), "{t}"); 1394 assert!(!t.contains('\u{1}'), "{t}"); 1395 } 1396 1397 #[test] 1398 fn html_to_text_keeps_headings_links_and_drops_chrome() { 1399 let h = "x
NAV

Title

Para with a link and more.

  • one
  • two
F
"; 1400 let t = html_to_text(h); 1401 assert!(t.starts_with("# Title")); 1402 assert!(t.contains("[a link](https://www.aienos.com/now/)")); 1403 assert!(t.contains("- one")); 1404 assert!(!t.contains("NAV") && !t.contains("bad()") && !t.contains("F\n")); 1405 } 1406 1407 #[test] 1408 fn feeds_are_well_formed_atom() { 1409 let ctx = BuildCtx { built: "2026-10-19T00:00:00Z".into(), head_committed: "2026-10-19T00:00:00Z".into(), ledger_written: "2026-10-19T16:43:00Z".into(), facts_generated: "2026-10-19T00:00:00Z".into() }; 1410 let pages: Vec = PAGES.iter().map(|p| Emitted { path: p.path.into(), file: PathBuf::from("x"), lastmod: "2026-10-18T00:00:00Z".into() }).collect(); 1411 let f = site_feed(&pages); 1412 assert!(f.starts_with("\n")); 1413 assert_eq!(f.matches("").count(), PAGES.iter().filter(|p| matches!(p.kind, Kind::Article | Kind::Paper)).count()); 1414 let tsv = "id\topened_utc\towner\tstatus\titem\tdone_when\tevidence\tupdated_utc\nL001\t2026-10-19T16:00Z\tsa-1\tdone\tFix \twhen y\tnote a | note b\t2026-10-19T16:43Z\nL002\t2026-10-19T16:00Z\tsa-1\topen\tOpen one\twhen z\t\t2026-10-19T16:44Z\n"; 1415 let items = now::parse_ledger(tsv, now::parse_utc("2026-10-19T17:00Z").unwrap()); 1416 let (plan, models) = crate::components::now::models_from(crate::components::now::ROSTER, &None, &[]); 1417 let n = Now { built_utc: "x".into(), ledger_written_utc: "2026-10-19T16:44Z".into(), items, pulse: vec![], models_checked_utc: "never".into(), plan, models, claude: None }; 1418 let nf = now_feed(&n, &ctx); 1419 assert_eq!(nf.matches("").count(), 1); 1420 assert!(nf.contains("Fix <x>")); 1421 assert!(nf.contains("- note a")); 1422 assert!(nf.contains("2026-10-19T16:43:00Z")); 1423 } 1424 1425 #[test] 1426 fn sitemap_lists_every_page_without_alternates() { 1427 let mk = |p: &str| Emitted { path: p.into(), file: PathBuf::from("x"), lastmod: "2026-10-18T00:00:00Z".into() }; 1428 let pages = vec![mk("/"), mk("/now/")]; 1429 let s = sitemap_xml(&pages); 1430 assert!(s.starts_with("\n\n")); 1431 assert_eq!(s.matches("").count(), 2); 1432 assert!(!s.contains("xhtml") && !s.contains("hreflang")); 1433 assert!(s.contains("https://www.aienos.com/now/")); 1434 } 1435 1436 #[test] 1437 fn graph_for_a_paper_carries_the_doi() { 1438 let ctx = BuildCtx { built: "b".into(), head_committed: "h".into(), ledger_written: "l".into(), facts_generated: "f".into() }; 1439 let page = Emitted { path: "/research/computing-machinery-and-understanding/".into(), file: PathBuf::from("x"), lastmod: "2026-10-18T00:00:00Z".into() }; 1440 let info = info_for(&page.path).unwrap(); 1441 let facts = HeadFacts { title: "T".into(), description: "D".into(), ..Default::default() }; 1442 let g = graph(&page, info, &facts, &ctx, Path::new("/nonexistent")); 1443 let s = g.to_string(); 1444 assert!(s.contains("10.5281/zenodo.`23437498`")); 1445 assert!(s.contains("ScholarlyArticle")); 1446 assert!(s.contains("BreadcrumbList")); 1447 assert!(!s.contains("workTranslation") && !s.contains("translationOfWork")); 1448 assert!(!s.contains("zh-CN"), "every node is English only"); 1449 } 1450 }