Skip to content

feat(roadmap): the question resolver answers with verified sources #4808

Open

Description

@dan-petty

Problem or Motivation

Known answers exist for 58 of the 113 sampled questions of the census of 2026-11-11: an owner decision (17), a document (7), best practice (6) or one command (28). A command held for 5 of 5 checked "missing verified source" questions. No job posts these answers.

Proposed Solution & Architectural Design

The answer step of devops roadmap resolve (#4805):

  • Answer. One pydantic-ai agent run for each item, with the read-only refine investigation tools at the pinned SHA.
  • Source gate. The step keeps an answer only with a verified source: a path:line that exists at the SHA, a comment URL that exists with a quote that matches, or a command from the read-only list with a digest of its output. With no source, the item gets the owner frame of feat(roadmap): an agent that needs a decision asks on the issue and waits #3077, never an answer with no source.
  • Post-check. It refuses a text that tells an agent to merge, set a secret, or change a setting or a host. A P_STEP that names a person as the actor passes.
  • Refute. One challenger refute call tests each frame recommendation and each best-practice answer.
  • Decision point. resolve.question_class runs in shadow. The 113 census questions are its labels.
  • Comment. The step posts one marked comment only when the answers hash changes (the guard of fix(roadmap): a job posts no comment that repeats a recent one #4793).
  • Spend. A cap of 0.10 USD a run through observe_llm_calls. The run stops before a call that would go above the cap.
  • Metrics. devops_cli_roadmap_resolve_answers_total{class,result} and the useful share (the item changes state in 7 days).
  • Gate. --confirm needs the gold-set gate. First, an agent checks the 58 gold answers by their sources.

Target Subsystem

SDLC, Git & PR Governance (roadmap jobs), with the AI pipeline (pydantic-ai, Jev).

Existing Tool Considered

pydantic-ai, the refine investigation tools, Jev and the run store. No GitHub tool answers issue questions from the decisions of a project. Cost to build: about 120,000 tokens and 4 hours. Run cost: about 0.75 USD a week; hard cap 0.60 USD a day.

Acceptance Criteria

  • Plan mode on the gold set: 52 or more of the 58 answers match the class and the source, 19 of 19 P_STEP questions become criteria, and 0 of the 10 OWNER questions get an answer.
  • A run stops before a call that would go above 0.10 USD.
  • A stop-after-each-write test writes nothing new on the second run.
  • One comment for each answers hash.

Dependencies

Source: #4780

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 6) keeps this scope. Refine reads the answers (#4806).

  • Live proof: after the merge and the release, the resolver answers as the App on 5 live items with open questions. A comment gives the result lines and the source of each answer.

Alternatives check of 2026-11-26: none.
Tool: none found.
Reason: Searches for tools that answer project questions with citations returned unrelated pages; the only code-AI platform found, Sourcegraph/Cody, is an archived snapshot and verifies no path:line at a pinned SHA, no comment quote and no command digest.

Lacks:

  • Source gate that checks a path:line at the pinned SHA
  • Owner frame instead of an answer for OWNER questions
  • Post-check refusal of agent merge, secret, setting or host text
  • Challenger refute of each recommendation and best-practice answer
  • Per-run spend cap and one comment for each answers hash

Proposed design

Problem statement

The census of 2026-11-11 holds a known answer for 58 of 113 sampled questions. No job posts these answers, so a person answers each open question by hand. This item builds the answer step of devops roadmap resolve. It answers an open question with a verified source or frames it for the owner.

Acceptance criteria

Requirement: Verified source gate

The step SHALL keep an answer only with a verified source: a path:line at the SHA, a matching comment quote, or a read-only command digest.

Scenario: A path that is absent at the SHA

Requirement: Owner questions get no answer

The step MUST answer no OWNER question and MUST give each one the owner frame of #3077.

Scenario: The ten OWNER gold questions

  • WHEN The 10 OWNER gold questions run in plan mode
  • THEN The run writes 0 answers for them and writes the owner frame for each.

Requirement: Person steps become criteria

The step SHALL turn each P_STEP question into an acceptance criterion that names a person as the actor.

Scenario: The nineteen P_STEP gold questions

  • WHEN The 19 P_STEP gold questions run in plan mode
  • THEN Each of the 19 becomes one acceptance criterion, and the post-check passes each one.

Requirement: Post-check refusal

The post-check MUST refuse a text that tells an agent to merge, set a secret, or change a setting or a host.

Scenario: A text that tells an agent to merge

  • WHEN An answer holds the text merge the pull request and names an agent as the actor
  • THEN The post-check refuses the answer, and the item keeps no answer.

Requirement: Refute of each recommendation

The step SHALL run one challenger refute call over each frame recommendation and each best-practice answer.

Scenario: A refuted best-practice answer

  • WHEN The challenger refutes the only source of a K_BP answer
  • THEN The step drops that answer and gives the item the owner frame.

Requirement: Per-run spend cap

A run MUST stop before an LLM call that would take the spend of the run above 0.10 USD.

Scenario: The next call goes above the cap

  • WHEN The run spend that observe_llm_calls reports is 0.09 USD and the next call costs 0.02 USD
  • THEN The step makes no call and ends the run with a spend of 0.09 USD.

Requirement: Second run writes nothing

The step MUST post no comment when the answers hash equals the hash of its last marked comment.

Scenario: Two runs with the same answers

  • WHEN A second run computes the answers hash that the first run posted
  • THEN The second run posts no comment and the issue holds one marked comment.

Requirement: One comment for each new answers hash

The step SHALL post exactly one marked comment when the answers hash changes.

Scenario: A changed answers hash

  • WHEN A run computes an answers hash that differs from the hash of the last marked comment
  • THEN The run posts exactly one marked comment that holds the new hash.

Requirement: Gold-set gate before confirm

--confirm MUST refuse to start when plan mode matches fewer than 52 of the 58 gold answers in class and source.

Scenario: Fifty-one matches

  • WHEN The gold-set scorer matches 51 of the 58 answers in class and source
  • THEN --confirm stops with an error that names the count, and no live run starts.

Requirement: Gold-set gate passes at the target

--confirm MUST start when the scorer matches at least 52 of the 58 answers, 19 of 19 P_STEP questions and 0 of 10 OWNER questions.

Scenario: Fifty-two matches

  • WHEN The scorer matches 52 of 58 answers, 19 of 19 P_STEP and 0 of 10 OWNER
  • THEN --confirm starts the live run.

Requirement: Class decision point in shadow

The step MUST record the resolve.question_class band in shadow mode and MUST NOT change an answer from that band.

Scenario: A band that differs from the class of the answer

  • WHEN The class decision point returns a band that differs from the class of the answer
  • THEN The run logs the band, keeps the answer and changes no label.

Requirement: Answer metrics

The step MUST increment devops_cli_roadmap_resolve_answers_total with the class and the result for each answer.

Scenario: One kept answer

  • WHEN The step keeps one answer of class K_DOC with a verified source
  • THEN The counter devops_cli_roadmap_resolve_answers_total{class="K_DOC",result="answered"} goes up by one.

Requirement: Pending a person after the merge

After the release, a person SHALL run the resolver as the App on 5 live items and post each result line and source.

Scenario: Live proof after release

  • WHEN After the release, a person runs devops roadmap resolve --confirm as the App on 5 live items with open questions
  • THEN The issue comment gives the result lines and the source of each answer.

Existing Tool Considered

The alternatives check of 2026-11-20 in the issue body returned none; no open tool covers the need. The change builds its own code with pydantic-ai, the refine investigation tools, Jev and the run store. The written cost is about 120,000 tokens and 4 hours to build, keep and fix that code. A run costs about 0.75 USD a week, with a hard cap of 0.60 USD a day.

Key questions

  • Which question classes does the answer step answer, and which does it frame?: It answers K_TOOL, K_REC, K_DOC and K_BP with a verified source. It turns a P_STEP question into an acceptance criterion. It answers no OWNER question and gives each one the owner frame of feat(roadmap): an agent that needs a decision asks on the issue and waits #3077. The rule chain keeps WAIT and FORM. (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, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, src/devops_cli/roadmap/inbox_kind.py]
    • Rejected: Answer each class from the model. ADR 0020 gives OWNER to the owner alone. An answer with no verified source is what ADR 0021 forbids.
    • Chosen: Answer the sourced classes and frame OWNER. ADR 0020 says the row answers each other question with a verified source, or frames it for the owner.
    • Rejected: Answer no question. The census holds 58 known answers, so a step that answers none adds no value.
  • How does the step verify the source of an answer?: It checks a path:line at the SHA, a matching comment quote, or a read-only command digest. An answer with no such source is dropped. (best practice) [sources: docs/adr/0005-review-findings-come-from-tools-not-models.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.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]
    • Rejected: Trust the citation of the model. ADR 0005 records app/shell.py:4, a file that does not exist, VERIFIED and ranked first in eleven runs.
    • Chosen: Check each citation at the SHA and each quote against the comment. ADR 0005 admits a finding only when its location exists in the reviewed commit. It checks quotes and citations before it shows them.
    • Rejected: Have a person check each answer. No job posts the answers. That review load is the cost that this work removes.
  • What does the post-check refuse?: It refuses a text that tells an agent to merge, set a secret, or change a setting or a host. A P_STEP that names a person as the actor passes. (best practice) [sources: CONTRIBUTING.md, docs/adr/0013-releases-use-release-please-as-it-ships-and-agents-stay-out.md]
    • Rejected: Run no post-check. CONTRIBUTING.md gives a merge, a secret, a setting and a host to the owner alone. An answer that tells an agent to do one is unsafe to post.
    • Chosen: Refuse text that names an agent as the actor of a merge, a secret, a setting or a host. The step then posts each person step, and it posts no instruction that an agent must act on.
    • Rejected: Refuse any text that names a merge or a secret, with any actor. It drops valid P_STEP criteria that a person must do after the merge.
  • How does the run hold the 0.10 USD cap?: It prices the tokens that observe_llm_calls reports and stops before a call that would take the run above 0.10 USD. (best practice) [sources: src/devops_cli/ai/spend/ledger.py, openspec/changes/archive/2026-11-05-3207-score-stage-cloud-model/proposal.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Rejected: Rely on the gateway cap. The ledger holds 0 USD for a gateway call of the toolbox, so a gateway cap gives no per-run count.
    • Chosen: Count the run spend with observe_llm_calls and stop before the call. The observer receives each call with its tokens, so the step prices the run before it makes the next call.
    • Rejected: Set no cap. ADR 0021 sets 0.10 USD a run, and the body sets a hard cap of 0.60 USD a day.
  • When does the step post its comment?: It posts one marked comment only when the answers hash differs from the hash of its last marked comment. (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, src/devops_cli/roadmap/stores/comment_repeat.py]
    • Rejected: Post on each run. A run each hour writes a comment each hour.
    • Chosen: Post when the answers hash changes. ADR 0021 gives one comment for each answers hash, and the guard of fix(roadmap): a job posts no comment that repeats a recent one #4793 refuses a repeat of the job's own recent comment.
    • Rejected: Post only when a person asks. Then no answer reaches the issue.
  • In which mode does resolve.question_class run?: It runs in shadow mode. It records the band and changes no answer. The 113 census questions are its labels. (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, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, CONTEXT.md]
    • Rejected: On. No proven rule exists for this point, and a wrong band would change an answer.
    • Chosen: Shadow. ADR 0020 gives shadow only for this point, and CONTEXT.md gives shadow as the mode that records a band and changes no behavior.
    • Rejected: Off. The step then collects no label and no evidence for a later rule.
  • Where does the gold set of the gate live?: A golden set under tests/golden/ holds the 58 gold answers and the 10 OWNER questions of the census of 2026-11-11. The gate reads it offline and needs no network. (best practice) [sources: tests/support/paths.py, tests/golden/review_findings.json, docs/TESTING.md]
    • Rejected: Read the census from GitHub at test time. The hermetic floor refuses network egress in a test, and the census is a fixed snapshot.
    • Chosen: Record the gold set under tests/golden/. tests/support/paths.py gives GOLDEN as tests/golden, where the repository keeps a golden set. An offline test reads the same 58 answers on each run.
    • Rejected: Use no gold set. Then --confirm has no gate.
  • Does this item keep the scope that the pipeline split approved?: Yes. The owner decision of 2026-11-13 in the issue body keeps this scope. ADR 0021 section 8 assigns the row resolve to the issue stewards of tracker feat(roadmap): track the issue stewards and persona selection #4780 and describes this answer step. ADR 0020 lists resolve.question_class in shadow with the answers of the row resolve (feat(roadmap): the question resolver answers with verified sources #4808). (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/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: Keep the scope. ADR 0021 gives this exact answer step to the row resolve, and ADR 0020 puts resolve.question_class in shadow with its answers.
    • Rejected: Split the answer step. The owner approved the split already, and this item is one step of it.
  • How does the answer step run its investigation?: It runs one pydantic-ai agent for each item with the read-only refine investigation tools at the pinned SHA. (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]
    • Chosen: Run one pydantic-ai agent with the read-only refine investigation tools at the pinned SHA. ADR 0021 gives one agent run for each item with the read-only investigation tools of refine at a pinned commit.
    • Rejected: Let the agent use write tools. The answer step only reads the repository and posts a comment. A write tool would let it change the repository.
    • Rejected: Use a document search tool alone. A document search tool does not verify a path:line at the SHA or refute an answer.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4805, #4806, #3077, #4787, #4793

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It extends the roadmap resolver but depends on five open items and is not blocking other work.
    • Value: Medium. It resolves 58 of 113 sampled questions with verified sources, reducing manual owner effort.
    • Effort: Medium. The body states about 120,000 tokens and 4 hours of build cost, with eight sub-components to wire.
    • Related: feat(roadmap): an agent that needs a decision asks on the issue and waits #3077, which asks for a different change. Both are steps in the devops roadmap resolve pipeline (#4805). #3077 posts a question and waits; the candidate answers a question with a verified source.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: Searches for a tool that answers an issue tracker's open questions from a project's decisions, documents or commands with verified sources returned no relevant project; the results were unrelated documentation pages. The closest maintained candidate, Khoj, is a document/knowledge-base search and chat assistant and does not resolve roadmap questions, verify a path:line or comment source at a SHA, refute answers, cap spend or post gated issue comments, so nothing covers even the whole of this pipeline step.

    Tool: none found

    Lacks:

    • No tool answers an issue's open question from the project's owner decisions, documents or commands
    • No tool keeps an answer only with a verified source: a path:line at the pinned SHA, a comment URL with a matching quote, or a command with an output digest
    • No tool applies the post-check that refuses text telling an agent to merge, set a secret or change a setting or host
    • No tool runs the challenger refute call over each frame recommendation and best-practice answer
    • No tool posts one marked comment per answers hash or enforces the 0.10 USD per-run spend cap

    Tools considered:

    Searches run:

    • open source AI agent answers GitHub issues from project decisions documentation, results: 5
    • open source tool answers questions about a codebase with file and line citations, results: 5
    • Khoj docs question answering citations source, results: 5
    • Sourcegraph Cody answer questions with citations repository, results: 5
    • pydantic-ai GitHub repository, results: 5
    • DocsGPT GitHub open source documentation assistant, results: 5
    • retrieval augmented generation over GitHub issues and ADRs answer with citations tool, results: 5

    Sources:

    Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.

  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor
  7. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions