Skip to content

feat(roadmap): reprioritize places every open p0 and p1 item in an open release, from the backlog and at a release start #882

Closed

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

  • None of the 2026-10-17 decisions changes this item.
  • Small decisions made in this review:
    • The helper and the sweep take their limit from release_limit (cap plus slots), never a literal 16. This repository's temporary release_cap = 16 makes its limit 20 until a person removes that line. Tests use the defaults, 12 + 4.
    • The function that picks which P3 a P0 displaces sits beside the helper, so feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534's intake displacement reuses it and no second copy of the rule is written.
    • A P3 that a person placed can still be displaced. The owner's 2026-10-09 rule names no exception, and the size rule binds everyone (reprioritize.py:153-154). A P0 or P1 that a person took out of a release still stays out.
    • The displaced P3's move gets its own displaced reason, which names the P0. Both new reasons (priority and displaced) join REASON_GROWTH_GROUPS under START. That is because every reason must have a group or be silent (tests/test_roadmap_reprioritize.py:3111), and both moves shape a planned release before it starts.
    • The person check uses --plan, not --dry-run. --dry-run makes no request (src/devops_cli/lang/en/help.py:1113-1116), so it cannot list any placements. --plan reads GitHub and writes nothing (:1117-1120).

Scope

  • This item delivers steps 1-3 and 5 of the 2026-10-09 re-scope:
    • the placement helper;
    • reprioritize's sweep of backlog P0 and P1 items, including P0 displacement at the limit and a new patch release when every release is full;
    • the start rule that sends a New or Blocked P0 or P1 item TO_NEXT;
    • the docs for these.
  • Step 4 moved to feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534, as recorded in the 2026-10-09 comment. That covers intake placing new P0 and P1 items as they arrive, its intake acceptance criterion, tests/test_roadmap_intake.py, and the intake docs (RELEASE_CYCLE.md:214, the intake module docstring, intake_reason_backlog).
  • Docs changed here:
    • the CONTEXT.md Backlog entry (:79-81) and Reprioritization entry (:117-118);
    • the reprioritize module docstring;
    • the reprioritize help text (src/devops_cli/lang/en/help.py:1101-1109), with the command docs regenerated;
    • the two new reason texts in src/devops_cli/lang/en/messages.py:1270-1334;
    • changelog.d/882.md.
  • AGENTS.md is unchanged. The text the re-scope cited at AGENTS.md:122 and :127 ("its place: the backlog, or for a critical fix …") is gone, and AGENTS.md has no reprioritize placement rule.

Delivery

  • One PR (size M) into release/v0.2.37, with Fixes #882. It changes reprioritize.py, messages.py, help.py, CONTEXT.md, the generated docs and the tests, and adds the fragment.

Acceptance criteria

  • The 2026-10-09 criteria stand, with two exceptions: the intake bullet moved to feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534, and the person check reads uv run devops roadmap reprioritize --plan.
  • When a P0 displaces a P3, the P3 gets a displaced reason comment that names the P0. The P3 moves to the next open release with room, or to the backlog when every release is full.
  • A P3 that a person placed is displaced like one a job placed.
  • With release_cap = 16 and the default 4 slots, a backlog P1 goes into a planned release that holds 16 items. This shows the limit comes from release_limit.
  • test_all_reasons_in_reason_growth_groups_or_silent passes unchanged with both new reasons.
  • The invariant count at tests/test_roadmap_lifecycle_properties.py:1276 goes from 18 to 19, and the new invariant's message starts with a term that CONTEXT.md defines.

Current references (checked at 3dd7fa6)

  • src/devops_cli/roadmap/reprioritize.py:
    • TRANSITIONS is at :400-441; the start rows that change are :432 (NEW_AT_START) and :434 (BLOCKED_AT_START).
    • REASON_GROWTH_GROUPS is at :332-354.
    • _Ranks.first is at :1042-1045.
    • placed_by_person is at :494, and _candidates checks it at :1945-1946.
    • _next_release is at :1565-1571; the helper goes beside it.
    • _patch_bump is at :1537 and _create_release at :1546.
    • _plan_rules is at :1847, _start_event at :1905-1914, _planned_titles at :1954 (its loop at :1963) and _plan_start at :2063.
    • The docstring line "never sets Priority, Value or Effort" (:159) stays true.
  • release_limit is at src/devops_cli/roadmap/config.py:63-66.
  • In .github/roadmap.toml, planning_horizon = 3 is at :10 and the temporary release_cap = 16 at :30-33.
  • _placement is at src/devops_cli/roadmap/intake.py:939-955 and is unchanged here; feat(roadmap): intake runs in its own triage lane on a fast devops-triage model, so a new p0 or p1 item gets its priority within one poll #1534 changes it.

