Repository navigation
Description
Problem or Motivation
No step checks an item against the ADRs and standards in force for its scope labels before refine and stage. The resolver needs a poor standards fit as a cause, and no step writes it. The approved pipeline split design (tracker #5482) adds a standards step and a suggestions step to the research unit.
Proposed Solution & Architectural Design
- Step 3
standards: a rubric over the ADRs in force and the standards for the scope labels of the item. It gives a score and the gaps. Jev scores the closed rubric choice. - Step 4
suggestions: improvements, as text for refine. - Each step writes
research.standardsorresearch.suggestionswith itsatand the outside hash. - A poor fit writes the resolve cause.
- Both steps stay in mode
planuntil E5 shows a lift for them.
Target Subsystem
Roadmap Service and roadmap jobs (src/devops_cli/roadmap/, the research unit).
Acceptance Criteria
- Test first: a fixture item that breaks an ADR in force gets that gap. The test fails on the base.
- A test: a poor fit writes the resolve cause.
- Live proof: after the merge and the release, the two steps run as the App in mode
planon 5 items of the stage window. A comment on this issue gives the result lines and the gaps.
Existing Tool Considered
Jev (rubric scores) and the ADR set in docs/adr/ cover the inputs. No open tool scores an item against these ADRs. Build: 200,000 to 400,000 agent tokens and 1 day.
Related
Tracker #5482, Phase 6. Depends on #5513 and #5512. #4805, #5049, #4830.
Source: #5482
Alternatives check of 2026-11-30: partly.
Tool: backstage/community-plugins (https://github.com/backstage/community-plugins), Apache-2.0, last activity 2026-11-30, maintained.
Reason: The searches found only the Backstage tech-insights scorecards in backstage/community-plugins: weighted checks give a score and the failed checks, but it reads no ADRs in force and writes no roadmap record, so it covers a part.
Covers:
- Weighted checks that give one total score
- Failed checks show the gaps of an item
- Checks run on collected facts, not on model text
Lacks:
- No read of the ADRs in force or their supersede status
- No table from scope labels to checks
- No roadmap job record, resolve cause or suggestion text
- Needs a Backstage app and a catalog entity
Proposed design
Problem statement
No research step checks an item against the ADRs in force and the standards for its scope/* labels before refine and stage. The resolver has no poor standards fit cause, and refine gets no suggestions. This change adds step 3 standards and step 4 suggestions to the research unit. Each step writes a record with its at and the outside hash. A poor fit writes the standards resolve cause. Both steps stay in mode plan until the evaluation shows a lift.
Acceptance criteria
Requirement: Gap from a broken ADR
The standards step SHALL write each rubric gap of the item and the ADR or guideline that it breaks.
Scenario: An item that breaks an accepted ADR
- WHEN the test runs the standards step on a fixture item that breaks an ADR with status
acceptedindocs/adr/ - THEN the decoded
research.standardsrecord holds a gap that names that ADR's number and the rubric check, and the test fails on the base commit
Requirement: Only ADRs in force
The standards step MUST read only the ADRs that are in force: an accepted ADR, or one with no status, that no ADR supersedes.
Scenario: A superseded ADR
- WHEN the test runs the standards step on a fixture item that breaks only a superseded ADR
- THEN the decoded
research.standardsrecord holds no gap for that ADR
Requirement: Score from the closed rubric
The standards step MUST give one band of the closed decision-point set continue, review or flag.
Scenario: An item that passes each rubric check
- WHEN the test runs the standards step on a fixture item that passes each check of its
scope/*labels - THEN
research.standards.scoreis thecontinueband andgapsis an empty list
Requirement: Poor fit writes the resolve cause
A poor standards fit MUST write the standards resolve cause that the resolver reads.
Scenario: An item in the flag band
- WHEN the test runs the standards step on a fixture item whose score is the
flagband - THEN the item's job record holds the
standardsresolve cause, and the resolver returnsstandardsfor the item
Requirement: Plan mode changes no decision
Both steps MUST write their records and change no band, label or status while their mode is plan.
Scenario: A plan-mode run on an item that breaks an ADR
- WHEN the test runs both steps in mode
planon a fixture item - THEN both decoded records hold
atand the outside hash, and the item keeps its labels and its status
Requirement: Suggestion text for each gap
The suggestions step SHALL write one improvement text for each standards gap.
Scenario: Two gaps in the standards record
- WHEN the test runs the suggestions step with a fake model on a standards record with two gaps
- THEN the decoded
research.suggestionsrecord holds two texts, each text names its gap, and no text is a finding
Requirement: Stale record after a body change
Each record MUST hold the outside hash of the item text that the step read.
Scenario: The item body changes after a run
- WHEN the test changes the body of the item and runs the step again
- THEN the step writes a new record with a different outside hash and does not reuse the old record
Requirement: Research keys survive a record decode
The research record keys MUST join the job record's known keys so a decode keeps them.
Scenario: A job record that holds both research records
- WHEN the test decodes a job record that holds
research.standardsandresearch.suggestions - THEN
decode_job_recordreturns both keys with their values
Requirement: Scope labels select the checks
The standards step SHALL run only the rubric checks that the item's scope/* labels select.
Scenario: An item with the scope/docs label
- WHEN the test runs the standards step on a fixture item with the
scope/docslabel - THEN
research.standards.gapsnames only the checks of that scope and the project-wide checks
Requirement: Pending a person after the merge
The two research steps MUST run as the App in mode plan on 5 items of the stage window after the merge and the release.
Scenario: Live proof after the release
- WHEN a person runs the live proof after the merge and the release: the two steps run as the App in mode
planon 5 items of the stage window - THEN a comment on this issue gives the result lines and the gaps
Existing Tool Considered
backstage/community-plugins (https://github.com/backstage/community-plugins), Apache-2.0, maintained: the alternatives check of 2026-11-23 gives the verdict partly; its block in the issue body gives what the tool covers and lacks. The proposal builds its own code instead, at the cost the body gives: 200,000 to 400,000 agent tokens and 1 day. It adds the ADR-in-force read, the scope/* label map, the roadmap job records, the resolve cause and the suggestion text that the tool lacks.
Key questions
- Which component gives the standards score?: The standards step uses the decision-point shape of ADR 0020. It gives one band of the closed set
continue,revieworflag. Jev answers the closed rubric questions. The step writes the band and the gaps toresearch.standardsand returns no text. Ifai.decision_modelis empty, the rule or fallback gives the band. (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, src/devops_cli/roadmap/decision_step.py]- Chosen: Decision point with Jev. ADR 0020 makes the score a band of a decision point, the body names Jev, and
Bandfixes the closed set. - Rejected: Generative model writes the score. ADR 0020: a point returns a band and never a text.
- Rejected: Count of passed checks only. The body asks Jev to score the closed rubric choice.
- Chosen: Decision point with Jev. ADR 0020 makes the score a band of a decision point, the body names Jev, and
- Which standards are in force, and which label names the scope that selects them?: The ADRs in force are an accepted ADR, or one with no status, that no ADR supersedes (
Adr.in_force). The guidelines are the entries ofdocs/guidelines/index.md. The scope is thescope/*label family in.github/labels.yml. The step readsitem.labels, because a scope label is not anItemField. [sources: src/devops_cli/roadmap/adr.py, docs/guidelines/index.md, .github/labels.yml, src/devops_cli/roadmap/stores/store.py] - How does a
scope/*label select the standards?: The research unit holds a checked-in table with one row for eachscope/*label in.github/labels.yml. Each row names the ADRs in force and the guideline sections that the label selects. A check with no scope row is project-wide. A test asserts the rows. (best practice) [sources: .github/labels.yml, src/devops_cli/roadmap/adr.py, docs/guidelines/index.md]- Chosen: Checked-in scope table. The repository holds no map, the standards stay in git, and a table gives a check a result to assert.
- Rejected: Read every ADR and guideline for every item. A
docsitem would be scored against ADR 0021, and the gaps would be noise. - Rejected: A model picks the standards. ADR 0005: a finding comes from a tool or a checked fact, and a model only explains and plans.
- Where do the two records live, and what does each hold?: Both records live in the hidden job record of the item body. A
ResearchRecordKeyfamily joinsJobRecord,_JOB_RECORD_KEYSand__all__. The job record's values arestr | None, so each record is a JSON string.research.standardsholdsscore,gaps,atand the outside hash.research.suggestionsholds the texts,atand the outside hash. (best practice) [sources: src/devops_cli/roadmap/stores/store.py]- Chosen: One JSON record for each step. The job record's values are
str | None, JSON-valued keys such asimplement.wipandstage.rejectedare the existing pattern, and the issue names one record for each step. - Rejected: A flat key family. The issue writes one record for each step, and a flat family needs a key for each field.
- Rejected: A comment on the issue. The job record is the one hidden block every job writes; a comment is the event, not the record.
- Chosen: One JSON record for each step. The job record's values are
- What is the outside hash?: The outside hash is the SHA-256 hex digest of the item text outside the step's own block and refine's section.
hash_textandbody_hashescompute it insrc/devops_cli/roadmap/body_hash.py. The alternatives check records the same hash asalternatives.body_hash, and the stage job asstage.text_hash. It covers the body text only; a label is not part of it. [sources: src/devops_cli/roadmap/body_hash.py, src/devops_cli/roadmap/stores/store.py, docs/ROADMAP_WORKFLOW.md] - Where does the resolver read a resolve cause, and which causes does it accept?: The resolver of feat(roadmap): eval stage leaves out one research section #5512 and feat(roadmap): one research unit runs its steps just in time #5513 reads a cause from the item's hidden job record. The existing cause reader
has_person_causeis the pattern. This change writes thestandardscause to that record. The cause set is closed in the research unit of feat(roadmap): eval stage leaves out one research section #5512 and feat(roadmap): one research unit runs its steps just in time #5513. [sources: src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/phase.py] - Which cause name does the standards step write?:
standards, the name of the step and of its record. The record and the resolver use one name. The project uses short snake_case cause names, andstandardsfits. (best practice) [sources: src/devops_cli/telemetry/instruments.py, src/devops_cli/roadmap/phase.py]- Chosen: Name after the step (
standards). One name for the record and the resolver, distinct from the other causes, and it matches the typed-cause naming. - Rejected: Reuse an existing cause. A poor standards fit is a new cause, and a re-used cause hides it.
- Rejected: Write no cause. The resolver needs the cause, and this is the purpose of the change.
- Chosen: Name after the step (
- Which mode do the two steps ship in, and what does that mode change?: Both steps ship with their mode set to
plan, as the body says. The mode is a setting of the research steps, not theoff,shadoworonmode ofroadmap.decisions. In that mode they write the two records and the resolve cause, and change no band, label or status. A later change flips the mode after the evaluation shows a lift. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, docs/CONFIGURATION.md]- Chosen: Plan. The body keeps both steps in plan until the evaluation shows a lift.
- Rejected: On. No evaluation shows a lift yet, so the steps change no decision.
- Rejected: Off. The two records and the cause are the purpose of the change.
- How does the suggestions step write its text, and is that text a finding?: A generative model writes the text from the gaps of the standards record. The text is a lead and never a finding. It changes no state of the item. ADR 0005 keeps a model's output apart from findings, with no field that can create or change one. (best practice) [sources: CONTEXT.md, docs/adr/0005-review-findings-come-from-tools-not-models.md]
- Chosen: Generative model text, stored as a lead. The glossary says a suggestion from a model is a lead and never a finding.
- Rejected: Template text from the gaps. A template gives no improvement that fits the item.
- Rejected: Model finding. ADR 0005 and the glossary forbid it.
- How does the rubric check each standard?: Each check is code in the research unit with a stable name and the ADR or guideline it reads. It returns pass or fail with a message. The set of results is the evidence for the decision point. Jev answers the closed questions, and the cuts give one band of
continue,revieworflag. A model never writes the gaps. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, 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, src/devops_cli/roadmap/decision_step.py]- Chosen: Code check for each clause. ADR 0005 gives a finding to a tool or a checked fact, a code check gives a result a test can assert, and the checks are the evidence of the point.
- Rejected: Model reads the ADRs and gives the gaps. ADR 0005: a model explains and plans, and its output can change no finding; a model text is no measurement a test can assert.
- Rejected: A policy tool such as conftest. The alternatives check found no ADR-aware scorer, and conftest tests structured configuration against Rego policies, not prose ADRs.
- What are the score bands and the poor-fit cut?: The bands are the closed set of a decision point:
continue,reviewandflag.flagis the poor fit and writes thestandardsresolve cause.continueandreviewwrite no cause. (best practice) [sources: src/devops_cli/roadmap/decision_step.py, src/devops_cli/roadmap/decision_point.py, 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]- Chosen: The three bands of a decision point, with
flagthe poor fit. ADR 0020 andBandfix the closed set atcontinue,review,flag, andDecisionPointrequires each band. - Rejected: A numeric score with a poor-fit cut. ADR 0020: a point returns a band and never a number or a text.
- Rejected: Two bands, pass and fail.
DecisionPoint.__post_init__requires each band ofBand, so a point with two bands does not load.
- Chosen: The three bands of a decision point, with
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 13, 2026
Both work on the research unit, but #3291 compares research and extended toolsets while this candidate adds standards and suggestion steps.devops-cli-service commentedon Nov 17, 2026
Alternatives check: partly
Reason: Searches found no ADR-aware scorer for an issue. Backstage Tech Insights is the nearest open, maintained tool: a checks-and-scorecard engine that yields a score and failing checks, but it reads no ADRs, takes no item input and writes no suggestions.
Tool: backstage/community-plugins (https://github.com/backstage/community-plugins), Apache-2.0, last activity 2026-11-17, maintained.
Covers:
Lacks:
Searches (10)
Tools considered:
Searches run:
Sources:
A person decides what this check of 2026-11-17 means for the item.
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 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.