> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vinmake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Typewriter

> Schema-driven document composition, immutable versions, approval, and a deliberate refusal to file its own work.

# Typewriter

Typewriter is the Forms rail destination at `/typewriter`.
It builds a form from the canonical 146-type document registry, keeps a live preview, saves the rendered PDF, hashes its exact bytes, and groups corrections as immutable versions of one document.

<Frame caption="The Typewriter picker searches the generated 146-type document registry before a form is built.">
  <img src="https://mintcdn.com/vinmake/Ehp92UnJ3VTrIHXb/images/greatbook/guides/12-typewriter-picker.png?fit=max&auto=format&n=Ehp92UnJ3VTrIHXb&q=85&s=b48e995a6ad24aeb1d48003c4018658c" alt="The GreatBook Typewriter document-type picker showing the generated 146-type catalogue" width="1440" height="1080" data-path="images/greatbook/guides/12-typewriter-picker.png" />
</Frame>

A human saves the proposal, a designated approver signs the current version, and only an approved nonblank version can be submitted to the Clerk.
The Typewriter service projects the approved schema payload directly into the Clerk-owned intake queue; it does not re-run the Clerk extraction graph and it never writes the ledger.
[Typewriter to posted journal entry](/greatbook/technical/typewriter-to-ledger) traces that handoff, both later human gates and the single ledger writer.

## What this surface refuses

Typewriter cannot approve its own document, approve a superseded version, bypass a missing approval designation, submit a schema-empty form, file directly, or post accounting.
Calculated fields are unavailable until their declared inputs are valid, and currency-bearing schemas accept only their shared uppercase ISO contract.

The chat lane is propose-only and is not the authority for approval or filing.
Use the form builder when the composition result must be reviewed field by field.

## When the answer is unknown

If schema loading fails, approval stays disabled because the UI cannot distinguish an untouched form from a valid zero-value document.
If preview refresh fails, the last successful preview remains visible with an error banner and the form stays untouched.
If submission gets no authoritative answer, the outcome is unavailable until the document detail is reread; the UI does not invite a blind duplicate submission.

## Verified at source

* `langgraph_chat/agents/common/doc_registry.json` is the generated 146-type catalogue used by the backend and UI.
* The GreatBook web repository's `src/components/typewriter/document-detail.tsx` owns blank-document refusal, maker/checker reasons, head-version approval, and approved-only submission.
* Its `src/components/typewriter/preview-pane.tsx` retains the last successful preview across a preview error.
* Its `src/components/typewriter/documents-table.tsx` reports unavailable filing outcomes and immutable version history instead of inferring success.
* `langgraph_chat/agents/typewriter/` has no database session or filing tool; it only proposes schema-shaped payloads.
