Generates **property-based tests** that use randomized input generation to validate invariants and contracts (rather than hand-picked examples). Triggers when the conversation involves: PBT frameworks (Hypothesis library for Python, fast-check for TypeScript, proptest for Rust, rapid for Go, RapidCheck for C++); concepts like invariants, contracts, round-trip symmetry, encode/decode, serialize/deserialize, generative testing, or shrinking; or requests to find edge cases that example-based tests miss — e.g., "find edge cases automatically", "test all possible inputs", "verify this property holds". Does NOT trigger for: writing regular example-based unit tests, debugging, CI/CD setup, UI/component testing, or integration/E2E testing. Identifies up to 7 property patterns (round-trip, idempotence, invariance, metamorphic, inverse, ordering, no-crash), designs input generators, writes property tests, and extracts regression tests from failures.
91
90%
Does it follow best practices?
Impact
94%
1.11xAverage score across 5 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent applies fast-check idioms, preconditions/configuration, broad arbitraries, async properties, and alternative-oracle style properties.",
"type": "weighted_checklist",
"checklist": [
{
"name": "fast-check setup",
"description": "Uses or suggests the fast-check dev dependency for TypeScript.",
"max_score": 8
},
{
"name": "fc import",
"description": "Imports fast-check using the fc namespace.",
"max_score": 8
},
{
"name": "fc.assert property",
"description": "Wraps generated properties in fc.assert with fc.property for synchronous behavior.",
"max_score": 10
},
{
"name": "Async property",
"description": "Uses fc.asyncProperty or equivalent fast-check async support for the audited async behavior.",
"max_score": 10
},
{
"name": "Object arbitraries",
"description": "Builds user and rule objects with fc.record, arrays, strings, constants, oneof, or similar composed arbitraries.",
"max_score": 10
},
{
"name": "Edge generation",
"description": "Generated data can include empty roles/rules/actions, duplicate roles/actions, and varied strings.",
"max_score": 10
},
{
"name": "At least properties",
"description": "Implements at least three distinct properties rather than only fixed examples.",
"max_score": 10
},
{
"name": "Different oracle",
"description": "At least one property compares canAccess to a simpler independent model such as set intersection or exhaustive predicate, not copied production logic line-for-line.",
"max_score": 10
},
{
"name": "Precondition API",
"description": "Uses fc.pre where a generated case must satisfy a precondition, or explicitly avoids unnecessary filtering with unconstrained properties.",
"max_score": 6
},
{
"name": "Run config",
"description": "Configures or discusses numRuns and/or verbose output for randomized runs and shrinking diagnostics.",
"max_score": 8
},
{
"name": "Regression note",
"description": "Notes that a failing shrunk counterexample should become a concrete deterministic regression test.",
"max_score": 10
}
]
}