Repository navigation
Description
Problem Description
When devops roadmap stage constructs the ## Criteria section of tasks.md, it can fold raw multi-line markdown headings and scenario bodies from the issue refinement block into single-line strings (for example: ### Requirement: ... #### Scenario: ... : group 2). Additionally, the names of requirements in the criteria can diverge from the requirement titles declared in the spec delta (specs/.../spec.md).
Reproduction Steps
- Run
devops roadmap stage <issue>on an issue where acceptance criteria contain markdown headings or scenarios. - Inspect
openspec/changes/<issue>-<slug>/tasks.md. - Observe single-line folded headings and scenario text under
## Criteriainstead of clean requirement names.
Expected vs Actual Behavior
Expected: Each line in ## Criteria cleanly names the requirement and its group (for example: - The sandbox deploy tool publishes no env parameter: group 2).
Actual: Markdown headings and scenario bodies are collapsed into long, unformatted single lines.
Environment Diagnostics
- DevOps CLI Version: 0.48.3
- Python Version: 3.14.10
- OS & Architecture: Linux x86_64
- Execution Environment: DevContainer
Logs, Traces, or Terminal Output
## Criteria
- ### Requirement: Sandbox deploy omits env The `sandbox_deploy` MCP tool SHALL not publish the `env` parameter. #### Scenario: Published sandbox deploy schema - **WHEN** The test generates the MCP tools and reads the schema of `sandbox_deploy`. - **THEN** The schema has no `env` property.: group 2Source: #3283
Alternatives check of 2026-11-06: partly.
Tool: Fission-AI/OpenSpec (https://github.com/Fission-AI/OpenSpec), MIT, last activity 2026-11-05, maintained.
Proposed design
Problem statement
devops roadmap stage accepts a criteria entry that matches no acceptance criterion of the issue. The command writes that entry into ## Criteria in tasks.md as one folded line. A pasted heading or scenario body then reaches the change. The stage proposal check must refuse such an entry and name it. The lines keep the issue's acceptance criteria as an exact copy, as #3019 requires.
Acceptance criteria
Requirement: Unmatched criteria entry is refused
The stage proposal check SHALL report a criteria problem when a criteria entry matches no acceptance criterion of the issue.
Scenario: Pasted requirement heading
- WHEN The refine block gives a
criteriaentry that is a pasted### Requirement: ...block, and no acceptance criterion of the issue has that text. - THEN
criterion_problemsreturns one problem, andcheck_gatesreports it underProposalGate.CRITERIA.
Requirement: Exact copy passes
The stage proposal check SHALL accept a criteria entry whose text equals one acceptance criterion of the issue character for character.
Scenario: Criterion copied from the issue
- WHEN The refine block gives a
criteriaentry that copies one acceptance criterion of the issue character for character. - THEN
criterion_problemsreturns no problem for that entry.
Requirement: Problem names the entry
The criteria problem MUST hold the text of the unmatched criteria entry.
Scenario: Message content
- WHEN The stage proposal check refuses an unmatched
criteriaentry. - THEN The problem text holds the text of that entry.
Existing Tool Considered
OpenSpec (https://github.com/Fission-AI/OpenSpec), MIT, last activity 2026-11-05, maintained, and recorded as the project's spec and change-proposal layer by docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md. The alternatives check gives it partly. It covers the spec and change layer. It owns the spec delta with the requirement titles and the #### Scenario: blocks, and it validates them. It lacks three things. It does not build the ## Criteria section of tasks.md. It does not map a requirement to its group. It does not reconcile a criterion name against a requirement title, and it does not refuse a criteria entry that matches no acceptance criterion of the issue. That mapping and check stay in devops roadmap stage.
Key questions
- Should the
## Criterialines name the spec delta requirement titles instead of the issue's acceptance criteria?: No. Keep the exact copy.criterion_problemsmatches eachcriteriaentry against the issue's acceptance criteria by equal text after the same whitespace collapse (feat(roadmap): the stage job maps each acceptance criterion of the issue to a task group #3019). A requirement title breaks that match. Refuse an entry that matches no acceptance criterion. Then no pasted heading reaches## Criteria. (best practice) [sources: openspec/changes/archive/2026-11-02-3019-the-stage-job-maps-each-acceptance/design.md, src/devops_cli/roadmap/stage_criteria.py:89, openspec/changes/3328-the-stage-probe-checks-prompt-reply/design.md]- Chosen: Keep the exact copy and refuse an unmatched entry. It keeps the equal-text rule of feat(roadmap): the stage job maps each acceptance criterion of the issue to a task group #3019 and stops a pasted heading from reaching
## Criteria. - Rejected: Use the spec delta requirement titles. It breaks the character-for-character match that feat(roadmap): the stage job maps each acceptance criterion of the issue to a task group #3019 built and that
criterion_problemsuses.
- Chosen: Keep the exact copy and refuse an unmatched entry. It keeps the equal-text rule of feat(roadmap): the stage job maps each acceptance criterion of the issue to a task group #3019 and stops a pasted heading from reaching
- Where does the check for an unmatched
criteriaentry belong?: Incriterion_problemsinsrc/devops_cli/roadmap/stage_criteria.py, next to the missing-entry check.check_gatesalready routes that function underProposalGate.CRITERIA(src/devops_cli/roadmap/stage_change.py:907). Add one message under the criteria gate insrc/devops_cli/lang/en/messages.py. One function then keeps one source of truth for the match. (best practice) [sources: src/devops_cli/roadmap/stage_criteria.py:89, src/devops_cli/roadmap/stage_change.py:907, src/devops_cli/lang/en/messages.py:3539, openspec/changes/3328-the-stage-probe-checks-prompt-reply/design.md]- Chosen: Extend
criterion_problems. It already holds the exact-text match against the issue criteria. - Rejected: Add a new check in
stage_change.py. It splits the match logic across two modules and reads the criterion list twice. - Rejected: Add an instruction to the stage prompt only. A prompt gives no enforcement, so the entry can still be accepted.
- Chosen: Extend
- Does the fold of a multi-line entry into one line need a change?: No. The check refuses an entry that is no acceptance criterion. A pasted heading or scenario body then never reaches the fold. Keep the one-line fold and the fixed
Group <n>:prefix, which fix(roadmap): the stage renders a verify command that the implement step does not read #3262 and fix(roadmap): a text of the plan cannot add a group or a section #3289 designed. (best practice) [sources: src/devops_cli/roadmap/stage_change.py:1170, src/devops_cli/lang/en/messages.py:3558, tests/roadmap/test_roadmap_stage_text_lines.py:149, CHANGELOG.md:710]- Chosen: Keep the one-line fold. Each criterion is one line of the issue, the line starts with a fixed word, and the refused entry never reaches the fold.
- Rejected: Render the entry as markdown. It writes headings into a list of criteria and reverses the one-line design.
- Which open, maintained tool or library covers the need?: OpenSpec (
https://github.com/Fission-AI/OpenSpec) is the project's recorded spec and change-proposal layer (ADR 0010). It covers the spec and change layer: it owns the spec delta with the requirement titles and the#### Scenario:blocks, and it validates them. It does not build## Criteria, map a requirement to its group, or refuse acriteriaentry that matches no acceptance criterion of the issue. That mapping and check stay indevops roadmap stage. (best practice) [sources: docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]- Chosen: Use OpenSpec for the spec layer and keep the criteria mapping and check in
devops roadmap stage. ADR 0010 records OpenSpec as the one spec and change-proposal layer, and OpenSpec does not build the## Criteriasection or match a criterion against the issue. - Rejected: Build a spec-delta parser in the roadmap command. ADR 0010 makes OpenSpec the spec layer, so a second parser adds code to keep that the tool already covers.
- Chosen: Use OpenSpec for the spec layer and keep the criteria mapping and check in
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 3, 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.devops-cli-service commentedon Nov 3, 2026
Refine cannot set this item to Ready at 7df9244 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 6, 2026
Alternatives check: partly
Tool: Fission-AI/OpenSpec (https://github.com/Fission-AI/OpenSpec)
Covers:
specs/<capability>/spec.md), so the canonical requirement titles and#### Scenario:blocks that the criteria should name come from it rather than from re-parsing raw markdown in the roadmap command.openspec/changes/<issue>-<slug>/) whosetasks.mdthe stage command writes, so the criteria can be derived from the same records.Lacks:
## Criteriasection oftasks.md: mapping each requirement to its group (for example: group 2) stays indevops roadmap stage.Searches run:
Sources:
Checked on 2026-11-06. A person decides what this means for the item. The check changes no label and closes no issue.
[-]fix(roadmap): stage formats criteria names from canonical spec requirements[/-][+]fix(roadmap): Use spec requirement names in staged criteria[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 61 characters, and the limit is 60. The type and the scope stay.
fix(roadmap): stage formats criteria names from canonical spec requirementsfix(roadmap): Use spec requirement names in staged criteriadan-petty commentedon Nov 6, 2026
Returned to New under AGENTS.md rule 2: the item cannot be built as written. Two reviewers read the code of origin/main on 2026-11-06 and agreed.
Evidence
The reported fold is the designed behavior since PR #3289 (41929c3, 2026-11-02):
criteria_sectionwritesGroup {n}: {criterion}with the criterion folded to one line (stage_change.py:1165-1180, messages.py:3479). The issue log shows the old format...: group 2. The expected output (a short requirement name) conflicts with the rule of #3019/#3180: acriterionis the issue's list item copied character for character, andcriterion_problemsmatches it by equal text (stage_criteria.py:1-14, :89-115; prompt roadmap_stage_change.md line 44). A requirement title would break that match. The prompt already says to give no entry for the list in the refine block. What is still true: a probe shows that an entry that matches no issue criterion (for example a pasted### Requirement ...block) is accepted and rendered as one long line, becausecriterion_problemschecks only missing entries, not extra ones.Re-scope for refinement
As written ('name criteria from the spec requirement titles') it cannot be built without breaking the exact-copy match that #3019 built. The folding is the output of #3289. Re-scope to the real gap: refuse a
criteriaentry whose text is not an acceptance criterion of the issue (a small addition tocriterion_problemsin stage_criteria.py, with aProposalGate.CRITERIAmessage). Return to New with this evidence and the re-scope; a person or the refine job restates the issue (the body has no problem statement or criteria).devops-cli-service commentedon Nov 6, 2026
Refine cannot set this item to Ready at c714551 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 75d3ce8 (see proposed design in issue body).
devops-cli-service commentedon Nov 8, 2026
Staged: branch
fix/3326-use-spec-requirement-names-in-staged, draft pull request #4122. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
The runs of the planner and the review made 65 model request(s), and used 4882991 input tokens and 85576 output tokens. The tool calls, in order:
read_file({"path":"src/devops_cli/roadmap/stage/stage_criteria.py"})read_spec({"capability":"roadmap-stage","requirement":"An unmapped criterion is refused"})list_files({"directory":"src/devops_cli/roadmap/stage"})list_files({"directory":"tests/roadmap/stage"})read_file({"path":"src/devops_cli/roadmap/stage/stage_criteria.py","start_line":170,"end_line":400})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_criteria.py"})search_code({"text":"stage_problem_criterion"})search_code({"text":"## Criteria"})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/proposal.md"})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/tasks.md"})read_issue({"number":3391})read_issue({"number":3326})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/specs/roadmap-stage/spec.md"})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/design.md"})read_file({"path":"src/devops_cli/lang/en/messages.py","start_line":3630,"end_line":3680})search_code({"text":"criterion_problems("})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py"})read_file({"end_line":260,"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":150})read_file({"end_line":1210,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1100})git_log({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the"})find_issues({"terms":"criteria entry"})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_text_lines.py","start_line":120,"end_line":170})read_issue({"number":4081})read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md"})read_file({"path":"src/devops_cli/roadmap/plan_check.py","start_line":340,"end_line":410})search_code({"text":"criteria"})search_code({"text":"An issue with no such list gets an empty list"})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_prompt_rules.py","start_line":1,"end_line":80})read_spec({"capability":"roadmap-stage","requirement":"The replay judges the criteria gate on plans with a criteria list"})search_code({"text":"def _self_acceptance_problems"})read_file({"end_line":900,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":820})search_code({"text":"CONST_ROADMAP_REFINE_START_MARKER: Final"})search_code({"text":"def criteria_section"})read_file({"end_line":1570,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1544})read_file({"end_line":3056,"path":"src/devops_cli/config/constants.py","start_line":3046})read_file({"end_line":330,"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":270})search_code({"text":"def _with_criteria"})references({"name":"unmapped criterion"})read_file({"path":"src/devops_cli/roadmap/stage/stage_criteria.py","start_line":180,"end_line":420})list_files({"directory":"src/devops_cli/roadmap/stage"})search_code({"text":"_path_gate"})search_code({"text":"issue_body"})read_file({"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":140,"end_line":260})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":860,"end_line":960})read_file({"path":"tests/roadmap/stage/test_roadmap_stage_eval_gates.py","start_line":240,"end_line":420})search_code({"text":"def check_proposal"})search_code({"text":"stage_problem_criterion"})read_file({"end_line":1300,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1195})read_file({"end_line":3680,"path":"src/devops_cli/lang/en/messages.py","start_line":3630})read_file({"path":"src/devops_cli/roadmap/stage/stage_criteria.py","start_line":30,"end_line":60})read_file({"path":"src/devops_cli/config/constants.py","start_line":3040,"end_line":3060})search_code({"text":"def criteria_section"})read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md","start_line":35,"end_line":70})list_files({"directory":"openspec/changes/3391-refuse-criteria-entries-not-in-the"})find_issues({"terms":"criteria entry"})list_files({"directory":"openspec/changes/3391-refuse-criteria-entries-not-in-the/specs"})read_issue({"number":3391})read_spec({"capability":"roadmap-stage"})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/specs/roadmap-stage/spec.md"})read_spec({"capability":"roadmap-stage","requirement":"The replay judges the criteria gate on plans with a criteria list"})read_spec({"capability":"roadmap-stage","requirement":"An unmapped criterion is refused"})search_code({"text":"stage_criteria_line"})search_code({"text":"criteria_section"})read_file({"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1535,"end_line":1585})search_code({"text":"def _criteria"})search_code({"text":"stage_criteria_line|Group \\{group\\}"})read_file({"end_line":470,"path":"src/devops_cli/roadmap/plan_read.py","start_line":400})search_code({"text":"\"criteria\""})search_code({"text":"two active changes"})search_code({"text":"never modify"})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/design.md"})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/proposal.md"})read_issue({"number":4081})read_issue({"number":3326})read_issue({"number":4069})read_file({"end_line":1200,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":1130})search_code({"text":"\"verdict\": \"good\""})search_code({"text":"def _gate_problems"})search_code({"text":"_one_line"})read_file({"path":"tests/fixtures/roadmap_eval/stage/3173-a-plan-for-an-alert-rule/case.json"})read_file({"path":"tests/fixtures/roadmap_eval/stage/3247-a-plan-that-changes-security-md/case.json"})read_file({"end_line":420,"path":"src/devops_cli/roadmap/stage/stage_eval_gates.py","start_line":255})read_file({"end_line":420,"path":"src/devops_cli/roadmap/plan_check.py","start_line":340})search_code({"text":"An unmatched criteria entry"})search_code({"text":"paths gate reads the body"})find_issues({"terms":"3391"})read_file({"end_line":870,"path":"src/devops_cli/roadmap/stage/stage_change.py","start_line":790})search_code({"text":"_PLAN_CHECK_FILE"})search_code({"text":"PROMPT_RULE_TEST"})git_log({"path":"src/devops_cli/roadmap/stage/stage_criteria.py"})git_log({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the"})search_code({"text":"3326"})search_code({"text":"is no file at the root of the staging commit"})search_code({"text":"These files of the commit are candidates"})search_code({"text":"_gate_problems("})read_file({"end_line":540,"path":"src/devops_cli/roadmap/plan_check.py","start_line":480})read_file({"path":"openspec/changes/3391-refuse-criteria-entries-not-in-the/tasks.md"})find_issues({"terms":"3180"})search_code({"text":"#3180"})search_code({"text":"check_proposal("})search_code({"text":"criteria"})callers({"symbol":"criterion_problems"})read_file({"end_line":165,"path":"tests/roadmap/stage/test_roadmap_stage_text_lines.py","start_line":110})search_code({"text":"issue_body="})read_file({"end_line":2330,"path":"tests/roadmap/stage/test_roadmap_stage_plan.py","start_line":2195})search_code({"text":"## Criteria"})read_file({"end_line":120,"path":"src/devops_cli/roadmap/stage/stage_constants.py","start_line":1})Tool calls: callers=1 (empty=0), find_issues=4 (empty=0), git_log=3 (empty=0), list_files=5 (empty=0), read_file=44 (empty=0), read_issue=7 (empty=0), read_spec=5 (empty=0), references=1 (empty=0), search_code=37 (empty=2)
The stage job read the open pull requests and their files in 1 GraphQL request(s).
dan-petty commentedon Nov 8, 2026
This issue is closed as not planned.
openspec/changes/3391-refuse-criteria-entries-not-in-the/onmain.