Skip to content

refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880

Description

@dan-petty

Context & Rationale

ADR 0001 puts priority on the board. Today priority lives in two places that drift apart.

Scope & Deliverables

  • Deliverable:
    • gh issues triage and gh issues status, and their MCP mirrors gh_issue_triage and gh_issue_status, read every open issue and read Priority from the board through the roadmap store (refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768).
    • Triage flags an open item that has no Priority. It no longer flags a missing milestone, because a backlog item has none by design.
    • Reconcile stops reading priority labels: remove _PRIORITY_LABELS and _declared_priority.
    • .github/labels.yml drops the four priority/* labels and type/epic.
    • AGENTS.md, docs/SDLC.md, docs/SELF_IMPROVEMENT.md and docs/ROUTINE_TASKS.md name the board's Priority field instead of the labels.
    • After merge, a person removes the labels from GitHub, using the commands below.
  • Acceptance criteria:
    • Tests against refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's in-memory adapter, each offline and under 1 s, check four things:
      • triage and status report the board's Priority;
      • an issue that has a priority/* label but no field value counts as unprioritized;
      • with more than 100 open issues, every one is counted;
      • a backlog item without a milestone is not flagged.
    • rg -n 'priority/(p[0-3]|high|medium|low)' src tests .github AGENTS.md docs -g '!docs/agent/**' -g '!docs/adr/**' prints nothing.
    • Checks a person runs after merge. First, gh project item-list 2 --owner dan-petty --limit 1000 --format json must show a Priority on every open issue. Then:
      1. gh issue edit 349 --remove-label type/fix --add-label type/bug -R dan-petty/devops-cli.
      2. gh issue edit 245 --remove-label bug --add-label type/bug -R dan-petty/devops-cli.
      3. gh label delete <name> --yes -R dan-petty/devops-cli for each of: priority/p0-critical, priority/p1-high, priority/p2-medium, priority/p3-low, priority/high, priority/medium, type/fix, bug and type/epic.
      4. gh label list -R dan-petty/devops-cli --limit 200 --json name --jq '.[].name' | grep -E '^(priority/|bug$|type/fix$|type/epic$)' prints nothing.
    • uv run devops ci passes.
  • Key questions:
    • Why delete the labels by hand instead of adding pruning to gh labels sync? It is a one-off cleanup. A prune flag would be new code used once (proposed).
    • Does anything read a PR's priority label? No. The labels are also on PRs and go with them (proposed).
    • Do the status/* labels go too? No (proposed). Reconcile still reads them for an unset Status.
  • Constraint: never delete a priority label while any open issue has no Priority on the board. The person-run check above comes first.

Strategic Alignment

Split off #739 during the v0.2.25/v0.2.26 readiness review (2026-10-01): The original #739 scope removed the priority/pN labels and made gh issues triage and gh issues status read the board. That needs its own code, tests and person-run label deletions. These can only safely happen after #739's migrate has filled Priority on every open issue. Splitting it off keeps #739 within one PR.

Update 2026-10-08: refinement

  • Delivered: triage no longer flags a missing milestone (github/issues.py:295-300).
  • Open: triage reads at most 100 of 335 issues (:302) and reads priority from labels, so intake-placed items look unprioritized.
  • type/fix (11 issues) becomes type/bug; the forms apply type/* and status/triage.
  • Triage counts an intake-placed P2 item with no label as prioritized.

Proposed design

Problem statement

The roadmap's priority field is currently duplicated in two places: the board's Priority field and the priority/pN labels. This duplication causes drift as changes in one location do not propagate to the other, leading to inconsistent prioritization information. Additionally, stray labels like priority/high, type/fix, and bug need consolidation.

Acceptance criteria

  • Criterion 1: gh issues triage and status read every open issue and Priority from the board through the roadmap store
    Verification: Run tests against refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768's in-memory adapter, each offline and under 1 s, to check that triage and status report the board's Priority
  • Criterion 2: An issue with a priority/* label but no field value counts as unprioritized
    Verification: Test that an open item with a priority/* label but no Priority field is counted as unprioritized in triage
  • Criterion 3: With more than 100 open issues, every one is counted
    Verification: Run tests with over 100 open issues to ensure all are properly counted by triage and status
  • Criterion 4: A backlog item without a milestone is not flagged
    Verification: Verify that triage no longer flags an open item without a milestone (backlog item) after the change
  • Criterion 5: No priority labels remain in the codebase or documentation
    Verification: Run rg -n 'priority/(p[0-3]|high|medium|low)' src tests .github AGENTS.md docs -g '!docs/agent/**' -g '!docs/adr/**' -g '!docs/ROADMAP.md' and confirm it prints nothing
  • Criterion 6: All relevant documentation is updated to reference the board's Priority field
    Verification: Check that AGENTS.md, docs/SDLC.md, docs/SELF_IMPROVEMENT.md and docs/ROUTINE_TASKS.md name the board's Priority field instead of labels

Key questions

  • Why delete the labels by hand instead of adding pruning to gh labels sync?: It is a one-off cleanup. A prune flag would be new code used once (proposed).
  • Do the status/* labels go too?: No (proposed). Reconcile still reads them for an unset Status.

Open questions

  • Does anything read a PR's priority label? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/refactor
    scope/github
    priority/p2-medium
    on Oct 1, 2026
  2. dan-petty commented on Oct 9, 2026

    @dan-petty
    OwnerAuthor

    Folded in from the owner's roadmap Service requests (2026-10-09)

    Amendment 2026-10-09: intake is the only automatic path to a Priority

    The owner asked (2026-10-09):

    continue working through all open items in small batches per iteration interval until the have a priority

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

    Already delivered by #742 and #1360. No new Service code is needed.

    • Intake's candidates are every open issue that is off the board or has an empty Priority, at any age (roadmap/intake.py:665-670).
    • A Service round decides at most 5 of them: fresh ones first, then the longest waiting (_queue, :686).
    • Intake stays due at every poll while a fresh candidate remains (_intake_due, roadmap/run.py:349-357).
    • Measured: 300 open issues, all on the board, and none without a Priority (3 P0, 52 P1, 196 P2, 49 P3). The intake record is empty.
    • The Service's other repositories have 53 open issues between them, all with a Priority.

    What remains is this item's scope:

    1. A second path sets Priority without intake. devops gh project sync copies a priority/* label into an empty Priority (_PRIORITY_LABELS, github/projects.py:782-787; declared_priority, :821-827, used at :852). AGENTS.md:194 and :414 tell agents to run sync after filing. Intake treats any Priority as finished (intake.py:669), so an item prioritized this way never gets a Value, an Effort or a reason comment.
    2. No correct count of items without a Priority. gh issues triage reads at most 100 issues and takes Priority from labels (github/issues.py:302, :311, :320). Today it would report 60 issues as missing a priority: the newest open issues that intake placed without a label. The board shows 0.

    Added acceptance criteria:

  3. added this to the v0.2.37 milestone on Oct 17, 2026
  4. 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)

  5. modified the milestones: v0.2.37, v0.2.38 on Oct 19, 2026
  6. dan-petty commented on Oct 19, 2026

    @dan-petty
    OwnerAuthor

    Status set back to New at 0ae4ea4: refine found it not ready (see Key questions, Fit and Suspected block in the proposed design in the issue body).

  7. removed this from the v0.2.38 milestone on Oct 20, 2026
  8. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    Evidence for this item from 2026-10-20: the board's Priority field and the priority/* labels disagree on most of the backlog.

    Either intake and reprioritize write the matching priority/* label with the field, or the labels are retired and AGENTS.md and the triage checks read the board field only, which is this item's direction.

  9. modified the milestone: on Oct 21, 2026
  10. added a commit that references this issue on Oct 24, 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/refactor

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions