Skip to content

feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742

Closed

Description

@dan-petty

Context & Rationale

New work enters the roadmap from several places, and nothing checks it on the way in. Checked at ef21785:

Intake becomes the single way in. Duplicate checks, priority and placement live in one place.

Scope & Deliverables

  • Deliverable: devops roadmap intake, in feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate, render) #739's command group. It has an MCP mirror and follows feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate, render) #739's --dry-run/--confirm convention.
    • Inputs
    • Duplicate check
      • Compares each candidate against every item on the board, open or closed, and against every issue closed as not planned. feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate, render) #739's rejected rows count even if they are not on the board. Candidates placed earlier in the same run join the comparison set.
      • Embeds the candidate and the comparison set through the gateway, keeps the 5 nearest, and has the model judge each pair. It reuses the existing embedder (ai/rag/embeddings.py) and cosine_similarity (ai/benchmark/embedding_runner.py:62). It embeds nothing when there are no candidates.
      • A duplicate is closed with state reason DUPLICATE and duplicateIssueId set to the original. It gets one comment linking the original and is not added to the board.
      • A candidate that is not an issue yet files nothing when it is a duplicate, and intake prints the original's number.
    • Proposal
      • The model returns a structured proposal: type, priority (P1-P3), Value, Effort, optional evidence (kind and value), and a one-line reason for each. Code validates it.
      • Intake sets P0 only when all of these hold, under the "P0 by automation" rule, which feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 handed to this item:
        • the evidence value appears verbatim in the candidate's text or in the evidence the entry point was given;
        • intake confirms the evidence exists (see Key questions);
        • the source is trusted. Either the author has write access (author association OWNER, MEMBER or COLLABORATOR, which includes the machine account), or the entry point's caller attached the evidence.
      • Otherwise the item gets the model's P1-P3, and the comment names the evidence and says a person can set P0.
    • Placement
    • Writes, in this order. Priority is written last and marks the item as finished.
      1. For a new candidate, file the issue.
      2. Add a type/* label when the issue has none.
      3. Add the issue to the board.
      4. Set the milestone when the item is placed in a release.
      5. Set Status New, Value and Effort.
      6. Leave one reason comment, unless intake's comment is already there. The comment carries a fixed marker.
      7. Set Priority.
      • Resume: an open board item with no Priority is unfinished. The next run fills only its empty fields and adds a missing type/* label or reason comment. It keeps a milestone the item already has and places the item if it has none. It skips the duplicate check. A crash at any step leaves either an open issue off the board or a board item with no Priority, and the next run finishes it. This also covers an item a person put on the board without a Priority.
    • Store: add to refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's store any operation intake needs that earlier items have not added, in both adapters and the contract suite. These include the duplicate close with duplicateIssueId, reading close and reopen events, and listing closed board items and not-planned issues.
    • Instruction changes
      • In AGENTS.md, replace the rules at :112-121, :122-132 and :313-322, the "If no issue exists" branch at :172, and the "milestone linkage" clause at :329. Drop docs/ROADMAP.md from the planning documents at :166.
      • Make the same change in docs/SDLC.md:48 and :71-72, and in docs/ROUTINE_TASKS.md:15, :60, :91-92 and :157.
      • Make it also in ai/knowledge_base/devops_cli/tasks/github_project_management.md:7, :66-69, :135-137, :142 and :166-171.
      • The replacement says: file a candidate with devops roadmap intake --title … --body-file …; never set a milestone or priority on a new issue; never edit docs/ROADMAP.md.
      • Mirror the change in ai/instruction_generator.py:205-218, and update tests/test_instruction_generator.py:364-371.
    • Triage audit
      • Drop the missing-milestone check from audit_issues_triage (github/issues.py:303, :315-317), and drop the IssueTriageAudit field (:43).
      • Drop its output row (commands/gh.py:1109-1113) and the "milestone linkage" wording in its warning (:1118), docstring (:1087), help (lang/en/help.py:794) and MCP tool (ai/mcp/server.py:1721).
      • Update tests/test_gh_cmd.py:233 and tests/test_github_issues.py:45 and :132.
      • A backlog item has no milestone.
      • Report open issues that are not on the board once, as awaiting intake, and not as missing a priority.
  • Acceptance criteria: all tests run against refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's in-memory adapter, with a fake embedder and a fake model.
    • An open issue that is not on the board ends up on the board with Status New, a P1-P3 priority, Value, Effort, no milestone and exactly one reason comment. Verified by a test.
    • A candidate the fake judge marks as a duplicate of a not-planned issue is closed as DUPLICATE, pointing at that issue, with one comment, and is not added to the board. Verified by a test.
    • Two candidates in one run that the fake judge marks as duplicates of each other produce one item and one DUPLICATE close. Verified by a test.
    • A candidate whose timeline shows a DUPLICATE close followed by a reopen is placed without a duplicate check. Verified by a test.
    • A type/bug candidate opened by a collaborator, whose body cites an existing commit as the one that introduced it, gets P0 and goes into the current release. The same candidate citing a commit that does not exist gets P1 in the backlog, and its comment says why. Verified by a test.
    • The same valid citation in an issue whose author has no write access gets P1 in the backlog, with a comment saying a person can set P0. So does a model proposal whose evidence value is not in the candidate's text. Verified by a test.
    • A critical fix arriving while the release PR is open goes into the next planned release. Verified by a test.
    • A P0 feature with verified evidence lands in the backlog at P0. Verified by a test.
    • A candidate whose milestone is a planned release keeps it. A non-critical candidate whose milestone is the current release ends up in the backlog with a comment. Verified by a test.
    • Injection test. The candidate body tells the model to set P0, add the item to the current release, close feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 and add type/security. The fake model echoes that, with a duplicate_of outside the shortlist. Intake writes only the allowed set: the candidate's board fields, its type/* label and its comment. It writes nothing to feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740, and it rejects the duplicate_of. Verified by a test.
    • When the in-memory store raises right after the board add, the next run finishes the item: Status New, Priority, Value, Effort and exactly one reason comment in total. Verified by a test.
    • A second run over the same state writes nothing. Verified by a test.
    • --dry-run writes nothing and prints each planned change. Verified by a CliRunner test.
    • When the fake embedder raises a connection error, the command exits non-zero, names the gateway and writes nothing. Verified by a test.
    • For a duplicate, --title/--body-file files no issue and prints the original's number. For a new candidate it files exactly one issue and places it. Verified by a test.
    • The MCP mirror runs a dry run unless confirm is true, and the command line it builds is one the CLI accepts. Verified by a test that calls the tool against the in-memory store. The tool is also listed in tests/test_fastmcp_contracts.py.
    • rg -n 'TO THE ROADMAP|STRUCTURED ROADMAP TASKS|under active defects|(and|or) milestone linkage|If no issue exists|link the active milestone|Link the active release milestone|must link to the active release milestone|linked to active milestone|unmilestoned|update ROADMAP.md|Register milestones and strategic features' AGENTS.md docs/SDLC.md docs/ROUTINE_TASKS.md src/devops_cli/ai/instruction_generator.py src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md src/devops_cli/commands/gh.py src/devops_cli/ai/mcp/server.py src/devops_cli/lang/en/help.py returns nothing. So does rg -n issues_missing_milestone src tests.
    • A generator test asserts that the template names devops roadmap intake and no longer contains the ingestion rules.
    • The audit_issues_triage tests no longer expect a missing-milestone entry. One test asserts that an issue not on the board is reported as awaiting intake, not as missing a priority.
    • Each new test runs offline under fix(test): the test network guard refuses loopback connects to services the test did not start #837's loopback guard. The new module takes under 1 s in total (uv run pytest tests/test_roadmap_intake.py --durations=0).
    • Person-run checks, with the gateway reachable and ai.gateway_enabled set, in a checkout of dan-petty/devops-cli:
      • uv run devops roadmap intake --dry-run lists every open issue that is not on the board, with its proposed duplicate, type, priority, Value, Effort and placement. Run these two commands before and after it, and each prints the same output both times. <board> is the number in .github/roadmap.toml.
        • gh issue list -R dan-petty/devops-cli --state all --search "sort:updated-desc" --limit 1 --json number,updatedAt
        • gh project item-list <board> --owner dan-petty --limit 1000 --format json | sha256sum
      • f=$(mktemp); echo "One entry point turns candidates into items: duplicate check, priority, placement." > "$f"; uv run devops roadmap intake --title "feat(github): single-entry item intake with duplicate detection" --body-file "$f" --dry-run reports a duplicate of feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742 and would file nothing.
  • Key questions:
  • Constraint:

Strategic Alignment

Amended 2026-10-04: enforce the agent filing quota at intake

The quota is defined in #1153: the release credit, the ratio r(n), the allowance, borrowing, what counts as a closure, the config keys and the metrics. Intake enforces the rule; it does not restate it.

  • Intake reads the spec's counts through REST search, which uses the REST quota: open issues, agent-sourced issues (source/agent) created since the cycle started, borrowed openings, and issues closed since then. It reads the config through read_roadmap_config and computes the allowance with the spec's function. It labels every candidate from an agent entry point source/agent.

  • Every agent-sourced candidate gets one of the spec's three decisions: open within the allowance, fold into an existing item, or borrow (budget/borrowed). Intake reports its decision on every run, with the numbers behind it. A test covers each branch, including a borrowed split that is never refused and a person's issue, which skips the check.

  • Depends on: feat(roadmap): agent filing quota: release credit, ratio throttle, borrowing and per-release tuning #1153 (the agent filing quota spec) for the quota's definition.

Activity

  1. added this to the v0.2.25 milestone on Sep 30, 2026
  2. added
    type/feature
    scope/github
    priority/p1-high
    on Sep 30, 2026
  3. modified the milestones: v0.2.25, v0.2.26 on Oct 3, 2026
  4. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Moved from v0.2.25 to v0.2.26 by the owner (2026-10-03) so v0.2.25 can be cut once #740, #1079, #952 and the monitoring items (#550, #1080, #549) ship. Intake builds on #740's merged state machine; it starts first in v0.2.26.

  5. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Moved to v0.2.26 by the owner on 2026-10-03 and starting first. It runs in parallel with #753 (the first merge) and lands before #744 and #981. The service references now point at #1083 (#741 became the in-cluster runtime).

  6. dan-petty commented on Oct 4, 2026

    @dan-petty
    OwnerAuthor

    Closed by #1163, merged into release/v0.2.26.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

  7. added a commit that references this issue on Oct 4, 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

    priority/p1-highscope/githubtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions