Epic: human documentation rewrite (by humans, for humans) #582

Open
opened 2026-10-29 11:54:59 +00:00 by orion · 11 comments
Collaborator

Request (Torben, 2026-10-29 12:54, WA "Orion - TorbScript")

Ich finde die gesamte TorbScript Doku einfach extrem unübersichtlich und extrem anstrengend zu lesen. Ich bin ein erfahrener Programmierer und verstehe gar nichts, alles ist total bloated, alte Scheiße wird überall referenziert, die gesamte Struktur ist absoluter Müll, die meisten Code-Beispiele werden einfach nur hingeschrieben aber gar keine Ergebnisse angezeigt oder beschrieben, es gibt überall dauernd sinnlose Auflistungen von irgendwas [...] Das betrifft jeden Bereich, egal ob Beginner, Intermediate, Advanced, Reference, Std, Cheat sheet.
Die wichtigen Features der Sprache gehen auch komplett unter.
Du schreibst die Doku wie ein LLM für ein LLM, ich will aber sie wie von Menschen für Menschen geschrieben haben. LLMs nutzen ja eh die AgentSkills.
Die Doku muss nicht aus dem docs/ ordner fest generiert werden, das kann ein eigener Bereich sein oder sogar ein eigenes Repo.

Goal

Human documentation for TorbScript, written by humans for humans: clear structure, short pages, every example shows its output, the defining features of the language front and center, no history/legacy references, no filler lists. LLM-facing material stays in skills/.

Plan

  1. Audit + concept (information architecture, voice rules, page template, where it lives, checks that keep it that way).
  2. Vertical slice as proof: landing page, feature showcase, tour, a few guide/reference/std pages.
  3. Full rewrite in slices (one PR per section), old human docs removed when replaced.
  4. Guard rails in CI: examples compile and run, shown output is asserted, banned-pattern lint (history references, design-doc links from user pages, enumeration walls).

Slices are added below as they are cut.

Slices

  • #585 concept, vertical slice, site from book/, book gates (PR)
  • #587 book: Guide chapters (first project, modelling data, collections, files and formats, testing, native programs, design choices)
  • #588 book: Guide, coming from another language
  • #589 book: Reference, part 1 (syntax, built-in types, strings, functions, types, control flow)
  • #590 book: Reference, part 2 (errors, traits, generics, collections, modules, concurrency, encoding)
  • #591 book: Std pages, core and text
  • #592 book: Std pages, data formats
  • #593 book: Std pages, system and I/O
  • #594 book: Std pages, network and security
  • #595 book: Std pages, concurrency and the specialised modules
  • #596 book: Tools section
  • #597 book: site pages (install, playground, agents, benchmarks)
  • #598 book: rewrite the course (start/)
  • #599 book: retire the human pages of docs/
## Request (Torben, 2026-10-29 12:54, WA "Orion - TorbScript") > Ich finde die gesamte TorbScript Doku einfach extrem unübersichtlich und extrem anstrengend zu lesen. Ich bin ein erfahrener Programmierer und verstehe gar nichts, alles ist total bloated, alte Scheiße wird überall referenziert, die gesamte Struktur ist absoluter Müll, die meisten Code-Beispiele werden einfach nur hingeschrieben aber gar keine Ergebnisse angezeigt oder beschrieben, es gibt überall dauernd sinnlose Auflistungen von irgendwas [...] Das betrifft jeden Bereich, egal ob Beginner, Intermediate, Advanced, Reference, Std, Cheat sheet. > Die wichtigen Features der Sprache gehen auch komplett unter. > Du schreibst die Doku wie ein LLM für ein LLM, ich will aber sie wie von Menschen für Menschen geschrieben haben. LLMs nutzen ja eh die AgentSkills. > Die Doku muss nicht aus dem docs/ ordner fest generiert werden, das kann ein eigener Bereich sein oder sogar ein eigenes Repo. ## Goal Human documentation for TorbScript, written by humans for humans: clear structure, short pages, every example shows its output, the defining features of the language front and center, no history/legacy references, no filler lists. LLM-facing material stays in `skills/`. ## Plan 1. Audit + concept (information architecture, voice rules, page template, where it lives, checks that keep it that way). 2. Vertical slice as proof: landing page, feature showcase, tour, a few guide/reference/std pages. 3. Full rewrite in slices (one PR per section), old human docs removed when replaced. 4. Guard rails in CI: examples compile and run, shown output is asserted, banned-pattern lint (history references, design-doc links from user pages, enumeration walls). Slices are added below as they are cut. ## Slices - [ ] #585 concept, vertical slice, site from `book/`, book gates (PR) - [ ] #587 book: Guide chapters (first project, modelling data, collections, files and formats, testing, native programs, design choices) - [ ] #588 book: Guide, coming from another language - [ ] #589 book: Reference, part 1 (syntax, built-in types, strings, functions, types, control flow) - [ ] #590 book: Reference, part 2 (errors, traits, generics, collections, modules, concurrency, encoding) - [ ] #591 book: Std pages, core and text - [ ] #592 book: Std pages, data formats - [ ] #593 book: Std pages, system and I/O - [ ] #594 book: Std pages, network and security - [ ] #595 book: Std pages, concurrency and the specialised modules - [ ] #596 book: Tools section - [ ] #597 book: site pages (install, playground, agents, benchmarks) - [ ] #598 book: rewrite the course (start/) - [ ] #599 book: retire the human pages of docs/
Author
Collaborator

Research done. I read the front pages, tours and library references of Rust, Go, Kotlin, Swift, Gleam, Elixir, Zig, the TypeScript handbook and the Python tutorial. The notes per site, with links, are in book/RESEARCH.md on the docs/582-book branch.

What the good ones have in common, and what the book takes over:

  1. Output under every example, checked by the test suite. Go, Rust, Zig and Swift all do this. Our standard-library pages have 471 code blocks and 7 of them run.
  2. A landing page where every claim has code. Gleam is the model: one sentence, hello world, then a few short sections, each one claim and one example. One of them shows a real compiler error.
  3. A short tour, then a guide. The tour covers everything once and says so. Depth lives elsewhere. No more than three ways in (Rust: book, examples, exercises).
  4. Prose with a voice. Say who a page is for, explain a convention once, grow one example across a page instead of listing rules (TypeScript, Python).
  5. Library pages open with an example. The full API list is generated from the source.
  6. Nothing stale on a public page. No history, no "no longer". The "this page is not updated" banner on Effective Go shows where that ends.

Next: the audit of the current pages.

**Research done.** I read the front pages, tours and library references of Rust, Go, Kotlin, Swift, Gleam, Elixir, Zig, the TypeScript handbook and the Python tutorial. The notes per site, with links, are in `book/RESEARCH.md` on the `docs/582-book` branch. What the good ones have in common, and what the book takes over: 1. **Output under every example**, checked by the test suite. Go, Rust, Zig and Swift all do this. Our standard-library pages have 471 code blocks and 7 of them run. 2. **A landing page where every claim has code.** Gleam is the model: one sentence, hello world, then a few short sections, each one claim and one example. One of them shows a real compiler error. 3. **A short tour, then a guide.** The tour covers everything once and says so. Depth lives elsewhere. No more than three ways in (Rust: book, examples, exercises). 4. **Prose with a voice.** Say who a page is for, explain a convention once, grow one example across a page instead of listing rules (TypeScript, Python). 5. **Library pages open with an example.** The full API list is generated from the source. 6. **Nothing stale on a public page.** No history, no "no longer". The "this page is not updated" banner on Effective Go shows where that ends. Next: the audit of the current pages.
Author
Collaborator

Audit done. I sampled pages from every section of docs/ and counted what can be counted.

Section Pages Words trb blocks that run and show output List lines
start 14 5.4k 51 35 -
guide 21 12.5k 69 57 264
how-to 16 12.7k 16 0 325
explanation 22 30.9k 114 5 407
language 125 107k 316 7 2037
standard-library 51 85k 471 7 1094
tooling 37 57k 33 2 754

That is 330k words, about four times the Rust book. Outside the beginner lessons almost no example shows what it does.

The failure patterns, each with one piece of evidence:

  1. Design history and internal references on user pages. 488 hits for "design", "milestone", "no longer", issue numbers and similar. standard-library/regex.md: "the full tables of Unicode, a native of milestone 8, are there." language/types/exclusivity.md: "CONCEPT.md describes a rule beyond the single-path checks of var paths".
  2. Links into contributor material. language/collections-and-iteration/changing-in-place.md: "The collections design - section 3.11, the decision and its rules." language/extensibility/foreign-functions.md: "The design is Foreign functions."
  3. Code without output. language/types/data-or-capsule.md opens with an example that ends in print slug.text() and never says what it prints. Of 471 code blocks on standard-library pages, 332 are fragments that are not even type-checked.
  4. A fixed template instead of an explanation. Every reference page has to have Example, Syntax, Rules, What this is not, Related, in that order. 109 pages carry a "What this is not" section. data-or-capsule.md uses its section to say "A capsule is not a constructor with logic in it".
  5. Lists where prose belongs. standard-library/os.md has a run of 56 list items. tooling/index.md has 36 in a row. The tour explains parentheses as a bullet list in the middle of the tour.
  6. See-also chains. 249 pages end in a ## Related list. The lists name the same neighbours again and again and lead nowhere in particular.
  7. Sentences written for a parser. The summary of data-or-capsule.md: "A type is data, whose constructor is the way in, or a capsule, whose constructor a private field without a default closes - and then a factory, accessors and one conversion pair take its place."
  8. Output away from its cause. In the tour's "Calls without parentheses" example all // prints lines are collected at the end of the block, far from the statements that print them.
  9. Too many doors. The front page offers four ways in. The docs index offers "TorbScript in 10 ideas", "A tour", "Learn TorbScript" and "Learn to program", which overlap.
  10. The reader is an agent. The tour ends by pointing to "What a model trained on other languages gets wrong". That is a good page for a skill, not for a person.

The root cause is structural. The rules in docs/contributing (fixed sections per kind, Diátaxis folders, one page per rule) are made for a corpus that feeds the Agent Skills, and the human site is rendered from that same corpus. The fix is to separate the two: docs/ stays the skill source, and a new book/ is written for people and published as the site.

Next: the concept.

**Audit done.** I sampled pages from every section of `docs/` and counted what can be counted. | Section | Pages | Words | `trb` blocks | that run and show output | List lines | |---|---|---|---|---|---| | start | 14 | 5.4k | 51 | 35 | - | | guide | 21 | 12.5k | 69 | 57 | 264 | | how-to | 16 | 12.7k | 16 | 0 | 325 | | explanation | 22 | 30.9k | 114 | 5 | 407 | | language | 125 | 107k | 316 | 7 | 2037 | | standard-library | 51 | 85k | 471 | 7 | 1094 | | tooling | 37 | 57k | 33 | 2 | 754 | That is 330k words, about four times the Rust book. Outside the beginner lessons almost no example shows what it does. The failure patterns, each with one piece of evidence: 1. **Design history and internal references on user pages.** 488 hits for "design", "milestone", "no longer", issue numbers and similar. `standard-library/regex.md`: "the full tables of Unicode, a native of milestone 8, are there." `language/types/exclusivity.md`: "`CONCEPT.md` describes a rule beyond the single-path checks of var paths". 2. **Links into contributor material.** `language/collections-and-iteration/changing-in-place.md`: "[The collections design](../../design/COLLECTIONS.md) - section 3.11, the decision and its rules." `language/extensibility/foreign-functions.md`: "The design is Foreign functions." 3. **Code without output.** `language/types/data-or-capsule.md` opens with an example that ends in `print slug.text()` and never says what it prints. Of 471 code blocks on standard-library pages, 332 are fragments that are not even type-checked. 4. **A fixed template instead of an explanation.** Every reference page has to have Example, Syntax, Rules, What this is not, Related, in that order. 109 pages carry a "What this is not" section. `data-or-capsule.md` uses its section to say "A capsule is not a constructor with logic in it". 5. **Lists where prose belongs.** `standard-library/os.md` has a run of 56 list items. `tooling/index.md` has 36 in a row. The tour explains parentheses as a bullet list in the middle of the tour. 6. **See-also chains.** 249 pages end in a `## Related` list. The lists name the same neighbours again and again and lead nowhere in particular. 7. **Sentences written for a parser.** The summary of `data-or-capsule.md`: "A type is data, whose constructor is the way in, or a capsule, whose constructor a private field without a default closes - and then a factory, accessors and one conversion pair take its place." 8. **Output away from its cause.** In the tour's "Calls without parentheses" example all `// prints` lines are collected at the end of the block, far from the statements that print them. 9. **Too many doors.** The front page offers four ways in. The docs index offers "TorbScript in 10 ideas", "A tour", "Learn TorbScript" and "Learn to program", which overlap. 10. **The reader is an agent.** The tour ends by pointing to "What a model trained on other languages gets wrong". That is a good page for a skill, not for a person. The root cause is structural. The rules in `docs/contributing` (fixed sections per kind, Diátaxis folders, one page per rule) are made for a corpus that feeds the Agent Skills, and the human site is rendered from that same corpus. The fix is to separate the two: `docs/` stays the skill source, and a new `book/` is written for people and published as the site. Next: the concept.
Author
Collaborator

