A book treated as a system

What changes when the work has an ontology, contracts and gates

Opus 6 min read
El camino del Alimento is a real book, in production, composed from a governed domain. It is not a metaphor: there are declared axioms, typed configuration and checks that refuse. The interesting part is not the machinery, but which defects stop being possible.

A book treated as a system

A non-fiction book with a repeated structure —chapters with the same sections, a terminology that must mean the same thing on page 30 and on page 240, boxes and tables that travel between formats— has the shape of a software system and is almost never treated as one.

It is treated as a folder of documents. And then the defects anyone who has edited something long will recognise appear: a term that changes meaning halfway through the work, a derived artefact someone corrected by hand that the next export wipes out, a section that exists in six chapters and is missing from the seventh without anyone noticing until the final layout.

None of them is a writing mistake. They are errors of structural integrity, and for those the editorial craft has conventions but no mechanisms.

What Opus is

Opus is the generic substrate: document extraction, assisted text analysis, suggestions, MCP servers to work on the book with agents, and the publishing scaffolding. None of that is specific to any book.

What is specific lives in the implementation. For El camino del Alimento —seven steps to nourish yourself in harmony with Nature, by Diego Delgado Silvera— the implementation declares its own structure, its terminology and its state, and consumes Opus as a framework. The separation matters: when the second book arrives, it will not inherit the first one’s decisions.

The unusual part: the ontology

The work has a domain governed with the ontoref protocol. In concrete terms, that means there is a handful of declared axioms —not commented in a README, but written in a file other things read— and that decisions with architectural weight are recorded as typed ADRs, not as prose.

Two of those axioms give the measure of what this is for:

Derived artefacts are not edited. If the composed text comes out of a pipeline, correcting the result instead of the source guarantees the correction is lost on the next pass. It is obvious said like that, and it is broken constantly because at the time it is always quicker to fix what is in front of you.

Configuration is the source, and it is typed. The state of each document and the work’s vocabulary live in Nickel files with a contract. A contract is not documentation: it is a validator. When someone adds a field the schema does not admit, the export fails — it is not silently ignored, which is what any configuration format without types does.

Why a gate and not a convention

The difference between a convention and a gate is that a convention holds while someone remembers it.

A real example from this project: the work has a declared structure of seven chapters with six sections each. That is a checkable statement. If the number of documents does not match what the ontology declares, the gate says so; no person needs to recount folders before layout.

Another: the terminology analysis does not read a list kept by hand in the editor’s head, but the terms file the work itself declares. Adding a term to the work and adding it to the analysis are the same act, and therefore they cannot fall out of sync.

The pattern is always the same: a list kept by hand next to another list kept by hand, with no common reader, is exactly where drift appears. Everything this system does can be summed up as giving those two lists a common reader.

What it does not solve

It does not write. It does not improve a weak sentence or decide whether a chapter is superfluous.

Nor does it remove editorial work: it moves it. Less time goes into checking checkable things —is this section in every chapter?, does this term mean the same everywhere?, does the export reflect the latest change?— and so more is left for what nobody can automate, which is whether the book says what it means to say.

And it has an honest cost: setting up the domain, the contracts and the gates is up-front work that does not pay off on a short book with a free structure. For a work with a repeated structure, its own terminology and several output formats, it pays off quickly.

The result

El camino del Alimento is published as a book, as an accompanied nutrition-education programme and as in-person activities. Three formats that share a single source and a single terminology, because they share the system that composes them.

That is the part worth noticing: not that there is an ontology, but that the three formats cannot contradict each other without something failing before publication.

We use cookies to help this site function, understand service usage, and support marketing efforts. Cookie Policy for more info.