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-22: covers.
Tool: rvben/rumdl (https://github.com/rvben/rumdl), NOASSERTION, last activity 2026-11-21, maintained.
Reason: Searches and the tool facts confirm rumdl ships MD038, which reports code spans whose content starts or ends with a space, exactly the symptom a nested-backtick split leaves, so one pinned dev dependency and one CI row cover the need.
Covers:
- MD038 reports code spans with a leading or trailing space
- Rule selection enables only MD038, leaving other rules off
- Installs as a Python wheel, so uv pins and runs it
Lacks:
- Automatic fix trims edge spaces but cannot rejoin a split span
- A nested-backtick break with no edge space is not reported
- No option to allow a deliberate trailing space in a span
Proposed design
Problem statement
CommonMark ends a code span at the first backtick run that matches its opening run. A span that nests a backtick run then renders in two parts, and a part can start or end with a space. No required check reports these spans, so they stay on main in docs/roadmap/stage.md and in the living specs. This item enables the rumdl rule MD038 in the shared rule selection that #4899 adds, sets the markdown row of devops ci to the living Markdown, and rewrites each span that the rule reports. The rule reports only a break that leaves an edge space; a padded longer-run span is the rewrite that it accepts.
Acceptance criteria
Requirement: MD038 is enabled in the shared rumdl rule selection
The .rumdl.toml rule selection that #4899 adds SHALL enable the rule MD038.
Scenario: A probe code span with a trailing space is reported
- WHEN The live check writes the line
`x `todocs/md038-probe.mdand runsuv run rumdl check docs/md038-probe.mdat the repository root. - THEN The command exits 1 and prints a finding that names
MD038anddocs/md038-probe.md, and the check deletes the file.
Requirement: The markdown row checks the living Markdown only
The markdown row of devops ci SHALL run uv run rumdl check docs openspec/specs, SHALL hold no other command, and SHALL name no path under openspec/changes.
Scenario: The row spec holds the two living Markdown roots
- WHEN A pytest test in
tests/commands/readsget_check_spec("markdown").cmdand.also_cmds. - THEN The command is
uv run rumdl check docs openspec/specs,also_cmdsis empty, and no part of either namesopenspec/changes.
Requirement: The living Markdown holds no code span with an unnecessary edge space
Each code span of the Markdown under docs/ and openspec/specs/ MUST hold no unnecessary space next to its opening or its closing backticks.
Scenario: The markdown row reports no MD038 finding
- WHEN The live check
uv run devops ci --check --only markdownruns at the repository root on the archived tree. - THEN The command exits 0 and prints no
MD038finding.
Requirement: A deliberate edge space of a code span 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 the prose that the prefix ends with a space.
Scenario: The log-prefix spans hold no edge space and the prose names the space
- WHEN A pytest test in
tests/invariants/parsesdocs/roadmap/stage.mdwithMarkdownIt().parseand reads eachcode_inlinetoken with the text token that follows it. - THEN The test passes. No
code_inlinetoken content starts or ends with a space, and for eachcode_inlinetoken whose content isdecisionordecision outcome, the text token after it holds the wordspace.
Existing Tool Considered
rvben/rumdl (https://github.com/rvben/rumdl) is the open, maintained tool that covers the need. The alternatives check of 2026-11-22 in the issue body records the verdict covers, and the Lacks: list of its block states what the tool lacks; this item does those parts by hand. #4899 pins the tool and adds .rumdl.toml, the rvben/rumdl-pre-commit hook and the markdown row of devops ci; this item enables MD038, asserts the row scope and fixes the spans. The item builds no linter of its own.
Key questions
- The alternatives check found that https://github.com/rvben/rumdl covers this item. Adopt the tool, or keep the item and give the reason.: Adopt
rvben/rumdland keep the item. The replies inalternatives.answersadopt the tool for this item and for feat(docs): check links and anchors of all documents with rumdl #4899, and they name feat(docs): check links and anchors of all documents with rumdl #4899 as the dependency. The check of 2026-11-22 in the issue body records the verdictcoverswith the ruleMD038, and theLacks:list of itsblockstates what the tool lacks. AGENTS.md rule 3 and TL1 atdocs/SERVICE_PATTERNS.md:163take an open tool before code that the project keeps. The repository page of the tool (fetched 2026-11-25) shows a maintained project: 3,982 commits, 90 lint rules, markdownlint configuration compatibility, installable with pip, and the commandrumdl check [PATHS...]. This item enablesMD038in the rule selection that feat(docs): check links and anchors of all documents with rumdl #4899 adds, asserts the paths of themarkdownrow and rewrites each reported span by hand. (best practice) [sources: AGENTS.md, docs/SERVICE_PATTERNS.md:163, https://github.com/rvben/rumdl]- Chosen: Adopt rvben/rumdl and keep the item. The replies adopt the tool, the check records covers with MD038, and AGENTS.md rule 3 and TL1 take the open tool before code that the project keeps.
- Rejected: Adopt markdownlint-cli2 instead. The check compared it and named rvben/rumdl, and the replies adopt rvben/rumdl; a second Markdown linter adds a Node toolchain and a second config 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.
- Which parts of the rumdl integration does this item deliver, and which parts does feat(docs): check links and anchors of all documents with rumdl #4899 deliver?: feat(docs): check links and anchors of all documents with rumdl #4899 adds the pin,
.rumdl.toml, thervben/rumdl-pre-commithook and themarkdownrow ofdevops ci. This item addsMD038to theenablelist of that file and rewrites each span that the rule reports. It asserts that the row checksdocsandopenspec/specsonly, because a required row over the open change folders of other items could not pass. It adds no second row, config, hook or dependency. At this commitCHECK_ROW_NAMESatsrc/devops_cli/commands/ci.py:130names the 29 rows ofsrc/devops_cli/config/constants.py:5994and holds nomarkdownrow, so the row arrives with feat(docs): check links and anchors of all documents with rumdl #4899. (best practice) [sources: src/devops_cli/commands/ci.py:130, src/devops_cli/config/constants.py:5994, .pre-commit-config.yaml, pyproject.toml]- Chosen: Add only the rule, the row scope and the span fixes. feat(docs): check links and anchors of all documents with rumdl #4899 puts the integration in place, so this item extends the rule selection, asserts the row scope and fixes the spans.
- Rejected: Repeat the whole integration in this item. Two items would edit the same files with the same content, and the second pull request would conflict with the first.
- Rejected: Add the rule and the fixes with no dependency on feat(docs): check links and anchors of all documents with rumdl #4899. The tool arrives in feat(docs): check links and anchors of all documents with rumdl #4899, so the row and the probe command would wait on code that this item does not hold.
- Which Markdown does the
markdownrow check?: The row checks the tracked Markdown underdocs/andopenspec/specs/, and it passes no path underopenspec/changes/.CONTEXT.mdmakes a change folder the in-repo record of one item, written and archived by the pull request that delivers it, and it makesopenspec archivethe only writer of a living spec. The default branch holds the open change folders of other items, so a required row over them would report spans that this pull request does not edit and could not pass. The archive copies the fixed text into the living spec, and the row checks it there. (best practice) [sources: CONTEXT.md, docs/SDLC.md, openspec/specs/ci-gate-rows/spec.md]- Chosen: Check
docs/andopenspec/specs/only. A change folder is another item's record, so the required row can pass only on the living Markdown. - Rejected: Check every tracked Markdown file. MD038 would report the change folders of other items, which this pull request does not edit, so the row would never pass.
- Rejected: Fix the spans of the change folders in this pull request. A pull request writes and archives only its own change.
- Chosen: Check
- How does the
markdownrow restrict its paths: an argument ofrumdl check, or an exclude in a config file?: The row passesdocsandopenspec/specsas path arguments ofuv run rumdl check, soget_check_spec("markdown").cmdholds the scope and a pytest test asserts it offline. The project adds no exclude for the scope to.rumdl.tomland nofiles/excludefor it to.pre-commit-config.yaml. The row is the only consumer of the narrower file set, and a config exclude would also narrow the pre-commit hook and the editor extension. (best practice) [sources: openspec/specs/ci-gate-rows/spec.md, tests/commands/test_ci_row_commands.py, src/devops_cli/commands/ci.py:130]- Chosen: Path arguments of
rumdl checkin the row command. The scope sits in the row spec, so a pytest test asserts it offline, and the row is the only consumer of the narrower file set. - Rejected: An
excludein.rumdl.toml. The exclude would also narrow the pre-commit hook and the editor extension, and no test asserts the row scope from it. - Rejected:
files/excludeof the pre-commit hook. The row would have to run pre-commit over all files, and the scope would sit in a config that no test reads.
- 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 each run inside it, with one padding space inside each delimiter when the content starts or ends with a backtick. The MD038 rule doc (fetched 2026-11-25) states that the specification allows one leading and one trailing space and the parser trims them, so the padded form is not reported. A deliberate trailing space moves into the prose next to the span. The change uses no automatic fix, because the fix of MD038 trims 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]
- Chosen: A longer run with one padding space, 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. MD038 stops 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-25) states that the rule is triggered for code spans containing content with unnecessary space next to the beginning or ending backticks. Its note allows a single leading and trailing space together because the specification trims them to support a code span that begins or ends with a backtick, and single-space padding 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. TheLacks:list of the alternativesblockin the issue body records the same limit. [sources: https://github.com/DavidAnson/markdownlint/blob/main/doc/md038.md, https://github.com/rvben/rumdl] - How is each part proved: a row of
devops ci, a pytest test of the row spec, or a pytest test that parses the document?: Themarkdownrow ofdevops ciproves the rule and its file scope, because the ci-gate-rows spec makes a check of committed files that starts a program a row and not a pytest test, and ADR 0004 makes the static analysis check required. A pytest test intests/commands/proves the scope of the row by readingget_check_spec("markdown").cmd, the pattern thattests/commands/test_ci_row_commands.pyuses for thehadolintrow. A pytest test intests/invariants/proves the prose statement of the deliberate space, because no row reads the meaning of a sentence;tests/invariants/test_roadmap_workflow_doc.py:16already parses a Markdown document withmarkdown-it-pyand reads itscode_inlinetokens. (best practice) [sources: openspec/specs/ci-gate-rows/spec.md, docs/adr/0004-ci-is-the-authoritative-gate.md, tests/commands/test_ci_row_commands.py, tests/invariants/test_roadmap_workflow_doc.py:16, .github/workflows/ci.yml]- Chosen: The row for the rule, a
cmdtest for the scope, and a document test for the prose. The row is the check of committed files, and the two tests are offline: one reads the row spec, the other parses the document. - Rejected: A pytest test that runs the row 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, and the row is the check of committed files. - Rejected: A second CI row for the span check. The markdown row already runs rumdl, so a second row repeats the same tool and config.
- Chosen: The row for the rule, a
- Does the path that the issue cites hold at this commit?: No. The roadmap-stage capability is split into sub-folders, and
docs/roadmap/stage.mdlinksopenspec/specs/roadmap-stage/selection/spec.mdat lines 30 and 244. The cited fileopenspec/specs/roadmap-stage/spec.mdand its lines 3975, 3979 and 4214 do not hold. The issue citesdocs/roadmap/stage.mdline 110, but the two log-prefix spans are at line 177 at this commit. A split span remains atopenspec/specs/roadmap-stage/trace-gate/spec.md:193, where the sentencethe feasibility section saysThe probe line reads: The pathsrc/x.pyis a file of the staging commit.`` ends the span at the inner backtick. The criteria therefore assert the result of themarkdownrow and the text of `docs/roadmap/stage.md`, not a line number. The row reports each remaining span under `docs/` and `openspec/specs/`, and the pull request rewrites what it reports. [sources: docs/roadmap/stage.md:30, docs/roadmap/stage.md:177, openspec/specs/roadmap-stage/selection/spec.md, openspec/specs/roadmap-stage/trace-gate/spec.md:193]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Watched files
A commit on the default branch that changes one of these files starts the next refine round.
.pre-commit-config.yamlpyproject.tomlsrc/devops_cli/commands/ci.py
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.
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 in the section Proposed design of the body.
dan-petty commentedon Nov 24, 2026
Adopt the tool: rvben/rumdl. AGENTS.md rule 3 requires using an open tool before building.
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.