Skip to content

refactor(roadmap): check job work with repository hooks only #8040

In progress

Description

@dan-petty

Problem

The implement and fix jobs add devops-cli checks between the agent and the repository: toolchain presets, verification commands of the plan, ruff and mypy step gates, a test form check, a fail-to-pass replay, scoped devops ci checks, a test-strength check and devops docs generate. In other repositories these stop items that a person can build.

Evidence

Owner decisions (2026-12-01)

  • A job gives the agent a prompt in a working directory with an up-to-date issue branch and pre-commit installed.
  • After the agent finishes, the pre-commit hooks of the repository run in the Job. The pull request CI of the repository is the authority.
  • A repository with no Makefile, or without the standard make targets, gets a warning and the run continues.

Acceptance criteria

  • The only checks of the Job on the work of the agent are the pre-commit hooks of the repository. A repository with no hook configuration gets a warning.
  • The Job runs no verification command of a plan and no devops command in the target repository.
  • The prompt names no devops-cli command, path or module.
  • The prompt tells the agent to read the documents of the repository (such as AGENTS.md, README.md and CONTRIBUTING.md) and to run the setup commands that they name before it starts the work.
  • A repository with no Makefile, or without the targets install, lint, test and build, gets a warning. The Job does not fail for that reason.
  • The implement job takes each change that openspec validate accepts, the stricter plans of today included. It needs no numbered groups and no Reads:, Changes: or Verification: lines.
  • One agent run implements the change. The fix-checks job uses the same runner with a prompt that names the failed check and the end of its log.
  • The agent container installs the git hooks with pre-commit install. No process that holds a GitHub credential runs a hook of the checkout. The refusals of the publish step stay.
  • The change deletes the step loop, the plan amendments, the group split, the command allowlist of the implement job and devops roadmap eval implement and eval harbor, with their tests and specs.
  • The change deletes the toolchain presets, [project] toolchain of .devops/roadmap.toml, the step gates, the scoped checks and the test-strength check, with their settings, tests and specs.

Order

This item comes first. #8039 changes the stage job after it. The owner (2026-12-01): the more custom code and brittle tests the change removes, the better. So one pull request replaces the machinery and does not trim it in two steps.

Alternatives check of 2026-12-01: not-applicable.
Class: refactor, no model call.
Tool: none found.

Proposed design

Problem statement

The implement and fix jobs add devops-cli checks between the agent and the repository. These checks include toolchain presets, plan verification commands, step gates, scoped checks and a test-strength check. They stop items that a person can build, as the stop of #8021 shows. This change removes the devops-cli checks and runs only the pre-commit hooks of the target repository. The pull request CI of the repository is the authority. A repository without the standard Makefile targets gets a warning and the run continues.

Acceptance criteria

Requirement: Repository hooks only

The implement and fix jobs SHALL run only the pre-commit hooks of the target repository after the agent finishes.

Scenario: Repository with hook configuration

  • WHEN A test runs the hook step of the implement job for a repository that has a .pre-commit-config.yaml.
  • THEN The recorded subprocess argv holds one pre-commit run command over the changed files and holds no devops-cli check.

Requirement: Missing hook configuration warning

The Job SHALL log one warning and continue when the target repository has no pre-commit hook configuration.

Scenario: Repository with no hook configuration

  • WHEN A test runs the hook step for a repository with no .pre-commit-config.yaml.
  • THEN The step logs one warning that names the missing file and returns success.

Requirement: No plan verification command

The Job SHALL run no verification command of a plan and no devops command in the target repository.

Scenario: Plan with verification lines

  • WHEN A test runs the implement job for a change whose tasks hold Verification: lines that name a devops command.
  • THEN The job runs no command from those lines and its recorded argv holds no devops command.

Requirement: Prompt names no devops-cli symbol

The prompt of the implement and fix jobs SHALL name no devops-cli command, path or module.

Scenario: Rendered prompt

  • WHEN A test renders the prompt for a target repository.
  • THEN The prompt text holds no devops command, no src/devops_cli path and no devops-cli module name.

Requirement: Prompt reads repository documents

The prompt SHALL tell the agent to read the repository documents and to run their setup commands before it starts the work.

Scenario: Repository documents with setup commands

  • WHEN A test renders the prompt for a repository that holds AGENTS.md, README.md and CONTRIBUTING.md.
  • THEN The prompt names those documents and tells the agent to run their setup commands first.

Requirement: Missing Makefile target warning

The Job SHALL log one warning for each missing standard make target and SHALL NOT fail for it.

