Testing · apply by default
/test-property
Check invariants across generated inputs and edge cases
Use for general invariants over generated inputs; test-regression freezes a known counterexample.
Make it your own.
In Claude Code, use the slash command and add your context. In Codex, select test-property from the just-vibe skill picker, then send the same brief.
Version 0.11.0 also supports /jv test-property, /just-vibe test-property and /jv:test-property in Claude. See shortcut setup and context examples.
/just-vibe:test-property Test that pagination preserves ordering and uniqueness across generated inputs./just-vibe:test-property Test serialization round trips including Unicode and empty values./just-vibe:test-property Review a proposed property without adopting a new test library or claiming executed coverage.What the agent does
- Define preconditions and generators independently of the implementation, including important boundaries.
- Implement the invariants with bounded execution.
- Shrink failures and preserve the reproducible seed and minimal counterexample.
Inputs
- invariant, valid input domain, boundaries, and existing generator framework.
Optional context: scope, references, constraints, successCriteria, environment, mode, budget.
Scope
- Reads
- Generated tests for meaningful algebraic/business properties, not arbitrary random inputs.
- Writes
- Apply: only the requested local changes and relevant isolated verification. Inspect/plan requests remain inspection/planning. External actions require their exact action and target in session authorization.
- Mode
- Apply; invariant, valid input domain, boundaries, and existing generator framework.
- Prerequisites
- Defined behavior, existing test conventions/runners, isolated fixtures, and relevant dependencies. Requested bounded verification may use owned isolated fixtures without authorizing product edits or live-system tests. Never test destructive behavior against production by default; distinguish mocked behavior from real integration evidence.
Expected output
- Property tests with domain rationale, generator behavior, results and a minimal counterexample on failure.
How the work is checked
- A seeded defect yields a useful reduced case; generators cover important boundaries rather than filtering nearly everything out.
When to stop or clarify
- Do not assert a tautology copied from implementation or discard failing inputs simply to make the property pass.
Handling missing context
- Infer
- Read behavior contracts, existing runners and test conventions; distinguish fixture setup failure from a behavioral failure.
- Assume
- Use the smallest existing local runner and isolated synthetic fixtures that distinguish the requested behavior. When the method needs a library, runner, container runtime or load tool the project lacks, name the exact package or tool, the files it changes and any download, and add it only when the request authorizes new dev dependencies or tools; label a hand-written generator without shrinking, or a fake in place of a real dependency, as such.
- Ask
- Ask about an unresolved contract that changes the expected result, or the target/load limits before external testing; do not ask the user to choose a runner already configured.
Technical guidance
- Evidence
- Define an invariant from the contract, constructive valid generators and bounded trial/shrink budgets.
- Method
- Generate meaningful edge distributions and preserve seeds/counterexamples; use an independent oracle where one exists.
- Pitfall
- A round-trip property can pass when encoder and decoder share the same defect; excessive filtering hides hard inputs.
- Check
- Show a known violating implementation is detected and that shrunk examples still satisfy the generator's preconditions.
Situational decisions
When filtering discards most generated inputs: Improve the generator's valid-domain construction instead of hiding the difficult cases.
The coding agent follows this workflow using its available tools. Installation does not grant service access or guarantee an outcome. Read the compatibility notes.