Repository navigation
Description
Problem or Motivation
Stage checks the premise of an item at its start, after research and refine spent tokens on it. 36 of the 59 stage golden cases hold a false_premise defect. Today 28 bot items wait for a person for a median of 6 days, against the fix-before-refuse rule of #4843. The approved pipeline split design (tracker #5482) judges the premise in the triage unit, after intake and before research.
Proposed Solution & Architectural Design
- Add a premise step after intake: in the triage unit (feat(roadmap): run intake and scoped intake in their own pods #4567), or in the intake row until that unit ships. At most 5 items for each pass, and no clone.
- Due: an item with
status/new, a priority and nopremise.verdictfor the current outside hash (body_hashes). - Rules first (
premise.py). Jev runs in shadow at the decision pointpremise.verdict(ADR 0020). - Write
premise.{verdict, rule, at}. A reject is a recommendation. The job never closes an item. - Before it writes the person cause
premise_reject, the step runs the fixable check and one repair (feat(roadmap): track progress-aware caps and fix-before-refuse #4843). - The premise probe at stage start becomes a guard only (fix(roadmap): return unbuildable premise items during stage #4131). feat(roadmap): detect already-merged issue changes in stage #4113 stays the stage check for changes that merged after intake.
- Mode
planuntil 30 shadow cases. A person confirms or refuses the 30 reject recommendations (owner step).
Target Subsystem
Roadmap Service and roadmap jobs (src/devops_cli/roadmap/, the triage unit).
Acceptance Criteria
- Test first: a table test gives the verdict and the rule of each fixture. The test fails on the base.
- A test: a refine write does not make the premise step due again.
- A test: the step sends no close request.
- A test: a person cause comes only after one repair.
- Live proof: after the merge and the release, the step runs as the App in mode
planon the new items of 7 days. A comment on this issue gives the result lines and the share of reject recommendations that a person confirms (target 80 % or more after 30 cases).
Existing Tool Considered
premise.py, refine_judge.py and Jev (devops ai ask-jev) exist. No open tool judges a premise against this repository. Build: 200,000 to 500,000 agent tokens and 1 day. Model spend: about one Jev call for each new item (about 140 a week).
Related
Tracker #5482, Phase 5. Depends on #5504. #4131 (stage guard), #4113 (already merged changes in stage), #4867, #4026, #4843, #2968 (person-cause gauges), #4567.
Source: #5482
Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Searches for open issue-triage and premise-judging tools found none that judges an item's premise against a repository's code and roadmap records; the issue's own tooling is bespoke.
Lacks:
- No rule-first premise verdict with Jev in shadow
- No due rule on status, priority and body hash
- No five-item pass over the GitHub API without a clone
- No fixable check and one repair before the person cause
- No write of premise verdict into the issue job record
Proposed design
Problem statement
Stage checks an item's premise only after research and refine spend tokens on it. 36 of 59 stage golden cases hold a false_premise defect, and 28 bot items wait for a person for a median of 6 days. This item adds a premise step after intake. The step writes a recommendation and closes no item. A person confirms the reject recommendations before a later change turns the step on.
Acceptance criteria
Requirement: Due rule
The premise step SHALL judge an item only when it has status/new, a priority/* label and no premise.verdict for the current hash from body_hashes.
Scenario: An item already judged
- WHEN A test builds an item with
status/new, apriority/*label and apremise.verdictthat names the current hash. - THEN The due rule returns no item, and the step sends no request for it.
Requirement: Cap of five items
One pass SHALL judge at most 5 items and MUST read them through the GitHub API with no clone.
Scenario: Eight items are due
- WHEN A test gives 8 due items to one pass.
- THEN The pass writes 5 verdicts, 3 items stay due, and the test records no clone command.
Requirement: Rule before Jev
The decision point premise.verdict SHALL return the band of a proven rule first and MUST run Jev in shadow only.
Scenario: A rule and Jev disagree
- WHEN A test gives a fixture that a rule of
premise.pymatches and a Jev answer of the other band. - THEN The point returns the band of the rule and records the Jev band as shadow.
Requirement: Rule table test
A table test SHALL give the expected verdict and rule of each fixture through the rule resolver.
Scenario: Each fixture gets its verdict and rule
- WHEN The test runs each fixture of the table through the rule resolver.
- THEN Each fixture gets its expected verdict and rule name.
Requirement: Marks and no close
The step SHALL write premise.verdict, premise.rule and premise.at to the job record block of the item and MUST send no close request.
Scenario: A reject recommendation
- WHEN A test runs the step on an item whose premise a rule rejects.
- THEN The job record holds
premise.verdictrejectwith its rule and time, and the recorded GitHub calls hold no close request.
Requirement: One repair before the cause
The step SHALL run the fixable check and at most one repair before it writes the person cause premise_reject.
Scenario: The repair makes the premise true
- WHEN A test gives an item whose premise the fixable check repairs in one round.
- THEN The step writes no
premise_rejectcause and records one repair.
Requirement: Refine write keeps the verdict
A refine write to the refine block MUST NOT change the outside hash and SHALL NOT make the premise step due again for that item.
Scenario: Refine writes its proposal
- WHEN A test records a premise verdict for an item and then runs a refine write on its body.
- THEN The outside hash from
body_hashesstays the same, and the due rule returns no item for the new body.
Requirement: Stage probe is a guard
The premise probe at the start of stage MUST act as a guard and SHALL make no new premise judgement.
Scenario: An item with a recorded verdict reaches stage
- WHEN A test starts stage on an item whose job record holds
premise.verdict. - THEN The stage start reads the verdict and makes no premise model call.
Requirement: Pending a person after the merge
After the merge and release, the step SHALL run as the App in mode plan on new items of 7 days, and a comment on this issue MUST give the result lines and the share of reject recommendations that a person confirms.
Scenario: Live proof after release
- WHEN The step runs as the App in mode
planon new items of 7 days after the release. - THEN A comment on this issue gives the result lines and the share of reject recommendations that a person confirms, with a target of 80 % or more after 30 cases.
Existing Tool Considered
The alternatives check block in the issue body records verdict none and Tool: none found. No open, maintained tool or library judges a roadmap item's premise against this repository. The proposal builds premise.py on refine_judge.py and Jev (devops ai ask-jev). Written cost: 200,000 to 500,000 agent tokens and 1 day to build, keep and fix, plus about one Jev call for each new item (about 140 a week). The proposal supplies the missing parts in premise.py and the intake row.
Key questions
- Where does the premise step run until the triage unit feat(roadmap): run intake and scoped intake in their own pods #4567 ships?: It runs in the intake row of the sweep. The row judges at most 5 items that intake placed, reads them through the GitHub API with no clone, and moves into the triage unit when that unit ships. (best practice) [sources: CONTEXT.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
- Chosen: Intake row. The issue body allows this row until feat(roadmap): run intake and scoped intake in their own pods #4567 ships, and the row already lists each new item.
- Rejected: Wait for the triage unit feat(roadmap): run intake and scoped intake in their own pods #4567. This blocks the work on a unit that has not shipped.
- Rejected: A row of its own. A new row needs a schedule entry and a lane, which costs more than the cap of 5 items for each pass.
- How does the decision point
premise.verdictdecide?: A proven rule ofpremise.pyanswers first. When no rule answers, the point asks Jev and records its band in shadow. The band of the rule or the current behavior stands. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, src/devops_cli/roadmap/stage/stage_jev_screen.py]- Chosen: Rule first, Jev in shadow. ADR 0020 puts a proven rule before the decision model and gives the model a shadow mode.
- Rejected: Jev decides. ADR 0020 says the point returns a band, and the model stays in shadow until the cases prove it.
- Rejected: Rules only. No rule covers a new premise, and the shadow cases give the data to add rules.
- Where does the step write
premise.verdict,premise.ruleandpremise.at?: In the job record block of the issue body. A due mark in Valkey only makes the next pass sooner. (best practice) [sources: docs/adr/0016-labels-hold-the-roadmap-items-fields.md, CONTEXT.md, src/devops_cli/roadmap/body_hash.py:444]- Chosen: Job record in the issue body. ADR 0016 puts the job record in the issue body, and labels hold only the four item fields.
- Rejected: A Valkey key. A due mark has a TTL and is never the only copy of a decision (ADR 0021).
- Rejected: A new label. Labels hold Status, Priority, Value and Effort only (ADR 0016).
- How does the step avoid a
premise_rejectcause with no repair?: The step runs the fixable check and at most one repair. Only an item that the repair does not fix gets the causepremise_reject(feat(roadmap): track progress-aware caps and fix-before-refuse #4843). (best practice) [sources: src/devops_cli/telemetry/instruments.py]- Chosen: Fixable check and one repair. feat(roadmap): track progress-aware caps and fix-before-refuse #4843 fixes an item before it refuses it, and the cause has its own gauge.
- Rejected: Write the cause at once. It breaks the fix-before-refuse rule of feat(roadmap): track progress-aware caps and fix-before-refuse #4843.
- What does the premise probe at the start of stage do after this change?: It becomes a guard. It reads the recorded
premise.verdictand makes no new judgement. feat(roadmap): detect already-merged issue changes in stage #4113 stays the stage check for changes that merged after intake. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, src/devops_cli/roadmap/stage/stage_jev_screen.py]- Chosen: Guard on the recorded verdict. The premise is judged after intake, so a second judgement at stage start spends tokens on the same item.
- Rejected: Keep the probe as it is. It repeats the work that this item moves to the triage unit.
- Which mode does the premise step ship in?: Mode
plan. The step writes recommendations only and closes no item. The decision point runs Jev in shadow. A person confirms or refuses the reject recommendations before a later change turns the step on. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, CONTEXT.md]- Chosen: Mode plan. The issue body asks for mode plan until 30 shadow cases, and a wrong reject costs a person's time.
- Rejected: Mode on. No case has proved the rules.
- Rejected: Mode off. Off gives no shadow case, so the 30 cases never arrive.
- Which function gives the outside hash of an item body?:
body_hashesinsrc/devops_cli/roadmap/body_hash.pyreturns the hashes of a body. The due rule compares the recorded hash with the current hash from it. [sources: src/devops_cli/roadmap/body_hash.py:444]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 13, 2026
Both check whether an item premise is buildable, but the candidate adds a new triage-unit step before research while #4131 returns unbuildable items during stage.devops-cli-service commentedon Nov 18, 2026
Refine cannot set this item to Ready at 86358b6 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 20, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Searches run:
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.