Scenario: No Makefile or missing targets

  • WHEN A test runs the setup check for a repository with no Makefile and for a repository whose Makefile has no install, lint, test or build target.
  • THEN The check logs one warning for each missing target and returns success.

Requirement: OpenSpec validate accepts the change

The implement job SHALL take each change that openspec validate accepts, with no numbered groups and no plan lines.

Scenario: Accepted change with no plan lines

  • WHEN A test runs the plan acceptance check for a change that openspec validate accepts and that holds no numbered groups and no Reads:, Changes: or Verification: lines.
  • THEN The check accepts the change, the job calls openspec validate and it calls no reader of numbered groups or plan lines.

Requirement: One agent run and one fix-checks runner

One agent run SHALL implement the change, and the fix-checks job SHALL use the same runner with a prompt that names the failed check and the end of its log.

Scenario: Fix-checks prompt

  • WHEN A test builds the fix-checks prompt for a failed check that has a log.
  • THEN The prompt names the failed check and the last lines of the log, and the job calls the implement runner.

Requirement: Hook credential boundary

The agent container SHALL install the git hooks with pre-commit install, and no process that holds a GitHub credential SHALL run a hook of the checkout.

Scenario: Environment of the hook process

  • WHEN A test builds the environment of the hook step for a job that holds a GitHub credential.
  • THEN The environment holds no GitHub credential key and the publish step still refuses a hook run.

Requirement: Hook stage

The Job SHALL run the pre-commit stage of the repository hooks and SHALL NOT run the pre-push stage.

Scenario: Hook command arguments

  • WHEN A test builds the hook command for a target repository.
  • THEN The argv holds pre-commit run --hook-stage pre-commit and holds no --hook-stage pre-push argument.

Requirement: Delete the step loop and the eval commands

The change SHALL delete the step loop, the plan amendments, the group split, the command allowlist of the implement job and the devops roadmap eval implement and eval harbor commands.

Scenario: Removed eval commands

  • WHEN A test builds the devops roadmap eval command group.
  • THEN The group holds no implement and no harbor command and the test suite holds no case for them.

Requirement: Delete the toolchain machinery

The change SHALL delete the toolchain presets, the toolchain setting, the step gates, the scoped checks and the test-strength check, with their settings, tests and specs.

Scenario: Removed toolchain module and setting

  • WHEN A test looks for the module devops_cli.roadmap.toolchains and builds the roadmap settings model.
  • THEN The module is absent, the settings model holds no toolchain field and no source file uses a toolchain preset.

Existing Tool Considered

The alternatives check of 2026-12-01 in the issue body gives the verdict not-applicable (class refactor, no model call) and names no tool. pre-commit (pyproject.toml:129, .pre-commit-config.yaml) is the open, maintained tool that runs the repository hooks. The Job calls pre-commit and builds no hook runner of its own. pre-commit lacks a Makefile target check and a warning-only path for a missing hook configuration, so the Job adds one warning for each and does not fail. The change writes no replacement for pre-commit, so it has no build cost.

