lawve-ai/ambiguity-stress-test
>- Adversarially stress-tests a legal text — a contract, statute, regulation, or people governed by it will later disagree about what it means and turns each into a concrete dispute scenario with both sides' arguments, the likely outcome, and a fix. Use it whenever someone wants to pressure-test, red-team, audit, or find weak spots, loopholes, gaps, ambiguities, or drafting problems in a legal document; whenever a drafter wants to tighten a contract, statute, regulation, or opinion before it issues; whenever a litigator wants to mine an opinion or contract for arguments; or whenever someone hands over a legal text and asks where it will be fought over or for issue-spotting. Trigger it for contract review, statutory-ambiguity analysis, judicial-opinion scope analysis, and drafting QA — even if the user never says "stress-test" or "ambiguity."
npx skills add https://github.com/lawve-ai/awesome-legal-skills --skill ambiguity-stress-test
Adversarially stress-test a legal text for the places where the people governed by it will later disagree about what it means. For each weak seam, produce a concrete dispute scenario: a realistic fact pattern, both sides' arguments, the likely outcome, and a fix. The text can be a contract, a statute, a regulation, or a judicial opinion.
The skill rests on one principle — generalize the detector, keep the resolver modular. The machinery that *finds* ambiguity (parse, scan, construct an edge-case scenario, frame two plausible readings) is the same for every legal text. The machinery that *resolves* it is not: contract ambiguity is settled by recovering the parties' bargain, statutory ambiguity by the canons of construction, regulatory ambiguity by the canons plus the enabling act, and a judicial opinion's by the doctrines of precedent. So the skill has a general core (this file) and four domain profiles (in resources/). Run the core; load the one profile that matches the document.
The product is disputes, not flags. A linter says "this term is vague." This skill instead invents the two people who would each, plausibly, win if their reading prevailed — and the money or liberty riding on the answer. A latent ambiguity is invisible to a non-specialist until someone shows them the collision it will cause.
Steps 1–4 are the engine, identical across profiles. The profile supplies the domain-specific defect families, a lexicon, the competing interpreters, the doctrines that drive the likely outcome, the redraft register, and any quality-bar adjustment.
Identify the document type and read the matching reference file before scanning:
| Document | Profile file |
|----------|--------------|
| Contract, agreement, lease, NDA, employment offer, policy, terms of service | resources/contract.md |
| Statute, code section, ordinance, enacted bill | resources/statute.md |
| Regulation, agency rule, administrative code provision | resources/regulation.md |
| Judicial opinion, court decision, or a draft opinion | resources/opinion.md |
If the text is some other normative document (a will, a treaty, an insurance policy, a set of bylaws), run the nearest profile and state plainly which interface elements do not fit. If the input mixes types — a statute and the regulation under it, say — run each through its own profile and also look across the link.
Segment the text into addressable units and build four working lists: every defined term; every operative provision (a right, duty, or power — "shall," "may," "is entitled to"); every trigger or condition ("if," "provided that," "upon," "in the event of"); and every grant of discretion or unilateral power.
For statutes and regulations, also extract every cross-reference to another instrument — the most serious defects live in those links. For a judicial opinion, also map the structural parts — holding, supporting reasoning, dicta, disposition, and any separate opinions — because an opinion's operative rule is latent and must be reconstructed before it can be tested.
Run the universal trigger lexicon and the active profile's lexicon over every unit, then run the seven-question diagnostic battery over every flagged unit and over the text as a whole. Classify each confirmed defect into one of the six universal families or a profile-specific family. Spend attention where disputes actually originate — definitions, triggers, conditions, grants of discretion, cross-references — and ignore boilerplate (headings, recitals, counterparts clauses).
Six families apply to any legal text. Each profile adds its own; these six are the floor.
Families overlap by design. Aim for coverage, not clean partitions.
Flag a unit for inspection when it contains:
The profile's reference file adds domain-specific trigger words to this list.
Run seven questions over every flagged unit and over the whole text: the six family questions above, plus a seventh — term consistency: is each defined term used consistently, and do undefined near-synonyms appear that an adversary could argue mean something different? A unit that survives all seven is sound. A unit that fails one is a scenario candidate. The profile adds its own family questions to the battery.
Finding the defect is half the skill; turning it into a scenario a non-specialist instantly understands is the other half. Five rules govern construction.
Narrative template. Sentence 1–2: the triggering event. Sentence 3: the first interpreter's position and the consequence claimed. Sentence 4: the second interpreter's counter-position. The narrative stops mid-dispute — it poses the question; the analysis layer answers it.
Gauntlet. The statute and regulation profiles add a *canon gauntlet*, and the opinion profile a *precedent gauntlet*: run each candidate ambiguity through the profile's interpretive doctrines and keep it only if it remains genuinely contestable *after* those doctrines are applied. An "ambiguity" the doctrines would dispatch in one paragraph is a false positive — drop it. The contract profile has no gauntlet; four-corners resolution is acceptable there.
Applies to the statute, regulation and opinion profiles. The contract profile resolves from the instrument itself and skips this section entirely — do not spend effort surveying sources for a contract audit.
The doctrines dispatch some false positives; existing case law dispatches others. A seam a court has already construed is not a live disagreement, and reading the instrument alone will never reveal that. This step exists to catch that class of false positive, and nothing more.
Take the first of these that applies. Decide once per audit, not once per scenario.
Prefer the doctrine to the citation. The likely_outcome field calls for the interpretive doctrine that drives the prediction — *ejusdem generis*, the rule of lenity, *contra proferentem*, the presumption against surplusage. Doctrines are stable; case citations go stale, and an unverified one is worse than none.
Name a specific case only where the research step actually verified it in this session. Where a scenario's outcome would turn on a case that could not be verified, state the doctrine and mark the case as unverified rather than dropping it silently.
Every audit ends with one line naming the source used — or stating that none was available and that the scenarios were not checked against existing case law. Two people auditing the same statute, one with a legal-research connector and one without, will get different results. That is expected. It only looks like unreliability when the output does not say which run produced it.
Emit each scenario as a record with seven fields. The first three are the visible "card"; the last four are the analysis layer.
| Field | Content |
|-------|---------|
| title | ≤ 8 words, naming the defect category in plain language |
| narrative | 3–6 sentences, the Step 3 template, present tense, neutral voice |
| anchors | one or more provision IDs (native citations, not positional guesses); multiple anchors = a cross-clause or cross-instrument defect |
| defect_family | one universal family or a profile-specific family |
| weak_point | one sentence naming the precise textual flaw |
| likely_outcome | predicted resolution and the interpretive doctrine that drives it — supplied by the profile |
| redraft | proposed replacement or added language that closes the seam, in the profile's drafting register |
Only likely_outcome and the register of redraft are domain-specific; the core produces everything else unchanged. The judicial-opinion profile modifies this schema (a redraft becomes a tightening of the opinion, or in retrospective mode is replaced by an argument pair) — see resources/opinion.md.
Hedge predicted outcomes; they are predictions, not pronouncements. When the user asks for an audit rather than highlights, report coverage — every defect the scan surfaces — not just the marquee few.
Close every audit with a one-line sources note recording what the research step used, per "Say what happened" above. On a contract audit the note reads that the instrument was read on its own terms and no research step applies.
The skill detects interpretive ambiguity, not validity. A contract can be perfectly clear and wholly unenforceable; a statute can be unambiguous and unconstitutional. Run from the four corners, the detector will not catch either — clarity is not legality. The statute and regulation profiles reach slightly outside the text where their domain demands it (constitutional-avoidance and ultra vires families), but that is ambiguity-detection shading into validity, not a systematic legality audit. If the user wants a validity or enforceability opinion, say so plainly and treat it as a separate pass.
The detector is jurisdiction-neutral. The six defect families, the trigger lexicon and the seven-question battery work on any normative text in English, because they turn on how language behaves rather than on whose law governs.
The resolvers are not. All four profiles run on United States doctrine — the canons of construction, the enabling-act and ultra vires frame, and the American law of precedent — and the worked examples are United States materials. Outside that system the scanning half transfers and the likely_outcome half does not. When the text is plainly from another jurisdiction, run the scan, and either state that outcomes are predicted on a United States interpretive frame or substitute the local doctrines and say so.
Read the one profile matching the document; do not read all four.
resources/contract.md — contracts, agreements, leases, policies, terms of service.resources/statute.md — statutes, code sections, ordinances, enacted bills.resources/regulation.md — agency rules and administrative code; builds on the statute profile, which must be read as well.resources/opinion.md — judicial opinions, including drafts; carries the two output modes and a worked example.This skill produces interpretive analysis of a legal text. It is not legal advice, it does not determine anyone's rights, and its predicted outcomes are predictions rather than answers. Nothing it produces should be filed, relied upon, or sent to a counterparty without a lawyer's own reading of the instrument.
Five risks are worth naming.
Predictions are hedged for a reason. The likely_outcome field states how the governing doctrines would probably resolve a seam. Courts resolve seams differently, and a scenario built precisely so that either side could win is by construction one whose outcome is uncertain.
Currency depends on the research step. Without a legal-research source, the skill has no way to know that a court already construed the language, or that an audited opinion has been narrowed or overruled. The sources note discloses which run produced the audit; read it before relying on the result.
False negatives are invisible. The scan finds defects reachable from the text and from whatever research ran. A defect that depends on trade usage, on a course of dealing between the parties, on an unprovided schedule or exhibit, or on an unresolvable cross-reference will not appear — and its absence looks identical to its non-existence.
False positives survive in proportion to what was checked. The doctrinal gauntlets drop ambiguities the canons would dispatch; only the research step drops ones the case law has already dispatched. A four-corners-only run will over-report.
Scenarios are adversarial constructions. Each is built to make a genuine contest out of an edge case, which means the facts are chosen for difficulty rather than for likelihood. A seam that would rarely arise in practice can read as urgent. Weight them accordingly.
The skill contains no executable code, makes no network calls of its own beyond whatever research tool the host provides, and moves no data outside the session.
Take lawve-ai/ambiguity-stress-test from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.