Repository navigation
Description
Problem
A staged design.md often restates the issue and gives no reason for the chosen design. The plan fixes of 2026-11-02 found this in at least three plans (#3225 review, #3168, #3205), and each fix agent had to write the rejected alternatives by hand. In several plans the issue's own design was wrong, and a design that states why not the nearest alternative would have shown it:
- docs(openspec): plan #2742 Bound prewarm model label cardinality #3163: the issue says to call
list_models()with no argument; it reads one round-robin server. - docs(openspec): plan #2877 Read check runs only in the implement watch #3168: a reader argument needs an adapter; six alternatives were rejected with one fact each in the fix.
- docs(openspec): plan #2919 stuck-item age metrics and alert #3171: the repository-wide events listing stops at page 300 (HTTP 422).
Proposed change
design.mdmust hold a part## Alternatives(orRejected options) with at least one option, each with one fact from the repository or a command output, not an opinion.check_proposalrefuses a design with no such part, or with an alternative that has no fact (nopath:line, no quoted output and no number).- The model verification pass receives the part and may return a plan for an alternative whose fact is contradicted by the repository.
Acceptance criteria
- A test shows that a design with no
## Alternativespart is refused, and that one with a fact passes. - A test shows that an alternative with no fact (only a sentence of opinion) is refused.
- The planner prompt names the part and the rule, and the test(roadmap): check the planner prompt against its rules #3210 test passes.
- A replay case from docs(openspec): plan #2742 Bound prewarm model label cardinality #3163 or docs(openspec): plan #2877 Read check runs only in the implement watch #3168 is in the golden set.
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
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
A staged design.md often restates the issue and gives no reason for the chosen design. The design already renders a ## Rejected alternatives part from StageProposal.rejected, but the list may be empty and an entry may hold only an opinion. The plan fixes of 2026-11-02 found this in three plans, and in #3163 and #3168 the missing alternative hid a wrong premise. This change makes the stage check refuse a decision with no rejected alternative, and refuses an alternative whose evidence is no fact, before the implementation starts.
Acceptance criteria
Requirement: A decision needs a rejected alternative
The stage check check_proposal SHALL refuse a proposal that holds at least one decision and an empty rejected list.
Scenario: A design states a decision and no alternative
- WHEN A staged
StageProposalholds one decision andrejectedis empty - THEN
check_proposalreturns a problem that names the decision and the## Rejected alternativespart ofdesign.md
Requirement: An alternative with a repository fact passes
The stage check SHALL accept a rejected alternative whose evidence holds one fact, a path:line, a quoted command output or a number.
Scenario: The evidence cites a path and a line
- WHEN A proposal with one decision holds a rejected alternative whose evidence is
src/devops_cli/roadmap/stage/stage_change.py:2355 - THEN
check_proposalreturns no problem for the rejected alternatives
Requirement: An alternative with only an opinion is refused
The stage check SHALL refuse a rejected alternative whose evidence holds no path:line, no quoted command output and no number.
Scenario: The evidence is one sentence of opinion
- WHEN A proposal with one decision holds a rejected alternative whose evidence is
This option is worse. - THEN
check_proposalreturns a problem that names that alternative
Requirement: The design file holds the rejected alternatives
render_change SHALL write each rejected alternative and its evidence under the ## Rejected alternatives part of design.md.
Scenario: A plan with a rejected alternative is rendered
- WHEN
render_changerenders a proposal whoserejectedlist holds one alternative with its evidence - THEN
design.mdholds a## Rejected alternativespart with that alternative and its evidence
Requirement: The planner prompt and the config state the rule
The stage prompt roadmap_stage_change.md and the design rule of openspec/config.yaml SHALL state that a plan with a decision gives at least one rejected alternative with one fact.
Scenario: The prompt and the config hold the rule
- WHEN A test reads
src/devops_cli/ai/tasks/roadmap_stage_change.mdandopenspec/config.yaml - THEN Both texts hold the rule and
## Rejected alternatives, andtest_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposalpasses
Requirement: The verification prompt names the rejected alternatives
The verification prompt roadmap_stage_verify.md SHALL name the rejected alternatives of the plan and the false_premise finding for a fact that the repository contradicts.
Scenario: The verification prompt holds the rule
- WHEN A test reads
src/devops_cli/ai/tasks/roadmap_stage_verify.mdand buildsVerificationInput.payloadof a plan with a rejected alternative - THEN The text names
rejectedandfalse_premise, and the payload holds therejectedlist
Requirement: The golden set holds a case from #3168
The stage replay golden set SHALL hold one case from #3168 whose recorded plan states a decision and no rejected alternative with a fact.
Scenario: The replay runs the new case
- WHEN
uv run devops roadmap eval stage --replayruns the golden set - THEN The
contentgate reports the alternatives defect of the new case
Existing Tool Considered
OpenSpec (https://github.com/Fission-AI/OpenSpec, MIT, maintained, last activity 2026-11-05) gives each change a design.md and validates a change with openspec validate --strict. It lacks a check that a rejected alternative carries one fact from the repository or a command output (a path:line, a quoted output or a number), a refusal of a decision with no rejected alternative at the proposal check, the planner-prompt rule, the verification-prompt rule for a fact that the repository contradicts, and the replay case. The repository builds those parts in content_problems of src/devops_cli/roadmap/stage/stage_change.py, while render_change and the devops openspec new scaffold already write the ## Rejected alternatives part. Written cost to build, keep and fix that code: about 60k tokens, about 15k tokens a year, and about one day.
Key questions
- Where does
check_proposallive, and what role does it have?:check_proposalis defined atsrc/devops_cli/roadmap/stage/stage_change.py:2355. It is the check that the stage job runs on a reply, and the replay'spathsgate calls it, so one rule set judges the job and the replay. [sources: src/devops_cli/roadmap/stage/stage_change.py:2355, docs/ROADMAP_WORKFLOW.md:339, docs/roadmap/plan-check.md:26] - Which file holds the stage planner prompt?:
src/devops_cli/ai/tasks/roadmap_stage_change.md.docs/ROADMAP_WORKFLOW.md:341names it as the stage prompt and as a file that a change of the stage check must treat as a check of the stage job. [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, docs/ROADMAP_WORKFLOW.md:341] - Which test does test(roadmap): check the planner prompt against its rules #3210 add, and where does it live?:
test_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposalintests/roadmap/stage/test_roadmap_stage_prompt_rules.py:96. At line 99 it compares the-key:bullets of the prompt with the fields ofStageProposal. The change adds no key, so it passes. [sources: tests/roadmap/stage/test_roadmap_stage_prompt_rules.py:96, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py:99, openspec/changes/3253-map-all-issue-requirements-to-a/proposal.md:46] - Which test files hold the tests of the stage check?: The tests sit in
tests/roadmap/stage/, among themtest_roadmap_stage_content.py,test_roadmap_stage_form.pyandtest_roadmap_stage_prompt_rules.py.test_roadmap_stage_security.pyis the model for a content rule that needs a part ofdesign.md, with one test of the refusal, one of the passing plan and one of the rendered part. [sources: tests/roadmap/stage/test_roadmap_stage_content.py, tests/roadmap/stage/test_roadmap_stage_form.py, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py, tests/roadmap/stage/test_roadmap_stage_security.py:18] - Which module holds the new alternatives check?: Put the check in
content_problemsofsrc/devops_cli/roadmap/stage/stage_change.py, as a_rejected_problemshelper called beside_security_problems.check_proposalrunscontent_problemsas thecontentgate, so the job and the replay judge it together. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:1795, src/devops_cli/roadmap/stage/stage_change.py:1817, src/devops_cli/roadmap/stage/stage_form.py:1]- Chosen:
content_problemsinstage_change.py. It holds the text rules of a plan, and the security rule is the same shape: a_security_problemshelper that refuses a plan with no part and passes a plan with one. - Rejected:
stage_form.py. That module judges the form of the tasks, theverifycommands and the new test files, not the prose of the design. - Rejected: A new module
stage_alternatives.py. One more module for one rule adds a file to keep and to route into the gate list.
- Chosen:
- What counts as one fact for an alternative?: A
path:line, a quoted command output, or a number. The check refuses an option whose evidence holds none of the three. (best practice) [sources: openspec/config.yaml:32, AGENTS.md:10, src/devops_cli/ai/tasks/roadmap_stage_change.md:17]- Chosen: Accept a
path:line, a quoted output or a number. The project's design rule asks for the evidence that rejected the alternative, and AGENTS.md names a source or a command output as the confirmation; a number is the form that docs(openspec): plan #2919 stuck-item age metrics and alert #3171's HTTP 422 takes. - Rejected: Accept only a
path:line. It refuses a valid fact that a command output shows, such as the HTTP 422 of docs(openspec): plan #2919 stuck-item age metrics and alert #3171. - Rejected: Accept any non-empty sentence. An opinion passes, which is the defect the issue reports.
- Chosen: Accept a
- Which heading does the alternatives part have?:
## Rejected alternatives, the heading that_design_filerenders and thatscaffold_designwrites. The check readsproposal.rejected, so the change adds no second heading name. (best practice) [sources: src/devops_cli/roadmap/stage/stage_change.py:2636, src/devops_cli/openspec/scaffold.py:89, tests/openspec/test_openspec_new.py:101]- Chosen: Keep
## Rejected alternatives. The renderer and thedevops openspec newscaffold already write it, and every active change folder uses it, so the part has one name in the repository. - Rejected: Rename it to
## Alternatives. No code writes that name, so every rendered design and the scaffold would change for a rename that judges no plan. - Rejected: Accept
## Alternatives,## Rejected optionsand## Rejected alternatives. The model writes no heading at all:render_changewrites the part fromproposal.rejected, so extra names would judge nothing.
- Chosen: Keep
- Must every plan hold a rejected alternative, or only a plan that states a decision?: A plan with at least one decision must hold at least one rejected alternative with a fact; a plan with no decision may hold none. Every alternative that a plan holds still needs one fact. (best practice) [sources: tests/fixtures/roadmap_eval/stage/good-2739-the-subprocess-environment-guard-accepts-gh/plan.json:18, tests/fixtures/roadmap_eval/stage/good-2739-the-subprocess-environment-guard-accepts-gh/plan.json:19, src/devops_cli/roadmap/stage/stage_eval_cases.py:25, tests/roadmap/stage/test_roadmap_stage_eval_gates.py:358]
- Chosen: Require one only when the plan holds a decision. A decision is the chosen design that needs a reason.
good-2739is a merged plan with no decision and no alternative, and the golden set says every gate must accept a good plan. - Rejected: Require one for every plan. It refuses the merged plan of
good-2739, whosedecisionsandrejectedare both empty, and so fails the replay's rule that no gate refuses a good plan.
- Chosen: Require one only when the plan holds a decision. A decision is the chosen design that needs a reason.
- Does the verification pass receive the rejected alternatives, and what must change?: The job already passes the whole proposal:
stage.pygiveschange.proposal.model_dump(mode="json")andVerificationInput.payloadputs it underplan. The verification prompt names the decisions and not the rejected alternatives, so the change is the prompt: it SHALL namerejectedand thefalse_premisefinding for a fact that the repository contradicts. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:1660, src/devops_cli/roadmap/stage/stage_verify.py:219, src/devops_cli/ai/tasks/roadmap_stage_verify.md:1, src/devops_cli/ai/tasks/roadmap_stage_verify.md:10]- Chosen: Update the verification prompt only. The payload already holds the
rejectedlist, and the prompt is the missing part: it names the decisions but not the alternatives, so the reviewer is not told to check the fact. - Rejected: Add a field to the verification request. The whole proposal is already in
plan, so a second field would repeat it. - Rejected: Leave the pass unchanged. A contradicted fact then stays a finding that no rule asks the reviewer to make.
- Chosen: Update the verification prompt only. The payload already holds the
- Which gate of the replay judges the new rule?: The
contentgate callscontent_problems, and thepathsgate callscheck_proposal, which callscontent_problemstoo. A case names the new defect with the gatecontentand the typeother, as the feat(roadmap): Require a security section for sensitive plans #3247 security case does. [sources: src/devops_cli/roadmap/stage/stage_eval_gates.py:237, src/devops_cli/roadmap/stage/stage_eval_gates.py:337, src/devops_cli/roadmap/stage/stage_eval_gates.py:213, tests/fixtures/roadmap_eval/stage/3247-a-plan-that-changes-security-md/case.json:22] - Which replay case is added, and does the golden set already hold one from docs(openspec): plan #2742 Bound prewarm model label cardinality #3163 or docs(openspec): plan #2877 Read check runs only in the implement watch #3168?: The set holds no case from docs(openspec): plan #2742 Bound prewarm model label cardinality #3163 or docs(openspec): plan #2877 Read check runs only in the implement watch #3168. Add one from docs(openspec): plan #2877 Read check runs only in the implement watch #3168, whose plan merged as pull request docs(openspec): plan #2877 Read check runs only in the implement watch #3168, with a decision and no rejected alternative with a fact. Its case names one
otherdefect with the gatecontent, and the plan is the reply that the plan pull request first held, before the fix added the six alternatives. (best practice) [sources: openspec/changes/archive/2026-11-03-2916-one-function-decides-when-any-draft/proposal.md:48, src/devops_cli/roadmap/stage/stage_eval_cases.py:44, tests/fixtures/roadmap_eval/stage/3247-a-plan-that-changes-security-md/case.json:22]- Chosen: docs(openspec): plan #2877 Read check runs only in the implement watch #3168. The repository records that its plan merged as pull request docs(openspec): plan #2877 Read check runs only in the implement watch #3168, so the reply before the fix is in that pull request's history and the case can be recorded with the defect.
- Rejected: docs(openspec): plan #2742 Bound prewarm model label cardinality #3163. The repository holds no record of its plan or of a merge commit for it, so the case cannot be recorded from the tree.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 2, 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 fixes a recurring design-quality gap found in at least three plans but does not block a release.It catches wrong design choices earlier and reduces manual fix work for each plan.It needs a check_proposal rule, a planner prompt update, two tests, and a golden-set replay case.Both enforce plan quality in the roadmap pipeline, but the candidate requires a factual alternatives section in design.md while #3253 maps issue requirements to task groups.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at d428c7f (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.
Evidence:
x
devops-cli-service commentedon Nov 5, 2026
Refine cannot set this item to Ready at d254410 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:
design.mdartifact, so a required part of the design has a declared home instead of free-form text.openspec validate --strict), so a proposal that breaks the declared schema is refused.openspec/config.yaml(for example the task-group rule), which is where a required## Alternativespart can be declared and enforced for every change.Lacks:
path:line, quoted output or a number):validate --strictreads no proposal prose, so an opinion-only alternative passes.check_proposal.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.
18 remaining items
devops-cli-service commentedon Nov 14, 2026
Cleared the stop at push by the rule
digest: the runner image changed since the stop, from sha256:f1ce1c28a0fb50a6cf668e7ecf2621ed6cc538620968deaa787eba30d51e5881 to sha256:393d04a07a0962a6e3a13174e6fca704b3a020f52570d1ef80cb8770a6322db9, and the classci_infraof the stop is one that a new attempt can fix. The item is Ready again, and the Service takes it in the next round. The Service clears at most 2 for each class and 6 for each item by digest. A stop of another class, a new stop on this image, and a stop over a limit wait for a commentimplement: retry.docs(openspec): plan #3257 Require a fact for each rejected alternative
docs(openspec): plan #3257 update plan with test builder and cited pa…
docs(openspec): plan #3257 Require a fact for each rejected alternati…
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
devops-cli-service commentedon Nov 23, 2026
Released in v0.198.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.198.0
devops-cli-service commentedon Nov 23, 2026
Live since 2026-11-23 04:05 UTC