Key questions

  • Which modules hold the toolchain presets and the scoped checks now?: src/devops_cli/roadmap/toolchains.py holds the presets, including DEVOPS_CLI_PRESET. src/devops_cli/roadmap/implement/implement_scoped_ci.py and src/devops_cli/roadmap/implement/implement_step.py use DEVOPS_CLI_PRESET. [sources: src/devops_cli/roadmap/toolchains.py, src/devops_cli/roadmap/implement/implement_scoped_ci.py, src/devops_cli/roadmap/implement/implement_step.py]
  • What does the job give the agent before it starts?: The job gives the agent a prompt in a working directory that holds an up-to-date issue branch and an installed pre-commit. The owner decision of 2026-12-01 sets this start state. (best practice) [sources: CONTEXT.md]
    • Chosen: Prompt, up-to-date issue branch and installed pre-commit. The owner decision sets this start state, and the agent needs the installed hooks to run them.
    • Rejected: Prompt only. It leaves the branch and the hook state unset.
  • Which checks run on the work of the agent after it finishes?: After the agent finishes, the pre-commit hooks of the repository run in the Job. The pull request CI of the repository is the authority. The Job runs no devops-cli check and no verification command of a plan. (owner decision) [sources: docs/adr/0043-required-checks-and-main-ruleset-gate-merges.md]
    • Chosen: Repository pre-commit hooks only. The owner decision removes the devops-cli checks and uses the standard of the repository.
    • Rejected: Keep the devops-cli scoped checks. They stop items that a person can build, as the stop of fix(roadmap): plans name ci rows that only devops-cli can run #8021 shows.
    • Rejected: Run the pull request CI inside the Job. The pull request CI is the authority and it runs after the push.
  • What does the job do when the target repository has no Makefile or lacks the standard targets?: A repository with no Makefile, or without the standard make targets, gets a warning and the run continues. The Job does not fail for a missing Makefile or a missing install, lint, test or build target. (owner decision)
    • Chosen: Warn and continue. The owner decision keeps the run moving for a repository without the standard targets.
    • Rejected: Fail the run. It stops an item that the pull request CI can still validate.
  • Which open tool runs the repository hooks?: pre-commit runs the repository hooks. The Job calls pre-commit and builds no hook runner of its own. (best practice) [sources: .pre-commit-config.yaml, CONTRIBUTING.md]
    • Chosen: pre-commit. It is the open, maintained hook runner that the repository already uses.
    • Rejected: A devops-cli hook runner. It is the code that this change deletes.
  • Which files do the repository hooks check?: The Job runs the pre-commit stage on the files that differ between the default branch and HEAD, with --from-ref <default branch> --to-ref HEAD. (best practice) [sources: src/devops_cli/roadmap/implement/implement_scoped_ci.py]
    • Chosen: Changed files only. The agent work is the changed files, and the pull request CI stays the authority for the full tree.
    • Rejected: All files. It can run unrelated existing failures and takes longer on a large repository.
    • Rejected: Staged files only. It misses a file that the agent changed and did not stage.
  • What does the implement job accept from a staged change?: It accepts each change that openspec validate accepts. It needs no numbered groups and no Reads:, Changes: or Verification: lines. (best practice) [sources: openspec/config.yaml]
    • Chosen: OpenSpec validate only. The owner decision removes the stricter plan format and the group split.
    • Rejected: Keep numbered groups and plan lines. They add the step loop and the plan amendments that this change deletes.
  • How many agent runs implement a change, and how does the fix-checks job work?: One agent run implements the change. The fix-checks job uses the same runner and a prompt that names the failed check and the end of its log. (best practice) [sources: CONTEXT.md]
    • Chosen: One run and one shared runner. It removes the step loop and keeps one repair path.
    • Rejected: One run for each task group. It keeps the step loop that this change deletes.
  • Which process may run a hook of the checkout?: The agent container installs the hooks with pre-commit install. No process that holds a GitHub credential runs a hook of the checkout. The publish step keeps its refusals. (best practice) [sources: CONTEXT.md, AGENTS.md]
    • Chosen: The agent runs the hooks without a GitHub credential. It keeps the credential out of the hook process and keeps the publish refusals.
    • Rejected: The publish step runs the hooks with its credential. It gives a hook of the checkout the GitHub credential.
  • What code and settings does the change delete?: It deletes the step loop, the plan amendments, the group split, the command allowlist, devops roadmap eval implement, eval harbor, the toolchain presets, the toolchain key of .devops/roadmap.toml, the step gates, the scoped checks and the test-strength check, with their settings, tests and specs. (best practice) [sources: src/devops_cli/roadmap/toolchains.py, src/devops_cli/roadmap/implement/implement_scoped_ci.py, src/devops_cli/roadmap/implement/implement_step.py]
    • Chosen: Delete the machinery in one pull request. The owner decision says one pull request replaces the machinery and does not trim it in two steps.
    • Rejected: Trim it in two pull requests. The owner decision rejects a two-step trim.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/refactor
    source/agent
    scope/roadmap
    on Dec 1, 2026
  2. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor
  3. added
    status/new
    value/medium
    effort/high
    priority/p2-medium
    owner/agent
    priority/p1-high
    and removed
    priority/p2-medium
    on Dec 1, 2026
  4. changed the title [-]refactor(roadmap): implement from a neutral prompt and hooks[/-] [+]refactor(roadmap): check job work with repository hooks only[/+] on Dec 1, 2026
  5. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    Evidence for the hook run in the Job, from the review of #7997 on 2026-12-01: the 40 s limit of the devops-ci-pre-push hook ended the run on a 1 CPU runner (exit 124), so the implement jobs of #7970 and #7920 published nothing for their fix step. Without a limit, the same command took 74 s and 113 s on 1 CPU. At 2 CPUs (#8005) the estimate is 48 to 75 s, which is not measured. When the hooks of the repository are the only checks of the Job, give them a time that the runner can meet. Evidence: #7997 (comment)

  6. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  7. added
    status/ready
    and removed
    status/new
    on Dec 1, 2026
  8. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  9. added
    status/in-progress
    and removed
    status/ready
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/highowner/agentpriority/p1-highscope/roadmapsource/agentstatus/in-progresstype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions