| … | … | @@ -23,17 +23,48 @@ never the hash**. |
| 23 | 23 | Parse markdown, one file per record, replication. **No MST, no DAG-CBOR, no byte-exact |
| 24 | 24 | CIDs.** Those are the bridge's problem. |
| 25 | 25 | |
| 26 | ## The surface |
| 27 | |
| 28 | ⚠ There is no `main` and no `exports` — **consumers deep-import `favela-markdown/lib/*.js`**, and |
| 29 | that path is the contract. |
| 30 | |
| 31 | | module | exports | |
| 32 | |---|---| |
| 33 | | `lib/record.js` | `parse`, `serialize`, `CANONICAL` — frontmatter + body, both directions | |
| 34 | | `lib/strip.js` | `strip` — the projection down to plain text + facets | |
| 35 | | `lib/render.js` | `render`, `embeds` — HTML, and the embeds a record names | |
| 36 | | `lib/uri.js` | `parseUri`, `recordUri`, `userUri`, `blobUri` and their `is*` guards | |
| 37 | | `lib/dialect.js` | the pinned micromark extension set, `isMention`, `isBlob`, `blobOid` | |
| 38 | | `lib/reach.js` | `NETWORKS`, `maxReach` — how far a record is allowed to travel | |
| 39 | | `lib/lint.js` | `lint` | |
| 40 | |
| 41 | `bin/favela-markdown` exposes `explain`, `lint`, `project` and `strip`. |
| 42 | |
| 26 | 43 | ## Status |
| 27 | 44 | |
| 28 | | Design. Nothing is built. |
| 45 | **Working**, 0.1.6 — the design below shipped. |
| 46 | |
| 47 | - `npm test` — **77/77 tests, 2432 asserts pass** (brittle-bare, run 2026-09-09), including the |
| 48 | 36 `markdown-strip` conformance vectors and a strip fuzzer. |
| 49 | - Real consumers today are **`favela-peer`** (`record`, `render`, `strip`, `reach`) and |
| 50 | **`favela-surface`** (`render`, `uri`). |
| 51 | |
| 52 | ⚠ The three consumers this file used to name — `favela-web`, `atproto-room/lib/signer.js` |
| 53 | `materialize()` and `ap-bridge/lib/as2-project.js` — do **not** import this package. Those two |
| 54 | projections still derive their own way; wiring them to this codec is outstanding work, not a |
| 55 | description of today. |
| 56 | |
| 57 | ⚠ `spec/design.md` still carries `**Status:** design. Nothing built.` in its header. That line is |
| 58 | stale in the same way this file was. |
| 59 | |
| 60 | ## Specs |
| 29 | 61 | |
| 30 | 62 | - `spec/design.md` — the decision and what it changes |
| 31 | 63 | - `spec/library.md` — this package's surface, its guarantees, and the sync obligations it inherits |
| 32 | 64 | - `spec/record-vocabulary.md` — the `net.favela.post` vocabulary |
| 65 | - `spec/interaction.md` |
| 33 | 66 | - `spec/markdown-strip.md` + `spec/vectors/markdown-strip.json` — the projection down to |
| 34 | 67 | plain text + facets, with 36 conformance vectors |
| 35 | 68 | |
| 36 | 69 | The vocabulary and strip specs moved here from `favela-web/spec/` on 2026-09-02: they |
| 37 | | describe the record, not the web app, and three separate consumers project from them — |
| 38 | | favela-web, the atproto signer (`atproto-room/lib/signer.js` `materialize()`) and |
| 39 | | `ap-bridge/lib/as2-project.js`. |
| 70 | describe the record, not the web app. |