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
12 changes: 7 additions & 5 deletions docs/roadmap/alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ A check changes no label and closes no issue. A person decides what a tool means

The comment gives:

- the verdict and the reason of the model for it, in one or two sentences;
- the tool, with its URL, license and last activity, and what it covers and lacks;
- the tools considered: every tool whose facts the run read, each with its URL, license and last activity;
- the answered searches, each with its number of results;
- at most five sources, and a line that says how many more the comment leaves out. GitHub shows each URL as a link.
- the verdict and the reason of the model for it;
- the tool on one line, with its URL, license, last activity and maintained state, as in the block;
- what the tool covers and lacks;
- one block that GitHub shows closed, `Searches (<count>)`. It holds the tools considered: every tool whose facts the run read, each with its URL, license and last activity. It also holds the answered searches with their number of results. Last, it holds at most five sources, and a line that says how many more the comment leaves out. GitHub shows each URL as a link;
- one sentence that says a person decides what the check means for the item.

The prompt asks the model for a brief reply: a reason of one sentence, and a few short items in `covers`, `lacks` and `sources`. The check refuses no reply for its length and cuts no text of the model. The comment of a skip class is one line, for example `Alternatives check: not-applicable (docs item; no search).`

A check that posts a comment adds a new one. It never changes the comment of an earlier check.

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

## Decisions
- **Guidance, not a cap.** The prompt asks for a brief reply. The schema sets no length, so a long reply passes and the job writes it whole. A cap would make a check fail, or drop context that refine, stage and implement read (owner, 2026-11-17).
- **Fold, do not cut.** The tools considered, the searches and the sources go into one `<details>` block. Its summary counts the answered searches. The block holds every line that the comment held before, so a reader of the comment text loses nothing.
- **One tool line.** The comment uses the tool line of the block of the body (`_tool_line`), so the comment and the block state the same facts in the same form.
- **Machine-read lines stay.** The marker, the heading, `Reason:`, `Covers:`, `Lacks:` and `Tool: none found` stay. The block of the body does not change.
- **The source bound stays.** The comment keeps its bound of `CONST_ROADMAP_ALTERNATIVES_MAX_COMMENT_SOURCES` sources and its line that counts the rest, as before this change.

## Rejected alternatives
- **Length limits in the schema of the reply**, with one retry for a longer reply: the owner refused hard caps that make a job fail or miss context (2026-11-17).
- **A character cap in the render**: it cuts text that other jobs read.
- **No tools considered and no searches in the comment**: they are the evidence of a `none` verdict, and #2944 added them on purpose.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Proposal: #6168

## Why
The comment of `devops roadmap alternatives` is too long to read quickly. The owner asked on 2026-11-17 for a brief and concise comment. The comment on #5384 has 2,210 characters, and the comment on #5398 has 1,585 characters. Two sources make it long.

1. The prompt asks for a reason of "one or two sentences" and sets no size for `covers`, `lacks` and `sources`. The model writes 2 or 3 long sentences and items of 15 to 25 words.
2. The render shows a "Tools considered" list, a "Searches run" list of up to 10 lines, a tool block of 4 lines and a footer of two sentences. For `not-applicable` it shows three lines that say little.

## What Changes
- The prompt `roadmap_alternatives.md` asks for a reason of one sentence of about 30 words, and a few items, about 3, in `covers`, `lacks` and `sources`. Each item is a plain phrase of about 12 words with no filler. This is guidance only: the schema of the reply sets no length, and the job refuses no reply for its length and cuts no text of it (owner, 2026-11-17).
- The comment shows the tool on one line, the same line as the block of the body.
- One `<details><summary>Searches (N)</summary>` block, which GitHub shows closed, holds the tools considered, the answered searches and the sources. Nothing is left out of it.
- The footer is one sentence.
- The comment of a skip class is one line: `Alternatives check: not-applicable (<class> item; no search).`
- The marker, the heading `## Alternatives check: <verdict>`, `Reason:`, `Covers:`, `Lacks:`, `Tool: none found` and the block of the body stay as they are.

## Capabilities
- `roadmap-alternatives`: the comment requirements and the skip-class requirement change.

