Skip to content

feat(roadmap): a docs audit step finds link, lint and stale-doc defects #5155

Open

Description

@dan-petty

Problem or Motivation

The owner asked on 2026-11-12 for a docs job that manages issues for common documentation defects. Today devops docs check gates the pull requests of devops-cli only, and only for generated pages and devops command lines. The 6 other Service repositories have no documentation check. #4880 plans rules and a drift lane for devops-cli only (#4899, #4904, #4910, #4920).

Proposed Solution & Architectural Design

Add devops roadmap step docs-audit --repo <owner/repo> on the step frame of #5014. It runs on a clone of the repository. The setting roadmap.docs_audit.mode has the type RowMode and the default plan. The step files and edits issues through the finding-issue module (child 2). Checks, all by rule:

The docs globs come from the profile (layout.docs, layout.generated). Until the profile reader exists, the step uses docs/**/*.md and the root *.md. One finding group is one check class on one page. --dry-run sends 0 requests.

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/roadmap/steps/, src/devops_cli/docs/).

Existing Tool Considered

rumdl (#4880 made it the one link checker; markdownlint-cli2 is rejected as a second linter with the same rule IDs), Vale 3.26.0 (MIT), the existing devops docs check gate and the rules of #4904, #4910 and #4920. The step only runs these tools and reads their output. Custom code: about 200 lines with tests. Cost (estimate): about 250,000 tokens and 1 day elapsed.

Acceptance Criteria

  • A fixture repository with 1 broken link, 1 lint defect and 1 stale generated page gives 3 groups.
  • A fixture repository with no docs folder gives 0 groups and exits 0.
  • A command with an empty help summary gives 1 "code with no doc" group.
  • Mode plan writes nothing. --dry-run sends 0 requests.

Dependencies

Source: #5151

Alternatives check of 2026-11-28: partly.
Tool: rvben/rumdl (https://github.com/rvben/rumdl), NOASSERTION, last activity 2026-11-27, maintained.
Reason: Searches and repo facts show rumdl is the maintained Markdown linter with broad markdownlint-compatible config and 90 rules, covering the link, anchor and lint checks; it does not cover prose style, stale generated pages, drift rules or undocumented code, which the step adds.

Covers:

  • Link and anchor rules such as MD051 and MD057
  • Markdown lint rules with markdownlint-compatible configuration
  • Formatting and auto-fix with cached runs
  • GitHub Actions and pre-commit integration

Lacks:

  • Prose style checks that Vale covers
  • Stale generated page detection via docs verification
  • Drift findings from devops docs drift
  • Generator inventory entries with empty summaries

Proposed design

Problem statement

Add the roadmap step devops roadmap step docs-audit --repo <owner/repo>. The six managed repositories other than devops-cli have no documentation check today. A broken link, a lint defect, a style defect, a stale generated page or an undocumented command reaches main unseen. The step runs the pinned tools on a clone of the repository. It groups the findings by check class and by page, and files one issue for each group through the finding-issue module of #5153. The reply of 2026-12-01 leaves the devops-cli drift rules out of the step, because #4920 is closed as not planned.

Acceptance criteria

Requirement: Docs-audit step command

The roadmap step SHALL run as devops roadmap step docs-audit --repo <owner/repo> and SHALL write one JSON result line.

Scenario: Step runs on a clone

  • WHEN A test runs devops roadmap step docs-audit --repo example/project with a doubled process runner on a fixture clone.
  • THEN The command exits 0 and writes one JSON line with a groups list.

Requirement: One finding group for each check class on a page

The step SHALL make one finding group for each check class that finds a defect on one page.

Scenario: Three defects give three groups

  • WHEN A test runs the step on a fixture repository that declares the devops-cli toolchain, doubles the process runner, and whose tool output holds one broken link, one lint defect and one stale generated page.
  • THEN The step reports three finding groups, one for each class.

Requirement: Repository with no Markdown document

The step SHALL report zero finding groups and SHALL exit 0 when the repository has no Markdown document in its docs globs or its root globs.

Scenario: No Markdown document

  • WHEN A test runs the step on a fixture repository that has no docs folder and no root Markdown file.
  • THEN The step reports zero finding groups and exits 0.

Requirement: Code with no doc

The step SHALL make one code with no doc finding group for each generator inventory entry that has an empty summary or description.

Scenario: Command with an empty help summary

  • WHEN A test runs the step on a fixture clone that declares the devops-cli toolchain, doubles the process runner, and whose generator JSON holds one command with an empty summary.
  • THEN The step reports one finding group of class code with no doc.

Requirement: Plan mode writes nothing

The step SHALL write no issue and no file when roadmap.docs_audit.mode is plan.

Scenario: Plan mode

  • WHEN A test runs devops roadmap step docs-audit --repo example/project with roadmap.docs_audit.mode set to plan on a fixture repository with three defects.
  • THEN The fake GitHub client records zero issue writes and the step creates no file in the clone.

Requirement: Issues filed through the finding-issue module

The step SHALL file one issue for each finding group through the finding-issue module when roadmap.docs_audit.mode is not plan.

Scenario: Issues filed

  • WHEN A test runs devops roadmap step docs-audit --repo example/project with roadmap.docs_audit.mode set to on on a fixture repository with three defects.
  • THEN The fake finding-issue module receives three finding groups.

Requirement: Later run edits the issue of a group

The step SHALL pass a stable key of the check class and the page to the finding-issue module, so that a later run edits the same issue.

Scenario: Second run edits

  • WHEN A test runs the step twice on the same fixture defect, and the fake finding-issue module holds the issue of the first run.
  • THEN The fake module records one issue creation and one issue update.

Requirement: Dry run sends no request

The step MUST send no request when --dry-run is set.

Scenario: Dry run

  • WHEN A test runs devops roadmap step docs-audit --repo example/project --dry-run.
  • THEN The recorded request count is zero, and the step starts no clone and no tool.

Requirement: Vale checks hand-written documents only

The step SHALL run Vale only on documents of class hand-written and only when the repository has .vale.ini.

Scenario: A generated page gets no style check

  • WHEN A test runs the step on a fixture repository that holds .vale.ini and a generated page with a style defect, and records the documents that the step gives to Vale.
  • THEN The recorded documents hold no generated page.

Requirement: Repository markdown lint config

The step SHALL use the markdown lint configuration of a repository that holds one in place of the config of #4899.

Scenario: Repository config wins

  • WHEN A test runs the step on a fixture repository that holds its own .rumdl.toml, and records the arguments that the step gives to rumdl.
  • THEN The recorded arguments hold no config argument, so rumdl discovers the repository configuration.

Requirement: Mode setting

The setting roadmap.docs_audit.mode SHALL have the type RowMode and the default plan.

Scenario: Default mode

  • WHEN A test reads the roadmap.docs_audit section of the settings.
  • THEN roadmap.docs_audit.mode is plan, and its annotation is RowMode.

Requirement: Stale generated page

The step SHALL run the docs verification command of the project's toolchain preset and SHALL make one stale finding group for each page that the command reports as out of date or missing.

Scenario: Stale generated page

  • WHEN A test runs the step on a fixture clone that declares the devops-cli toolchain, doubles the process runner, and whose docs verification command reports one out-of-date page.
  • THEN The step reports one finding group of class stale generated page.

Requirement: Toolchain with no docs verification

The step SHALL make no stale group and no code with no doc group and SHALL exit 0 when the toolchain preset gives no docs verification command.

Scenario: Neutral toolchain

  • WHEN A test runs the step on a fixture repository with no .devops/roadmap.toml.
  • THEN The step reports no stale group and no code with no doc group and exits 0.

Requirement: Docs globs without a profile docs layout

The step SHALL check docs/**/*.md and the root *.md when the project profile gives no docs layout.

Scenario: Fixed globs

  • WHEN A test runs the step on a fixture repository that has no project profile and holds docs/guide.md and README.md, and records the paths that the step gives to the Markdown tool.
  • THEN The recorded paths hold docs/guide.md and README.md.

Existing Tool Considered

rvben/rumdl (https://github.com/rvben/rumdl) is the open, maintained Markdown linter. The alternatives check of 2026-11-28 in the issue body records the verdict partly for it. The Lacks: list of that block states what rumdl does not cover. The step runs rumdl for the link, the anchor and the lint checks, and it adds the checks of that list apart from the drift check that the reply of 2026-12-01 leaves out. The custom step code is about 200 lines with tests: it runs these tools on the clone and groups their output. The written cost of that code is about 250,000 tokens and 1 day elapsed.

Key questions

  • Which tool checks the links, the anchors and the Markdown lint?: Run rumdl at the pin and with the config of feat(docs): check links and anchors of all documents with rumdl #4899. The alternatives check of 2026-11-28 in the issue body records the verdict partly for rvben/rumdl, and its block states what the tool covers and what it lacks. rumdl covers the link, the anchor and the lint rules in one maintained tool, so the step adds no second linter with the same rule IDs. The repository pins rumdl 0.3.10 in pyproject.toml. (best practice) [sources: https://github.com/rvben/rumdl, AGENTS.md:9, pyproject.toml:118]
    • Chosen: rumdl. One maintained tool covers the link, the anchor and the lint rules, and the alternatives check records the verdict partly.
    • Rejected: markdownlint-cli2. It is a second linter with the same rule IDs.
    • Rejected: A link checker written in devops-cli. The project keeps that code and its tests, at the written cost.
  • Which tool checks the style of the hand-written prose?: Run Vale with the rules of the repository's .vale.ini, on documents of class hand-written only. hand_written_documents of src/devops_cli/docs/inventory.py gives those documents. A clone with no .vale.ini gets no style check. (best practice) [sources: .vale.ini, src/devops_cli/docs/inventory.py:62]
    • Chosen: Vale. The repository holds .vale.ini with the tested ASD-STE100 rules, and Vale is the maintained prose linter.
    • Rejected: A style checker written in devops-cli. The project keeps that code and its tests, at the written cost.
    • Rejected: Vale on every page. A generated page is not hand-edited, so its style is no defect of a person.
  • Which documents does the step check when the project profile gives no docs layout?: Check docs/**/*.md and the root *.md. The step takes the globs of the profile facts layout.docs and layout.generated when the profile type holds them. The profile of src/devops_cli/project/profile.py holds the type and the Ansible and Kubernetes facts today, with extra="forbid". (best practice) [sources: src/devops_cli/project/profile.py:71, CONTEXT.md:297]
    • Chosen: Fixed globs now, profile globs after. The step works today and takes the profile facts with no second change to its checks.
    • Rejected: Wait for the profile docs layout. The profile type holds no docs layout fact, so the wait holds the whole step.
  • Which setting holds the mode of the step?: Use roadmap.docs_audit.mode with the type RowMode and the default plan, in a RoadmapDocsAuditConfig section beside the other roadmap row sections. RowMode is defined in src/devops_cli/config/defaults.py, and the other roadmap rows use it. (best practice) [sources: src/devops_cli/config/defaults.py:1294, src/devops_cli/config/settings.py:2133, src/devops_cli/roadmap/open_row.py:236]
    • Chosen: The RowMode type. The other roadmap rows use this type, and plan is one of its values.
    • Rejected: A new enum for this step. A second type for the same choice splits the row settings.
  • What is one finding group, and how does the step file it?: One finding group is one check class on one page. A code with no doc group is one generator inventory entry. The step files one issue for each group through the finding-issue module of feat(roadmap): file, update and close finding issues by fingerprint #5153 and passes a stable key of the class and the page. A later run then edits the same issue. (best practice) [sources: src/devops_cli/roadmap/finding_issues.py:562, AGENTS.md:17]
    • Chosen: One issue for each check class on one page. A person closes the defects of one class on one page with one issue.
    • Rejected: One issue for each defect. A page with many defects floods the tracker.
    • Rejected: One issue for each repository. A person cannot close one defect of the issue alone.
  • How does the step find a stale generated page?: Resolve the project profile of the clone's default branch and run the docs_verification command of its toolchain preset in the clone. The devops-cli preset gives uv run devops ci docs, whose docs row runs devops docs check. That check prints Documentation is out of date: <path> and Missing documentation file: <path>, so it names each page. Make one stale group for each page that the command reports as out of date or missing. The neutral preset gives no command, so it gets no stale group. The fix-checks step already runs preset.docs_verification. (best practice) [sources: src/devops_cli/roadmap/toolchains.py:63, src/devops_cli/roadmap/steps/fix_checks_repair.py:222, src/devops_cli/lang/en/messages.py:1361]
    • Chosen: The toolchain preset's docs verification command. The preset is the project's declaration of its toolchain, and the command exists today.
    • Rejected: The profile fact commands.docs_check. The project profile type holds no commands table, so that fact does not exist yet.
    • Rejected: Compare each generated page with a fresh generator output. The step has no generator for the other repositories.
  • How does the step read the code that has no doc?: In a clone that declares the devops-cli toolchain, run the docs generator with its JSON output into a temporary directory outside the clone and read the JSON. CommandDoc.summary and ParamDoc.description of src/devops_cli/docs/generator.py take the help text. An empty help text gives an empty summary or description. devops docs generate --format json --output-dir <dir> writes cli_schema.json into that directory. [sources: src/devops_cli/docs/generator.py:299, src/devops_cli/commands/docs.py:101]
  • Does the step send a request with --dry-run?: No. A dry run sends no external request, a read included (ARCHITECTURE.md:170). The step command declares @dry_run_class("request-plan") and returns before it reads the clone, runs a tool or opens a client, as the review step does. [sources: ARCHITECTURE.md:170, src/devops_cli/commands/roadmap_step_review.py:73]
  • How does the step choose the Markdown lint configuration?: Let a repository that holds a markdownlint-compatible configuration keep it. rumdl discovers common markdownlint and markdownlint-cli2 configuration files automatically (rumdl README, fetched 2026-12-01). When the clone holds one, the step runs rumdl with no config argument, so rumdl discovers it. In every other case the step runs rumdl at the pin and with the config of feat(docs): check links and anchors of all documents with rumdl #4899, which is the repository's own .rumdl.toml with enable = ["MD038", "MD051", "MD057"]. (best practice) [sources: https://github.com/rvben/rumdl, .rumdl.toml:1, tests/gate/rumdl_links.py:64]
  • Does the step report the findings of devops docs drift?: No. The reply of 2026-12-01 states that feat(docs): devops docs drift reports the drift that no PR check finds #4920 is closed as not planned, so devops docs drift does not exist. The source tree holds no docs drift command, so the step leaves the devops-cli drift rules out. (best practice) [sources: docs/adr/0025-generated-documents-stay-in-git-and-the-project-brain-cites-them.md:66]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4899, #5014, #5153

Activity

  1. added
    source/agent
    type/feature
    on Nov 12, 2026
  2. added
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at c58b592 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  6. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • rumdl markdown linter links anchors MD051 MD057 GitHub, results: 5
    • open source documentation audit tool broken links markdown lint style stale generated docs, results: 5
    • rumdl Rust markdown linter, results: 5
    • lychee link checker markdown GitHub maintained, results: 5
    • Vale prose linter documentation style, results: 5
    • "rumdl" markdown lint MD051 MD057 link anchor rules, results: 5
    • documentation audit tool stale generated documentation check open source, results: 5
    • lychee link checker, results: 5
    • super-linter markdown lint link check documentation, results: 5
    • "Vale" prose linter GitHub, results: 5

    Sources:

  7. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    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.

  8. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    2026-12-01: #4920 is closed as not planned, so devops docs drift does not exist. The docs audit step of this item leaves out the devops-cli drift rules.

  9. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions