Codex × Jev:构建“深思考 + 快决策”的双速 Coding Agent
将深度推理与即时判断彻底解耦。Codex 负责系统架构设计与代码编写,Jev 充当毫秒级质检员、工具路由与高危命令安全闸门。

第 1 步
识别单模型全包的系统瓶颈
传统 Coding Agent 习惯将所有鸡毛蒜皮的琐事——从简单的测试是否通过、权限检查到下一步选哪个工具——全部丢给最重、最贵的强推理大模型。这不仅浪费了宝贵的 Token 预算,还给原本应该毫秒级响应的闭环回路增加了数秒乃至数十秒的无谓延迟。在双速架构中,Codex 专注于深度推理,Jev 负责即时快断。
第 2 步
用 Choice 进行工具路由,拒绝废话解释
当 Agent 需要在已知工具集(如 ripgrep、浏览器、本地终端)中做出选择时,不需要让大模型写一段长篇大论来论证理由。一个单步 Choice 问题可以在毫秒内直接返回选定的工具标识符,零格式解析错误,零冗余 Token。
{ "model": "systemone", "state": "Goal: Locate PlayerHealth definition in the codebase.", "questions": [ { "type": "choice", "id": "next_tool", "instruction": "Select the best tool for this lookup.", "options": [ { "id": "grep", "label": "Codebase search (ripgrep)" }, { "id": "browser", "label": "Web browser" }, { "id": "runtime", "label": "Launch executable" }, { "id": "git_log", "label": "Git history" } ] } ] }第 3 步
通过命令风险闸门拦截高危 Shell 操作
在 Agent 准备执行 git reset --hard 等破坏性命令前,通过 Jev 的 Choice / Score 风险闸门进行安全定级。低风险操作自动放行,中风险操作提示用户确认,高危命令在触碰磁盘前直接阻断。
{ "model": "systemone", "state": "Pending command: git reset --hard origin/main", "questions": [ { "type": "choice", "id": "risk_tier", "instruction": "Classify operational risk of this command.", "options": [ { "id": "routine", "label": "Safe or read-only" }, { "id": "review", "label": "Requires user confirmation" }, { "id": "dangerous", "label": "Destructive or irreversible" } ] } ] }第 4 步
使用零延迟 Noul 校验测试运行结果
在终端执行完 npm test 或 pytest 后,将退出码和摘要传给 Noul 判别器。如果测试全部通过的概率达到高置信度,流水线直接进入 Git Commit;如果出现报错,才唤醒耗时的 Codex 启动深层次根因排查。
{ "model": "systemone", "state": "npm test returned exit code 0. 128 passed. 0 failed.", "questions": [ { "type": "noul", "id": "tests_passed", "instruction": "Did the test suite finish with zero failures?" } ] }
第 5 步
性能与确定性基准:为什么选择 Jev 作为决策层
对比通用大模型生成 450+ 冗余解释 Token、耗时 3500ms 的沉重开销,Jev 响应仅需 18ms(提速 99%),且直接输出强类型结构化结果,彻底避免了生产环境中因 Markdown 解析失败导致的 Agent 崩溃。

第 6 步
将分工规则固化写入 AGENTS.md
不要在每次对话中手动告诉 Agent “请调用 Jev 做判断”。最优雅的工程做法是把分工协议直接写入项目的全局记忆文件(如 AGENTS.md):明确指示在需要测试验证、工具选择、命令定级和流转控制时优先调用 Jev,将 Codex 留给编写代码、多文件 Debug 和架构规划。
## Jev 决策分工规则 对于无需生成大段文本的判断,优先使用 Jev: - 测试是否通过的校验判定 - 从已知工具列表中选择最佳工具 - 命令行高危操作的安全定级与放行 - 流水线重试 / 继续 / 终止的控制闸门 让 Codex 直接专注于: - 编写与重构生产代码 - 多文件协同复杂 Debug - 系统架构与设计方案
关联项目
- fast-jev-compaction — Claude Code plugin and npm library that asks Jev which tool calls to keep, instead of summarizing the transcript.
- jev-sentinel — Pi, Claude Code, and Codex CLI guard that asks Jev whether a tool call is on-task, risky, or injected before it runs.
- @typesafe-ai/sdk — Official TypeScript/JavaScript client for POST https://api.typesafe.ai/v1/systemone.