Repository navigation
Description
Problem or Motivation
The implement runner stops a step when it modifies a path outside the plan (_outside_plan_failure, #3824). An agent can send a plan-request to amend the plan. In src/devops_cli/roadmap/implement/implement_amend.py, _judge_path permits only path renames where the basename matches. If an implementation needs an existing omitted file, such as a constants module or a test fixture, the agent cannot request adding that path to the group. The step stops with FailureClass.OUTSIDE_PLAN and requires human intervention.
Proposed Solution & Architectural Design
Support bounded path addition in implement_amend.py:
- Add
add_pathas an allowed kind inPlanRequest. - In
_judge_path, accept anadd_pathrequest when the target path exists intree.filesand does not sit underopenspec/. - Add the validated path to the group header
Changes:orReads:line intasks.md. - Append an amendment bullet to the
## Amendmentssection oftasks.md. - Cover valid and invalid path addition requests with unit tests in
tests/roadmap/implement/test_implement_amend.py.
Target Subsystem
AI & Agentic Review Pipeline
Existing Tool Considered
This enhancement extends the existing PlanRequest parser and validator in src/devops_cli/roadmap/implement/implement_amend.py. Cost: 6,000 tokens and 0.25 elapsed days.
Proposed design
Problem statement
An implement step stops with FailureClass.OUTSIDE_PLAN when it modifies a path that the plan does not list. The agent can send a plan-request to amend the plan. _judge_path in src/devops_cli/roadmap/implement/implement_amend.py permits only a rename whose basename matches. The agent cannot add an omitted existing file, such as a constants module or a test fixture, to the group. A person must then intervene.
Acceptance criteria
Requirement: Plan request accepts add_path
PlanRequest SHALL accept kind add_path with new set to a repository path and header set to Changes or Reads.
Scenario: Parse an add_path request
- WHEN a step message ends with a
plan-requestfence whose JSON setskindtoadd_path,groupto 1,newtosrc/app/constants.pyandheadertoReads - THEN
parse_requestreturns aPlanRequestwhosekindisadd_pathand whoseheaderisReads
Requirement: Added path exists in the tree
The judge MUST refuse an add_path request when new is not in tree.files.
Scenario: Refuse an absent path
- WHEN
newissrc/app/missing.pyandtree.filesdoes not hold that path - THEN
judgereturnsRefusedwith the messageimplement_amend_refused_path_status
Requirement: Added path is outside openspec
The judge MUST refuse an add_path request when new sits under openspec/.
Scenario: Refuse a path under openspec
- WHEN
newisopenspec/changes/4099-bounded-path/tasks.md - THEN
judgereturnsRefusedwith the messageimplement_amend_refused_path_status
Requirement: Added path joins the named header line
The judge MUST append the backticked new path to the Changes: or Reads: line that header names, and MUST leave every other line of the group unchanged.
Scenario: Append a path to the Reads line
- WHEN group 1 has a
Reads:line that listssrc/app/a.pyand the request setsheadertoReadsandnewtosrc/app/constants.py - THEN the
Reads:line listssrc/app/a.pyandsrc/app/constants.py, separated by,
Requirement: Header line must exist
The judge MUST refuse an add_path request when the group has no line for the header that the request names.
Scenario: Refuse a missing header line
- WHEN group 1 has no
Reads:line and the request setsheadertoReads - THEN
judgereturnsRefused
Requirement: Refuse a path that the group already holds
The judge MUST refuse an add_path request when the group text already holds new in a code span.
Scenario: Refuse a duplicate path
- WHEN group 1 lists
src/app/constants.pyand the request adds that path again - THEN
judgereturnsRefused
Requirement: Refuse a rename form on add_path
The judge MUST refuse an add_path request that sets old, because a rename stays a path request.
Scenario: Refuse old on add_path
- WHEN the request sets
kindtoadd_pathandoldtosrc/app/a.py - THEN
judgereturnsRefused
Requirement: Record the addition as an amendment
The judge MUST append one bullet for an applied add_path request to the ## Amendments section of tasks.md.
Scenario: Append the amendment bullet
- WHEN the judge applies an
add_pathrequest forsrc/app/constants.pyin group 1 - THEN
tasks.mdholds one bullet under## Amendmentsthat names group 1,add_pathandsrc/app/constants.py
Requirement: Cover the new kind with unit tests
The change MUST add unit tests in tests/roadmap/implement/test_roadmap_implement_amend.py for each accepted and each refused add_path case.
Scenario: Run the amendment tests
- WHEN the test suite runs
tests/roadmap/implement/test_roadmap_implement_amend.py - THEN the suite passes and covers one accepted case and every refused case
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the plan-request format of this repository, because that format is specific to src/devops_cli/roadmap/implement/implement_amend.py. The change extends the existing PlanRequest parser and validator in that file. The written cost to build, keep and fix this code until it matches a tool is 6,000 tokens and 0.25 elapsed days.
Key questions
- Which header line receives an added path?: The request names the line in a new optional
headerfield with the valuesChangesandReads. The judge refuses the request when the field is absent. The judge appends the backticked path after a,separator. (best practice) [sources: src/devops_cli/roadmap/implement/implement_amend.py:32, src/devops_cli/roadmap/implement/implement_amend.py:142]- Chosen: Explicit
headerfield. The agent knows whether it writes or reads the file, and the write set of the step stays small. - Rejected: Always append to
Changes:. It widens the write set of a step that only reads the file. - Rejected: Infer the line from the header lines present. A group with both lines has no rule that tells a read from a write.
- Chosen: Explicit
- Which bounds apply to an added path?: The path MUST exist in
tree.files. The path MUST NOT sit underopenspec/. The path MUST NOT already appear in a code span of the group. (best practice) [sources: src/devops_cli/roadmap/implement/implement_amend.py:142, src/devops_cli/roadmap/implement/implement_step.py:1347]- Chosen: Existing file outside
openspec/.tree.filesproves that the file exists, andopenspec/holds the plan that the archive step rewrites. - Rejected: Any existing file. A path under
openspec/is plan text, not code that a step may change. - Rejected: Any path. A path that does not exist makes the step fail later, with no clear reason.
- Chosen: Existing file outside
- How does the judge apply an
add_pathrequest?: A new_judge_add_pathfunction holds the rule, and acase "add_path"branch of thematchinjudgecalls it._judge_pathkeeps the rename rule. The new function appends the path to the named header line and returns anAmendmentwithkindadd_path, an emptyoldand the path innew. (best practice) [sources: src/devops_cli/roadmap/implement/implement_amend.py:142, src/devops_cli/roadmap/implement/implement_amend.py:271]- Chosen: New
_judge_add_pathfunction._judge_pathreplaces a code span, and an addition inserts a new one, so the two rules differ. - Rejected: Add a branch to
_judge_path. It mixes two rules in one function and obscures the rename checks.
- Chosen: New
- Which refusal message does a refused
add_pathrequest use?: The judge reusesimplement_amend_refused_path_statusfor an absent path, a path underopenspec/, a duplicate path and a missing header line. The change adds no message text. (best practice) [sources: src/devops_cli/roadmap/implement/implement_amend.py:142]- Chosen: Reuse
implement_amend_refused_path_status. The text already states that the path is not in the plan, and the change adds no message file. - Rejected: Add a new message text. It gives a sharper reason, but it adds a message entry for one refusal.
- Chosen: Reuse
- Which test file holds the unit tests?:
tests/roadmap/implement/test_roadmap_implement_amend.pyholds the tests ofPlanRequestandjudge. The body namestests/roadmap/implement/test_implement_amend.py, which does not exist. [sources: tests/roadmap/implement/test_roadmap_implement_amend.py] - What does the amendment bullet show for an addition?: The bullet records
kindadd_pathand the added path in the change text, with no old path. The log then tells an addition from a rename. (best practice) [sources: src/devops_cli/roadmap/implement/implement_amend.py]- Chosen:
kindadd_path, new path only. The bullet names the kind, so a reader tells an addition from a rename. - Rejected:
kindpath, empty old path. The log cannot tell an addition from a rename.
- Chosen:
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-10: none.
Tool: none found.
Activity
dan-petty commentedon Nov 8, 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.Removes a human-intervention stop for a common agent case but does not block the pipeline.Reduces unnecessary human intervention when an agent needs an existing file omitted from the plan.Extends an existing parser with one new kind, adds validation, updates tasks.md, and writes unit tests in one file.Both extend the bounded amendment system in implement_amend.py, but #3057 delivered the initial set of amendment kinds while this candidate adds a new add_path kind for existing omitted files.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at 0232651 (see proposed design in issue body).
devops-cli-service commentedon Nov 10, 2026
Alternatives check: none
Reason: Searches for a tool that validates or amends an implementation plan's path list found nothing usable; the only relevant project, OpenSpec, is the spec and change-proposal layer the repository already uses (ADR 0010) and offers no plan-request parser or judge for per-step path additions. The need is a repo-specific extension of the
PlanRequestparser and_judge_pathinsrc/devops_cli/roadmap/implement/implement_amend.py, which no external tool covers.Tool: none found
Lacks:
plan-requestfence and validates anadd_pathkind against the repository tree.openspec/or paths absent fromtree.files.Changes:orReads:line intasks.mdand records an amendment bullet.Tools considered:
Searches run:
Sources:
Checked on 2026-11-10. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 12, 2026
Scope from the progress-aware caps plan (2026-11-11)
The tracker #4843 folds its scope-change item into this item as child 10. The planned item and this item change the same code:
implement_amend.judgerefuses every request of kindscopetoday, and_judge_pathallows only a rename. One change covers both: a bounded path addition, through the fixable check of #4847. Where this comment and the body differ, this comment is the scope; theopenspec/exclusion of the body stays.Problem
implement_amend.judgerefuses every request of kind scope, so the step stops and waits for a person. 3 scope-change stops in 7 days (#3446, #3320, #3574): in 3 of 3 the agent named the missing files with evidence, and one plan amend that adds them to the group fixes it; 0 of 3 are fixable by an implement repair round.Solution
Before the scope refusal, run the fixable check (point
implement.scope_fixable, #4847). Deterministic: amendable when each added path exists in the tree or is a new test file and the request adds at most 5 paths; a protected path (workflows, security policy, secret files, release files) is never class. Jev (Noul: yes/no with a probability) 'fixable'. Fixable -> apply the amendment to the group changes intasks.md(## Amendments), the bounded amendment of #3057, and run the group again. 1 amend per group, 2 per item. Not fixable -> stop with the reason as today.Cost to build: about 0.8M tokens, half a day.
Acceptance criteria
Dependencies
#4847.
devops-cli-service commentedon Nov 16, 2026
Released in v0.161.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.161.0
devops-cli-service commentedon Nov 16, 2026
Live since 2026-11-16 06:35 UTC