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
3 changes: 3 additions & 0 deletions docs/roadmap/refine.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ An item that refine cannot set to Ready gets one comment with its next step. The

A proposal that names an open issue as a dependency is not whole. The item waits on that issue. Refine does not set it to Ready, and a Ready item goes back to New. A closed dependency holds nothing back.

The Dependencies section of the body names an issue as `#N` or by its quoted title, such as `- "feat(roadmap): run each refine item in its own pod".`. Refine adds each issue that the body names by title to the dependencies of the proposal: the one open item with that exact title, else the one closed item with it. Quoted text that is no Conventional Commit title names no issue, and a list item that names `#N` names its issue by the number.

Refine looks at the item again after a reply, a body edit, or the close of those open items. It also looks again after a commit on the default branch that changes a file that the block cites. The report groups every item by its next step.

Refine writes the new body, the job record and the Status of an item with one request. The comment follows as a separate request. A stop after the write leaves the new body and its marks together.
Expand Down Expand Up @@ -83,6 +85,7 @@ An item that is too big for one pull request still waits for a person to split i
A person has nothing to do for a failed job. These cases are job failures, not person waits:

- The proposal fails a form check. The checks are `problem_statement`, `existing_tool` and `acceptance_criteria`. A proposal that needs a split has no criterion to check.
- A quoted title in the Dependencies section names no item, or two items (`dependencies`). The error names the title and asks for the issue as `#<number>`.
- A question has no verified source after the investigation (`missing_source`), or a question of the body has no answer (`unanswered_question`).
- The investigation ended with no proposal while such a question is open (`investigation_stopped`).

Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/stage.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The default filter is `status=ready`. The job takes the Ready items of any type,

A plan is an OpenSpec change, so the job plans only in a repository whose default branch holds `openspec/config.yaml`. In a repository with no such file, it leaves out every item, also the item that `--item` names, with a reason that names the file. It pushes no branch and calls no model, and the stage row names the file in its outcome for onboarding ([onboard](onboard.md)). `devops roadmap explain` prints the same reason.

The job leaves out an item that is not Ready, and some other items: for example an item with the label `needs-split`, an item that depends on an open issue, and an item that an agent or a person claimed. [roadmap-stage](../../openspec/specs/roadmap-stage/spec.md) holds the full list, in the requirement "The job leaves out the items it must not stage". The plan says why for each item that it leaves out. `--why` also lists the open items that the filter does not name.
The job leaves out an item that is not Ready, and some other items: for example an item with the label `needs-split`, an item that depends on an open issue (named as `#N` or by its quoted title in the Dependencies section, as [refine](refine.md) reads it), and an item that an agent or a person claimed. [roadmap-stage](../../openspec/specs/roadmap-stage/spec.md) holds the full list, in the requirement "The job leaves out the items it must not stage". The plan says why for each item that it leaves out. `--why` also lists the open items that the filter does not name.

## The limit on Planned items

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-11-11
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Design

## Decisions

- **An exact title, open first.** A quoted title names the one open Item with that exact title. With no open Item, it names the one closed Item with that title, because a delivered dependency holds nothing back but is still a dependency. Two Items with the title, or none, leave it unmatched.
- **Only a Conventional Commit title is a title.** Every roadmap item has a Conventional Commit title, so quoted text with no listed type, such as `"kilo"`, names no dependency.
- **A list item with `#N` is read by its number.** When a list item names `#N` and a title, the number names the issue. An old title beside the number then fails nothing.
- **An unmatched title is a job failure.** It is the check `dependencies` of `JobCheck`, so no person waits. The error asks for `#<number>`, and the round retries up to `CONST_ROADMAP_REFINE_MAX_TRIES`.
- **One reader for refine and stage.** `title_dependencies` serves both jobs. The stage job reads the listing once a run through a cached property of its judge.

## Rejected alternatives

- **Tell the model to resolve titles.** The model wrote "None" for #4574, which has 4 title dependencies, so the model does not do this step reliably. A deterministic match costs no tokens.
- **Match only open issues.** In the census, 13 of 57 titles name closed issues. A match on open issues only would fail 9 issues whose dependencies are already delivered.
- **A fuzzy title match.** A near match can link the wrong issue, and the wrong dependency blocks an item with no cause. An exact match, and `#N` when it fails, has no such risk.
- **Refuse every quoted text in the section.** Quoted text such as a tool name is no dependency, and a refusal would fail the round of a correct body.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Proposal: #4803

## Why

