Skip to content

feat(roadmap): ask intake priority as a Score with urgency facts #6183

Open

Description

@devops-cli-service

Split from #5274.

Problem

Intake asks Jev for priority as a ChoiceQuestion over P1-High, P2-Medium and P3-Low with P1 first (src/devops_cli/roadmap/intake/intake_jev.py:140), and Jev leans toward the option that comes first. The state holds no facts about blockers, milestones or dependents, so the answer has no independent truth: the shadow record shows a P1 bias and no signal. The owner removed the priority field from the Jev request on 2026-11-12.

Why deferred

This part waits on an independent truth for priority and on urgency facts that the state does not hold today. The parent item stops asking Jev for priority; this item brings priority back only with a rule, the named facts and a Score.

Acceptance criteria

  1. A deterministic rule computes blocker priority inheritance from the named urgency facts, with its parameters as data, and a test gives P1-High to an item that blocks a P0 and P3-Low to an item that nothing waits for.
  2. The intake state SHALL carry the urgency facts as named fields, extracted by a tool: the blocking items and their priorities, the milestone, and the dependents.
  3. The priority question SHALL be a ScoreQuestion whose levels describe the situation and stand alone, and SHALL NOT be a ChoiceQuestion ordered P1 first; a test builds the request and asserts the question kind and the level texts.
  4. A test asserts that the question is asked only when an independent truth for priority is configured, and that intake otherwise leaves priority to the triage model.

Proposed design

Problem statement

Add a data-driven priority rule and a ScoreQuestion; do not ask Jev for priority as a P1-first ChoiceQuestion. Intake holds no blockers, milestone or dependents, so the current answer has no independent truth. This change adds those named facts, derives priority from them, and asks Jev only when the rule is configured.

Acceptance criteria

Requirement: Blocker priority inheritance

The intake priority rule SHALL derive an item's priority from the highest priority among the items that depend on it and from a data parameter map.

Scenario: Item blocks a P0 item

  • WHEN The rule receives one dependent with priority P0 and the default parameter map.
  • THEN The rule returns P1-High.

Requirement: Default priority with no dependents

The intake priority rule SHALL return P3-Low when no item depends on the item.

Scenario: Item has no dependent

  • WHEN The rule receives no dependent and the default parameter map.
  • THEN The rule returns P3-Low.

Requirement: Priority rule parameters are data

The priority rule SHALL read its inheritance map and default from the roadmap.intake.priority_rule configuration block.

Scenario: Configured map changes result

  • WHEN The configuration maps P0 to P2 and an item blocks a P0 item.
  • THEN The rule returns P2-Medium.

Requirement: Urgency facts in intake state

The intake state SHALL carry blocked_by, blocks and milestone as named fields, and the GitHub issue client SHALL fill them from issue relationships and milestone data.

Scenario: Extractor fills urgency facts

  • WHEN The GitHub issue client reads an issue with one blocker of priority P0, one dependent of priority P1 and milestone M1.
  • THEN The state holds blocked_by with P0, blocks with P1 and milestone equal to M1.

Requirement: Score question for priority

The priority question SHALL be a ScoreQuestion with stand-alone level texts and MUST NOT be a ChoiceQuestion ordered P1 first.

Scenario: Priority question kind and levels

  • WHEN Intake builds the Jev request with the priority rule enabled.
  • THEN The request holds a ScoreQuestion for JevField.PRIORITY with the level texts 'P1-High: this item blocks a P0 item.', 'P2-Medium: this item blocks a P1 item.' and 'P3-Low: no P0 or P1 item waits on this item.'

Requirement: Priority question gate on

Intake SHALL ask the priority question only when roadmap.intake.priority_rule.enabled is true.

Scenario: Enabled rule asks priority

  • WHEN roadmap.intake.priority_rule.enabled is true and intake builds the Jev request.
  • THEN The request holds the JevField.PRIORITY ScoreQuestion.

Requirement: Priority question gate off

Intake SHALL leave priority to the triage model when roadmap.intake.priority_rule.enabled is false.

Scenario: Disabled rule skips priority

  • WHEN roadmap.intake.priority_rule.enabled is false and intake builds the Jev request.
  • THEN The request holds no JevField.PRIORITY question.

Existing Tool Considered

No alternatives check has run. No open maintained tool or library covers this roadmap-specific priority rule; GitHub issue dependencies supply facts but no score. Build the rule in src/devops_cli/roadmap/intake with the existing GitHub client. Cost: about 15k-25k output tokens and 4-6 engineer hours to build, keep and fix the rule.

Key questions

  • Which rule maps the urgency facts to a priority?: Use the highest priority among the items that depend on this item, move one level less critical (P0 to P1, P1 to P2, P2 to P3, P3 to P3), and use P3-Low when no item depends on it. Keep the map and default in roadmap.intake.priority_rule. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/intake/intake_jev.py:140]
    • Chosen: Dependent priority inheritance. It uses the issue's dependency facts and gives P1-High for a P0 dependent and P3-Low for no dependent.
    • Rejected: ChoiceQuestion order. The issue rejects option order because Jev leans to the first option.
    • Rejected: Milestone due-date boost. The issue names no due-date threshold, and a boost would add a fact the state does not hold.
  • Which named fields carry the urgency facts?: Add blocked_by, blocks and milestone to the intake state. Each relationship entry holds the issue number and its priority. The GitHub issue client fills them. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/intake/intake_jev.py, src/devops_cli/roadmap/intake/intake_model.py]
    • Chosen: Named fields on the intake state. The issue asks for named fields, and a test can assert each value.
    • Rejected: Free-form prompt text. A model prompt is not a fact that a test can assert.
    • Rejected: Milestone only. The rule needs dependent priorities as well as the milestone.
  • Which question type and level text does intake use?: Use ScoreQuestion with three stand-alone level texts: 'P1-High: this item blocks a P0 item.', 'P2-Medium: this item blocks a P1 item.' and 'P3-Low: no P0 or P1 item waits on this item.' (best practice) [sources: src/devops_cli/ai/jev.py:252, src/devops_cli/roadmap/intake/intake_jev.py:140, tests/ai/test_jev_edge_fake.py]
    • Chosen: ScoreQuestion with fact levels. The issue asks for stand-alone levels and no P1-first order.
    • Rejected: ChoiceQuestion P1 first. The issue records the P1 bias and rejects this form.
    • Rejected: No question. The issue asks to bring priority back with a Score.
  • Which setting gates the priority question?: Ask the priority question only when roadmap.intake.priority_rule.enabled is true. When it is false, add no JevField.PRIORITY question and let the triage model set priority. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/intake/intake_jev.py, src/devops_cli/roadmap/intake/intake_model.py]
    • Chosen: Config gate default false. The issue asks to ask the question only when an independent truth is configured.
    • Rejected: Always ask. It would restore the P1 bias with no configured rule.
    • Rejected: Ask when a milestone exists. A milestone is not an independent truth for priority.
  • Where do the rule parameters live?: Keep the inheritance map and default in the roadmap.intake.priority_rule configuration block, with enabled defaulting to false. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md]
    • Chosen: Roadmap config data. The issue asks for parameters as data, and the roadmap config holds roadmap settings.
    • Rejected: Hard-coded map. A hard-coded map is not data that a test can change.
    • Rejected: Environment variables. The roadmap config already holds roadmap settings, and an environment variable is harder to test.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    ContributorAuthor
  2. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 17, 2026
  3. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

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/mediumpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions