Repository navigation
Description
Problem or Motivation
The plan of #3417 (pull request #3438) detects a guard that a behavior group adds from prose. Its task 2.2 adds guard_names(group), which reads a task for an add verb, a word such as guard or check, and one backticked identifier. That rule is brittle. A task that says "introduce the check _delivery_title" misses the rule because it has no word from the rule. A sentence that names a guard but does not add it can match the rule and return an item to New for work the group does not do. A false negative lets a duplicate guard reach the step model, and a false positive returns an item for no defect.
The plan already knows the identifiers that a behavior group adds, because the model wrote the tasks and the plan reader reads their code spans. No field of the plan records the names, so the implement job must guess them from the sentence.
Proposed Solution & Architectural Design
- Record the identifiers that a behavior group adds in a structured line of its task group, such as
Adds: _delivery_title, intasks.md. Write it inrender_changeand read it inplan_readandstep_files. - Read the names in
implement_runfrom that line, so no text rule decides the premise check. - Keep the check only for a behavior group, and keep the return to New with the definition line.
- Add a test for a task that says "introduce the guard
_delivery_title" and one for a sentence that names a guard without adding it. The first must return the item; the second must run the group. - Update the stage prompt and the plan check for the new line.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/plan_read.py, src/devops_cli/roadmap/step_files.py, src/devops_cli/roadmap/implement_run.py, src/devops_cli/ai/tasks/roadmap_stage_change.md
Existing Tool Considered
code_spans in src/devops_cli/roadmap/step_files.py already reads the code spans of a task, and plan_read._KIND already reads a structured line of a group. The change extends those parsers instead of building a second one. The cost is about 4,000 tokens to build and test, about 1,000 tokens to keep, and about 1 hour elapsed.
Source: #3438
Alternatives check of 2026-11-07: none.
Tool: none found.
Proposed design
Problem statement
The implement job detects a guard that a behavior group adds from a brittle prose rule. The rule reads a task for an add verb, a guard word, and one backticked identifier. It misses a task that says "introduce the guard" and matches a sentence that only names a guard. The plan already knows the identifiers a group adds, but no field records them. The change records them in a structured Adds: line in tasks.md and reads that line in the step parser, the plan reader, and the implement job.
Acceptance criteria
Requirement: A behavior group renders its added identifiers
render_change SHALL write an Adds: line with each added identifier in a code span for a behavior group that adds one or more identifiers.
Scenario: A behavior group adds a guard
- WHEN a StageGroup of kind behavior holds adds equal to ['_delivery_title']
- THEN the rendered tasks.md section of the group holds the line
Adds:with the code span_delivery_title
Requirement: A group with no added identifier writes no line
render_change SHALL write no Adds: line for a group whose adds field is empty.
Scenario: A behavior group with no added identifier
- WHEN a StageGroup of kind behavior holds adds equal to []
- THEN its rendered section holds no
Adds:line and read_change returns that group with adds equal to []
Requirement: The plan reader returns the added identifiers
read_change SHALL set the adds field of a StageGroup from the Adds: line of its section.
Scenario: A change folder with an Adds line
- WHEN the tasks.md of a behavior group holds the line
Adds:with the code span_delivery_title - THEN read_change returns that group with adds equal to ['_delivery_title']
Requirement: The task parser exposes the added identifiers
parse_task_groups SHALL expose the identifiers of an Adds: line as TaskGroup.added_names.
Scenario: A task group with two added identifiers
- WHEN a tasks.md group holds the line
Adds:with the code spans_delivery_titleand_guard - THEN TaskGroup.added_names returns ('_delivery_title', '_guard')
Requirement: The reader refuses an Adds line with no code span
read_change SHALL raise PlanReadError for an Adds: line that holds an identifier outside a code span.
Scenario: A malformed Adds line
- WHEN a behavior group holds the line
Adds: _delivery_titlewith no code span - THEN read_change raises PlanReadError that names tasks.md
Requirement: The read-back check compares the added identifiers
read_back_problems SHALL report the adds field of a group when the files hold no Adds: line for it.
Scenario: A group whose rendered section loses the Adds line
- WHEN a StageGroup holds adds equal to ['_delivery_title'] and its rendered section holds no
Adds:line - THEN read_back_problems returns the problem
group 1: adds
Requirement: The implement job uses only the Adds line
The implement job MUST use the Adds: line of a behavior group, and no prose rule, to decide whether an added identifier has a definition.
Scenario: A sentence names a guard without adding it
- WHEN a behavior group task holds the sentence
introduce the guardand the code span_delivery_title, and the group has noAdds:line - THEN the job runs the group and reports no premise failure
Requirement: An existing definition returns the item
The implement job MUST return an item to New with the definition line when an identifier in the Adds: line of a behavior group already has a definition.
Scenario: A behavior group adds an existing guard
- WHEN a behavior group holds the line
Adds:with the code span_delivery_titleand_delivery_titleis already defined in the checkout at the branch tip - THEN the job returns the item to New and the comment quotes the definition line
Requirement: The stage prompt names the Adds line
The stage prompt SHALL name the Adds: line as a field of a group and require a code span for each identifier.
Scenario: The prompt names the Adds line
- WHEN the stage prompt file src/devops_cli/ai/tasks/roadmap_stage_change.md is read
- THEN the text holds
Adds:and requires a code span for each identifier
Existing Tool Considered
No open tool or library covers this need. The alternatives check of 2026-11-07 gave the verdict none and found no tool. The need is internal to this repository's plan format: a structured Adds: line in tasks.md, read by step_files, plan_read, and implement_run. The change extends the project's own parsers, code_spans and KIND_LINE in src/devops_cli/roadmap/step_files.py, and _READS in src/devops_cli/roadmap/plan_read.py. The written cost is about 5,000 tokens to build and test, about 1,000 tokens to keep and fix, and about 2 hours elapsed. The change deletes the prose rule that reads a task for an add verb, a guard word, and one backticked identifier.
Key questions
- How should a plan record the identifiers that a behavior group adds?: Write one
Adds:line in the section of the group intasks.md. Put each identifier in a code span and separate them with a comma. Write no line for a group that adds no identifier. (best practice) [sources: src/devops_cli/roadmap/step_files.py, src/devops_cli/roadmap/plan_read.py, src/devops_cli/roadmap/stage/stage_change.py]- Chosen: An Adds line with code spans. KIND_LINE in step_files.py and _READS in plan_read.py already read a structured line of a group, and code_spans already reads the identifiers.
- Rejected: The prose rule with an add verb. The rule misses a task that says
introduce, and it matches a sentence that only names a guard. - Rejected: YAML front matter. The plan reader and the step parser read the text of a group, and no existing parser reads front matter.
- Where should the Adds line be parsed?: step_files.parse_task_groups exposes the identifiers as TaskGroup.added_names, and plan_read copies them into StageGroup.adds. The implement job reads the same property of the group. (best practice) [sources: src/devops_cli/roadmap/step_files.py, src/devops_cli/roadmap/plan_read.py]
- Chosen: One parser in step_files. parse_task_groups already reads the tasks, the code spans, and the Kind: line of a group, and both readers use it.
- Rejected: A separate regex in the plan reader and the implement job. Two parsers can disagree about one plan.
- Rejected: Read the names from the prose of a task. The issue records that the prose rule is brittle in both directions.
- When should the implement job return an item to New for an added identifier?: Only when a behavior group has an
Adds:line and one of its identifiers already has a definition in the checkout at the branch tip. The comment quotes the definition line. A group with noAdds:line runs normally. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py]- Chosen: A behavior group with an Adds line. The issue keeps the check for a behavior group and removes the prose rule.
- Rejected: Any group, or any prose sentence. A false positive returns an item for no defect.
- What should the stage prompt and the plan check require for the Adds line?: The stage prompt names the
Adds:line and requires a code span for each identifier. read_change raises PlanReadError for a line that holds an identifier outside a code span, and the plan check reports that error. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/plan_read.py]- Chosen: The prompt plus a refusal in the plan reader. The reader already refuses a file that it cannot parse, and the plan check reports that file and goes on.
- Rejected: The prompt only. A model reply can write a malformed line, and no gate catches it.
- Rejected: A new rule in the plan check module. A second reader of the same line can disagree with the plan reader.
- Which item must be delivered before the implement job can run this item?: fix(roadmap): a late premise return drops passed groups #5881 fixes the prose rule that returned this item to New. The runner image must hold that fix before the implement job runs this item. Until then the live rule reads the test task of this plan and returns the item again. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py]
- Chosen: fix(roadmap): a late premise return drops passed groups #5881 goes first. The fix removes the false return for this item and for each item that names a guard in a test.
- Rejected: A person builds the kept work by hand. The live rule still returns the next item that names a guard in a sentence, so the defect stays.
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 4, 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.Fixes false positives and false negatives in identifier detection, but the system functions today; not a blocking defect.Reduces incorrect rejections and incorrect acceptances of plan items, improving roadmap reliability.Touches five files, adds a new plan line format, updates two parsers, and adds two test cases.Both work in the implement job's premise check, but #3417 adds the check and the candidate replaces its prose-based identifier parsing with a structured Adds line.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 0e3427f (see proposed design in issue body).
devops-cli-service commentedon Nov 7, 2026
Alternatives check: none
Reason: The searches returned no usable results, so no open tool or library was found. The need is internal to this repository's own roadmap plan format: a structured
Adds:line in thetasks.mdof a behavior group, read bystep_files,plan_readandimplement_run, which the issue already scopes as an extension of the project's own parsers (code_spans,_KIND) rather than a new dependency.Tool: none found
Lacks:
Adds:line in this project'stasks.mdformatSearches run:
Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.
34 remaining items
fix(roadmap): name each word outside a code span of the Adds line (#3453
docs(openspec): archive the change of #3453
feat(roadmap): Parse the Adds line of a task group (#3453)
feat(roadmap): Give the group an adds field, write the line, and name…
wip: 1 of 2 tasks of group 3, Read the line in the plan reader (#3453)
feat(roadmap): the premise check reads the Adds line of a group (#3453)
fix(roadmap): name each word outside a code span of the Adds line (#3453
docs(openspec): archive the change of #3453
devops-cli-service commentedon Nov 16, 2026
Released in v0.163.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.163.0
devops-cli-service commentedon Nov 16, 2026
Live since 2026-11-16 12:30 UTC