## Impact
- On the open page of GitHub, the comment of #5384 drops from 2,210 to 1,259 characters with the same text of the model, and to about 700 characters with a reply that follows the new prompt. The folded block keeps the rest. The comment of a skip class drops to one line.
- Refine, stage and implement read the comment and the block. The marker and the block do not change. The comment keeps `Covers:` and `Lacks:`, which the refine prompt reads.
- No setting, no command and no dependency changes. The change fits one pull request.

## Feasibility
- `devops gh api repos/dan-petty/devops-cli/issues/5384/comments` and `.../5398/comments` give the two comments with the marker `<!-- devops roadmap alternatives -->`, of 2,210 and 1,585 characters.
- The readers of the comment:
- `_latest_check_comment` and `covers_question` in `src/devops_cli/roadmap/refine/refine.py` read the marker, through `replies_after_marker`.
- `_request` in `src/devops_cli/roadmap/alternatives.py` reads the marker.
- `COMMENT_JOBS` in `src/devops_cli/roadmap/stores/comment_repeat.py` reads the marker.
- The refine prompt `roadmap_refine_proposal.md` reads what the tool lacks, "as the `comment` states".
- `recorded_check` reads the block of the body, which does not change.
- No code parses a line of the comment other than the marker.
- GitHub renders Markdown inside `<details>` when a blank line follows `<summary>`.

## Existing Tool Considered
The `<details>` element of GitHub Markdown folds the evidence, so the change needs no new tool. The rest is the text of one prompt and one render function.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
## MODIFIED Requirements

### Requirement: The comment gives the verdict and its evidence
The comment SHALL give the verdict, the reason of the verdict in the model's words, the tool on one line with its URL, its license, its last activity and whether it is maintained, and what it covers and lacks. The model SHALL give a reason in every reply, and the job SHALL refuse a reply with none. The prompt SHALL ask for a brief reply, and the job SHALL refuse no reply for its length and SHALL cut no text of it.

#### Scenario: A comment
- **WHEN** a check ends with a covering tool
- **THEN** the comment names the verdict, the reason, the tool, its URL, its license, its last push and its maintained state on one line, the lists of covers and lacks, and, in a folded block, the tools considered and the queries run

#### Scenario: A reply with no reason
- **WHEN** the model replies with no reason
- **THEN** the reply fails the schema of the output and the model is asked again

#### Scenario: A reply longer than the prompt asks
- **WHEN** the model replies with a reason of six sentences and five long items in `lacks`
- **THEN** the model gets no request to write the reply again, and the comment holds the whole reason and each item

### Requirement: The comment lists the searches and the tools considered
The comment SHALL list every tool whose facts the run read with its URL, license and last activity, and each search that a provider answered with its number of results. It SHALL put them, with the sources, in one `<details>` block whose summary is `Searches (<count>)`, so GitHub shows them closed. It SHALL show no query outside that block.

#### Scenario: Two searches with results
- **WHEN** a run makes two searches and the fake search returns two results each
- **THEN** the folded block `Searches (2)` lists each query with `results: 2`, and no query is outside the block

#### Scenario: Two tools read
- **WHEN** the run reads the facts of two repositories and names one as the tool
- **THEN** the folded block lists both under `Tools considered:`, each with its license and last activity

#### Scenario: Ten searches
- **WHEN** a run makes ten searches and names a covering tool with three covers and three lacks
- **THEN** the comment outside the folded block holds only the marker, the heading, the reason, the tool line, the covers, the lacks and the footer, and the block `Searches (10)` lists the ten queries

### Requirement: The comment shows at most five sources
The folded block of the comment SHALL show at most five sources, and SHALL say how many more it leaves out.

#### Scenario: More sources than the bound
- **WHEN** the reply cites eight sources that the tools returned
- **THEN** the folded block shows five and the line `3 more sources are left out`

### Requirement: A skip-class item is not-applicable with no model call
The check SHALL give the verdict `not-applicable`, with no model call and no search, to an item whose title has the Conventional Commit type `test`, `docs`, `refactor`, `chore`, `ci` or `perf`, and to an item whose title has the type `fix` and whose body holds the text `Traceback (most recent call last)`. The comment and the block of the body SHALL name the class: the type, or `fix-with-stack-trace`. An item of any other type, and an item with no type, SHALL NOT be a skip class.

#### Scenario: Each type is a skip class
- **WHEN** the check runs on six items whose titles have the types `test`, `docs`, `refactor`, `chore`, `ci` and `perf`
- **THEN** each check has the verdict `not-applicable`, each comment is the one line that names the type, and the model received no request and no search ran

#### Scenario: The base rule of one agent run holds for non-skip items only
- **WHEN** the check runs on a skip-class item
- **THEN** no agent run happens for it, and the rule "The check of one item SHALL be one agent run" of the requirement "The agent finds facts with three tools only" holds for an item that is not a skip class

#### Scenario: A fix with a stack trace
- **WHEN** the check runs on an item titled `fix(roadmap): a crash` whose body holds `Traceback (most recent call last)`
- **THEN** the check has the verdict `not-applicable`, the comment is the one line that names `fix-with-stack-trace`, and the model received no request

#### Scenario: A fix with no stack trace
- **WHEN** the check runs on an item titled `fix(roadmap): a crash` whose body holds no traceback
- **THEN** the model receives a request for the item

#### Scenario: A type that is no skip class
- **WHEN** the check runs on items whose titles have the types `feat`, `build` and `style`, and on an item whose title has no type
- **THEN** the model receives a request for each of them

#### Scenario: A skip class with an unpaired marker
- **WHEN** the body of a skip-class item holds the start marker of the block with no end marker
- **THEN** the item is skipped with a named reason and nothing is written for it

## ADDED Requirements

### Requirement: The comment of a skip class is one line
The comment of a skip-class item SHALL be the marker and one line, `Alternatives check: not-applicable (<class> item; no search).`

#### Scenario: A docs item
- **WHEN** the check runs on an item titled `docs(roadmap): a change`
- **THEN** its comment is the marker and the line `Alternatives check: not-applicable (docs item; no search).`
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tasks

## 1. Behavior

- [x] 1.1 Change the render tests to the new form: the folded block, the one tool line, the one-line skip class, and a long reply that the job writes whole
- Verification: `$ uv run devops ci test tests/roadmap/test_roadmap_alternatives.py`
- [x] 1.2 Fold the evidence, write the tool on one line, make the footer and the skip-class comment short, and ask for a brief reply in the prompt
- Verification: `$ uv run devops ci test tests/roadmap/`

## 2. Documents

- [x] 2.1 Update the comment form in `docs/roadmap/alternatives.md` and in the spec `roadmap-alternatives`
- Verification: `$ uv run devops openspec check`
33 changes: 24 additions & 9 deletions openspec/specs/roadmap-alternatives/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,33 +138,41 @@ A check SHALL post one comment with the marker `devops roadmap alternatives` whe
- **THEN** the check posts one comment and records the new verdict, the new tool and the new date

### Requirement: The comment gives the verdict and its evidence
The comment SHALL give the verdict, the reason of the verdict in the model's words, the tool with its license, its last activity, whether it is maintained and its URL, and what it covers and lacks. The model SHALL give a reason in every reply, and the job SHALL refuse a reply with none.
The comment SHALL give the verdict, the reason of the verdict in the model's words, the tool on one line with its URL, its license, its last activity and whether it is maintained, and what it covers and lacks. The model SHALL give a reason in every reply, and the job SHALL refuse a reply with none. The prompt SHALL ask for a brief reply, and the job SHALL refuse no reply for its length and SHALL cut no text of it.

#### Scenario: A comment
- **WHEN** a check ends with a covering tool
- **THEN** the comment names the verdict, the reason, the tool, its license, its last push, its maintained state, its URL, the lists of covers and lacks, the tools considered, and the queries run
- **THEN** the comment names the verdict, the reason, the tool, its URL, its license, its last push and its maintained state on one line, the lists of covers and lacks, and, in a folded block, the tools considered and the queries run

#### Scenario: A reply with no reason
- **WHEN** the model replies with no reason
- **THEN** the reply fails the schema of the output and the model is asked again

#### Scenario: A reply longer than the prompt asks
- **WHEN** the model replies with a reason of six sentences and five long items in `lacks`
- **THEN** the model gets no request to write the reply again, and the comment holds the whole reason and each item

