hegel
Hegel: property-based testing
Hegel generates random inputs for your code and shrinks failing cases to minimal counterexamples. Libraries exist for Rust (hegeltest), Go, C++, TypeScript, Java, and OCaml, all integrating with the standard test runner.
Learn the API from, in order: existing hegel tests in this repo, the library's documentation, and the hegel library source available in your environment (vendored or registry copy). Check the exact name and signature of everything you use. Do not guess syntax.
Ground every property in evidence — documented contracts, names and signatures, invariants the code itself asserts, existing tests. An undocumented but ordinary expectation (a round-trip, two equivalent spellings agreeing, a rescaled input giving the same answer) is evidence too: name the expectation, and when such a test fails, judge the failure by whether the behavior is defensible, not by whether anything promised it. Write one property per test, in the project's existing test files.
Techniques
Short, specific guides in this skill's techniques/ directory. Load one when you reach that stage, when you are stuck, or when a result surprises you:
techniques/surfaces.md— choosing what to test: the full public API, sibling entry points, every instantiationtechniques/directions.md— properties in the accept and the reject directiontechniques/generators.md— generators: full domains, hostile inputs, targeted subsetstechniques/scale.md— the scale probe for recursion and complexity bugstechniques/running.md— case counts and run configurationtechniques/triage.md— investigating failures and reporting honestly