skills/requirements/ambiguity-detector/SKILL.md
Detects ambiguity in natural-language requirements — weak words, dangling references, underspecified quantities, conflicting interpretations — before they become implementation bugs. Use when reviewing requirements, when a spec uses words like "appropriate" or "fast", or when two engineers read the same requirement and built different things.
npx skillsauth add santosomar/general-secure-coding-agent-skills ambiguity-detectorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A requirement is ambiguous if two reasonable people can read it and disagree on what it says. Every ambiguity is a future bug, a future argument, or both.
| Type | Signal words/patterns | Example | | ---------------------- | ------------------------------------------------ | -------------------------------------------- | | Vague qualifier | "fast", "appropriate", "user-friendly", "robust", "efficient", "secure" | "The system should respond quickly" — how quickly? | | Dangling reference | "it", "this", "the above", "as needed" | "Validate input and log it" — log the input or the validation result? | | Unquantified | "some", "most", "several", "regularly" | "Cache most recent entries" — how many? | | Ambiguous scope | "all", "any", "each" with unclear domain | "All users can view reports" — all users, or all authorized users? | | Underspecified conjunction | "and/or", "either", "unless" | "Accept JSON or XML" — both? pick one? configurable? | | Passive voice hiding actor | "will be validated", "must be logged" | "Input will be validated" — by whom? client? server? both? | | Temporal ambiguity | "eventually", "after", "when", "periodically" | "Notify the user when the job completes" — immediately? next login? | | Negative scope | "not ... and/or ..." | "Not A and B" — ¬(A∧B) or (¬A)∧B? |
For each flagged phrase: can you write two concrete implementations that both satisfy the text but behave differently? If yes, it's ambiguous.
Requirement: "The search should return relevant results."
Both "return relevant results." Different systems. Flag it.
Requirement as written:
The API should handle concurrent requests efficiently. When the load is high, requests may be queued. Large payloads should be rejected with an appropriate error.
Scan:
| Phrase | Type | Two interpretations | | -------------------------- | ------------------ | ------------------------------------------------------------ | | "efficiently" | Vague qualifier | (a) p99 < 100ms under 1k RPS. (b) No more than 2× single-request latency at any load. | | "the load is high" | Unquantified | (a) > 80% CPU. (b) > 500 concurrent requests. (c) queue depth > N. | | "may be queued" | Ambiguous modality | (a) queueing is permitted. (b) queueing is what happens (mandatory). | | "Large payloads" | Unquantified | (a) > 1 MB. (b) > 10 MB. (c) configurable. | | "appropriate error" | Vague qualifier | (a) HTTP 413. (b) HTTP 400 with message. (c) close the connection. | | "should" (×2) | Weak modal | "should" vs "must" — is this optional? |
Rewrite prompt (feed to → requirement-enhancer):
The API MUST handle at least {N} concurrent requests with p99 latency under {T} ms. When concurrent requests exceed {N}, additional requests MUST be queued (max queue depth {Q}; beyond that, respond 503). Payloads exceeding {S} bytes MUST be rejected with HTTP 413 and body
{"error": "payload_too_large", "max_bytes": {S}}.
The {N}, {T}, {Q}, {S} are holes for the stakeholder to fill. The ambiguity detector's job is to surface the holes, not fill them.
Some "weak" words are fine in context:
| Looks ambiguous | Actually fine when | | -------------------------- | ----------------------------------------------------------- | | "the user" | There's only one kind of user in the system | | "the database" | Single-database architecture | | "standard format" | A standard is cited elsewhere in the doc (check!) | | "as described above" | "Above" is the immediately preceding numbered item |
Don't flag mechanically. Check if context resolves it.
## Requirement (verbatim)
<text>
## Ambiguities
| # | Phrase | Type | Interpretation A | Interpretation B | Resolution needed |
| - | ------ | ---- | ---------------- | ---------------- | ----------------- |
## Questions for stakeholder
1. <concrete question whose answer resolves ambiguity #N>
...
## Suggested restructure
<template with {HOLES} for the stakeholder to fill — not filled in>
development
Extracts human-readable pseudocode from a verified formal artifact (Dafny, Lean, TLA+) while preserving the verified properties as annotations, so the proof-carrying logic can be reimplemented in a production language. Use when porting verified code to an unverified target, when documenting what a formal spec actually does, or when handing a verified algorithm to an implementer.
development
Translates natural-language or pseudocode descriptions of concurrent and distributed systems into TLA+ specifications ready for the TLC model checker. Identifies state variables, actions, type invariants, safety properties, and liveness properties from the description. Use when formalizing a protocol, when the user describes a distributed algorithm to verify, when designing a consensus or locking scheme, or when starting formal verification of a concurrent system.
testing
Reduces a TLA+ model so TLC can actually check it — shrinks constants, adds state constraints, abstracts data, or applies symmetry — when the state space is too large to enumerate. Use when TLC runs out of memory, when checking takes hours, or when a spec works at N=2 and you need confidence at larger scale.
development
TLA+-specific instance of model-guided repair — reads a TLC error trace, identifies the enabling condition that should have been false, strengthens the corresponding action, and maps the fix to source code. Use when TLC reports an invariant violation or deadlock and you have the code-to-TLA+ mapping from extraction.