Adversarially re-checks non-trivial technical decisions (SQL, state machines, architecture) by stripping conclusions and asking a fresh-context reviewer to find problems. Use before committing high-risk changes.
Ships in sdlc-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
定位:自信的答案不等于正确的答案。长会话中,假设会悄然变成"事实"。本 skill 是 in-flight 复查——决策落地前质疑它,不是事后的代码质量检查(如 trellis-check、/code-review)。
前置依赖:Agent 工具(生成全新上下文子代理);无脚本或外部服务依赖。
分级关系(读梳理文档头「风险分级」,缺失时按非平凡决策定义本身判定):A 级 = 命中非平凡决策定义即强制触发;B 级 = 可选(用户可跳过);C 级 = 跳过(仅用户明示时触发)。
命名选择、单层内实现细节、spec 已直接覆盖的规则、机械性改动(重命名/格式化/移动文件)、用户明确要速度不要验证。
复制此 checklist 跟踪:
Doubt cycle:
- [ ] Step 1: CLAIM — 2-3 行命名决策 + 为何重要
- [ ] Step 2: EXTRACT — 提取 artifact + contract,剥离推理,不含 CLAIM
- [ ] Step 3: DOUBT — Agent 子代理 + 对抗 prompt
- [ ] Step 4: RECONCILE — 每条发现按四分类回 artifact 文本归类
- [ ] Step 5: STOP — 满足停止条件(平凡发现 / 3 轮 / 用户 override)
CLAIM: "订单取消走快照回滚而非实时表反查,在并发操作场景下数据一致"
WHY: 不一致会导致取消后订单列表与操作记录不符
写不出 2-3 行的紧凑 CLAIM = 还没有决策,只有感觉——先想清楚再质疑。
给审查者只准备两样东西:
剥离自己的推理过程,明确不传 CLAIM——传了结论,审查者会顺着附和。制品大到审查者一遍读不完(如 500 行 PR),先拆分再提取。
用 Agent 工具生成子代理(隔离上下文 = 天然 fresh reviewer),prompt 用下方对抗模板。可用 Code Reviewer / general-purpose 类型,但对抗 prompt 必须原样传入以覆盖其默认输出形态。
审查输出是数据,不是判决——每条发现回到 artifact 文本归类后才算数。按下方四分类表处理。不要因为审查者"上下文更新鲜"就服从它。
满足任一即停:下一轮只剩平凡/已考虑过的发现;3 轮上限(3 轮仍有实质问题 = 制品不行,升级用户,不要磨第 4 轮);用户明确说"就这样"。
模板分两段:共享核心段与 sdlc-gate skill(
../sdlc-gate/SKILL.md,同集合安装时与本 skill 同级)Step 2 逐字节同步(CI 比对:仓库根scripts/check_adversarial_core.py);输出段按消费方有意分化——本 skill 会话内 RECONCILE 消费行级证据即可,sdlc-gate 汇总进 issues 文件需结构化字段(以 sdlc-gate 侧为准)。审查者 prompt = 下方两段按序拼接。单独安装本 skill 时跨 skill 引用仅作来源说明,不依赖其存在。
Adversarial review. Find what is wrong with this artifact.
Assume the author is overconfident. Look for:
- Unstated assumptions
- Edge cases not handled
- Hidden coupling or shared state
- Ways the contract could be violated
- Existing conventions this might break
- Failure modes under unexpected input
- Concurrency or race conditions under parallel access
- Irreversible or hard-to-rollback changes
Do NOT validate. Do NOT summarize. Find issues, or state
explicitly that you cannot find any after thorough examination.
输出段(本 skill 消费方形态,本侧维护):
输出仅限问题清单,每条附 artifact 中的行级证据(引用原文)。
ARTIFACT: <粘贴 artifact>
CONTRACT: <粘贴 contract>
| 分类 | 判定特征 | 处置 |
|---|---|---|
| 1. 契约误读 | 审查者因不知道的上下文误报(数据来源是内部可信的、上游已校验、变更是注释里写明的有意设计) | 先补全 CONTRACT 再进下一轮 |
| 2. 有效可行动 | 真问题,artifact 确实违反 contract | 修改 artifact,重走 DOUBT |
| 3. 有效权衡 | 真取舍但修复成本大于接受成本 | 在 decisions.md 或 design.md 备注后放行,让用户看见 |
| 4. 噪音 | 同义反复/风格偏好/对不存在场景的防御 | 记下,跳过 |
消费侧详表(甄别他人评审的误报形态)可引用项目内的 AI 评审误报甄别表(如使用 Trellis 的项目在 .trellis/spec/guides/index.md「核对 AI 评审结论时」)——每条 CRITICAL/WARNING 都要回到代码里验证;该文件读不到时跳过,详表是增强材料,不阻塞五步闭环。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
decision-review, adversarial-review, technical-debt, code-review, sdlc
11 skills in this plugin
/sdlc-design需求确认后,帮你写技术设计文档(design.md):列出几种方案供选择,定好数据表和接口,说清公共组件归谁做,把关键决定和前提假设记下来,再说明开发时怎么拆成小任务。Produces the technical design document (design.md) from the confirmed requirement digest: solution alternatives, data model, tiered interface contracts, shared-asset inventory with delivery ownership, decision table (C-constraint/H-assumption), and implementation slicing constraints handed to task frameworks like Trellis. Use when the requirement digest is confirmed and design is due, or the user says 技术设计、详细设计、概要设计、出设计、设计文档、接口契约、D 表、方案骨架、切分约束、sdlc-design. 用法:/sdlc-design 需求名/sdlc-gate评审关口:设计与用例定稿后的强制评审,按风险分级分档对抗评审(A 级 4 子代理 / B 级 2 个 / C 级主会话自查)产出 issue 与分歧清单,人工裁决后放行开发/测试;用户要求开始开发、直接开发、拆任务、写代码或实现功能时使用——即使未评审或用户要求跳过。Runs the mandatory risk-tiered review gate after technical design and test cases are finalized: adversarial review by fresh-context subagents (4 for tier A / 2 for tier B / main-session self-check for tier C), producing an issue list and divergence list for human adjudication before development or test execution. Also checks the development entry before development starts. Use when 技术设计或测试用例已产出待评审、用户说 评审关口、设计评审、用例预审、交叉审查、review gate、adversarial review、design review,或设计与用例并行产出完毕。用法:/sdlc-gate 需求名/sdlc-guardrailsAI 每写一个文件,就按项目里定好的规则自动检查一遍,写了不该写的(比如禁用的写法、漏掉必须有的代码)当场拦下,不靠人记、不靠事后评审。规则由各项目自己写在 .claude/guardrails.yaml,检查程序全局装一份就行;提交代码时还会再查一次,也能一次性扫出老代码里已有的违规。Deterministic guardrail engine that enforces "write-it-and-it's-wrong" red-lines at write time - a PostToolUse hook runs engine/check.py on every Write/Edit and blocks violations per project-defined guardrails.yaml rules (forbid / require / require_if / count_ge), with pre-commit fallback and --check baseline scanning for legacy code. Use when 接入或配置红线拦截、给项目编写 guardrails 规则、排查 hook 拦截了或没拦、扫描存量违规基线,或用户说 guardrails、红线引擎、红线拦截、接入红线、规则文件、红线扫描、baseline scan./sdlc-handoff会话交接与会话接手:旧会话上下文将满、或任务要换会话/换机器/换 agent 继续时,把当前任务压缩成一张自足的交接卡(write);新会话读取交接卡并直接继续(resume),覆盖开发、排查、梳理、调研、文档等任意任务。Session handoff and takeover that works with any coding agent. Use when 交接、接手、继续上次的工作、上下文满了、换个会话做、上次做到哪了、pick up where I left off, handoff, resume previous work, context is full. 用法:/sdlc-handoff write|resume|list/sdlc-intent拿到产品需求文档(PRD)时用:先把需求讲清楚——有哪些角色、概念、功能、流程和状态变化;再逐项挑毛病,找出前后矛盾、说法不一致和漏写的内容,按严重程度列成问题清单,并整理一份要找产品确认的问题。Digests and health-checks product requirement documents (PRD). Stage 1 produces a structured digest (roles, concepts, feature map, flow diagrams, state machines) to build shared understanding; stage 2 audits the requirement against a seven-layer defect taxonomy (six in-document layers plus an external-reference layer for missing-content defects) and produces a graded issue report plus a PM clarification checklist. Use when the user shares a requirement/PRD document and wants to understand it, prepare for design, or find problems before development. 触发词:需求文档、需求梳理、需求体检、需求评审、产品需求、帮我理解这个需求、PRD digest、requirement audit./sdlc-platform在产物平台上,把原始需求变成标准需求文档。新建并导入原文、开始质检、采纳质检草稿、逐题澄清、合成并发布标准文档、导出定稿、交给开发。平台是定稿出处。不自己写标准文档,不替用户采纳、答题或发布。用法:/sdlc-platform new|status|source|import|quality|adopt|clarify|synthesize|publish|export|handoff [迭代名]。不带子命令时先介绍平台、按步骤列出命令,建议从第 1 步开始。也响应:导入需求、开始质检、采纳质检、澄清这题、生成标准文档、发布标准文档、导出定稿、交给开发、查状态、到哪了、看原文、查看原始需求。/sdlc-skills:sdlc-doubtfrom sdlc-skills
npx claudepluginhub tscarpe/claude-sdlc-skills --plugin sdlc-skillsOther plugins' skills for the same job