Skip to content

feat(roadmap): agent filing quota: release credit, ratio throttle, borrowing and per-release tuning #1153

Closed

Description

@dan-petty

Problem

Agents file issues faster than releases close them, and nothing in the repository slows them down. The open count was 280 on 2026-10-04, read with REST search (repo:dan-petty/devops-cli is:issue is:open). v0.2.25 closed 70 issues (milestone 43).

The owner set a limit on 2026-10-03/04. 200 open issues is "the limit for agents to stop adding items … the project management should just work to burn down that budget overage". A hard cap could deadlock, because some items can't be finished without opening another. So agent filing is throttled, not stopped. A release credit gives headroom, and the number of closures each opening costs rises as the open count nears and passes the limit.

So far the rule exists only as amendments spread over four issues: #742 (formula and enforcement), #1126 (reporting and tuning), #1127 (burn-down) and #1125 (cheap reads). The formula and its tuning can drift apart there, so this item is the single source for the quota (see Key questions).

Nothing enforces the rule today. .github/roadmap.toml (at 2341ee5) declares only board and planning_horizon. RoadmapConfig (src/devops_cli/roadmap/config.py:26-35) knows board, release_cap, discovery_threshold, planning_horizon and stall_days, and it forbids unknown keys. .github/labels.yml has no source/* or budget/* label. The filing rules in AGENTS.md:122-132 (generator block devops_roadmap_governance_block, src/devops_cli/ai/instruction_generator.py:205-218) tell agents to file every observation and set no limit.

The rule

Scope. The rule covers agent-sourced issues only: reviews, evaluations, roadmap jobs' own findings, and agent sessions. Issues a person files never count and are never refused.

First choice. A finding is folded into an existing item, as an amendment or a comment, or it joins an open consolidation group (#1127). Folding needs no new issue.

Window. The current release cycle runs from its start to its ship. It starts when the previous release's milestone closes (v0.2.26 started at 2026-10-03T20:37:25Z, when milestone 43 closed).

Release credit. Each cycle starts with this many agent openings that need no closures:

credit = min(release_credit_base + release_credit_per_delivered_item × delivered, release_item_target)

  • delivered is the number of issues closed in the previous release's milestone.
  • release_credit_base is 10 and release_credit_per_delivered_item is 1.
  • release_item_target is 50. The owner wants to stay under 50 items per release, and 10 + 70 = 80 "is too much" (owner, 2026-10-04).
  • v0.2.26 therefore starts with a credit of 50.

Ratio. Beyond the credit, each agent opening costs r(n) closures. n is the repository's open-issue count, L is open_issue_limit (200), s is throttle_start_fraction (0.8) and o is overage_step_fraction (0.25).

  • n < s·L: r = 0, so there is no throttle.
  • s·L ≤ n < L: r = (n - s·L) / ((1 - s)·L). With the defaults this is (n - 160) / 40, rising from 0 to 1 closure per opening.
  • n ≥ L: r = 1 + (n - L) / (o·L). With the defaults this is 1 + (n - 200) / 50: 2 closures per opening at 250 open, 2.78 at 289.

Allowance. The number of agent openings allowed this cycle is credit + floor(closures this cycle / r(n)). When r(n) is 0 the allowance has no limit. An opening proceeds while the cycle's agent openings, borrowed ones included, are below the allowance. Measured on 2026-10-04: n = 280, so r = 2.6. The cycle has 20 closures, so the allowance is 50 + floor(20 / 2.6) = 57.

Borrowing, never refusing. An opening beyond the allowance still proceeds when it is needed to finish work:

  • a split of an item too big for one PR;
  • a follow-up a reviewer or readiness check requires;
  • a P0/P1 bug or security issue.

It is labelled budget/borrowed and counts as debt until it is closed. Any other opening beyond the allowance is folded into an existing item instead, with a line saying why.

What counts as a closure. An issue closed in the window as completed, merged into another item, superseded or expired, each with a comment. A bulk "not planned" close without a comment does not count.

Config keys (.github/roadmap.toml)

Key Value Meaning
open_issue_limit 200 L, where the ratio reaches 1 closure per opening
throttle_start_fraction 0.8 s, the share of L at which the throttle starts
overage_step_fraction 0.25 o, the share of L above L that adds one closure per opening
release_credit_base 10 the credit with nothing delivered
release_credit_per_delivered_item 1 credit added per item the previous release delivered
release_item_target 50 the credit's cap, and the item count each release aims to stay under

Metrics

Each metric is a REST read, so none of them spends GraphQL points (#1125). <start> is the window's start and R is the repository.

  • Open count n: GET /search/issues, q=repo:R is:issue is:open, total_count.
  • Delivered and start: GET /repos/R/milestones/<previous>, closed_issues and closed_at.
  • Agent openings: q=repo:R is:issue label:source/agent created:>=<start>.
  • Borrowed openings: the same query with label:budget/borrowed.
  • Closures: q=repo:R is:issue is:closed closed:>=<start>, minus q=… is:closed closed:>=<start> reason:"not planned" comments:0.
  • Debt: q=repo:R is:issue is:open label:budget/borrowed.
  • Derived values: r(n), credit used and left, and allowance left. Folded findings come from intake's run report (feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742), because a fold opens no issue that search could count.

Per-release tuning

Owner, 2026-10-04: "We can adjust the formula after each release based on milestone metrics as all iterative cycles of the project." At each ship, #1126 proposes the next cycle's values; its proposal for release_item_target follows the rule below.

How the target moves. Owner, 2026-10-04: the target "should be near the boundary of current performance with oversight and ambition … as we iterate we can decrease that target closer to 30, but we have a backlog to get through".

  • Placement. The target sits just beyond the release's measured throughput (its delivered items), without overshooting what the owner can oversee.
  • Lowering. It moves toward 30 in small steps (proposed: 5). It moves only when the release met its target, borrowed debt was repaid and the open count fell over the cycle.
  • Holding. While the open count is above open_issue_limit, the target holds, so the backlog burn-down keeps its throughput.
  • Explanation. Each proposal states which of these conditions held.

Which item does what

Acceptance criteria

  • Config keys and their reader. RoadmapConfig (src/devops_cli/roadmap/config.py) gains the six keys in the table, with defaults in src/devops_cli/config/defaults.py next to DEFAULT_ROADMAP_RELEASE_CAP. Pydantic field constraints validate them: limits and target ≥ 1, credit terms ≥ 0, and fractions strictly between 0 and 1. .github/roadmap.toml declares all six with the values in the table and one comment line each. The file is read through the existing read_roadmap_config, with no new parsing. Tests in tests/test_roadmap_config.py cover these cases:

    • the defaults;
    • the declared file;
    • a fraction of 0 or 1 rejected with the key named;
    • an unknown quota key rejected (extra="forbid").
  • A pure quota function. A new module src/devops_cli/roadmap/quota.py exposes ratio(n, config), release_credit(delivered, config) and allowance(n, delivered, closures, config). Each returns a value and does no I/O. Arithmetic is exact (stdlib decimal or fractions), so a boundary such as 0.5 closures per opening never rounds down. With the default config, tests in tests/test_roadmap_quota.py assert:

    • r(150) = 0, r(160) = 0, r(180) = 0.5, r(200) = 1, r(250) = 2 and r(289) = 2.78;
    • credit for a previous release of 0, 30 and 70 delivered items = 10, 40 and 50;
    • the allowance has no limit while r(n) is 0, and allowance(250, 70, 20) = 60 and allowance(280, 70, 20) = 57.

    Each test runs offline and the module takes under 1 s (--durations=0).

  • Labels. .github/labels.yml adds source/agent ("Filed by an agent; counts toward the filing quota") and budget/borrowed ("Agent opening beyond the quota allowance; counts as debt until closed"), each with a colour.

  • The AGENTS.md rule. AGENTS.md's filing rules (:122-132) and their generator block (devops_roadmap_governance_block, src/devops_cli/ai/instruction_generator.py:205-218) gain one rule with the same text. It says:

    • fold a finding into an existing item first;
    • label every agent-filed issue source/agent;
    • beyond the release credit, each opening costs r(n) closures, using the values in .github/roadmap.toml;
    • an opening beyond the allowance proceeds only as a borrow (split, required follow-up, P0/P1 bug or security), labelled budget/borrowed, and anything else is folded with a line saying why;
    • issues a person files never count.

    The rule links this issue for the formula and names the REST search queries above, so an agent that does not go through intake can check its allowance. AGENTS.md is edited by hand and the generator mirrors it. Nothing regenerates AGENTS.md (docs(agents): instruction surfaces state only what is true, and devops ai agents never overwrites AGENTS.md #840). A test in tests/test_instruction_generator.py asserts that the template names source/agent, budget/borrowed and open_issue_limit.

  • A changelog.d fragment named for this issue records the change. uv run devops ci passes.

Key questions

Strategic alignment

Activity

  1. added
    type/feature
    scope/github
    priority/p1-high
    on Oct 4, 2026
  2. dan-petty commented on Oct 4, 2026

    @dan-petty
    OwnerAuthor

    Closed by #1155, 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.

  3. 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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions