Agentclash regression flywheel

From agentclash/agentclash · View interactive version

Agentclash regression flywheel is an AI agent skill from the GitHub repository agentclash/agentclash. Use when inspecting AgentClash run failure-review items, promoting useful failures into regression suites, editing regression suites or cases, and verifying suite-only reruns.

How to use this skill

Skill file

AgentClash Regression Flywheel

Purpose

Turn understood AgentClash failures into durable regression coverage, then verify the promoted cases with suite-only runs.

Use When

Do Not Use When

Inputs Needed

Environment

Use hosted production by default unless the user intentionally targets local or self-hosted infrastructure:

export AGENTCLASH_API_URL="https://api.agentclash.dev"
agentclash auth status
agentclash workspace use <WORKSPACE_ID>

All commands in this skill require workspace context. Workspace resolution follows the CLI setup rules: --workspace, AGENTCLASH_WORKSPACE, saved config, or .agentclash.yaml.

Procedure

  1. Read failure-review items for the run and group them by failure_cluster_key, severity, failure_class, and promotable.
  2. Use agentclash-scorecard-reader evidence first: confirm the failed dimensions, judge/validator refs, replay refs, and artifact refs before promotion.
  3. Choose an existing active suite whose source_challenge_pack_id matches the run source pack, or create one for that source pack.
  4. Check for duplicates in the target suite by source failure cluster, failure fingerprint, challenge key, case key, and existing active/proposed cases.
  5. Promote the failure with run promote-failure <RUN_ID> <CHALLENGE_IDENTITY_ID>.
  6. Review the generated case JSON and update title, description, status, or severity if needed.
  7. Run a suite-only verification against the updated deployment and report pass/fail coverage.

Inspect Failures

Start with failure-review items:

agentclash run failures <RUN_ID> --json
agentclash run failures <RUN_ID> --agent <RUN_AGENT_ID> --json
agentclash run failures <RUN_ID> --severity blocking --json
agentclash run failures <RUN_ID> --class policy_violation --json
agentclash run failures <RUN_ID> --cluster <FAILURE_CLUSTER_KEY> --limit 50 --json

Supported filters are:

Failure classes currently accepted by the API are incorrect_final_output, tool_selection_error, tool_argument_error, retrieval_grounding_failure, policy_violation, timeout_or_budget_exhaustion, sandbox_failure, dependency_resolution_failure, malformed_output, flaky_non_deterministic, insufficient_evidence, and other.

The fields that matter for promotion are:

{
  "items": [
    {
      "run_id": "<RUN_ID>",
      "run_agent_id": "<RUN_AGENT_ID>",
      "challenge_identity_id": "<CHALLENGE_IDENTITY_ID>",
      "challenge_key": "<challenge_key>",
      "case_key": "<case_key>",
      "item_key": "<item_key>",
      "failure_fingerprint": "frf_...",
      "failure_cluster_key": "frc_...",
      "failure_state": "failed",
      "failed_dimensions": ["correctness"],
      "failed_checks": ["<validator_or_judge_key>"],
      "failure_class": "policy_violation",
      "headline": "<headline>",
      "detail": "<detail>",
      "recommended_action": "<recommended action>",
      "promotable": true,
      "promotion_mode_available": ["full_executable", "output_only"],
      "replay_step_refs": [],
      "artifact_refs": [],
      "judge_refs": [],
      "metric_refs": [],
      "evidence_tier": "hosted_structured",
      "severity": "blocking"
    }
  ],
  "clusters": [
    {
      "failure_cluster_key": "frc_...",
      "representative_failure_fingerprint": "frf_...",
      "count": 2,
      "promotable_count": 1,
      "severity": "blocking",
      "failure_state": "failed",
      "failure_class": "policy_violation",
      "evidence_tier": "hosted_structured",
      "challenge_keys": ["<challenge_key>"],
      "case_keys": ["<case_key>"],
      "run_agent_ids": ["<RUN_AGENT_ID>"],
      "headline": "<headline>",
      "recommended_action": "<recommended action>"
    }
  ],
  "next_cursor": "<cursor>"
}

Promote only when promotable is true and the chosen promotion_mode appears in promotion_mode_available.

Manage Suites

List and inspect suites:

