Files
Agent-System/.cursor/skills/jev-decide/SKILL.md
T
weichen 939be0ec6b feat(mcp): add jev-service governance decide MCP server
Expose typed jev_decide/jev_health over stdio for closed-enum governance
routing; credentials stay in ~/.secrets/jev and out of git.
2026-09-23 16:12:16 +00:00

2.2 KiB
Raw Blame History

name, description
name description
jev-decide Use jev-service typed decisions (choice/noul/numeric with probabilities) for Agent-System governance classification. Use when choosing task tier, validation level, reject-code routing, or other closed-enum judgments.

jev-decide(治理决策)

依赖 MCP 服务器 jev(scripts/mcp/jev-mcp.mjs)。凭证在本机 ~/.secrets/jev/(api.key、base-url),禁止写入仓库、commit 或聊天。

何时用

输入是情境文本、输出是封闭枚举 / yes-no / 分桶数值时调用 jev_decide,例如:

决策点 建议 questions
任务分级(是否开 worktree) choice:info_reply / single_task / cross_module
验证层级(验证契约) choice(可多题):doc / script / go / frontend / migration / product_pi
拒绝码处置 choice:reconcile / re_snapshot / fix_record_id / request_capability / abort
是否 blocker / 是否触碰重验面 noul

不适合:需要解释链、多步规划、自由文本生成——那些走大模型或 agentctl 确定性门禁。

调用约定

  1. 可选先 jev_health;失败则本机判断,勿阻塞写路径。
  2. jev_decide:同一情境的多问合成一次请求。
  3. 问句正向措辞,避免双重否定。
  4. 置信度路由:
    • confidence >= 0.9 且 top1−top2 ≥ 0.15 → 可采用
    • 否则 → agent 自行按规范裁定,把 jev 结果当参考
  5. 401/超时/answers.*.error → 降级到本机判断;勿把决策失败变成业务失败。

示例(任务分级)

{
  "context": "用户请求:给 CURRENT 加一行认领说明,不改代码",
  "questions": {
    "tier": {
      "type": "choice",
      "question": "This request matches which AGENTS task tier?",
      "options": ["info_reply", "single_task", "cross_module"]
    },
    "needs_worktree": {
      "type": "noul",
      "question": "Does this require a new feature/fix worktree?"
    }
  }
}

权威矩阵仍以 AGENTS.md、验证契约 为准;jev 只加速封闭枚举分类,不替代机器门禁(admit/hooks/docs apply)。