diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/.openspec.yaml b/openspec/changes/3453-a-plan-states-the-identifiers-that/.openspec.yaml new file mode 100644 index 0000000000..be831cee61 --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-11-14 diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/design.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/design.md new file mode 100644 index 0000000000..94d4631723 --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/design.md @@ -0,0 +1,24 @@ +# Design + +## Decisions + +- **Write the names on one `Adds:` line under the line of the kind and the files of the group, each name in a code span and separated by a comma.**: `group_text` already writes one structured line per group, and the plan reader already reads the kind and the files from that line, so one writer and one reader hold the fact and the stage prompt asks for one more line of the same shape. +- **Parse the line once in `TaskGroup.added_names` and `adds_problem` of `src/devops_cli/roadmap/step_files.py`.**: The plan reader and the implement job both read `parse_task_groups`, so one parser decides the names for both and two parsers cannot disagree about one plan. +- **Hold the names in the `adds` field of `StageGroup`, which `render_change` writes and `read_change` reads back.**: `file_facts` compares the reply of the model with the files of the change folder, and a fact that no field holds is lost in that comparison. +- **Add the `adds` field, write the line, and name the field in `roadmap_stage_change.md` and `roadmap_stage_split.md` in one group.**: Two prompt tests compare each prompt with the fields of `StageGroup` (`test_a_stage_prompt_names_each_kind_and_each_field_of_a_group` and `test_the_keys_of_a_group_in_the_prompts_are_the_fields_of_a_group`), so a field with no prompt line fails them and a prompt line with no field fails them too. +- **Refuse a malformed `Adds:` line in `read_change`, and refuse `adds` on a group that is not a behavior group in the schema of `StageGroup`.**: `check_proposal` takes a validated `StageProposal`, so the schema judges the reply of the model and the reader judges a hand-written file; the plan check reports the refusal of the reader as a read problem of `tasks.md`. +- **Keep `false_premises` and change it to read `TaskGroup.added_names`, delete `added_guard` with its two patterns, and delete its table test and the guard-add fixtures that read the prose rule in the same group.**: One function holds the check and three test modules hold its cases, so the prose rule and every test that reads it go together and the verify command of the group passes. +- **Keep the check for a behavior group only, and keep the return to New with the definition line.**: A group of another kind adds no product guard, and a person needs the definition line to judge the return. + +## Rejected alternatives + +- **Keep the prose rule of `added_guard` and add more add verbs and words to it.**: `src/devops_cli/roadmap/premise.py:def added_guard` reads a fixed list of add verbs and the word guard or check directly before one code span, so a task that writes the guard with no such word names no added identifier, and a task that names a guard beside the change returns the item for no defect. +- **Write the names in YAML front matter of the group or of the change folder.**: The reader of `src/devops_cli/roadmap/plan_read.py` reads markdown lines of the group text and no parser of the plan reads front matter, so a second parser would decide the names and the stage prompt would ask for a form that the writer does not hold. +- **Read the names from the reply of the model only, and write no line in `tasks.md`.**: The implement job reads the plan at the branch tip through `parse_task_groups` of `src/devops_cli/roadmap/step_files.py`, so a name that no line of the tasks file holds is not there for it. +- **Add the `adds` field in one group and change the stage prompts in a later group.**: `tests/roadmap/stage/test_roadmap_stage_kind.py:def test_a_stage_prompt_names_each_kind_and_each_field_of_a_group` and `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py:def test_the_keys_of_a_group_in_the_prompts_are_the_fields_of_a_group` read `StageGroup.model_fields` against both prompts, so the field alone fails them and the prompt alone fails them too. +- **Add a test that a behavior group whose `Adds:` line names an undefined guard runs the group, with no other guard in the task text.**: The base runs such a group already, because `added_guard` finds no guard in its prose, so the test passes on the base and proves nothing about the `Adds:` line; the plan's test names the defined guard `_delivery_title` in the task text as well, so the base returns the item and the test fails on the base. +- **Leave the guard-add fixtures of `tests/roadmap/implement/test_roadmap_implement_checkpoint.py` and `tests/roadmap/implement/test_roadmap_implement_typed_result.py` as they are, and let them keep the prose rule.**: `read_file` of both modules shows a behavior group whose task text says `Add the guard _delivery_title` with no `Adds:` line, so once the prose rule goes `false_premises` reads no name and `test_the_check_withdraws_the_checkpoint_of_group_one` and `test_typed_result_a_return_to_new_writes_returned_as_its_last_mark` fail. + +## Unchanged references + +- `src/devops_cli/roadmap/implement/implement_run.py` (import): The module imports `false_premises`, which stays, and never names `added_guard`, so the deletion leaves it as it is. diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/proposal.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/proposal.md new file mode 100644 index 0000000000..aae4acba0d --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/proposal.md @@ -0,0 +1,65 @@ +# Proposal + +## Why + +The plan of #3417 decides the guard premise check of the implement job from the prose of a task: an add verb, the word guard or check, and one code span. A task that names the guard some other way adds nothing the rule reads, and a sentence that names a guard without adding it can return the item to New for no defect (#3453). The plan already holds the names that a behavior group adds in the code spans of its tasks, and no field of the plan records them, so the implement job guesses them from the sentence. + +## What Changes + +- Add `ADDS_LINE`, `TaskGroup.added_names` and `adds_problem` to `src/devops_cli/roadmap/step_files.py`, so the plan reader and the implement job read the identifiers of the `Adds:` line of a group from one parser. +- Give `StageGroup` the field `adds` in `src/devops_cli/roadmap/stage/stage_change.py`, write the `Adds:` line in `group_text`, and refuse the field on a `manifest` group and an `other` group. +- Name the `adds` field and the `Adds:` line in `src/devops_cli/ai/tasks/roadmap_stage_change.md` and `src/devops_cli/ai/tasks/roadmap_stage_split.md`, because both prompt tests compare the prompts with the fields of `StageGroup`. +- Read the line in `_group` of `src/devops_cli/roadmap/plan_read.py`, and raise `PlanReadError` for a name outside a code span. +- Read `TaskGroup.added_names` in `false_premises` of `src/devops_cli/roadmap/premise.py`, delete `added_guard`, `_ADD_VERB`, `_GUARD_SPAN` and their table test, and give the `Adds:` line to the behavior-group fixtures of `tests/roadmap/implement/test_roadmap_implement_job.py`, `tests/roadmap/implement/test_roadmap_implement_checkpoint.py` and `tests/roadmap/implement/test_roadmap_implement_typed_result.py`. +- State the line and the refusal in `docs/roadmap/plan-check.md`. +- The change fits one pull request. + +## Capabilities + +### New Capabilities + +None. + +### Modified Capabilities + +- `roadmap-stage/task-groups`: A behavior group writes the identifiers that it adds, The stage prompts ask for the identifiers that a group adds +- `roadmap-plan-check`: The plan reader reads the identifiers that a group adds +- `roadmap-implement-step/inputs`: A task group exposes the identifiers that it adds +- `roadmap-implement-job/stops`: The job checks the premise of a behavior group at the branch tip + +## Impact + +- Code: `src/devops_cli/roadmap/step_files.py`, `src/devops_cli/roadmap/stage/stage_change.py`, `src/devops_cli/lang/en/messages.py`, `src/devops_cli/roadmap/plan_read.py`, `src/devops_cli/roadmap/premise.py`, `src/devops_cli/roadmap/implement/implement_run.py` +- Documents: `src/devops_cli/ai/tasks/roadmap_stage_change.md`, `src/devops_cli/ai/tasks/roadmap_stage_split.md`, `docs/roadmap/plan-check.md` +- Tests: `tests/roadmap/test_roadmap_step_files.py`, `tests/roadmap/stage/test_roadmap_stage_content.py`, `tests/roadmap/stage/test_roadmap_stage_kind.py`, `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py`, `tests/roadmap/test_roadmap_plan_read.py`, `tests/roadmap/test_premise.py`, `tests/roadmap/implement/test_roadmap_implement_job.py`, `tests/roadmap/implement/test_roadmap_implement_checkpoint.py`, `tests/roadmap/implement/test_roadmap_implement_typed_result.py` + +## Feasibility + +- The probes name the moved modules: "The path `src/devops_cli/roadmap/stage_change.py` is no file at the root of the staging commit. These files of the commit are candidates: `src/devops_cli/roadmap/stage/stage_change.py`. Commit bff2f14f 2026-11-06 refactor(roadmap): group the job modules in subpackages (#3897) deleted or renamed it." and "The path `src/devops_cli/roadmap/implement_run.py` is no file at the root of the staging commit. These files of the commit are candidates: `src/devops_cli/roadmap/implement/implement_run.py`. Commit bff2f14f 2026-11-06 refactor(roadmap): group the job modules in subpackages (#3897) deleted or renamed it." Both modules sit at the new paths, so the plan names the new paths and the issue is no false premise. +- The probes give "The path `src/devops_cli/roadmap/plan_read.py` is a file of the staging commit." and "The path `src/devops_cli/roadmap/step_files.py` is a file of the staging commit." +- The prose rule that the issue names is at the staged commit: `read_file` of `src/devops_cli/roadmap/premise.py` showed `src/devops_cli/roadmap/premise.py:def added_guard` and `src/devops_cli/roadmap/premise.py:def false_premises`, and `false_premises` calls `added_guard(task.text)` for each task of the group. The staged `_ADD_VERB` already holds `introduce`, so the example of the issue that a task with `introduce` misses the rule is not the failure at this commit; the rule still decides from prose and can both miss a guard and return the item for a sentence that only names one, and the plan removes it for the `Adds:` line. +- `src/devops_cli/roadmap/step_files.py:class TaskGroup` holds `number`, `title`, `tasks`, `text` and `line` only, and `src/devops_cli/roadmap/step_files.py:91:def code_spans(text: str) -> tuple[str, ...]:` with `src/devops_cli/roadmap/step_files.py:36:KIND_LINE: re.Pattern[str] = re.compile(r"^Kind: (?P\w+)\.", re.M)` show that one structured line of a group has a reader already. +- `src/devops_cli/roadmap/stage/stage_change.py:class StageGroup` holds no `adds` field, and `src/devops_cli/roadmap/stage/stage_change.py:2954:def group_text(index: int, group: StageGroup) -> str:` writes the kind and the files on one line from the message `stage_group_files`, which is staged as `Kind: {kind}. Reads: {reads}. Changes: {changes}.` +- `src/devops_cli/roadmap/stage/stage_change.py:621:def _other_problems(group: StageGroup) -> list[str]:` refuses no `adds`: that is the defective text that group 2 quotes in its test. +- The review finding is right, and group 4 now changes both files. `read_file` of `tests/roadmap/implement/test_roadmap_implement_checkpoint.py` and of `tests/roadmap/implement/test_roadmap_implement_typed_result.py` showed the fixture of `tests/roadmap/implement/test_roadmap_implement_checkpoint.py:class TestAGuardThatTheBranchTipDefines` and of `tests/roadmap/implement/test_roadmap_implement_typed_result.py:class TestTypedResultOfAReturn`, and each of their task texts says `Add the guard _delivery_title` with no `Adds:` line. Once the prose rule goes, `false_premises` reads no name for those two groups and the two tests fail, so group 4 adds the line `Adds: _delivery_title` to each of the two fixtures and runs both modules in its verify. +- `search_code` for `Add the guard` gave three test modules with a guard-add task: `tests/roadmap/test_premise.py`, `tests/roadmap/implement/test_roadmap_implement_checkpoint.py` and `tests/roadmap/implement/test_roadmap_implement_typed_result.py`. `search_code` for `added_guard` gave one test module, `tests/roadmap/test_premise.py`. Group 4 changes all three, so no test module is left reading the deleted rule. +- The finding on the missing split prompt is fixed: `list_files` of `src/devops_cli/ai/tasks` shows `roadmap_stage_split.md`, and `tests/roadmap/stage/test_roadmap_stage_kind.py:def test_a_stage_prompt_names_each_kind_and_each_field_of_a_group` and `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py:def test_the_keys_of_a_group_in_the_prompts_are_the_fields_of_a_group` read both prompts against the fields of `StageGroup`, so group 2 changes both prompts, both test modules and the field together. +- The finding on the order of group 2 is fixed: the `adds` field and the two prompts land in one group, so the group runs `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py` as its verify and no group leaves the two prompt tests failing. +- The finding on the contrived test is fixed: `tests/roadmap/implement/test_roadmap_implement_job.py:def _guard_tasks` builds a group whose first task fails on the base, and each of the three new tests now fails on the base. The group with the `Adds:` line `_delivery_title` names no guard in its task text, so the base runs it and the return fails the test. The group with no `Adds:` line says to add a check beside the guard `_delivery_title`, which the base prose rule matches, so the base returns the item and the run fails the test. The group with `Adds:` `_missing_guard` names the defined guard `_delivery_title` in its task text, so the base returns the item and the run fails the test. +- The finding on the import is fixed: `tests/roadmap/test_premise.py:10:from devops_cli.roadmap.premise import added_guard, definition_lines` imports the deleted function, so group 4 deletes that import, the table test `test_a_task_adds_a_guard_only_when_the_identifier_follows_the_guard_word` and the `pytest` import that only that test uses, in the same group as the deletion. +- `src/devops_cli/roadmap/implement/implement_run.py:884:def _check_premise(self, group: TaskGroup) -> bool:` keeps its place and its return to New with the definition line, and `read_change` of `src/devops_cli/roadmap/plan_read.py` keeps the one place that reads a group. +- `read_spec` of `roadmap-implement-job/stops` gave the base requirement "The job checks the premise of a behavior group at the branch tip" with four scenarios, and the modified requirement keeps all four names. +- Precondition of `false_premises` in `src/devops_cli/roadmap/premise.py`: a checkout of the repository, because it reads the definitions at the branch tip with `git grep`; the job calls it on the checkout of the runner. +- Precondition of `definition_lines` in `src/devops_cli/roadmap/premise.py`: a checkout of the repository, because it reads the definitions of a commit through `git grep`. +- `read_change` takes a mapping of the change files, so it needs no checkout, no client and no network. +- The plan introduces no new program. `uv run devops ci test` and `uv run devops ci docs` run in the runner image, which holds `uv`, `devops`, `pytest` and `git`, under the pod settings `readOnlyRootFilesystem: true`, `runAsNonRoot: true`, `allowPrivilegeEscalation: false`, `capabilities.drop: ALL` and `seccompProfile: RuntimeDefault`; the tests write only under `tmp_path`. A failed test is class `test` with action `repair`. +- The live run `uv run devops roadmap eval stage --limit 5` needs a client of the model provider and a network to it, and its failure is class `provider` with action `retry`; the replay `uv run devops roadmap eval stage --replay` calls no model and needs no network. +- The first check of the implementation is `uv run devops ci test tests/roadmap/test_roadmap_step_files.py`, which fails on the base because `TaskGroup.added_names` does not exist. + +## Existing Tool Considered + +No open tool parses the plan files of this repository, and the change extends the project's own parsers: `code_spans` of `src/devops_cli/roadmap/step_files.py` and the kind line of `src/devops_cli/roadmap/plan_read.py`. The written cost is about 4,000 tokens to build and test, about 1,000 tokens to keep, and about 1 hour elapsed. The change deletes the internal code `added_guard`, `_ADD_VERB` and `_GUARD_SPAN` of `src/devops_cli/roadmap/premise.py`. + +## Dependencies + +None. diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-implement-job/stops/spec.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-implement-job/stops/spec.md new file mode 100644 index 0000000000..a6935ec936 --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-implement-job/stops/spec.md @@ -0,0 +1,20 @@ +## MODIFIED Requirements + +### Requirement: The job checks the premise of a behavior group at the branch tip +Before the job runs a behavior group, the job SHALL read the identifiers of the `Adds:` line of the group through `TaskGroup.added_names` of `src/devops_cli/roadmap/step_files.py`, and SHALL return the item to New with the definition line when the branch tip defines one of them. The job SHALL use no rule of a task text. The job SHALL read the kind of the group from `TaskGroup.is_behavior` of `src/devops_cli/roadmap/step_files.py`, and a group of another kind SHALL run with no check. + +#### Scenario: A task adds a guard that the base already runs +- **WHEN** A behavior group holds an `Adds:` line with `_delivery_title`, and the branch tip defines `_delivery_title` +- **THEN** The job runs no group step, writes no group file, makes no group commit, and comments the definition line with the return to New. + +#### Scenario: A task adds a guard that the base lacks +- **WHEN** A behavior group holds an `Adds:` line with `_missing_guard`, and the branch tip defines no `_missing_guard` +- **THEN** The job runs the group and commits the file that the group writes. + +#### Scenario: A group that is not behavior adds a defined name +- **WHEN** A group whose kind is not behavior names the guard `_delivery_title`, which the branch tip defines, and holds no `Adds:` line +- **THEN** The job returns no item to New and runs the group. + +#### Scenario: The guard premise fails after a checkpoint +- **WHEN** groups 1 and 2 passed and were pushed as checkpoints, and the `Adds:` line of a behavior group 3 names a guard that the branch tip defines +- **THEN** the job runs no step for group 3, withdraws the checkpoints as for a `premise` request, and returns the item to New diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-implement-step/inputs/spec.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-implement-step/inputs/spec.md new file mode 100644 index 0000000000..7d9716bf38 --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-implement-step/inputs/spec.md @@ -0,0 +1,8 @@ +## ADDED Requirements + +### Requirement: A task group exposes the identifiers that it adds +`TaskGroup.added_names` of `src/devops_cli/roadmap/step_files.py` SHALL give the identifiers of the `Adds:` line of the group, each once, in file order, and SHALL give no name for a group with no such line. + +#### Scenario: A task group with two added identifiers +- **WHEN** a group holds `Adds:` with `_delivery_title` and `_publish` in code spans +- **THEN** `TaskGroup.added_names` gives the two names in that order diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-plan-check/spec.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-plan-check/spec.md new file mode 100644 index 0000000000..9e5d5173eb --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-plan-check/spec.md @@ -0,0 +1,12 @@ +## ADDED Requirements + +### Requirement: The plan reader reads the identifiers that a group adds +`read_change` SHALL set the `adds` field of a `StageGroup` from the `Adds:` line of its group, in file order. It SHALL raise `PlanReadError` when the line holds a name outside a code span or holds no code span, and SHALL read a group with no `Adds:` line with an empty `adds`. + +#### Scenario: A change folder with an Adds line +- **WHEN** the tasks file of a `behavior` group holds `Adds:` with `_delivery_title` in a code span +- **THEN** `read_change` returns that group with `adds` equal to the one name `_delivery_title` + +#### Scenario: A malformed Adds line +- **WHEN** a group holds `Adds:` with `_delivery_title` and no code span +- **THEN** `read_change` raises `PlanReadError` with the reason of the line diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-stage/task-groups/spec.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-stage/task-groups/spec.md new file mode 100644 index 0000000000..94b022266d --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/specs/roadmap-stage/task-groups/spec.md @@ -0,0 +1,19 @@ +## ADDED Requirements + +### Requirement: A behavior group writes the identifiers that it adds +A `behavior` group of the reply SHALL have an `adds` field that lists the identifiers that the group adds. `group_text` SHALL write the names on one `Adds:` line under the line of the kind and the files, each name in a code span and separated by a comma, and SHALL write no `Adds:` line for a group whose `adds` is empty. A `manifest` group and an `other` group SHALL have no `adds`, and a reply that sets one SHALL fail the schema with the title of the group. + +#### Scenario: A behavior group adds a guard +- **WHEN** `group_text` renders a `behavior` group whose `adds` holds `_delivery_title` +- **THEN** the line under the kind and the files holds `_delivery_title` in a code span after `Adds:` + +#### Scenario: A group of another kind adds a name +- **WHEN** `_other_problems` judges an `other` group whose `adds` holds `_delivery_title` +- **THEN** the reply fails the schema, and the problem text names the title of the group + +### Requirement: The stage prompts ask for the identifiers that a group adds +The stage prompt `src/devops_cli/ai/tasks/roadmap_stage_change.md` and the split prompt `src/devops_cli/ai/tasks/roadmap_stage_split.md` SHALL name the `adds` field of a `behavior` group in the list of the keys of a group, and SHALL state that each identifier is a plain name, that the writer renders it on an `Adds:` line in a code span, and that a group of another kind adds none. + +#### Scenario: The prompts ask for the Adds line +- **WHEN** a person reads the stage prompt and the split prompt +- **THEN** each names the `adds` field, the `Adds:` line and the code span of each name diff --git a/openspec/changes/3453-a-plan-states-the-identifiers-that/tasks.md b/openspec/changes/3453-a-plan-states-the-identifiers-that/tasks.md new file mode 100644 index 0000000000..ed947151fb --- /dev/null +++ b/openspec/changes/3453-a-plan-states-the-identifiers-that/tasks.md @@ -0,0 +1,52 @@ +# Tasks + +## 1. Parse the Adds line of a task group + +Kind: behavior. Reads: `src/devops_cli/roadmap/step_files.py`, `tests/roadmap/test_roadmap_step_files.py`. Changes: `src/devops_cli/roadmap/step_files.py`, `tests/roadmap/test_roadmap_step_files.py`. + +- [ ] 1.1 `test_the_added_names_of_a_group_come_from_its_adds_line` in `tests/roadmap/test_roadmap_step_files.py` gives a group the line `Adds:` with `_delivery_title` and `_publish`, and fails on the base because `TaskGroup.added_names` does not exist; `test_an_adds_line_that_names_no_code_span_is_a_problem` fails on the base because `adds_problem` does not exist + - Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_step_files.py` fails on the base +- [ ] 1.2 Add `ADDS_LINE` and the property `TaskGroup.added_names` to `src/devops_cli/roadmap/step_files.py`: the code spans of the `Adds:` line of a group, each once, in file order, and none for a group with no such line. Add the function `adds_problem`, which gives a reason when the line holds a name outside a code span or holds no code span. Write the two tests first, and see them fail + - Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_step_files.py` passes + +## 2. Give the group an adds field, write the line, and name it in both prompts + +Kind: behavior. Reads: `src/devops_cli/roadmap/stage/stage_change.py`, `src/devops_cli/lang/en/messages.py`, `src/devops_cli/ai/tasks/roadmap_stage_change.md`, `src/devops_cli/ai/tasks/roadmap_stage_split.md`, `tests/roadmap/stage/test_roadmap_stage_content.py`, `tests/roadmap/stage/test_roadmap_stage_kind.py`, `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py`. Changes: `src/devops_cli/roadmap/stage/stage_change.py`, `src/devops_cli/lang/en/messages.py`, `src/devops_cli/ai/tasks/roadmap_stage_change.md`, `src/devops_cli/ai/tasks/roadmap_stage_split.md`, `tests/roadmap/stage/test_roadmap_stage_content.py`, `tests/roadmap/stage/test_roadmap_stage_kind.py`, `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py`. + +- [ ] 2.1 `test_a_behavior_group_renders_the_identifiers_that_it_adds` in `tests/roadmap/stage/test_roadmap_stage_content.py` calls `group_text` on a behavior group whose `adds` holds `_delivery_title`, and `test_an_other_group_that_adds_a_name_fails_the_schema` in `tests/roadmap/stage/test_roadmap_stage_kind.py` calls `_other_problems` on an `other` group whose `adds` holds `_delivery_title`; the base line `src/devops_cli/roadmap/stage/stage_change.py:621:def _other_problems(group: StageGroup) -> list[str]:` refuses no `adds`, so both tests fail on the base. `test_the_prompts_name_the_adds_field_of_a_group` in `tests/roadmap/stage/test_roadmap_stage_prompt_rules.py` reads both prompts and fails on the base, and `test_the_plan_of_this_change_has_no_content_problem` builds the plan's own `StageProposal` and asserts that `content_problems` returns no problem for it + - Verification: `$ uv run devops ci test tests/roadmap/stage/test_roadmap_stage_content.py tests/roadmap/stage/test_roadmap_stage_kind.py tests/roadmap/stage/test_roadmap_stage_prompt_rules.py` fails on the base +- [ ] 2.2 Give `StageGroup` in `src/devops_cli/roadmap/stage/stage_change.py` the field `adds`, a list of identifiers, and refuse it in `_manifest_problems` and `_other_problems` for a group of another kind. Add the messages `stage_group_adds` and `stage_kind_adds_other` to `src/devops_cli/lang/en/messages.py`, and write the `Adds:` line in `group_text` after the line of the kind and the files, each name in a code span. Add `adds` to the clause of the keys of a group and to the rules of `src/devops_cli/ai/tasks/roadmap_stage_change.md` and `src/devops_cli/ai/tasks/roadmap_stage_split.md`, because both prompt tests read the fields of `StageGroup`. Run `uv run devops roadmap eval stage --replay` and `uv run devops roadmap eval stage --limit 5` before and after the change, and state the score of each + - Verification: `$ uv run devops ci test tests/roadmap/stage/test_roadmap_stage_content.py tests/roadmap/stage/test_roadmap_stage_kind.py tests/roadmap/stage/test_roadmap_stage_prompt_rules.py` passes +- [ ] 2.3 Edit `src/devops_cli/ai/tasks/roadmap_stage_change.md` and `src/devops_cli/ai/tasks/roadmap_stage_split.md` to name the `adds` field and the `Adds:` line of a group, and run `uv run devops docs generate` + - Verification: `$ uv run devops ci docs` passes + +## 3. Read the line in the plan reader + +Kind: behavior. Reads: `src/devops_cli/roadmap/plan_read.py`, `src/devops_cli/roadmap/step_files.py`, `tests/roadmap/test_roadmap_plan_read.py`. Changes: `src/devops_cli/roadmap/plan_read.py`, `tests/roadmap/test_roadmap_plan_read.py`. + +- [ ] 3.1 `test_the_reader_takes_the_added_names_of_a_group_from_its_adds_line` in `tests/roadmap/test_roadmap_plan_read.py` builds a `tasks.md` whose behavior group holds `Adds:` with `_delivery_title` and calls `read_change`, so it fails on the base with no `adds` field; `test_the_reader_refuses_an_adds_line_with_no_code_span` holds `Adds:` with `_delivery_title` and no code span, and fails on the base because `read_change` raises no `PlanReadError` + - Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_plan_read.py` fails on the base +- [ ] 3.2 Set `adds` in `_group` of `src/devops_cli/roadmap/plan_read.py` from `TaskGroup.added_names`, and raise `PlanReadError` with the reason of `adds_problem` when the line is malformed. State the `Adds:` line in the module docstring beside the kind of a group. Write the two tests first, and see them fail + - Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_plan_read.py` passes + +## 4. Read the added names in the premise check + +Kind: behavior. Reads: `src/devops_cli/roadmap/premise.py`, `src/devops_cli/roadmap/implement/implement_run.py`, `src/devops_cli/roadmap/step_files.py`, `src/devops_cli/lang/en/messages.py`, `tests/roadmap/test_premise.py`, `tests/roadmap/implement/test_roadmap_implement_job.py`, `tests/roadmap/implement/test_roadmap_implement_checkpoint.py`, `tests/roadmap/implement/test_roadmap_implement_typed_result.py`. Changes: `src/devops_cli/roadmap/premise.py`, `src/devops_cli/roadmap/implement/implement_run.py`, `src/devops_cli/lang/en/messages.py`, `tests/roadmap/test_premise.py`, `tests/roadmap/implement/test_roadmap_implement_job.py`, `tests/roadmap/implement/test_roadmap_implement_checkpoint.py`, `tests/roadmap/implement/test_roadmap_implement_typed_result.py`. + +- [ ] 4.1 `test_a_behavior_group_that_adds_a_defined_name_returns_the_item` in `tests/roadmap/implement/test_roadmap_implement_job.py` gives a behavior group the `Adds:` line `_delivery_title` and a task that names no guard, so the base runs the group and the test fails on the base; `test_a_sentence_that_names_a_defined_guard_with_no_adds_line_runs_the_group` gives a task that says to add a check beside the guard `_delivery_title` and no `Adds:` line, so the base returns the item and the test fails on the base; `test_a_behavior_group_whose_adds_line_names_an_undefined_guard_runs_the_group` holds the `Adds:` line with `_missing_guard` and a task that names the defined guard `_delivery_title`, so the base returns the item and the test fails on the base. `test_the_check_withdraws_the_checkpoint_of_group_one` in `tests/roadmap/implement/test_roadmap_implement_checkpoint.py` and `test_typed_result_a_return_to_new_writes_returned_as_its_last_mark` in `tests/roadmap/implement/test_roadmap_implement_typed_result.py` keep their asserts, and each of their fixtures gets the `Adds:` line `_delivery_title` so the job still returns the item with no prose rule + - Verification: `$ uv run devops ci test tests/roadmap/test_premise.py tests/roadmap/implement/test_roadmap_implement_job.py tests/roadmap/implement/test_roadmap_implement_checkpoint.py tests/roadmap/implement/test_roadmap_implement_typed_result.py` fails on the base +- [ ] 4.2 Read `TaskGroup.added_names` in `false_premises` of `src/devops_cli/roadmap/premise.py`, and delete `added_guard`, `_ADD_VERB`, `_GUARD_SPAN`, the `keyword` import and the `added_guard` entry of `__all__` there. Delete the table test `test_a_task_adds_a_guard_only_when_the_identifier_follows_the_guard_word`, its `added_guard` import and the `pytest` import that only it uses from `tests/roadmap/test_premise.py` in the same step, so the module imports and ruff finds no unused import. Add the line `Adds:` with `_delivery_title` to the behavior group of `_guard_tasks` in `tests/roadmap/implement/test_roadmap_implement_job.py`, to the behavior group 3 of `tests/roadmap/implement/test_roadmap_implement_checkpoint.py` and to the behavior group 1 of `tests/roadmap/implement/test_roadmap_implement_typed_result.py`, because each of those groups adds `_delivery_title` and the check reads only the line. Change `premise_guard_defined` in `src/devops_cli/lang/en/messages.py` to name the identifier and its definition line and no task text, and update the docstrings of `false_premises` and `_check_premise` in `src/devops_cli/roadmap/implement/implement_run.py` to the `Adds:` line. Write the three new tests first, and see them fail + - Verification: `$ uv run devops ci test tests/roadmap/test_premise.py tests/roadmap/implement/test_roadmap_implement_job.py tests/roadmap/implement/test_roadmap_implement_checkpoint.py tests/roadmap/implement/test_roadmap_implement_typed_result.py` passes + +## 5. State the line in the plan check guide + +Kind: other. Reads: `docs/roadmap/plan-check.md`, `src/devops_cli/roadmap/plan_read.py`. Changes: `docs/roadmap/plan-check.md`. + +- [ ] 5.1 State in `docs/roadmap/plan-check.md` that the reader takes the `Adds:` line of a group into the `adds` field, that it refuses a name outside a code span, and that the implement job reads the same line for the premise check of a behavior group + - Verification: `$ uv run devops ci docs` passes +- [ ] 5.2 Edit `docs/roadmap/plan-check.md` to state the `Adds:` line that the reader takes into the `adds` field of a group + - Verification: `$ uv run devops ci docs` passes + +## Workflow follow-up + +- Pending a person: review the diff in tuicr (tuicr -r ..HEAD).