Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/roadmap/implement.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The job never merges. [Checks of the implement job](../ROADMAP_WORKFLOW.md#check

**A stop.** A step that fails stops the item. The job comments why, shows a table of the steps (the step, its attempts, its tokens in and out, and its last failing command), shows the masked diff of the discarded work, and sets the Status to Blocked. The job keeps the trace of its run in `implement.trace`: each model call, tool call, check and retry, in the order of the run, with no argument, no output, no secret and no private host name. A tool call holds the digest of its argument, so a reader sees a repeated call, and a shell call holds the exit status of its command. When a long run does not fit the bound of the trace, the trace drops the oldest model events first, then the oldest of the other events, and counts them in `dropped`. It keeps the sums of the dropped events (their tokens, seconds, repair rounds and outcomes), so the totals of `devops roadmap explain` cover the whole run. The tool calls, checks, retries and attempts show what the run did, and `implement.spend` keeps the tokens of the run. Read it with `devops roadmap explain <issue> --trace`. The job keeps no Job artifact. Before the push of a stop, the job drops the files that no commit holds, such as the files of an archive that failed after it moved the change folder, so the rebase of the push finds a clean checkout. The Service runs the item again after the comment `implement: retry`. For a stop whose class a new attempt can fix, it runs the item again with no comment. This happens after a Job that ended with no result, up to `roadmap.implement.continuations_per_item` times (default 2). It also happens after a new runner image, within the limits of `roadmap.implement.digest_clears_per_class` and `roadmap.implement.digest_clears_per_item`.

**The premise of a behavior group.** Before the first step of a run, the job checks the premise of each open behavior group at the branch tip, once (#5881). An open group has a task that is not ticked. The job reads each task of these groups that has an add verb, the word guard or check, and one name in a code span. When the branch tip defines that name, the job returns the item to New. The comment holds the task and the definition line. The run makes no model request, so a false premise loses no group that passed in the run. The job first takes back the checkpoints that earlier Jobs pushed (see Checkpoints). The check uses the same definition lookup as the premise check of the stage job (`src/devops_cli/roadmap/premise.py`). It reads the last commit that is not a `wip:` commit, so a guard that an earlier attempt of the same group kept is no defect. A group of another kind gets no check.
**The premise of a behavior group.** Before the first step of a run, the job checks the premise of each open behavior group at the branch tip, once (#5881). An open group has a task that is not ticked. The job reads the `Adds:` line of each of these groups: the identifiers that the group adds, each in a code span (#3453). When the branch tip defines one of them, the job returns the item to New. The comment holds the group, the name and the definition line. No rule reads the prose of a task, so a task that names a guard only as the place of a change, or as the text of a test, returns no item. A group with no `Adds:` line gets no check. The run makes no model request, so a false premise loses no group that passed in the run. The job first takes back the checkpoints that earlier Jobs pushed (see Checkpoints). The check uses the same definition lookup as the premise check of the stage job (`src/devops_cli/roadmap/premise.py`). It reads the last commit that is not a `wip:` commit, so a guard that an earlier attempt of the same group kept is no defect. A group of another kind gets no check.

**A plan request.** A stopped step can request a bounded change of its plan in a `plan-request` block. The job judges requests of the kinds `path`, `command` and `task` with deterministic rules. The job commits an accepted amendment, records it in `tasks.md`, and runs the group again. A group whose inputs exceed the limit is split once for each item. A `premise` request returns the item to New with its evidence, after the same withdraw of the checkpoints. Other requests stop the item as a question for a person.

Expand Down
7 changes: 7 additions & 0 deletions docs/roadmap/plan-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ the head commit, whatever the working tree of the checkout holds.
each other group as `other`. The reader reads
`## Unchanged references` of `design.md` into the references of the plan, which the gate of a
moved module reads.
The reader takes the `Adds:` line of a group into its `adds` field (#3453). The line names each
identifier that a behavior group adds, each in a code span, such as ``Adds: `_delivery_title` ``.
A group with no such line adds no identifier. The reader refuses a line that names an
identifier outside a code span, or that holds no code span, as a `read` problem of `tasks.md`.
The implement job reads the same line through `TaskGroup.added_names` for the premise check of
a behavior group: it returns the item to New when the branch tip already defines a name of the
line.
- The size of each task group (#3499): the command measures each group with `measure_groups`, the
function of the stage job, on the tracked files of the head commit. The item and the files of the
change folder are the shared text, as in the stage job. It reports a `group-over-budget` problem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- **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.
- **The shared fixture `_guard_tasks` writes the `Adds:` line of its argument, not a fixed name.**: The helper builds the group of a false premise from `_delivery_title` and the group of a true premise from `_missing_guard`, so a fixed name would return the item of the true premise.
- **Skip a code span of the line that is no identifier.**: `definition_lines` reads the definition of one identifier, so a span such as `TaskGroup.added_names` gets no check, as the prose rule skipped such a span before.
- **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
Expand All @@ -21,4 +23,4 @@

## 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.
- `src/devops_cli/roadmap/implement/implement_run.py` (import): The module imports `false_premises`, which stays, and never names `added_guard`, so the deletion changes only the docstring of `_check_premise`.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The plan of #3417 decides the guard premise check of the implement job from the
- 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`.
- State the line and the refusal in `docs/roadmap/plan-check.md`, and state in `docs/roadmap/implement.md` that the premise check reads the line and no prose of a task.
- The change fits one pull request.

## Capabilities
Expand All @@ -30,7 +30,7 @@ None.
## 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`
- Documents: `src/devops_cli/ai/tasks/roadmap_stage_change.md`, `src/devops_cli/ai/tasks/roadmap_stage_split.md`, `docs/roadmap/plan-check.md`, `docs/roadmap/implement.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
Expand All @@ -46,8 +46,11 @@ None.
- 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 of 2026-11-14 on group 4 (`false_premise`) is fixed. The plan gave the shared helper `_guard_tasks` of `tests/roadmap/implement/test_roadmap_implement_job.py` the fixed line `Adds:` with `_delivery_title`, but the helper also builds the group of `TestATruePremiseOfABehaviorGroup` from `_missing_guard`. The branch tip defines `_delivery_title`, so that item went back to New and `test_a_behavior_group_whose_guard_the_base_lacks_runs` failed. The helper now writes the `Adds:` line of its argument `name`, so each world names its own guard.
- #5886 (2026-11-15) moved the premise check before the first step of the run, kept the prose rule for this change to replace, and renamed the checkpoint test to `test_the_check_returns_the_item_before_the_step_of_group_one`. Group 4 names the new test.
- `docs/roadmap/implement.md` states the prose rule (an add verb, the word guard or check, and one code span), so group 5 changes it with the guide of the plan check.
- 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.
- `src/devops_cli/roadmap/implement/implement_run.py:def _check_premise(self, groups: Sequence[TaskGroup]) -> bool:` (the signature after #5886) 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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Before the job runs a behavior group, the job SHALL read the identifiers of the
- **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 task names a defined guard and the group has no Adds line
- **WHEN** A behavior group task says to add a check beside the guard `_delivery_title`, which the branch tip defines, and the group holds no `Adds:` line
- **THEN** The job returns no item to New and runs the group.

#### 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.
Expand Down
Loading