lite md2mkd — GitHub Markdown normalized to StrictMarkThe payoff ticket: a verb that takes any GitHub-flavored .md and writes the same document as StrictMark — 4-char quads, ATX headers, - bullets, one-symbol ref-def labels, single-char emphasis. Parsing is LITE-030's vendored commonmark.js plus LITE-031's GFM extensions; this ticket is the EMITTER that walks the AST and the CLI verb around it. Source bytes are never rewritten by regex: everything is emitted from the tree.
The two CLI forms are gritzko's, verbatim (2026-08-14): lite md2mkd abc.md abc.mkd and lite md2mkd abc. StrictMark's own StrictMark page is the spec for the output; its CommonMark compatibility section is the list of deliberate divergences and therefore the exception list for the verifier.
*/+ bullets → -; 1) → 1.; ***/___/--- → ----; > → > ; indented code → a 4-backtick fence; a 3-backtick/tilde fence → 4 backticks, body one quad deeper; every child block one quad (4 spaces) deeper.**x**/__x__ → *x*; an emphasis node → _x_; ~~x~~ → ~x~ (HTML-identical under GFM, where one tilde already strikes); code spans stay verbatim.[text][k] + ref def: left bare they render as links on GitHub and as plain text under StrictMark.[A-Z][a-z][a-z0-9]: + gap becomes a META PAIR under StrictMark, so it must be written Note\:.-[v], unchecked → -[ ]. GFM's [x] NEVER maps to -[x], which means wontfix.lite md2mkd converts a real-world README to StrictMark that a StrictMark parser reads as the same document, and that cmark-gfm renders to the same HTML as the input, bar the declared exceptions.
lite md2mkd <in.md> <out.mkd> — explicit in and out.lite md2mkd <stem> — reads <stem>.md, writes <stem>.mkd; a .md suffix on the single argument is accepted and stripped, so md2mkd abc.md writes abc.mkd.cmark-gfm the input, cmark-gfm the output, diff the HTML. Exceptions are exactly two — the todo quad (GitHub shows -[v] as plain text) and any lifted table. Anything else that diffs is a bug.#####/######, hard line breaks, code spans containing backticks, emphasis nested against StrictMark precedence (an emphasis inside a strong), more than 35 distinct link labels (1..9, a..z), more than 999 list entries.main.js wrapper over an index/md2mkd.js body (see merge/install, LITE-014); the emitter itself is lite/mark/strict.js.errors in plain words).test/md2mkd/run.sh under dash, fixtures under $HOME/tmp, $LITEJAB picks the runtime.1..9 then a..z; overflow is a lint, not a silent second symbol.![table][T]) or keep the GFM table verbatim and accept that StrictMark reads it as paragraph lines. gritzko's call; until then, lint and pass the table through verbatim.*strong* (no double symbols) is read as EMPHASIS by CommonMark, so every bold in a converted README renders italic on GitHub, and a second conversion pass degrades it to _x_.Staged in work/LITE-032, 7 files, nothing posted. Orchestrator verification, run independently of the worker's harness:
~/src/commonmark.js/README.md (359 lines in, 370 out): md2mkd abc.md abc.mkd and md2mkd abc, rc 0, with the label lint firing in plain words — 2 links past the 35th need a two-symbol label.test/md2mkd/run.sh PASS at 76 checks; LITE-030's test/mark/run.sh still PASS at 66.cmark-gfm HTML diff on that README is 313 lines, and every one is accounted for by the two divergences above plus the declared table exception — nothing unexplained.lite/README.mkd) is byte-idempotent on a second pass; its only HTML diff is the fence-indent divergence, on the one block that was indented code rather than a fence.LITE-032: lite md2mkd, GitHub Markdown to StrictMark