Run artifact

workspace/targets/commonmark/ANALYSIS.md

Blueprint Analysis: CommonMark

Commander Expectations

Crew

CrewCharge
CommanderDefines intent and decides what done means.
Team LeadConfirms epic completeness and stakeholder expectations.
Planning CrewAuthors atomic specifications and the ordered Manifest.
Shipyard CrewBuilds the tickets without synchronous Commander access.

Story List

Feature: Block Parsing

IDStoryHigh-level AC
BLOCKS-001Parse thematic breaksThematic break examples render as <hr />; non-matching lines remain paragraphs or other applicable blocks.
BLOCKS-002Parse ATX headingsATX heading examples render with the correct heading level and inline content.
BLOCKS-003Parse setext headingsSetext examples render with the correct heading level and inline content.
BLOCKS-004Parse indented code blocksIndented code examples preserve literal content and required indentation behavior.
BLOCKS-005Parse fenced code blocksFenced code examples preserve literal content, fence behavior, and language class rendering.
BLOCKS-006Parse HTML blocksHTML block examples preserve raw HTML and end blocks according to their applicable conditions.
BLOCKS-007Parse link reference definitionsDefinitions are collected and resolved across the document, with the first matching definition taking precedence.
BLOCKS-008Parse paragraphs and blank linesParagraph examples preserve inline source content and treat blank lines as block separators.

Feature: Container and List Parsing

IDStoryHigh-level AC
CONTAINERS-001Parse block quotesBlock quote examples render nested blocks, including valid lazy continuation behavior.
CONTAINERS-002Parse list items and listsList examples render marker types, nesting, continuation, empty items, and tight or loose paragraph treatment.

Feature: Inline Parsing

IDStoryHigh-level AC
INLINES-001Parse code spansCode span examples match backtick delimiters and normalize content as specified.
INLINES-002Parse emphasis and strong emphasisEmphasis examples follow delimiter-run rules, nesting, and precedence.
INLINES-003Parse linksInline and reference link examples resolve destinations, titles, labels, and link precedence.
INLINES-004Parse imagesInline and reference image examples render destinations, titles, and plain-text alt content.
INLINES-005Parse autolinksURI and email autolink examples render links only for valid forms.
INLINES-006Parse raw HTML and hard line breaksInline HTML examples remain raw, and hard line break examples render <br /> where required.
INLINES-007Parse escapes, references, and soft line breaksEscape, entity, numeric reference, and soft line break examples follow their specified text rules.

Feature: Executable and Conformance

IDStoryHigh-level AC
DELIVERY-001Provide the standard-stream executableAn executable ./commonmark reads UTF-8 Markdown from stdin and writes HTML to stdout.
VERIFICATION-001Pass the complete conformance suiteAfter all parser implementation stories, the supplied unfiltered suite passes with exit code zero.

Story Guidance

Named stories planning must produce. Authoritative record: STORY_GUIDANCE.json.

None.

Surfaced Acceptance Criteria

None.

Source Inventory

PathContent kindDispositionReason
sources/INSTRUCTIONS.mdmarkdownanalyzedreadable UTF-8
sources/cmark.pycodeanalyzedreadable UTF-8
sources/full_test.shcodeanalyzedreadable UTF-8
sources/normalize.pycodeanalyzedreadable UTF-8
sources/spec.txttextchunkedsplit into 18 bounded chunks
sources/spec_tests.pycodeanalyzedreadable UTF-8

Relationship Model

Source or groupRelationship typeRelated source or groupEvidenceDelivery implication
sources/INSTRUCTIONS.mdinstruction-to-testsources/full_test.sh, sources/spec_tests.pyRequires a root executable, scoped story checks, and one terminal full-suite verification story.Build the executable and keep scoped implementation checks separate from the single complete-suite gate.
sources/spec.txtreference-to-replacementsources/cmark.pyNormative CommonMark 0.31.2 behavior and examples; cmark.py can call a program or library.Implement the specified parser behavior; do not use a public Markdown implementation.
sources/spec_tests.pytest-kit-to-implementationsources/commonmarkLoads examples from spec.txt, invokes the supplied program, and compares normalized HTML.Use section selectors for implementation story checks and the unfiltered suite only in terminal verification.
sources/full_test.shdependencysources/spec_tests.py, sources/cmark.py, sources/normalize.py, sources/spec.txtStages and invokes the runner and its sibling imports and specification corpus.Stage all named runtime assets verbatim; the root executable must be runnable by the harness.
sources/normalize.pyparser-to-normalizersources/spec_tests.pyNormalizes HTML output before comparisons.Treat normalization as supplied test support, not parser behavior or an independently authored story.

Source Roles

PathRolePlan dispositionBuild disposition
sources/INSTRUCTIONS.mdauthor intentcontextprompt-only
sources/cmark.pyreference implementationcontextstage
sources/full_test.shconformance harnesscontextstage
sources/normalize.pytest helpercontextstage
sources/spec.txtnormative specification and conformance test suitecontextstage
sources/spec_tests.pyconformance harnesscontextstage

Planning Instructions

Delivery Shape

Build a command-line CommonMark 0.31.2 parser. Its input is UTF-8 Markdown on standard input; its output is HTML on standard output. The required flow is: consume input, parse block structure, resolve link reference definitions, parse inline content, render HTML, and write the result. The supplied runner invokes the root ./commonmark executable against the complete specification corpus.

Story Realization Map

Story IDBlueprint scope and evidenceRelated filesDelivery implication
BLOCKS-001Thematic breaks, sources/spec.txtsources/spec_tests.pyImplement and scope checks to the Thematic breaks section.
BLOCKS-002ATX headings, sources/spec.txtsources/spec_tests.pyImplement and scope checks to ATX headings.
BLOCKS-003Setext headings, sources/spec.txtsources/spec_tests.pyImplement and scope checks to Setext headings.
BLOCKS-004Indented code blocks, sources/spec.txtsources/spec_tests.pyImplement and scope checks to Indented code blocks.
BLOCKS-005Fenced code blocks, sources/spec.txtsources/spec_tests.pyImplement and scope checks to Fenced code blocks.
BLOCKS-006HTML blocks, sources/spec.txtsources/spec_tests.pyImplement and scope checks to HTML blocks.
BLOCKS-007Link reference definitions, sources/spec.txtsources/spec_tests.pyImplement document-wide definition collection and scope checks to Link reference definitions.
BLOCKS-008Paragraphs and Blank lines, sources/spec.txtsources/spec_tests.pyImplement paragraph formation and scope checks to both example-owning sections.
CONTAINERS-001Block quotes, sources/spec.txtsources/spec_tests.pyImplement quote containers and lazy continuation; scope checks to Block quotes.
CONTAINERS-002List items and Lists, sources/spec.txtsources/spec_tests.pyImplement list parsing and tightness; scope checks to both example-owning sections.
INLINES-001Code spans, sources/spec.txtsources/spec_tests.pyImplement code span parsing and scope checks to Code spans.
INLINES-002Emphasis and strong emphasis, sources/spec.txtsources/spec_tests.pyImplement delimiter-run parsing and scope checks to Emphasis and strong emphasis.
INLINES-003Links, sources/spec.txtsources/spec_tests.pyImplement inline and reference links; scope checks to Links.
INLINES-004Images, sources/spec.txtsources/spec_tests.pyImplement inline and reference images; scope checks to Images.
INLINES-005Autolinks, sources/spec.txtsources/spec_tests.pyImplement URI and email autolinks; scope checks to Autolinks.
INLINES-006Raw HTML and Hard line breaks, sources/spec.txtsources/spec_tests.pyImplement inline HTML and hard breaks; scope checks to both example-owning sections.
INLINES-007Backslash escapes, Entity and numeric character references, Soft line breaks, Textual content, sources/spec.txtsources/spec_tests.pyImplement text-level inline rules; scope checks to each listed example-owning section.
DELIVERY-001Root executable interface, sources/INSTRUCTIONS.md, sources/full_test.sh./commonmarkProvide the required runnable stdin-to-stdout executable before conformance verification.
VERIFICATION-001Complete supplied suite, sources/INSTRUCTIONS.md, sources/full_test.shAll implementation stories; staged sources/full_test.sh and its dependenciesTerminal story depends on every parser implementation story and is the sole Suite: full acceptance check.

Test and Acceptance Strategy

Implementation stories run spec_tests.py with explicit selectors for their complete example-owning section scopes. Do not select chapter headings that own no examples, and do not invoke full_test.sh from scoped checks. The terminal verification story depends on all parser implementation stories, runs sh sources/full_test.sh, prints captured stdout and stderr, and asserts only that the result return code is zero. It carries Sea Trial st-001 and is the only full-suite acceptance check.

Sequencing and Dependencies

Build the root executable before scoped conformance checks. Implement block structure before inline parsing; collect link reference definitions during block parsing so inline links can resolve after document parsing. Implement containers and lists with block parsing. Stage the supplied harness, runner, normalizer, and specification corpus before verification. The terminal verification story follows all parser implementation stories.

Source Conflicts and Gaps

No conflicting behavior definitions or unresolved product decisions appear in the supplied sources. The unattended UAT policy prohibits emitting questionnaires or blockers; project identity is derived as CommonMark, a command-line parser that converts Markdown input to HTML.

Analysis Notes

generated: 2026-10-27 blueprint: /mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20261027.211306/workspace/targets/commonmark/blueprint

Quality: Ready blockers: 0 questions: 0 features: 4 stories: 19 stack: Python command-line executable display_name: CommonMark short_description: A command-line parser that converts CommonMark Markdown from standard input to HTML on standard output.

No ambiguous project type signals. Project type: cli. All runtime test dependencies named by the harness are staged. Identity is derived from source intent under unattended UAT policy.