{
  "version": 1,
  "import": {
    "root": "/mnt/c/Users/barlo/projects/drydock/uat/CommonMark/runs/20260812.171514/sources",
    "format": "markdown"
  },
  "sources": {
    "INSTRUCTIONS.md": {
      "state": "current",
      "versions": [
        {
          "commit": null,
          "date": "2026-08-12",
          "hash": "a385f7d3cfd485e07a4030a3c54625881eb08906997de5d9db01e760d5461a53",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "parser-interface",
              "text": "Read Markdown from standard input and write HTML to standard output.",
              "stories": [
                "cli-entrypoint",
                "render-blocks",
                "render-inline",
                "render-normalization"
              ]
            },
            {
              "name": "parser-architecture",
              "text": "CommonMark parsing is two phases: resolve **block structure** first, then run **inline parsing** over the block contents. Implement in that order.",
              "stories": [
                "architecture"
              ]
            },
            {
              "name": "parse-blocks",
              "text": "1. Blocks: paragraphs, thematic breaks, ATX headings, setext headings, indented code, fenced code, HTML blocks, link reference definitions, block quotes, then lists \u2014 lists are the hardest block construct, with lazy continuation, nesting, and tightness.",
              "stories": [
                "block-leaf",
                "block-quotes",
                "block-lists"
              ]
            },
            {
              "name": "parse-inlines",
              "text": "2. Inlines: backslash escapes, entity and numeric references, code spans, emphasis and strong emphasis (the delimiter-run algorithm), links and images, autolinks, raw HTML, hard breaks.",
              "stories": [
                "inline-escapes",
                "inline-code-breaks",
                "inline-emphasis",
                "inline-links",
                "inline-html"
              ]
            },
            {
              "name": "conformance-assets",
              "text": "The runtime conformance assets are only `spec.txt`, `spec_tests.py`, `cmark.py`, and `normalize.py`.",
              "stories": [
                "conformance-assets"
              ]
            },
            {
              "name": "full-conformance",
              "text": "The sole definition of product success is `sh full_test.sh` returning exit code `0`.",
              "stories": [
                "conformance-full"
              ]
            },
            {
              "name": "parser-documentation",
              "text": "Deliver a concise project `README.md` documenting the standard-input/standard-output interface and the `sh full_test.sh` command.",
              "stories": [
                "cli-documentation"
              ]
            }
          ]
        }
      ]
    },
    "cmark.py": {
      "state": "current",
      "versions": [
        {
          "commit": null,
          "date": "2026-08-12",
          "hash": "c5fb45e7c64fd7670b2a3c49a151e46f4af9d0ad3004bedb37ecf9cdc34d2f00",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "pipe-through-program",
              "text": "def pipe_through_prog(prog, text):\n    p1 = Popen(prog.split(), stdout=PIPE, stdin=PIPE, stderr=PIPE)\n    [result, err] = p1.communicate(input=text.encode('utf-8'))\n    return [p1.returncode, result, err]",
              "stories": [
                "cli-entrypoint",
                "cli-errors"
              ]
            },
            {
              "name": "load-platform-library",
              "text": "if sysname == 'Darwin':\n                libname = \"libcmark.dylib\"\n            elif sysname == 'Windows':\n                libname = \"cmark.dll\"\n            else:\n                libname = \"libcmark.so\"\n            if library_dir:\n                libpath = os.path.join(library_dir, libname)\n            else:\n                libpath = os.path.join(\"build\", \"src\", libname)\n            cmark = CDLL(libpath)",
              "stories": [
                "architecture"
              ]
            },
            {
              "name": "convert-markdown-to-html",
              "text": "markdown = cmark.cmark_markdown_to_html\n            markdown.restype = c_char_p\n            markdown.argtypes = [c_char_p, c_long, c_int]\n            self.to_html = lambda x: use_library(markdown, x)",
              "stories": [
                "render-blocks",
                "render-inline",
                "render-normalization"
              ]
            }
          ]
        }
      ]
    },
    "normalize.py": {
      "state": "current",
      "versions": [
        {
          "commit": null,
          "date": "2026-08-12",
          "hash": "94a9dd253907e3dab7c02fc11e934f06112dcf0f3804255d09d732c8c7c4b5f4",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "collapse-inner-whitespace",
              "text": "Multiple inner whitespaces are collapsed to a single space (except\nin pre tags):",
              "stories": [
                "render-normalization"
              ]
            },
            {
              "name": "remove-block-whitespace",
              "text": "Whitespace surrounding block-level tags is removed.",
              "stories": [
                "render-normalization"
              ]
            },
            {
              "name": "normalize-self-closing-tags",
              "text": "Self-closing tags are converted to open tags.",
              "stories": [
                "render-normalization"
              ]
            },
            {
              "name": "normalize-attributes",
              "text": "Attributes are sorted and lowercased.",
              "stories": [
                "render-normalization"
              ]
            },
            {
              "name": "normalize-references",
              "text": "References are converted to unicode, except that '<', '>', '&', and\n      '\"' are rendered using entities.",
              "stories": [
                "inline-escapes",
                "render-normalization"
              ]
            }
          ]
        }
      ]
    },
    "spec.txt": {
      "state": "current",
      "versions": [
        {
          "commit": null,
          "date": "2026-08-12",
          "hash": "43fad3e0ac5190a3b0bc6a41f7b1a853201a26ec2e6b74871f5d96239a8c34cf",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "conformance-testing",
              "text": "These are intended to double as conformance tests.",
              "stories": [
                "cli-entrypoint",
                "cli-documentation",
                "conformance-assets",
                "conformance-full"
              ]
            },
            {
              "name": "parser-phases",
              "text": "Parsing has two phases:",
              "stories": [
                "architecture"
              ]
            },
            {
              "name": "leaf-blocks",
              "text": "This section describes the different kinds of leaf block that make up a Markdown document.",
              "stories": [
                "block-leaf"
              ]
            },
            {
              "name": "block-quotes",
              "text": "The following rules define [block quotes]:",
              "stories": [
                "block-quotes"
              ]
            },
            {
              "name": "list-structure",
              "text": "A [list](@) is a sequence of one or more\nlist items [of the same type].",
              "stories": [
                "block-lists"
              ]
            },
            {
              "name": "escapes-references",
              "text": "Any ASCII punctuation character may be backslash-escaped:",
              "stories": [
                "inline-escapes"
              ]
            },
            {
              "name": "code-spans-breaks",
              "text": "A [code span](@) begins with a backtick string and ends with\na backtick string of equal length.",
              "stories": [
                "inline-code-breaks"
              ]
            },
            {
              "name": "emphasis-rules",
              "text": "The following rules define emphasis and strong emphasis:",
              "stories": [
                "inline-emphasis"
              ]
            },
            {
              "name": "links-images",
              "text": "There are two basic kinds of links in Markdown.",
              "stories": [
                "inline-links"
              ]
            },
            {
              "name": "html-autolinks",
              "text": "Text between `<` and `>` that looks like an HTML tag is parsed as\na raw HTML tag and will be rendered in HTML without escaping.",
              "stories": [
                "inline-html"
              ]
            },
            {
              "name": "block-rendering",
              "text": "HTML is capable of representing the structural distinctions we need to make, and the\nchoice of HTML for the tests makes it possible to run the tests against an\nimplementation without writing an abstract syntax tree renderer.",
              "stories": [
                "render-blocks"
              ]
            },
            {
              "name": "inline-rendering",
              "text": "Note that not every feature of the HTML samples is mandated by\nthe spec.",
              "stories": [
                "render-inline"
              ]
            },
            {
              "name": "output-normalization",
              "text": "For example, the spec says what counts as a link destination, but it doesn't mandate that non-ASCII characters in the URL be percent-encoded.",
              "stories": [
                "render-normalization"
              ]
            }
          ]
        }
      ]
    },
    "spec_tests.py": {
      "state": "current",
      "versions": [
        {
          "commit": null,
          "date": "2026-08-12",
          "hash": "9db1ea4a3ee79c5ec74eebc09c5985eb252427e8d9d19ef45e5cc3f2ae410855",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "configure-test-runner",
              "text": "The program accepts options for the program, specification path, section pattern, library directory, normalization, test dumping, normalization debugging, test number, and result tracking.",
              "stories": [
                "cli-entrypoint"
              ]
            },
            {
              "name": "compare-parser-output",
              "text": "Run cmark tests.",
              "stories": [
                "conformance-full"
              ]
            },
            {
              "name": "report-parser-errors",
              "text": "exit(result_counts['fail'] + result_counts['error'])",
              "stories": [
                "cli-errors"
              ]
            },
            {
              "name": "parse-conformance-spec",
              "text": "def get_tests(specfile):",
              "stories": [
                "conformance-assets"
              ]
            },
            {
              "name": "normalize-html-output",
              "text": "actual_html = normalize_html(actual_html) + '\\n'",
              "stories": [
                "render-normalization"
              ]
            }
          ]
        }
      ]
    }
  }
}
