From bee-dev-team
Gate 4 of development cycle - ensures fuzz tests exist with proper seed corpus to discover edge cases, crashes, and unexpected input handling.
npx claudepluginhub luanrodrigues/ia-frmwrk --plugin bee-dev-teamThis skill uses the workspace's default tool permissions.
Ensure critical parsing and input handling code has **mutation tests** (via Infection) to discover weaknesses in test suites through code mutation.
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 critical parsing and input handling code has mutation tests (via Infection) to discover weaknesses in test suites through code mutation.
Core principle: Mutation testing finds weaknesses in your tests that traditional coverage metrics miss. They're mandatory for all code that handles external input.
<block_condition>
This skill ORCHESTRATES. QA Analyst Agent (fuzz mode) EXECUTES.
| Who | Responsibility |
|---|---|
| This Skill | Gather requirements, dispatch agent, track iterations |
| QA Analyst Agent | Write fuzz tests, generate corpus, run fuzz |
MANDATORY: Load testing-mutation.md standards via WebFetch.
<fetch_required> https://raw.githubusercontent.com/luanrodrigues/ia-frmwrk/master/dev-team/docs/standards/php/testing-mutation.md </fetch_required>
REQUIRED INPUT:
- unit_id: [task/subtask being tested]
- implementation_files: [files from Gate 0]
- language: [php for mutation testing with Infection]
OPTIONAL INPUT:
- gate3_handoff: [full Gate 3 output]
if any REQUIRED input is missing:
→ STOP and report: "Missing required input: [field]"
if language != "php":
→ STOP and report: "Mutation testing via Infection is supported for PHP only"
Task tool:
subagent_type: "bee:qa-analyst"
model: "opus"
prompt: |
**MODE:** MUTATION TESTING (Gate 4)
**Standards:** Load testing-mutation.md
**Input:**
- Unit ID: {unit_id}
- Implementation Files: {implementation_files}
- Language: {language}
**Requirements:**
1. Configure Infection (infection.json5) for source directories
2. Run `./vendor/bin/infection --min-msi=80 --min-covered-msi=90`
3. Analyze escaped mutants in critical code paths
4. Add tests to kill escaped mutants
**Output Sections Required:**
- ## Mutation Testing Summary
- ## Mutation Report
- ## Handoff to Next Gate
Parse agent output:
if "Status: PASS" in output:
→ Gate 4 PASSED
→ Return success with metrics
if "Status: FAIL" in output:
→ Dispatch fix to implementation agent
→ Re-run mutation tests (max 3 iterations)
→ If still failing: ESCALATE to user
## Mutation Testing Summary
**Status:** {PASS|FAIL}
**Mutants Generated:** {count}
**Mutants Killed:** {count}
**MSI:** {percentage}%
## Mutation Report
| Source Directory | Mutants | Killed | Escaped | MSI |
|-----------------|---------|--------|---------|-----|
| {directory} | {count} | {count} | {count} | {percentage}% |
## Handoff to Next Gate
- Ready for Gate 5 (Property Testing): {YES|NO}
- Iterations: {count}
| Rationalization | Why It's WRONG | Required Action |
|---|---|---|
| "Unit tests cover edge cases" | You can't test what you don't think of. Mutation testing finds weaknesses. | Run mutation tests |
| "Code is too simple for mutation testing" | Simple code can still have untested paths. | Run mutation tests |
| "Mutation testing is slow" | Minutes per run. Production bugs from weak tests are slower. | Run mutation tests |
| "We have high coverage anyway" | Coverage != quality. Mutation testing verifies test assertions. | Run mutation tests |