skills/requirements/requirement-comparison-reporter/SKILL.md
Compares two versions of a requirements document and reports additions, removals, semantic changes, and scope drift — distinguishing clerical edits from meaning changes. Use when a spec was revised, when checking if a new version of a standard affects you, or when the user asks what changed between spec versions.
npx skillsauth add santosomar/general-secure-coding-agent-skills requirement-comparison-reporterInstall 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 text diff of two specs is noise. Every reworded sentence shows as changed. The useful question is: what changed in meaning?
| Change class | Meaning impact | Example | | --------------------- | -------------- | -------------------------------------------------------- | | Added | New obligation | v2 adds: "MUST support TLS 1.3" | | Removed | Dropped obligation | v1 had: "MUST support TLS 1.0" — gone in v2 | | Strengthened | Tighter constraint | "SHOULD encrypt" → "MUST encrypt"; "under 1s" → "under 500ms" | | Weakened | Looser constraint | "MUST validate" → "SHOULD validate"; "all inputs" → "user-facing inputs" | | Scope change | Same constraint, different applicability | "Applies to all endpoints" → "applies to public endpoints" | | Clerical | None | Typo fix, renumbering, example added |
Match v1 requirements to v2 requirements. Don't diff line-by-line; diff requirement-by-requirement:
For each (v1_req, v2_req) pair, extract the claim structure:
| Component | Extract | | ---------------- | ---------------------------------------------------- | | Modal | MUST / SHOULD / MAY / MUST NOT | | Subject | Who/what the requirement is about | | Predicate | What they must/should/may do | | Condition | "When X", "if Y", "unless Z" | | Quantity | Numbers, ranges, thresholds |
Diff component-by-component. Modal change = strengthen/weaken. Quantity change = strengthen/weaken (direction depends). Condition change = scope change.
v1 §4.2: "The server SHOULD log authentication failures. Logs should be retained for at least 30 days."
v2 §4.2: "The server MUST log all authentication events (success and failure) with timestamp, source IP, and user identifier. Logs MUST be retained for 90 days in tamper-evident storage."
Component diff:
| Component | v1 | v2 | Delta | | ------------ | --------------------------- | ------------------------------------------- | ---------------------- | | Modal | SHOULD | MUST | Strengthened | | Subject | server | server | Same | | Predicate | log auth failures | log all auth events + required fields | Scope expanded (failures → all events) + Added (field requirements) | | Quantity | 30 days | 90 days | Strengthened (longer retention) | | Condition | (none) | tamper-evident storage | Added (storage constraint) |
Impact: Existing implementation that logs failures only, 30-day retention, to a regular file: now non-compliant on 4 points. This is not a clerical revision.
Watch for weakening disguised as addition:
v1: "All API responses MUST be validated against the schema." v2: "All API responses MUST be validated against the schema, except during maintenance windows."
Text diff shows an addition. Semantic diff shows a weakening — the exception carves out a case where the constraint doesn't hold.
## Documents
v1: <name/version/date>
v2: <name/version/date>
## Summary
| Class | Count |
| ------------ | ----- |
| Added | |
| Removed | |
| Strengthened | |
| Weakened | |
| Scope change | |
| Clerical | <not itemized> |
## Added
| v2 ref | Text | Impact |
| ------ | ---- | ------ |
## Removed
| v1 ref | Text | Was anyone relying on this? |
| ------ | ---- | --------------------------- |
## Strengthened
| v1 ref | v2 ref | v1 | v2 | Delta | Implementations affected |
| ------ | ------ | -- | -- | ----- | ------------------------ |
## Weakened
<same columns — flag "hidden weakenings" via exception clauses>
## Scope changes
<same>
## Compliance impact
<for a known implementation: which changes break compliance, prioritized>
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.