commonmark-conformance
Skill246 starsChanged 22 days agoMITView on GitHub
Grow Panache's CommonMark spec conformance under
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-lint-ruleSkill
- add-syntax-constructSkill
- external-toolsSkill
- html-conformanceSkill
- linter-investigationSkill
- math-parser-formatterSkill
- pandoc-ir-migrateSkill
- perf-investigationSkill
- smoke-test-triageSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Follow the CommonMark conformance and parser invariants in the repository's root AGENTS.md.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Panache's parser is shared across all flavors (Pandoc, Quarto,
RMarkdown, GFM, CommonMark, MultiMarkdown). Each flavor selects a
baseline set of extensions through Extensions::for_flavor(). Under
Flavor::CommonMark, almost every Pandoc-specific extension is
disabled, leaving only constructs that appear in the
CommonMark spec. Conformance is
tracked by running every spec.txt example through the parser and
comparing rendered HTML against the spec's expected HTML.
Follow the CommonMark conformance and parser invariants in the repository's
root AGENTS.md; the workflow below supplies the task-specific procedure.
Harness layout
| Path | Purpose |
crates/panache-parser/tests/fixtures/commonmark-spec/spec.txt | Vendored CommonMark spec. |
crates/panache-parser/tests/commonmark.rs | Test runner (commonmark_allowlist, commonmark_full_report). |
crates/panache-parser/tests/commonmark/spec_parser.rs | Parses spec.txt into example records. |
crates/panache-parser/tests/commonmark/html_renderer.rs | Test-only CST → HTML renderer (not a public API). |
crates/panache-parser/tests/commonmark/allowlist.txt | Example numbers currently passing. CI fails on regression. |
crates/panache-parser/tests/commonmark/blocked.txt | Examples we deliberately do not target yet, with reasons. |
The renderer mirrors the byte-equality comparison commonmark-hs uses:
the output is normalized via <li>\n → <li> and \n</li> →
</li> before comparison.
Reports
Running commonmark_full_report writes two generated, git-tracked
artifacts beside the harness (no longer under docs/):
crates/panache-parser/tests/commonmark/report.txt— per-section counts plus the full list of passing example numbers. Use this to grow the allowlist after fixing parser/renderer bugs.crates/panache-parser/tests/commonmark/report.json— the same data as a structured sidecar (spec_version,total_examples,passing,failing,blocked, per-sectionsections,passing_numbers).
Both are derived — regenerate them, don't hand-edit.
Workflow (summary)
# Regression guard: every allowlisted example must still pass.
cargo test -p panache-parser --test commonmark commonmark_allowlist
# Full report: regenerates report.txt + report.json.
cargo test -p panache-parser --test commonmark commonmark_full_report \
-- --ignored --nocaptureTo grow the allowlist: fix a parser or renderer bug (with a focused
regression test reproducing it), run commonmark_full_report, verify
the newly-passing numbers appear in report.txt, then add them to
allowlist.txt grouped under their section header. Run
commonmark_allowlist to confirm. If an example is intentionally not
targeted, add it to blocked.txt with a reason.
Why an HTML renderer?
The CommonMark spec defines conformance as markdown-input →
HTML-output byte-equality. Panache's primary output is formatted
markdown, not HTML, so the harness needs a renderer to bridge the
gap. The renderer in tests/commonmark/html_renderer.rs is test
code only — it is not part of the public crate surface, and it
covers only the constructs spec.txt exercises. If a public
--to html mode is wanted later, the renderer can graduate from
test-only to a real module; until then it intentionally stays narrow.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