Closes #4803. The Dependencies section of an issue body can name an issue by its quoted title, such as `- "feat(roadmap): run each refine item in its own pod".`. Refine and the stage job read only `#N` words in that section. So #4574 names 4 open dependencies by title, refine recorded "None", and the stage job can take #4574 before its dependencies merge. A plan that stage makes on such an item fails later, or builds on code that is not merged.

## What Changes

- `title_dependencies` in `src/devops_cli/roadmap/refine/refine.py` reads each quoted Conventional Commit title in the Dependencies section of the person's text. It matches the title exactly to the one open Item with that title, else to the one closed Item with it. A list item or paragraph that names `#N` is read by its number only.
- Refine adds each matched issue to the dependencies of the validated proposal. An open one blocks the item, and the refine section lists it.
- A quoted title that names no Item, or two Items, fails the round with the job check `dependencies`. The error names the title and asks for `#<number>`. Refine writes no comment, and a later round tries again.
- The stage job leaves out an item that names an open issue by its quoted title, as it does for `#N`.

The change alters what refine records and what stage leaves out, so it carries spec deltas for `roadmap-refine` and `roadmap-stage`. It fits one pull request.

## Capabilities

- `roadmap-refine`: a dependency named by title, and the job check `dependencies`.
- `roadmap-stage`: the stage job leaves out an item with an open dependency named by title.

## Impact

- 26 of 439 open issues in the census of 2026-11-11 name 57 dependencies by title. 20 of them name no `#N`, so refine and stage found no dependency for them. With this change, 23 issues get 44 open dependencies that refine and stage did not see. 2 Ready items (#4574 and #4545) leave the stage queue until their dependencies close.
- The stage job reads the listing of Items once a run for the titles. The GitHub store caches the listing, so it sends no new request.

## Feasibility

- The body of #4574, read through `devops gh api` on 2026-11-11, holds 4 quoted titles under `### Dependencies`, and its refine section holds `### Dependencies` then `None.`.
- `body_dependencies` in `src/devops_cli/roadmap/refine/refine.py` keeps only words that start with `#` and digits, and the refine proposal takes its dependencies from the model.
- A probe over the census of open issues with the new function resolved all 57 titles: 44 to open issues and 13 to closed ones. The 13 closed titles are delivered issues, found by a title search of the repository. So a match that reads only open issues would fail 9 issues with no cause.

## Existing Tool Considered

`markdown-it-py` already parses the Dependencies section, and the change reuses it. No open tool maps a title to an issue of the project listing. Cost to build: about 50,000 tokens and 1.5 hours to write, keep and fix. The change deletes no internal code: the `#N` word reader moves into `_issues`, which both readers share.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## ADDED Requirements

### Requirement: Refine reads a dependency that the body names by its title
Refine SHALL add to the dependencies of a proposal each issue that the Dependencies section of the body names by a quoted Conventional Commit title: the one open Item with that exact title, else the one closed Item with it. A list item that names `#N` SHALL name its issue by the number. A title that names no Item or two Items SHALL fail the round with the job check `dependencies`, and the error SHALL ask for `#<number>`.

#### Scenario: An open issue named by its title
- **WHEN** the Dependencies section names the quoted title of an open issue and the proposal names no dependency
- **THEN** the item has the next step `blocked` with that issue, and the refine section lists the issue under Dependencies

#### Scenario: A closed issue named by its title
- **WHEN** the Dependencies section names the quoted title of a closed issue
- **THEN** the item reaches Ready, and the refine section lists the issue under Dependencies

#### Scenario: A title that names no single issue
- **WHEN** the Dependencies section names a quoted title that no issue has, or that two open issues have
- **THEN** the item has the next step `retry`, `refine.failed_check` is `dependencies`, `refine.failure` names the title and asks for `#<number>`, and refine wrote no comment

#### Scenario: Quoted text that is no title, and an item with a number
- **WHEN** the Dependencies section holds a quoted tool name, and a list item that names `#N` and a title that no issue has
- **THEN** the round has no job failure
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## ADDED Requirements

### Requirement: The stage job reads a dependency named by its title
The stage job SHALL leave out an item whose Dependencies section names an open issue by its quoted Conventional Commit title, as it does for `#N`. A title SHALL name the one open Item with that exact title, else the one closed Item with it. A closed issue SHALL hold nothing back.

#### Scenario: An open and a closed issue named by their titles
- **WHEN** one Ready item names an open issue and a closed issue by their quoted titles, and another Ready item names only the closed issue
- **THEN** the job leaves out the first item with the reason that names the open issue, and it stages the second item
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tasks

## 1. Behavior: refine and stage read a dependency named by its title

- [x] 1.1 Write failing tests: a title of an open or a closed issue is a dependency, a title that names no single issue fails the round with the check `dependencies`, quoted text that is no title fails nothing, and the stage job leaves out an item with an open dependency named by title
- Verification: `$ uv run devops ci test tests/roadmap/refine/test_roadmap_refine_blocked.py tests/roadmap/refine/test_roadmap_refine_job_failure.py tests/roadmap/stage/test_roadmap_stage_selection.py`
- [x] 1.2 Add `title_dependencies`, add its issues to the validated proposal, add the job check `dependencies` with its message, and read the titles in the stage check `_dependency`
- Verification: `$ uv run devops ci test tests/roadmap/refine/test_roadmap_refine_blocked.py tests/roadmap/refine/test_roadmap_refine_job_failure.py tests/roadmap/stage/test_roadmap_stage_selection.py`

## 2. Documents

- [x] 2.1 Describe the title form of a dependency in `docs/roadmap/refine.md` and `docs/roadmap/stage.md`, and add the check `dependencies` to the job failures
- Verification: `$ uv run devops ci docs`
19 changes: 19 additions & 0 deletions openspec/specs/roadmap-refine/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -986,3 +986,22 @@ A round whose model call worked SHALL clear `refine.failed_at`, `refine.failed_s
#### Scenario: The limit of a round
- **WHEN** a round with `--limit 1` runs over the `wip(cli)` item and a New item with a listed type
- **THEN** refine takes the item with the listed type

### Requirement: Refine reads a dependency that the body names by its title
Refine SHALL add to the dependencies of a proposal each issue that the Dependencies section of the body names by a quoted Conventional Commit title: the one open Item with that exact title, else the one closed Item with it. A list item that names `#N` SHALL name its issue by the number. A title that names no Item or two Items SHALL fail the round with the job check `dependencies`, and the error SHALL ask for `#<number>`.

#### Scenario: An open issue named by its title
- **WHEN** the Dependencies section names the quoted title of an open issue and the proposal names no dependency
- **THEN** the item has the next step `blocked` with that issue, and the refine section lists the issue under Dependencies

#### Scenario: A closed issue named by its title
- **WHEN** the Dependencies section names the quoted title of a closed issue
- **THEN** the item reaches Ready, and the refine section lists the issue under Dependencies

#### Scenario: A title that names no single issue
- **WHEN** the Dependencies section names a quoted title that no issue has, or that two open issues have
- **THEN** the item has the next step `retry`, `refine.failed_check` is `dependencies`, `refine.failure` names the title and asks for `#<number>`, and refine wrote no comment

#### Scenario: Quoted text that is no title, and an item with a number
- **WHEN** the Dependencies section holds a quoted tool name, and a list item that names `#N` and a title that no issue has
- **THEN** the round has no job failure
7 changes: 7 additions & 0 deletions openspec/specs/roadmap-stage/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -4467,3 +4467,10 @@ The table builder SHALL read the text of each test module, and MUST NOT parse a
#### Scenario: A text that names a test file of the commit passes
- **WHEN** The scanned text names `tests/roadmap/test_roadmap_limit_classes.py` and the commit holds that file.
- **THEN** The check reports no missing path.

### Requirement: The stage job reads a dependency named by its title
The stage job SHALL leave out an item whose Dependencies section names an open issue by its quoted Conventional Commit title, as it does for `#N`. A title SHALL name the one open Item with that exact title, else the one closed Item with it. A closed issue SHALL hold nothing back.

#### Scenario: An open and a closed issue named by their titles
- **WHEN** one Ready item names an open issue and a closed issue by their quoted titles, and another Ready item names only the closed issue
- **THEN** the job leaves out the first item with the reason that names the open issue, and it stages the second item
4 changes: 4 additions & 0 deletions src/devops_cli/lang/en/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2457,6 +2457,10 @@ class RoadmapMessages:
refine_failure_line: str = "{checks}: {tries} of {limit} tries. Last error: {error}"
refine_failure_form: str = "The reply of the model failed the form check."
refine_failure_open: str = "Open: {question}"
refine_failure_dependency: str = (
'The Dependencies section names "{title}", and no single issue has this title. '
"Write the dependency as #<number>."
)
refine_failure_searched: str = "Searched: {calls}"
refine_failure_none_searched: str = "Searched: nothing"
refine_going_on: str = "## {count} item(s) go on without a person"
Expand Down
Loading