Skip to content

fix(roadmap): the stage writes the documents check of the target preset #7985

Not planned

Description

@dan-petty

Problem

The stage job writes the documents check of devops-cli into the plans of every target repository. The line stage_task_documents of src/devops_cli/lang/en/messages.py adds Verification: `$ uv run devops ci docs` passes to each documents task, and the example of an other group in src/devops_cli/ai/tasks/roadmap_stage_change.md names the same command. Neither reads the toolchain preset of the target. A neutral preset has no docs_verification.

Evidence

On 2026-12-01, dan-petty/homelab at commit 015abe4 held no .devops/roadmap.toml. The tasks.md of 11 of its 21 active changes named uv run devops ci docs, in 16 lines. The command exited 1 on the unchanged default branch. #7983 stops such an item before the first model request with the class plan_defect, so these plans cannot be implemented until a person edits them. #4643 asked for this rule among others and was closed as not planned, with a request to file a new item from evidence.

Expected

For a target whose preset declares no documents check, the plan holds no documents check: the writer adds none to a documents task, the form check refuses it as the verify of a group, and the mechanical rewrite of a plan adds none. A devops-cli plan does not change.

Acceptance criteria

  • A test: a documents task of a plan for a neutral repository has no uv run devops ci docs text.
  • A test: the form check refuses the command as a verify command for a neutral repository.
  • A test: the rendered plan for the devops-cli preset does not change.

Alternatives check of 2026-12-01: none.
Tool: none found.
Reason: Web searches found only general templating and spec-format tools. Copier and OpenSpec render or check their own files and read no per-repository toolchain preset, so none covers the documents verification line.

Lacks:

  • No preset-aware documents verification line in the stage writer
  • No check of a verify command against the target preset
  • No rewrite that removes an undeclared documents command
  • No handling of the wider amendment command rule

Proposed design

Problem statement

The stage job writes a documents verification command into every target repository's plan. It does not read the target toolchain preset. A neutral preset has no documents check, so its plans hold a command that fails. The fix makes the writer, the form check and the mechanical rewrite use the target preset's docs_verification value, or omit it.

Acceptance criteria

Requirement: Documents task uses the target preset

The stage writer MUST build the documents verification line from the target preset's docs_verification value.

Scenario: Neutral preset has no documents check

  • WHEN The target preset is neutral and its docs_verification is empty.
  • THEN The rendered documents task has no Verification: line and no uv run devops ci docs text.

Requirement: Documents task keeps the devops-cli command

The stage writer MUST keep the documents verification line of the devops-cli preset unchanged.

Scenario: Devops-cli preset keeps its documents check

  • WHEN The target preset is devops-cli and its docs_verification is uv run devops ci docs.
  • THEN The rendered documents task holds the text Verification: $ uv run devops ci docs passes.

Requirement: Form check refuses an undeclared documents command

The stage form check MUST refuse a documents verification command that the target preset does not declare.

Scenario: Neutral preset refuses the docs command

  • WHEN The target preset is neutral and a task group gives uv run devops ci docs as its verify command.
  • THEN The form check returns an invalid result for the verify command.

Requirement: Form check accepts the declared documents command

The stage form check MUST accept the documents verification command that the target preset declares.

Scenario: Devops-cli preset accepts its docs command

  • WHEN The target preset is devops-cli and a task group gives uv run devops ci docs as its verify command.
  • THEN The form check returns a valid result for the verify command.

Requirement: Stage prompt names no fixed documents command

The stage prompt MUST tell the planner to use the target preset's docs_verification value and to omit it when the preset has none.

Scenario: The other group example holds no fixed docs command

  • WHEN The stage prompt test reads the other group example in src/devops_cli/ai/tasks/roadmap_stage_change.md.
  • THEN The example holds no uv run devops ci docs text and names the docs_verification field.

Requirement: Rewrite removes an undeclared documents command

The mechanical rewrite of a plan MUST remove a documents verification line that the target preset does not declare.

