data-book="docs" Root docs | The Root Network
Skip to content

1.16 Root docs ​
At a glance
What it isA document as a tree down to every character, each part with a property bag and its history, and schemas laid over it as lenses: what root docs are and what they're for.
Where it sitsPart I — Understanding · Chapter 1.16
CoversA tree down to every character · Documents, versions and languages · One file, signed · Purging and applying a schema · Out and back again · On chain, when you choose · +7 more

A root doc is a document broken down to every character. Every part of it, from the whole document to a single letter, can be pointed at, tracked, styled and proved. A schema laid over it shows the parts that matter for a purpose.

Where to find them

Root docs are on root at /documents/: write or bring one in, read it, pick any part down to a character, lay a lens over it, and export it.

The idea comes from DocRef, which turns laws, regulations and standards into data you can point at precisely: Article 13 of the EU AI Act, paragraph 1, characters 31 to 128. A root doc goes all the way down, to each character, and tracks every change to each one.

1.16.1 A tree down to every character ​

A root doc is a tree. Every character is in it: letters, spaces and punctuation.

Document
└── Section
    └── Paragraph
        └── Sentence  "The quick brown fox jumps over the lazy dog."
            ├── Word  "The"
            │   ├── T
            │   ├── h
            │   └── e
            ├── " "
            ├── Word  "quick"
            │   └── …
            ├── …
            ├── Word  "dog"
            └── "."
  • The levels are found in the text itself: paragraphs, sentences, words and characters, along with headings, lists and tables. Root docs read English.
  • Every part has children, except characters. A character is a leaf: it has only properties.
  • Pictures, video, sound and any other file are parts too, by URL, with a caption and a description for those who can't see them. A file that came inside a Word document or PDF travels inside the root doc. Each is fingerprinted, so a changed file shows.
  • Tables keep their header rows, and a spreadsheet cell keeps its formula as part of what it says, so a proof covers it. Root docs don't calculate: the value shown is the last one worked out, and a spreadsheet program does the sums.
  • A sentence keeps its identity when it's edited. Fix a typo and it's still the same sentence, with its history and notes.
  • Spaces and punctuation are characters too. They sit between the words, as children of the sentence.
  • Every part has an address, built as DocRef builds them, from the document's own numbering: Chapter III, Section 2, Article 13, paragraph 1 is c3-s2-a13-p1. A heading is a part of its own (-title, -subtitle), and points keep their own letters: p3-b-ii is point (b)(ii).
  • The text has addresses too: c3-s2-a13-p1-sent2 is the paragraph's second sentence, -sent2-word3 its third word, and -char31 the character at place 31 in the paragraph, counted from 0 as DocRef's pinpoints count. -char31-128 is the span from 31 up to 128.

1.16.2 Documents, versions and languages ​

Every document has a readable address, as DocRef's do: its publisher, the document, the version and the language, such as /eu/ai/32024R1689/en/. A passage is that address and the part's: /eu/ai/32024R1689/en/#c3-s2-a13-p1.

  • Each version has its own address, and a part keeps its address from version to version, so the same article can be compared across versions to show what changed.
  • Each language has its own address. Root docs read English for now, so every document's language is en.
  • The publisher is your root folder unless you choose a name, so the address finds the document without a register of names.

1.16.3 One file, signed ​

A root doc is a single file that carries everything it needs. Hand it to anyone, by any means, and they can read it and check it with nothing else: no chain, no network.

  • Every version is in the file. Parts that didn't change between versions are stored once.
  • Each version is signed by whoever made it, with their wallet. A version made with no wallet is kept, and marked unsigned.
  • The document's id is a W3C DID (did:key:z6Mk…). A key made when the document is created signs its first version and is then thrown away, so no other document can claim that id.
  • Anyone can make the next version. Two versions made from the same one are both kept, as branches.
  • The file carries its notes and its look: each set of notes is signed by the person who wrote it, and each version names the style it's shown in.

1.16.4 Purging and applying a schema ​

Both make a new document and leave the original as it is. The new one records that it's a child of the original, and of which version, unless you apply a schema as a document of its own.

  • Purge keeps the current version and drops its history.
  • Apply a schema fits the document to another schema, for another shape or another audience. A schema can strip parts (they're gone) or redact them (they stay where they were as fingerprints, so if they're revealed later they can be checked). You're told everything that was left out.
  • Or as a document of its own: applying a schema can also make a document with no tie to the original. It doesn't record where it came from, and its parts and characters are new. A redacted part still leaves its fingerprint.

1.16.5 Out and back again ​

Send a root doc out as Word, a spreadsheet, a web page or Markdown, edit it there, and bring it back: only what was changed out there comes in, as the next version. Whatever that format can't hold (formulas in Word, the prose in a spreadsheet, styles, pictures) stays as it was. If the document changed here in the meantime, both sets of changes are kept, and anything changed on both sides is listed as a conflict.

Any part can be restored as it was in an earlier version, on its own, without undoing anything else.

1.16.6 On chain, when you choose ​

A document doesn't need the chain. When you want a version on record, attest it: the version's fingerprint goes in your Sylo validation record on The Root Network, with the block it was recorded in. Only the fingerprint goes on chain, never the text, and anyone holding the file can see which of its versions were attested.

1.16.7 What's kept, and the tree made from it ​

What's kept is the document's core: each part above the text, each text as its words with where its sentences and words fall, every character's identity, every property bag (a part's own style included), and the record of every change, oldest first, with who made it and when. The tree down to every letter is made from that core by the document's schema, which can also stop at sentences or words. However far the tree goes, its fingerprints and addresses are the same.

1.16.8 Property bags and history ​

Every part, from the document down to a single letter, carries a property bag: whatever state you want to keep on it.

  • Every change is recorded on the part it touched: what changed, when, and who changed it. Change one letter and that letter's history shows it; the rest of the document is untouched.
  • History is kept, not overwritten. You can see a part as it is, or as it was at any time.
  • Style is a property like any other, so any part can be styled, down to a single character.

1.16.9 Fingerprints and proofs ​

Every part has a fingerprint, worked out from what it says and from its children's fingerprints. The fingerprint at the top stands for the whole document, exactly as it is.

  • A change shows exactly where it is. Only the fingerprints on the path from the changed part to the top change.
  • A passage can be proved without the rest. Show the passage and the fingerprints on its path to the top, and anyone can check it's in the document.
  • A hidden part leaves its fingerprint behind, with a secret ingredient (a salt) mixed in, so a short hidden part such as a name can't be guessed back from it.

1.16.10 Schemas ​

A schema is written in SHACL, the same language the Asset Register's schemas use. It does three things.

1.16.10.1 It describes a document's shape ​

A schema names the kinds of part a document has above its text: chapters, sections, articles and paragraphs for legislation; clauses and subclauses for a contract. It says what each kind may hold, and which kinds hold text. Below that, every document is the same: sentences, words, characters.

Article 13  a13                       ← the schema's shape (Legislation)
├── title     "Article 13"
├── subtitle  "Transparency and provision of information…"
└── paragraph 1  p1                   ← the schema says this holds text
    └── sentence → word → character   ← the same in every document

1.16.10.2 It describes property bags ​

For each kind of part, a schema says which properties it carries, what type each is, and whether it's required. Every part has when it changed and who changed it; a schema adds its own, such as a clause's status, proposed or agreed.

1.16.10.3 It works as a lens ​

Lay a schema over a document and it picks out the parts that matter for a purpose. Nothing underneath is copied or changed: the same document gives a different view through each schema.

  • What it matches on: kind ("articles only"), position ("Chapter III"), property bag ("agreed", "not confidential", "changed by Tony after 1 October"), the text ("sentences containing shall"), or judgement, where a model reads the text and records how relevant each part is, and why, in that part's property bag.
  • Showing and hiding: a rule can show what matches it, or hide what matches it ("anything marked confidential"), along with everything inside.
  • In or out, or by degree: a part is either relevant or not, or more or less relevant, so the most relevant parts come forward most.
  • What happens to the rest: it fades, folds away, or is hidden, leaving its salted fingerprint so the document keeps its shape without giving away its content.
  • A part that shows keeps its place, with its parents around it, so it can still be read in context.

1.16.11 Annotation sets ​

Notes and tags can sit on any part, down to a single character. A set of them is a layer of its own: an expert's commentary, a team's tags, a reviewer's questions. It has its own name and owner, and anyone opens it with a link, laid over the document. Several sets can be shown at once, and a set can be shown through a lens.

1.16.12 Downloads ​

A root doc downloads as:

  • the root doc (.rootdoc.json), the document itself, every version and signature in it;
  • a web page, each part keeping its address and fingerprint, every sentence linkable;
  • Word and PDF, in the document's style, with each part's own style down to a character;
  • Markdown;
  • JSON, the whole tree with every part's address, kind, text, when and by whom, and property bag;
  • CSV, one row per part down to every character, for a spreadsheet;
  • Turtle, the document's shape as its schema checks it;
  • a lens's view, a root doc file of its own: one version, with no history, what it hides left as fingerprints, so it still checks against the signed original without giving anything away.

Web pages, Word files, PDFs and Markdown that root docs write come back in as they went out: headings, numbering, tables with their header rows, pictures and captions.

1.16.13 What it's for ​

  • One shape per market. An NFT's metadata is one tree. OpenSea's schema shows it in OpenSea's shape and another market's in theirs, each from the same source. Where markets name or arrange the same thing differently, the market's schema also says how each part is shown.
  • Privacy. Hidden parts stay as salted fingerprints: the document keeps its shape, not its information, and can still be proved against the original.
  • Turning down the noise. The parts that matter come forward; the rest fades.
  • Point in time. Every character records when it changed, so a document can be shown as it stood on a date: "the Act as at 1 March".
  • Who wrote what. Show only what one person changed, or only what an agent wrote rather than a person: an audit trail for AI-written text.
  • Watching. Keep a lens on a document and be told when anything inside it changes, so a change to an obligation flows through to the software that depends on it.
  • Selective disclosure. Show a verifier only what they need, such as "over 18" from an ID, with the rest left as salted fingerprints.
  • The viewer picks the lens. The public, a regulator and a lawyer each see their own view of one document, set by their permissions.
  • Context for an agent. Give an agent only the parts that matter to its task, each with its address, so its answers cite exact parts, and those citations can be proved.
  • Like with like. Lay the same lens over two documents, such as two contracts or two NFT collections, and they line up for comparison.
  • Unlock on payment. Hidden parts stay as salted fingerprints until someone pays and the key is released; anyone can check the unlocked text is what was always there.

Associated docs

Where else you might go from here. Following one is optional — this chapter stands without them.

Part I — Understanding
Part of — The model behind The Root Network: the chain, its token economy, its protocols, and the tasks people actually do on it.
Contents
See also — Every chapter in this book, each with the one line that tells you what you get by reading it.
Front matter — read in order
See also — The whole of Front matter as one continuous page, reprinted from its chapters without change.
Read in order
See also — Every chapter in this book in reading order, with the one line that tells you what each gives you.

Curated independently and source-attributed. Not affiliated with Futureverse or TRN Labs. Sources

Curated independently and source-attributed. Not affiliated with Futureverse or TRN Labs.