Repository navigation
Description
Split from #4904.
Prompt documents under src/devops_cli/ai/tasks/ hold illustrative paths such as src/app.py:12 and tests/roadmap/test_feature.py. These paths are examples and are not tracked files. The rule for hand-written documents would report them as stale paths. This part is deferred until the prompts define a marker for an illustrative path. The marker lets the rule skip an example and check a real path. Acceptance criteria: a prompt document marks an illustrative path with the marker; the rule reports no finding for a marked illustrative path; the rule reports a finding for an unmarked stale path in a prompt document; devops docs check runs the rule over the prompt class; the repository tree reports no finding.
Proposed design
Problem statement
Prompt documents under src/devops_cli/ai/tasks/ hold illustrative code-span paths such as src/app.py:12. These paths are not tracked files. The docs path rule of #4904 would report them as stale. This change defines an illustrative-path marker, skips marked spans in the prompt class, and marks the existing examples so the repository tree is clean.
Acceptance criteria
Requirement: Illustrative path marker
A prompt document SHALL mark an illustrative code-span path with the HTML comment <!-- devops-docs: illustrative-path --> immediately after the code span on the same line.
Scenario: Marked illustrative path
- WHEN A test prompt document holds the code span
src/app.py:12followed by<!-- devops-docs: illustrative-path -->on the same line. - THEN The docs path check returns no finding for
src/app.py:12.
Requirement: Unmarked stale path
The docs path checker MUST report an unmarked stale code-span path in a prompt document.
Scenario: Unmarked stale path
- WHEN A test prompt document holds the code span
src/missing.py:12with no illustrative-path marker. - THEN The docs path check returns one finding that names the document path, the line and
src/missing.py:12.
Requirement: Prompt class coverage
devops docs check SHALL run the code-span path rule over every document of the prompt class.
Scenario: Prompt class scan
- WHEN A test tree holds
src/devops_cli/ai/tasks/test.mdwith the unmarked code spansrc/missing.py:12. - THEN The docs path check returns an error that names
src/devops_cli/ai/tasks/test.mdandsrc/missing.py:12.
Requirement: Repository prompt tree clean
The repository MUST report no stale code-span path finding in a document of the prompt class.
Scenario: Clean prompt tree
- WHEN
uv run devops docs checkruns on the repository. - THEN The command exits zero and reports no finding for a code-span path in a document of the prompt class.
Existing Tool Considered
No alternatives check has run. The open library markdown-it-py covers Markdown code-span parsing. The change reuses it through code_spans in src/devops_cli/roadmap/step_files.py and builds no parser. No open maintained tool covers a code-span path rule over prompt documents; lychee checks links only. The change extends the docs path checker that #4904 adds. Written cost: about 1,500 tokens to build, about 300 tokens a year to keep and fix, and about 20 minutes elapsed.
Key questions
- Which marker syntax marks an illustrative path?: Use the HTML comment
<!-- devops-docs: illustrative-path -->immediately after the code span on the same line. AddCONST_DOCS_ILLUSTRATIVE_PATH_MARKERinsrc/devops_cli/config/constants.pyand read it in the docs path checker. The checker skips the code span that the marker follows. (best practice) [sources: src/devops_cli/config/constants.py:6219, src/devops_cli/config/constants.py:3804, src/devops_cli/openspec/gate.py:260, openspec/changes/archive/2026-11-06-3508-rule-docs-name-moved-files/design.md]- Chosen: HTML comment immediately after the code span. The project already reads HTML comment markers from a line. The comment renders as nothing. The marker names the one example on the line.
- Rejected: Inline prefix
example:. The prefix changes the visible path text and the text that the checker reads. - Rejected: Marker on the line before the code span. A block marker cannot tell which code span on the following line is the example.
- Rejected: Per-file ignore list. A file-level entry hides every path in the file, including a stale real path.
- Which documents form the prompt class?: The prompt class is the existing
CONST_DOCS_CLASS_PROMPTentry ofCONST_DOCS_INVENTORY:src/devops_cli/ai/personas/**/*.mdandsrc/devops_cli/ai/tasks/**/*.md. It is already inCONST_DOCS_NAME_CHECKED_CLASSES, so the docs path rule reads it withdocuments_of_class(root, CONST_DOCS_CLASS_PROMPT)and adds no class or glob. [sources: src/devops_cli/config/constants.py:502, src/devops_cli/config/constants.py:505, src/devops_cli/config/constants.py:532, src/devops_cli/config/constants.py:543, src/devops_cli/config/constants.py:544, src/devops_cli/docs/inventory.py, src/devops_cli/docs/markdown_argv_collector.py:231] - How does the checker treat a marked stale path?: It skips the code span and reports no finding. The marker states that the path is an example, and the rule exists to find a real path that is stale. (best practice) [sources: openspec/changes/archive/2026-11-06-3508-rule-docs-name-moved-files/design.md, src/devops_cli/config/constants.py:6219]
- Chosen: Skip the marked path. The marker states that the path is an example, and a warning would still report the example as a finding and fail
devops docs check. - Rejected: Report a warning.
devops docs checkfails on a finding, so a warning would keep the example in the failure list. - Rejected: Check only tracked files. A real path that moved is no tracked file either, so this would hide the stale path that the rule exists to find.
- Chosen: Skip the marked path. The marker states that the path is an example, and a warning would still report the example as a finding and fail
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 28, 2026
Both extend devops docs check for stale-path defects, but #5155 targets a roadmap audit step across repos while the candidate adds a prompt-document path rule with an illustrative-path marker.devops-cli-service commentedon Nov 28, 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.
devops-cli-service commentedon Nov 29, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 30, 2026
Released in v0.265.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.265.0
devops-cli-service commentedon Nov 30, 2026
Live since 2026-11-30 22:54 UTC