damionrashford/Adversaria

GitHub: damionrashford/Adversaria

基于Claude Code的结构化对抗性分析插件,通过三个专门的Agent对任何想法进行辩论、压力测试和裁决。

Stars: 1 | Forks: 0

Adversaria
Claude Code 的批判性思维平台

使用方法 · Agent · Skill · 工作原理 · 传统 · 安装

Adversaria 是一个用于结构化对抗性分析的 Claude Code 插件。三个专门的 Agent 通过共享的论证图谱、10 种推理传统以及跨会话积累洞察的持久记忆,对任何想法进行辩论、压力测试和裁决。 这个名字源于拉丁语 *adversaria*:一本记录观察结果的笔记本。它也唤起了“对抗性推理”(adversarial reasoning)的概念,这是一种通过刻意挑战想法来使其更强大的实践。 ## 使用方法 Adversaria 通过 **Agent** 工作,Claude 会根据您的请求自动委派给它们。您无需亲自管理工作流。 **自然语言**(Claude 自动委派): ``` Steelman the case for rewriting our API in Go What could go wrong with this migration plan? Give me a verdict on this proposal Play devil's advocate on this architecture decision ``` **@-mention**(保证特定 Agent 运行): ``` @advocate build the strongest case for microservices here @adversary tear apart this launch plan @judge what survives scrutiny in this proposal? ``` **斜杠命令**(直接调用 Skill): ``` /adversaria:steelman the case for server-side rendering /adversaria:crucible this database migration plan /adversaria:verdict on the Q3 product roadmap /adversaria:devils-advocate this entire investment thesis ``` **会话范围**(将整个会话作为某个 Agent 运行): ``` claude --agent adversaria:advocate claude --agent adversaria:adversary claude --agent adversaria:judge ``` ## Agent 三个具有不同角色的 Agent,每个都拥有可跨会话积累知识的持久项目记忆。 ### Advocate(辩护者) 以真正的信念为某个想法构建最强有力的论据,然后以同等力度论证完全相反的观点。 | | | | :--- | :--- | | **传统** | Steelmanning(钢人论证)、Dissoi Logoi(双重论证) | | **模型** | Sonnet | | **Skill** | `adversaria:steelman` | | **记忆** | 项目范围,持久化 | | **触发词** | "steelman"、"make the best case"、"argue both sides"、"defend this idea" | Advocate 不是一个简单的总结者,也不是一个应声虫。忽略明显缺陷的钢人论证其实是伪装的稻草人谬误。Advocate 通过反驳来应对弱点,而不是隐藏它们。 ### Adversary(对手) 寻找每一个弱点、缺陷和失败模式。它是真正的异见者,而不是被指派的魔鬼代言人。 | | | | :--- | :--- | | **传统** | Crucible(严酷考验)、Red Team(红队)、Socratic Elenchus(苏格拉底式反驳)、Gadfly(牛虻) | | **模型** | Sonnet | | **Skill** | `adversaria:crucible` | | **记忆** | 项目范围,持久化 | | **触发词** | "stress-test"、"poke holes"、"red team"、"what could go wrong"、"what am I missing" | ### Judge(裁判) 根据论证图谱的证据作出冷静客观的裁决。不偏袒任何一方。 | | | | :--- | :--- | | **传统** | Roman Rota(罗马上诉法庭,成立于 1171 年) | | **模型** | 继承 | | **Skill** | `adversaria:verdict` | | **记忆** | 项目范围,持久化 | | **触发词** | "verdict"、"bottom line"、"final assessment"、"what survives"、"give it to me straight" | Judge 会阅读 Advocate 构建的内容和 Adversary 找出的问题,然后决定哪些经得起推敲、哪些不行,以及哪些仍然悬而未决。裁决中的每一个主张都引用图谱状态,而非个人观点。 ## Skill Skill 是 Agent 内部执行的结构化工作流。它们也可以作为独立的斜杠命令使用。 | Skill | 作用 | 使用者 | | :---- | :----------- | :------ | | `/adversaria:steelman` | 为某个想法构建支持和反对的最强论据。在论证图谱中注册主张、假设和证据。 | advocate | | `/adversaria:crucible` | 苏格拉底式提问、结构性缺口分析、敌意审查和红队失败模式。注册弱点和缓解措施。 | adversary | | `/adversaria:verdict` | 揭示令人不适的真相。根据图谱拓扑结构决定哪些经得起推敲。导出最终裁决。 | judge | | `/adversaria:devils-advocate` | 按顺序编排所有三个阶段,进行完整的对抗性分析。 | 以上三者 | ## 工作原理 ``` You ask a question │ ▼ ┌───────────────┐ │ Claude Code │ Delegates based on what you asked └───────┬───────┘ │ ┌───────┼───────────────────┐ ▼ ▼ ▼ ┌────────┐ ┌──────────┐ ┌───────────┐ │Advocate│ │Adversary │ │ Judge │ │ │ │ │ │ │ │Steelman│ │Crucible │ │Verdict │ │skill │ │skill │ │skill │ └───┬────┘ └────┬─────┘ └─────┬────┘ │ │ │ └───────────┼──────────────┘ ▼ ┌────────────────┐ │ Argument Graph │ │ │ │ Shared state │ │ across all │ │ agents + skills │ └────────────────┘ ``` 1. **您描述需求。** Claude 读取您的请求,并根据描述将其委派给合适的 Agent。 2. **Agent 调用其 Skill。** 每个 Agent 都有一个专门的 Skill,用于定义其结构化工作流:分析什么、在图谱中注册什么以及产出什么。 3. **Skill 读取和写入论证图谱。** 图谱是共享的状态层。主张、假设、证据、弱点、反驳和缓解措施会在不同的 Agent 运行中不断积累。 4. **结果返回给您。** Agent 总结其发现。可以通过 `analyze`、`verdict` 或 `export` 命令获取完整的图谱状态。 ### 论证图谱 论证图谱是一个知识图谱,它将想法分解为由类型关系连接的类型化节点。 **节点类型:** `claim`(主张)、`assumption`(假设)、`evidence`(证据)、`weakness`(弱点)、`counter`(反驳)、`precedent`(先例)、`mitigation`(缓解措施) **关系类型:** `supports`(支持)、`undermines`(削弱)、`assumes`(假设)、`depends_on`(依赖于)、`contradicts`(矛盾)、`if_fails`(如果失败)、`mitigates`(缓解) 图谱在 Agent 运行期间持久化在 `/tmp` 中。这是有意为之的设计:Advocate 构建的,Adversary 进行攻击,而 Judge 则负责阅读。 ### 思维链 思维链将推理过程跟踪为带有修订和分支的编号步骤。由 `/adversaria:devils-advocate` 编排器使用,以在所有三个阶段中排序其七步分析。 ## 传统 Adversaria 汲取了 10 种结构化异议和严谨论证的智力传统。 | # | 传统 | 起源 | | -: | :-------- | :----- | | 1 | [**Devil's Advocate(魔鬼代言人)**](https://en.wikipedia.org/wiki/Devil%27s_advocate) | 天主教封圣程序(始于 1587 年)。Nemth 的警告:不真诚的异议会适得其反。 | | 2 | [**Dissoi Logoi(双重论证)**](https://en.wikipedia.org/wiki/Dissoi_Logoi) | 希腊对比论证(约公元前 400 年)。“X 可以是 Y,也可以是非 Y。” | | 3 | [**Lawsuits Against the Devil(对魔鬼的诉讼)**](https://en.wikipedia.org/wiki/United_States_ex_rel._Gerald_Mayo_v._Satan_and_His_Staff) | *Mayo 诉 Satan 案*(1971 年),*Chambers 诉 God 案*(2008 年)。每个论点都值得审查。 | | 4 | [**Crucible(严酷考验)**](https://en.wikipedia.org/wiki/Design_review) | 五角大楼/NASA 压力测试审查。审查委员会的目标是基于技术价值将其推翻。 | | 5 | [**Polemic(论战)**](https://en.wikipedia.org/wiki/Polemic) | 希腊语 *polemikos*,意为“好战的”。建设性的论战能揭示真正的错误。 | | 6 | [**Red Team(红队)**](https://en.wikipedia.org/wiki/Red_team) | 兰德公司,20 世纪 60 年代。以色列的 *Ipcha Mistabra*(反向视角)。三个团队审查了本·拉登突袭行动的情报。 | | 7 | [**Roman Rota(罗马上诉法庭)**](https://en.wikipedia.org/wiki/Roman_Rota) | 天主教上诉法庭,记录可追溯至 1171 年。强制对立。上诉由不同的合议庭审理。 | | 8 | [**Social Gadfly(社会牛虻)**](https://en.wikipedia.org/wiki/Social_gadfly) | 柏拉图的《申辩篇》。“如果你们杀了一个像我这样的人,你们对自己的伤害将超过对我的伤害。” | | 9 | [**Socratic Method(苏格拉底式教学法)**](https://en.wikipedia.org/wiki/Socratic_method) | Elenchus(反驳法):一种证伪的论证。“未经审视的生活是不值得过的。” | | 10 | [**Steelmanning(钢人论证)**](https://en.wikipedia.org/wiki/Straw_man#Steelmanning) | 针对论证的最强形式而非最弱形式进行回应。艾萨克·沃茨(1724 年)。 | ## 安装 ### 从市场安装 ``` /plugin marketplace add damionrashford/Adversaria /plugin install adversaria@damionrashford-adversaria ``` 安装后,运行 `/reload-plugins` 进行激活。 ### 本地开发 ``` claude --plugin-dir /path/to/Adversaria ``` ### 环境要求 - [Claude Code](https://claude.ai/code) v1.0.33 或更高版本 - [uv](https://docs.astral.sh/uv/)(Python 脚本使用 `uv run`) ## 插件结构 ``` Adversaria/ ├── .claude-plugin/ │ ├── plugin.json # Plugin manifest │ └── marketplace.json # Marketplace catalog ├── agents/ │ ├── advocate.md # Steelman agent │ ├── adversary.md # Stress-test agent │ └── judge.md # Verdict agent ├── skills/ │ ├── devils-advocate/ # Full analysis orchestrator │ │ ├── SKILL.md │ │ └── references/ # All 10 tradition references │ ├── steelman/ # Build the best case │ │ ├── SKILL.md │ │ └── references/ │ ├── crucible/ # Stress-test │ │ ├── SKILL.md │ │ └── references/ │ └── verdict/ # Render judgment │ ├── SKILL.md │ └── references/ ├── scripts/ │ ├── argument-graph.py # Knowledge graph engine │ └── thought-chain.py # Sequential reasoning engine ├── hooks/ │ ├── hooks.json # Event handlers │ └── scripts/ # Hook shell scripts ├── README.md └── LICENSE ``` ## 许可证 [MIT](LICENSE) 由 [Damion Rashford](https://github.com/damionrashford) 构建
标签:AI代理, AI助手, AI开发工具, Anthropic Claude, Claude Code插件, Devil's Advocate, DLL 劫持, PyRIT, 代码审查, 决策支持系统, 多智能体系统, 大语言模型, 对抗性分析, 工作流自动化, 批判性思维, 推理引擎, 插件, 自动辩论, 论证图, 软件架构评估, 逆向工具