From bee-dev-team
Gate 5 of development cycle - ensures property-based tests exist to verify domain invariants hold for all randomly generated inputs.
npx claudepluginhub luanrodrigues/ia-frmwrk --plugin bee-dev-teamThis skill uses the workspace's default tool permissions.
Ensure domain logic has **property-based tests** to verify invariants hold for all randomly generated inputs.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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>
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 with Pest datasets/PHPUnit data providers, report counterexamples |
MANDATORY: Load testing-property.md standards via WebFetch.
<fetch_required> https://raw.githubusercontent.com/luanrodrigues/ia-frmwrk/master/dev-team/docs/standards/php/testing-property.md </fetch_required>
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- language: [php]
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]"
Task tool:
subagent_type: "bee:qa-analyst"
model: "opus"
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 (property_{subject}_{property} naming for Pest, testProperty{Subject}{Property} for PHPUnit)
3. Use Pest datasets with boundary values and random generators for verification
4. Report any counterexamples found
**Output Sections Required:**
- ## Property Testing Summary
- ## Properties Report
- ## Handoff to Next Gate
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
## 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}
| 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 |
| 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 |
| "Datasets are slow" | Milliseconds to find bugs that would take hours to discover. | Write property tests |