Skip to content

feat(roadmap): refine reads the answers of the question resolver #4806

Open

Description

@dan-petty

Problem or Motivation

Refine takes no input from another job, except person replies and the alternatives check. Thus an answer of the question resolver (#4805) does not reach the proposal, and refine asks the same question again. It did so on #4517, #4563 and #4624.

Proposed Solution & Architectural Design

  • Add the request key resolved. It holds the resolve record and the latest resolve comment, in the pattern of _alternatives_request.
  • resolve.answers_hash joins the unchanged check of refine.
  • A P_STEP answer becomes the criterion "Pending a person after the merge". It does not hold the item from Ready (owner decision of 2026-11-11, feat(roadmap): track the issue stewards and persona selection #4780).
  • An OWNER frame links the question, and refine does not ask the question again.
  • Refine writes an answer as "(owner decision)" only with a verified quote. An answer by analogy is "(proposed, by the rule of #N)".

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/roadmap/refine/).

Existing Tool Considered

A change of refine itself, in the form of the alternatives input (#2652). Cost to build: about 60,000 tokens and 2 hours.

Acceptance Criteria

  • A replay test: an item with a resolve answer for each key question goes Ready with no person reply.
  • A P_STEP answer is a criterion of the proposal.
  • Refine does not ask an answered question hash again.
  • Refine writes the "Owner decisions" heading only from a verified quote.

Dependencies

Source: #4780

Owner decision 2026-11-13

Refine is due when a resolve answer is newer than refine.at, by its predicate in due_jobs. No due mark. Source: tracker #5482, Phase 6.

  • Live proof: after the merge and the release, refine runs as the App on an item with a new resolve answer. A comment gives the result line.

Alternatives check of 2026-12-02: none.
Tool: none found.
Reason: Searches found no open, maintained tool that carries a question resolver's answers into a refine proposal, deduplicates answered question hashes, or gates owner decisions on verified quotes. The change wires this inside refine itself.

Lacks:

  • No library passes resolver answers between roadmap jobs
  • No library skips a question whose hash is answered
  • No library marks an owner decision only from a verified quote

Proposed design

Problem statement

Refine reads only person replies and the alternatives check from another job. The answers of the question resolver (#4805) do not reach the proposal, so refine asks a question that the resolver already answered. It did so on #4517, #4563 and #4624.

This change carries the resolve record and its latest comment into the refine request. Refine selects an item again when its resolve answers change, does not ask an answered question, and writes the "(owner decision)" mark only from a verified quote. A P_STEP answer becomes the criterion "Pending a person after the merge", and refine becomes due on a newer resolve answer.

Acceptance criteria

Requirement: Resolve record in the refine request

Refine SHALL add a resolved key to its request dict that holds the resolve record and the latest resolve comment.

Scenario: Resolve record and comment in the request

  • WHEN A test builds the refine request for an item that has a resolve record and a newer comment with the resolve marker.
  • THEN The request holds a resolved key with the record and the latest marked comment.

Requirement: Changed resolve answers select the item

Refine SHALL select an item again when the hash of its resolve answers differs from the hash that refine recorded at its last round, even when body_hash.is_unchanged returns true.

Scenario: New resolve answer selects the item

  • WHEN A test changes resolve.answers while body_hash.is_unchanged returns true for the item.
  • THEN The refine selection returns the item.

Requirement: Answered question is not asked

Refine SHALL treat each question hash in resolve.answers as answered and SHALL NOT ask that question again.

Scenario: Answered hash is not asked

  • WHEN A test gives a key question whose hash resolve.answers holds.
  • THEN The proposal holds no question for that hash.

Requirement: P_STEP answer becomes a criterion

Refine SHALL turn a P_STEP resolve answer into the acceptance criterion named "Pending a person after the merge".

Scenario: P_STEP criterion does not hold the item

  • WHEN A test gives refine a resolve answer of class P_STEP.
  • THEN The proposal holds the criterion "Pending a person after the merge" and the round sets the item Ready.

Requirement: OWNER frame linked to its question

Refine SHALL link an OWNER frame to its question and SHALL NOT ask that question again.

Scenario: OWNER frame closes the question

  • WHEN A test gives a resolve record with an OWNER frame for a key question.
  • THEN The request holds the frame's answer in owner_answer and the proposal holds no person question for that question.

Requirement: Owner decision needs a verified quote

Refine SHALL write the "(owner decision)" mark and the "Owner decisions" heading only when the resolve answer carries an exact quote from a tracked document or from a comment of a person.

Scenario: Answer with no verified quote

  • WHEN A test gives a resolve answer that carries no exact quote.
  • THEN The proposal marks the answer "(proposed, by the rule of #N)" and writes neither the "(owner decision)" mark nor the "Owner decisions" heading.

Requirement: Verified quote writes an owner decision

Refine SHALL mark an answer as "(owner decision)" and cite the quote's source when the resolve answer carries an exact quote from a tracked document.

Scenario: Verified quote

  • WHEN A test gives a resolve answer that carries an exact quote from a tracked document.
  • THEN The proposal marks the answer "(owner decision)" and its sources name the path of the quoted document.

Requirement: Refine due on a newer resolve answer

Refine SHALL be due when a resolve answer is newer than refine.at, through the due predicate of its row, and SHALL write no due mark.

Scenario: Newer resolve answer makes refine due

  • WHEN A test gives the due predicate of the refine row a stored refine.at value and a resolve answer that is newer.
  • THEN The predicate reports refine due and the round writes no due mark.

Requirement: Ready from resolve answers alone

Refine SHALL reach Ready from resolve answers alone when each key question has an answer.

Scenario: Resolve answer for every key question

  • WHEN A replay test in tests/roadmap/refine/ gives refine an item with a resolve answer for each key question and no person reply.
  • THEN The proposal holds no person question and the round sets the item Ready.

Requirement: Pending a person after the merge

The refine row MUST show that it reads a new resolve answer as the App after the release.

Scenario: Live proof of the refine row

  • WHEN After the merge and the release, refine runs as the App on an item with a resolve answer newer than refine.at.
  • THEN The run prints one result line that names the item and its next step, and a comment on the item gives that line.

Existing Tool Considered

The alternatives check recorded in the issue body (verdict none, dated 2026-11-27) found no open, maintained tool or library, and its block lists what such a tool lacks. The change builds this wiring in refine itself. Written cost: about 60,000 tokens and 2 hours to build, keep and fix the code until it matches the need, plus the keep cost of the refine tests that it extends.

Key questions

  • Which request key carries the resolve record and its latest comment into the refine request?: Add the resolved request key. It holds the resolve record and the newest comment that carries the resolve marker. Refine builds it beside alternatives in the request dict, and the proposal prompt names it beside alternatives. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:726, src/devops_cli/ai/tasks/roadmap_refine_proposal.md]
    • Chosen: New resolved request key. It follows _alternatives_request and keeps the resolve record apart from the alternatives check.
    • Rejected: Extend the alternatives request key. It mixes two checks and breaks the existing alternatives gate.
    • Rejected: Read the resolver store inside refine. It adds a second read path and duplicates the request contract.
  • How does refine use the hash of the resolve answers?: Refine compares resolve.answers_hash with the hash that it recorded at its last round. A difference selects the item again, even when body_hash.is_unchanged returns true. The question hashes in resolve.answers are the answered set. body_hash.is_unchanged stays body-only, so trust.is_approved keeps its contract. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/body_hash.py, src/devops_cli/roadmap/trust.py, src/devops_cli/roadmap/stores/store.py]
    • Chosen: Refine-only answers hash. It uses one hash source for the trigger and the skip, and it leaves the body-only is_unchanged that trust.is_approved reads.
    • Rejected: Add the hash to body_hash.is_unchanged. It would end the approval of a bot item when a resolve answer arrives, though the body has not changed.
    • Rejected: Match the question text. A change of the text breaks the match and refine asks the same question again.
    • Rejected: Keep the current unchanged check. A new resolve answer does not make refine select the item.
  • What does a P_STEP resolve answer become in the proposal?: It becomes the acceptance criterion "Pending a person after the merge". It does not hold the item from Ready. The owner decision of 2026-11-11 on feat(roadmap): track the issue stewards and persona selection #4780 sets this rule. (best practice) [sources: src/devops_cli/roadmap/resolve.py:101, 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]
  • How does refine handle an OWNER frame?: Refine links the frame that the resolve record names for the question hash. It carries the answer in the existing owner_answer request key and does not ask that question again. (best practice) [sources: src/devops_cli/roadmap/resolve.py:102, src/devops_cli/roadmap/refine/refine.py, tests/roadmap/refine/test_roadmap_refine_owner_answer.py]
    • Chosen: Link the frame and skip the question. It keeps the owner input and stops the duplicate question, with the existing frame reader.
    • Rejected: Ask the question again. It repeats the defect that the issue fixes.
    • Rejected: Drop the frame. It loses the owner input and the link to the question.
  • When may refine write an answer as "(owner decision)"?: Only when the resolve answer carries an exact quote from a tracked document or from a comment of a person. An answer by analogy is "(proposed, by the rule of #N)". The resolver chain answers a question only with a verified source, or frames it for the owner. (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/ai/tasks/roadmap_refine_proposal.md]
    • Chosen: Verified quote gate. It matches the resolver rule that an answer needs a verified source.
    • Rejected: Trust every resolve answer. It writes an owner decision with no evidence.
    • Rejected: Never write an owner decision. It drops a verified owner answer that the proposal needs.
  • When is refine due for a new resolve answer?: Refine is due when a resolve answer is newer than refine.at, through the due predicate of its row. Refine writes no due mark. The owner decision of 2026-11-13 in the issue body sets this rule, from tracker feat(roadmap): track the roadmap pipeline split into jobs #5482 Phase 6. (best practice) [sources: src/devops_cli/roadmap/fix_checks_row.py, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Chosen: The due predicate of the row. The owner decision of 2026-11-13 sets this rule and writes no due mark.
    • Rejected: A due mark from the resolver. The owner decision rejects a due mark for this row.
    • Rejected: A fixed interval only. It delays refine after a new resolve answer.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4805

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 removes repeated questions on multiple items but does not block a release or fix a broken path.
    • Value: Medium. It stops refine from re-asking answered questions, saving person time on every affected item.
    • Effort: Medium. The body estimates about 60,000 tokens and 2 hours of work.
    • Related: feat(roadmap): the Service runs the alternatives job once a day, and refine reads the recorded tool verdict #2652, which asks for a different change. Both add a job input to refine, but #2652 reads the alternatives verdict while this candidate reads the question resolver answers.
  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 passing answers between jobs and for caching agent answers by question hash returned only unrelated documentation pages, not a maintained tool or library. The need is project-internal wiring: refine must read the resolver's answer record and hash, turn a P_STEP answer into a criterion, link an OWNER frame, and gate the "Owner decisions" heading on a verified quote — the issue itself names a change of refine as the only considered option, so no external tool covers it.

    Tool: none found

    Lacks:

    • A tool that carries a resolve record and latest resolve comment into refine's request, in the pattern of _alternatives_request
    • A tool that joins resolve.answers_hash to refine's unchanged check so an answered question is not asked again
    • A tool that turns a P_STEP answer into the criterion "Pending a person after the merge"
    • A tool that links an OWNER frame to the question
    • A tool that writes "(owner decision)" only from a verified quote and marks an answer by analogy as "(proposed, by the rule of #N)"

    Searches run:

    • pass answers between pipeline jobs keyed by question hash state store, results: 5
    • open source tool deduplicate LLM questions asked by agent across workflow steps, results: 5
    • Argo Workflows pass step outputs to next workflow step artifacts, results: 5
    • library cache agent answers by question hash so agent does not ask again, results: 5

    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

    Refine cannot set this item to Ready at e5dfddb 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.

  7. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    New instances for this item: refine asks a person a question that the body already answers (#4624, #4586, #4573). Two causes in the code are not named here yet, and #4805 is in a dependency cycle.

    Instances (checked 2026-11-19):

    Item Question of refine The answer that the body already gives
    #4624 "Who provides the valkey-devops ACL passwords? (a person decides)", 4 times: comments 6801358364 (2026-11-11T16:30Z, at 818ac6f), 6803055609 (2026-11-11T17:45Z, at 5c71ad4), 6831904235 (2026-11-12T18:09Z, at 2c0fe36) and 6839192910 (2026-11-12T23:39Z, at 7a158c4). Section "### Decisions" (body line 30): "The owner still runs devops k8s push-secrets for the ACL passwords of valkey-devops." The key question of refine (line 291) gives the same answer, but marks it "(a person decides)".
    #4586 "Who makes the three token values in the cluster? (a person decides)": comment 6871068729 (2026-11-14T03:35Z), and again as an owner-question frame in comment 6947791698 (2026-11-17T12:17Z, hash 3e032129…). Record: refine.next_step person. Body line 9: "Owner decision 2026-11-11: register it as a generated managed credential ... so devops k8s push-secrets makes the values". The answer of refine (line 193) is a person step after the merge, which is the P_STEP class of #4805.
    #4573 "Who confirms the live proof after the merge and the release? (a person decides)": comment 6870838832 (2026-11-14T03:17Z). Record: refine.next_step person. The criterion at body line 46 already sets the live proof: "after the merge and the release, the pod runs as the App on the next 5 items of the stage window. A comment gives the result lines". This is a P_STEP.

    Refine has left #4624 out since #5963 (2026-11-16), because #4624 is a tracker. So it asks there no more. #4586 and #4573 still wait on a person.

    Causes that this item does not name yet (origin/main 0d90de5):

    1. validate_proposal (src/devops_cli/roadmap/refine/refine.py:1404-1405) adds each key question of kind person to the open questions. It does not look at the answer. So an answer that quotes the body cannot close the question.
    2. _OWNER_DECISIONS_HEADING_RE (refine.py:1132) is ^#+\s*Owner decisions\b. The bodies use other forms: "### Decisions" (feat(roadmap): track the project brain #4624), "### Owner decision 2026-11-13" in the singular (feat(roadmap): run each alternatives check in its own pod #4573, feat(roadmap): run the reconcile sweep on a cluster schedule #4574, feat(roadmap): run intake and scoped intake in their own pods #4567), and an inline "Owner decision 2026-11-11:" (feat(service): serve a read-only roadmap API with OpenAPI #4586). None of them matches. So _marked (refine.py:1357-1368) never writes "(owner decision)" for these answers. The refine sections of feat(roadmap): track the project brain #4624, feat(service): serve a read-only roadmap API with OpenAPI #4586 and feat(roadmap): run each alternatives check in its own pod #4573 hold 0 "(owner decision)" marks, and 14, 8 and 10 "(best practice)" marks.

    Proposed additions to the acceptance of this item:

    A gate of this item. This item waits on #4805 (refine.blocked_by 4805). #4805 is in a dependency cycle: #4805 → #4809 → #4808 → #4805.

    The edge #4805 → #4809 comes from the scope comment of 2026-11-12T09:54Z on #4805: "The resolver stays the stewards CronWorkflow of #4809". That sentence says that #4809 runs the resolver, so #4809 waits on #4805, not the reverse. #4805, and so this item, cannot become Ready until a person removes #4809 from the dependencies of #4805.

  8. devops-cli-service commented on Nov 19, 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.

  9. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  10. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  11. added
    status/ready
    and removed
    status/new
    on Nov 29, 2026
  12. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  13. dan-petty commented on Nov 29, 2026

    @dan-petty
    OwnerAuthor

    Returning #4806 to New because its specified resolver inputs do not exist in the codebase yet; they belong to open #4808 (feat(roadmap): the question resolver answers with verified sources).

    Evidence against the current tree:

    • No resolve.answers_hash, question hashes, answers, or verified quotes. ResolveRecordKey (src/devops_cli/roadmap/stores/store.py:554-561) defines only INPUT_HASH (resolve.input_hash), ANSWERS (resolve.answers), OWNER_ASKED (resolve.owner_asked), COMMENTED_AT (resolve.commented_at), and FAILED_REASON (resolve.failed_reason). _serialized_classes (src/devops_cli/roadmap/resolve.py:619-634) serializes only source, class, text, wake_at, and owner_class into resolve.answers—no question hashes, answer text, verified quotes, or cited source paths exist (run_resolve in src/devops_cli/roadmap/resolve.py:744-756 only extracts and classifies questions into FORM, WAIT, P_STEP, OWNER, and ANSWERABLE).
    • No OWNER frame created by resolve. _apply_item_resolve (src/devops_cli/roadmap/resolve.py:645-685) writes a <!-- devops roadmap resolve --> summary comment (_render_resolve_comment at src/devops_cli/roadmap/resolve.py:603-616) and resolve.owner_asked; it creates no <!-- owner-question:<hash> --> frame comment or frame hash for OWNER questions.
    • No answer timestamp on resolve or standalone refine row module. #4806 cites src/devops_cli/roadmap/fix_checks_row.py for the refine row's due predicate against refine.at and a resolve answer timestamp, whereas refine_due_reason lives in src/devops_cli/roadmap/refine/refine.py:3549 and JobRow / _Poll.is_due live in src/devops_cli/roadmap/run.py:1742.
    • Circular dependency with feat(roadmap): the question resolver answers with verified sources #4808. Sourced answers, verified quotes/sources, answer hashes, and OWNER frames are specified on open feat(roadmap): the question resolver answers with verified sources #4808, which currently lists #4806 under Dependencies (refine.blocked_by: 4805,4806). #4806 needs #4808 first (or #4808 needs #4806 removed as a blocker and #4808 closed before #4806 can read its answers).
  14. added
    status/new
    and removed
    status/ready
    on Nov 29, 2026
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