Skip to content

feat(roadmap): an independent verifier refutes a plan before the draft pull request opens #3039

Closed

Description

@dan-petty

What happened

Plans are checked for form only. The review of 2026-11-01 used an independent agent per plan that tried to refute it, and it found the false premises, the broken task order and the dropped criteria that no gate caught.

What should happen

  • After the planner and the gates pass, a second agent with a fresh context and the same read-only tools tries to refute the plan: paths, premise, scope against the criteria, task order, spec delta, verify commands.
  • Findings go back to the planner for a repair round (bounded, see D1). A plan with a finding that survives the rounds opens no draft; the item is returned to New with the evidence, or marked status/blocked with the question for a person.

Acceptance criteria

Related: tracker for this set (filed with it), #2908 (issue workflow), #2867 (draft PR evaluator), #3005 (task kind), #3010 to #3015 (plan gates), #2919 (stuck-item metrics), #2953 (Ollama parser).

Alternatives check of 2026-11-04: partly.
Tool: github/spec-kit (https://github.com/github/spec-kit), MIT, last activity 2026-11-03, maintained.

Proposed design

Problem statement

The verify pass of the roadmap checks a plan for form only. It reads the start of each cited file and it has no recall floor. A finding of task_order or verify_form is advice only, although the body asks for these checks. This item gives the verifier the read tools of the toolbox, the two missing return types, a trace of its reads, and an eval that reports recall against the floor that #3207 names. A finding that survives the repair rounds keeps the plan in draft with plan/needs-fix and comments its evidence on the issue.

Acceptance criteria

Requirement: Read-only verify tools

The verifier SHALL use the read-only tools of src/devops_cli/roadmap/stage_toolbox.py and MUST hold no write tool.

Scenario: Verify tool set holds read tools only

  • WHEN A test builds the tool set of the verify pass
  • THEN The tool set holds the read tools of the toolbox, no write tool, and no text of the planner.

Requirement: No planner reasoning

The verify request SHALL hold the plan and the read results and MUST hold no planner reasoning or intermediate message.

Scenario: Request holds no planner text

  • WHEN The stage job builds the verify request for a plan
  • THEN The request holds the plan document and the read results, and a test finds no planner message in it.

Requirement: Trace of the reads

A verify run SHALL record each read in its RunTrace.

Scenario: Trace lists each read

  • WHEN The verifier reads a file during a verify run
  • THEN The run trace lists the path of that read, and the comment of the staged item reports the reads.

Requirement: Recall against the floor

The verify eval SHALL report the recall of the verifier on the golden set of stage_eval_cases against the floor that #3207 names.

Scenario: Eval reports recall and floor

  • WHEN devops roadmap eval verify runs on the golden set
  • THEN The report states the recall and the floor, and a change to the pass states the score before and after.

Requirement: Task order and verify form gate

The verifier SHALL return task_order and verify_form findings, and an open finding of either type MUST keep the plan in draft.

Scenario: Open task order finding keeps the draft

  • WHEN The verifier returns a task_order finding on a plan
  • THEN The plan stays in draft with the label plan/needs-fix, and the change states the score of devops roadmap eval verify before and after.

Requirement: Evidence of a surviving finding

A plan with a finding that survives the repair rounds SHALL keep the label plan/needs-fix and the issue SHALL receive a comment with the evidence.

Scenario: Surviving finding comments its evidence

  • WHEN The plan still has an open finding after the last repair round
  • THEN The plan stays in draft, and the issue receives a comment with the verifier's findings.

Requirement: Verify request window

The verify request MUST fit the model window and leave room for the planner tools.

Scenario: Largest plan fits the window

  • WHEN The stage job builds the verify request for the largest plan of the golden set
  • THEN The tokens of the request plus the reserved room are at most the model window.

Existing Tool Considered

github/spec-kit (MIT, last activity 2026-11-03, maintained) covers a read-only analysis pass over the spec, the plan and the tasks, with a findings report. It lacks a bounded repair loop, a pipeline gate that keeps the draft pull request closed, a recall floor on a known-defect set, enforced isolation from the planner's reasoning, and a check of paths and verify commands against the tree. The rest builds on the verify pass of #3153 and #3264, so the written cost is the delta: about 300k tokens and two days to add the read toolbox, the two return types, the trace and the eval floor, and to keep and fix them.

Key questions

  • What does the verifier check?: It checks the paths, the premise, the scope against the criteria, the task order, the spec delta and the verify commands. RETURN_TYPES holds missing_path, false_premise and ignores_existing_code. OPEN_TYPES adds spec_delta_wrong. [sources: src/devops_cli/roadmap/stage_verify.py]
  • What is the A1 set, and which command scores it?: The A1 set is the golden set of stage_eval_cases. The command devops roadmap eval verify scores it. [sources: docs/ROADMAP_WORKFLOW.md:267]
  • Which gates must pass before the verifier runs?: The verifier runs in the stage job after the plan gates, that is after check_proposal, and before the draft pull request opens. [sources: docs/ROADMAP_WORKFLOW.md, src/devops_cli/roadmap/stage_verify.py]
  • Where in the pipeline does the verifier run?: In the model lane, in the stage job after the plan gates pass and before the draft pull request opens. [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md]
  • Which tools does the verifier get?: The verifier uses the read-only tools of src/devops_cli/roadmap/stage_toolbox.py. A test holds that the tool set has no write tool and no text of the planner. (best practice) [sources: src/devops_cli/roadmap/stage_toolbox.py]
    • Chosen: Reuse the read tools of the toolbox. The planner already uses them, and the project keeps and fixes one tool set.
    • Rejected: Build a separate verifier tool set. It is a second tool set to keep and fix, and it can drift from the planner tools.
  • How does a verify run record what it read?: Each read goes into the RunTrace of the run. The comment of the staged item reports the reads and the tokens. (best practice) [sources: CONTEXT.md]
    • Chosen: Reuse RunTrace. The project has one trace format, and a person reads the reads and the tokens in one place.
    • Rejected: Write a separate verify log. It is a second format to keep and fix, and it adds no information.
  • Which number is the recall floor, and where does it live?: The floor is the one that test(roadmap): score the stage pipeline with a cloud model first #3207 names: 90% recall of blocker and major defects, in docs/ROADMAP_WORKFLOW.md. This item refers to that floor and adds no second number. (best practice) [sources: docs/ROADMAP_WORKFLOW.md]
    • Rejected: 80% of all defects. The best model tested found 56% of the labeled defects and 68% of the major ones, so 80% of all is out of reach now, and the project would hold two floors.
    • Chosen: 90% of blocker and major defects, named in test(roadmap): score the stage pipeline with a cloud model first #3207. The project holds one floor, and the eval compares the verifier against it.
    • Rejected: No floor. The eval can then neither pass nor fail, and the item keeps no measure.
  • Which return types does the verifier gate on?: task_order and verify_form join RETURN_TYPES and OPEN_TYPES. An open finding of either type keeps the plan in draft with plan/needs-fix. (best practice) [sources: src/devops_cli/roadmap/stage_verify.py]
    • Chosen: Add both types to the gating sets. The body asks for these checks, and an advice-only finding changes no plan.
    • Rejected: Keep both types as advice. The checks then gate nothing, and staged plans still need correction commits after the verify pass.
  • What happens to a plan whose finding survives the repair rounds?: Since fix(roadmap): the stage marks a plan ready although its own model review found a defect #3264, an open finding keeps the plan in draft with the label plan/needs-fix. The issue receives a comment with the evidence. The rule of the body, that no pull request opens, no longer applies. (best practice) [sources: src/devops_cli/roadmap/stage_verify.py, docs/ROADMAP_WORKFLOW.md]
  • How many repair rounds are allowed?: Two repair rounds, that is three verification attempts. (best practice) [sources: CONTEXT.md]
    • Chosen: Two repair rounds. The planner gets two chances to fix mechanical findings, and the loop stays bounded.
    • Rejected: One repair round. The planner gets one chance only.
    • Rejected: A token budget. A budget is harder to enforce and debug than a round count.
  • Does the verify request fit the model window?: The verify request uses the same window limit as the planner request and leaves room for the planner tools. (best practice) [sources: CONTEXT.md]
    • Chosen: Apply the planner window limit with reserved room. One limit covers both requests, and the planner tools keep their room.
    • Rejected: Set no limit on the verify request. A large plan then overflows the window and the verify run fails.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#3207

Activity

  1. added
    type/featureNew user-facing functionality or capability addition
    scope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs them
    status/newStatus New: the item is not ready yet
    value/highValue High: the delivery of the item matters much
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 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 stops flawed plans from opening a draft PR, but it is one component of a larger pipeline effort tracked elsewhere.
    • Value: High. On the 2026-11-01 run, 34 of 37 plans had defects that no existing gate caught; a verifier closes that gap.
    • Effort: Medium. It needs a fresh-context agent, a defined refutation checklist, a bounded repair loop, and a failure path that blocks the PR.
    • Related: feat(roadmap): an enterprise-grade plan and implement pipeline (tracker) #3027, which asks for a different change. Both belong to the roadmap pipeline; #3027 is the tracker for the whole set, and the candidate is one step (the verifier) within it.
  3. added
    priority/p2-mediumStandard priority feature work and architectural improvements
    on Nov 1, 2026
  4. devops-cli-service commented on Nov 1, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at ae2d8e1 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What does the verifier check? (missing verified source)
    • What is the A1 set? (missing verified source)
    • Which plan gates must pass before the verifier runs? (missing verified source)
  5. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Tool: github/spec-kit (https://github.com/github/spec-kit)

    • License: MIT
    • Last activity: 2026-11-03
    • Maintained: yes

    Covers:

    • An explicit pre-implementation analysis step (/speckit.analyze) that runs after the plan and tasks exist and before implementation, as a separate read-only pass over the artifacts.
    • Cross-artifact consistency checking between spec.md, plan.md and tasks.md: reports gaps against the requirements, coverage misses, ambiguities and underspecification, duplications, and constitution/principle violations.
    • Produces a findings report instead of editing the artifacts, so a plan can be reviewed by something other than its author.

    Lacks:

    • No bounded repair loop: it reports findings but has no round limit or hand-back-to-planner cycle.
    • No pipeline gate: it does not prevent a draft pull request from opening, does not comment evidence on the issue, and cannot return an item to New or mark it blocked.
    • No measured recall target such as flagging 80% of a known-defect set (A1), and no enforced isolation from the planner's reasoning.
    • Does not verify paths or verify commands against the repository tree; it checks the spec/plan/tasks artifacts, not premise correctness against the code.

    Searches run:

    • LLM agent that critiques and refutes a plan before code generation critic verifier
    • open source plan review agent verify implementation plan against spec before pull request
    • spec-kit analyze command cross-artifact consistency check spec plan tasks before implementation
    • BMAD method agent reviews story plan before development adversarial review quality gate

    Sources:

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

  6. dan-petty commented on Nov 4, 2026

    @dan-petty
    OwnerAuthor

    Evaluation of 2026-11-04. Status of this item, and corrections for the next refine round.

    What is delivered. #3153 delivered the pass that runs after the gates, and #3264 delivered the rule on an open finding. What remains here is read tools, a recall floor, wider return types and the outcome of a finding that survives. src/devops_cli/roadmap/stage_verify.py sends the start of each cited file and imports no toolbox. The docs and stage_verify_eval.py name no floor. RETURN_TYPES holds missing_path, false_premise and ignores_existing_code, and OPEN_TYPES adds spec_delta_wrong. So a finding of task_order or verify_form is advice only, although this body asks for these checks. The criterion "A plan that fails the rounds opens no pull request" no longer applies: since #3264, an open finding keeps the plan in draft with the label plan/needs-fix.

    Answers to the 3 open questions of refine.

    • What the verifier checks: the list in this body (paths, premise, scope against the criteria, task order, spec delta, verify commands).
    • The A1 set is now the golden set of stage_eval_cases, and devops roadmap eval verify scores it (docs/ROADMAP_WORKFLOW.md:267).
    • The pass runs after the gates of the stage job, that is, after check_proposal.

    Make one number the floor. This item says 80% of all defects. #3207 proposes 90% recall of blocker and major defects, in docs/ROADMAP_WORKFLOW.md. Name the floor in #3207, and refer to it from here. The best model tested found 56% of the labeled defects and 68% of the major ones (comment on #3027).

    Add these criteria.

    • The verifier has the read tools of src/devops_cli/roadmap/stage_toolbox.py. A test holds that it has no write tool and no text of the planner.
    • A trace of a verify run lists its reads (RunTrace).
    • An eval reports recall against the floor, and a change to the pass states the score before and after.
    • A wider set of return types states its score from devops roadmap eval verify.
    • The window limit of the new issue fix(roadmap): a plan request leaves room for the planner tools is checked for this pass too.

    Evidence. The stage comments of #3351, #3368 and #3404 list no finding, and their plan pull requests #3352, #3374 and #3409 hold correction commits by dan-petty.

  7. added
    status/readyStatus Ready: problem, acceptance criteria and an answer to each key question
    and removed
    status/newStatus New: the item is not ready yet
    on Nov 5, 2026
  8. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at c9a6182 (see proposed design in issue body).

  9. added
    owner/agentOwner Agent: an agentic coder works on the item
    on Nov 5, 2026
  10. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    Answer from project standards, under the owner's instruction of 2026-11-05.

    Question 1: which recall floor applies to criterion 2? The criterion said 80 percent of the known defects of the A1 set. #3207 and the refine design name another floor.

    Answer: at least 90 percent of the known defects of the severities blocker and major, on the golden set of stage_eval_cases, after the gates and the verification pass. There is one floor, so this item adds no second number.

    Source: docs/ROADMAP_WORKFLOW.md, the item "Recall", and the design of #3207. The code holds the floor in CONST_ROADMAP_VERIFY_RECALL_FLOOR.

    Question 2: does criterion 4 still apply? The criterion said that a plan that fails the rounds opens no pull request.

    Answer: no. #3264 supersedes it. An open finding keeps the plan a draft with the label plan/needs-fix, and the issue gets a comment with the evidence.

    Source: the merged change of #3264, the module docstring of src/devops_cli/roadmap/stage_verify.py, and docs/roadmap/stage.md.

    Changes to this issue. I edited criteria 2 and 4 to these answers. The second item of "What should happen" still states the old outcome ("opens no draft"). #3264 supersedes that text too, and the edited criterion 4 is the rule.

    Measure of criterion 2. The floor is not measured yet. The measure runs on the final code, and its result goes in a comment on the pull request.

  11. added a commit that references this issue on Nov 6, 2026
  12. added
    status/in-progressActively being designed or implemented by developer or agent
    and removed
    status/readyStatus Ready: problem, acceptance criteria and an answer to each key question
    on Nov 6, 2026
  13. added a commit that references this issue on Nov 6, 2026
  14. removed
    status/in-progressActively being designed or implemented by developer or agent
    owner/agentOwner Agent: an agentic coder works on the item
    on Nov 6, 2026
  15. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor
  16. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-06 02:22 UTC

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/mediumEffort Mediumpriority/p2-mediumStandard priority feature work and architectural improvementsscope/roadmapThe roadmap jobs: intake, refine, stage, implement and the Service that runs themsource/agentFiled by an agenttype/featureNew user-facing functionality or capability additionvalue/highValue High: the delivery of the item matters much

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions