3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 22:55:44 +01:00

Answer architecture round 2: the claims type keeps directives apart from alerts and highlights, two paragraphs reflowed

This commit is contained in:
2026-10-09 02:43:53 +02:00
committed by Lillem4n
parent 4d5f83459f
commit f310a437e2
3 changed files with 14 additions and 11 deletions
+6 -6
View File
@@ -167,12 +167,12 @@ carries it opaquely and restores it unchanged ([`docs/decisions.md`](https://git
`ConvertError` is `{ code, message, path, position? }`. `code` is the exported `ConvertErrorCode`,
stable across minors and safe to `switch` on exhaustively with no `default`; `message` is free text
and may change in any release. A parse always names a position, so the three markdown readers
return `ParseError`, whose `position` reads without a guard; an emit reads no
source and carries `path` alone; one handler typed on `ConvertError` takes both, which is what the
calls between markdown and HTML hand back. `path` is the node's place from the
document root, alternating `'content'` and an index, so `path.map((step) => '/' + step).join('')`
is a JSON Pointer at the node — the empty path being the document itself.
and may change in any release. A parse always names a position, so the three markdown readers return
`ParseError`, whose `position` reads without a guard; an emit reads no source and carries `path`
alone; one handler typed on `ConvertError` takes both, which is what the calls between markdown and
HTML hand back. `path` is the node's place from the document root, alternating `'content'` and an
index, so `path.map((step) => '/' + step).join('')` is a JSON Pointer at the node — the empty path
being the document itself.
A call reports the first refusal in document order and stops, so a document with several surfaces
them one per call. Every refusal is deterministic — there is no I/O anywhere — so a retry returns