adversary
Pre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation).
Rune-kit · AI review on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add Rune-kit/rune --skill adversaryAbout this skill
name: adversary description: "Pre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation)." metadata: author: runedev version: "0.5.0" layer: L2 model: opus group: quality tools: "Read, Glob, Grep" emit: oracle.dispatched, oracle.response, oracle.failed listen: agent.stuck, context.preview
adversary
Purpose
Pre-implementation adversarial analysis. After a plan is approved but BEFORE code is written, adversary stress-tests the plan across 5 dimensions: edge cases, security, scalability, error propagation, and integration risk. It does NOT fix or redesign — it reports weaknesses so the plan can be hardened before implementation begins.
This fills the only gap in the plan-to-ship pipeline: all other quality skills (review, preflight, sentinel) operate AFTER code exists. Catching a flaw in a plan costs minutes; catching it in implementation costs hours.
Triggers
- Called by
cookPhase 2.5 — after plan approved, before Phase 3 (TEST) /rune adversary— manual red-team analysis of any plan or design document- Auto-trigger: when plan files are created in
.rune/ordocs/plans/
Calls (outbound)
sentinel(L2): deep security scan when adversary identifies auth/crypto/payment attack vectors in the planperf(L2): scalability analysis when adversary identifies potential bottleneck patternsscout(L2): find existing code that might conflict with planned changesdocs-seeker(L3): verify framework/API assumptions in the plan are correct and currenthallucination-guard(L3): verify that APIs, packages, or patterns referenced in the plan actually existcontext-engine(L3): (oracle-mode) emitcontext.previewbefore bundle build to gate token costsession-bridge(L3): (oracle-mode) detach protocol when target model is opus-class for non-blocking dispatchcouncil(L3): Step 0.6 — decorrelated multi-perspective critique for CRITICAL-tier plans (one-way-door decisions, auth/payment/crypto/user-data), mode=critique
Called By (inbound)
cook(L1): Phase 2.5 — after plan approval, before TDDplan(L2): optional post-step for critical featuresteam(L1): when decomposing large tasks, adversary validates the decompositiondebug(L2): (oracle-mode) listens toagent.stuckfrom debug after 3 disproved hypothesesfix(L2): (oracle-mode) listens toagent.stuckfrom fix after 2+ failed attempts- User:
/rune adversarydirect invocation
Cross-Hub Connections
adversary←cook— plan produced → adversary challenges it → hardened plan feeds Phase 3adversary→sentinel— security attack vector identified → sentinel validates depthadversary→perf— scalability concern raised → perf quantifies the bottleneckadversary→scout— integration risk flagged → scout finds affected codeadversary→plan— CRITICAL findings → plan revises before implementationadversary→council— CRITICAL-tier plan (one-way-door decision, or auth/payment/crypto/user-data) → decorrelated critique before red-teaming
Execution
Step 0: Load Context
- Read the plan document (from
.rune/features/<name>/plan.md, phase file, or user-specified path) - Read the requirements document if it exists (
.rune/features/<name>/requirements.mdfrom BA) - Use
scoutto identify existing code files that the plan will touch or depend on - Identify the plan's core assumptions — what MUST be true for this plan to work?
Step 0.5: Steelman + Pick a Reasoning Lens
Before attacking, steelman the plan's core thesis — restate it in its strongest form (strip weak framing, supply the strongest implied evidence, name what's genuinely good). Attacking a weak paraphrase produces findings the author dismisses with "that's not what I meant." The steelman also seeds the Strength Notes section (Step 6).
The 5 dimensions below answer what to attack. The 5 reasoning modes answer how:
| Mode | Core question | Reach for when |
|---|---|---|
| Red Team (default) | "How would someone break/exploit/game this?" | auth, payment, user data, public input, perverse incentives. NB: this is persona framing (who attacks, their capability/motivation) — it composes with Step 2's attack-surface inventory, not a duplicate of it |
| Pre-mortem | "It's 6 months out and this failed — why?" | migrations, infra, architecture, cascading failure |
| Evidence Audit | "Does the evidence actually support this claim?" | benchmark/"X is faster"/capacity-number justifications |
| Dialectic | "What's the strongest case for the opposite choice?" | tech/vendor/architecture one-way-door decisions |
| Socratic | "What is this plan taking for granted?" | vague scope, consensus-driven plans, thin specs |
Default to Red Team. Switch or add a second lens when the plan's shape calls for it
(signal→mode table + mode mechanics in references/reasoning-modes.md). State which lens
you applied per dimension — don't ask the user to pick. Dialectic's synthesis usually
produces concrete remediations (likely HARDEN), but maps to REVISE if it exposes a
structural flaw in the chosen approach; Socratic's surfaced assumptions and Pre-mortem's
narratives become findings.