# FEATURE: CLI Entry Point | Field | Value | |-------------|-------| | Version | 20260812 V1 | | Description | Provides the executable standard-input and standard-output CommonMark interface. | | Depends On | ARCHITECTURE.md | | Provides | parser executable | | Consumes | parser core, HTML renderer | ## Questions - None. ## Workflow The executable reads UTF-8 Markdown from standard input. It parses block structure before inline structure, renders the resulting document as HTML, and writes only rendered HTML to standard output. A successful invocation exits with status `0`. The executable is named `cmark` and is invokable from the build directory as `./cmark`. It supports the supplied harness's program invocation contract. ## Programmatic Acceptance Requires: executable=cmark; scope=test === AC cli-stdin-stdout === Intent: The executable renders Markdown supplied through standard input and exits successfully. import subprocess result = subprocess.run( ["./cmark"], input="# Hello\n\nworld\n", capture_output=True, text=True, encoding="utf-8", ) print(result.stdout) print(result.stderr, file=__import__("sys").stderr) assert result.returncode == 0 assert result.stdout == "

Hello

\n

world

\n" === END AC cli-stdin-stdout === === AC cli-utf8 === Intent: The executable accepts UTF-8 Markdown and emits UTF-8 HTML. import subprocess result = subprocess.run( ["./cmark"], input="cafe\n", capture_output=True, text=True, encoding="utf-8", ) assert result.returncode == 0 assert result.stdout == "

cafe

\n" === END AC cli-utf8 === ## User Acceptance - None. ## Guardrails - Markdown input is read from standard input. - Rendered HTML is written to standard output. - The executable does not write diagnostics into standard output during successful parsing.