Repository navigation
Description
Problem
A plan does not know about the open plans and pull requests that edit the same files. Evidence from 2026-11-02:
- docs(openspec): plan #2919 stuck-item age metrics and alert #3171, docs(openspec): plan #2950 Add alternatives coverage metrics and alert #3173 and docs(openspec): plan #2947 Raise the alternatives first-pass limit to 20 #3174 all edit
INSTRUMENTSor the generateddocs/TELEMETRY.md. Two plans merged one after the other can force a regenerate. - feat(telemetry): Add alternatives coverage metrics and alert #2950 and feat(telemetry): count tool calls of the stage planner by tool and outcome #3240 name a "Roadmap dashboard" file that does not exist; each plan picked a different dashboard file.
- docs(openspec): plan #2950 Add alternatives coverage metrics and alert #3173 puts an alert on a counter that other code also sends (refine searches count too), and nothing checks the other senders of a shared counter.
- docs(openspec): plan #3060 plan model tier ladder for retries #3225 and docs(openspec): plan #3185 move intake-eval under roadmap eval #3228 missed open issues that park or overlap them (test(roadmap): score the stage pipeline with a cloud model first #3207, fix(config): devops config unset --dry-run prints the credential that it would remove #2740, refactor(roadmap): split the roadmap commands by kind #3186).
Proposed change
When the stage context is built, list the open plan pull requests and open pull requests whose changed files overlap the paths that the plan cites or creates: number, title, state and the shared paths. For a cited metric or instrument name, list the other files that send or read it (git grep at the staged commit). The prompt tells the planner to write each overlap into ## Dependencies, and the gate refuses a plan with overlaps and a Dependencies part of "None".
Acceptance criteria
- A test with a fake list of pull requests shows that an overlapping path appears in the context with the number.
- A test shows that a cited metric name lists its other senders.
check_proposalrefuses "Dependencies: None" when the context lists an overlap, and names it.- The extra GitHub reads fit the request budget (ADR 0016), and the number of requests is stated.
Proposed design
Problem statement
The stage job builds a plan without knowledge of the open pull requests that change the same files. Two plans that edit INSTRUMENTS or docs/TELEMETRY.md can merge one after the other and force a regenerate. A plan can also put an alert on a counter that other code sends, and nothing checks the other senders. The change puts the overlaps and the other senders of a cited metric into the stage context. The gate then refuses a plan that says Dependencies: None when an overlap exists.
Acceptance criteria
Requirement: Stage context lists an overlapping pull request
The stage context builder SHALL list each open pull request that changes a path the plan names, with its number, title, state and shared path.
Scenario: A fake pull request changes a cited path
- WHEN A test gives the builder a fake list with pull request 3173, which changes
docs/TELEMETRY.md, and a plan that citesdocs/TELEMETRY.md. - THEN The context holds one entry with number 3173, its title, its state and
docs/TELEMETRY.md.
Requirement: A plan pull request carries a plan mark
The stage context builder SHALL mark an open pull request whose title has the type docs(openspec) as a plan pull request.
Scenario: A plan pull request overlaps a created path
- WHEN A test gives the builder a fake pull request titled
docs(openspec): 3252-stage-contextthat changessrc/devops_cli/roadmap/stage.py, and a plan that creates that path. - THEN The context entry holds the number, the title, the state, the plan mark and
src/devops_cli/roadmap/stage.py.
Requirement: A cited metric lists its other senders
For each cited metric name, the builder SHALL list the other files that hold the name, from git grep at the staged commit.
Scenario: A cited counter lists the files that hold its name
- WHEN A test gives the builder a plan that cites
devops_cli_github_requests_totaland a staged commit that holds the name in two files. - THEN The context lists
src/devops_cli/telemetry/instruments.pyanddocs/TELEMETRY.mdunder the cited name.
Requirement: The gate refuses an empty Dependencies part on an overlap
check_proposal SHALL refuse a plan with Dependencies: None when the context lists an overlap, and SHALL name the pull request and the path.
Scenario: An overlap with Dependencies: None
- WHEN
check_proposalgets a reply whose Dependencies part isNoneand a context that lists pull request 3173 ondocs/TELEMETRY.md. - THEN The problems hold one sentence that names pull request 3173 and
docs/TELEMETRY.md.
Requirement: The stage prompt states the Dependencies rule
The stage prompt SHALL tell the planner to write each overlap and each shared metric sender into ## Dependencies.
Scenario: The prompt holds the Dependencies rule
- WHEN A test reads the stage prompt file.
- THEN The prompt holds a rule that names
## Dependencies,Noneand the overlap list.
Requirement: The overlap read costs a stated number of GitHub requests
The builder SHALL read the open pull requests and their files in one GraphQL request for each 100 pull requests, and the design SHALL state that count.
Scenario: 150 open pull requests cost two requests
- WHEN A test gives the builder a fake GitHub client and 150 open pull requests.
- THEN The fake client records two GraphQL requests and no other request.
Existing Tool Considered
No alternatives check has run. The GitHub CLI (gh) is open and maintained, and the repository already uses it. It lists the open pull requests and their changed files with gh pr list --json number,title,state,files. git grep lists the files that hold a cited metric name at the staged commit. Neither tool compares two path sets, renders the context entry or refuses a plan whose Dependencies part is None. The change writes that glue: about 200 lines with tests, about 100k tokens to build, keep and fix, and about one day of elapsed time.
Key questions
- Can the planner already read open pull requests and search open items?: The planner's toolbox holds read-only tools. With the toolset
extended, it also holds a read of an issue or a pull request and a search of open items on GitHub. [sources: CONTEXT.md] - Should the stage context carry the overlap list, or should the planner find it with its own tools?: The stage context carries the list. The gate must refuse a plan that ignores an overlap, and the gate sees only the context and the reply. The planner's tool budget is small. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md:232]
- Chosen: Build the overlap list into the stage context. The gate can then check the reply against the list, and the planner spends no tool call on the search.
- Rejected: Let the planner search with its
extendedtools. The gate cannot check a search that the planner did not run, and the tool budget is small.
- Which GitHub read supplies the open pull requests and their changed files?: One GraphQL query for each 100 open pull requests. The query returns the number, title, state and changed files of each pull request. (best practice) [sources: docs/TELEMETRY.md, CONTEXT.md]
- Chosen: One GraphQL query for each 100 open pull requests, with the
filesconnection. One request returns every field that the context needs, and the rate limiter counts it once. - Rejected: One
gh pr view --json filesfor each open pull request. The reads grow with the number of open pull requests, and each read costs a separate request. - Rejected: Reuse the open pull requests from the poll. The poll holds no changed files.
- Chosen: One GraphQL query for each 100 open pull requests, with the
- Which document holds the request budget that the issue cites as ADR 0016?: ADR 0016 is
0016-labels-hold-the-roadmap-items-fields.md. It holds the item fields, not a request budget. The GitHub rate limiter is the request budget:devops_cli_github_requests_totalcounts each paced request by resource. [sources: docs/adr/0001-github-is-the-roadmap-source.md, docs/TELEMETRY.md] - Where does the plan write the overlaps, and what does the gate read?: The stage reply gets a
dependenciesfield. The change proposal renders it as the## Dependenciessection.check_proposalreads the field and compares it with the overlap list. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:232, src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: A
dependenciesfield of the stage reply. The gate reads a field, not prose, and the prompt gives the planner one place for each overlap. - Rejected: The
## Dependenciessection of the proposal text. The gate would parse prose, and a different wording would hide the overlap. - Rejected: A pydantic constraint on the reply schema. The schema cannot see the overlap list.
- Chosen: A
- Which paths does the overlap check compare?: The check compares every path that the reply names: the
changespaths, the paths in theverifycommands and the new test files. It reuses the path extraction ofpath_problems. (best practice) [sources: docs/ROADMAP_WORKFLOW.md:232, openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md]- Chosen: Every path that the reply names. A plan that only reads a shared file can still conflict with a plan that edits it, and the path rule already extracts these paths.
- Rejected: Only the
changespaths. It misses a plan that reads or verifies a shared path.
- How does the context list the other senders of a cited metric name?: The builder takes each name in the reply that
INSTRUMENTSholds as a cited metric. It runsgit grep -wat the staged commit and lists each file with a hit. It marks the files that the plan changes. (best practice) [sources: docs/TELEMETRY.md, src/devops_cli/telemetry/instruments.py]- Chosen: A name that
INSTRUMENTSholds. The map is the single list of instruments, and the telemetry test already ties every metric to it. - Rejected: A
devops_cli_token in the reply. A token can name a dashboard file or a span, not a metric. - Rejected: A name that the planner marks. The planner can forget the mark, and the gate would miss the senders.
- Chosen: A name that
- What must the pull request state when it changes the stage prompt or
check_proposal?: It must state the replay score of the same model before and after the change. It must name the model. [sources: docs/ROADMAP_WORKFLOW.md:233] - Which modules and tests does the change touch?: The callers of
check_proposalarestage.py,stage_change.py,stage_eval_gates.py,stage_eval_run.py,stage_specs.pyandstage_verify.pyundersrc/devops_cli/roadmap/. The prompt isroadmap_stage_change.md. The tests aretests/roadmap/test_roadmap_stage_form.py,test_roadmap_stage_plan.pyandtest_roadmap_stage_prompt_rules.py. [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py, src/devops_cli/roadmap/stage_eval_run.py, src/devops_cli/roadmap/stage_specs.py, src/devops_cli/roadmap/stage_verify.py, tests/roadmap/test_roadmap_stage_form.py, tests/roadmap/test_roadmap_stage_plan.py, tests/roadmap/test_roadmap_stage_prompt_rules.py, docs/ROADMAP_WORKFLOW.md:233]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 2, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.Prevents merge conflicts and missed dependencies but does not block the pipeline; no security or data-loss risk.Reduces rework from overlapping plans and missed metric senders, but the system functions without it.Requires GitHub API calls for open PRs, file-overlap logic, git grep for metric senders, prompt edits, and a new gate rule.Both items work on the ## Dependencies section, but #3224 adds the field and rendering while the candidate populates it with open-PR file overlaps and adds a gate check.devops-cli-service commentedon Nov 2, 2026
Status set to Ready at 8b47ae2 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3252-the-stage-context-names-open-plans, draft pull request #3298. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 3 model request(s), and used 230472 input tokens and 15839 output tokens. The model made no tool call.
A model review of the plan found these points. They stop no draft, and a person judges them:
task_orderat group 3: Group 3 passes the overlap list tocheck_proposalthrough_settle. Theoverlapsargument ofcheck_proposalonly comes in group 4, a later group. Evidence: "Pass the overlap list to_settleso thatcheck_proposalsees it"otherat group 5: The plan adds adependenciesfield toStageProposalbut adds only a rule to the prompt. The existing prompt test needs a reply-key bullet for each model field, so it fails. Evidence: "assert sorted(bullets) == sorted(StageProposal.model_fields)"spec_delta_wrongat specs, requirement "The overlap read costs a stated number of GitHub requests": The requirement says the builder states the request count in the comment of the staged item. No group writes that code or tests it. Group 6 only edits a document. Evidence: "SHALL state that count in the comment of the staged item"docs(openspec): plan #3252 stage context lists overlapping open plans
docs(openspec): plan #3252 stage context lists overlapping open plans (…
devops-cli-service commentedon Nov 4, 2026
Released in v0.54.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.54.0
devops-cli-service commentedon Nov 4, 2026
Live since 2026-11-04 04:48 UTC