### Requirement: The comment lists the searches and the tools considered
The comment SHALL list every tool whose facts the run read with its URL, license and last activity, and each search that a provider answered with its number of results.
The comment SHALL list every tool whose facts the run read with its URL, license and last activity, and each search that a provider answered with its number of results. It SHALL put them, with the sources, in one `<details>` block whose summary is `Searches (<count>)`, so GitHub shows them closed. It SHALL show no query outside that block.

#### Scenario: Two searches with results
- **WHEN** a run makes two searches and the fake search returns two results each
- **THEN** the comment lists each query with `results: 2`
- **THEN** the folded block `Searches (2)` lists each query with `results: 2`, and no query is outside the block

#### Scenario: Two tools read
- **WHEN** the run reads the facts of two repositories and names one as the tool
- **THEN** the comment lists both under `Tools considered:`, each with its license and last activity
- **THEN** the folded block lists both under `Tools considered:`, each with its license and last activity

#### Scenario: Ten searches
- **WHEN** a run makes ten searches and names a covering tool with three covers and three lacks
- **THEN** the comment outside the folded block holds only the marker, the heading, the reason, the tool line, the covers, the lacks and the footer, and the block `Searches (10)` lists the ten queries

### Requirement: The comment shows at most five sources
The comment SHALL show at most five sources, and SHALL say how many more it leaves out.
The folded block of the comment SHALL show at most five sources, and SHALL say how many more it leaves out.

#### Scenario: More sources than the bound
- **WHEN** the reply cites eight sources that the tools returned
- **THEN** the comment shows five and the line `3 more sources are left out`
- **THEN** the folded block shows five and the line `3 more sources are left out`

### Requirement: A check never changes an earlier comment
A check SHALL add a new comment and SHALL NOT change the comment of an earlier check.
Expand Down Expand Up @@ -322,15 +330,15 @@ The check SHALL give the verdict `not-applicable`, with no model call and no sea

#### Scenario: Each type is a skip class
- **WHEN** the check runs on six items whose titles have the types `test`, `docs`, `refactor`, `chore`, `ci` and `perf`
- **THEN** each check has the verdict `not-applicable`, each comment names the type, and the model received no request and no search ran
- **THEN** each check has the verdict `not-applicable`, each comment is the one line that names the type, and the model received no request and no search ran

#### Scenario: The base rule of one agent run holds for non-skip items only
- **WHEN** the check runs on a skip-class item
- **THEN** no agent run happens for it, and the rule "The check of one item SHALL be one agent run" of the requirement "The agent finds facts with three tools only" holds for an item that is not a skip class

#### Scenario: A fix with a stack trace
- **WHEN** the check runs on an item titled `fix(roadmap): a crash` whose body holds `Traceback (most recent call last)`
- **THEN** the check has the verdict `not-applicable`, the comment names `fix-with-stack-trace`, and the model received no request
- **THEN** the check has the verdict `not-applicable`, the comment is the one line that names `fix-with-stack-trace`, and the model received no request

#### Scenario: A fix with no stack trace
- **WHEN** the check runs on an item titled `fix(roadmap): a crash` whose body holds no traceback
Expand All @@ -344,6 +352,13 @@ The check SHALL give the verdict `not-applicable`, with no model call and no sea
- **WHEN** the body of a skip-class item holds the start marker of the block with no end marker
- **THEN** the item is skipped with a named reason and nothing is written for it

### Requirement: The comment of a skip class is one line
The comment of a skip-class item SHALL be the marker and one line, `Alternatives check: not-applicable (<class> item; no search).`

#### Scenario: A docs item
- **WHEN** the check runs on an item titled `docs(roadmap): a change`
- **THEN** its comment is the marker and the line `Alternatives check: not-applicable (docs item; no search).`

### Requirement: A non-skip item needs a search before any verdict
For an item that is no skip class, the check SHALL refuse a reply that follows no answered `search_web` call, and SHALL give the model one more turn to search. A second reply that follows no answered search SHALL end as a failed check: the job skips the item with a named reason and writes nothing for it. The check SHALL refuse a reply with the verdict `not-applicable` from the model, because the job sets that verdict for a skip class only.

Expand Down
Loading