Scenario: Neutral preset rewrite removes the docs line

  • WHEN A plan for a neutral repository holds a documents task with uv run devops ci docs.
  • THEN The rewritten plan has no uv run devops ci docs text.

Existing Tool Considered

The alternatives block in the issue body records verdict none and names no tool. The change uses the existing docs_verification field in src/devops_cli/roadmap/toolchains.py and builds no tool. Written cost: about 2 hours and under 10k tokens to edit stage_change.py, the form check, the prompt and the tests.

Key questions

  • Which message and caller write the documents verification line?: stage_task_documents at src/devops_cli/lang/en/messages.py:5911 writes the line. src/devops_cli/roadmap/stage/stage_change.py calls it. [sources: src/devops_cli/lang/en/messages.py:5911, src/devops_cli/roadmap/stage/stage_change.py]
  • Which field holds the target preset documents command?: The docs_verification field in src/devops_cli/roadmap/toolchains.py holds the command. The neutral preset has no value. [sources: src/devops_cli/roadmap/toolchains.py:63, src/devops_cli/roadmap/toolchains.py:79, src/devops_cli/roadmap/toolchains.py:106]
  • How should the writer, form check and rewrite find the documents command?: Read docs_verification from the target preset. If the value is empty, omit the line and refuse the command. (best practice) [sources: src/devops_cli/roadmap/toolchains.py:63, src/devops_cli/lang/en/messages.py:5911, src/devops_cli/roadmap/stage/stage_change.py]
    • Chosen: Reuse docs_verification. One preset field already holds the command and its absence.
    • Rejected: Hardcode a neutral exception. It adds a second rule for each preset and drifts from the toolchain.
    • Rejected: Leave the message unchanged. It keeps the failing command in every neutral plan.
  • Should the stage prompt example use the target preset field?: Yes. The prompt must use docs_verification and omit it when the preset has none. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, src/devops_cli/roadmap/toolchains.py:63]
    • Chosen: Use the preset field. The prompt then matches the writer and the form check.
    • Rejected: Keep the fixed example. The model copies the fixed command into neutral plans.
    • Rejected: Remove the example. The planner loses the shape of a documents verification line.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor
    • Priority: Blocks delivery of target-repository plans until a person edits them by hand.
  3. added
    status/new
    effort/medium
    value/high
    priority/p1-high
    on Dec 1, 2026
  4. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    One more place reads no toolchain preset: the amendment rule. _judge_command of src/devops_cli/roadmap/implement/implement_amend.py accepts a new command only when it starts with uv run devops, through is_valid_verify of the stage form check. In dan-petty/homelab#361 the job refused uv run --locked --script scripts/k8s-checks.py --help for that reason (2026-12-01T00:48:16Z). That command only prints a help text, so a wider rule needs its own care.

  5. 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.

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

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (7)

    Tools considered:

    Searches run:

    • template engine conditional render verification command per project preset config, results: 5
    • Copier project template conditional file content based on answers, results: 5
    • OpenSpec validate spec change proposal tasks.md format, results: 5
    • copier template copier.yml jinja conditional sections based on answers documentation, results: 5
    • Copier documentation project template generator python, results: 5
    • OpenSpec Fission-AI github spec driven development change proposals, results: 5
    • policy as code validate generated markdown command allowlist conftest rego, results: 5

    Sources:

  7. added
    owner/agent
    on Dec 1, 2026
  8. added
    status/ready
    and removed
    status/new
    on Dec 1, 2026
  9. 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.

  10. added
    status/in-progress
    and removed
    status/ready
    on Dec 1, 2026
  11. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    Superseded by the owner decisions of 2026-12-01: the Service jobs give the agent a project-neutral prompt, and the pre-commit hooks of the repository and its pull request CI are the only checks. The toolchain presets and the devops ci command are deleted. See #8040 (implement and fix jobs) and #8039 (stage job). The stop that this item reports ends with #8040, which runs no verification command of a plan.

  12. removed
    status/in-progress
    owner/agent
    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/mediumpriority/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions