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.

Report the missing tier3 extra from doctor on a base install (#626)

Christopher Kevin94f68952b71d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 679df936..9c7f2197 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -313,6 +313,10 @@ All notable changes to SkillEvaluator are documented in this file.
- Saved Tier 2 catalogs use compact JSON so indentation no longer rejects dense
indexes that fit the unchanged 32 MiB file limit. Vector values and catalog
compatibility are unchanged.
+- `doctor` and `health-check` on a base install (without the `tier3` extra) now
+ say to install `skillevaluator[tier3]` for the live evaluation check instead
+ of failing with a `ModuleNotFoundError` traceback. `--tier all` still reports
+ Tiers 1 and 2 first.
- Arms fully denied by a run budget are reported as not run instead of failed
empty Harbor jobs. Budget-partial runs remain incomplete without an execution
error when all admitted attempts succeed, including stop-on-pass runs. Reused
diff --git a/src/skillevaluator/cli.py b/src/skillevaluator/cli.py
index 2b16c71c..1a73aaec 100644
--- a/src/skillevaluator/cli.py
+++ b/src/skillevaluator/cli.py
@@ -4303,7 +4303,18 @@ def _run_doctor(
exit_codes = []
for selected in selected_tiers:
if selected == "3":
- from skillevaluator.tier3.commands import doctor as tier3_doctor
+ try:
+ from skillevaluator.tier3.commands import doctor as tier3_doctor
+ except ImportError as exc:
+ from skillevaluator.tier3.extras import is_missing_tier3_extra
+
+ if not is_missing_tier3_extra(exc):
+ raise
+ click.echo(
+ "Tier 3 dependencies are not installed. Install skillevaluator[tier3] and try again.", err=True
+ )
+ exit_codes.append(1)
+ continue
exit_codes.append(
tier3_doctor(
diff --git a/src/skillevaluator/tier3/extras.py b/src/skillevaluator/tier3/extras.py
new file mode 100644
index 00000000..da7e413d
--- /dev/null
+++ b/src/skillevaluator/tier3/extras.py
@@ -0,0 +1,19 @@
+# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# SPDX-License-Identifier: Apache-2.0
+
+"""Recognize an import failure caused by a missing ``tier3`` extra."""
+
+from __future__ import annotations
+
+# Top-level import names of the packages that only the ``tier3`` extra installs
+# (``[project.optional-dependencies]`` in pyproject.toml).
+TIER3_EXTRA_MODULES = frozenset(
+ {"anthropic", "boto3", "dotenv", "harbor", "jwt", "litellm", "mcp", "oauthlib", "openai"}
+)
+
+
+def is_missing_tier3_extra(exc: ImportError) -> bool:
+ """Return whether ``exc`` names a package that the ``tier3`` extra provides."""
+ # A missing symbol or submodule in an installed dependency means a broken or
+ # incompatible installation; preserve its real cause instead of claiming the extra is absent.
+ return isinstance(exc, ModuleNotFoundError) and exc.name in TIER3_EXTRA_MODULES
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 753402ec..1f23bbc2 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -3,6 +3,7 @@
from __future__ import annotations
+import builtins
import contextlib
import json
from pathlib import Path
@@ -720,6 +721,75 @@ def test_doctor_all_checks_every_tier_after_a_failure(monkeypatch, command) -> N
assert tiers == ["1", "2", "3"]
+def _fail_tier3_commands_import(monkeypatch, *, missing: str) -> None:
+ real_import = builtins.__import__
+
+ def _import(name, *args, **kwargs):
+ if name == "skillevaluator.tier3.commands":
+ raise ModuleNotFoundError(f"No module named '{missing}'", name=missing)
+ return real_import(name, *args, **kwargs)
+
+ monkeypatch.setattr(builtins, "__import__", _import)
+
+
[email protected]("args", [["doctor"], ["doctor", "--tier", "3"], ["tier3", "doctor"]])
+def test_doctor_without_the_tier3_extra_names_the_missing_extra(monkeypatch, args) -> None:
+ _fail_tier3_commands_import(monkeypatch, missing="harbor")
+
+ result = CliRunner().invoke(cli, args)
+
+ assert result.exit_code == 1
+ assert not isinstance(result.exception, ImportError)
+ assert "Install skillevaluator[tier3]" in result.output
+
+
[email protected]("command", ["doctor", "health-check"])
+def test_doctor_all_without_the_tier3_extra_still_checks_lower_tiers(monkeypatch, command) -> None:
+ import skillevaluator.doctor as readiness
+
+ tiers: list[str] = []
+ monkeypatch.setattr(readiness, "doctor", lambda **options: tiers.append(options["tier"]) or 0)
+ _fail_tier3_commands_import(monkeypatch, missing="harbor")
+
+ result = CliRunner().invoke(cli, [command, "--tier", "all"])
+
+ assert result.exit_code == 1, result.output
+ assert tiers == ["1", "2"]
+ assert "Install skillevaluator[tier3]" in result.output
+
+
+ "error",
+ [
+ ImportError("cannot import name 'GKEExecStreamClosedError'", name="harbor.environments.gke"),
+ ModuleNotFoundError("No module named 'harbor.missing'", name="harbor.missing"),
+ ],
+)
+def test_doctor_preserves_an_installed_dependency_import_failure(monkeypatch, error) -> None:
+ real_import = builtins.__import__
+
+ def broken_import(name, *args, **kwargs):
+ if name == "skillevaluator.tier3.commands":
+ raise error
+ return real_import(name, *args, **kwargs)
+
+ monkeypatch.setattr(builtins, "__import__", broken_import)
+ result = CliRunner().invoke(cli, ["doctor"])
+
+ assert result.exception is error
+ assert "dependencies are not installed" not in result.output
+
+
+def test_doctor_keeps_an_unrelated_import_error(monkeypatch) -> None:
+ _fail_tier3_commands_import(monkeypatch, missing="skillevaluator.tier3.missing")
+
+ result = CliRunner().invoke(cli, ["doctor", "--tier", "3"])
+
+ assert isinstance(result.exception, ModuleNotFoundError)
+ assert result.exception.name == "skillevaluator.tier3.missing"
+ assert "Install skillevaluator[tier3]" not in result.output
+
+
@pytest.mark.parametrize(
"args",
[