Dependencies and order


Context & Rationale

Reprioritization re-ranks items and moves them between the planned releases and the backlog (CONTEXT.md:109-111). #740 delivers the release rules (admission, cap, descoping, stall, cut lock and release start) and leaves ranking to this item, so that #740 fits one PR. Nothing ranks items today:

Scope & Deliverables

Strategic Alignment

Split off #740 during the v0.2.25/v0.2.26 readiness review (2026-10-01): Ranking needs its own inputs (linked advisories and alerts from #745) and its own rules. With ranking included, #740 would not fit one PR. Release start in #740 already orders by the existing priority, so the release rules deliver their value without ranking.

Dependency on #1123 (2026-10-03)

#1123 introduces the shared dependency order (in _Ranks) that the release-start trim and the cap descope use: an item that a staying item depends on is never moved before it. This item's first sort rule ("an item that another item depends on ranks at least as high as that item") reuses that order rather than computing its own.

Update 2026-10-08: refinement

_Ranks (roadmap/reprioritize.py:820-843) orders only the top-up and trim, and nothing reads Effort. The planned releases are planning_horizon (3, .github/roadmap.toml:10). Use #1349's placed_by_person (:425). The bump contradicts the docstring 'never sets Priority, Value or Effort' (:157-159), which changes with it. Waits only on #1123.

Re-scope 2026-10-09: every open P0 and P1 item sits in an open release

The owner asked (2026-10-09):

all open p0 and p1 issues should be assigned to an open milestone

Proposed new title: feat(roadmap): every open p0 and p1 item sits in an open release, placed by intake as it arrives and by reprioritize from the backlog.

This replaces the Deliverable and Acceptance criteria above. It also replaces the 2026-10-03 dependency on #1123, because this placement reads no blocked-by links.

Problem

Checked at release/v0.2.32 (a9d7fd8) and on board 2 (read-only, 2026-10-09 ~18:00Z).

The count. By the board's Priority field, 55 open items are P0 or P1: 3 P0 and 52 P1. 35 of them have no milestone: P0 #1496 and 34 P1 items, of which 6 are Ready and 29 New.

The planned releases. People's sessions placed every item in them:

  • v0.2.33 holds 10 Ready P0/P1 items.
  • v0.2.34 holds 10 P1 items: 6 New, 2 Ready, 2 Blocked.
  • v0.2.35 holds 7 New P2 items.

No rule gives a non-critical P0/P1 item a release:

  • Intake places only a critical fix. A P0 feature and every P1 go to the backlog (_placement, roadmap/intake.py:916-933). Yet reprioritize's own table sends a P0 feature that joins the current release to the next release ((STARTED, P0_FEATURE_JOINED) -> TO_NEXT, roadmap/reprioritize.py:337).
  • Reprioritize fills only a starting release, and only with Ready items (_candidates, _fill_or_trim, :1646-1739). _planned_titles creates planning_horizon empty planned releases, and nothing fills them (:1674-1688).
  • A start sends a New or Blocked item that is not a critical fix to the backlog (:364, :366).

The current deliverable contradicts the request. Its rule "the rest go to the backlog" would keep P0/P1 items out of releases.

Owner decisions (2026-10-09)

  • Plan 12 items per release ahead of time (release_cap).
  • A P0 or P1 item in the backlog without a milestone is assigned to the nearest open release with fewer than 16 items (release_cap + release_slots).
  • When that release holds 16, a P0 displaces the lowest-ranked P3 in it that is not yet implemented (no linked pull request; Status New or Ready). The P3 moves to the next open release with room, or to the backlog when every release is full. A P1 never displaces anything; it goes to the next release with room.
  • A P0/P1 item a person took out of a release stays out (fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349, ADR 0002); the plan lists it.

Proposed remedy

