Skip to content

Multi-tier framework for evaluating AI agent skills and plugins with quality gates, security scanning, harness compatibility checks, semantic overlap detection, synthetic evaluation dataset generation, and live agent evaluation that measures how skills affect agent behavior. Ships reusable CI templates that bring every check to any repository.

936 B
Raw Blame
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Shared downgrade rule for finding verification and its report explanation."""

from skillevaluator.models import Severity

DOWNGRADE_VERDICT = "false_positive"
DOWNGRADE_CONFIDENCE = "high"
DOWNGRADE_SEVERITY = Severity.INFO


def should_downgrade(verdict: str, confidence: str) -> bool:
    """Return whether a verified finding meets the downgrade threshold."""
    return verdict == DOWNGRADE_VERDICT and confidence == DOWNGRADE_CONFIDENCE


def downgrade_policy_explanation() -> str:
    """Describe the same rule the producer applies, without inferring an action."""
    verdict_label = DOWNGRADE_VERDICT.replace("_", " ")
    return (
        f"only {DOWNGRADE_CONFIDENCE}-confidence {verdict_label}s "
        f"are downgraded to {DOWNGRADE_SEVERITY.value.upper()} by verification."
    )