Repository navigation
Description
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, anddecide_with_jevinsrc/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, theautomode) 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) androadmap.decisions.<point>with the modeoff,shadoworon. - 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_totaland 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
dan-petty commentedon Nov 10, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
docsprefix of the title gives the type.(roadmap)scope of the title gives the scope.The owner requested this design before the code items, but it is documentation, not a blocking defect.It defines the resolver chain and catalogue that all subsequent Jev workflow code items depend on.It requires an ADR, an OpenSpec capability, a setting design, a catalogue, and a migration order, but no code.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.