One rule, built on one shared helper, in two files. No new job, record or setting.

  1. Helper (reprioritize.py). It returns the nearest open planned release after the current or starting one that holds fewer than a given number of open items, or none.
  2. Reprioritize places backlog P0/P1 items.
    • When: in every run, after the existing rules in _plan_rules and _plan_start.
    • Which items: every open backlog item whose Priority is P0 or P1, unless a person took it out of a release. That person check is the history check _candidates already makes.
    • Where: in _Ranks.first order, into the helper's release with fewer than release_cap + release_slots (16) items.
    • At 16: a P0 displaces the lowest-ranked P3 in that release that is not yet implemented (no linked pull request; Status New or Ready), which moves to the next open release with room, or to the backlog when every release is full. A P1 never displaces anything and goes to the next release with room.
    • When every release is full: the job creates the next patch release with _patch_bump and _create_release and places the item there. planning_horizon becomes the minimum number of planned releases, not the maximum.
    • How it is recorded: one new event and TRANSITIONS row, (PLANNED, PRIORITY_IN_BACKLOG), writes the Release with a new priority reason. The write is recorded like every job move, with no Admitted mark.
    • Plan output: the plan lists the P0/P1 items a person keeps in the backlog.
  3. A start keeps P0/P1 items in a release. At a start, a New or Blocked P0/P1 item that is not a critical fix goes TO_NEXT, with the existing not_ready_at_start and blocked_at_start reasons. This takes two new events and rows. P2 and P3 items still go to the backlog.
  4. Intake places new P0/P1 items as they arrive.
  5. Docs.
    • CONTEXT.md: the Backlog and Reprioritization entries.
    • AGENTS.md:122 and :127 ("its place: the backlog, or for a critical fix …").
    • RELEASE_CYCLE.md:214 ("Intake places any other candidate with no milestone in the backlog").
    • The intake and reprioritize module docstrings, intake_reason_backlog, and the new reason text.
    • A changelog.d fragment.

Dropped from the original scope:

Expected first run: recompute at build time with the 16 limit; today 35 open P0/P1 items have no milestone.

#772 and #844 stay in the backlog because a person took them out of v0.2.25 and v0.2.28 on 2026-10-01 and 10-02; the owner decided on 2026-10-09 that such a removal stands.

Acceptance criteria

  • Tests on the in-memory store (tests/test_roadmap_reprioritize.py, tests/test_roadmap_intake.py):
    • A backlog P1 goes to the nearest planned release holding fewer than 16 items, with the priority reason comment. A P2 stays in the backlog.
    • A backlog P0 meeting a release that holds 16 displaces its lowest-ranked unimplemented P3 to the next release with room; a P1 meeting 16 goes to the next release instead, displacing nothing; a P3 with a linked pull request is never displaced.
    • With every planned release at 16 and no unimplemented P3 to displace, the run creates the next patch release and places the item there.
    • At a start, a New P1 goes to the next planned release, a New P2 still goes to the backlog, and a New critical fix still stays.
    • A P1 that a person took out of a release stays in the backlog, and the plan lists it.
    • Intake places a new P1 into the next planned release while that release holds fewer than 16 items, and into the one after it once it holds 16. When every planned release holds 16, the P1 goes to the backlog.
    • A second run with no change writes nothing.
  • The lifecycle machine (tests/test_roadmap_lifecycle_properties.py) gains the invariant "after a finished run, every open P0/P1 item that no person took out of a release sits in an open release". The test that counts invariants is updated to match.
  • Tests are offline and each takes under 1 s. uv run devops ci passes.
  • Person check: uv run devops roadmap reprioritize --dry-run lists the placements above and writes nothing.

Related:

Activity

  1. added
    type/feature
    scope/github
    priority/p2-medium
    on Oct 1, 2026
  2. changed the title [-]feat(github): reprioritization re-ranks the planned releases and the backlog[/-] [+]feat(roadmap): every open p0 and p1 item sits in an open release, placed by intake as it arrives and by reprioritize from the backlog[/+] on Oct 9, 2026
  3. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Step 4 of the 2026-10-09 re-scope (intake places new P0/P1 items as they arrive) and its intake acceptance criterion moved to #1534, per the owner's 2026-10-09 decision to have one triage item. That item runs intake in its own lane on a fast model and adds the P0 displacement at 16.

    This item keeps steps 1-3 and 5: the helper, reprioritize's backlog sweep, the start rule, and the docs for those. #1534 uses the helper and lands after this item.

  4. added this to the v0.2.37 milestone on Oct 17, 2026
  5. dan-petty commented on Oct 17, 2026

    @dan-petty
    OwnerAuthor

    Moved to v0.2.37: v0.2.37 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)

  6. changed the title [-]feat(roadmap): every open p0 and p1 item sits in an open release, placed by intake as it arrives and by reprioritize from the backlog[/-] [+]feat(roadmap): reprioritize places every open p0 and p1 item in an open release, from the backlog and at a release start[/+] on Oct 18, 2026
  7. added
    status/in-progress
    status/in-review
    and removed
    status/in-progress
    on Oct 20, 2026
  8. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    Delivered by #1715 (merged into release/v0.2.37 as 38fc0e9). Its description ticks every acceptance criterion, with intake placement deferred to #1534, but it named this issue only in its title and carried no closing keyword, so neither GitHub nor devops roadmap close closed it. Closed by hand on 2026-10-20.

  9. removed
    status/in-review
    on Oct 20, 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/p2-mediumscope/githubtype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions