Repository navigation
Description
Problem Description
A Markdown document can hold a code span that nests backticks, such as `Read `x ``. CommonMark ends the span at the first matching backtick run, so part of the rule shows as code and part as literal backticks. No required check finds this. The review of #4544 found it in docs/roadmap/stage.md and in the proposal of #4495. That pull request fixes its own text, but other spans of the same form stay on `main`.
Reproduction Steps
- Render
docs/roadmap/stage.mdline 110 andopenspec/specs/roadmap-stage/spec.mdlines 3975, 3979 and 4214 withmarkdown-it-py(MarkdownIt().renderInline(line)). - Look at the
<code>elements.
Expected vs Actual Behavior
Expected: a check fails when a code span ends or starts with a space because a nested backtick cut it, as markdownlint rule MD038 (no-space-in-code) does.
Actual: the spans render as <code>I read </code> and <code>decision </code>, and the checks pass.
Environment Diagnostics
origin/main 5f75d25. The repository has no Markdown linter in .pre-commit-config.yaml or .github/workflows/. The devcontainer has the DavidAnson.vscode-markdownlint editor extension only (#723).
Logs, Traces, or Terminal Output
openspec/specs/roadmap-stage/spec.md:3979: <code>I read </code> (split span)
openspec/specs/roadmap-stage/spec.md:4214: <code>The probe line reads: The path </code> (split span)
docs/roadmap/stage.md:110: <code>decision outcome </code>
Existing tool: markdownlint-cli2 (rule MD038) or rumdl (same rule set) covers the need. Use one with only the rules that catch broken spans, and fix the spans that it reports.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Source: #4544
Alternatives check of 2026-11-28: covers.
Tool: rvben/rumdl (https://github.com/rvben/rumdl), NOASSERTION, last activity 2026-11-27, maintained.
Reason: Searches show rumdl implements markdownlint's MD038 no-space-in-code rule and lists it among its rules, which catches the edge-space code spans reported here; a split with no edge space remains undetected.
Covers:
- MD038 flags code spans with space beside opening or closing backticks
- Catches the split spans that leave trailing space in docs and specs
- Runs from a CLI over selected Markdown paths
Lacks:
- A split span with no edge space goes unreported
- The automatic fix trims space and cannot rejoin a split span
- No prose assertion for a deliberate trailing space
- Needs the separate integration item for pin, config and CI row
Proposed design
Problem statement
CommonMark ends a code span at the first backtick run that matches its opening run, so a span that nests a backtick run can split and leave a space at an edge. rumdl is already the project's Markdown linter, but .rumdl.toml selects only MD051 and MD057, and the docs row skips openspec/specs, so the spans in docs/roadmap/stage.md:181 and openspec/specs/roadmap-stage/trace-gate/spec.md:185, :189 and :193 pass every required check. This item enables MD038, extends the row to the living specification, proves the rule with a planted defect, rewrites the reported spans, and keeps the deliberate trailing space of a log prefix in the prose.
Acceptance criteria
Requirement: The rumdl configuration enables MD038
The .rumdl.toml rule selection SHALL enable MD038 with MD051 and MD057.
Scenario: A probe code span with a trailing space is reported
- WHEN A live check writes the line
`x `todocs/md038-probe.mdand runsuv run rumdl check --config .rumdl.toml docs/md038-probe.mdat the repository root. - THEN The command exits 1, prints a finding that names
MD038anddocs/md038-probe.md, and the check deletes the probe file.
Requirement: The docs row proves that MD038 fires
The check_rumdl_reports_each_defect case of tests/gate/rumdl_links.py SHALL plant a code span with a trailing space and SHALL assert that the reported rule codes are exactly MD038, MD051 and MD057.
Scenario: The planted defect reports the three enabled rules
- WHEN The live check
uv run python -c "import sys; from tests.gate.rumdl_links import main; sys.exit(main())"runs at the repository root. - THEN The command exits 0 and prints
rumdl-links: 2 cases, 0 failed.
Requirement: The rumdl scope holds the living specification
in_scope_documents of tests/gate/rumdl_links.py SHALL return the documents of the four inventory classes and the Markdown under openspec/specs/, and SHALL return no CHANGELOG.md and no path under openspec/changes/.
Scenario: The in-scope set holds the living spec and no change folder
- WHEN A case in
tests/invariants/test_rumdl_links.pyreadsin_scope_documents(REPO_ROOT). - THEN It equals the sorted union of the four class documents and the tracked paths under
openspec/specs/, and holds noCHANGELOG.mdand no path underopenspec/changes/.
Requirement: The living Markdown holds no code span with an unnecessary edge space
Each code span of the Markdown in the scope of the docs row MUST hold no unnecessary space next to its opening or its closing backticks.
Scenario: The docs row reports no MD038 finding
- WHEN The live check
uv run devops ci --check --only docsruns at the repository root. - THEN The command exits 0 and prints no
MD038finding.
Requirement: A deliberate trailing space of a log prefix moves into the prose
Each code span of docs/roadmap/stage.md that names a log prefix MUST hold the prefix with no edge space, and the sentence around it MUST state in words that the prefix ends with a space.
Scenario: The stage page holds no padded prefix span and names the trailing space
- WHEN A case in
tests/invariants/test_rumdl_links.pyparsesdocs/roadmap/stage.mdwithMarkdownIt().parseand reads eachcode_inlinetoken whose stripped content isdecisionordecision outcome, with the text token that follows it. - THEN The case finds at least one such token, each such token's content equals its stripped form, and the text token after it holds the words
ends with a space.
Requirement: The documents name MD038 and the living-spec scope
CONTRIBUTING.md, docs/SDLC.md and docs/TESTING.md MUST name MD038 where they name MD051 and MD057, and MUST name openspec/specs where they state the scope of the docs row.
Scenario: The three documents name the third rule and the living-spec scope
- WHEN A case in
tests/invariants/test_rumdl_links.pyreadsCONTRIBUTING.md,docs/SDLC.mdanddocs/TESTING.md. - THEN Each of the three files holds
MD038, and each holdsopenspec/specs.
Existing Tool Considered
The alternatives check in the issue body names rvben/rumdl (verdict covers, 2026-11-28), and the block of that check states what the tool lacks. The tool is already the project's Markdown linter: rumdl==0.3.8 is pinned at pyproject.toml:117, .rumdl.toml selects its rules, .pre-commit-config.yaml:81 runs the rumdl-check hook, and the docs row of devops ci runs tests/gate/rumdl_links.py (src/devops_cli/commands/ci.py:978). This item enables MD038 in that selection, extends the row to openspec/specs, plants the rule's defect in the row's self-check, and rewrites the spans that the rule reports. It builds no linter of its own.
Key questions
- The alternatives check found that
https://github.com/rvben/rumdlcovers this item. Adopt the tool, or keep the item and give the reason.: Adoptrvben/rumdland keep the item. The alternatives check records the verdictcovers, and the answers adopt the tool.AGENTS.mdrule 3 takes an open tool before code that the project keeps. The tool is already in the repository:rumdl==0.3.8is pinned atpyproject.toml:117,.rumdl.toml:2selects two rules, and thedocsrow runstests/gate/rumdl_links.pyatsrc/devops_cli/commands/ci.py:978. This item addsMD038to that selection, extends the row to the living specification, and fixes the spans that the rule reports. (best practice) [sources: AGENTS.md:9, pyproject.toml:117, .rumdl.toml:2, src/devops_cli/commands/ci.py:978]- Chosen: Adopt
rvben/rumdland keep the item. The check recordscovers, the answers adopt the tool,AGENTS.mdrule 3 prefers an open tool, and the tool is already installed and wired. - Rejected: Adopt
markdownlint-cli2instead. The repository already runsrumdlin the hook and thedocsrow, so a second linter adds a Node toolchain and a second configuration for the same rule. - Rejected: Keep the item with no tool. No required check reports the split spans, which is the problem of the issue.
- Chosen: Adopt
- Does this item still wait on feat(docs): check links and anchors of all documents with rumdl #4899?: No. feat(docs): check links and anchors of all documents with rumdl #4899 is archived at
openspec/changes/archive/2026-11-28-4899-rumdl-link-check/and its files are on the default branch: the pin atpyproject.toml:117,.rumdl.toml, therumdl-checkhook at.pre-commit-config.yaml:81and therumdl_linksentry of thedocsrow. The dependency is dropped. [sources: openspec/changes/archive/2026-11-28-4899-rumdl-link-check/proposal.md, .rumdl.toml, .pre-commit-config.yaml:81, src/devops_cli/commands/ci.py:974, CHANGELOG.md:10] - Which parts of the rumdl integration does this item deliver, and which parts are already in the repository?: The pin,
.rumdl.toml, therumdl-checkhook and thedocsrow are already in the repository through feat(docs): check links and anchors of all documents with rumdl #4899. This item addsMD038to theenablelist at.rumdl.toml:2, addsMD038to_EXPECTED_RULESand plants an edge-space code span incheck_rumdl_reports_each_defectattests/gate/rumdl_links.py:31, extendsin_scope_documentsattests/gate/rumdl_links.py:34toopenspec/specs, updates the contract case attests/invariants/test_rumdl_links.py:20, rewrites the reported spans, and namesMD038in the three documents that describe the check. It adds no row, no pin, no hook and no dependency. It changes no entry ofCONST_CI_CHECK_ROW_NAMESatsrc/devops_cli/config/constants.py:6137. (best practice) [sources: .rumdl.toml:2, tests/gate/rumdl_links.py:31, tests/gate/rumdl_links.py:34, tests/invariants/test_rumdl_links.py:20, src/devops_cli/config/constants.py:6137]- Chosen: Add the rule, the planted defect, the living-spec scope and the span fixes. The integration already exists, so this item changes the rule selection, the row's scope and its self-check, and the documents that the rule reports.
- Rejected: Repeat the pin, the hook and the row in this item. Those files and entries are already on the default branch; a second edit would duplicate them.
- Rejected: Add the rule with no scope extension. The
docsrow skipsopenspec/specs, so the split spans of the living spec would stay unchecked.
- Which Markdown does the
docsrow's rumdl check cover?: The documents of the four inventory classes (hand-written, prompt, generated, tool-generated) plus the Markdown underopenspec/specs/. It does not coveropenspec/changes/(classrecord, the in-repo record of one item) and does not coverCHANGELOG.md, which shares the classtool-ownedwith the living spec and which release-please writes. The change names theopenspec/specsglob rather than the whole class. A finding in a generated document is fixed in the text that generates it, becausedevops docs generateoverwrites the file. (best practice) [sources: tests/gate/rumdl_links.py:23, tests/gate/rumdl_links.py:34, src/devops_cli/config/constants.py:514, src/devops_cli/config/constants.py:519, CONTEXT.md:20]- Chosen: The four classes plus
openspec/specs. The living spec holds the reported spans, and the glob keepsCHANGELOG.mdand the change folders of other items out of the required row. - Rejected: The whole
tool-ownedclass. That class also holdsCHANGELOG.md, which release-please writes, so the row would depend on a file that this pull request does not edit. - Rejected: Every tracked Markdown file. The
recordclass holds the change folders of other items, whose spans this pull request does not edit, so the row could not pass.
- Chosen: The four classes plus
- How does the check restrict its paths: path arguments of
rumdl check, or an exclude in a config file?:in_scope_documentsattests/gate/rumdl_links.py:34builds the list, andrun_rumdl_checkattests/gate/rumdl_links.py:48passes those paths as arguments with--config .rumdl.toml. The project adds noexcludefor the scope to.rumdl.toml. The same config runs therumdl-checkhook over every staged Markdown file at.pre-commit-config.yaml:81, so a config exclude would also narrow the hook. (best practice) [sources: tests/gate/rumdl_links.py:34, tests/gate/rumdl_links.py:48, tests/gate/rumdl_links.py:55, .pre-commit-config.yaml:81]- Chosen: Path arguments of
rumdl check. The scope sits in the gate module, so a test asserts it offline, and the hook keeps its own file set. - Rejected: An
excludein.rumdl.toml. The same config serves therumdl-checkhook, so the exclude would also narrow the hook over staged files. - Rejected:
filesorexcludeof the pre-commit hook. Thedocsrow runs the gate module and not pre-commit, so the scope would sit in a config that the row does not read.
- Chosen: Path arguments of
- How is each reported span rewritten?: A span that a nested backtick run splits takes an opening and a closing backtick run longer than every run inside it. It takes one padding space inside a delimiter when the content starts or ends with a backtick: the MD038 rule doc (fetched 2026-11-29) states that the specification allows one leading and one trailing space and the parser trims them, so the padded form is not reported. A span whose content ends in an ordinary character needs no padding. A deliberate trailing space moves into the prose next to the span, as the text of
docs/roadmap/stage.md:181does for thedecisionprefix. The change uses no automatic fix, because the fix ofMD038trims an edge space and cannot rejoin a split span. (best practice) [sources: https://github.com/DavidAnson/markdownlint/blob/main/doc/md038.md, docs/roadmap/stage.md:181, openspec/specs/roadmap-stage/trace-gate/spec.md:189]- Chosen: A longer delimiter run, one padding space when the content starts or ends with a backtick, and a needed space in the prose. The longer run keeps the inner backtick literal, the padding keeps an edge backtick from joining the closing run, and the prose keeps a space that the text needs.
- Rejected: Trim the edge space.
MD038stops reporting, and the document loses the inner backtick or the deliberate space. - Rejected: A backslash escape. A backslash does not escape a backtick inside a code span.
- Rejected: An inline ignore comment. It keeps the broken form that the issue reports, where the span can be rewritten.
- Does
MD038report each code span that a nested backtick breaks?: No. The MD038 rule doc (fetched 2026-11-29) says that the rule triggers on a code span whose content has unnecessary space next to the beginning or ending backticks. A single leading and trailing space is allowed by the specification and trimmed by the parser, and single-space padding in the input is preserved even when it is unnecessary. So a padded longer-run span is not reported, a single deliberate trailing space is reported, and a break that leaves no edge space is not reported. This item claims the edge-space form only. [sources: https://github.com/DavidAnson/markdownlint/blob/main/doc/md038.md] - Which paths does the issue cite, and do they hold at this commit?: The line numbers of the issue are stale. The roadmap-stage capability is split into sub-folders, so
openspec/specs/roadmap-stage/spec.mddoes not exist. The split spans are atopenspec/specs/roadmap-stage/trace-gate/spec.md:185,:189and:193, and the two log-prefix spans are atdocs/roadmap/stage.md:181. The criteria therefore assert the result of thedocsrow and the text of the page, not a line number. [sources: docs/roadmap/stage.md:181, openspec/specs/roadmap-stage/trace-gate/spec.md:185, openspec/specs/roadmap-stage/trace-gate/spec.md:189, openspec/specs/roadmap-stage/trace-gate/spec.md:193] - How is each part proved: a probe live check, the
docsrow, a test of the row scope, or a test that parses the document?: The probe live check proves thatMD038is on. The planted-defect case oftests/gate/rumdl_links.pyproves that the rule fires inside the row, and thedocsrow live check proves the result over the in-scope Markdown. A case intests/invariants/test_rumdl_links.pyproves the scope offline by readingin_scope_documents, and the same file holds the case that parsesdocs/roadmap/stage.mdand the case that reads the three documents. The ci-gate-rows spec makes a check of committed files that starts a program a row, anddocs/TESTING.md:76states the same.docs/TESTING.md:99makestests/invariants/test_rumdl_links.pythe subject file for the rumdl check, so no new test module is added. ADR 0004 makes the gate required. (best practice) [sources: openspec/specs/ci-gate-rows/spec.md:8, docs/TESTING.md:76, docs/TESTING.md:99, docs/adr/0004-ci-is-the-authoritative-gate.md, tests/invariants/test_rumdl_links.py:20, tests/gate/rumdl_links.py:69]- Chosen: The probe for the config, the planted defect and the row for the result, and
tests/invariants/test_rumdl_links.pyfor the scope, the prose and the documents. The probe proves the config is on, the row is the check of committed files, and the invariant cases are offline: they read the gate module and the documents. - Rejected: A pytest test that runs rumdl on a temporary worktree. It starts rumdl on committed files from a pytest test, which the ci-gate-rows spec forbids.
- Rejected: A pytest test that reads
.rumdl.toml. A test asserts no value of a config file; the planted defect in the row proves the rule selection. - Rejected: A second CI row for the span check. The
docsrow already runs rumdl, so a second row repeats the same tool and config.
- Chosen: The probe for the config, the planted defect and the row for the result, and
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(docs)scope of the title gives the scope.Broken code spans in docs are a cosmetic rendering issue with no functional impact.Users see slightly malformed code spans in documentation; no functional or security impact.Adding one markdownlint rule to pre-commit or CI and fixing a few spans is a small change.Both concern code span content being broken, but #3504 fixes a sanitizer that deletes angle-bracket text while this adds a lint rule to detect spans split by nested backticks.dan-petty commentedon Nov 11, 2026
Scope from the design spec plan (2026-11-11)
The design spec tracker #4735 folds its Markdown item into this issue. The project uses one Markdown linter: rumdl. This issue adds it with the rules below and fixes what it reports.
Linter. rumdl 0.3.2 (MIT, released 2026-10-28; 0.3.3 of 2026-11-10 is less than 14 days old). It implements the markdownlint rule set. The rule pages of the rumdl docs at tag
v0.3.2show every rule that this scope needs: MD003, MD038, MD045, MD055, MD056, MD058 and MD060 (opt-in, withstyle = "compact"). They also show MD013 withreflow-mode = "sentence-per-line", which the one-sentence-per-line trial needs that the owner chose on 2026-11-11 (hooks review decision OD3). So the project does not add markdownlint-cli2. The trial uses the same linter and the same config file; it is not part of this scope.Scope.
rvben/rumdl-pre-commit) in pre-commit and in CI. ExcludeCHANGELOG.md(release-please writes it).style = "compact"..rumdl.toml. Move the rule settings of.devcontainer/devcontainer.json:59-63there, and replace theDavidAnson.vscode-markdownlintextension with the rumdl extension (rvben.rumdl), so the editor, pre-commit and CI read one config.src/devops_cli/docs/generator.pywrites| :--- |for text columns and| ---: |for number columns (1,596 generated rows in 52 files use|---|today; 152 hand-written rows use| :--- |),-for an empty value (in place of*None*), andYesfor a secret in place of the lock emoji (generator.py:602, 25 inENV_VARS.md).README.md,ARCHITECTURE.md,SECURITY.md,docs/SDLC.md,docs/ROUTINE_TASKS.mdand the issue forms, with "and" in place of "&" (about 80 Title Case headings).Check | Result | Link, incommands/pr.py:613-616andgithub/pr_evidence.py:61-66. "Pass" replaces the check-mark emoji in review Markdown.docs/DESIGN.mdfrom feat(design): add the design tokens and their build #4738 when it exists.Acceptance criteria added.
CHANGELOG.mdexcluded.grepfinds 0|---|rows and 0 lock emoji indocs/.Existing tool considered. rumdl (MIT, maintained, with a pre-commit hook repository and an editor extension). markdownlint-cli2 covers the same rules, but the project uses one linter, and rumdl also has the sentence-per-line reflow of the trial.
dan-petty commentedon Nov 14, 2026
Cannot build as low effort in one pull request: the repository has no Markdown linter in .pre-commit-config.yaml or the CI workflows, and the devcontainer holds only the VS Code markdownlint extension. A real check needs a tool choice (markdownlint-cli2 or rumdl), a pinned version and a Node/npm or single-binary install in the devcontainer image, the CI image and any runner Job image, plus a .markdownlint config and the fixes. That is a toolchain change, not a one-file docs fix. Split it: (1) add the pinned linter with only MD038 and fix the spans it reports, (2) wire it into the docs gate and the image builds.
devops-cli-service commentedon Nov 17, 2026
Alternatives check: covers
Reason: The searches found rumdl, a maintained Rust Markdown linter that implements the markdownlint rule set, including MD038 (no-space-in-code), which is exactly the check the issue asks for: it fails when a code span ends or starts with a space because a nested backtick cut it. The design-spec reply on the issue states the project adopts rumdl as its one Markdown linter for this scope, so no ADR is contradicted.
Tool: rvben/rumdl (https://github.com/rvben/rumdl)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 19, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 21, 2026
Answer to the alternatives question of this item and of #4899: adopt rumdl (
rvben/rumdl). Keep this item.LICENSE,Cargo.toml). Maintenance: v0.3.5 of 2026-11-18, and 10 releases since 2026-09-23..rumdl.toml, thervben/rumdl-pre-commithook and thedevops cistep. This item adds its rules to the sameenablelist. It adds no second step.Dependencies: #4899.
devops-cli-service commentedon Nov 23, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
2 remaining items
devops-cli-service commentedon Nov 24, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
feat(docs): enable rumdl MD038 checks for docs and specs (#4605)
devops-cli-service commentedon Nov 29, 2026
Released in v0.248.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.248.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 16:50 UTC