flakiness-detection-protocol

Detects flaky tests statistically from JSONL test-run events and manages reversible quarantine.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/soli92/soli-projects --skill flakiness-detection-protocol-soli92
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: flakiness-detection-protocol
Source: https://github.com/soli92/soli-projects/tree/main/.cursor/skills/flakiness-detection-protocol
Command: npx skills add https://github.com/soli92/soli-projects --skill flakiness-detection-protocol-soli92

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Flaky tests erode trust in CI pipelines and cause false failures that block releases. This Skill gives the qa-dev agent a deterministic, statistical method to compute a flakiness score per test and automatically quarantine unstable tests without losing their signal. ## Core Features & Use Cases - Flakiness score calculation: Computes failure_count / min(total_runs, 50) over a rolling window of test_run events stored in analytics/events/qa-events.jsonl, returning a float in [0.0, 1.0] or insufficient_data when fewer than 10 runs exist. - Reversible quarantine registry: Maintains analytics/qa/quarantine.json with state transitions (quarantined → monitoring → released) driven by configurable thresholds (default entry 0.20, release 0.05, 10 consecutive passing runs). - Opt-in gate: Fully no-op when qa_layer.flakiness_detection.enabled: false in factory.config.yaml, preserving backward compatibility with v2.21 pipelines. - Use Case: After a QA wave, qa-dev appends test_run events, recomputes scores, excludes quarantined tests from the pass/fail gate, and reports them under a [QUARANTINED] label while still running them in advisory mode. ## Quick Start Enable the feature by setting qa_layer.flakiness_detection.enabled to true in factory.config.yaml, then ask qa-dev to compute the flakiness score for a test and update the quarantine registry.

Frequently Asked Questions about flakiness-detection-protocol

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect flaky tests statistically in a CI pipeline?▼

Record every test execution as a JSONL event with test_id, outcome, and timestamp, then compute flakiness_score as failure_count divided by min(total_runs, 50) over the most recent runs. Tests scoring above a threshold such as 0.20 are flagged as flaky.

How does automatic test quarantine work with this protocol?▼

When a test's score exceeds the quarantine threshold, an entry is added to analytics/qa/quarantine.json with status quarantined. Quarantined tests are excluded from the pass/fail gate but still run in advisory mode to keep collecting data.

How does a quarantined test get released back into the pipeline?▼

A test moves from quarantined to monitoring when its score drops below the release threshold (default 0.05). It is released only after at least 10 consecutive passing runs while the score stays below that threshold.

What happens when a test has too few runs to judge flakiness?▼

If a test has fewer than 10 total runs, the protocol returns insufficient_data instead of a score. No quarantine verdict is produced, which prevents false positives on new or rarely executed tests.

Can I disable flakiness detection without breaking my existing QA pipeline?▼

Yes. Setting qa_layer.flakiness_detection.enabled to false makes the entire protocol a no-op: the events file is not read for scoring and the quarantine registry is neither read nor written, so behavior matches the previous pipeline version exactly.