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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ and excessive permissions fail it, and every other finding is shown. |
| | `devops roadmap run [OPTIONS]` | Run the roadmap jobs that are due, in order: metrics, then intake, refine and the alternatives check, and record each one's last success. Intake is due on an issue reopened, and decides at most 5 candidates a run and keeps a record of those it left beside the schedule; refine is due every hour, on a first run, and after an intake that placed a critical fix or a P0 item; the alternatives check is due once a day and on a first run, and checks at most roadmap.alternatives.limit items. Without --confirm, or with --dry-run, prints the due list and runs nothing. |
| | `devops roadmap implement [OPTIONS]` | Implement a Staged item, in bounded steps. With --group it runs one task group of the change of an item in the checkout --source: the agent is pydantic-ai's Coder on the model of ai.tasks.implement. Its inputs are the item's title, problem and acceptance criteria, the change's proposal, design and tasks, the group, and the files the group names. The command refuses to start when they do not fit the window of the task, or when the checkout has uncommitted changes. The shell of the agent runs only git, uv, ruff and mypy, with a scratch home. When the agent returns, the command runs the verification commands of the group and ruff and mypy on the changed Python files, and checks that the agent made no commit, removed or renamed no test that existed at the start of the step, and ticked every task of the group. The command writes the tasks file back to its text before the run and keeps only the ticks of the group, so no edit of that file stops the step. An agent that forgets a tick gets one more turn that asks only for the ticks, and that may change only the tasks file. When every check passes, it commits the checkout as '<group title> (#\<item\>)'. Otherwise it resets the checkout to the commit where the step started, reports the step as stopped with the reason and the masked diff of the work it discarded, and exits 1. It writes nothing to GitHub. Without --group it is the job. It takes each Staged or Planned item that a label filter names (default: status=ready, status=planned, effort=low). A Staged item has its staged branch and draft on origin. A Planned item has its change folder on the default branch and no branch: the job makes the branch \<type\>/\<issue\>-\<slug\> there, with the slug of the folder, and opens the draft when the branch first holds a commit. The job rebases the branch, runs a step for each task group that has an unticked task, regenerates the documentation, archives the change, pushes, sets the title and the body of the pull request (the title of the issue, and a body that closes it), watches the checks, runs one fix step for a failed check, and marks the pull request ready. A step that fails stops the item: the job comments why and shows the masked diff of the discarded work, sets the Status to Ready, and runs the item again only after a comment 'implement: retry'. The job leaves out an item that an agent or a person claimed with a label owner/agent or owner/human. When one claims an item that a running job works on, the job ends it at the next group boundary, with no push and no pull request. The job never merges. --confirm runs steps only when the setting roadmap.implement.in_runner is true, which only the pod of a runner Job sets: the shell of the agent is no security boundary. On a workstation, --item \<n\> --confirm starts that runner Job for the item, with the code of devops k8s run-job --template runner, and follows its log (--no-wait prints the Job's name). It refuses an item that an agent or a person claimed, an item that is neither Ready nor Planned, and a repository that has a runner Job that has not ended. --dry-run --item \<n\> prints the Job and makes no request. |
| | `devops roadmap explain [OPTIONS] <item>` | Say, for one issue, whether the stage job and the implement job take it. For each job the answer is yes, or no with the reason of the first rule that fails: the issue is closed or is no item, the filter, the rules of the job (the Status, the owner, the stop on record, the plan and the branch), and the limit of a run. The reasons are the texts of the 'Left out' list of stage --plan and implement --plan. The command reads GitHub and git, calls no model and writes nothing. It uses the filter and the limit that the Service uses for each job. A group over the step budget shows only when an earlier run recorded it. |
| | `devops roadmap inbox [OPTIONS]` | List what waits for a person, each line with its number, its age and the one command or action that clears it. The order is: ready plan pull requests of the jobs (G1), ready implementation pull requests of the jobs (G2), the open release pull request (G3), items in status/blocked with their cause, claims with no activity for 7 days, and labels of .github/labels.yml that the repository lacks. A second list holds the other open pull requests, those of people and agents, with drafts marked. The age is the time since the last update. A draft of a job and a pull request that a runner Job holds are not listed. The command reads the open issues, the open pull requests, the labels and the labels file, and the newest commit of that file when the labels differ. A run sends 5 requests, or 6 when the labels differ, and one more for each 100 open issues and pull requests. It calls no model and writes nothing. It leaves out an image digest that is not rolled yet: run devops argo cd apps status devops. |
| | `devops roadmap return [OPTIONS] <item>` | Return an item to New with an evidence comment, handing it back to refinement when it cannot be built as specified or needs a refactor beyond its scope. The item gets the label status/new in place of its other status/* label. |
| | `devops roadmap claim [OPTIONS] <item>` | Claim an item for an agent or a person with the label owner/agent or owner/human. An item has one owner. A person can take an item from the Service. The jobs stage and implement take no item that an agent or a person claimed. |
| | `devops roadmap release [OPTIONS] <item>` | Release an item: remove its owner/* label, whoever holds it. No job removes the claim of an agent or a person. |
Expand Down
15 changes: 15 additions & 0 deletions docs/CLI_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6636,6 +6636,21 @@ devops roadmap explain [OPTIONS] <item>
| `--limit` | `integer` | - | Items a run takes, for both jobs. Without it, each job uses its own limit: the setting roadmap.stage.limit for stage, and 1 for implement. |
| `--dry-run` | `boolean` | - | Make no request: print the reads that a run makes, in order, with placeholders. |

### `devops roadmap inbox`

**List what waits for a person, each line with its number, its age and the one command or action that clears it. The order is: ready plan pull requests of the jobs (G1), ready implementation pull requests of the jobs (G2), the open release pull request (G3), items in status/blocked with their cause, claims with no activity for 7 days, and labels of .github/labels.yml that the repository lacks. A second list holds the other open pull requests, those of people and agents, with drafts marked. The age is the time since the last update. A draft of a job and a pull request that a runner Job holds are not listed. The command reads the open issues, the open pull requests, the labels and the labels file, and the newest commit of that file when the labels differ. A run sends 5 requests, or 6 when the labels differ, and one more for each 100 open issues and pull requests. It calls no model and writes nothing. It leaves out an image digest that is not rolled yet: run devops argo cd apps status devops.**

```bash
devops roadmap inbox [OPTIONS]
```

**Options:**

| Option / Flag | Type | Default | Description |
|---|---|---|---|
| `--repo`, `-R` | `string` | - | Repository as owner/name (default: this checkout's origin). |
| `--dry-run` | `boolean` | - | Make no request: print the reads that a run makes, in order, with placeholders. |

### `devops roadmap return`

**Return an item to New with an evidence comment, handing it back to refinement when it cannot be built as specified or needs a refactor beyond its scope. The item gets the label status/new in place of its other status/* label.**
Expand Down
3 changes: 2 additions & 1 deletion docs/ROADMAP_WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Notes on the table:
- A plan that an agent or a person writes is part of the one pull request that closes the issue. It has no separate gate G1. G1 exists for a plan that the Service stages.
- A person can do every step of an agent or of the Service. A person's claim beats the Service's claim.
- The command `devops roadmap explain <number>` says why the stage job and the implement job take an Item or leave it out. It names the first rule that fails for each job. It calls no model and writes nothing. The option `--why` on `devops roadmap stage` and `devops roadmap implement` lists the open Items that the filter does not name.
- The command `devops roadmap inbox` lists what waits for a person, in the order of the gates. First the ready plan pull requests of the jobs (G1), the ready implementation pull requests of the jobs (G2) and the release pull request (G3). Then the Items in `status/blocked` with their cause, the claims with no activity for 7 days, and the labels of `.github/labels.yml` that the repository lacks. Each line has the number, the age and the one command or action that clears it. The pull requests of people and agents are in a second list. The command reads GitHub only and writes nothing. It does not list an image digest that is not rolled: `devops argo cd apps status devops` reads it.
- The command `devops roadmap return <number> --comment "<evidence>" --confirm` sends an Item back to `status/new` when it cannot be built as written.

## The transitions
Expand Down Expand Up @@ -160,8 +161,8 @@ Tracker [#2908](https://github.com/dan-petty/devops-cli/issues/2908) holds the w
| :--- | :--- | :--- |
| #2912 | Stop and retry | A stop sets `status/blocked` and not `status/ready`. A new runner image clears a stop once |
| #2913 | The manual path | `devops roadmap implement` outside the runner makes the runner Job, and `--repo` is needed once |
| #2915 | All | A command lists what waits for a person |
| #2916 | 6 Verify | One function decides when any draft pull request is ready |
| #2867 | 6 Verify | A model evaluator marks a draft ready when it matches its issue and the project rules |
| #2917 | 8 Release and learn | A release comments its version and its deploy time on each issue it carries |
| #2919 | All | Metrics show the age of stuck Items, and one alert fires |
| #2968 | All | The counts of `devops roadmap inbox` are gauges with a Grafana panel, and the inbox lists an image digest that is not rolled |
17 changes: 17 additions & 0 deletions docs/commands/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,23 @@ devops roadmap explain [OPTIONS] <item>

---

## `devops roadmap inbox`

**List what waits for a person, each line with its number, its age and the one command or action that clears it. The order is: ready plan pull requests of the jobs (G1), ready implementation pull requests of the jobs (G2), the open release pull request (G3), items in status/blocked with their cause, claims with no activity for 7 days, and labels of .github/labels.yml that the repository lacks. A second list holds the other open pull requests, those of people and agents, with drafts marked. The age is the time since the last update. A draft of a job and a pull request that a runner Job holds are not listed. The command reads the open issues, the open pull requests, the labels and the labels file, and the newest commit of that file when the labels differ. A run sends 5 requests, or 6 when the labels differ, and one more for each 100 open issues and pull requests. It calls no model and writes nothing. It leaves out an image digest that is not rolled yet: run devops argo cd apps status devops.**

```bash
devops roadmap inbox [OPTIONS]
```

**Options:**

| Option / Flag | Type | Default | Description |
|---|---|---|---|
| `--repo`, `-R` | `string` | - | Repository as owner/name (default: this checkout's origin). |
| `--dry-run` | `boolean` | - | Make no request: print the reads that a run makes, in order, with placeholders. |

---

## `devops roadmap return`

**Return an item to New with an evidence comment, handing it back to refinement when it cannot be built as specified or needs a refactor beyond its scope. The item gets the label status/new in place of its other status/* label.**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-10-31
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Design

## Decisions

- **One function reads the inbox, the command prints it.** `read_inbox(store, repo, now)` returns an `Inbox`: the lines of the jobs, in the order of the gates, and the lines of people and agents. The command renders it. W10 (#2919) can count the same lines for its metrics, so the counts and the list cannot differ.
- **The store reads, the inbox judges.** `open_items`, `open_pulls` and `repository_labels` are plain reads on `RoadmapStore`, kept by both adapters. The rules (which pull request is a job's, what an old claim is) live in `inbox.py` only. A test with the in-memory store shows every category.
- **Open issues, not every issue.** `open_items` reads `issues?state=open`. The store keeps the listing of every issue for its life, and that is about 30 pages. The inbox needs only open items: blocked items and claims on open issues, and the records of open items for the pull request numbers. A closed item holds no `status/*` and no `owner/*` label, because `clear-status.yml` removes them.
- **A job pull request is named by a record.** `implement.pr` wins over `stage.pr`, because a staged branch keeps one pull request through both jobs. The record is exact; the title or the branch name is not. A pull request of an item that a Job holds (`implement.job` and no `implement.job_state`) is not listed: the Job pushes to it.
- **A draft is not "waiting".** The jobs' sections list only pull requests that are not drafts. The people section lists every pull request that no record names, a draft too, with the step that moves it on. This answers the case of 2026-10-31: a person sees at once which pull request is finished.
- **The age is the time since the last update.** For a pull request or an issue it is `updated_at`. GitHub gives no "ready since" time without one more request for each pull request. The heading says what the age means.
- **The activity of a claim.** It is the newest `updated_at` of the issue and of each open pull request whose head branch names the issue. The claim label write itself moves the issue, so a new claim is never old. A claim is old after `CONST_ROADMAP_INBOX_CLAIM_DAYS` days. The clearing step is `devops roadmap release <n> --repo <repo> --confirm`. No job releases a claim, and the inbox only shows it.
- **The cause of a block.** It is `implement.stopped` (the step that stopped the item), else `refine.blocked_by`, else the text "no cause recorded". The step for a stopped item is the retry comment; the step for the others is to read the issue and to set the status by hand.
- **Labels.** The declared labels come from `.github/labels.yml` on the default branch, parsed by the spec type that `devops gh labels sync` uses. `diff_labels` names the labels to create or update. One line lists them. The age is the time since the file last changed on the default branch, which is a lower bound on how long the repository is behind.
- **The digest is left out.** See the proposal. The help text of the command says so.
- **The dry run lists the reads.** `inbox_requests` is built by `StoreRequests`, the same builders the store runs, so the plan cannot drift. The labels read of the second file is a condition.
- **No cap on lines.** The list is as long as the work that waits. A cap would hide work.

## Rejected alternatives

- **Read every issue with `items()`.** About 30 requests for each run, against 2. The Service budget is 500 requests an hour. Rejected on cost.
- **Find a job pull request by its title or branch.** A job and a person use the same forms. A record is exact and already exists. Rejected: a guess would put a person's pull request in the jobs' list.
- **Ask GraphQL for pull requests with their ready time and checks.** One query would give more, but the project keeps GraphQL for the places that need it, and the quota can run out while REST has room. REST with 3 reads is enough.
- **A commit read for each claim.** One more request for each claim and a branch listing. The pull request update time covers the case, since the workflow opens a draft with the first push. Left as a later step if the list shows a false claim.
- **Read the cluster for the digest.** A cluster call from a command that the Service may run, with no GitHub request budget. Rejected: `devops argo cd apps status` is the tool.
- **A Grafana panel now.** It needs the counts as gauges, and issue #2968 owns them. A panel on a second data path would be rebuilt.
- **An open tool.** No open tool knows the records of the jobs.
Loading
Loading