第10人协议MCP
当每个人都同意时,就必须有人不同意。
自主AI编码代理的对抗性审查系统。在你的代理人执行关键变更之前,3名独立的逆向评论家会对该提案提出质疑——抓住一个单独代理人错过的东西。
npm install -g tenth-man-mcp
claude mcp add tenth-man -- npx tenth-man-mcp就是这样。在第一次运行时,协议会自动向您的 CLAUDE.md 并设置 .tenth-man/ 在你的repo(gitignored)中。
运作原理
当您的代理即将进行关键更改时——接触身份验证、重构架构、修改3+个文件、运行迁移——协议会产生3个独立的审阅者:
| 代理人 | 角色 | 他们做什么 |
|---|---|---|
| 🔴 Devil’s Advocate | 破解它 | 找到每一个失败模式、竞争条件、安全漏洞 |
| 🟡 架构评论家 | 质疑 | 评估结构影响、耦合、模式一致性 |
| 🟢 实用主义者 | 现实检验 | 回滚策略、范围蔓延、更简单的替代方案 |
每个代理在 隔离上下文窗口审阅者之间没有意见污染。
代理人决议
该协议使用最佳可用模型,优雅地回退:
| 可用CLIs | 发生了什么 |
|---|---|
| Codex+Gemini | 所有3个项目并行运行(约1-3分钟) |
| 一个外部试剂 | 外部+2个分离的克劳德子试剂(约2-4分钟) |
| 两个 | 3个孤立的克劳德亚群(~3-5分钟) |
模型: gpt-5.3-codex, gemini-3-pro-preview, claude-opus-4-6。仅限顶级。这是为那些需要可靠性而不是成本的人准备的。
工作流程
标准模式(默认)
Agent detects critical change
→ Calls tenth_man_review
→ "🔟 10th Man Protocol activated — CRITICAL severity.
Spawning 3 agents... expect 2-5 minutes."
→ Review complete
→ Agent: "3 agents reviewed your JWT refactor:
🔴 Devil's Advocate BLOCKS — token refresh race condition
🟡 Architecture Critic says PROCEED — recommends adapter pattern
🟢 Pragmatist says PROCEED — wants it split into 3 phases
How would you like to proceed?"
→ You: "go ahead, address the race condition"
→ Agent creates execution plan → you confirm → agent executes
→ Everything archived to .tenth-man/history/自动模式
同样的评论,没有停顿。代理人将调查结果纳入其计划并立即进行。用于即发即弃工作流程。
完成后,该试剂包括一个内衬:
⚠️ 10th Man: Proceed with changes. 2 critical issues addressed, 4 recommendations.目录结构
.tenth-man/ # Auto-added to .gitignore
config.json # Optional repo config
active/
REVIEW.md # Current review (standard mode)
PLAN.md # Current plan (after approval)
history/
2026-02-12T14-30-00Z_a3f8c2/
review.md
plan.md
outcome.json
index.json # Manifest for history queries需求
- Node.js≥20
- 克劳德代码(主机代理)
- 可选: Codex 命令行界面 用于跨模型评审
- 可选: 双子星命令行工具 用于跨模型评审
旁路/YOLO模式
如果你运行Claude Code --dangerously-skip-permissions,协议默认为 标准 模式(等待批准)——这意味着代理将暂停并等待您。如果您要离开,请设置一次自动模式:
# In Claude Code, run:
Use tenth_man_configure with default_mode "auto"或创建 .tenth-man/config.json 在您的repo中:
{
"default_mode": "auto"
}现在,协议审查、内部计划、执行和归档——没有停顿。您返回已完成的工作+完整的审计跟踪。
为什么不自动检测? 克劳德代码 无法检测 它是否以旁路模式运行。它总是认为它是互动的。因此,这是每个仓库的一次性配置。
______________________________________________________________________
参考
MCP工具
tenth_man_review
主要入口点。触发对抗性审查。
{
"task_description": "Refactor auth from session-based to JWT",
"proposed_changes": "Replace express-session with jsonwebtoken...",
"affected_files": ["src/auth/*", "src/middleware/auth.ts"],
"severity": "critical",
"mode": "standard"
}严重程度:
high--3+个文件受到影响critical--身份验证、数据、架构更改blocker--突破性变化、迁移
模式:
standard--回顾→ 用户批准→ plan → 用户确认→ 执行auto--回顾→ 代理商内部计划→ 执行→ 审计追踪
tenth_man_compile
在收集到Claude子代理结果后完成审查。在生成子代理后由宿主代理自动调用。
tenth_man_configure
查看或更新仓库级别设置。
{
"timeout_seconds": 240,
"default_mode": "auto",
"available_agents": ["codex"]
}tenth_man_history
查询过去的审计。
{
"last_n": 10,
"severity": "critical"
}配置
可选的 .tenth-man/config.json:
{
"available_agents": ["codex", "gemini"],
"timeout_seconds": 180,
"default_mode": "standard",
"auto_trigger_patterns": [
"**/auth/**",
"**/migrations/**",
"**/*.schema.*"
]
}许可证
麻省理工学院
