← Language

Capstone II: The Language That Edited Its Own Book

A reproducible multi-model editorial case study: source-preserving design, real execution, whole-book revisions, failed checks, repairs, and the boundary between prompt collaboration and a Language protocol.

The book had acquired a problem it should have been able to recognise. It asked readers to distinguish intent from representation, confidence from evidence, and prediction from authority. Some of its paragraphs asked them to do all that at once, before giving them a concrete example. The distinctions mattered. Their presentation could still make unnecessary work for the reader.

Could the machinery proposed in Language help improve the book that explained it?

The answer began with a real editorial experiment. Three models examined the same chapter with different responsibilities. Another call generated a revision, using their observations and an explicit statement of what must survive. A subsequent run extended the approach across the manuscript. The resulting changes are in Git, alongside candidates, raw responses and reports.

The more revealing result was a failure of the checks. A completion report said every original reference had survived. A later comparison recovered cut-off citations that those checks had missed. The book about preservation had become a practical example of why a successful generation, a passing build and a confident report are different things.

This appendix explains the solution as it actually ran, including that repair. It documents useful editorial work without attributing it to a protocol that the runner did not execute. No reader-comprehension study was performed.

An editorial intention with two obligations

The first task was Chapter 1, The Interface Between Minds. Its hospital handover introduces the book’s central gap: what a registrar holds in mind is richer than what she can say, and the incoming team’s reconstruction need not match either.

The instruction was to make that chapter easier for an intelligent reader unfamiliar with the project to understand. That meant explaining compressed terms, exposing the argument’s steps and making examples do their work earlier. It also meant preserving the source’s claims, quoted speech, technical vocabulary, qualifications, evidence limits, references and voice.

Those obligations can conflict. Replacing a technical word may improve immediate fluency while weakening a distinction needed later. Adding an example may make a paragraph easier while introducing a claim the author never made. An editor therefore needs both a positive objective and explicit preservation requirements. “Make it clearer” leaves too much of that decision implicit.

The author had already used a revision of Chapter 3 as a development example of the desired direction. That was a calibration example, not an independent benchmark. The older prose-revision record still marked formal acceptance of its voice as pending. Calling it “already improved” in the production report did not settle that separate authorial gate.

Three repositories, different responsibilities

The manuscript repository, C:\Projects\language, held the book and its editorial evidence. The reusable implementation repository, C:\Projects\project-language, contained source records, preservation and verification capabilities, as well as Language Studio. The portable runtime, C:\Projects\language-runtime, implemented versioned language/0.1 messages for identified artifacts, observations, comparisons, proposals and decisions.

Their existence did not mean that all three participated in every run. The editorial runner imported Node’s file, path and cryptographic libraries. It called model services directly with HTTP fetch. It did not import the reusable verification modules or the portable runtime. Its source hash identified the chapter in a prompt and console output; it was not an executable semantic-preservation proof.

There is a real protocol adapter elsewhere, at this path relative to the implementation repository:

apps/language-demo/evaluation/language_runtime_adapter.py

It reads an existing Studio comparison, checks source and delivery hashes, and invokes the portable runtime at L0 and L1. That is a read-only replay of a stored exchange, not the manuscript’s editorial pipeline. Likewise, the runtime’s feedback work includes a scoped human decision about a film exposure proposal. It supplies no human evaluation of this book.

These boundaries matter to the title. “Language edited its own book” describes applying its design principles to editorial work. It does not mean the entire proposed architecture became an autonomous author.

What actually crossed the model boundary

LANG-SELF-01 used three real models through the configured OpenCode Go inference service. Expert A, claude-haiku-5-5, examined conceptual preservation. Expert B, qwen3.8-flash, looked for teaching problems: missing prerequisites, undefined terms and poorly placed examples. Expert C, deepseek-v4.1-flash, examined prose, transitions and voice. The revision model was claude-haiku-5-5.

The scripts, rather than an autonomous OpenCode agent, supplied coordination. They sent A and B requests to the service’s Anthropic-compatible Messages endpoint and C requests to its OpenAI-compatible chat-completions endpoint. Responses were archived, visible text extracted, and editorial context assembled for a further model call.

The full-book runner made a particularly consequential choice. Each expert saw the complete source, but the reviser received only text.substring(0, 800) from each expert. Missing visible output became a placeholder. Even a long, useful analysis could lose its qualifications at that second boundary. The instruction “return JSON” did not prevent this: the script neither parsed those findings as JSON nor validated a Language envelope. It inserted their first 800 characters into prose context.

The executed editorial flow: identified chapter and preservation brief to three expert models, their capped visible text to a revision model, candidate and response archive to checks and author review. The historical canonical write and the separate, uncalled portable runtime are explicitly labelled.
Executed prompt-based flow. Three expert calls do not guarantee three usable analyses. The portable protocol is a separate capability, not a hidden stage in this run. Open full-size diagram.

The first pilot kept candidates outside the canonical chapter. The full-book process-chapter.mjs went further: any nonempty revision text was written to both a candidate file and the canonical manuscript. It did not first require a successful semantic check or an author decision. If front matter was missing at the beginning, it prepended the source block, which could leave a duplicate block later in the response. Chapter 20 eventually needed exactly that kind of cleanup.

The practical design lesson is to put the acceptance boundary before the canonical write. A candidate is an artifact to review. Neither its fluency nor the service’s HTTP 200 response is permission to promote it.

What changed on the page

The pilot offers a small, inspectable example. Before revision, Chapter 1 introduced its central question this way:

That gap, between what one mind holds and what another mind reconstructs, is the subject of this book. More exactly, the book asks what happens to the gap when intelligence enters it:

The corrected expert-guided candidate made the referent and the scope explicit:

That gap, between what one mind holds and what another mind reconstructs, is the subject of this book. More precisely, the book asks what happens to that gap when intelligence enters the channel between them. Here “intelligence” covers two things: the human judgement already present in every exchange, and the computational systems that increasingly select, transform or generate messages inside it.

The added explanation gives an unfamiliar reader a way to interpret “intelligence” before the book builds on it. That is an editorial reason for considering the change helpful. Whether it actually improves a reader’s understanding remains a question for readers, not a consequence of the explanation’s existence.

The same pilot produced a direct-editing baseline. Its changes exposed what a fluency-oriented rewrite might overlook. The source’s “perhaps ten minutes” became “about ten minutes”; “could not quite encode” became “could not quite put into words”; and the quoted “keep an eye on him” acquired an initial capital. The expert-guided candidate retained the source forms.

Those differences have unequal weight. Capitalisation is an exact quotation obligation. “Perhaps” carries a particular uncertainty. “Encode” gives the passage a technical framing that “put into words” narrows. None alone proves a whole chapter better. Together they make the preservation contract concrete enough to inspect rather than merely endorse.

The pilot report also describes more explicit diagnostic questions for the communication joints. Its correction cycle was less successful: the model returned a truncated chapter. A narrow tool-applied edit removed a leading “So” instead. That was a model-guided, mechanically applied correction, not a completed model rewrite.

Preservation was checked through qualitative source comparison and declared obligations. Later structural checks could compare headings, figure shortcodes and citation lines exactly. Neither method constituted a proof that every meaning survived. The distinction becomes important when the process scales.

From a pilot to the manuscript

The Git history resolves two discrepancies in the reports. The older publication plan describes a 37-chapter book. Commit 6c514fe subsequently added Chapter 8 and renumbered the later files through 38. At the audited revision there were 38 numbered manuscript files; this appendix adds no numbered chapter and leaves that existing spine intact.

The full-book completion report, dated 25 October 2026, says 37 chapters were revised and Chapter 3 was skipped. That is 37 of 38, not complete coverage of an unchanged 37-chapter edition. Chapter 1 reused its pilot candidate; 36 other chapters have retained per-chapter revision responses. Chapter 3 retained its calibration version. The baseline for this audit is c7e7953, immediately after the Chapter 3 calibration commit.

The report described the production changes as uncommitted. History records their later inclusion in 8420d10, followed by editorial cleanup in 1de1e5b. Reports are useful evidence of a run, but their “working tree only” statements are time-specific. They should not override subsequent Git history.

The results below separate recorded judgements from independently reproducible artifact counts. The downloadable audit gives per-file hashes, response metadata and exact structural comparisons. Its measurements use retained artifacts; overwritten retry responses cannot be counted again.

Evidence or check Observed result What it establishes
Pilot preservation concerns addressed Direct 2/14; expert-guided 12/14 Reported concern-coverage judgements, without blinded independent scoring
Pilot teaching / prose concerns addressed Direct 1/6 and 1/5; guided 4/6 and 4/5 Editorial observations; no measured human comprehension gain
Numbered manuscript coverage 38 files; 37 changed from c7e7953; Chapter 3 retained Revision coverage and retained calibration version
Retained full-book model responses 144: 108 expert responses and 36 revision responses Response-file coverage, excluding pilot calls and overwritten retries
Expert responses with no visible text 51 of 108 Three requested experts often did not provide three usable reports
Responses ending at a token limit 111 of 144 Includes expert responses; not 111 truncated chapters
Initial damaged chapters 10 reported, followed by reruns A production failure and attempted repair, not ten independently retained first attempts
Audit before the additional repair All heading lists equal; four reference lists visibly cut off Heading presence failed to catch incomplete citations
Audit after the additional repair 38/38 equal front matter, heading lists, figure shortcodes and reference bullet lines Exact preservation of those objects; broader semantics remain unverified
Archived full-book list-cost metadata Sum 0.41862931 across 144 priced response files Provider list-cost units, not a confirmed invoice or complete programme expenditure
Human reader evaluation None recorded No demonstrated reader benefit or final authorial acceptance

The same response set records 901,163 input tokens and 612,574 output tokens. Output usage can include reasoning, not just deliverable prose. The archived list-cost field is commonly read as a monetary estimate, but this audit preserves its literal field name rather than assuming a currency or equating it to the account’s actual charge. Pilot attempts, overwritten calls and editorial labour are outside that subtotal.

The archive contains one pilot Mermaid diagram source. The completion record reports preservation of existing figures, not a measured full-book programme of new explanatory diagrams. This appendix adds the architecture figure above. Diagram presence and rendering are engineering checks; neither measures reduced cognitive load.

The check that passed too easily

The production report identified ten initially truncated chapters: 8, 12, 21, 24, 25, 27, 28, 29, 30 and 38. It says those sources were restored from the then-current HEAD, the revision ceiling increased from 8,000 to 16,000 tokens, and the chapters rerun. That is a useful failure record. The final saved runner has the larger ceiling, but its output filenames are reused, so the complete history of every attempt cannot be reconstructed from the final response files alone.

The subsequent verification looked mainly for section counts and a References heading. Its RefLines diagnostic counted every line beginning with - , including ordinary lists elsewhere in a chapter. A chapter could therefore pass while retaining only the beginning of its first citation.

The new audit compared actual reference bullet lines with the pre-production Git source. It found cut-off text in Chapters 14, 26, 33 and 34. Chapter 33, for example, ended its Stripe URL at /api/idempotent and lost the following OWASP citation. It still had a References heading. A Hugo build could render that incomplete text perfectly.

The repair restored the original reference entries in those four chapters and restored exact reference punctuation in Chapters 12 and 24. It also restored Chapter 34’s original front matter and Chapter 2’s original figure caption, and removed an internal editorial note from Chapter 31. Revised body prose was retained. Commit 5354ce5 subsequently recorded these repairs. The before-repair audit remains available in the repository; the failure has not been erased by the successful repair.

After repair, all 38 numbered chapters matched the baseline on those four structural objects. This is stronger than counting headings, and still much weaker than establishing semantic fidelity. A paragraph could retain all its references while changing a condition, a negation or an evidence limit. That remaining review must read the argument, not just its scaffolding.

Reproducing the solution

There are two different reproductions: inspect the recorded evidence offline, or make new model calls to generate another candidate. The first is deterministic over the pinned artifacts. The second uses a changing external service and cannot promise identical wording, model availability or cost.

Start with the manuscript repository and preserve its revision identity:

Set-Location C:\Projects\language
git rev-parse HEAD
git show --stat 8420d10 -- content/books/language
git show 1de1e5b -- content/books/language/20-chapter.md
python scripts/capstone_ii_audit.py --output planning/capstone-ii/audit.json

The audit requires Python and Git. It reads chapters from content/books/language/, compares their structure with c7e7953, and reads the nested API response bodies under experiments/LANG-SELF-01/transcripts/. It writes hashes, visible-text lengths, finish reasons, model identities, token usage and list-cost totals. It makes no inference calls, reads no credentials and changes no manuscript source. A structural mismatch is reported as evidence, rather than silently repaired or treated as a semantic verdict.

The evidence inputs are the pilot’s reports/LANG-SELF-01-REPORT.md, the later reports/LANG-SELF-02R-COMPLETION.md, the candidates/ files and raw responses. All are beneath experiments/LANG-SELF-01/. The frozen Chapter 1 fingerprint is in fingerprints/chapter-1-source.sha256; its reported SHA-256 is:

CE0222E2A421924CAEF2C9F8CC829FDE335B0090D4C28577E6DCC28649D07FB6

Byte hashes are identities, so line-ending changes can matter. Use the Git baseline and archived fingerprint deliberately rather than treating a current filename as the original.

For a new candidate, prepare an isolated replay with the supplied helper:

python scripts/capstone_ii_audit.py --prepare-replay C:\Temp\lang-self-replay
node --check C:\Temp\lang-self-replay\process-chapter.mjs

