AI Decision Models: Structured Probability Gates for Automated Checks

Most checks in a software project belong in deterministic code: syntax validation, schema checks, clean working-tree assertions, or hard performance budgets. A smaller class of checks cannot be written as plain conditionals—judging whether a changelog matches a diff, ranking visual QA descriptions, or scoring whether a draft blog post reads like generic LLM filler. For those cases, we tested Jev (Jev 1.13 Free and Jev 1.14), Gemini Decision 1, and GPT-6 Luna Decision across 32 logged pre-deploy runs, a visual QA comparison experiment, and live evaluations of our own blog posts and hero images.
Note: Jev (TypeSafe AI), Gemini Decision 1 (Google, announcement), and GPT-6 Luna Decision (OpenAI) are structured decision models rather than chat LLMs. We call all three through the same OpenCode inference gateway (
opencode.ai/inference/systemone/v1/systemone) billed from our OpenCode Console credit balance. Instead of generating prose, they take a state payload and a JSON map of typed questions and return calibrated probabilities in a single fast pass (~0.4–1.8 s).
1. How Decision Models Work (and Our CLI Wrapper)
Decision models are not chat assistants or code generators. Each request sends two fields:
- State: a plain-text summary (or multimodal payload) of the facts, diff, report, or document to evaluate.
- Questions: a JSON map of typed questions evaluated in parallel against that state.
The API supports three question types:
| Type | Output | Typical use |
|---|---|---|
noul | Probability P(yes) in [0, 1] | Binary gate (release readiness, claims backed by data, needs real-phone test) |
choice | Winning option, per-option probabilities, and confidence | Triage (missing checklist item, change risk category, weakest section) |
score | Weighted score on an ordered numeric rubric with level probabilities | Trend tracking (issue severity, visual quality, AI slop level) |
We wrap the endpoint in a 292-line standard-library Python script (jev.py) with six flags (--state, --questions, --model, --min-confidence, --json, --timeout). The --min-confidence flag turns any binary noul probability into a shell exit code:
- 0.80 and above: pass (
exit 0) - 0.50 to 0.79: human review (
exit 2when--min-confidence 0.8is set) - Below 0.50: fail / escalate (
exit 2)
python3 jev.py \
--model jev-1.14 \
--state @article.md \
--questions @questions.json \
--min-confidence 0.8 \
--json
Two practical rules proved important in daily use:
- Run new gates log-only first (about 5 runs) to see where probabilities actually land before letting
exit 2block a workflow. - Include baselines in the state payload: raw metrics without context (for example, frame times without explaining headless rendering caps) produce noisy scores.
2. How We Used It First: Pre-Deploy Gate for a 3D WebGL Game
Our first integration was scripts/jev_done_gate.py (455 lines) in a browser-based 3D WebGL endless-runner game. It splits verification into two layers:
- Deterministic fact collector: runs
git status,git log, andgit diff, checks JS syntax withnode --checkacrosssrc/*.js, verifies cache-busting version strings, runsvalidate_chunks.mjs, inspects.qa-output/report ages and results, checksrsync -andeploy drift, verifiesprogres.mdandtech.mdupdates, and prunes.qa-output/files older than 7 days. - Probabilistic verdict (
jev.py): formats those collected facts plus a 7-item release checklist into a plain-text state summary and asks three questions in one call: whether the build is ready to deploy (noul), which checklist item is missing (choice), and overall issue severity (scoreon a 0–3 scale).
The gate passes only when readiness probability reaches at least 0.80 and the missing item is none (exit 0 for pass, exit 2 for review or fail, exit 3 for API or configuration error).
Results Across 32 Logged Runs (2026-11-14 to 2026-11-20)
All 32 runs completed end-to-end on Jev 1.13 Free across five days (.qa-output/jev-gate-log.jsonl):
| Outcome / flagged category | Count | Notes |
|---|---|---|
| Total runs | 32 | All completed via Jev 1.13 Free |
| Pass | 7 | e.g., readiness 0.87, missing item: none, severity 0.54 |
| Needs review / fail | 25 | Readiness below 0.80 or a specific missing item flagged |
| Flagged: performance | 16 | Mostly headless SwiftShader vsync and frame-pacing jitter |
| Flagged: none | 9 | 7 passes plus 2 borderline fails (0.57 and 0.69 readiness despite no missing item) |
| Flagged: visual QA | 3 | Missing or stale visual inspection evidence |
| Flagged: commit | 2 | Uncommitted working tree before deploy (readiness 0.06, severity 2.59) |
| Flagged: motion QA | 1 | Stale or missing motion report |
| Flagged: progress log | 1 | Missing changelog update in progres.md |
Four patterns stood out in the logs:
- Real catch (uncommitted code): readiness 0.06, missing item commit, severity 2.59 — caught uncommitted changes right before deploy.
- Clean pass: readiness 0.87, missing item none, severity 0.54 — recorded after fixing tree flickering and re-running visual QA.
- Borderline “none” verdict: two runs returned no specific missing item yet scored 0.57 (severity 1.46) and 0.69 (severity 1.21) on readiness—holding back from the 0.80 threshold when multiple minor signals looked weak.
- Headless rendering noise: 16 of 32 runs flagged performance under headless SwiftShader. We had to add an explicit baseline note to the state generator explaining that a 32.7–33.9 ms median frame time is a headless vsync cap rather than engine load.
Why We Did Not Port the Same Gate to Our Next WebGL Project
On our next 3D WebGL project (a multi-level downhill game), deterministic scripts already covered almost every item in that checklist: scripts/validate_levels.mjs (494 lines), qa/visual_qa.py (452 lines, enforcing at most 60 draw calls and 80,000 triangles), and qa/motion_qa.py (779 lines). Wrapping hard numeric checks in a probabilistic API call added network latency and an external dependency without adding signal.
| Check | Better tool | Why |
|---|---|---|
JS syntax (node --check), version-string sync, clean git status | Deterministic code | Exact binary truth; zero ambiguity, zero network dependency |
| Visual shot count, ≤ 60 draw calls, zero 404 or console errors | Deterministic code | Hard numeric budgets should not depend on a probability threshold |
Pruning .qa-output/ older than 7 days and rsync -an drift | Deterministic code | Deterministic housekeeping |
| Scoring vision descriptions, diff risk, or prose quality | Decision model | No static rule or regex can weigh nuance, intent, or trade-offs |

3. Where Decision Models Fit: Three Practical Use Cases
Use Case A: Separating “Eyes” from “Judge” in Visual QA
Asking a vision model to inspect a screenshot and emit a binary pass/fail verdict often produces oscillation: either it nitpicks cosmetic details or waves through regressions, and a binary verdict gives no numeric trend across iterations.
A two-stage Eyes → Judge pipeline separates perception from scoring:
- Eyes (vision model): inspects the screenshots and outputs a strictly factual, neutral text description (under 450 words, no verdict, no winner).
- Judge (decision model): scores that plain-text description against structured choice, score, and binary questions in a single call.
We tested this on the downhill game’s level-select menu by comparing desktop and mobile Playwright screenshots of the current build against two AI design mockups (a map mockup and a portrait menu card). One five-question call (1,640 input tokens, 208 output tokens, ~1 s) ran on both Jev 1.13 Free and Jev 1.14:
| Question (type) | Jev 1.13 Free | Jev 1.14 | What it captured |
|---|---|---|---|
| Best overall menu (choice) | Map mockup 0.54, current build 0.40, menu card 0.06 | Map mockup 0.52, current build 0.44, menu card 0.04 | Flagged a genuine close call between the reference mockup and live build |
| Best visual atmosphere (choice) | Map mockup 0.75, menu card 0.25, current build 0.00 | Map mockup 0.87, menu card 0.13, current build 0.00 | Separated visual polish from functional completeness |
| Current build quality (score 0–3) | 0.98 (usable with visible flaws) | 0.96 (usable with visible flaws) | Tight consistency (0.98 vs. 0.96) suitable for iteration tracking |
| Current build beats mockups (yes/no) | 0.43 | 0.54 | Borderline ~0.50 result lands cleanly in the human-review band |
| Top gap in current build (choice) | Mobile map readability 0.75, lock-state consistency 0.24 | Mobile map readability 0.81, lock-state consistency 0.18 | Prioritized unreadable mobile labels over background atmosphere |
This same pattern fits an iterative coder loop (scripts/glm_iterate.py): pass the previous and current vision descriptions to the decision model to score visual quality (0–3), whether the build improved over the previous iteration (yes/no), and the dominant remaining defect (choice) to steer the next fix.
Note: One schema gotcha we hit during this experiment:
| Problem | Cause | Fix |
|---|---|---|
| HTTP 422: Upstream request failed (Endpoint is unavailable) | Question JSON used question instead of instructions, or legend instead of criteria | Match the exact System One schema (instructions + criteria: array for score, object for noul and choice) |
Use Case B: Semantic Release Risk Before Deploy
Deterministic checks confirm syntax and desktop Playwright passes, but cannot judge the semantic risk of a code diff. A three-line change in a WebGL scene file might be a harmless sky-color tweak—or it might enable shadow mapping or a CSS backdrop filter and tank mobile GPU frame rates while desktop Chromium still passes. Similarly, git status only checks whether progres.md was modified, not whether the entry matches the code diff.
Feeding git diff, the latest progres.md entry, and the current performance baseline into a decision model lets a single call evaluate three release gates:
- Change risk category (choice): cosmetic, level tuning, gameplay logic, mobile WebGL risk, or deploy configuration.
- Needs real-phone test (yes/no): whether desktop headless Chromium is insufficient and a physical device check is warranted before push.
- Changelog matches diff (yes/no): whether the release note accurately describes the actual code changes.
Use Case C: Blog Post Quality and “AI Slop” Gate
For this blog, we wanted a fast sanity check on whether a draft reads like generic AI filler or concrete engineering notes, and whether claims are backed by measurements. We defined a three-question rubric:
- AI slop level (score 0–3): 0 for authentic first-person engineering notes with specific measurements and honest limits; 3 for generic LLM filler with no original data.
- Claims backed by data (yes/no): whether the post’s technical claims are supported by concrete numbers, logs, or code.
- Weakest aspect (choice): hook, concrete evidence, structure, conclusion, or none.
We ran Jev 1.14 (--min-confidence 0.8) on our previous post (2026-11-16 bird-watch build), and then ran all three decision models—Jev 1.14, Gemini Decision 1, and GPT-6 Luna Decision—on this post itself:
| Post evaluated | Model | Input tokens | Latency | AI slop level (0–3) | Claims backed by data | Weakest aspect | Gate (≥ 0.80) |
|---|---|---|---|---|---|---|---|
| Bird-watch post (2026-11-16) | Jev 1.14 | 5,866 | 0.43 s | 0.09 (P(0) = 0.92) | 0.76 | None (0.67; next: conclusion 0.13) | Review |
| This post (2026-11-24) | Jev 1.14 | 5,052 | 0.50 s | 0.13 (P(0) = 0.89) | 0.79 | Conclusion (0.52; next: evidence 0.29) | Review |
| This post (2026-11-24) | Gemini Decision 1 | 5,330 | 0.55 s | 0.26 (P(0) = 0.78) | 0.90 | Conclusion (0.81; next: evidence 0.12) | Pass |
| This post (2026-11-24) | GPT-6 Luna Decision | 5,908 | 0.44 s | 0.02 (P(0) = 0.98) | 0.79 | Conclusion (0.98; next: structure 0.01) | Review |
On the bird-watch post, Jev 1.14 cleared the slop check easily (0.09 out of 3, with 0.92 probability of level 0), placed data backing at 0.76 (just below the 0.80 auto-pass bar), and picked “none” (0.67) as the weakest aspect with “conclusion” (0.13) as runner-up. On Jev 1.13 Free, that same post scored 0.09–0.10 on slop and 0.80–0.83 on data backing, showing that Jev 1.14 is slightly stricter on evidence thresholds.
On this post itself, all three models agreed that the draft is not AI slop (0.02 to 0.26 out of 3) and independently flagged the conclusion as the weakest section (0.52 on Jev 1.14, 0.81 on Gemini Decision 1, and 0.98 on GPT-6 Luna Decision).
4. Comparing the Three Decision Models
Because OpenCode exposes all three models behind the same System One endpoint and credit balance, switching between them is a single --model flag:
| Property | Jev 1.14 | Gemini Decision 1 | GPT-6 Luna Decision |
|---|---|---|---|
| Developer | TypeSafe AI | OpenAI | |
| API model ID | jev-1.14 (also jev-1.13-free) | gemini-decision-1 | gpt-6-luna-decision |
| Initial release | September 15, 2026 | November 11, 2026 | Available on OpenCode gateway |
| Model type | System One decision model; no text generation | Decision model; no text generation, calibrated probabilities | Decision model; no text generation, calibrated probabilities |
| Question types | Binary (noul), multi-option (choice, up to 255 options), rubric (score) | Binary (noul), multi-option (choice), rubric (score) | Binary (noul), multi-option (choice), rubric (score) |
| Input modalities | Text, images | Text, images, audio, video, PDF | Text, images (PNG, JPEG, WebP, GIF) |
| Published latency | 70–500 ms end-to-end | 150–250 ms end-to-end | Measured 0.44 s (text) / 1.71 s (image) |
| Context window | 64,000 tokens | 262,144 tokens | 1,050,000 tokens (922,000 input) |
| Questions per call | Multiple questions in parallel over one state | Up to 1,000 questions in a single request | Multiple questions in parallel over one state |
| Billing model | Input tokens only (output free) | Input tokens only (output not billed) | Input tokens only + prompt caching |
5. Direct Image Checks and Pipeline Cost in Our Setup
All 32 pre-deploy runs on our first WebGL game ran at zero cost on Jev 1.13 Free. Our subsequent evaluations—the 5-question visual QA comparison (1,640 input tokens, ~1.0 s), full-post editorial reviews (5,052–5,908 input tokens, 0.43–0.55 s), and direct hero-image checks—all ran against a single OpenCode balance. Because all three models bill input tokens only (with zero output-token charge), each check costs a fraction of a cent (for example, $0.000069 for the 5-question visual QA call on Jev 1.14), making structured gates cheap enough to run on every commit, draft, or generated image without budgeting individual calls.
Direct Image Verification on This Post’s Hero Thumbnail
Our jev.py CLI wrapper sends state as plain text, which is why our game visual QA used the two-stage Eyes → Judge pipeline. Passing a JPEG directly as a multimodal image_url payload in the state array works across all three models. Here is how they scored this post’s 1376×768 hero thumbnail (thumbnail.jpg) across three questions:
| Model | Image tokens | Latency | AI slop level (0–3) | Looks like AI slop (yes/no) | Usable as hero (yes/no) |
|---|---|---|---|---|---|
| Jev 1.14 | 3,368 | 0.75 s | 2.14 | 0.81 | 0.35 |
| Gemini Decision 1 | 1,517 | 1.82 s | 1.43 | 0.30 | 0.82 |
| GPT-6 Luna Decision | 1,647 | 1.71 s | 1.68 | 0.38 | 0.78 |
Gemini Decision 1 and GPT-6 Luna Decision tokenized the image in less than half as many tokens as Jev 1.14 and closely agreed on the verdict (flagging low AI-slop probability at 0.30 and 0.38, and passing hero usability at 0.82 and 0.78). Jev 1.14 ran fastest at 0.75 s but was noticeably stricter on synthetic product renders (0.81 slop probability, 0.35 usability).
6. Practical Rule of Thumb
After 32 deploy-gate runs and side-by-side tests across our game repos and this blog, our selection rule is straightforward:
- Use deterministic code whenever the answer is exact: syntax checks, schemas, file presence, exit codes, or hard numeric budgets (draw-call limits, triangle caps, zero 404s).
- Use Jev 1.14 (or Jev 1.13 Free) for fast text gates—code diffs, changelog checks, prose rubrics, and Eyes → Judge visual descriptions.
- Use Gemini Decision 1 when you need direct multimodal inputs (such as hero-image QA with compact image tokenization) or up to 1,000 parallel questions in a single request.
- Use GPT-6 Luna Decision when you need a very large context window (up to 1M tokens) or prompt caching across repeated checks on the same document or codebase prefix.
- Keep new gates advisory first: run log-only for the first ~5 runs to calibrate the 0.80 and 0.50 thresholds against your own judgment, and never let an external scoring API hard-block a local build when the network is unavailable.