Repository navigation
Description
Problem or Motivation
A spec delta can add a scenario that no task tests, and the plan still passes. The plan of PR #3400 (for #3394) adds the scenario "A What Changes line below the least length" to the MODIFIED requirement "A plan text is no placeholder". No task in its tasks.md adds a test for that line, yet devops openspec check and every check of the pull request pass.
Issue #3321 asks for a check that refuses a scenario with no test, but its acceptance criteria limit the rule to a scenario that names a function or a file. The scenario above names only what_changes and PLAN_FIELD_MIN_CHARS, so the rule as written still passes it. A scenario that names no code still needs a test under tests/ to assert it.
Proposed Solution & Architectural Design
- In
check_proposalofsrc/devops_cli/roadmap/stage_change.py, pair each scenario of every new or modified requirement with a task of abehaviorgroup. A task matches when itstestnames the scenario or the requirement, or when itsverifycommand runs the test module that the plan changes. - Refuse the plan with the scenario name and its requirement when no task matches it. Accept a scenario that names a function or a file through the rule of feat(roadmap): refuse a self-named or untested plan #3321, and accept a scenario that a test asserts without naming it when the plan adds one behavior test task for each new scenario.
- Add a test in
tests/roadmap/test_roadmap_stage_form.pythat refuses a delta whose scenario names only a field, with a task that tests another rule, and that accepts the same delta once a task names the scenario.
Target Subsystem
src/devops_cli/roadmap/stage_change.py (check_proposal), tests/roadmap/test_roadmap_stage_form.py.
Existing Tool Considered
No open, maintained tool covers this repository-specific plan rule. The change extends the existing check_proposal scenario scan, which #3321 starts, and adopts no new dependency. It builds about 3k tokens to implement, about 1k tokens per year to keep and fix, and about half a working day of elapsed time. It deletes no internal code.
Source: #3321
Proposed design
Problem statement
The plan check accepts a spec delta whose scenario no task tests. The plan of PR #3400 adds the scenario A What Changes line below the least length to a MODIFIED requirement, and no task adds a test for it, yet every check passes. The check of #3321 refuses only a scenario that names a function or a file, so a scenario that names a field still passes. The check must pair each new scenario with a task of a behavior group and refuse the plan when no task covers it.
Acceptance criteria
Requirement: A scenario with no covering task is refused
The plan check SHALL refuse a spec delta whose scenario no behavior group covers, and the problem SHALL name the scenario and its requirement.
Scenario: The scenario of the plan of #3400
- WHEN A plan modifies a requirement, adds the scenario
A What Changes line below the least length, and its onlybehaviorgroup tests another rule. - THEN
check_proposalreturns one problem that holds the scenario name and the requirement name.
Requirement: A test task that names the scenario covers it
A behavior group SHALL cover a scenario when its test text holds the scenario name or the requirement name.
Scenario: The test task names the scenario
- WHEN A plan states the scenario
A What Changes line below the least lengthand abehaviorgroup whosetesttext holds that name. - THEN
check_proposalreturns no problem for the scenario.
Requirement: A verify command that runs the changed test module covers the scenario
A behavior group SHALL cover a scenario when its verify command runs a test module that the group changes or creates.
Scenario: The verify command runs the new test module
- WHEN A
behaviorgroup changes a path undersrc/, createstests/roadmap/test_roadmap_stage_content.py, and itsverifyisuv run devops ci test tests/roadmap/test_roadmap_stage_content.py. - THEN
check_proposalreturns no problem for the scenario.
Requirement: A scenario of the base spec needs no new task
The plan check MUST exempt a scenario whose name the base spec of the capability already holds.
Scenario: A modified requirement restates a tested scenario
- WHEN A plan restates in a MODIFIED requirement a scenario that
openspec/specs/roadmap-stage/spec.mdalready holds. - THEN
check_proposalreturns no problem for that scenario.
Requirement: The stage prompt states the rule
The stage prompt SHALL state that each scenario of a spec delta needs a behavior group whose task covers it.
Scenario: The prompt holds the rule
- WHEN A test reads the text of
roadmap_stage_change.md. - THEN The text holds a sentence that asks for a task that covers each new scenario.
Requirement: The replay judges the rule
The replay SHALL judge a recorded plan whose scenario no task covers, under the paths gate.
Scenario: The recorded plan is refused
- WHEN The replay runs the case that holds a plan with a scenario that no task covers.
- THEN The replay reports one defect with the gate
pathsand the problem text as its message.
Existing Tool Considered
No alternatives check has run on this issue. No open, maintained tool covers this repository-specific plan rule: check_proposal judges a plan of this repository against the form of its own OpenSpec change. The change extends the existing check_proposal and adds no dependency. It builds its own code, at a written cost of about 3k tokens to implement, about 1k tokens per year to keep and fix, and about half a working day of elapsed time. It deletes no internal code.
Key questions
- Which module holds the new rule?: A new module
src/devops_cli/roadmap/stage_scenarios.pyholdsscenario_problems, andcheck_proposalcalls it as it calls the other rule families. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_form.py, src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/stage_criteria.py]- Chosen: A new module
stage_scenarios.py. Each rule family of the plan sits in its own module, andcheck_proposalcomposes them. - Rejected: Inline in
check_proposal.stage_change.pyalready holds the reply schema, the render and the measure, and the rule would grow it further.
- Chosen: A new module
- How does a
behaviortask cover a scenario?: Abehaviorgroup covers a scenario when itstesttext holds the scenario name or the requirement name, or when itsverifycommand runs a test module that the group changes or creates. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, docs/ROADMAP_WORKFLOW.md:259]- Chosen: A name match or the changed test module. The model may assert a scenario in a new test module and name it nowhere.
- Rejected: A name match only. A correct plan whose verify runs its new test module would be refused.
- Rejected: One behavior test task for each new scenario. The plan of docs(openspec): plan #3394 Check every plan text for a placeholder #3400 holds one behavior test task, so the count would accept it and the defect stays.
- Does a scenario that the base spec already holds need a task?: No. The check exempts a scenario whose name the base spec of the capability already holds. (best practice) [sources: openspec/changes/3394-the-plan-check-refuses-a-placeholder/specs/roadmap-stage/spec.md, openspec/specs/roadmap-stage/spec.md, docs/ROADMAP_WORKFLOW.md:259]
- Chosen: Exempt the scenarios of the base spec. A MODIFIED requirement restates every scenario of the requirement, so a valid plan would otherwise be refused.
- Rejected: Require a task for every listed scenario. Every plan that restates a tested scenario fails, and the replay fails when it refuses a good plan.
- How does the check learn the scenario names of the base specs?:
check_proposalgets a new keyword-only argument that holds the scenario names of each base spec by capability and requirement, and the code that buildsrequirementsfills it. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]- Chosen: A new keyword-only argument. The existing
requirementsargument holds requirement names only, and a separate argument keeps its value type. - Rejected: Extend
requirementsto hold scenario names. It changes the value type of an argument that the eight caller modules pass.
- Chosen: A new keyword-only argument. The existing
- Where do the new problem texts live?: In
MESSAGES.roadmapinsrc/devops_cli/lang/en/messages.py, with the otherstage_problem_*texts thatstage_change.pyformats. [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_change.py] - Does the stage prompt state the new rule?: Yes. The prompt
roadmap_stage_change.mdstates that each scenario of a spec delta needs abehaviorgroup whose task covers it. (best practice) [sources: tests/roadmap/test_roadmap_stage_prompt_rules.py, tests/roadmap/test_roadmap_stage_form.py]- Chosen: State the rule in the prompt. The model writes the plan, and a refusal costs one more turn of the model.
- Rejected: Leave the prompt unchanged. The model repeats the reply that the check refuses, and the item stalls.
- How does the replay judge the new rule?: A case file holds a plan with a scenario that no task covers, and the replay reports the defect under the
pathsgate asspec_delta_wrongwith the problem text as its message. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:259, src/devops_cli/roadmap/stage_eval_cases.py]- Chosen: Add the case under the
pathsgate.check_proposalis thepathsgate, and a spec delta defect has the typespec_delta_wrong. - Rejected: Change no case file. No test shows that the rule catches the defect, and the replay lists no defect for it.
- Chosen: Add the case under the
- What does the pull request state about the model score?: The body states the score of the same model before and after the change, and names the model. [sources: docs/ROADMAP_WORKFLOW.md:260]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Alternatives check of 2026-11-06: none.
Tool: none found.
Activity
dan-petty commentedon Nov 4, 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.(roadmap)scope of the title gives the scope.It improves plan-check correctness but does not fix a production failure.It catches untested scenarios that would otherwise pass all gates.The body estimates about half a working day and 3k tokens to implement.Both ensure plan coverage of requirements, but #3253 maps all issue requirements to groups while this pairs spec scenarios with test tasks.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 89682e4 (see proposed design in issue body).
devops-cli-service commentedon Nov 6, 2026
Alternatives check: none
Tool: none found
Lacks:
behaviorgroup.verifycommand that runs the changed test module.check_proposalover its own change format, so it must be written insrc/devops_cli/roadmap/stage_change.pyrather than adopted as a dependency.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.
devops-cli-service commentedon Nov 14, 2026
Released in v0.138.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.138.0
devops-cli-service commentedon Nov 14, 2026
Live since 2026-11-14 15:02 UTC