The destination must not already exist and must be outside the manuscript repository. Preparation copies the 38 baseline chapters and adapts the historical runner in three ways: scratch paths, environment-only credentials, and candidate-only output. It writes a REPLAY.json provenance record. It does not call a model. It preserves the historical prompt construction, including the 800-character expert limit, so it reproduces the implemented approach rather than claiming to repair the research design.

If a new paid run has been authorised and an API key is already supplied securely in the process environment as OPENCODE_API_KEY, the execution command for one chapter is:

node C:\Temp\lang-self-replay\process-chapter.mjs 20

No literal key belongs in the command, manuscript or transcript. The historical endpoint paths are:

https://opencode.ai/inference/go/anthropic/v1/messages
https://opencode.ai/inference/go/openai/v1/chat/completions

The final runner requests 3,000 output tokens for each expert and 16,000 for revision, using the four role/model assignments described above. These are recorded configurations, not a claim about what the service currently offers. The chapter is sent to each provider call in full.

For Chapter 20, outputs appear beneath C:\Temp\lang-self-replay\experiments\LANG-SELF-01\: transcripts/ch20-expert-{A,B,C}-raw.json, visible expert text files when present, transcripts/ch20-revision-raw.json, and candidates/ch20-language-mediated-revision.md. The baseline chapter remains unchanged. Use a fresh replay directory for another attempt because response filenames are reused.

Failure handling remains explicit. A transport error or non-success HTTP status is an infrastructure failure, not a low-scoring editorial answer. A token-limit stop, missing expert text or malformed finding means the input to revision was incomplete. The historical runner may continue anyway; the reviewer must not call the result a completed three-expert assessment. A missing citation, duplicate front matter or damaged qualifier blocks promotion of the candidate. Preserve the response, fix the cause or retain the original, then record the new attempt separately.

The independent portable-runtime tests can be run without replaying an editorial experiment:

Set-Location C:\Projects\language-runtime\js
node --test tests/runtime.test.mjs

Passing them demonstrates the tested runtime contracts. It does not establish that the editing runner invoked them. The broad runtime verify.ps1 also regenerates other projects’ evidence; it is unnecessary for auditing this manuscript run.

Finally, render the local draft from the manuscript repository:

Set-Location C:\Projects\language
hugo --minify
hugo --buildDrafts --destination .artifacts/capstone-ii/site --baseURL http://127.0.0.1:8765/
python -m http.server 8765 --directory .artifacts/capstone-ii/site --bind 127.0.0.1

The appendix is at /books/language/capstone-ii/ in that preview. Its draft = false front matter excludes it from the ordinary production build. The SVG uses the book’s existing bookfig shortcode and needs no client-side diagram engine.

What Language contributed

The useful contribution was a discipline for making editorial choices inspectable: retain an identified source, declare the desired improvement, separate kinds of observation, name what must survive, keep candidate and acceptance distinct, and record failures. The pilot produced concrete, reviewable changes. The full-book artifacts show that this approach can generate revisions at manuscript scale. The later audit demonstrates the value of returning to the source when a report overstates its checks.

The causal claim is narrower. The guided pilot received more editorial context than the direct baseline. There was no matched unstructured three-expert condition, no executed Language-envelope condition in this editorial run, and no blinded human evaluation. More context, different expert perspectives and repeated attempts could explain the observed differences. The name of the workflow cannot allocate credit among them.

The proposed LANG-SELF-02R controlled comparison would separate direct editing, unstructured expert collaboration and executable protocol mediation under comparable information and budgets. The inspected repositories contain its plan and the full-book production record, but no completed LANG-SELF-03/04 editorial protocol evaluation that closes that question. Independent runtime milestones with similar numbers are not substitutes.

A useful protocol implementation would make findings complete, typed and source-linked, record missing analyses as missing, and distinguish a proposal from permission to overwrite a chapter. Whether that improves results enough to justify its complexity remains to be tested. It should be compared with a competent ordinary editorial workflow, including source diffs and human review.

The experiment therefore leaves a practical result and an empirical limit. Several models helped produce a revised manuscript that an author can inspect. They also produced truncated outputs, missing expert contributions and confident but insufficient preservation reports. The additional repair improved the reliability of the artifact record; it did not retrospectively validate every revision.

The book did not become its own final judge. It supplied a task on which its central requirement could be exercised: when a representation changes, return to the source and ask what survived. That question helped improve both the manuscript and the process used to inspect it. Whether the revised book helps other people understand more is the next question, and it still belongs to its readers.