contract
Installation
SKILL.md
Contract Extraction
Turn capsule invariants into executable contracts: domain types that prevent invalid states, validation at boundaries, and tests that prove enforcement. Operationalizes "design by contract" (Meyer) and "parse, don't validate."
Input
Invariants to enforce (or audit to check current coverage): $ARGUMENTS
Preconditions:
- A concept capsule must exist (it defines the invariants). If none →
/pragma:capsulefirst. - At least one slice of working code to attach contracts to. If at skeleton stage →
/pragma:card+/pragma:slicefirst.
Also read: the capsule (glossary + invariants), recent cards (boundary crossings), and existing source code.
Procedure
1. Build the contract map
For each capsule invariant, determine current enforcement status: