Repository navigation
Description
Problem or Motivation
The custom _broken_links helper (tests/invariants/test_agents_md.py) checks links in about 10 documents. The other hand-written, prompt, skill and knowledge base documents have no link check. Today 624 relative links and 61 anchors have 0 defects, so a check can start green. Child 21 of #4771 and #4605 already choose rumdl.
Proposed Solution & Architectural Design
- Pin rumdl as a dev dependency, at a release at least 14 days old (0.3.3 is current).
- Enable only MD051 and MD057 in
[global] enable. - Add a commit-stage pre-commit hook on staged
*.mdfiles. - Add a
devops cidocs row step over the hand-written, prompt and generated classes, the skills and the knowledge base. - A planted-defect test shows that rumdl finds a dead relative link, a missing cross-file fragment and a missing same-file anchor.
- Then delete
_broken_linksand its tests.
Share the pin and config with child 21 of #4771 and #4605. Update CONTRIBUTING.md and docs/TESTING.md.
Target Subsystem
SDLC, Git & PR Governance (devops ci docs row, pre-commit, tests/invariants/).
Existing Tool Considered
rumdl (MIT, PyPI). A 2-file probe of rumdl 0.3.3 found a missing cross-file fragment (MD051), a dead relative link (MD057) and a missing same-file anchor in 124 ms. Its config key is [global] enable. Fallback: remark-validate-links, if rumdl misses a defect that _broken_links finds. Nothing is built apart from the test.
Acceptance Criteria
- The planted-defect test fails on each of the 3 defects.
_broken_linksis gone.rumdl checkover the scope gives 0 findings onmain.- The hook takes under 1 s on a commit of 10 staged files.
- The docs row stays under 45 s on the runner.
Dependencies
None. Share the rumdl pin with child 21 of #4771 and #4605; the first to merge adds it.
Source: #4880
Alternatives check of 2026-11-21: in-use.
The item already names this tool.
Tool: rvben/rumdl (https://github.com/rvben/rumdl), NOASSERTION, last activity 2026-11-20, maintained.
Reason: The documentation confirms MD051 checks same-document and cross-file fragments, while MD057 reports missing link targets; the issue already adopts rumdl, so it covers the link-and-anchor need.
Covers:
- MD051 validates same-file and cross-file heading fragments
- MD057 reports dead relative link targets
- Official pre-commit hook runs checks on staged Markdown
Lacks:
- External URL reachability is not checked
- Commit hook sees only staged files for cross-file fragments
- CI row, planted-defect check and helper removal remain project work
Proposed design
Problem statement
The custom _broken_links helper in tests/invariants/test_agents_md.py checks about 10 documents. The other hand-written, prompt, generated, skill and knowledge-base Markdown has no link or anchor check. This change replaces the helper with rumdl's MD051 and MD057 rules, adds the official rumdl-pre-commit hook at the commit stage and a rumdl_links gate step to the devops ci docs row, and deletes the helper and its tests once the new check is green.
Acceptance criteria
Requirement: Rumdl is a pinned development dependency
The dev dependency group SHALL pin rumdl==0.3.5, and the rumdl-check hook SHALL use release 0.3.5.
Scenario: The pinned rumdl runs from the checkout
- WHEN
uv run rumdl --versionruns in the development environment - THEN it exits 0 and prints
0.3.5.
Requirement: Only the link and anchor rules run
The root .rumdl.toml SHALL enable MD051 and MD057 and no other rule.
Scenario: A style defect reports no finding
- WHEN
uv run rumdl checkruns on a temporary directory that holds a copy of the root.rumdl.toml, a dead relative link, a missing cross-file fragment, a missing same-file anchor and a line longer than the limit - THEN the command exits non-zero and its output names MD051 and MD057 and no other rule.
Requirement: The commit hook rejects a dead relative link
The commit-stage rumdl-check hook SHALL reject a staged Markdown file that holds a dead relative link.
Scenario: The hook names MD057
- WHEN
uv run pre-commit run rumdl-check --files <temp file>runs on a temporary Markdown file that holds a dead relative link, afteruv run pre-commit install-hooks - THEN the hook exits non-zero and its output names MD057 for that file.
Requirement: The docs row runs the rumdl gate check over the four classes
The docs row of devops ci SHALL run the rumdl_links gate check, and that check SHALL run rumdl check over the hand-written, prompt, generated and tool-generated documents.
Scenario: The row names the rumdl gate check and its four classes
- WHEN
uv run pytest tests/invariants/test_rumdl_links.py -k docs_row_runs_rumdlruns - THEN the test passes only when the
docsrow'salso_cmdsholds_python_check_cmd("rumdl_links")andtests.gate.rumdl_links.in_scope_documents(REPO_ROOT)returns the documents of the hand-written, prompt, generated and tool-generated classes.
Requirement: The docs row rejects a dead link in scope
The docs row SHALL fail when an in-scope Markdown document holds a dead relative link.
Scenario: The docs row names MD057
- WHEN
uv run devops ci --check --only docsruns with a dead relative link in an in-scope document - THEN the row exits non-zero and its output names MD057 for that document.
Requirement: The in-scope documents are clean on main
rumdl check over the in-scope documents SHALL report no finding on main.
Scenario: The docs row passes on main
- WHEN
uv run devops ci --check --only docsruns onmain - THEN the row exits 0 and prints no rumdl finding.
Requirement: The planted-defect check covers the three defect classes
The rumdl_links gate check SHALL plant a dead relative link, a missing cross-file fragment and a missing same-file anchor and SHALL report each of them.
Scenario: The three planted defects are reported
- WHEN
uv run python -c "from tests.gate.rumdl_links import check_rumdl_reports_each_defect; check_rumdl_reports_each_defect()"runs - THEN the command exits 0, so the check saw MD057 for the dead link and MD051 for both fragments.
Requirement: The custom broken-links helper is gone
The _broken_links helper and its three link tests SHALL be removed from tests/invariants/test_agents_md.py, and the generated-AGENTS.md routing test SHALL assert its routing rows alone.
Scenario: No broken-links helper remains
- WHEN
grep -rn '_broken_links' tests/ src/runs - THEN the command prints no line and exits 1, so no definition or call of
_broken_linksremains.
Requirement: The contributor, testing and gate documents name the check
CONTRIBUTING.md, docs/TESTING.md and the gate list of docs/SDLC.md SHALL name the rumdl link check and the command that runs it.
Scenario: Each document names the check
- WHEN
grep -c 'rumdl check' CONTRIBUTING.md docs/TESTING.md docs/SDLC.mdruns - THEN each file reports a count of at least 1 and the command exits 0.
Requirement: The commit hook stays under one second
The rumdl-check hook SHALL complete in under 1 second on a commit of 10 staged Markdown files.
Scenario: Ten staged files complete under one second
- WHEN
time uv run pre-commit run rumdl-check --files $(git ls-files '*.md' | head -10)runs afteruv run pre-commit install-hooks - THEN the command names no rumdl finding for the 10 files and its
realtime is under 1.0 s.
Requirement: The docs row stays under 45 seconds
The docs row of devops ci SHALL complete in under 45 seconds on the runner.
Scenario: The docs row completes under 45 seconds
- WHEN
time uv run devops ci --check --only docsruns on the CI runner - THEN the row exits 0 and its
realtime is under 45 s.
Requirement: The runner tool table names rumdl
RUNNER_TOOLS SHALL name rumdl for the ci:docs row.
Scenario: The runner tool table holds rumdl for the docs row
- WHEN
uv run pytest tests/invariants/test_rumdl_links.py -k runner_toolruns - THEN the test passes only when
tool_names()holdsrumdland itsneeded_byholdsci:docs.
Existing Tool Considered
rumdl (https://github.com/rvben/rumdl) covers the need. The alternatives check of 2026-11-14 in the issue body records the verdict covers, and its comment names what the tool lacks. The person's reply of 2026-11-21 adopts the tool and keeps this item. The project writes no checker: it adds the root .rumdl.toml, the rumdl_links gate check in tests/gate/, the docs row step, the RUNNER_TOOLS entry, the _broken_links removal and the document edits, and it uses the official rvben/rumdl-pre-commit hook.
Key questions
- Adopt rumdl, or keep the custom check and give the reason?: Adopt rumdl. The person's reply of 2026-11-21 adopts it and keeps the item. The owner chose rumdl as the one Markdown linter of the project on 2026-11-11. The license is MIT. The alternatives check of 2026-11-14 records
covers. The fallback is markdownlint-cli2 (MIT). (best practice) [sources: https://github.com/rvben/rumdl, https://github.com/rvben/rumdl-pre-commit, CONTRIBUTING.md:24]- Chosen: Adopt rumdl. The person adopted it, the alternatives check records
covers, and the license is MIT. - Rejected: Keep
_broken_linksand extend it. It is project-built code that covers about 10 documents, and extending it writes the checker that rumdl provides.
- Chosen: Adopt rumdl. The person adopted it, the alternatives check records
- Which rumdl rules does the link check run?: Run MD051 and MD057 only, named in the
[global] enablelist of a root.rumdl.toml. The MD051 documentation says the rule checks same-document anchors and cross-file fragment links when multiple files are linted together, and that a link whose file does not exist is reported by MD057. The issue's probe and the alternatives check name the[global] enablekey. fix(docs): a check finds a code span that nested backticks break #4605 adds its rules to the same list. (best practice) [sources: https://rumdl.dev/md051, https://github.com/rvben/rumdl]- Chosen: MD051 and MD057 only. They are the two link rules: MD051 covers both fragment cases and MD057 the missing file, and external URLs stay out of scope.
- Rejected: All rumdl rules. It adds style findings such as MD013 that are outside the link and anchor need, and the row would fail for unrelated reasons.
- Rejected: MD057 only. It misses the missing cross-file fragment and the missing same-file anchor.
- Which rumdl release does the project pin?: Pin
rumdl==0.3.5in thedevgroup andrev: v0.3.5in the hook. CONTRIBUTING.md, 'Dependency Versions' (owner, 2026-11-11), sets no minimum release age and asks for the newest release that the surrounding tools support. The officialrumdl-pre-commitpage namesrev: v0.3.5(fetched 2026-11-21), and the person's reply of 2026-11-21 names v0.3.5 of 2026-11-18 as current. The project keeps the dev pin and the hook rev together as it does for ruff. (best practice) [sources: CONTRIBUTING.md:35, https://github.com/rvben/rumdl-pre-commit, .pre-commit-config.yaml:54, .github/renovate.json:191]- Chosen: 0.3.5. It is the current release that the official hook and the person's reply name, and the project sets no minimum release age.
- Rejected: 0.3.3. It is the release of the issue's probe and is older than the release the official hook names.
- Rejected: A development build. It is not a release, and no surrounding tool supports it.
- Which pre-commit hook runs rumdl?: The official
rvben/rumdl-pre-commithook, idrumdl-check, atrev: v0.3.5, limited to Markdown files. The page says the hook runsrumdl checkand installs rumdl in an isolated Python environment, so the project writes no hook. A Renovate group matchesrumdlandrvben/rumdl-pre-commit, as the ruff group does. (best practice) [sources: https://github.com/rvben/rumdl-pre-commit, .pre-commit-config.yaml:54, .github/renovate.json:191]- Chosen: The official
rumdl-pre-commithook. It is the maintained standard interface, installs rumdl in its own environment, and matches the hook pattern of the project. - Rejected: A local
uv run rumdl checkhook. It adds project code and a second command line to keep, and local hooks exist for tools with no official repository.
- Chosen: The official
- Where does the rumdl check run in CI?: As the
rumdl_linksgate step of the existingdocsrow ofdevops ci(src/devops_cli/commands/ci.py:1014). The row'scmdstaysuv run devops docs check; the rumdl step is analso_cmdsentry, as thelintandconstructsrows add their gate checks (src/devops_cli/commands/ci.py:952,:1063). ADR 0004 makes CI the authoritative gate, and the row already checks the documents. (best practice) [sources: src/devops_cli/commands/ci.py:1014, src/devops_cli/commands/ci.py:219, docs/adr/0004-ci-is-the-authoritative-gate.md]- Chosen: The
docsrow ofdevops ci. ADR 0004 makes CI the gate, the row already checks the documents, and the issue names it. - Rejected: A separate workflow. It adds a second gate and does not use the existing docs row.
- Chosen: The
- How does the docs row run rumdl, and where does the check live?: As a
rumdl_linksgate check intests/gate/rumdl_links.py, invoked by thedocsrow through_python_check_cmd("rumdl_links").docs/TESTING.mdrecords the project's decision that a check of committed files or tool configuration is a row ofdevops ci, not a pytest test, and that the code of these rows lives intests/gate/, one module for each row. The module collects the four inventory classes and runsrumdl check; it writes no checker. (best practice) [sources: docs/TESTING.md:76, src/devops_cli/commands/ci.py:929, src/devops_cli/commands/ci.py:219, src/devops_cli/docs/inventory.py:30]- Chosen: A
tests/gate/rumdl_links.pygate check in thedocsrow.docs/TESTING.md:76makes a check of committed files adevops cirow with its code intests/gate/, and the inventory already names the four classes. - Rejected: A pytest test that runs rumdl over the tree.
docs/TESTING.md:76says a check of committed files or tool configuration is a row ofdevops ci, not a pytest test. - Rejected: A separate workflow. It adds a second gate, and ADR 0004 makes the existing
docsrow the authoritative check.
- Chosen: A
- Which documents does the docs row check?: The hand-written, prompt, generated and tool-generated classes that
documents_of_classreturns. The knowledge base is hand-written (no inventory entry), and the committed skills are the tool-generated class. Therecordandtool-ownedclasses are out of scope. [sources: src/devops_cli/docs/inventory.py:30, src/devops_cli/config/constants.py:507, src/devops_cli/config/constants.py:536] - Where do the planted-defect documents live?: In a temporary directory that the
rumdl_linksgate check writes at run time, with a copy of the root.rumdl.toml, and onerumdl checkover that directory so MD051 sees both documents of a cross-file fragment. A committed fixture would be hand-written and would fail the docs row andpre-commit run --all-files. (best practice) [sources: src/devops_cli/docs/inventory.py:37, docs/SDLC.md:419, https://rumdl.dev/md051]- Chosen: Temporary documents written by the gate check. They never enter the tracked tree, and one
rumdl checkover the directory checks the cross-file fragment. - Rejected: A committed
tests/fixtures/rumdl/fixture. A tracked fixture holds a known dead link and a known missing anchor, so a reader cannot tell a defect of the tree from a fixture.
- Chosen: Temporary documents written by the gate check. They never enter the tracked tree, and one
- What happens to
_broken_linksand its callers?: Delete_broken_linksattests/invariants/test_agents_md.py:420; deletetest_every_relative_link_in_the_test_conventions_and_their_pointers_resolves(:489),test_a_link_to_a_missing_file_or_heading_is_broken(:507) andtest_every_relative_link_of_the_release_page_resolves(:689); changetest_a_generated_agents_md_routes_only_to_documents_that_exist(:338) to assert its routing rows alone.RELEASE_CYCLE.mdis hand-written and in the rumdl scope, so its link check moves to the docs row. (best practice) [sources: tests/invariants/test_agents_md.py:338, tests/invariants/test_agents_md.py:420, tests/invariants/test_agents_md.py:489, tests/invariants/test_agents_md.py:507, tests/invariants/test_agents_md.py:689]- Chosen: Delete the helper and its three link tests, and change the routing test. The issue requires the removal, and rumdl replaces the helper over a wider scope.
- Rejected: Keep both checks. It keeps two link checks and their maintenance.
- Rejected: Run rumdl inside the routing test. It adds a subprocess and a copied config to a unit test, and the docs row and the planted-defect check cover links.
- Which documents name the new check?:
CONTRIBUTING.md,docs/TESTING.mdand the gate list ofdocs/SDLC.md(docs/SDLC.md:215). (best practice) [sources: docs/SDLC.md:215, CONTRIBUTING.md:11, docs/TESTING.md:59]- Chosen: The three documents. The issue names CONTRIBUTING.md and docs/TESTING.md, and the gate list would otherwise describe the docs row without its rumdl step.
- Rejected: Only CONTRIBUTING.md and docs/TESTING.md. The gate list would be stale.
- Does the runner tool table need rumdl?: Yes. The
rumdl_linksgate step startsrumdl, and the runner image must hold it. Add_checkout("rumdl", "ci:docs")toRUNNER_TOOLS(src/devops_cli/roadmap/runner_tools.py:117). A test intests/invariants/test_rumdl_links.pyasserts the entry, and the runner tool test reads each row's argv and each hook. [sources: src/devops_cli/roadmap/runner_tools.py:117, tests/roadmap/test_roadmap_runner_tools.py:140] - Does the commit hook catch a missing cross-file fragment?: Only when both the linking and target documents are linted in the same run. The MD051 documentation says the rule checks cross-file fragment links when linting multiple files together, and that a link whose file does not exist is reported by MD057. The commit hook sees the staged files only, so the docs row over the whole scope catches a cross-file fragment whose target is not staged. [sources: https://rumdl.dev/md051]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(docs)scope of the title gives the scope.Improves documentation quality by catching broken links, but does not block releases or cause data loss.Prevents broken links and anchors in all project documents, improving reader trust and navigation.Requires pinning a dependency, configuring rumdl, adding a pre-commit hook, a CI step, a planted-defect test, and removing the old helper.Both validate links in documentation, but #227 is a full linter covering syntax, code fences, Mermaid and tables while the candidate adds only rumdl-based link and anchor checking.devops-cli-service commentedon Nov 12, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(docs)scope of the title gives the scope.The change improves documentation quality checks. It does not block users or cause data loss.It extends link and anchor checks to all documents and removes a limited helper.It needs a dependency pin, config, a hook, a CI step, a planted-defect test and doc edits.Both items check relative links in documents. Item 227 builds a validator engine. The candidate adopts an external tool and adds a hook and a CI step.devops-cli-service commentedon Nov 14, 2026
Alternatives check: covers
Reason: Searches for the need returned little on the web, but the PyPI and GitHub facts confirm rumdl as an MIT-licensed, maintained Markdown linter, and the issue's own 2-file probe of 0.3.3 shows its MD051 and MD057 rules catch all three defect classes the issue wants (dead relative link, missing cross-file fragment, missing same-file anchor). No ADR in force rejects it, so rumdl covers the link and anchor checking; only the hook, CI row and planted-defect test around it are the project's own work.
Tool: rvben/rumdl (https://github.com/rvben/rumdl)
Covers:
[global] enableconfig keydevops cidocs rowLacks:
_broken_linksor keep its wider document scope checked without the new config and hookTools considered:
Searches run:
Sources:
Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 16, 2026
Owner question: The alternatives check records that rumdl covers the need. Adopt rumdl or keep the item with a reason? (a person decides)
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
The owner question of this item is on #4605: #4605
Answer it there.
dan-petty commentedon Nov 21, 2026
Answer to the alternatives question of this item and of #4605: adopt rumdl (
rvben/rumdl). Keep this item. It adds its rules and its fixes.LICENSEandCargo.tomlsay MIT. GitHub shows NOASSERTION, because the file also holds the MIT notice of the MDX parser..rumdl.toml, the officialrvben/rumdl-pre-commithook at the same release, and onedevops cistep. It enables MD051 and MD057.enablelist. fix(docs): a check finds a code span that nested backticks break #4605 needs this item.#4605 is no dependency of this item.
devops-cli-service commentedon Nov 21, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 21, 2026
The result in the alternatives block of the issue body changed. Before this check:
covers, tool https://github.com/rvben/rumdl. A person decides what the new result means for the item.Searches (4)
Tools considered:
Searches run:
Sources: