Repository navigation
Description
Problem or Motivation
src/devops_cli/roadmap/implement/implement_scoped_ci.py:131-141always buildsuv run devops ci --check --only constructs,docs,openspec(src/devops_cli/config/constants.py:3446).- In a clone with no
sgconfig.yml,constructsfails ("No ast-grep project configuration is found"). - With no
openspec/config.yaml,openspec checkexits 1 (src/devops_cli/openspec/gate.py:167-169,src/devops_cli/commands/openspec.py:34-36). uv run devopswith the clone as working directory syncs the environment of a target that has apyproject.toml(vibes).- The tests check runs
uv run devops ci test(pytest). src/devops_cli/roadmap/implement/implement_step.py:1231-1275addsruff format,ruff checkandmypy --strictfor every Python repository.- fix(zsh): Move PATH before starship check and dedupe entries dotfiles#3 stopped at
staticon 2026-11-04 23:36Z, after fix(roadmap): run a project step only where the repo has it #3534. - Only 2 booleans (
[implement.steps]docs and archive) come from the target.
Owner decision 5 (2026-11-11): implement runs in all 7 repositories. So the check set must come from the toolchain of each repository.
Proposed Solution & Architectural Design
- Move
implement_steps.pytosrc/devops_cli/roadmap/project_profile.py. Addresolve_profile(source, ref) -> ProjectProfile, a frozen pydantic value, with the trusted read atorigin/<default>(the trust rule of fix(roadmap): a job runs a project step only where the repo has it #3484). - Add
src/devops_cli/roadmap/toolchains.pywith the frozen-dataclass presetsdevops-cliandneutral. A preset holds: the shell programs, the local commands, the refusals, the static check, the test command with{tests}, the test selection, the verify prefixes, the docs step, the docs verification, the archive argv, the step gates, the review bullet and the self-hosting prompt flag. .devops/roadmap.tomlgets[project] toolchain = "neutral" | "devops-cli"(defaultneutral). Remove[implement.steps]with no shim.scoped_checksreadsstatic_checkandtest_commandfrom the preset. Withneutralthere are none: only the pre-push hooks of the target run, then the pull request CI that the job already watches and repairs (implement_run.py:1640-1670).- The docs step runs when the preset has
docs_step. The archive step runs whenuses_openspec(fix(roadmap): stage holds an item where openspec is not set up #4629) is true, with thearchive_argvof the preset (neutral:openspec archive <change> --yes). - The ruff and mypy step gates run only with
step_gates = ruff-mypy. - devops-cli declares
toolchain = "devops-cli". - A later child of the tracker adds the presets for the other languages (owner decision 5).
Target Subsystem
SDLC, Git & PR Governance (src/devops_cli/roadmap/implement/).
Existing Tool Considered
pre-commit is the tool that runs the checks of each target (its pre-push hooks), and the target's own CI checks the pull request. The preset only selects which of these the job runs. No tool maps a repository to a check set, so the preset is typed data. Cost: about 150 lines and 6 tests, about 500,000 tokens and 5 hours to build, about 10,000 tokens a month to keep.
Acceptance Criteria
- A test: for devops-cli,
scoped_checks, the docs step, the archive argv and the step gates are byte-equal to today. - A test: for a repository with no
.devops/roadmap.toml,scoped_checksholds only the pre-push check (or none when there are no hooks), and no argv namesuvordevops ci. - A test: an unknown preset name raises
ConfigurationErrorthat names the file. -
git grep -n 'implement.steps' src docsgives 0. - A live implement run on a dotfiles item ends without a
staticfailure (test(roadmap): verify a dotfiles item makes a draft PR in a live run #3511).
Dependencies
#4629 (the uses_openspec helper). Related: #3484 and #3511.
Source: #4627
Proposed design
Problem statement
The implement job runs one fixed check set in every repository. A clone with no sgconfig.yml fails constructs, and a clone with no openspec/config.yaml fails openspec. Implement now runs in all 7 repositories, so each target must supply its check set from its toolchain preset.
Acceptance criteria
Requirement: toolchain-preset-read
The implement job SHALL take the toolchain preset from [project] toolchain in .devops/roadmap.toml, read at origin/<default>.
Scenario: The file names a preset
- WHEN the trusted read of
.devops/roadmap.tomlholdstoolchain = "devops-cli" - THEN
resolve_profilereturns thedevops-clipreset.
Requirement: default-preset-neutral
A repository with no .devops/roadmap.toml MUST get the neutral preset.
Scenario: No profile file
- WHEN the trusted read finds no
.devops/roadmap.toml - THEN the resolved profile names
neutral, and its scoped checks hold no argv that namesuvordevops ci.
Requirement: devops-cli-parity
The devops-cli preset MUST give the scoped checks, the docs step, the archive argv and the step gates that this repository has today.
Scenario: This repository's preset
- WHEN the profile resolves to
devops-cli - THEN the scoped checks, docs step, archive argv and step gates equal the values of today.
Requirement: neutral-scoped-checks
A neutral profile MUST run only the pre-push hook check, with no static check and no test command.
Scenario: A neutral repository with hooks
- WHEN the profile is
neutraland the target declares pre-push hooks - THEN
scoped_checksholds the pre-push hook check and no other check.
Requirement: unknown-preset-refused
A toolchain name that no preset holds MUST raise ConfigurationError that names the file.
Scenario: An unknown preset name
- WHEN
.devops/roadmap.tomlholdstoolchain = "cargo" - THEN
resolve_profileraisesConfigurationErrorwhose message holds.devops/roadmap.toml.
Requirement: docs-step-gated
The docs step SHALL run only when the preset declares a docs step.
Scenario: A neutral profile
- WHEN the profile is
neutral - THEN the job runs no docs step.
Requirement: archive-step-gated
The archive step MUST run only when uses_openspec is true, with the archive_argv of the preset.
Scenario: A neutral repository that uses OpenSpec
- WHEN the profile is
neutralanduses_openspecis true - THEN the archive step runs
openspec archive <change> --yes.
Requirement: step-gates-gated
The ruff format, ruff check and mypy step gates MUST run only when the preset sets step_gates = ruff-mypy.
Scenario: A neutral profile with a changed Python file
- WHEN the profile is
neutraland a step changes a Python file - THEN the step runs no
ruffcommand and nomypycommand.
Requirement: implement-steps-removed
The [implement.steps] key MUST be gone from the code and the documents, with no shim.
Scenario: A search for the key
- WHEN
git grep -n 'implement.steps' src docsruns - THEN it finds no line.
Requirement: devops-cli-declares-preset
This repository's .devops/roadmap.toml MUST declare toolchain = "devops-cli".
Scenario: This repository's profile file
- WHEN the test reads
.devops/roadmap.toml - THEN
[project] toolchainisdevops-cli, and[implement.steps]is absent.
Existing Tool Considered
No alternatives check has run. pre-commit runs the checks of each target through its pre-push hooks, and the target's own CI checks the pull request. No open, maintained tool maps a repository to a check set, so the preset is typed data. Cost to build and keep it: about 150 lines and 6 tests, about 500,000 tokens and 5 hours to build, and about 10,000 tokens a month to keep.
Key questions
- Where do the toolchain presets live, and what type holds each one?: In
src/devops_cli/roadmap/toolchains.py, as two frozen dataclass values,devops-cliandneutral. (best practice) [sources: src/devops_cli/roadmap/implement/implement_scoped_ci.py, src/devops_cli/roadmap/implement/implement_step.py, .devops/roadmap.toml]- Chosen: A frozen dataclass module
roadmap/toolchains.py. The presets are typed data with no parse cost, and each caller uses one import. - Rejected: Grow
implement_steps.py. That file holds two booleans, and the presets add twelve fields. - Rejected: A TOML file for each preset. A parsed file adds a read and a schema to keep.
- Chosen: A frozen dataclass module
- What type holds the resolved profile?: A frozen pydantic value
ProjectProfile, insrc/devops_cli/roadmap/project_profile.py. (best practice) [sources: pyproject.toml, src/devops_cli/config/settings.py]- Chosen: A frozen pydantic value. It validates the parsed file, and the repository already validates settings with pydantic.
- Rejected: A frozen dataclass. It validates nothing, so a wrong type reaches the job.
- Which preset does a repository get when it declares none?:
neutral. It runs the target's own checks and no check of devops-cli. (best practice) [sources: src/devops_cli/openspec/gate.py, src/devops_cli/commands/openspec.py, sgconfig.yml, openspec/config.yaml]- Chosen:
neutral. A clone with nosgconfig.ymloropenspec/config.yamlfails the devops-cli rows. - Rejected:
devops-cli.openspec checkexits 1 whenopenspec/config.yamlis absent, andconstructsfails whensgconfig.ymlis absent.
- Chosen:
- Where does the job read
.devops/roadmap.toml?: Atorigin/<default>, the trusted read of fix(roadmap): a job runs a project step only where the repo has it #3484. It never reads the working tree of the step. (best practice) [sources: .devops/roadmap.toml, docs/ROADMAP_WORKFLOW.md]- Chosen: The read at
origin/<default>. The file already comes from the default branch, so a step cannot change the checks that judge it. - Rejected: The working tree. A step that edits the file would set its own check set.
- Chosen: The read at
- Do we keep
[implement.steps]with a shim?: No. The key goes, and no code reads it. A file that still holds it gets no step from it. (best practice) [sources: .devops/roadmap.toml, docs/ROADMAP_WORKFLOW.md]- Chosen: Remove the key with no shim. The project is pre-1.0 and writes no transition, shim or legacy mode.
- Rejected: Keep the key as a shim. It keeps two sources for one check set.
- Which checks run for a
neutralrepository?: The target's pre-push hooks, then the pull request CI that the job already watches and repairs. (best practice) [sources: docs/adr/0004-ci-is-the-authoritative-gate.md, .pre-commit-config.yaml, docs/ROADMAP_WORKFLOW.md]- Chosen: The pre-push hooks and the pull request CI. ADR 0004 makes CI the authoritative gate, and the hook is the fast local check.
- Rejected: Run
uv run devops ciin every target. A target with nosgconfig.ymlfails theconstructsrow. - Rejected: Guess a test command from the lockfile of the target. The guess adds code that must be kept, and the target CI already runs the tests.
- Which commands does the
devops-clistatic check run?:uv run devops ci --check --only constructs,docs,openspec, fromCONST_ROADMAP_IMPLEMENT_SCOPED_ROWS. [sources: src/devops_cli/roadmap/implement/implement_scoped_ci.py, src/devops_cli/config/constants.py] - Where do
ruff format,ruff checkandmypy --strictrun?: In the step gates, and only when the preset setsstep_gates = ruff-mypy. Theneutralpreset sets none. (best practice) [sources: src/devops_cli/roadmap/implement/implement_step.py, pyproject.toml]- Chosen: A preset flag
step_gates = ruff-mypy. The gate runs where the tools and their configuration exist. - Rejected: Run them for every Python repository. A repository that does not pin the tools fails the gate on the first step.
- Chosen: A preset flag
- What does the archive step run for a
neutralrepository?:openspec archive <change> --yes, and only whenuses_openspecis true. (best practice) [sources: src/devops_cli/commands/openspec.py, openspec/config.yaml]- Chosen: The
archive_argvof the preset. The argv comes from the toolchain that the target uses, so no command of devops-cli runs. - Rejected: The fixed devops-cli argv.
uv run devops openspec archivesyncs the environment of the target.
- Chosen: The
- What does an unknown toolchain name do?: It raises
ConfigurationErrorthat names the file. (best practice) [sources: docs/ERRORS.md]- Chosen: Fail closed with
ConfigurationError. A typo names its file, so a person corrects it. - Rejected: Fall back to
neutral. A typo would silently drop every check of the target.
- Chosen: Fail closed with
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.Owner decision 5 requires implement to run in all 7 repositories, and this preset is the mechanism that makes that possible.It unblocks implementation in every target repository by replacing a hard-coded check set with per-repository presets.The body estimates about 150 lines, 6 tests and 5 hours of build time.Both make the implement job adapt to the target repository, but #3484 added a condition for one step while the candidate builds a full preset that selects every check, step gate and archive argv.devops-cli-service commentedon Nov 11, 2026
Refine cannot set this item to Ready at 818ac6f while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 11, 2026
Status set to Ready at fbe8984 (see proposed design in issue body).
Moved to new items: #4785.
dan-petty commentedon Nov 11, 2026
Scope from the issue stewards plan (2026-11-11)
The issue stewards plan #4780 (child 29) folds this scope into #4635.
Problem. dotfiles #2 holds 73 repeat comments from a documentation check (
docs generate --sync-readme) that does not apply to dotfiles (2026-11-01 to 2026-11-04). The owner rule of 2026-10-20 says that a check that does not apply does not run there.Added scope. The documentation check is part of the toolchain preset. A repository with no generated documents runs no documentation check. Add dotfiles #2 as a regression case.
Added acceptance criterion. A replay of dotfiles #2 runs no documentation check, and posts no "Stopped at docs" or "Cleared the stop at docs" comment.
This item stays a sub-issue of #4627.
feat(roadmap): a toolchain preset sets the implement checks
devops-cli-service commentedon Nov 14, 2026
Released in v0.145.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.145.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-14 23:53 UTC