9 October 2026 10min read

Using Jev to Help a Human Decide

Something we don’t speak enough about as we include more AI in our processes is the cost, not of the tokens, but of the classical compute we need. The more AI, the more PRs, the more CI we run. To combat that I have been building a custom system I call the merge gate. The gate watches the team’s pull requests and when one looks ready, the gate syncs it with the main branch, which triggers the real CI jobs. It picks the order so CI time stays under control, and then it merges the PR once everything is green. This fully automated process has kept the costs of our CI under control allowing us to increase the usage of AI in a responsible manner.

But sometimes that sync from the main branch fails. And for certain errors I actually want a human in the loop. For example a flaky test is not the same as a real code break, and getting that wrong wastes somebody’s whole afternoon. Humans have extra context from the real world that facilitates that final decision. But also, making humans stop their current work and go investigate to decide the real issue is also wasteful.

I did not want to force a person to open four tabs and guess the best next step. That’s what we did in the past and from experience I know is kinda wasteful. So I found a great excuse to use Jev.

Using a classifier AI

What happens when a red PR hits the gate. Watch the dots light up in order. Two of those steps are ordinary code. Only the second one talks to a model. The final decision belongs to a human.
Gather the evidence
failing tests, failed jobs, output tail, changed files, overlap
code
Classify
flake, main merge, PR, or infrastructure
the model
Write the message
assembled in code from the same evidence
code
A person decides
rerun the CI job, or remove it from the gate
human
The key aspect of this classifier system is that the bit that uses AI is a very small part of it. As you can see in the diagram, most of it is done by classical code that works out which tests failed, which jobs failed, the last lines of the CI output, the files the PR touches, the files the main merge brought in, whether any of that overlaps with the code the failing tests cover, and which tests the project already knows are flaky. Doing this in code rather than letting an LLM agent deal with it is deterministic and it is cheap. The overlap question in particular has one right answer, and I do not want to pay a model to guess at it on every red run when a function can know it. It also means I can unit test it, which matters more than it sounds, because when the gate gets something wrong I need to know whether the evidence was wrong or the judgment was.

With all the evidence gathered we then rely on a small and focused AI model to do the tricky part that needs intelligence or that is hard to deterministically codify. Jev’s entire job is to read that state and pick one of four labels: A test flake, a real break from the main merge or from the PR, or a temporary infrastructure problem.

We don’t need human speech for this. No prose, no reasoning, no explanation to read. Just classify the probabilities of the correct answer.

If you’ve been building systems like this with LLMs you will notice what is not there. No instruction about tone, no output format, nothing asking it to explain itself. You just provide the context and possible options and you get a typed answer that cannot mess with your code.

Being unsure is a valid answer

Jev does not just return the label. It returns a probability for each of the given options, plus a confidence number describing how concentrated the probability is. Flat means unsure, everything piled onto one option means high confidence.

Choose a scenario to compare the four possible causes.
Likely a flaky test (64%) Confidence 0.52, above my 0.35 threshold. The message states the likely cause. A human still decides what to do.

With the probabilities back, I gate on one threshold. This only changes the wording of the message sent to the PR author, clearly stating the culprit if it’s confident, or clearly saying it is not confident enough. I don’t want to trick the human that will rely on it into thinking all results are equally confident.

It seems like it is a small thing, but uncertainty being just a number I can branch on means I did not have to ship a magical prompt and hope the sentence sounded hesitant enough.

It never acts

There is no path from a Jev answer to a merge or a branch update. The analysis produces one line of advisory text that is sent to the author of the PR. No matter what the result is, the person is still the final gate, deciding what the gate does next.

Of course all of this could be done with a closed system. I could point this at a proper LLM and let it change code in the loop, and of course that is not a bad idea. I have done this for other parts of the work and it works well. But it would also have been slower and pricier for this specific job. Tool calls and reasoning are not free, and none of it buys anything here, because this is not really a language task. It is a lookup against evidence I already gathered.

For this specific decision I still want the human in the loop, with enough assistance to make their decision quickly. In a way, we’re just using the human to give us the last judgement. I think this is vital here because a wrong decision can impact the rest of the team and increase again our CI costs. And we don’t have to underestimate how it gives the human visibility on what’s happening and understanding of what the merge gate is doing.

The pattern

None of this is about Jev specifically. I could swap in a different classifier tomorrow and the shape would not change. The key aspects here are to evaluate and understand what tool is best suited for the job, and not be tempted to throw a full AI agent at everything.

On one side we have the human, which is still the one making the real judgement call. The work of the system is to facilitate that. On the other side, we have evidence gathering, something that can be done deterministically, faster and cheaper with classical code. And finally, when we want to use the intelligence of AI to make a choice from a closed set, we can use a classifier model.

Code gathers the evidence. The classifier model makes one judgment call. A human decides.

If you enjoyed this post

Continue reading