Architecture decision records
Short records of the decisions that shape Folio: the context, what was decided, and what follows from it. They complement docs/architecture.md, which describes the system as it is; ADRs explain why it is that way.
| # | Decision | Status |
|---|---|---|
| 0001 | ProseMirror-shaped JSON is the document model | Accepted |
| 0002 | Layout is DOM-free; text measurement is injected | Accepted |
| 0003 | Edit with ProseMirror's headless core, without prosemirror-view | Accepted |
| 0004 | Paginate Flows of fragments plus breaks with penalties | Accepted |
| 0005 | Incremental layout: identity caches, resume, convergence, page reuse | Accepted |
| 0006 | Read content-addressed chunks, write ProseMirror steps | Accepted |
| 0007 | The server verifies a result checksum on every push | Accepted |
| 0008 | Pages are an addressing layer, not the storage unit | Accepted |
Writing a new ADR
Copy the shape of an existing record: Context (the forces at play), Decision (what we do, stated plainly), Consequences (what gets easier, what gets harder, what we must now keep true). Number it sequentially, keep it under a page, and add it to the table above. For the docs site, add a page in site/adr/ that includes it and an entry in site/.vitepress/sidebar.ts. Superseded records stay, with their status changed to "Superseded by NNNN".