/verification-foundation:adversarial-legal-review-enfrom verification-foundation
A red team for a high-stakes deliverable - takes a finished, high-stakes document (a legal opinion, a DD/M&A memo, a court/board submission, a recommendation) and runs an adversarial debate: a builder constructs the strongest version of the thesis, an attacker tears it apart with counter-arguments and contrary authority, a synthesizer reconciles, a verifier does a final check. Goal: find the weakness BEFORE your opponent, the court, or the client does. Cost-gated - for high-stakes work only, not every query (token-expensive). Use when: "attack this opinion", "red team", "devil's advocate for this document", "find the weaknesses", "stress-test the argument", "what will the other side say", "pre-mortem", "defend this thesis", "adversarial review", verifying a high-stakes deliverable before it goes out. English counterpart of adversarial-legal-review-pl (this version drops the Polish case-law layer and is jurisdiction-agnostic).
Trending skills
7-day visitors to each skill page
Ships in verification-foundation. 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.
Better your own agent finds the weakness in your thesis than your opponent finds it in the hearing.
A single LLM pass produces an argument that sounds confident - because the model is trained to sound confident. That is an illusion of competence. The real value of an expert is to foresee the counter-argument, the contrary authority, and the gap in reasoning before the other side does. This skill institutionalises the adversarial move: one agent defends, one attacks, one reconciles, one verifies.
This is NOT writing a deliverable from scratch. It is a stress-test of a finished deliverable.
The full cycle is token-expensive. Run it only for high-stakes work:
| Run (high-stakes) | Do NOT run (routine) |
|---|---|
| A legal opinion going to a client | An internal note |
| Due diligence / an M&A memo | A summary of a judgment |
| A court submission before a deadline | A working draft |
| A recommendation to a board | FAQ, marketing content |
| A position carrying material financial or reputational risk | A routine query |
If the matter is not high-stakes, say so plainly and offer an ordinary single-pass review instead of the full debate. Do not burn tokens on routine work.
Each role is a separate pass with a clean mandate. Pseudonymise the input (e.g. with a humaniser/anonymiser step) if the document contains privileged or personal data.
Reviewers split into two tiers with DIFFERENT access - this is deliberate, not an accident:
In single-agent mode (one LLM simulating the roles), isolation is prompt discipline, not a hard sandbox - explicitly instruct the ISOLATED role not to reach for sources. Hard isolation via separate passes is the premium option.
Assess whether the matter qualifies (table above). If not, stop and offer an ordinary review.
Build the strongest possible argument for the deliverable's thesis. Gather the best rules, authority, and doctrine. Goal: give the attacker a hard target, not a straw man. Output: thesis + 3-7 pillars (each with its legal/evidentiary basis).
Attack each pillar like an opposing counsel / a sceptical court:
For each pillar decide: survived / weakened / defeated / UNCERTAIN (UNCERTAIN carries a subcategory - see 4b). State what is left of the thesis after the attack, where the deliverable needs reframing, where a caveat is required ("contested risk, authority is split"). Output: a table of pillar -> verdict -> recommended change.
Priority hierarchy (when charges collide): Logic (consistency) ~ Citations (grounding) ~ Counter-arguments > Style > Clarity. The substantive layer (logic/citations/counter-arguments) NEVER trades against itself - on conflict, accumulate BOTH views and add a caveat, do not pick arbitrarily. Style and clarity NEVER override substance. The synthesizer writes only actionable change instructions; it ignores trivia (nice_to_have) and charges from reviewers who already accepted a pillar.
A mechanical and substantive check of the synthesised deliverable:
The debate is not single-pass. The synthesizer may order an edit and run the draft through the attack again - but within hard limits, with a guarantee that we never ship a worse version than the best one seen.
draft_v1 (after the first synthesis), draft_v2... Each iteration = targeted edits from the synthesizer's recommendation, then a re-attack + verification.aggregate_score (0-100) = the mean of: verifier (X/10 -> x10) + consistency (ISOLATED, 0-100) + grounding (AUGMENTED, 0-100). Hard component: the citation grounding check (mechanical) - any failure is a blocker regardless of score (guards against a false revert on a subjective LLM score).v_best: after each iteration, remember the draft with the highest aggregate_score.The synthesizer owns the exit decision. Tree (evaluate in order):
approved_on_vN.aggregate_score(vN) < aggregate_score(v_best) -> reject vN, restore v_best, exit forced_exit_on_v<best>_with_remaining_issues + a banner "round N made the deliverable worse - reverted to the best version".accepted_early_on_vN (do not burn tokens on marginal gains).forced_exit_at_max + a banner listing the unresolved blockers.The final verdict is NOT the verifier's overall impression. It is computed from an explicit formula:
Step A - critical conditions (any one met -> FAIL, stop counting):
Step B - weighted score. Each pillar gets a weight from the synthesizer's verdict:
| Pillar verdict | Weight |
|---|---|
| survived | 1.0 |
| weakened | 0.5 |
| UNCERTAIN (either subcategory) | 0.25 |
| defeated | 0.0 |
score = sum of weights / number of pillars. Score < 0.6 -> FAIL.
Step C - conditional threshold. Two or more pillars weakened or UNCERTAIN -> at most SEND_CONDITIONALLY (list the conditions: which caveats to add, which evidence to supply). Otherwise PASS.
Weights and thresholds are printed in the skill on purpose: an auditor must be able to reproduce the verdict from the numbers alone, without asking the model "why". That is the AI Act art. 12 record-keeping requirement turned into arithmetic. The same three steps (A critical -> B weighted -> C conditional) run in the fidelity check; only the weights differ, because the material differs (thesis pillars vs analysis findings).
Where UNCERTAIN comes from: when the synthesizer has no basis to rule on a pillar, it does not force a verdict. It writes UNCERTAIN with a subcategory - INSUFFICIENT_EVIDENCE (the material is missing; say what and where to get it) or SOURCE_AMBIGUOUS (the material is there but does not settle the point; say where the ambiguity sits). UNCERTAIN in the verdict table caps the outcome the same way a weakened pillar does, and it is never quietly rounded to "survived".
The builder/attacker debate is a staged dispute: the same model plays both roles and can be wrong in the same place at the same time. The dissent panel catches a different error - an interpretation one pass treats as obvious that is not obvious at all.
When (explicit cost gate). Only for LOAD-BEARING clauses and theses: those the outcome of the matter turns on, at stakes already qualified as high (section 0). Every independent vote is a separate full pass, so the panel gets 0 questions by default; name at most 1-2 pillars where a split reading genuinely changes the verdict. If no pillar clears that bar, do not run the panel and say so in the report.
Protocol.
FINDING format in the deliverable:
FINDING - panel split (s. 8, liquidated damages):
Vote A (model X): option B - "damages stipulated for non-performance" (confidence: high)
Vote B (independent pass): option C - "for the contractor's fault" (confidence: medium)
Re-vote after evidence (<authority>, <source>): split holds.
Pillar verdict: UNCERTAIN (SOURCE_AMBIGUOUS) - lawyer's decision.
Fit with the rest of the skill (dissent plugs in, it does not duplicate). The panel's verdict enters the synthesizer's table like any other: an unresolved split = UNCERTAIN with weight 0.25 in the verdict function (4b), so 2+ such pillars pull the outcome to SEND_CONDITIONALLY on their own. A panel re-vote does NOT count as a revision round under the bounded loop - the per-stakes cap covers edits to the deliverable after the verifier, while the panel has its own, harder cap: one vote + one repeat with evidence. Escalation to a human is the same mechanism as forced_exit_at_max in the exit tree.
Every ending MUST produce an artefact for the human (a full review block or a markdown fallback). Never a silent / empty exit. Terminal states:
approved_on_vN | accepted_early_on_vN | forced_exit_on_v<best> (regression) | forced_exit_at_max | failed_with_fallback (e.g. no source data - deliver what you have + the reason).
The banner always shows: the terminal state, which draft version was delivered, what blockers remain.
Governance: the skill produces a recommendation + draft versions; it does NOT send the document. The decision to "send despite forced_exit_at_max with blockers" stays with the human (parity ends before the external act). A transcript of all versions v1..vN is an attachment for an audit bundle as evidence of bounded revision and any revert (AI Act art. 12/14).
## Adversarial review - <deliverable name>
Stakes: HIGH (qualifies)
Iterations: v2 (best=v2) | Terminal state: accepted_early_on_v2 | aggregate_score: 78 -> 86
Thesis pillars: 5 | Survived: 2 | Weakened: 1 | Defeated: 1 | UNCERTAIN: 1
| Pillar | Attack (strength) | Verdict | Action |
|------------------------------|---------------------|-----------|------------------------------|
| Basis of the claim | none (low) | survived | no change |
| Line of authority | <case> (high) | defeated | remove or add a caveat |
| ... | ... | ... | ... |
Verifier check: 9/10 OK. Point 1 (grounding): 1 citation failed - BLOCK.
Verdict function: Step A (critical) YES - failed citation -> FAIL. Step B for the record: (1.0+1.0+0.5+0.25+0.0)/5 = 0.55 (< 0.6).
Confidence level after the debate: MEDIUM (1 pillar UNCERTAIN, authority is split on 1 pillar).
Recommendation: do NOT send before (a) fixing the failed citation, (b) adding a caveat to the defeated pillar.
[terminal-state banner - examples]
- forced_exit_on_v1: "Round 2 lowered aggregate_score (84 -> 79) - reverted to v1. Blockers remain: 1 citation failed."
- forced_exit_at_max: "3 rounds exhausted, blockers remain: pillar III still has no contrary authority addressed. Delivered v3 - the decision to send is yours."
Return the full debate transcript (builder/attacker/synthesizer) as an attachment to an audit bundle - it is the evidence of adversarial verification.
Adversarial verification + an explicit confidence level + a transcript = operationalising human oversight (art. 14) and documentation (art. 12). The human gets not a "finished answer" but a map of what survived the attack and with what confidence - and decides on that basis.
An expert panel = a multi-perspective analysis of a business decision by 5-7 personas (a workshop product). This skill = an adversarial stress-test of ONE deliverable (thesis vs antithesis vs synthesis vs verification). The panel looks broad; the adversarial review looks deep.
The pattern (debate + 3-layer verification) is inspired by AnttiHero/lavern (Apache 2.0). Roles, prompts and the 10-point check are written from scratch. Three further lavern patterns arrived in v1.1.0, each adapted from scratch and ported from the Polish twin to close a twin divergence: UNCERTAIN as a first-class verdict (section 3/4b), the deterministic verdict function with explicit weights (4b), and the dissent panel (4c; multiple-choice question to independent votes, a split shown verbatim as a FINDING, a resolve loop authority -> re-vote -> escalation, adapted from lavern's src/mcp/tools/dissent.ts with jurisdiction-neutral sources and a one-round re-vote cap). Bounded self-revision (the exit tree with regression-revert), reviewer access tiers (isolated/augmented), mediator conflict-priority and the always-deliver invariant are adapted clean-room from gregmos/memoforge (MIT) - concepts of loop control and roles, not prompts or code. Polish counterpart: adversarial-legal-review-pl.
These rules apply to every skill in this plugin, including where the skill itself is silent. They are copied into each skill, so they hold whether you install the whole plugin or a single skill.
If an error would pass without being stopped by layers 1-5, the fault is in the skill. Fix the tool, do not add a note. "This is not legal advice" stops no error and transfers no responsibility.
(GDPR Art. 6), (Case C-311/18, CJEU).[check on EUR-Lex].The tag sits next to the line it concerns. A case number that exists is not enough - check the content.
Nothing is sent, filed, signed or published before a qualified person checks and approves it. A skill output is a draft, not a finished document.
The verification foundation is jurisdiction-neutral - the method, not the substance of any one legal system. It connects to no external source (no MCP connectors) and makes no outbound calls of its own; what you type still goes to your configured model (see https://github.com/matematicsolutions/awesome-matematic-skills-en/blob/main/TRUST.md). Substance comes from separate plugins (eu-law-sources). Deep national law (e.g. Polish case law) lives in the Polish marketplace, by design.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 skills in this plugin
/citation-extraction-enExtracts the legal citations from an English-language text by pattern and rule, with no LLM in the extraction step, so the same text yields the same list every run - ECLI (CJEU and national), EU act identifiers (CELEX, Official Journal references, Regulation and Directive numbers), case names, and cited provisions (Article/section). It then normalises, deduplicates and resolves short references (ibid., id., supra, op. cit., the above-cited judgment) to their antecedent. The front end to verification: collect what is cited, then check it. Unusual or malformed citation formats can still be missed, so treat the output as a working list rather than a guarantee. Jurisdiction-neutral, EU-aware. Use when: "list every citation in this text", "what authorities are cited", "extract the provisions", "pull the case references", "what is cited here" - before verification or before sending.
/clause-checklist-enA clause checklist for a single contract - walks the contract against 41 clause categories (the CUAD taxonomy), assesses which of them this deal needs, and marks each applicable one present / absent / risky, so the clause that should be there but is missing does not slip through. Extractive (quotes the contract, does not paraphrase). Common-law native, jurisdiction-neutral framing. Different from a bulk audit - this goes deep on one contract and asks "what is missing and what bites here". Pairs with adversarial-legal-review-en and reviewer-en. Use when: "check the clauses in this contract", "what is missing from this agreement", "clause spotting", "contract checklist", "review a single contract", "which clauses are risky" - before signing, in negotiation, or in DD of one contract.
/deliverable-fidelity-enChecks whether the final document still carries what the analysis actually found. Takes the list of findings with their severities and the finished deliverable, runs a mechanical coverage check with a bundled zero-dependency script, then an LLM spot-check on the RED findings for tone-downgrading, and returns a deterministic verdict PASS / CONDITIONAL_PASS / FAIL from published weights and thresholds. An omitted RED finding blocks. The third axis of verification, next to citation checking (are the sources real) and adversarial review (does the thesis hold): this one asks whether the summary is faithful to the analysis. Jurisdiction-neutral. Use when: "does the summary cover everything", "did anything drop out of the executive summary", "fidelity check", "is the deliverable faithful", "check the memo against the findings" - before sending any document that summarises a longer analysis.
/intake-sufficiency-enScores whether an instruction or brief is complete enough to start work on. Before any legal analysis begins, checks that the purpose, scope, parties, facts, constraints and success criteria are actually present; lists the gaps and ambiguities; turns each gap into a question ready to send to the client; and drafts the skeleton of a matter card. Separates the client's legal assertions from facts and marks them for verification. The mirror of legal-request-router-en: the router decides what control the OUTPUT needs, this decides whether the INPUT is enough to begin. Jurisdiction-neutral. Use when: "do I have enough to start", "score this brief", "what is missing from this instruction", "what should I ask the client", "is this instruction complete", "gaps in the brief", "intake" - at the start of a matter, after first contact, after an intake call.
/judicial-first-impression-enAssesses a legal submission or structured argument from the perspective of a judge reading it COLD, under time pressure, with a docket of several hundred cases. Returns a structured seven-part assessment: what the case appears to be about, immediate points of confusion, what feels strong, what feels weak, what is assumed but unproved, a provisional confidence level (low/medium/high), and what would be needed to persuade. The skill does NOT rewrite, does NOT improve and does NOT attack the submission - it tells you how it actually LANDS on an experienced, sceptical reader with no prior context. Works on statements of claim, appeals, skeleton arguments, motions, position statements, pre-action letters and any structured reasoning. Use when: "how will the court read this", "first impression", "is this clear to the judge", "cold reader test", "how does this land", before filing a court submission./legal-request-router-enTriage for a legal request. Looks at the question (and optionally the finished deliverable) and decides which verification path to run: plain answer, citation checking, adversarial review, or the full route. Scores complexity and risk and returns a routing decision with its reasoning and an ordered list of skills to run. A layer above the verification layer: it stops routine work from burning tokens on ceremony, and stops high-stakes work from shipping unchecked. Jurisdiction-neutral. Use when: "what should I do with this", "does this need a full review", "which path", "classify this request", "is this high-stakes", "triage", "routing" - at the start of a new legal request, before picking tools.
npx claudepluginhub matematicsolutions/awesome-matematic-skills-en --plugin verification-foundation