Skip to content

docs(roadmap): the decision-point design for Jev workflows #4396

Closed

Description

@dan-petty

Problem or Motivation

The Service workflows use TypeSafe Jev (typesafe/jev-1.14, a System One decision model) as a gate or a judge on top of a step that a generation model still runs. The owner asked on 2026-11-10: "are we using properly built decision model functions for Jev to use, or are we trying to use Jev in a workflow built for a generation model?" The answer is in two parts.

  • The client is proper. It uses the pydantic_ai DecisionModel, typed Choice, Noul and Score questions, and decide_with_jev in src/devops_cli/ai/jev.py. The first pilot follows ADR 0019.
  • The workflows are not. Every pilot is a gate bolted onto a generation step. The cookbook patterns in jev.py (route_with_jev, gate_tool_call_with_jev, select_skill_with_jev, the auto mode) have no production caller. No workflow has a named decision point. Each pilot has its own setting, its own metric and its own shadow log.

The owner decided on 2026-11-10: "update the design to properly implement decision model workflows if there is a decision model configured/enabled".

Evidence of the pilots (2026-11-10):

  • Jev works for short, closed questions about evidence that tools extract, with cuts fitted on labelled data (pilot 1, the verify screen).
  • Jev failed as a reader of long diffs (the completeness check: 28% false holds, 43% recall) and as a drop-in for a structured generation answer (intake labels: a tie on type, behind on priority, Value and Effort, 0 of 3 true duplicates).
  • A deterministic rule beat Jev on the failure tail (8 cases) and on the implement budget extension (16 runs that were right to extend all pass a one-line rule).

So the design must put the deterministic rule first, the decision model second and the current behaviour of the generation workflow last. The benefit of a decision model is measured for each point. It is not assumed.

Proposed Solution & Architectural Design

Write the design record, and no code:

  • ADR 0020. A decision point is a first-class unit: a name, a typed question schema, an evidence builder, a resolver chain (rule, decision model, current behaviour), cuts that are data, action bands, a fail-back, a shadow mode and an outcome join. ADR 0020 amends ADR 0019 only where it needs to: ADR 0019 stays the rule set of a step, and ADR 0020 adds the registry and the resolver chain on top.
  • The OpenSpec capability decision-workflows.
  • The setting design: ai.decision_model (empty means no decision model) and roadmap.decisions.<point> with the mode off, shadow or on.
  • The catalogue of decision points with the question set, evidence fields, baseline rule, label source and success bar of each point, fixed before the point is built.
  • The list of what stays generation, the one metric devops_cli_decision_point_total and the migration order of the existing pilots.

Target Subsystem

Roadmap Service workflows (src/devops_cli/roadmap), docs and specs.

Existing Tool Considered

TypeSafe Jev through pydantic_ai DecisionModel, as in ADR 0019. This item adds one ADR and one spec. The code is in the next two items.

Related: #4282, #4284, #4298, #4308, #4326, #4394, #4395.

Standards Compliance

  • I confirm this proposal aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 5, zero bare exceptions, tests that cover the changed lines).
  • I am willing to submit a pull request implementing this feature with accompanying tests.

Activity

  1. added
    source/agent
    type/docs
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/docs. The docs prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. The owner requested this design before the code items, but it is documentation, not a blocking defect.
    • Value: High. It defines the resolver chain and catalogue that all subsequent Jev workflow code items depend on.
    • Effort: Medium. It requires an ADR, an OpenSpec capability, a setting design, a catalogue, and a migration order, but no code.
    • Related: docs(roadmap): the decision-step pattern for Jev decision points #4326, which asks for a different change. Both document Jev decision points, but the candidate delivers the overall design (ADR 0020, resolver chain, catalogue, migration) while #4326 delivers the pattern for one decision step.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 10, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 10, 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/p2-mediumscope/roadmapsource/agenttype/docsvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions