reasoning-semiformally

Applies structured certificate templates to verify patches, localize faults, and compare fixes.

Updated May 4, 2026
One-click install
npx skills add https://github.com/antstanley/skills --skill reasoning-semiformally-antstanley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reasoning-semiformally
Source: https://github.com/antstanley/skills/tree/main/plugins/reasoning-semiformally/skills/reasoning-semiformally
Command: npx skills add https://github.com/antstanley/skills --skill reasoning-semiformally-antstanley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code review and bug hunting often fail on subtle issues like name shadowing, scope ambiguity, and fixes that address symptoms instead of root causes. This Skill enforces mandatory verification checkpoints before any conclusion, catching the failure modes that even strong reasoning misses. ## Core Features & Use Cases - Patch Verification: Resolve every function call through a 5-step scope sequence, trace execution before and after the patch, check downstream callers for regressions, and emit a CORRECT/LIKELY_CORRECT/CONCERNS/BUGGY verdict. - Fault Localization: Trace the buggy code path line by line and apply a sufficiency test ("fix ONLY this line") to distinguish root causes from mere contributors. - Patch Equivalence: Compare two candidate fixes test by test to determine whether they produce identical outcomes, with counterexamples when they diverge. - Model-Adaptive Templates: Full procedural templates with worked examples for Haiku-class models, compact verification checkpoints for Sonnet/Opus-class models. - Use Case: When reviewing a diff that changes a function call, the Skill detects that a module-level function shadows a builtin, traces both execution paths, and confirms the patch correctly bypasses the shadowing. ## Quick Start Ask the AI to review this patch using semi-formal reasoning and give a verdict on whether the fix is correct.

Frequently Asked Questions about reasoning-semiformally

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify a code patch is correct before merging?

Use the patch verification template: state premises, resolve every function call through the 5-step scope sequence, trace execution before and after the patch, check at least one downstream caller for regressions, then emit a verdict of CORRECT, LIKELY_CORRECT, CONCERNS, or BUGGY.

How to find the root cause of a bug instead of just symptoms?

Apply the fault localization template with its sufficiency test: for each suspicious line, ask whether fixing ONLY that line eliminates the symptom. Lines that pass are root causes; lines that fail are contributors only, even if they look suspicious.

When should I not use semi-formal reasoning for code review?

Skip it for trivial changes like docs, formatting, version bumps, and config edits, or when the bug is locally obvious such as a typo or off-by-one in the same function. It also does not apply to non-code tasks like text editing or summarization.

How does the skill detect name shadowing bugs in code?

Every function call is resolved through a fixed sequence: local variables, enclosing class, module-level definitions, imports, then builtins. When a definition at one scope shadows another, the template requires explicitly flagging it and tracing which definition actually executes.

Can I compare two different fixes for the same bug?

Yes, the patch equivalence template runs both patches against each relevant test with short execution traces. If all tests produce the same outcome the patches are equivalent; any divergence produces a counterexample showing exactly where they differ.