Skip to content

fix(roadmap): intake calls a candidate a duplicate only when it asks for the same change, not when it shares a theme #1755

Closed

Description

@dan-petty

Friction

Intake calls a candidate a duplicate when it only shares a theme with an existing item, and then files nothing. Each wrong fold costs a person or agent a hand-made issue or comment, and a fold into an item already delivered by an open pull request is lost when that pull request closes the item.

Evidence (2026-10-20, all devops roadmap intake --confirm)

Candidate Folded into Model's reason
#1725, the CI time budget with five targets #1666, recorded scanner results (re-filed by hand as #1725)
"perf(ci): the Static Analysis job runs Bandit once" #1734, worksteal plus a niced Bandit in the local gate, whose PR was already open with Closes #1734 "Both items address CI performance issues…"
"perf(tests): the invariant tests share one parse of the source tree" #1725, the umbrella budget "addresses the same performance issue as #1725, … reducing test run times"
"fix(review): a review dry run starts no gh, and no child of a test reaches the real session bus" #1430, the dry-run request preview "Both items address the issue of dry-run functionality…"
"docs(adr): evaluate OpenSpec as the spec and change-proposal layer" #1750, filed minutes earlier in the same run "Both items address workflow friction…"

Each was re-filed by hand: #1746, #1749 and #1753, or as a comment on the item it was folded into.

How intake decides today (src/devops_cli/roadmap/intake.py, src/devops_cli/ai/tasks/roadmap_intake_system.md):

  1. It embeds each text.
  2. It shortlists the DEFAULT_ROADMAP_INTAKE_SHORTLIST (5) nearest items by cosine similarity.
  3. The model judges the candidate against the shortlist and may name one of them as duplicate_of.

What goes wrong: every reason above names a shared theme (CI performance, workflow friction, dry runs), not the same change.

Remedy

  1. Define a duplicate as the same change: the same deliverable and acceptance criteria, so that delivering one delivers the other. A shared theme, goal, umbrella or file is not a duplicate. The prompt states this definition, and the model's reason must name the shared deliverable.
  2. Report a related item without folding: a candidate related to an existing item, such as an umbrella, a sibling or a neighbour, is filed and linked to that item.
  3. Hold the judgement to real cases: an evaluation set built from the five pairs above (not duplicates) and from known true duplicates (closed as duplicates by a person). devops ai prompt-eval runs it.

Acceptance criteria

  • Tests first: the evaluation set's five pairs above are judged not duplicates, and its true duplicates are judged duplicates. Both run through the prompt-eval harness against recorded model answers, offline.
  • roadmap_intake_system.md defines a duplicate as the same change, and a duplicate decision carries a reason naming the shared deliverable.
  • A related but distinct candidate is filed, and intake's report names the related item.
  • uv run devops ci passes.

Proposed design

Problem statement

Intake incorrectly identifies candidates as duplicates when they only share a theme or goal with existing items, rather than asking for the same change. This leads to lost work and incorrect folding of candidates into closed items.

Acceptance criteria

  • Criterion 1: The evaluation set's five pairs of candidates that share themes but not changes are correctly judged as not duplicates.
    Verification: Run devops ai prompt-eval with the specified evaluation set against recorded model answers offline, ensuring no false positives for duplicates.
  • Criterion 2: Known true duplicates from history are correctly identified as duplicates by the model.
    Verification: Run devops ai prompt-eval with a set of known true duplicates against recorded model answers offline, ensuring correct identification of duplicates.
  • Criterion 3: The roadmap_intake_system.md prompt defines a duplicate as the same change and requires the reason to name the shared deliverable.
    Verification: Review the content of src/devops_cli/ai/tasks/roadmap_intake_system.md to confirm it enforces this definition and requirement.
  • Criterion 4: A candidate related to an existing item but distinct is filed and linked to that item.
    Verification: Run devops roadmap intake --confirm with a candidate that shares a theme with an existing item, ensuring it gets filed and linked rather than folded.

Key questions

  • What is the current definition of a duplicate in intake?: A duplicate is currently defined as any candidate that shares a theme or goal with an existing item, not necessarily the same change. [sources: src/devops_cli/ai/tasks/roadmap_intake_system.md:7, src/devops_cli/roadmap/intake.py:13]
  • How does the model decide on duplicates today?: The model shortlists the DEFAULT_ROADMAP_INTAKE_SHORTLIST (5) nearest items by cosine similarity, and then judges the candidate against this shortlist to determine if it's a duplicate. [sources: src/devops_cli/ai/tasks/roadmap_intake_system.md:7, src/devops_cli/roadmap/intake.py:13]
  • What is the proposed remedy for this issue?: Define a duplicate as the same change with the same deliverable and acceptance criteria, report related items without folding, and hold the judgment to real cases using an evaluation set. (proposed) [sources: src/devops_cli/roadmap/intake.py:13, src/devops_cli/ai/tasks/roadmap_intake_system.md:7]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/bug
    on Oct 20, 2026
  2. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate describes a problem with intake's current behavior and proposes a fix, making it a bug fix.
    • Priority: P1-High. This issue affects how intake processes candidates and could lead to lost work or incorrect handling of issues.
    • Value: High. Correctly identifying duplicates prevents loss of work and ensures proper tracking of changes.
    • Effort: Medium. The change requires modifying the intake logic and updating documentation, which is moderately complex.
  3. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

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

  4. added 3 commits that reference this issue on Oct 24, 2026
    64e74dd
    0f254f0
    22146d6
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions