test-quality-governor

Audit test suites and apply risk-aware refactors to protect behavior contracts.

34|12|Updated Aug 1, 2021
One-click install
npx skills add https://github.com/pear-studio/nonebot-dicepp --skill test-quality-governor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-quality-governor
Source: https://github.com/pear-studio/nonebot-dicepp/tree/main/docs/agent/skills/test-quality-governor
Command: npx skills add https://github.com/pear-studio/nonebot-dicepp --skill test-quality-governor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you reduce test noise and maintenance cost by auditing test quality, identifying weak or duplicate coverage, and applying low-risk improvements while protecting real behavior contracts.

Core Features & Use Cases

  • Automated test discovery & inventory: Detects the test framework and test entry structure, then builds a checklist for governance.
  • File-by-file quality scoring: Evaluates assertion strength, behavior-contract clarity, duplication risk, mock risk, layer matching, maintainability, and failure value.
  • Incremental, risk-aware improvements: Executes recommended actions (e.g., rename/merge/rewrite/move-layer/quarantine-flaky/add-contract-test) with guardrails and re-runs relevant tests after each batch.

Quick Start

Use the test-quality-governor to audit your repository’s test suite, generate a quality report with recommended actions, and automatically apply low-risk/high-confidence improvements while asking for confirmation before high-risk operations.

Frequently Asked Questions about test-quality-governor

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

FAQPage Schema
How do I audit test quality in a repository with mixed unit and integration layers?

Test quality auditing evaluates assertion strength, behavior-contract clarity, duplication risk, and mock risk file-by-file. It builds a governance checklist by detecting the test framework and entry structure, scoring each file against quality guidelines to generate a report with recommended actions.

What is the best way to fix flaky tests without breaking existing behavior contracts?

Fixing flaky tests safely requires risk-aware refactoring that enforces execution boundaries by risk level. The process quarantines flaky tests, applies guardrails around recommended actions, and validates outcomes by re-running relevant tests after each batch to protect real behavior contracts.

How do I reduce test noise and maintenance cost from duplicate or weak test cases?

Reduce test noise by auditing test quality to identify weak assertions and duplicate coverage. Incremental improvements like renaming, merging, or rewriting cases are applied with guardrails, and relevant tests are re-run after each batch to handle failures safely and ensure maintenance cost drops.

Can I use automated subagent auditing for large test suites with excessive mocking?

Automated subagent auditing supports large test suites by delegating batch audits to subagents. It scores mock risk and layer matching across the repository, then executes recommended actions like moving layers or adding contract tests while enforcing execution boundaries by risk level.

When should I not use automated test refactoring on my test suite?

Avoid automated test refactoring for high-risk operations without confirmation. The process enforces execution boundaries by risk level, automatically applying only low-risk and high-confidence improvements while asking for confirmation before executing high-risk actions on weak or flaky tests.