contract-strengthening
Contract Strengthening
Overview
Optional extra skill that strengthens AI coding work via open-world, non-exhaustive risk classification. The risk catalog is illustrative only — new signals discovered during review must be added, never excluded by category. Does not replace brainstorming, spec-driven-development, test-driven-development, or verification-before-completion; it sits after the attested Spec and before implementation slicing.
The skill provides open-world risk classification, contract-gap review (invariants, allowed/forbidden transitions, uncompiled requirements, explicit uncertainty), counterexample design, property-driven L1/L2/L3 selection, tool-selection precedence (relevance → reuse → isolation → resource check → bounded execution), and a GREEN/YELLOW/RED consent-gate for global-install exceptions.
When to Use
Use when the change visibly touches one or more of: shared/cached state, time or clocks, concurrency or async fan-out, external or untrusted boundaries, irreversible or blast-radius-sensitive operations, or any area where existing skills would otherwise skip risk escalation because the diff "looks small".
NOT for: ordinary L1 work already covered by TDD + verification-before-completion with no contract surface beyond functional behavior; pre-Spec design exploration (brainstorming); one-line style/formatting/comment-only changes; live failure triage (debugging-and-error-recovery); architecture-wide audits (improve-codebase-architecture).
Process
1. Open-world risk classification
Read the attested Spec. Enumerate observed risk signals across non-exhaustive axes: contract completeness · state/timing/concurrency · boundary/dependency · blast-radius/reversibility · verification-blind-spot. Record each signal as [observed | absent | uncertain — needs follow-up] — never collapse to "no risk". Absence from the axes is not evidence of safety; new signals discovered during review are added in place.