Agent skill · software engineering · sickn33
logic-diff
Compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side.
Why this skill is useful
Adds specific procedures for semantic equivalence checking that the AI wouldn't reliably generate on its own.
What it needs
About 2k tokens when loaded. Last updated 2026-08-07. 44,571 stars on the source repository.
What this skill does
Logic-Lens — Semantic Diff When to Use Use this skill when you need compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side. Trigger when the user shares a refactor, rewrite, migration, or A/B implementation and wants to confirm behavior is unchanged — "did I break anything", "is this equivalent", "are... Setup Use lazy loading per ../shared/common.md §13: 1. Read ../shared/common.md only for language, Iron Law, Verdict header, scope routing, Remedy discipline, config fields, and loading budget. 2. Read only the relevant step in logic-diff-guide.md as you reach it. 3. Load ../shared/logic-risks.md, ../shared/semiformal-guide.md, ../shared/semiformal-checklist.md, and ../shared/report-template.md on demand when the current step needs them. Process Step 0. Language + scope routing. Detect language per common.md §1. Confirm two versions are provided. If only one version, switch to logic-review. Step 1. Identify the shared specification (guide Step 1) — what inputs should both versions handle; what outputs/side effects are expected. If the user states the refactor intentionally changed behavior in a specific area (e.g., "I changed the error path to raise instead of returning None"), record that as a declared spec change and treat divergences within that area as expected. Flag only divergences outside the declared change as findings. Step 2. Build independent premises for each version (guide Step 2) — apply the Premises Construction Checklist to Version A and Version B separately. Step 3. Trace both versions for the common case (guide Step 3) — parallel trace, same input, note the first divergence if any. Step 4. Trace boundary cases (guide Step 4) — empty/null/zero, max/min, error inputs, first/last of collections. Start with at most three highest-risk boundary scenarios unless the user asks for exhaustive equivalence or the shared specification requires more. Step 5. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sickn33/logic-diff--50e541