Agent skill
ring:dev-property-testing
Gate 5 of development cycle - ensures property-based tests exist to verify domain invariants hold for all randomly generated inputs.
Install this agent skill to your Project
npx add-skill https://github.com/LerianStudio/ring/tree/main/dev-team/skills/dev-property-testing
SKILL.md
Dev Property Testing (Gate 5)
Overview
Ensure domain logic has property-based tests to verify invariants hold for all randomly generated inputs.
Core principle: Property tests verify universal truths about your domain. If "balance is never negative" is a rule, test it with thousands of random inputs.
<block_condition>
- No property functions = FAIL
- Any counterexample found = FAIL (fix and re-run)
- No quick.Check usage = FAIL </block_condition>
CRITICAL: Role Clarification
This skill ORCHESTRATES. QA Analyst Agent (property mode) EXECUTES.
| Who | Responsibility |
|---|---|
| This Skill | Gather requirements, dispatch agent, track iterations |
| QA Analyst Agent | Write property tests, run quick.Check, report counterexamples |
Standards Reference
MANDATORY: Load testing-property.md standards via WebFetch.
<fetch_required> https://raw.githubusercontent.com/LerianStudio/ring/main/dev-team/docs/standards/golang/testing-property.md </fetch_required>
Step 1: Validate Input
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- language: [go]
OPTIONAL INPUT:
- domain_invariants: [list of invariants to verify]
- gate4_handoff: [full Gate 4 output]
if any REQUIRED input is missing:
→ STOP and report: "Missing required input: [field]"
Step 2: Dispatch QA Analyst Agent (Property Mode)
Task tool:
subagent_type: "ring:qa-analyst"
prompt: |
**MODE:** PROPERTY-BASED TESTING (Gate 5)
**Standards:** Load testing-property.md
**Input:**
- Unit ID: {unit_id}
- Implementation Files: {implementation_files}
- Language: {language}
- Domain Invariants: {domain_invariants}
**Requirements:**
1. Identify domain invariants from code
2. Create property functions (TestProperty_{Subject}_{Property} naming)
3. Use testing/quick.Check for verification
4. Report any counterexamples found
**Output Sections Required:**
- ## Property Testing Summary
- ## Properties Report
- ## Handoff to Next Gate
Step 3: Evaluate Results
Parse agent output:
if "Status: PASS" in output:
→ Gate 5 PASSED
→ Return success with metrics
if "Status: FAIL" in output:
→ Dispatch fix to implementation agent
→ Re-run property tests (max 3 iterations)
→ If still failing: ESCALATE to user
Step 4: Generate Output
## Property Testing Summary
**Status:** {PASS|FAIL}
**Properties Tested:** {count}
**Properties Passed:** {count}
**Counterexamples Found:** {count}
## Properties Report
| Property | Subject | Status |
|----------|---------|--------|
| {property_name} | {subject} | {PASS|FAIL} |
## Handoff to Next Gate
- Ready for Gate 6 (Integration Testing): {YES|NO}
- Iterations: {count}
Common Properties to Test
| Domain | Example Properties |
|---|---|
| Money/Currency | Amount never negative, currency always valid, addition commutative |
| User/Account | Email always valid format, password meets policy, status transitions valid |
| Order/Transaction | Total equals sum of items, quantity always positive, state machine valid |
| Date/Time | Start before end, duration always positive, timezone valid |
Severity Calibration
| Severity | Criteria | Examples |
|---|---|---|
| CRITICAL | Counterexample found, invariant violated | quick.Check finds input that breaks property |
| HIGH | No property tests, missing quick.Check | Zero TestProperty_ functions, no testing/quick usage |
| MEDIUM | Incomplete properties, naming issues | Missing domain invariants, non-standard names |
| LOW | Documentation, optimization | Missing property descriptions, generator tuning |
Report all severities. CRITICAL = immediate fix (invariant broken). HIGH = fix before gate pass. MEDIUM = fix in iteration. LOW = document.
Anti-Rationalization Table
| Rationalization | Why It's WRONG | Required Action |
|---|---|---|
| "Unit tests verify logic" | Unit tests verify SPECIFIC cases. Properties verify ALL cases. | Write property tests |
| "No domain invariants" | Every domain has rules. "ID is unique", "amount > 0", etc. | Identify and test invariants |
| "Too abstract" | Properties are concrete: "user.age >= 0 for all users". | Write property tests |
| "quick.Check is slow" | Milliseconds to find bugs that would take hours to discover. | Write property tests |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ring:regulatory-templates
5-stage regulatory template orchestrator - manages setup, Gate 1 (analysis + auto-save), Gate 2 (validation), Gate 3 (generation), optional Test Gate, optional Contribution Gate. Supports any regulatory template (BACEN, RFB, CVM, SUSEP, COAF, or other).
ring:using-finops-team
3 FinOps agents: 2 for Brazilian financial regulatory compliance (BACEN, RFB, Open Banking), 1 for infrastructure cost estimation when onboarding customers. Supports any regulatory template via open intake system.
ring:regulatory-templates-gate1
Gate 1 sub-skill - performs regulatory compliance analysis, field mapping, batch approval by confidence level, and auto-saves dictionary after approval. Supports both pre-defined templates (dictionary exists) and new templates (any spec).
ring:regulatory-templates-gate2
Gate 2 sub-skill - validates uncertain mappings from Gate 1 and confirms all field specifications through testing.
ring:regulatory-templates-gate3
Gate 3 sub-skill - generates complete .tpl template file with all validated mappings from Gates 1-2.
ring:infrastructure-cost-estimation
Orchestrates infrastructure cost estimation with tier-based or custom TPS sizing. Offers pre-configured tiers (Starter/Growth/Business/Enterprise) or custom TPS input. Skill discovers components, asks shared/dedicated for EACH, selects environment(s), reads actual Helm chart configs, then dispatches agent for accurate calculations.
Didn't find tool you were looking for?