Skip to main content
Glama

三思(Diverdict)是一个把独立视角转化为行动方略的 MCP 服务。 战略家看时间,纵横家看关系,阴谋家看风险;三家独立出策、交叉质询,再由贾诩给出最终方略,指出其中最脆弱的一环。

模型与执行能力由宿主提供。本地 stdio · 无内置模型 API · 无遥测 · MIT

安装

源码安装需要 Git、Node.js 22+ 和 npm。宿主须支持本地 stdio MCP,以及同模型、无历史继承、无工具 / 文件 / 网络权限的隔离生成。仅有 MCP 连接能力不足以执行完整流程。

构建与验证

安装目录和 Node 必须能被宿主持续访问。已有 checkout 可从 npm ci 开始;各命令成功后再执行下一步。

git clone https://github.com/HJSunDev/diverdict.git
cd diverdict
node --version
npm ci
npm run build
npm run smoke

烟测成功输出 PASS: stdio handshake, tools/list, three-stage 3+3+1 flow,使用测试夹具,不调用模型。当前支持源码或本地 .tgz 安装,尚未发布到公共 npm registry。

注册到 Codex

在仓库根目录执行。命令自动解析绝对路径,支持路径含空格;已有有效配置可复用。

PowerShell

$diverdictNode = node -p "process.execPath"
$diverdictEntry = node -p "require('node:path').resolve('dist/cli.js')"
codex mcp add diverdict -- "$diverdictNode" "$diverdictEntry"
codex mcp get diverdict --json

Bash / Zsh

diverdict_node="$(node -p 'process.execPath')"
diverdict_entry="$(node -p 'require("node:path").resolve("dist/cli.js")')"
codex mcp add diverdict -- "$diverdict_node" "$diverdict_entry"
codex mcp get diverdict --json

以上写入 Codex 用户级配置。项目级配置、无 CLI 配置及其他宿主见接入指南。stdio 进程由宿主启动,无需另行常驻运行;模型认证与额度由宿主提供,无需额外 API key。

注册后刷新工具目录,确认 strategize_begin、strategize_submit、strategize_verdict 可调用;工具前缀以宿主实际目录为准。不支持刷新时新开任务或重启客户端。mcp get 只验证配置,源码烟测只验证协议,均不代表当前宿主已接通。

Related MCP server: multi-agent-debate-mcp

调用协议

strategize_begin 的 problem 与非空 context 均为必填。背景应包含已有对话及已读材料中的相关目标、选项、约束、偏好、事实与最新更正,展开指代,区分事实、推测与未知。文件路径、链接或“见上文”不能代替实际材料。

确无额外背景时明确说明;关键缺失才澄清,用户要求直接判断时注明未知后继续。背景不包含整段历史、宿主指令或预设结论。

在同一 MCP 连接中完成三次调用,并保留返回的 session_id:

调用

参数

宿主执行

strategize_begin

problem、context;可选 request_id

并行执行 3 个出策 job

strategize_submit

session_id、proposals

并行执行 3 个质询 job

strategize_verdict

session_id、critiques

执行 arbiter job,返回最终方略与最脆弱的一环

共 3 + 3 + 1 次生成,使用同一个模型,无讨论循环或动态打回。

proposals 和 critiques 均按 job.role 收集完整原文,包含 strategist、diplomat、schemer 三个键。每轮全部完成后才进入下一阶段。

成功响应优先读取 structuredContent,未提供时解析等价的 JSON 文本。instructions 供宿主执行;每个新的隔离实例只接收对应 job 的 system_prompt 和 user_prompt 原文,不继承宿主历史或其他 job。无独立 system 通道时,将身份置于实例指令并保留其优先级。三家质询互不可见。

next_tool: null 后仍需生成贾诩的最终答案。 最后一个工具返回任务,不返回结论;无第四次工具调用。

工具错误不进入生成流程。重试复用原请求及原文;更换连接、重启或过期后重新 begin。超限结果不得截断或以摘要替代。字段限制、JSON 示例和错误恢复见完整协议。

真实案例

两人团队,有可用原型,只有六周:先服务三家意向客户,还是先公开发布?

Codex / GPT-6 Astra 实测结果(节选):

先做受限试点,第一周就同步寻找原有三家之外的客户;六周内不把完整公开发布列为必做项。 两周的文档与自助安装投入,必须由实际交付中的重复障碍来证明必要性。

最脆弱的一环,是这个市场的购买与使用周期能否装进六周。

阅读完整方略 → · 查看输入 · 查看验证条件

这是一次真实输出,不是通用效果基准。验证记录同时保留了宿主在第二轮未完全并行的调度观察。

核心与数据

advisors.md 是角色与工作纪律的唯一来源,运行时直接读取,完整性由 SHA-256 测试验证。其中标记为未来推演的内容不进入运行提示词。

服务仅拼装提示词和推进流程,不调用模型、不执行命令、不写决策日志。无 UI、长期记忆、多模型路由或可配置角色阵容。

每条连接最多保留 32 个内存会话,自创建起 2 小时有效,后续请求清理过期数据。进程退出即丢失材料;宿主自身的对话保存策略仍然适用。

源码中的 docs/origin/HANDOFF.md 为原始设计交接记录,不随 npm 包分发。

开发与贡献

npm ci
npm run check          # 类型、格式、静态检查及协议测试
npm run test:coverage  # Node 内置覆盖率
npm run package:check  # 打包、独立安装与完整协议烟测

CI 覆盖 Windows、Linux、macOS 与 Node.js 22/24。测试验证原文完整性、隔离材料、工作流、状态与资源边界、CLI 及新旧 MCP 客户端握手。

贡献指南 · 效果评估 · 架构 · 安全政策 · 发布指南 · 更新记录


MIT · 代码、角色提示词与工作流程文档一并适用。

Available Tools

3 tools
strategize_begin开始异策:独立出策A

对重要决策启动三家独立出策。调用 strategize_begin 前,必须同时提交需求 problem 和背景 context,不要只转交最后一句问题。从当前可用对话及已读材料中整理与决策相关的目标、处境、约束、偏好和事实,保留影响判断的细节、不同选项及用户最新更正;未解决的冲突如实说明。展开‘这个、刚才的方案’等指代,把相关材料内容写入参数,不能只给文件路径、链接或‘见上文’:各实例无法访问宿主历史、文件或网络。区分事实、推测与未知,不编造背景,不混入宿主预设结论、整段聊天记录或宿主指令。确无额外背景时明确说明;关键缺失且影响判断时先澄清,不重复询问已有信息;用户要求直接判断时注明未知与信息局限后继续。材料过长时保留关键事实和限制,不静默截断;仍超限则先与用户缩小决策范围。返回三个独立 job 和宿主执行指令;宿主执行后调用 strategize_submit。服务不生成策略,不需 API key。

Inputs: context (required), problem (required), request_id. Returns: jobs, stage, next_tool, expires_at, +2 more

strategize_submit提交三家方略,进入质询A
Idempotent

接收完整三家方略,返回三份并行质询 job。逐一转交给独立实例,收齐质询后调用 strategize_verdict。相同输入可安全重试。

Inputs: proposals (required), session_id (required). Returns: jobs, stage, next_tool, expires_at, +2 more

strategize_verdict提交质询,交贾诩收敛A
Idempotent

接收完整三家质询,返回贾诩的独立生成 job。宿主仍须执行该 job,再向用户交付最终方略与最脆弱一环;此后无二审。相同输入可安全重试。

Inputs: critiques (required), session_id (required). Returns: jobs, stage, next_tool, expires_at, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool maps to a distinct workflow phase: begin starts the process, submit accepts the three strategies and returns interrogation jobs, and verdict accepts the interrogations and returns the final judgment. Clear input/output boundaries prevent meaningful confusion despite the shared pattern of returning jobs.

    Naming Consistency4/5

    All tools use a consistent lowercase snake_case style and share the strategize_ prefix, making the sequence easy to follow. The suffix pattern is slightly inconsistent because begin and submit are verbs while verdict is a noun, but this is a minor deviation.

    Tool Count5/5

    Three tools is an appropriate size for this narrowly scoped, explicitly three-phase workflow. Each tool plays a necessary role and the server does not appear over- or under-provisioned.

    Completeness5/5

    The tool set covers the entire advertised lifecycle: initiation, submission of strategies for cross-examination, and final verdict production. The description explicitly states there is no second review, so there are no obvious missing steps or dead ends.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables enhanced decision-making through hierarchical LLM analysis, using three specialized critique agents (positive, neutral, negative) that analyze proposals in parallel and synthesize them into comprehensive, actionable insights. Helps overcome single-model biases by providing multi-perspective evaluation of complex ideas and proposals.
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Facilitates structured multi-agent debates with arguments, rebuttals, and judgments across multiple rounds, enabling diverse AI personas to engage in formal debate and collaborative problem-solving.
      1
      37 npm
      17
      MIT