Repository navigation
web+docs: a complete, verified, AI-readable documentation platform - #14
Merged
MotherOfProgrammers merged 3 commits intoOct 21, 2026
Conversation
The docs were half-backed and the site was missing the things a reader
comes for. This brings both up to the engine's actual state.
New pages (5, all verified against the real toolchain)
- strings the bounded str[N] model: layout, the three methods,
what strings cannot do
- match the enum dispatch statement: arm forms, exhaustiveness,
binding rules, every refused shape
- exceptions try/except/else/finally over the closed set of seven
engine traps, and the trap boundary
- networking a real TCP loopback from raw syscalls, checked against
a C oracle
- python-divergences
the eleven places Lithon deliberately differs from CPython
New site sections (2)
- /changelog every shipped change, grouped and linked to its docs
- /next the open items, item by item, with what was recently
closed
Docs index, rebuilt
- an explicit "reading path": the pages marked essential, in order,
each with the outcome you get from it
- every page carries a priority, so a reference lookup is never
mistaken for reading material
- six new block kinds: callout, tabs, comparison, deflist, layout, quote
Facts corrected against the implementation
- float[32] does not exist (it was in the start page and the roadmap)
- a syscall argument may be a pointer, and it is a real host address
in both tiers; the shipped TCP loopback depends on it
- len() is the live length, not the capacity
- `**`, `//`, `<=`, `>=` are refused, not "limited"
- 55 IR opcodes, all emitted -- not "26 of 27, Phi missing"
- the benchmark and suite numbers now match benchmarks/results/latest.json
- the trap text is "error: division by zero", not a LITHON-E code
- the stale NotImplementedError prefixes in the documented diagnostics
Encoding
- 314 runs of Windows-1252 mojibake repaired across the site (some
double-encoded); scripts/fix-encoding.ts is now a permanent guard
AI-friendly
- llms.txt and llms-full.txt, generated from the same registry the
site renders
- JSON-LD on every route, not just the docs pages
- body-text search, so an error code or an operator is findable
- <lastmod> in the sitemap
Also
- the "a small Lithon program" example now opens on its Execution tab
- the browser IR model no longer silently treats an unknown opcode as a
no-op, and float registers and slots are scoped per frame
- the playground falls back to the recorded IR in production instead of
failing
- the CI status footer caches for five minutes and only tracks master
- CI now runs verify-docs, the IR freshness check, typecheck and lint
- the toolchain scripts work on every platform, not just Windows
135 examples across 34 pages, every one compiled by the real frontend
and pinned to the repo's regression outputs.
The fix-encoding script documented the mojibake it repairs with literal examples, so the guard flagged itself. The examples are now described by code point instead of by character.
CI caught a real bug in the freshness check: the frontend emits its IR with the platform's line ending, so the same program produced CRLF on Windows and LF on Linux. The generator copied whatever it was given, so the committed file was a Windows artefact and the check could never pass on Linux. The generators now normalise the frontend's output to LF, and .gitattributes pins the generated files (and the llms.txt surfaces) to LF, so a checkout cannot rewrite them either. With this the check is what it claims to be: the committed bytes are exactly what the frontend produces today, on every platform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
The documentation was half-backed and the website was missing the things a reader actually comes for. This PR brings both up to the engine's actual state, and adds the missing pages, the changelog, and the AI-facing surfaces.
New documentation pages (5) — each written from the implementation, not from the old prose:
/docs/stringsstr[N]model: layout, the three methods (find,count,split), printing, pointers, and what strings cannot do/docs/match/docs/exceptionstry/except/else/finallyover the closed set of seven engine traps, nesting, and the trap boundary/docs/networking/docs/python-divergencesNew site sections (2)
/changelog— every shipped change, grouped by area, each entry linking to the documentation that covers it and to the commit./next— the open items, item by item: the language gaps, the engine work, the toolchain debt, and the recently shipped list.Docs index, rebuilt
callout,tabs,comparison,deflist,layout,quote— so the same concept can be shown several ways side by side.Facts corrected against the implementation
float[32]does not exist. It was advertised in the start page and the roadmap language page; it is now correctly documented as rejected (LITHON-E0105).syscallargument may be a pointer, and it is a real host address in both tiers. The docs claimed pointers were rejected at compile time; the shipped TCP loopback depends on the opposite.len(xs)is the live length carried in a companion slot, not the capacity.**,//,<=and>=are refused outright, not "limited" or "not yet implemented".Phiunemitted". The direct-Phi path ships.benchmarks/results/latest.json(168.0×, 33/33 CTest, 46/46 typed, 18,379 encoder cases).error: division by zero, not aLITHON-Ecode.NotImplementedError:prefixes in the documented diagnostics are now the realLITHON-Ennnn:messages.Encoding
314 runs of Windows-1252 mojibake repaired across the site, some of them double-encoded — including a stray
,that rendered as, · not startedon the roadmap.scripts/fix-encoding.tsis now a permanent guard, and it runs to zero.AI-friendly
llms.txtandllms-full.txt(144 KB of plain text), generated from the same registry the site renders.E0301) or an operator (wrap_add) is findable — the palette previously suggested queries the engine could not answer.<lastmod>in the sitemap.Also
vite dev.master— the unauthenticated GitHub API allows 60 requests/hour/IP, and the footer was on every page.verify-docs, the IR freshness check, typecheck and lint.uvpath was hard-coded to a Windows winget install.Compiler Component Impacted
tier_runner)No compiler, engine, or IR change. This PR is the website and the documentation only; the engine is untouched.
Verification
Every example on the site is compiled by the real Lithon frontend and pinned to the repo's regression outputs.
bun run verify:docsruns the realtools/typecheck.pyandsrc/frontend/frontend.pyover every example and fails on drift — and CI now runs it, so a doc that drifts from the engine fails the build rather than misleading a reader.Also green:
typecheck,lint,build(47 routes prerendered), and the encoding guard.Benchmark Verification
./benchmark_fib).No benchmark numbers changed; the site now quotes
benchmarks/results/latest.jsonaccurately instead of a stale copy.