Concept ✅ The concept is in book/CONCEPT.md, on branch docs/582-book.

Here is what it decides:

  • A separate tree. The human documentation becomes its own tree, book/. docs/ stays as the source for the skills and as contributor material, and is no longer published on the site.
  • Six sections. The header shows Tour, Guide, Reference, Std and Tools; the beginner course stays as its own way in. At the root are an overview and a "What makes TorbScript different" page, the showcase the front page links to.
  • Pages read like prose. Pages have no required sections. Prose comes first and lists only appear where something really is a list. Each example is followed by its real output, and there are no history notes, no issue numbers and no "Related" chains.
  • Std pages are written by hand. Each one opens with an example and covers the common tasks. The full API comes from torb doc std.
  • CI enforces it. The output under every trb run block is asserted. Compiler errors are shown as checked output. A book lint rejects history words, issue numbers, internal links, walls of list items and the old template headings.
  • Mapping table. The concept maps every old page to its new home.

Next is the PR with the generator changes, the CI checks, and the first slice: the front page, the showcase, the full tour, and a few pages each from Guide, Reference and Std.

Questions for Torben (product direction, in German):

  1. Soll der Anfängerkurs (start/, 13 Lektionen für Leute, die noch nie programmiert haben) dauerhaft bleiben? Im Konzept bleibt er als eigener Einstieg und wird später überarbeitet. Die Alternative wäre, ihn zu streichen und das Buch nur für erfahrene Programmierer zu schreiben.
  2. Soll es das Buch auch auf Deutsch geben? Vorerst ziehen nur die deutschen Kurslektionen mit um. Die deutschen Übersetzungen der alten Guide- und Website-Seiten fallen mit ihren Originalen weg. Eine deutsche Fassung des neuen Buchs würde ich erst schreiben, wenn du das willst.
