Repository navigation
Description
What happened
The stage prompt says "You cannot run a command. Write only what the inputs show", so ## Feasibility of 28 of 37 plans holds only checks that the implementation will run later. AGENTS.md rule 2 asks for the evidence first. Four plans were built on a premise that was already false: #2984 (#2233, the code was deleted by #2399), #2981 (#2166, #1332 already removed all 15 unused imports), #2985 (#2369, -X importtime costs about 3% of CPU, not 50%) and #2857 (#2147, the constant does not exist).
What should happen
- Before the model call, the job runs bounded read-only probes at the staging commit for each path and identifier that the issue cites: does the path exist, does the identifier have a definition, and for a missing one the commit that removed or moved it (
git log --diff-filter=DR). The output goes into the model input. - The reply can say
premise_failedwith the evidence. Then the job runsdevops roadmap return <issue> --comment <evidence> --confirmand opens no pull request (AGENTS.md rule 2). - The prompt asks
feasibilityto quote the probe output.
Acceptance criteria
- A replay of docs(openspec): plan #2152 replace legacy IPv4 parser #2971 (cites
validate_url, removed by fix(security): remove pre-flight resolve paths for egress #2845) returns the item with the evidence and opens no pull request. -
feasibilityof a staged plan quotes probe output. - The probes are bounded (a stated number of commands) and read-only.
Source
An evaluation on 2026-11-01 of the 37 docs(openspec): plan #N pull requests (35 merged, 2 open) found 34 that need fixes and 1 to reject. The per-PR reviews are in the comments of tracker #3005's thread and in .data/agent/scratch/plan-review.json of the owner's workstation. Related: #3005 (the kind of a task group: test for behavior, a repeatable check for other changes).
Proposed design
Problem statement
The stage job cannot run commands, so the Feasibility section of a plan holds only checks that the implementation will run later. AGENTS.md rule 2 asks for evidence first. Four plans were built on a premise that was already false. The stage job must run bounded read-only probes at the staging commit before the model call, feed the probe output into the model input, and return the item when the premise is false.
Acceptance criteria
Requirement: Premise probe at staging commit
The stage job SHALL run bounded read-only probes at the staging commit for each path and identifier cited in the issue before the model call.
Scenario: Probe output is in the model input
- WHEN The stage job processes an issue that cites a path and an identifier
- THEN The probe output is present in the model input before the model call
Requirement: Premise failure returns the item
When the model reply contains premise_failed with evidence, the job SHALL run devops roadmap return --comment --confirm and open no pull request.
Scenario: Replay of a false premise
- WHEN The stage job processes an issue that cites validate_url, which was removed by a prior change
- THEN The job runs devops roadmap return with the evidence and opens no pull request
Requirement: Feasibility quotes probe output
The Feasibility section of a staged plan SHALL quote the probe output.
Scenario: Feasibility section contains probe text
- WHEN The stage job produces a plan for an issue with cited paths
- THEN The Feasibility section contains the text of the probe results
Requirement: Probes are bounded and read-only
The probes SHALL run at most a stated number of commands, and every command SHALL be read-only.
Scenario: Bound is enforced
- WHEN The issue cites more paths and identifiers than the bound allows
- THEN The probe function stops at the bound and records which probes were skipped
Existing Tool Considered
No check has run. The probes are standard git commands (git show, git log --diff-filter=DR, git grep) and file system checks; no external library is needed for the probes. The work modifies the stage job's existing code to extract cited paths and identifiers from the issue body, run the bounded probes, feed the output to the model prompt, and handle the premise_failed response. The written cost: approximately 600 lines of Python and prompt text to build, keep, and fix, at roughly 12,000 tokens and 2 hours of elapsed agent time.
Key questions
- What probes does the job run, and in what order?: For each cited path: check existence with git show :. For each cited identifier: check definition with git grep . For each missing path or identifier: find the removal commit with git log --diff-filter=DR -- or git log -S -- . (best practice) [sources: AGENTS.md]
- Chosen: Path existence, then identifier definition, then removal commit (sequential). The body states this order. Each step depends on the result of the previous one: a missing path triggers the removal-commit probe.
- Rejected: All probes in parallel. Saves time but the removal-commit probe is only needed when the path or identifier is missing, so parallelism wastes commands.
- What is the bound on probe commands?: At most 10 commands per issue. The four cited examples each cite 1 to 4 items, and each item needs at most 3 commands. A bound of 10 covers the typical case and keeps the probe fast. (proposed)
- Chosen: 10 commands. Covers 3 to 4 cited items with full probing. The body says a stated number, and the examples show 2 to 4 items.
- Rejected: 20 commands. Covers more items but the examples do not need it, and a larger bound increases the risk of slow probes.
- Rejected: Unbounded. The body explicitly requires a stated number. Unbounded probes violate the acceptance criterion.
- How does the job extract cited paths and identifiers from the issue body?: Parse the issue body for backtick-quoted strings. A string that contains a forward slash is a path. A string that does not contain a forward slash is an identifier. This is deterministic and needs no model call. (proposed)
- Chosen: Parse backtick-quoted strings from the issue body. The body says for each path and identifier that the issue cites. Backtick-quoted strings are the standard way to cite code in issue bodies. This is deterministic and needs no model call.
- Rejected: Ask the model to extract them. The model cannot run commands, and adding a model call for extraction adds cost and latency for a task that a regex handles.
- How does the model signal that the premise is false?: The model reply contains a premise_failed field with the evidence text. The job checks for this field before proceeding to open a pull request. (proposed)
- Chosen: A premise_failed field in the model reply. The body says the reply can say premise_failed with the evidence. A structured field is easy to check and does not depend on parsing free text.
- Rejected: A specific text pattern in the reply. Fragile: the model may phrase it differently. A structured field is more reliable.
- What does the job do when the premise is false?: The job runs devops roadmap return --comment --confirm and opens no pull request. This follows AGENTS.md rule 2: return the item to New with the evidence and stop. (best practice) [sources: AGENTS.md]
- Chosen: Run devops roadmap return and open no pull request. AGENTS.md rule 2 says to return the item with the evidence and stop. The body states this explicitly.
- Rejected: Open a pull request with a note that the premise is false. Violates AGENTS.md rule 2: write no compensating code. A pull request is compensating work.
- What does the prompt change to require?: The prompt asks the Feasibility section to quote the probe output. The probe output is in the model input, so the model can quote it directly. (proposed)
- Chosen: Ask Feasibility to quote the probe output. The body states this. It makes the Feasibility section evidence-based instead of aspirational.
- Rejected: Ask Feasibility to summarize the probe output. A summary may omit key details. Quoting the output preserves the evidence.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 1, 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.It prevents four of thirty-seven plans from building on false premises, but the pipeline still runs without it.It stops wasted implement cycles on plans whose cited code was already removed or moved.It needs bounded read-only probes, a 'premise_failed' branch, a 'devops roadmap return' call, and a prompt change, all in the stage job.Both act in the stage job on the premise that cited paths or identifiers still exist, but #3010 refuses the plan while the candidate returns the item via 'devops roadmap return' and adds identifier and git-history probes.devops-cli-service commentedon Nov 1, 2026
Status set to Ready at 1c20865 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/3011-the-stage-job-probes-the-premise, draft pull request #3176. 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 16 model request(s), and used 449122 input tokens and 9622 output tokens. The tool calls, in order:
search_code({"text":"premise_failed"})search_code({"text":"roadmap return"})list_files({"directory":"src/devops_cli/roadmap"})read_file({"path":"src/devops_cli/roadmap/stage.py"})read_file({"path":"src/devops_cli/roadmap/stage_tools.py"})read_file({"path":"src/devops_cli/roadmap/stage.py","start_line":44,"end_line":400})read_spec({"capability":"roadmap-stage"})search_code({"text":"def plan_item"})search_code({"text":"class StageProposal"})list_files({"directory":"src/devops_cli/ai/tasks"})read_file({"path":"src/devops_cli/roadmap/stage.py","start_line":900,"end_line":1200})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":200,"end_line":330})read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md"})read_file({"path":"src/devops_cli/roadmap/stage_toolbox.py"})search_code({"text":"collect_context"})search_code({"text":"_plan_each"})search_code({"text":"def _plan_one"})read_file({"path":"src/devops_cli/roadmap/stage.py","start_line":600,"end_line":900})list_files({"directory":"tests/roadmap"})list_files({"directory":"src/devops_cli/roadmap"})file_symbols({"path":"src/devops_cli/roadmap/stage.py"})file_symbols({"path":"src/devops_cli/roadmap/stage_change.py"})file_symbols({"path":"src/devops_cli/roadmap/stage_tools.py"})file_symbols({"path":"src/devops_cli/roadmap/stage_toolbox.py"})read_file({"path":"src/devops_cli/roadmap/stage.py","start_line":580,"end_line":760})read_file({"path":"src/devops_cli/roadmap/stage_tools.py","start_line":1,"end_line":150})file_symbols({"path":"tests/roadmap/test_roadmap_stage_plan.py"})file_symbols({"path":"tests/roadmap/test_roadmap_stage_tools.py"})list_files({"directory":"openspec/changes"})list_files({"directory":"src/devops_cli/ai/tasks"})read_file({"path":"src/devops_cli/ai/tasks/roadmap_stage_change.md"})read_spec({"capability":"roadmap-stage"})search_code({"text":"feasibility"})search_code({"text":"CONST_ROADMAP_STAGE_"})docs(openspec): plan #3187 group the roadmap job modules in subpackag…
fix(roadmap): name a cited bare file in the probe (#3452)