Repository navigation
Description
Problem Description
When devops roadmap stage plans an issue whose premise cannot be built as written, the stage job creates a compensating proposal rather than returning the item.
In issue #3326, the issue requested using spec requirement names in staged criteria. The stage planner recognized in feasibility that this cannot be built as written because #3019 and #3180 require character-for-character copies of person-written criteria. Instead of returning the issue to status/new with evidence per Rule 2 of AGENTS.md, the planner created a compensating plan. The plan duplicated the tasks of issue #3391 under a fabricated requirement name and opened draft pull request #4122.
Reproduction Steps
- Select an issue whose expected behavior contradicts established architectural rules.
- Run
devops roadmap stage <issue>. - Inspect the generated proposal in
openspec/changes/<issue>-<slug>/proposal.md. - Observe that the feasibility section records that the item cannot be built as written, but the job opens a draft pull request with compensating tasks.
Expected vs Actual Behavior
Expected: When the feasibility check or stage probe confirms that an item cannot be built as written, devops roadmap stage returns the item to status/new with evidence (devops roadmap return <issue> --comment "<evidence>"), opens no pull request, and stops.
Actual: The stage planner generates compensating proposals that alter the requirement or address a different issue, and opens a plan pull request.
Environment Diagnostics
- DevOps CLI Version: 0.87.0
- Python Version: 3.14.10
- OS & Architecture: Linux x86_64
- Execution Environment: DevContainer
Logs, Traces, or Terminal Output
The expected output of the issue, a requirement title in place of the issue's criterion, cannot be built as written. ... so the plan keeps the copy and the fold and refuses the entry that no person wrote.
The item repeats the defect of the open item #3391, whose change openspec/changes/3391-refuse-criteria-entries-not-in-the/ plans the same refusal...
Proposed design
Problem statement
The devops roadmap stage job writes a compensating plan when an item cannot be built as written. The plan changes the item's acceptance criteria and repeats another item's work, and the job opens a draft pull request. The stage job must return the item to status/new with evidence, open no pull request and stop.
Acceptance criteria
Requirement: Return on a false premise
The stage job SHALL return the item to status/new with the evidence when the feasibility check finds that the item cannot be built as written.
Scenario: Feasibility check finds a false premise
- WHEN the feasibility check records that the premise contradicts an ADR in force, a spec requirement or a delivered change
- THEN the job runs
devops roadmap return <issue> --comment "<evidence>"and writes no change folder
Requirement: No pull request on a return
The stage job SHALL push no branch and open no pull request when it returns an item.
Scenario: Returned item leaves no branch
- WHEN the stage job returns the item
- THEN
originholds no branch for the item and GitHub holds no draft pull request that plans it
Requirement: No compensating plan
The stage job MUST NOT write a task that changes the item's acceptance criteria or delivers another item's work.
Scenario: Plan would repeat another item
- WHEN the plan would repeat the tasks of an open item under a new requirement name
- THEN the job returns the item, names the other item's number in the evidence, and writes no change folder
Requirement: Probe uses the return path
The stage probe SHALL use the same return path as the feasibility check when it finds a false premise.
Scenario: Stage probe finds a false premise
- WHEN the stage probe finds that the premise cannot be built as written
- THEN the job returns the item with the probe output as evidence and opens no pull request
Requirement: Evidence names the conflict
The return comment SHALL name the ADR, the spec requirement or the item that the premise contradicts.
Scenario: Evidence names the source of the conflict
- WHEN the job returns the item
- THEN the comment on the issue names at least one of the ADR, the spec requirement or the item number
Requirement: Stop after the return
The stage job SHALL stop after the return and run no further step.
Scenario: No step runs after a return
- WHEN the job returns the item
- THEN the job records the return as its result and runs no plan, push or pull request step
Requirement: Status after a return
The return SHALL set the item's Status label to status/new.
Scenario: Returned item is New
- WHEN the job returns the item
- THEN the item carries the label
status/new
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need: the fix is control flow inside the project's own devops roadmap stage job. The change builds its own code. Written cost: about 40,000 tokens to build the return path and its tests, about 20,000 tokens for each later fix, and about 2 days elapsed.
Key questions
- Where does the stage job decide to return the item?: At the feasibility check, before it writes the change folder or pushes a branch. (best practice) [sources: CONTEXT.md]
- Chosen: Feasibility gate before the plan. It costs no plan tokens and leaves no branch or pull request to clean up.
- Rejected: Discard the plan after the probe. It spends the plan budget and can leave a pushed branch.
- Rejected: Keep the compensating plan. It changes the acceptance criteria and repeats another item's work, which the issue reports as the defect.
- Which command returns the item, and what does its comment hold?: The existing
devops roadmap return <issue> --comment "<evidence>"command, with evidence that names the conflict. (best practice) [sources: CONTEXT.md]- Chosen: The existing
devops roadmap returncommand. It already setsstatus/newand writes the comment, so the fix adds no command. - Rejected: A new
devops roadmap stage returncommand. It duplicates a command that does the same work. - Rejected: Close the issue and open a new one. It loses the history of the item.
- Chosen: The existing
- Which findings count as a false premise?: A contradiction with an ADR in force, with a spec requirement or with a delivered change, and a plan that repeats an open item's tasks. (best practice) [sources: CONTEXT.md]
- Chosen: Any feasibility or probe verdict that states the item cannot be built as written. It covers every conflict that the check already reports.
- Rejected: Only a contradiction with an ADR. It misses a spec requirement and a repeated item.
- Rejected: Only the probe output. The feasibility check already sees the conflict before the plan costs tokens.
- Do the feasibility check and the probe share one return path?: Yes. One function returns the item, and both callers use it. (best practice) [sources: CONTEXT.md]
- Chosen: One shared return function. Both paths keep the same evidence, label and stop.
- Rejected: A separate path for each check. The two paths drift, and one keeps the compensating plan.
- How does the job tell a false premise from a hard plan?: The feasibility check and the probe report a flag with the evidence, and the job returns the item when the flag is set. (best practice) [sources: CONTEXT.md]
- Chosen: A flag with the evidence. A test sets the flag and asserts the return.
- Rejected: A keyword match in the plan text. It is brittle and misses a conflict that other words state.
- What Status does a returned item carry?: The Status label
status/new. [sources: CONTEXT.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-10: none.
Tool: none found.
Owner decision 2026-11-13
The premise step of the triage unit (#5508) judges the premise before research. The stage premise probe becomes a guard only. This item keeps its scope: every return writer calls apply_return. Source: tracker #5482, Phase 5.
- Live proof: after the merge and the release, the next stage return runs as the App through
apply_return. A comment gives the result line and the return comment.
Activity
dan-petty commentedon Nov 8, 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 stage job creates incorrect compensating plans and opens draft pull requests with fabricated content, which is a correctness defect in the core workflow.It prevents the stage job from generating wrong plans and draft pull requests, but a person can manually close the draft and return the item as a workaround.The fix requires modifying the stage planning pipeline to check the feasibility result and return the item instead of proceeding to create a compensating plan.Both items deal with returning unbuildable items during stage, but #3011 adds a mechanical probe before the model call, while the candidate fixes the job's action when the model's feasibility section already records that the item cannot bedevops-cli-service commentedon Nov 9, 2026
Status set to Ready at 91ee652 (see proposed design in issue body).
devops-cli-service commentedon Nov 10, 2026
Alternatives check: none
Reason: The searches returned only unrelated documentation pages (MDN web/extension docs) and named no open, maintained tool or library that stages issues, checks feasibility and returns an unbuildable item. The need is control flow inside the project's own
devops roadmap stagejob — a feasibility gate that callsdevops roadmap returninstead of writing a compensating plan — which the issue itself already describes as its own code, so no external tool covers it.Tool: none found
Lacks:
devops roadmap stagedevops roadmap return --commentand settingstatus/newis the project's own commandSearches run:
Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 12, 2026
Scope update from the Service step jobs plan (#5014).
The owner asked on 2026-11-12 for a separate job for each step that the Service jobs run the same way every time. This issue is the
return-writeritem of that plan. The plan is extract-first: each repeated step becomes one module and one command (devops roadmap step <name>) that every caller uses, and then the steps that cost most move to their own Jobs.Proposed title:
fix(roadmap): every return writer calls apply_returnProblem (plan evidence)
Six writers return an item to New, and only 2 use apply_return (src/devops_cli/roadmap/return_item.py:55). The others are stage.py:2707, :2733, :2774, :2800 and :2859; refine.py:3248; implement_run.py:865 and :1162. Each sets the comment, the Status and the record keys in its own order. #4131 adds the stage premise return, which is one more path.
Added scope
Keep the #4131 scope and add: every return writer calls apply_return (comment first, then the Status through the Status writer, then the record keys, with a read-back). One close function closes a draft and deletes its branch with a lease on the judged tip. PR #4978 changes return_item.py, so start after it merges.
Cost: about 0.8M tokens and 1 agent-day.
Added acceptance
Merge first
devops-cli-service commentedon Nov 16, 2026
Released in v0.160.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.160.0
devops-cli-service commentedon Nov 16, 2026
Live since 2026-11-16 03:02 UTC