agentclash regression-suite list --json
agentclash regression-suite get <SUITE_ID> --json
agentclash regression-suite cases <SUITE_ID> --json

regression-suite also has the alias regression-suites.

Create a suite:

agentclash regression-suite create \
  --source-challenge-pack-id <CHALLENGE_PACK_ID> \
  --name "Checkout regressions" \
  --description "Failures promoted from checkout evals" \
  --default-gate-severity warning \
  --json

Equivalent --from-file payload:

{
  "source_challenge_pack_id": "<CHALLENGE_PACK_ID>",
  "name": "Checkout regressions",
  "description": "Failures promoted from checkout evals",
  "default_gate_severity": "warning"
}

Exact suite create rules:

Update a suite:

agentclash regression-suite update <SUITE_ID> \
  --name "Checkout regressions" \
  --description "Current production blockers" \
  --status active \
  --default-gate-severity blocking \
  --json

Equivalent --from-file payload:

{
  "name": "Checkout regressions",
  "description": "Current production blockers",
  "status": "active",
  "default_gate_severity": "blocking"
}

Exact suite update rules:

Suite JSON includes:

{
  "id": "<SUITE_ID>",
  "workspace_id": "<WORKSPACE_ID>",
  "source_challenge_pack_id": "<CHALLENGE_PACK_ID>",
  "name": "Checkout regressions",
  "description": "Current production blockers",
  "status": "active",
  "source_mode": "derived_only",
  "default_gate_severity": "blocking",
  "case_count": 3,
  "created_by_user_id": "<USER_ID>",
  "created_at": "<timestamp>",
  "updated_at": "<timestamp>"
}

regression-suite list --json prints { "items": [...] } from the CLI. It does not expose the API's total, limit, or offset fields today.

Promote Failures

The promotion command shape is:

agentclash run promote-failure <RUN_ID> <CHALLENGE_IDENTITY_ID> \
  --run-agent <RUN_AGENT_ID> \
  --suite <SUITE_ID> \
  --promotion-mode full_executable \
  --title "Policy answer must refuse credential disclosure" \
  --failure-summary "Agent disclosed a credential-like value instead of refusing." \
  --severity blocking \
  --json

Important exact details:

Full --from-file payload:

{
  "run_agent_id": "<RUN_AGENT_ID>",
  "suite_id": "<SUITE_ID>",
  "promotion_mode": "full_executable",
  "title": "Policy answer must refuse credential disclosure",
  "failure_summary": "Agent disclosed a credential-like value instead of refusing.",
  "status": "proposed",
  "severity": "blocking",
  "validator_overrides": {
    "judge_threshold_overrides": {
      "policy_refusal": 0.9
    },
    "assertion_toggles": {
      "must_refuse": true
    }
  },
  "metadata": {
    "source": "triage",
    "source_challenge_key": "<challenge_key>",
    "source_failure_fingerprint": "frf_...",
    "source_failure_cluster_key": "frc_..."
  }
}

Exact promotion rules:

run promote-failure --json prints the regression case object directly. The HTTP status is 201 when a case is created and 200 when the same suite, run agent, and challenge identity already map to an existing case; the CLI JSON output is the case in both paths.

Review and Edit Cases

List cases in a suite:

agentclash regression-suite cases <SUITE_ID> --json

Update a case:

agentclash regression-suite case update <CASE_ID> \
  --title "Policy answer must refuse credential disclosure" \
  --description "Covers credential disclosure requests in support chat." \
  --status active \
  --severity blocking \
  --json

Equivalent --from-file payload:

{
  "title": "Policy answer must refuse credential disclosure",
  "description": "Covers credential disclosure requests in support chat.",
  "status": "active",
  "severity": "blocking"
}

Exact case update rules:

Case JSON includes:

{
  "id": "<CASE_ID>",
  "suite_id": "<SUITE_ID>",
  "workspace_id": "<WORKSPACE_ID>",
  "title": "Policy answer must refuse credential disclosure",
  "description": "Covers credential disclosure requests in support chat.",
  "status": "active",
  "severity": "blocking",
  "promotion_mode": "full_executable",
  "source_run_id": "<RUN_ID>",
  "source_run_agent_id": "<RUN_AGENT_ID>",
  "source_replay_id": "<REPLAY_ID>",
  "source_challenge_pack_version_id": "<CHALLENGE_PACK_VERSION_ID>",
  "source_challenge_input_set_id": "<INPUT_SET_ID>",
  "source_challenge_identity_id": "<CHALLENGE_IDENTITY_ID>",
  "source_challenge_key": "<challenge_key>",
  "source_case_key": "<case_key>",
  "source_item_key": "<item_key>",
  "source_failure_fingerprint": "frf_...",
  "source_failure_cluster_key": "frc_...",
  "evidence_tier": "hosted_structured",
  "failure_class": "policy_violation",
  "failure_summary": "<summary>",
  "payload_snapshot": {},
  "expected_contract": {},
  "validator_overrides": {},
  "metadata": {},
  "latest_promotion": {
    "id": "<PROMOTION_ID>",
    "workspace_regression_case_id": "<CASE_ID>",
    "source_run_id": "<RUN_ID>",
    "source_run_agent_id": "<RUN_AGENT_ID>",
    "source_event_refs": [],
    "promoted_by_user_id": "<USER_ID>",
    "promotion_reason": "<summary>",
    "promotion_snapshot": {},
    "created_at": "<timestamp>"
  },
  "validation": {
    "status": "not_validated",
    "run_count": 0,
    "failure_count": 0,
    "pass_count": 0,
    "reproduction_threshold": 0.6,
    "required_runs": 5,
    "remaining_runs": 5,
    "recommended_action": "<action>"
  },
  "created_at": "<timestamp>",
  "updated_at": "<timestamp>"
}

Validation status values are not_validated, collecting_signal, reproducing, passing, and flaky.

Duplicate and Quality Checks

Before promotion:

Backend duplicate protection is intentionally narrow: the same suite, run agent, and challenge identity returns the existing case. Cross-run duplicates and cross-suite duplicates are reviewer decisions.

Verify Suite-Only

Use eval start when selectors can be names, slugs, or exact suite names:

agentclash eval start \
  --pack <PACK_ID_OR_SLUG_OR_EXACT_NAME> \
  --pack-version <VERSION_ID_OR_VERSION_NUMBER> \
  --deployment <DEPLOYMENT_ID_OR_EXACT_NAME> \
  --scope suite_only \
  --suite <SUITE_ID_OR_EXACT_NAME> \
  --follow

Use run create when automation already has IDs:

agentclash run create \
  --challenge-pack-version <CHALLENGE_PACK_VERSION_ID> \
  --deployments <AGENT_DEPLOYMENT_ID> \
  --scope suite_only \
  --suite <SUITE_ID> \
  --case <CASE_ID> \
  --follow

Exact suite-only notes:

regression_coverage contains:

{
  "regression_coverage": {
    "suites": [
      {
        "id": "<SUITE_ID>",
        "name": "Checkout regressions",
        "case_count": 3,
        "pass_count": 2,
        "fail_count": 1
      }
    ],
    "unmatched_cases": [
      {
        "id": "<CASE_ID>",
        "title": "<case title>",
        "outcome": "fail"
      }
    ]
  }
}

Then inspect:

agentclash run failures <VERIFICATION_RUN_ID> --json
agentclash eval scorecard <VERIFICATION_RUN_ID> --agent <RUN_AGENT_ID_OR_LABEL> --json
agentclash run ranking <VERIFICATION_RUN_ID> --json

Expected Output

Failure Modes

Safety Notes

Report Back Format

Run: <RUN_ID>
Failure reviewed:
- challenge_identity_id=<id> run_agent_id=<id> cluster=<frc_...> class=<failure_class> severity=<severity>
Suite: <SUITE_ID> (<name>)
Duplicate check: <none found | reused CASE_ID | updated CASE_ID>
Promotion:
- case=<CASE_ID> mode=<full_executable|output_only> status=<proposed|active> severity=<severity>
Case edits: <none | title/description/status/severity changes>
Verification:
- command=<exact suite-only command>
- run=<VERIFICATION_RUN_ID>
- regression_coverage=<pass/fail counts or unavailable>
Next action: <ship/fix/rerun/needs-review>

Related Skills

Related Docs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.