dvy1987/agent-loom / .agents/skills/adversarial-hat
adversarial-hat
VerifiedPut on the adversarial hat and systematically attack any document, plan, strategy, or idea to expose its weakest points before commitment. Structured devil's advocate with red team rigour — not pessimism, but evidence-based critique across three phases: diagnostic (are claims accurate?), creative (is the problem artificially constrained?), challenge (are solutions robust?). Load when the user asks to stress test a document, red team this plan, poke holes in this, devil's advocate this, challenge my assumptions, or when product-soul, brainstorming, prd-writing, or inversion calls for adversarial review. Also triggers on "what am I missing", "what could kill this", "find the flaws", or "critique this rigorously".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.2 KB |
| references/adversarial-prompt.md | markdown | 6.0 KB |
| references/examples.md | markdown | 4.2 KB |
references/examples.md
View on GitHub# Adversarial Hat — Full Session Examples
Read when you need a complete walkthrough beyond the inline teaser in SKILL.md.
Three-phase document review and in-flight CLAIM→DOUBT loops. Copy prompts: `references/adversarial-prompt.md`.
---
## Example 1 — Three-phase document review (product-soul)
**Input:** Adversarial hat on community feature for retention
**Phase 1 — Diagnostic:** "Community drives retention" = hypothesis, not cited for monthly B2B segment.
**Phase 2 — Creative:** Alternative — embedded help + templates may outperform community for low-frequency users.
**Phase 3 — Challenge:** Fails if founding members go quiet — no moderation playbook.
**Output:** Critical findings + WHAT WOULD NEED TO BE TRUE + STRONGEST ELEMENTS (see SKILL.md template).
---
## Example 2 — In-flight CLAIM → DOUBT (code)
**Input:** Agent about to add global singleton for cache
**CLAIM (author only — not sent to reviewer):**
```
Decision: Add CacheManager singleton in src/lib/cache.ts
Why it matters: Shared across API routes — wrong lifecycle breaks tests
Non-trivial: crosses module boundary, hidden global state
```
**EXTRACT (sent to reviewer):**
```markdown
## ARTIFACT
export class CacheManager { static instance; get(k) { ... } set(k,v) { ... } }
## CONTRACT
- Must work in serverless handlers (no stale cross-request state)
- Must not break parallel tests
- Project uses explicit DI in src/api/* pattern
```
**DOUBT:** Use code-specific prompt from `adversarial-prompt.md`
**RECONCILE:** Finding "singleton breaks serverless" → Valid + actionable → inject per-request cache instead.
---
## Example 3 — Copy-paste DOUBT prompt (plan)
**Input:** Implementation plan Phase 1 has 8 XL tasks
Paste into fresh context:
```
Adversarial review of this plan section. Assume timeline and dependencies are optimistic.
...
ARTIFACT:
[paste Phase 1 task list]
CONTRACT:
FR-1 through FR-5 from feature-spec; MVP demoable in 2 weeks
```
**Finding:** Task 4 "Build entire admin panel" = horizontal slice — split vertically.
---
## Example 4 — TDD satisfies DOUBT
**Input:** Bug fix for `completedAt` missing
1. Author writes failing Prove-It test (RED)
2. **Skip separate DOUBT loop** for behavioral claim — repro test is the doubt
3. Fix → GREEN → ship
---
## Example 5 — Cross-model offer (interactive)
After cycle 1 on payment migration:
```
Adversarial pass complete: 1 Critical (data loss on rollback), 2 Significant.
Want a second model to review the same ARTIFACT+CONTRACT cold? (y/n)
```
User: yes → spawn with file-based artifact per `adversarial-prompt.md` stdin-safe section.
---
## Example 6 — Doubt theater escalation
**Cycle 1:** 0 findings
**Cycle 2:** 0 findings
**Cycle 3:** Reviewer says "looks good"
**Action:** Stop. Report doubt theater. Escalate CLAIM + artifacts to user — do not loop.
---
## Example 7 — Reconcile table
| Finding | Classification | Action |
|---------|----------------|--------|
| Missing rate limit | Valid trade-off | User decides ship v1 without |
| Wrong HTTP status | Valid + actionable | Fix, re-run cycle 2 |
| "Prefer tabs over spaces" | Noise | Dismiss |
---
## Example 8 — Architecture ADR doubt
**ARTIFACT:** "We'll use event sourcing for notifications"
**CONTRACT:** Team size 2, MVP in 6 weeks, current stack Postgres + REST
**Finding (Significant):** ES ops burden exceeds team capacity — Consider outbox pattern instead.
---
## Example 9 — Fresh-context document escalation
**When:** PRD about to ship to stakeholders; 0 critical on first pass; reviewer agreed in 30 seconds
**Action:** Run Fresh-Context mode with `adversarial-prompt.md` core prompt — pass PRD section + success metrics as CONTRACT only.
---
See `references/adversarial-prompt.md` for all copy-paste prompts (code, plan, architecture, TDD, CLI shapes).
See `SKILL.md` for three-phase Diagnostic → Creative → Challenge and stop conditions.
---
## Verification checklist (full session)
- [ ] Examples demonstrate SKILL.md hard rules, not generic chat
- [ ] Deep reference file cited and used (patterns / triage / conventions / schemas / prompts / ui-patterns)
- [ ] Reader can trace input → concrete agent actions → durable outcome
- [ ] Cross-skill links honored (TDD↔debug↔review, design suite chain)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |