Skip to content
undertext developers
Skip to Content
undertext developers

Provenance

How Undertext knows where every word in a document came from, and what the four origins mean.

Provenance is where a document's words came from. Undertext records it as the writing happens, not by reading the finished text, so it doesn't guess: every character that survives in the document carries who wrote it and how it got there.

Who wrote each character

Every change in the editor arrives at Undertext from a known writer: a person in a session you started, or an agent with a token Undertext issued. Undertext writes the credit itself. A browser can't claim another person's or an agent's words, and edits sent under someone else's identity are refused.

That credit follows the text. When someone deletes a sentence, it leaves the count; when someone else rewrites it, the new words are theirs.

Four origins

Each surviving word falls into exactly one of four origins. Together they make up 100% of the document.

OriginWhat counts
TypedWords people wrote themselves in the editor.
ShapedText an agent wrote, in sentences a person has since changed. A person's change to the words of a sentence makes the agent's words around it shaped, for as long as the change lasts.
AIText an agent wrote that people kept as written. An agent's suggestion accepted without changes is AI.
ExternalText pasted in, imported from a file, or inserted with no key pressed for it, as tools that drive a browser do. Its origin is unknown, so it counts toward neither people nor agents.

Seals show Typed and Shaped together as Typed & Shaped, the share people wrote or reworked. The breakdown behind a seal keeps them apart.

Moving agent text, formatting it, or accepting it as a suggestion doesn't shape it. Only changing its words does.

Suggestions

A suggestion's words are its author's from the moment it's proposed. When an editor accepts a person's suggestion, those words count as that person's typing; when they accept an agent's suggestion unchanged, they count as AI. A rejected suggestion leaves nothing behind.

Moving words keeps their credit

Rearranging text doesn't change who wrote it. These all keep each word's original writer and origin:

  • indenting a list item, changing a block's type, splitting or joining paragraphs, dragging text;
  • undo, which puts back what was there;
  • cutting text and pasting it back, or an agent deleting a block and inserting it again;
  • copying several whole words from elsewhere in the same document: a copied agent paragraph is still AI, a copied pasted quote still external.

Moved words count as neither written nor deleted in the activity below.

Activity

Surviving text can't show everything, so Undertext also records what happened along the way:

  • Revisions: who deleted whose text.
  • Rounds: each back-and-forth between agents and people. The seal line counts these as prompts.
  • Minutes: when people were writing or reading, which presence is built from.
  • Traces: every read and edit an agent made.

What provenance can't tell

Provenance records how text arrived in the editor. It can't know what was in someone's head or on another screen: a person retyping an AI answer by hand is typing. That's why a seal carries presence and check-ins beside the four origins, and why it has no single score. Readers see each part and judge for themselves.

Reading it through the API

GET /v1/documents/{id}/provenance returns the live reading under the current method:

{
  "document": "doc_8Hq2Lm4R",
  "method": "v0.2",
  "composition": { "typed": 85.8, "shaped": 10.2, "ai": 2.3, "external": 1.7 },
  "by_actor": [
    { "type": "person", "user": "usr_5Kq2Lm8R", "typed": 80.6, "shaped": 0, "ai": 0, "external": 1.7 },
    { "type": "person", "user": "usr_8Nf4Tq2W", "typed": 5.2, "shaped": 0, "ai": 0, "external": 0 },
    { "type": "agent", "agent": "agt_3Fv8Kq2Lm9Wd", "user": "usr_5Kq2Lm8R", "typed": 0, "shaped": 10.2, "ai": 2.3, "external": 0 }
  ],
  "presence": { "share": 99, "verified_share": 98, "verified": false },
  "prompts": 101,
  "sittings": 9,
  "duration": "11hr2min",
  "duration_minutes": 662
}

by_actor splits the composition person by person and agent by agent. A seal freezes the document's numbers, rounded, at the moment of sealing.

On this page