adversary
On-demand adversarial quality reviews using strategy templates. Selects strategies by criticality level, executes adversarial templates against deliverables, and scores quality using LLM-as-Judge rubric. Integrates with quality-enforcement.md SSOT.
What this skill does
# Adversary Skill
> **Version:** 1.0.0
> **Framework:** Jerry Adversarial Quality (ADV)
> **Constitutional Compliance:** Jerry Constitution v1.0
> **SSOT Reference:** `.context/rules/quality-enforcement.md`
## Document Audience (Triple-Lens)
This SKILL.md serves multiple audiences:
| Level | Audience | Sections to Focus On |
|-------|----------|---------------------|
| **L0 (ELI5)** | New users, stakeholders | [Purpose](#purpose), [When to Use](#when-to-use-this-skill), [Routing Disambiguation](#routing-disambiguation), [When to Use /adversary vs ps-critic](#when-to-use-adversary-vs-ps-critic), [Quick Reference](#quick-reference) |
| **L1 (Engineer)** | Developers invoking agents | [Invoking an Agent](#invoking-an-agent), [Available Agents](#available-agents), [Dependencies](#dependencies--prerequisites), [Adversarial Quality Mode](#adversarial-quality-mode) |
| **L2 (Architect)** | Workflow designers | [P-003 Compliance](#p-003-compliance), [H-14 Integration](#integration-with-creator-critic-revision-cycle-h-14), [Constitutional Compliance](#constitutional-compliance), [Strategy Templates](#strategy-templates) |
---
## Purpose
The Adversary skill provides **on-demand adversarial quality reviews** using strategy templates from the Jerry quality framework. Unlike the problem-solving skill's integrated adversarial mode (which operates within creator-critic loops), the adversary skill is invoked explicitly when you need a standalone adversarial assessment of any deliverable.
### Key Capabilities
- **Strategy Selection** - Maps criticality levels (C1-C4) to the correct adversarial strategy sets per SSOT
- **Strategy Execution** - Loads and runs strategy templates against deliverables with structured finding classification
- **Quality Scoring** - Implements S-014 LLM-as-Judge rubric scoring with 6-dimension weighted composite
- **Criticality-Aware** - Automatically adjusts review depth based on deliverable criticality
- **Template-Driven** - All strategies follow standardized templates from `.context/templates/adversarial/`
---
## When to Use This Skill
Activate when:
- Applying adversarial strategies to a completed deliverable outside a creator-critic loop
- Scoring deliverable quality using the SSOT 6-dimension rubric
- Selecting the appropriate strategy set for a given criticality level
- Running a full C4 tournament review with all 10 strategies
- Pairing S-003 (Steelman) before S-002 (Devil's Advocate) per H-16
- Needing a standalone quality assessment without revision cycles
NEVER invoke this skill when:
- Task requires iterative creator-critic-revision loop -- Consequence: Adversarial one-shot assessment applied to iterative work produces premature rejection without revision pathway; use `/problem-solving` with ps-critic instead
- Task is routine code review for quick defect checks -- Consequence: Full adversarial strategy template execution (S-001 through S-014) applied to routine defect detection wastes significant context budget on strategy selection and template loading; use ps-reviewer instead
- Task is binary constraint validation (pass/fail compliance) -- Consequence: Adversarial strategies assess quality dimensions, not binary constraint compliance; traceability matrices not generated; use ps-validator instead
- Work is routine code changes at C1 criticality -- Consequence: Full adversarial overhead (adv-selector, adv-executor, adv-scorer) applied to C1 routine tasks consumes disproportionate context budget for low-risk work; use self-review (S-010) only
- Defects or bugs have obvious solutions -- Consequence: Adversarial quality assessment evaluates existing deliverables, not diagnose root causes; use `/problem-solving` for root-cause analysis instead
- User explicitly requests a quick review without adversarial rigor -- Consequence: Overriding user preference violates P-020 (user authority); respect the request
See [Routing Disambiguation](#routing-disambiguation) for full exclusion conditions with consequences.
> **Note:** Use `/adversary` for adversarial code review (e.g., red team security review, tournament quality assessment of code artifacts). Use `ps-reviewer` for routine defect detection.
### Relationship to ps-critic
The adv-scorer and ps-critic agents share the same S-014 LLM-as-Judge rubric and 6-dimension weighted composite scoring methodology. They serve different workflow positions:
| Aspect | adv-scorer | ps-critic |
|--------|-----------|-----------|
| **Workflow** | Standalone/on-demand scoring | Embedded in creator-critic-revision loops |
| **Output** | Focused score report with L0 summary | L0/L1/L2 multi-level critique report |
| **Iteration** | May be invoked once or re-invoked for re-scoring | Iterates within the H-14 cycle |
| **Invocation** | Via `/adversary` skill | Via `/problem-solving` skill |
Both agents produce comparable scores from the same rubric; the choice depends on whether you need standalone assessment (adv-scorer) or iterative critique with revision guidance (ps-critic).
---
## Available Agents
| Agent | Role | Model | Output Location |
|-------|------|-------|-----------------|
| `adv-selector` | Strategy Selector - Maps criticality to strategy sets | haiku | Strategy selection plan |
| `adv-executor` | Strategy Executor - Runs strategy templates against deliverables | sonnet | Strategy execution reports |
| `adv-scorer` | Quality Scorer - LLM-as-Judge rubric scoring | sonnet | Quality score reports |
---
## P-003 Compliance
All adversary agents are **workers**, NOT orchestrators. The MAIN CONTEXT (Claude session) orchestrates the workflow.
```
P-003 AGENT HIERARCHY:
======================
+-------------------+
| MAIN CONTEXT | <-- Orchestrator (Claude session)
| (orchestrator) |
+-------------------+
| | |
v v v
+------+ +------+ +------+
| adv- | | adv- | | adv- | <-- Workers (max 1 level)
|select| |exec | |scorer|
+------+ +------+ +------+
Agents CANNOT invoke other agents.
Agents CANNOT spawn subagents.
Only MAIN CONTEXT orchestrates the sequence.
```
---
## Invoking an Agent
### Option 1: Natural Language Request
Simply describe what you need:
```
"Run an adversarial review of this ADR at C3 criticality"
"Score this deliverable with LLM-as-Judge"
"What strategies should I apply for a C2 review?"
"Run Devil's Advocate and Steelman on this design document"
"Execute a full C4 tournament review on the architecture proposal"
```
The orchestrator will select the appropriate agent(s) based on keywords and context.
### Option 2: Explicit Agent Request
Request a specific agent:
```
"Use adv-selector to pick strategies for C3 criticality"
"Have adv-executor run S-002 Devil's Advocate on the ADR"
"I need adv-scorer to produce a quality score for this synthesis"
```
### Option 3: Task Tool Invocation
For programmatic invocation within workflows:
```python
Task(
description="adv-selector: Strategy selection for C3",
subagent_type="general-purpose",
prompt="""
You are the adv-selector agent (v1.0.0).
## ADV CONTEXT (REQUIRED)
- **Criticality Level:** C3
- **Deliverable Type:** Architecture Decision Record
- **Deliverable Path:** docs/decisions/adr-042-persistence.md
## MANDATORY PERSISTENCE (P-002)
Create file at: {output_path}
## TASK
Select the strategy set for C3 criticality per SSOT.
"""
)
```
---
## Dependencies / Prerequisites
The adversary skill depends on external artifacts created by other enablers. These MUST be in place before the skill is fully operational.
### Strategy Template Files
All 10 strategy templates in `.context/templates/adversarial/` are created by separate enablers:
| Template | Source Enabler | Status |
|----------|---------------|--------|
| `s-001-red-team.md` | EN-809 | Created by EN-809 |
| `s-002-devils-advocate.md` | EN-806 | Created by EN-806 |
| `s-003-steelman.md` | EN-807 | Created by EN-807 |
| `s-004-pre-mortem.md` | EN-808 | Created Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.