Repository navigation
Description
Split from #3830.
Problem or Motivationimplement/implement.py ticks a task when the exit checks of its group pass. A prompt change needs a live eval score, and the job records none. The step shell holds no key, and the local command table holds only commands that need no key. So the step cannot run uv run devops roadmap eval stage --limit <n>. The job ticks the task and the score is missing. The review of #3805 found this gap.## Why it is deferredThe score must come from a place that holds the model key: a person's workstation or a workflow. #3398 owns the readiness rule that reads the pull request body. This part waits on that rule, and the plan rule of #3830 lands first.## Acceptance criteria- The readiness function keeps a pull request in draft when it changes src/devops_cli/ai/tasks/roadmap_stage_change.md and its body holds no live score of the base branch and of the head branch.- The function comments the missing score, and it marks the pull request ready once a person adds both scores.- The implement job leaves the score task unticked until the pull request body holds both scores.- A test asserts each case offline with a fake pull request body.
Proposed design
Problem statement
A prompt change needs a live eval score before it merges. The implement job ticks the score task, and the step shell holds no model key, so the job records no score. The draft readiness rule must hold a prompt-change pull request in draft until its body holds the base score and the head score.
Acceptance criteria
Requirement: Prompt change stays draft with no score
The draft readiness function SHALL return not ready for a draft pull request that changes src/devops_cli/ai/tasks/roadmap_stage_change.md and holds no eval score in its body.
Scenario: Prompt change with no score
- WHEN the function reads a draft pull request whose changed files hold
src/devops_cli/ai/tasks/roadmap_stage_change.mdand whose body holds noBase eval score:line and noHead eval score:line - THEN the function returns not ready and its reason names the base score and the head score
Requirement: Prompt change with one score stays draft
The draft readiness function SHALL name only the score that the body of a prompt-change pull request lacks.
Scenario: Prompt change with one score
- WHEN the function reads a prompt change whose body holds a base eval score and no head eval score, or a head eval score and no base eval score
- THEN the function returns not ready and its reason names only the missing score
Requirement: No score rule for another change
The draft readiness function SHALL NOT apply the score rule to a pull request that changes no file of the stage prompt.
Scenario: Change without the prompt file
- WHEN the function reads a draft pull request whose changed files hold no
src/devops_cli/ai/tasks/roadmap_stage_change.mdand whose body holds no score - THEN the function returns ready when completeness and the check runs pass
Requirement: Both scores mark ready
The draft readiness function SHALL return ready for a prompt change whose body holds the base eval score and the head eval score.
Scenario: Prompt change with both scores
- WHEN the function reads a prompt change whose body holds a
Base eval score:line and aHead eval score:line, each with a number - THEN the function returns ready and its reason is empty
Requirement: The score reader takes the last marker line
The score reader SHALL take the last line of each score marker and SHALL treat a marker with no number as missing.
Scenario: A repeated marker and a marker with no number
- WHEN the body holds two
Base eval score:lines, the last with a number, and aHead eval score:line with no number - THEN the function returns not ready and its reason names the head score only
Requirement: The implement job names the missing score
The implement job MUST keep a prompt-change pull request in draft and MUST name each missing score in the comment that it posts on the pull request.
Scenario: The ready step of a prompt change with one score
- WHEN the ready step of a prompt change reads a body that holds one score
- THEN the job stops the item, the comment that it posts on the pull request names the missing score, and the job marks no pull request ready
Requirement: The body form accepts the two score lines
The body form SHALL accept a pull request body whose Change: line is followed by a Base eval score: line and a Head eval score: line.
Scenario: Score trailer lines pass the body form
- WHEN the body form check reads a body with the text, a
Closes #<issue>line, aChange:line, and the two score lines after theChange:line - THEN the body form check returns no problem
Requirement: Offline tests for each score case
The change MUST add an offline test that asserts each score case with a fake pull request body.
Scenario: Offline score cases
- WHEN the test runs with fake bodies that hold no score, a base score only, a head score only, and both scores
- THEN each case asserts the readiness answer and the reason that names the missing score
Existing Tool Considered
No check has run. No open, maintained tool or library covers a draft gate that reads two live eval scores from a pull request body. GitHub's required status checks gate a merge, need a repository ruleset change, and cannot hold a draft. The project builds the rule itself at about 20k tokens and 2 days to build, keep and fix.
Key questions
- Which function decides that a draft pull request is ready for review?:
draft_readinessinsrc/devops_cli/roadmap/implement/implement_pull.pydecides. It runs completeness first, then the check runs, then each extra check. The implement job, the stage row,devops pr readyandcheck-readinessask it, so the score rule goes into that one function and every caller gets it. [sources: CONTEXT.md, src/devops_cli/roadmap/implement/implement_pull.py, src/devops_cli/commands/pr.py, src/devops_cli/roadmap/implement/implement_run.py, src/devops_cli/roadmap/stage/stage_ready.py] - Does the draft hold the pull request body and the changed files?:
PullStatusalready holdsbody, whichget_pull_statusreads frompulls/<n>.Draftholds no changed files, andread_draftreads the compare files only for an implement pull request, after the issue lookup of its branch. The change addsfilestoDraft. [sources: src/devops_cli/github/client.py, src/devops_cli/roadmap/implement/implement_pull.py] - How does the rule learn the changed files of a pull request?:
read_draftreads the compare files once, for every kind, before the issue lookup, and passes them toDraft.files. The ready step of the implement job passes the paths of a localgit diff --name-only origin/<default> HEAD, so it makes no request. (best practice) [sources: src/devops_cli/roadmap/implement/implement_pull.py, src/devops_cli/github/client.py, src/devops_cli/roadmap/implement/implement_run.py]- Chosen: Compare files once for every kind. It is the request that the implement kind already makes, and it gives the merge-base diff of the pull request.
- Rejected: The file list of the pulls endpoint. No client method reads that list today, and it is no merge-base diff.
- Rejected: A flag that each caller sets. Three call sites can forget the flag, and a forgotten flag bypasses the gate.
- How does the pull request body record the base score and the head score?: The body holds two trailer lines after the
Change:line:Base eval score: <number>andHead eval score: <number>. The rule takes the last line of each marker, and a marker with no number counts as missing. (best practice) [sources: src/devops_cli/roadmap/pull_form.py, docs/ROADMAP_WORKFLOW.md]- Chosen: Marker lines after the Change: line. The body form accepts free-form trailer lines of at most 400 characters, and a fixed marker gives a stable parse and a stable missing-score message.
- Rejected: A free-text search for a score in the body. Free text can match the wrong number, and it gives no stable message.
- Rejected: A comment on the pull request. The squash commit keeps the body and not the comments, and the issue asks for the body.
- Where does a person run the live eval?: A person runs
uv run devops roadmap eval stageon a workstation that holds the gateway key, once at the base commit and once at the head commit, and adds both scores to the body. The step shell gets none of the job's variables, so the step cannot run the command. (best practice) [sources: docs/ENV_VARS.md, CONTEXT.md, docs/adr/0004-ci-is-the-authoritative-gate.md, docs/ROADMAP_WORKFLOW.md]- Chosen: A person's workstation. The workstation keyring holds the AI key, and the step shell gets none of the job's variables.
- Rejected: A GitHub Actions workflow. The workflow needs the key in a GitHub Actions secret, and ADR 0004 keeps the privileged key in the cluster Secret and the workstation keyring.
- Who posts the missing-score comment, and who marks the pull request ready?: The readiness function is pure and only returns the reason, so the caller acts. The implement job stops the item, and its stop comment on the pull request names each missing score.
devops pr readyprints the same reason and exits 1, and it marks the pull request ready once a person adds both scores. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/implement/implement_run.py, src/devops_cli/commands/pr.py, src/devops_cli/roadmap/implement/implement_pull.py]- Chosen: The caller acts on the reason. CONTEXT.md calls draft readiness a pure function, and the job already comments on the pull request while the commands print the reason.
- Rejected: The readiness function posts the comment. That gives the pure function a GitHub client, and its table test would need a fake.
- Does this change leave the live-score task unticked?: No. The change holds the pull request in draft, and it defers the tick rule. The job ticks every task of a group whose exit checks pass, and its group loop takes the first group with an unticked task, so one unticked task makes the loop run that group again. The job also writes the body after the groups run, so the scores cannot be in it at tick time. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/implement/implement_run.py]
- Chosen: Defer the tick rule and the body write. The tick rule and the body write must change together, and the draft gate alone stops a merge without a score.
- Rejected: Leave the score task unticked in this change. The group loop would run that group again on every pass, and the body holds no score at tick time.
Fit
Fits in one pull request.
Suspected block
None.
Activity
devops-cli-service commentedon Nov 7, 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 prevents a missing live score in a prompt-change pull request, but it waits on #3398.It protects prompt changes from merging without a live score.It needs a readiness change, comments, an implement job change and offline tests.Both items concern a live eval score for a prompt change. #3830 sets the plan rule; the candidate enforces the score at readiness and in the implement job.[-]feat(roadmap): keep a prompt change in draft until a live eval score is recorded[/-][+]feat(roadmap): Hold prompt change in draft until live score recorded[/+]devops-cli-service commentedon Nov 7, 2026
The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.
feat(roadmap): keep a prompt change in draft until a live eval score is recordedfeat(roadmap): Hold prompt change in draft until live score recordeddevops-cli-service commentedon Nov 8, 2026
Refine cannot set this item to Ready at 1f03ee3 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 14, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
fix(roadmap): import the stage prompt path inside the score rule (#4005)
devops-cli-service commentedon Nov 15, 2026
Released in v0.146.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.146.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 00:23 UTC