**Concept ✅** The concept is in [`book/CONCEPT.md`](https://git.torb.dev/torbscript/language/src/branch/docs/582-book/book/CONCEPT.md), on branch `docs/582-book`. Here is what it decides: - **A separate tree.** The human documentation becomes its own tree, `book/`. `docs/` stays as the source for the skills and as contributor material, and is no longer published on the site. - **Six sections.** The header shows Tour, Guide, Reference, Std and Tools; the beginner course stays as its own way in. At the root are an overview and a "What makes TorbScript different" page, the showcase the front page links to. - **Pages read like prose.** Pages have no required sections. Prose comes first and lists only appear where something really is a list. Each example is followed by its real output, and there are no history notes, no issue numbers and no "Related" chains. - **Std pages are written by hand.** Each one opens with an example and covers the common tasks. The full API comes from `torb doc std`. - **CI enforces it.** The output under every `trb run` block is asserted. Compiler errors are shown as checked output. A book lint rejects history words, issue numbers, internal links, walls of list items and the old template headings. - **Mapping table.** The concept maps every old page to its new home. Next is the PR with the generator changes, the CI checks, and the first slice: the front page, the showcase, the full tour, and a few pages each from Guide, Reference and Std. **Questions for Torben** (product direction, in German): 1. Soll der Anfängerkurs (`start/`, 13 Lektionen für Leute, die noch nie programmiert haben) dauerhaft bleiben? Im Konzept bleibt er als eigener Einstieg und wird später überarbeitet. Die Alternative wäre, ihn zu streichen und das Buch nur für erfahrene Programmierer zu schreiben. 2. Soll es das Buch auch auf Deutsch geben? Vorerst ziehen nur die deutschen Kurslektionen mit um. Die deutschen Übersetzungen der alten Guide- und Website-Seiten fallen mit ihren Originalen weg. Eine deutsche Fassung des neuen Buchs würde ich erst schreiben, wenn du das willst.
Author
Collaborator

Progress: the tour is complete (9 pages: values, calls, types, cases, errors, collections, traits, tasks, projects), plus the root overview book/index.md, the showcase book/why.md and the rewritten front page book/site/home.md. Every trb run/trb error block has its real output, and the output of a trb error block is now the exact rendering of torb check main.trb (asserted by torb docs check). Site, course and German course moved into book/. Next: Guide, Reference and Std pages, then CI wiring and the PR. Branch docs/582-book, commit 26434f45.

Progress: the tour is complete (9 pages: values, calls, types, cases, errors, collections, traits, tasks, projects), plus the root overview `book/index.md`, the showcase `book/why.md` and the rewritten front page `book/site/home.md`. Every `trb run`/`trb error` block has its real output, and the output of a `trb error` block is now the exact rendering of `torb check main.trb` (asserted by `torb docs check`). Site, course and German course moved into `book/`. Next: Guide, Reference and Std pages, then CI wiring and the PR. Branch `docs/582-book`, commit 26434f45.
Author
Collaborator

Progress on the vertical slice (branch docs/582-book, pushed):

  • Done and checked: landing page (book/index.md), why.md, the full Tour (9 pages), Guide (handling-errors, your-own-constructs), Reference (bindings, cases-and-patterns), Std (json, fs), section indexes, the new front page.
  • Every example runs locally with its output filled in from the real compiler; docs check book reports no problems (41 pages, 214 snippets, without the native half, which CI runs).
  • Site wiring: torb docs site builds from book/ (gates, Dockerfile.site, images.yml); docs check book and docs index --check book are new gates. The book rules got tests.
  • docs/ stays the source of the Agent Skills: every page left there is carried by a skill, so none is deleted in this PR; the site no longer publishes any of them.

Next: rebase on main, open the PR, then the slice issues.

Progress on the vertical slice (branch `docs/582-book`, pushed): - **Done and checked:** landing page (`book/index.md`), `why.md`, the full Tour (9 pages), Guide (`handling-errors`, `your-own-constructs`), Reference (`bindings`, `cases-and-patterns`), Std (`json`, `fs`), section indexes, the new front page. - Every example runs locally with its output filled in from the real compiler; `docs check book` reports no problems (41 pages, 214 snippets, without the native half, which CI runs). - Site wiring: `torb docs site` builds from `book/` (gates, `Dockerfile.site`, `images.yml`); `docs check book` and `docs index --check book` are new gates. The book rules got tests. - `docs/` stays the source of the Agent Skills: every page left there is carried by a skill, so none is deleted in this PR; the site no longer publishes any of them. Next: rebase on main, open the PR, then the slice issues.
Author
Collaborator

Rebased on main (clean, no conflicts) and opened as #585: the concept, the vertical slice, the site built from book/ and the book gates (docs check book, docs index --check book, docs site book --check in tools/gates.sh). Waiting for CI, then review by argus.

Rebased on main (clean, no conflicts) and opened as #585: the concept, the vertical slice, the site built from `book/` and the book gates (`docs check book`, `docs index --check book`, `docs site book --check` in `tools/gates.sh`). Waiting for CI, then review by argus.
Author
Collaborator

Slices cut. One PR per slice, each with acceptance criteria from book/CONCEPT.md. All depend on #585; #599 closes the epic once the others have landed. #598 (the course) waits for the two questions above and carries no loop label.

  • #587 book: Guide chapters (first project, modelling data, collections, files and formats, testing, native programs, design choices)
  • #588 book: Guide, coming from another language
  • #589 book: Reference, part 1 (syntax, built-in types, strings, functions, types, control flow)
  • #590 book: Reference, part 2 (errors, traits, generics, collections, modules, concurrency, encoding)
  • #591 book: Std pages, core and text
  • #592 book: Std pages, data formats
  • #593 book: Std pages, system and I/O
  • #594 book: Std pages, network and security
  • #595 book: Std pages, concurrency and the specialised modules
  • #596 book: Tools section
  • #597 book: site pages (install, playground, agents, benchmarks)
  • #598 book: rewrite the course (start/)
  • #599 book: retire the human pages of docs/
**Slices cut.** One PR per slice, each with acceptance criteria from `book/CONCEPT.md`. All depend on #585; #599 closes the epic once the others have landed. #598 (the course) waits for the two questions above and carries no `loop` label. - [ ] #587 book: Guide chapters (first project, modelling data, collections, files and formats, testing, native programs, design choices) - [ ] #588 book: Guide, coming from another language - [ ] #589 book: Reference, part 1 (syntax, built-in types, strings, functions, types, control flow) - [ ] #590 book: Reference, part 2 (errors, traits, generics, collections, modules, concurrency, encoding) - [ ] #591 book: Std pages, core and text - [ ] #592 book: Std pages, data formats - [ ] #593 book: Std pages, system and I/O - [ ] #594 book: Std pages, network and security - [ ] #595 book: Std pages, concurrency and the specialised modules - [ ] #596 book: Tools section - [ ] #597 book: site pages (install, playground, agents, benchmarks) - [ ] #598 book: rewrite the course (start/) - [ ] #599 book: retire the human pages of docs/
Author
Collaborator

[loop:orion] triage: label loop added (scope-gap fix: filed by orion in an interactive session without the label, as with #565/#566). Content is live (documentation rewrite epic and its slice, request by Torben 2026-10-29). Loop takes it from here.

[loop:orion] triage: label `loop` added (scope-gap fix: filed by orion in an interactive session without the label, as with #565/#566). Content is live (documentation rewrite epic and its slice, request by Torben 2026-10-29). Loop takes it from here.
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-20261029-0858 until 2026-10-30T01:30:00Z

[loop:torbscript] claim implement by session:loop-torbscript-20261029-0858 until 2026-10-30T01:30:00Z
Author
Collaborator

[loop:torbscript] release implement: the fix worker for PR #585 hit its 30 min limit without a new commit; head stays 86797a7, whose CI rerun is in progress (fast checks green, tier A/B pending). Next tick reads that result: green goes to review, red gets a fresh worker scoped to the failing job only.
next: waiting (CI on PR #585, head 86797a7)

[loop:torbscript] release implement: the fix worker for PR #585 hit its 30 min limit without a new commit; head stays 86797a7, whose CI rerun is in progress (fast checks green, tier A/B pending). Next tick reads that result: green goes to review, red gets a fresh worker scoped to the failing job only. next: waiting (CI on PR #585, head 86797a7)
Author
Collaborator

[loop:torbscript] note: PR #585 (concept, vertical slice, book gates) is merged; the epic stays open for its slices #587 to #597. next: waiting (slices #587 to #597)

[loop:torbscript] note: PR #585 (concept, vertical slice, book gates) is merged; the epic stays open for its slices #587 to #597. next: waiting (slices #587 to #597)
Sign in to join this conversation.
No labels
loop
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language#582
No description provided.