Repository navigation
Description
Problem
The implement step reads every code span of a Verification: line as a command. In src/devops_cli/roadmap/step_files.py, _task_of collects the code spans of each Verification line. A code span that is prose, such as tagged_image in the plan of #2610, is then refused as a program that is not in the allowed list. The step stops the group.
Proposed change
Read as commands only the code spans that the plan marks as commands, and keep the other code spans as prose. The owner of the rule decides the marking. Name the rule in the docstring of _task_of.
Acceptance criteria
- A Verification line with a prose code span runs only its command, and the test in
tests/roadmap/pins it. - A Verification line whose command is refused still stops the step with the reason of the step.
Source: #3276
Proposed design
Problem statement
The implement step reads every code span of a Verification: line as a command. A prose code span such as tagged_image is then refused as a program that is not in the allowed list, and the step stops the group. The change reads only the code spans that carry the $ mark as commands and keeps the other code spans as prose. The stage template writes the mark, so a new plan always carries it.
Acceptance criteria
Requirement: Marked command only
_task_of SHALL read a code span of a Verification: line as a command only when the span starts with $ , and SHALL keep every other code span as prose.
Scenario: A prose span beside a marked command
- WHEN A task holds the
Verification:linetagged_imagesplits the reference, and$ pytest tests/roadmap/test_step_files.pypasses. - THEN
GroupTask.verificationis('pytest tests/roadmap/test_step_files.py',).
Requirement: Prefix removed
The step MUST remove the $ prefix from a command before it reads the program of the command.
Scenario: A command of an allowed program
- WHEN The
Verification:line holds the code span$ devops roadmap claim. - THEN The command is
devops roadmap claim, and the allowed-list check readsdevops.
Requirement: Refused command stops the step
A marked command whose program is not in the allowed list MUST stop the step with the reason of the step.
Scenario: A program that is not allowed
- WHEN The
Verification:line holds the code span$ nosuchprogram --version. - THEN The step stops, and the reason of the stop names
nosuchprogramas a program that is not in the allowed list.
Requirement: No mark, no command
A Verification: line whose code spans carry no $ mark MUST give the group no command.
Scenario: A plan written before the change
- WHEN The
Verification:line holds the code spanpytest tests/roadmap/test_step_files.pywith no mark. - THEN
GroupTask.verificationis empty.
Requirement: Stage template marks the command
The stage job SHALL write the $ mark before the verification command of the Verification: line of each task.
Scenario: A staged task
- WHEN The stage job writes the tasks of a group.
- THEN The
Verification:line of each task holds$ <command>, and_task_ofreads<command>.
Requirement: The docstring names the rule
The docstring of _task_of MUST state that only a code span that starts with $ is a command and that other code spans are prose.
Scenario: The docstring of the parser
- WHEN A test reads the docstring of
_task_of. - THEN The docstring holds the
$mark and the wordprose.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need: markdown-it-py, already a dependency, gives the code spans of the line, and no tool reads a Verification: line or tells a marked inline span from prose. The change builds about 15 lines in _task_of and the stage template: about 3,000 tokens to build, keep and fix, and about 2 hours of elapsed work.
Key questions
- Which mark tells a command from a prose code span on a
Verification:line?: A code span that starts with$is a command. The parser removes the two characters and reads the program. Any other code span is prose. (best practice) [sources: src/devops_cli/roadmap/step_files.py, openspec/changes/archive/2026-11-02-3262-stage-verify-line/proposal.md]- Chosen:
$prefix in the code span. The shell prompt marks a command line in documentation, so a reader needs no new rule. - Rejected:
cmd:label in the code span. No document or tool uses this label, so it adds a private rule. - Rejected: First code span of the line. A line with two commands runs only the first, and a prose span in the first position is refused.
- Rejected: First word in the allowed program list. No command is then ever refused, so the second acceptance criterion cannot hold.
- Chosen:
- What does a
Verification:line give the group when no code span carries the mark?: No command. The step keeps every unmarked code span as prose. The stage template writes the mark from the same change, so a new plan always carries it. (best practice) [sources: src/devops_cli/roadmap/step_files.py, docs/adr/0001-github-is-the-roadmap-source.md]- Chosen: No command. The body keeps an unmarked code span as prose, and the project removes an old form instead of keeping it (ADR 0001).
- Rejected: The first code span is a command. It keeps two rules, and a plan written after the change can still have its prose refused.
- Rejected: Stop the step. A plan written before the change would stop the group, and only a person clears the stop.
- Does the stage template write the mark?: Yes.
stage_task_testputs$before{verify}._task_textskeeps its call, andFAILS_ON_BASEstill readsfails on the baseafter the last backtick. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_change.py, openspec/changes/archive/2026-11-02-3262-stage-verify-line/proposal.md]- Chosen: Change
stage_task_test. The stage job writes every task, so a template with no mark gives every new group no command. - Rejected: Leave the template. No author step adds the mark, so a staged plan would never run its command.
- Chosen: Change
- Where does the parser collect the code spans of a
Verification:line?:_task_oftakes the inline tokens of a list item after the first, keeps each one that starts withVerification:, and collects every code span of each one. [sources: src/devops_cli/roadmap/step_files.py, src/devops_cli/roadmap/step_files.py:101]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 5, 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.(roadmap)scope of the title gives the scope.The bug stops a step for plans that include prose code spans in a Verification line, but it does not block all work.It unblocks implement steps that currently stop on legitimate prose code spans in Verification lines.The change is local to _task_of and adds a filter on marked spans, with one test to pin the behaviour.Both deal with Verification line code spans being refused, but the candidate changes how the step reads spans while #3579 adds a check across all active plans.devops-cli-service commentedon Nov 6, 2026
Status set to Ready at bd65ef6 (see proposed design in issue body).
devops-cli-service commentedon Nov 7, 2026
Released in v0.78.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.78.0
devops-cli-service commentedon Nov 7, 2026
Live since 2026-11-07 12:09 UTC