Repository navigation
Description
Problem or Motivation
The plan in PR #3261 (for #3201) was staged on a base that main has since passed. Two of its facts were stale when I reviewed it:
- It builds the title rule on
staging_title. fix(roadmap): staging_title cuts the plan title with ... and title_problems refuses it #3249 changedstaging_titleso that it raisesRoadmapStageErrorfor a summary that does not fit, instead of cutting it. - It plans
validate_changeandStagedTreefor a command that reads the pull request through the GitHub client. Both need a checkout (validate_changetakessource, the checkout with the base specs;StagedTreetakes the tracked files of a checkout). The Feasibility quotes the two signatures and does not draw this conclusion.
The first is a stale fact. The second is a precondition of a callee that the plan did not carry into its design. Both reached a reviewer, who had to find them.
Proposed Solution & Architectural Design
- When a plan PR is still a draft and
mainhas changed a file that the plan names underReadsorChanges, the stage job (or adevops roadmap plan-checkrun, feat(roadmap): add a plan-check command for a plan pull request #3201) lists those files and the commits that touched them, so the reviewer sees what moved. - In the stage prompt, ask for the preconditions of each function that the plan calls (the arguments that need a checkout, a client or a network), one line each in
feasibility. - Test with a plan that names
stage_change.pyafter a commit changed it: the list names the file and the commit.
Target Subsystem
src/devops_cli/roadmap/stage.py, src/devops_cli/ai/tasks/roadmap_stage_change.md.
Source: #3261
Proposed design
Problem statement
A staged plan can rest on a base that main has moved past. The reviewer then reads stale facts about the files that the plan names. The stage job must list the named files that main changed after the base and the commits that touched them. The stage prompt must also ask for the preconditions of each function that the plan calls.
Acceptance criteria
Requirement: Named paths that moved
The stage job SHALL list each path that the plan names under Reads or Changes and that a commit on the default branch changed after the plan's base.
Scenario: A named plan path changes on main
- WHEN The plan names
src/devops_cli/roadmap/stage_change.pyunder Reads and a later commit on the default branch changes that file. - THEN The comment of the staged item names
src/devops_cli/roadmap/stage_change.pyand the commit that changed it.
Requirement: Unnamed paths stay out
The stage job MUST NOT list a path that the plan does not name under Reads or Changes.
Scenario: An unnamed path changes on main
- WHEN A commit after the base changes a file that no group of the plan names under Reads or Changes.
- THEN The comment of the staged item does not name that file.
Requirement: Commit order and detail
The stage job SHALL give the short hash and the subject of each commit that changed a listed path, in log order.
Scenario: Two commits change one named path
- WHEN Two commits after the base change a path that the plan names under Changes.
- THEN The comment lists the two short hashes and subjects under that path in log order.
Requirement: No moved paths
The stage job MUST add no moved-file section when no commit after the base changes a path that the plan names.
Scenario: The default branch has not moved a named path
- WHEN No commit after the base changes a path that the plan names under Reads or Changes.
- THEN The comment of the staged item has no moved-file section.
Requirement: Latest default branch
The stage job MUST fetch the default branch before it compares the plan's base with the default branch.
Scenario: The remote default branch advances
- WHEN A remote commit changes a named path after the stage job fetched the base.
- THEN The comment of the staged item lists that path and commit.
Requirement: Prompt asks for preconditions
The stage prompt SHALL ask for one feasibility line for each called function whose arguments need a checkout, a client or a network.
Scenario: The stage prompt loads
- WHEN The stage job loads
src/devops_cli/ai/tasks/roadmap_stage_change.md. - THEN The prompt text names a checkout, a client and a network as preconditions to state in
feasibility.
Existing Tool Considered
No alternatives check has run. Git covers the need: git log --format=%h%x00%s --name-only .. -- lists the commits and files. Git lacks the parsing of the plan's Reads and Changes lists, so the stage job must collect those paths and render the section.
Key questions
- Which command lists the files that main changed after the plan's base?: The stage job lists them in the staged item's comment. The
plan-checkcommand is a separate item (feat(roadmap): add a plan-check command for a plan pull request #3201) and is not a dependency. (best practice) [sources: src/devops_cli/roadmap/stage.py, openspec/changes/3201-add-a-plan-check-command-for/design.md]- Chosen: Stage job. The issue names
stage.py, and the comment of a staged item is the reviewer's record. - Rejected:
devops roadmap plan-check. The command is a separate change (feat(roadmap): add a plan-check command for a plan pull request #3201), so this item would wait on it. - Rejected: Both. Two paths would duplicate the list and add work.
- Chosen: Stage job. The issue names
- Which commit is the base of the comparison?: The commit that the stage job fetched at the start of the run (
StagePlan.sha). The job compares it with the latest default branch before it writes the comment. (best practice) [sources: src/devops_cli/roadmap/stage.py]- Chosen: Fetched base SHA. It is the commit that the plan read and the branch starts from.
- Rejected: The pull request merge base. The stage job holds the fetched base SHA before it opens the pull request.
- Rejected: The current default branch only. It gives no files and no commits.
- How does the job find the files and commits?: It runs
git log --format=%h%x00%s --name-only .. --and keeps the entries for the plan's paths. (best practice) [sources: src/devops_cli/roadmap/clone_git.py, src/devops_cli/roadmap/stage.py]- Chosen: One
git logover the paths. It gives the commits and their files in one local command. - Rejected:
git diff --name-onlythen onegit logfor each file. It makes more calls and repeats the path filter. - Rejected: GitHub API. It adds a network call and a rate limit for data that the clone holds.
- Chosen: One
- Which paths does the job compare?: It compares the union of
readsandchangesof every group in the final plan. It does not comparecreatesseparately becausechangesholds each created path. (best practice) [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_paths.py]- Chosen:
readsandchanges. The issue names these two lists, and they hold the files that the plan depends on and writes. - Rejected:
readsonly. It misses a changed path that the plan writes. - Rejected:
reads,changesandcreates.createsis a subset ofchanges, so it adds no path.
- Chosen:
- Where does the reviewer see the list?: In the comment of the staged item, under a moved-file heading. The draft pull request body stays the same. (best practice) [sources: src/devops_cli/roadmap/stage.py]
- Chosen: Staged item comment. The stage job writes one comment that holds the plan record.
- Rejected: Pull request body. The body is the squash message and has an 800-character limit.
- Rejected: Stage plan report only. The reviewer reads the pull request, not the command output.
- How does the stage prompt ask for preconditions?: It adds one rule to
feasibility: give one line for each called function whose arguments need a checkout, a client or a network. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/stage.py]- Chosen: Prompt rule.
feasibilityis a list of strings, and the model writes it from the prompt. - Rejected: Structured field for preconditions. It changes the reply schema and the validator for one prompt rule.
- Rejected: Validator check on quoted signatures. The model can state a precondition without a signature, so the check would miss the need.
- Chosen: Prompt rule.
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.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It reduces reviewer burden on stale plans but does not block a release or fix a breakage.Reviewers see which files moved and avoid approving a plan built on a stale base.It needs a git diff between the base and main for named files, a commit list, and integration into the stage job or plan-check run.Both work on the plan-check system; #3201 is the umbrella command, the candidate adds a specific stale-file check to it.devops-cli-service commentedon Nov 3, 2026
Status set to Ready at 8e0a486 (see proposed design in issue body).
devops-cli-service commentedon Nov 3, 2026
Staged: branch
feat/3309-a-staged-plan-lists-the-files, draft pull request #3330. 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 40000 tokens:
The plan run made 1 model request(s), and used 72776 input tokens and 3703 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
verify_format group 3: The verify commanduv run devops openspec checkdoes not run the prompt edit of this group. It passes whatever the prompt text says. Evidence: ""verify": "uv run devops openspec check""task_orderat group 4: The test of the new prompt rule comes in group 4, after group 3 writes the rule. New behavior needs the test first. Evidence: "Add a test totests/roadmap/test_roadmap_stage_prompt_rules.pythat loadssrc/devops_cli/ai/tasks/roadmap_stage_change.mdand asserts that its text names a checkout, a client and a network as preconditions offeasibility"docs(openspec): compare moved paths at the stage write
docs(openspec): plan #3309 list moved plan paths in the stage comment (…
7 remaining items
feat(roadmap): Write the moved paths in the comment of a staged item (#…
feat(roadmap): Ask the stage prompt for the preconditions of a callee (…
feat(roadmap): Check the prompt rule and the changed code together (#…
docs(openspec): archive the change (#3309)
feat(roadmap): Make check tests pass (#3309)
devops-cli-service commentedon Nov 6, 2026
Pull request #3805 is ready for review. The checks passed.
Spend: 214 model requests, 16191288 input tokens, 62074 output tokens.
devops-cli-service commentedon Nov 6, 2026
The runner Job devops-cli-runner-20261106-160604-988c ended: succeeded.
Image digest: sha256:dd3a72d4b948128440e588e182561df145a3f88b28a28ab87ac91515910a3fc2
The last lines of its log:
devops-cli-service commentedon Nov 6, 2026
Released in v0.71.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.71.0
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 19:47 UTC
feat(roadmap): Name the live eval score of a prompt change (#5735)