Skip to content

feat(roadmap): run the two-engine stage trial #7958

Backlog

Description

@devops-cli-service

Split from #7269.

Problem: The two-engine trial cannot start a live attempt. The Service starts the stage Job with no --phase, so run_stage_agent does not run. The phase containers come with #6814, which is open. The devtools image also lacks the Kilo CLI until dan-petty/devtools#98. Why deferred: The trial needs both #6814 and dan-petty/devtools#98. The adapter, the setting, the result field and the grade rows can be built and tested offline first. Acceptance criteria: Each engine has 30 or more graded attempts, and the report states the infrastructure share apart. uv run devops roadmap eval grades shows one row for each engine with its grade, success ratio, plans that build, first passes, tokens per success and seconds per success. The decision rule applies: replace Coder when Kilo reaches 0.80 or more, or 15 points over Coder with no more tokens for each success. Else delete the Kilo engine. #6519 records the decision and the two grade rows.

Proposed design

Problem statement

The stage job runs one coding engine. The project needs a measured comparison of a second engine, Kilo, on the same stage work. The Service starts the stage Job with no --phase, so run_stage_agent does not run and no live attempt can start. The phase containers come with #6814. The devtools image lacks the Kilo CLI until dan-petty/devtools#98. This issue builds the offline parts. They are the engine setting, the Kilo adapter, the engine field of the result line, and one grade row for each engine.

Acceptance criteria

Requirement: Stage engine setting

The roadmap configuration SHALL name the coding engine of the stage agent phase, and SHALL use coder when it names no engine.

Scenario: No engine key

  • WHEN The roadmap configuration sets no stage engine key.
  • THEN the stage agent phase runs the coder engine.

Requirement: Kilo adapter

The stage agent phase SHALL run the kilo engine through an adapter that starts the Kilo CLI with the phase prompt and the folder list.

Scenario: Engine set to kilo

  • WHEN The roadmap configuration sets the stage engine to kilo and the stage agent phase runs with a fake Kilo CLI on PATH.
  • THEN the adapter starts the fake CLI with the phase prompt and the folder list, and the phase result holds the text that the fake CLI prints.

Requirement: Unknown engine

The stage agent phase MUST stop with a typed error when the configuration names an engine that the code does not know.

Scenario: Unknown engine name

  • WHEN The roadmap configuration sets the stage engine to gemini.
  • THEN the stage agent phase stops with a typed error that names gemini, and it starts no CLI.

Requirement: Engine in the result line

The result line of each stage agent phase SHALL hold the name of the coding engine that ran it.

Scenario: Result line field

  • WHEN The stage agent phase ends for an attempt.
  • THEN the result line holds the key engine with the engine name.

Requirement: One grade row for each engine

devops roadmap eval grades SHALL show one row for each engine that has attempts in the window.

Scenario: Two engines

  • WHEN The attempt records hold coder attempts and kilo attempts.
  • THEN uv run devops roadmap eval grades shows a coder row and a kilo row, each with its grade, success ratio, plans that build, first passes, tokens for each success and seconds for each success.

Requirement: Too few attempts

devops roadmap eval grades SHALL show too few as the grade of an engine with fewer than 30 attempts.

Scenario: 29 attempts

  • WHEN The attempt records hold 29 kilo attempts and 40 coder attempts.
  • THEN uv run devops roadmap eval grades shows too few in the grade column of the kilo row and a grade in the grade column of the coder row.

Requirement: Infrastructure share

devops roadmap eval grades SHALL show the share of attempts that an infrastructure cut removed, in a column apart from the success ratio.

Scenario: Two cuts in ten attempts

  • WHEN The attempt records hold 10 kilo attempts and 2 of them have an infrastructure cut.
  • THEN uv run devops roadmap eval grades shows 2/10 in the infrastructure column of the kilo row.

Existing Tool Considered

No alternatives check has run on this issue. The need is a second coding engine for the stage agent phase. The open tool is the Kilo CLI, which dan-petty/devtools#98 adds to the devtools image. The Kilo CLI lacks the phase contract: it does not read the phase prompt and the folder list of run_stage_agent, write the result line, or name the engine. The project builds one adapter module for that gap. The cost is about 150 lines and one test file: about 40,000 tokens to build, about 10,000 tokens for each later fix, and about 1 day.

Key questions

  • Which engine does the stage agent phase run today?: run_stage_agent runs one model call and writes the result of the phase. No engine setting exists. The stage job calls it at src/devops_cli/commands/roadmap_jobs.py:632. [sources: src/devops_cli/roadmap/stage/stage_job_phases.py:714, src/devops_cli/commands/roadmap_jobs.py:632, openspec/specs/stage-agent-phase/spec.md, tests/roadmap/stage/test_roadmap_stage_agent_phase.py]
  • Where does the engine setting live?: In the roadmap configuration, with coder as the default. (best practice) [sources: CONTEXT.md, docs/ROADMAP_WORKFLOW.md]
    • Chosen: Roadmap configuration key. The Service and the CLI read one configuration. The default keeps each current job on coder.
    • Rejected: Issue label. Labels hold Status, Priority, Value, Effort and Owner only (CONTEXT.md).
    • Rejected: Flag on the stage Job. The Service starts the stage Job with no --phase until refactor(k8s): run the stage Job as three containers #6814, so it would pass no flag.
  • How does the result line name the engine?: The result line holds a new key engine with the engine name. (best practice) [sources: CONTEXT.md, docs/roadmap/job-success.md]
    • Chosen: New engine key. The grade rows group on one field, and the field stays with the attempt.
    • Rejected: Model name. Two engines can run the same model, so the name is ambiguous.
    • Rejected: Loki stream label. A stream label changes the query of each reader, and the result line already holds the facts.
  • How does devops roadmap eval grades show each engine?: One table, with one row for each engine. (best practice) [sources: docs/CLI_REFERENCE.md, CONTEXT.md]
    • Chosen: One row for each engine. The comparison of the two engines needs both rows at one look.
    • Rejected: One table for each engine. It repeats the columns and hides the comparison.
    • Rejected: A flag for each engine. The operator must run the command two times.
  • How does the grades output state the infrastructure share apart?: In its own column of each engine row. (best practice) [sources: CONTEXT.md, docs/roadmap/job-success.md]
    • Chosen: Own column. The grade already removes the cuts. The column keeps the share that the grade hides.
    • Rejected: Footnote line. A footnote gives no value for each engine.
  • Where does the Kilo adapter live?: In a new module src/devops_cli/roadmap/stage/stage_engine_kilo.py. (best practice) [sources: src/devops_cli/roadmap/stage/stage_job_phases.py:714, tests/roadmap/stage/test_roadmap_stage_agent_phase.py]
    • Chosen: New module next to the phase. The phase file holds the phase logic. One adapter stays small and testable.
    • Rejected: Inside stage_job_phases.py. The file is large already and mixes the phase with the engine.
    • Rejected: New package engines/. One adapter does not need a package.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 30, 2026
  2. devops-cli-service commented on Nov 30, 2026

    @devops-cli-service
    ContributorAuthor
  3. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    ContributorAuthor

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

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/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions