[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75868MTM5687RNZXCR37RBD":3,"skill-same:01M75868MTM5687RNZXCR37RBD":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":6,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M75868MTM5687RNZXCR37RBD","eval-harness",null,"Systematic evaluation framework for agent capabilities — capability tests, regression suites, failure analysis","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Feval-harness\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: eval-harness\ndescription: \"Systematic evaluation framework for agent capabilities — capability tests, regression suites, failure analysis\"\nversion: 1.0.0\nauthor: Steadfaste Fleet\nmetadata:\n  tags: [eval, testing, reliability, autonomous-agents, quality-gates]\n---\n\n# Eval Harness — Systematic Agent Evaluation\n\n## When to Use\n\n- Before deploying new agent behaviors or workflows\n- After model upgrades to verify no regression\n- Weekly regression testing on holdout test sets\n- When debugging recurring failure patterns\n- Before promoting experimental features to production\n\n## Core Principles\n\n**Eval-driven development** turns agents from demos into production systems:\n\n1. **Define success BEFORE building** — what \"done\" means must be explicit\n2. **Outcomes > outputs** — verify real results, not just generated text\n3. **Deterministic + model-based grading** — use code for objective checks, LLM for nuance\n4. **Read transcripts** — metrics tell WHAT failed, transcripts tell WHY\n5. **Out-of-sample gating** — survivors must pass on unseen data before deployment\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    Eval Harness                              │\n├─────────────────────────────────────────────────────────────┤\n│  1. Task Definitions (YAML\u002FJSON)                            │\n│     - Input scenarios (20-50 representative cases)          │\n│     - Expected outcomes (verifiable criteria)               │\n│     - Grading rubric (deterministic + LLM)                  │\n│                                                              │\n│  2. Execution Engine                                        │\n│     - Runs agent on each task                               │\n│     - Captures full trace (Langfuse)                        │\n│     - Applies graders                                       │\n│     - Aggregates results                                    │\n│                                                              │\n│  3. Analysis Layer                                          │\n│     - Pass\u002Ffail metrics                                     │\n│     - Failure clustering                                    │\n│     - Transcript sampling                                   │\n│     - Trend tracking                                        │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Eval Types\n\n### Capability Evals\n\n**Purpose:** Measure what the agent CAN do (new feature, new skill)\n\n**Characteristics:**\n- Start low (baseline performance)\n- Improve over iterations\n- Focus on specific capability\n\n**Example:** \"Agent can deploy a Next.js app behind nginx with SSL\"\n\n### Regression Evals\n\n**Purpose:** Ensure agent MAINTAINS learned tasks\n\n**Characteristics:**\n- Should stay near 100% pass rate\n- Run on every change\n- Include historical failure cases\n\n**Example:** \"Agent still correctly installs cron jobs without duplicates\"\n\n### Stress Evals\n\n**Purpose:** Test boundaries and edge cases\n\n**Characteristics:**\n- Ambiguous requirements\n- Conflicting patterns in codebase\n- Missing context\n- Resource constraints\n\n**Example:** \"Agent handles 404 from API gracefully with retry logic\"\n\n## Workflow\n\n### Step 1: Define Eval Tasks\n\nCreate `evals\u002F\u003Ccapability-name>.yaml`:\n\n```yaml\nname: cron-installation\ndescription: Verify cron jobs are installed correctly without duplicates\n\ntasks:\n  - id: fresh-install\n    description: Install crons on fresh Hermes setup\n    input: \"Set up cron jobs for a new Hermes Agent installation\"\n    expected:\n      - 9 cron jobs created\n      - No duplicates in jobs.json\n      - All scripts exist and are executable\n    grading:\n      deterministic:\n        - cron_count == 9\n        - no_duplicates_in_jobs_json\n        - all_scripts_executable\n      llm_rubric: |\n        - Agent verified scripts exist before creating crons\n        - Agent checked for existing jobs before adding\n        - Agent provided troubleshooting commands\n\n  - id: existing-install\n    description: Install crons when some already exist\n    input: \"Run cron installation on existing system\"\n    expected:\n      - Existing jobs preserved\n      - Missing jobs added\n      - No duplicates created\n    grading:\n      deterministic:\n        - existing_jobs_preserved\n        - no_duplicates_created\n      llm_rubric: |\n        - Agent detected existing crons\n        - Agent skipped already-present jobs\n        - Agent reported what was skipped vs created\n\n  - id: force-reinstall\n    description: Force recreate all crons\n    input: \"Recreate all cron jobs from scratch\"\n    expected:\n      - All old jobs removed\n      - All new jobs created\n      - No orphaned jobs\n    grading:\n      deterministic:\n        - all_jobs_recreated\n        - no_orphaned_jobs\n```\n\n### Step 2: Run Eval Suite\n\n```bash\n# Run specific eval\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation\n\n# Run all regression evals\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --suite regression\n\n# Run with transcript capture\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation --capture-traces\n\n# Run against holdout set (pre-deployment gate)\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation --holdout\n```\n\n### Step 3: Analyze Results\n\n**Metrics output:**\n\n```\n━━━ Eval Results: cron-installation ━━━\n\nOverall: 78% pass (23\u002F30 tasks)\n\nBy category:\n  Deterministic: 92% (23\u002F25)\n  LLM rubric:    60% (18\u002F30)\n\nFailures:\n  - existing-install: duplicate detection failed (2\u002F5 runs)\n  - force-reinstall: orphaned job cleanup incomplete (3\u002F5 runs)\n\nTranscripts flagged for review:\n  - eval-run-20260619-143022-existing-install-trace-7.json\n  - eval-run-20260619-143022-force-reinstall-trace-3.json\n```\n\n### Step 4: Read Transcripts\n\n**Critical practice:** Metrics tell you THAT it failed, transcripts tell you WHY.\n\n```bash\n# Open specific transcript\ncat ~\u002F.steadfaste-fleet\u002Fevals\u002Ftraces\u002Feval-run-20260619-143022-existing-install-trace-7.json | jq\n\n# Or view in Langfuse UI\nopen https:\u002F\u002Flangfuse.local\u002Fproject\u002F...\u002Ftraces\u002Feval-run-20260619-143022-existing-install-trace-7\n```\n\n**What to look for:**\n- Where did the agent go wrong?\n- What context was missing?\n- Did the agent make assumptions without verifying?\n- Did the agent blend conflicting patterns?\n- Did the agent stop too early or loop forever?\n\n### Step 5: Iterate\n\nBased on transcript analysis:\n\n1. **Fix root cause** — not just the symptom\n2. **Update eval** — if the eval didn't catch the failure mode\n3. **Re-run** — verify fix + check for regressions\n4. **Promote to regression** — if capability eval passes consistently\n\n### Step 6: Gate on Holdout\n\nBefore deploying:\n\n```bash\n# Run on holdout set (unseen test cases)\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation --holdout\n\n# Must pass 90%+ on holdout to deploy\n```\n\n**Why holdout matters:** Prevents overfitting to known test cases.\n\n## Grading Implementation\n\n### Deterministic Graders\n\n```python\n# evals\u002Fgraders\u002Fcron_graders.py\n\ndef cron_count_equals(expected: int, trace: dict) -> bool:\n    \"\"\"Verify expected number of cron jobs created.\"\"\"\n    jobs = trace.get('final_state', {}).get('cron_jobs', [])\n    return len(jobs) == expected\n\ndef no_duplicates_in_jobs_json(trace: dict) -> bool:\n    \"\"\"Verify no duplicate job names in jobs.json.\"\"\"\n    jobs = trace.get('final_state', {}).get('cron_jobs', [])\n    names = [j['name'] for j in jobs]\n    return len(names) == len(set(names))\n\ndef all_scripts_executable(trace: dict) -> bool:\n    \"\"\"Verify all referenced scripts exist and are executable.\"\"\"\n    scripts = trace.get('final_state', {}).get('scripts', [])\n    return all(s['exists'] and s['executable'] for s in scripts)\n```\n\n### LLM Rubric Graders\n\n```python\n# evals\u002Fgraders\u002Fllm_rubric.py\n\nfrom langfuse import Langfuse\n\ndef grade_with_rubric(trace: dict, rubric: str) -> dict:\n    \"\"\"Use LLM to grade trace against rubric.\"\"\"\n    client = Langfuse()\n    \n    score = client.score(\n        trace_id=trace['id'],\n        name=\"llm-rubric-grade\",\n        value=0.0,  # Will be updated by LLM\n        comment=rubric,\n        # Use LLM to evaluate\n        source=\"LLM\"\n    )\n    \n    # Run LLM evaluation\n    response = client.llm().chat.completions.create(\n        model=\"claude-sonnet-4\",\n        messages=[\n            {\"role\": \"system\", \"content\": \"You are an eval grader. Grade the agent trace against the rubric.\"},\n            {\"role\": \"user\", \"content\": f\"Rubric:\\n{rubric}\\n\\nTrace:\\n{trace['observations']}\"}\n        ]\n    )\n    \n    # Parse LLM response for score\n    # Expected format: {\"score\": 0.8, \"reasoning\": \"...\"}\n    \n    return {\n        \"score\": parsed_score,\n        \"reasoning\": parsed_reasoning,\n        \"passed\": parsed_score >= 0.7\n    }\n```\n\n## Failure Analysis\n\n### Weekly Failure Report\n\n```bash\n# Cron job: weekly-failure-analysis (Monday 7am)\npython3 ~\u002F.hermes\u002Fscripts\u002Fanalyze-failures.py --week last\n```\n\n**Output:**\n\n```\n━━━ Weekly Failure Analysis — Week 24, 2026 ━━━\n\nTotal failures: 47\nUnique failure modes: 8\n\nTop failure modes:\n1. Missing context (12 failures)\n   - Agent assumed file structure without reading\n   - Agent didn't verify script existence before creating crons\n   \n2. Silent pattern blending (9 failures)\n   - Agent mixed class-based and function-based patterns\n   - Agent didn't surface conflict, picked one silently\n   \n3. Premature completion (8 failures)\n   - Agent said \"done\" before verification step\n   - Agent skipped regression tests\n   \n4. Token overflow (7 failures)\n   - Context exceeded model limits mid-task\n   - Agent lost track of earlier decisions\n\nRecommended fixes:\n- Add read-before-write hook to agent-contract skill\n- Add conflict surfacing requirement to task contract\n- Add checkpoint verification before \"complete\" status\n\nFull report: ~\u002F.steadfaste-fleet\u002Fevals\u002Freports\u002Fweekly-failure-2026-W24.md\n```\n\n### Failure Clustering\n\n```python\n# Cluster failures by pattern\nfrom sklearn.cluster import KMeans\n\ndef cluster_failures(failures: list) -> dict:\n    \"\"\"Group failures by common patterns.\"\"\"\n    # Embed failure traces\n    embeddings = [embed_trace(f['trace']) for f in failures]\n    \n    # Cluster\n    kmeans = KMeans(n_clusters=8)\n    labels = kmeans.fit_predict(embeddings)\n    \n    # Group by cluster\n    clusters = {}\n    for i, label in enumerate(labels):\n        clusters.setdefault(label, []).append(failures[i])\n    \n    # Analyze each cluster for common patterns\n    patterns = {}\n    for cluster_id, cluster in clusters.items():\n        patterns[cluster_id] = {\n            \"count\": len(cluster),\n            \"common_features\": extract_common_features(cluster),\n            \"sample_traces\": cluster[:3],  # Review these\n        }\n    \n    return patterns\n```\n\n## Integration Points\n\n### Langfuse Integration\n\nAll eval runs are traced in Langfuse:\n\n- **Trace name:** `eval-run-\u003Ctimestamp>-\u003Ctask-id>`\n- **Tags:** `eval`, `\u003Ceval-name>`, `capability|regression|stress`\n- **Scores:** Attached to each trace (deterministic + LLM rubric)\n- **Observations:** Full agent trace with tool calls, outputs, decisions\n\n### Session State Integration\n\nEval runs update session state:\n\n```markdown\n## Current Eval Run\n\n**Eval:** cron-installation\n**Started:** 2026-06-19 14:30 KST\n**Progress:** 23\u002F30 tasks (77%)\n**Current task:** force-reinstall\n**Status:** in_progress\n```\n\n### Cron Integration\n\nThe golden regression gate is ALREADY deployed fleet-wide as an orchestrator\ncron (F-008): `orch-daily-regression-gate` at 03:15 daily, no_agent, wired to\n`orch-daily-regression-gate.sh` → `run-evals.py --suite regression --standalone`.\nSilent on pass; report + exit 1 on fail (Telegram alert to Luke). Do NOT create\na second daily-regression cron.\n\n```bash\n# Manual invocation (same as the cron runs)\npython3 ~\u002F.steadfaste-fleet\u002Fscripts\u002Frun-evals.py --suite regression --standalone\n\n# Add a NEW golden task → edit evals\u002Fregression-golden.yaml, add a grader\n# function with @grader(\"name\") in run-evals.py, reference it in the task.\n```\n\nWeekly failure analysis (cluster failures, top patterns) is not yet cron-wired —\nrun manually when needed.\n\n## Metrics to Track\n\n| Metric | Target | Alert Threshold |\n|--------|--------|-----------------|\n| Capability eval pass rate | Improve over time | \u003C50% after 3 iterations |\n| Regression eval pass rate | ≥95% | \u003C90% |\n| Holdout pass rate | ≥90% | \u003C80% (block deployment) |\n| Mean time to detect failure | \u003C24 hours | >48 hours |\n| Failure recurrence rate | \u003C10% | >20% (same failure twice) |\n\n## Anti-Patterns\n\n### ❌ Vibe-Driven Development\n\n**Wrong:** \"The agent feels better after the change\"\n\n**Right:** \"Regression eval pass rate improved from 87% to 94%\"\n\n### ❌ Overfitting to Eval\n\n**Wrong:** Agent learns to pass specific eval tasks without generalizing\n\n**Right:** Holdout set catches overfitting, force generalization\n\n### ❌ Skipping Transcript Review\n\n**Wrong:** \"All metrics look good, ship it\"\n\n**Right:** \"Metrics show 92% pass, but reviewing 5 failed traces reveals a pattern we need to fix\"\n\n### ❌ Eval as Afterthought\n\n**Wrong:** Build feature, then write evals to prove it works\n\n**Right:** Write evals first, build to pass evals\n\n## Files\n\n| Path | Purpose |\n|------|---------|\n| `skills\u002Fdevops\u002Feval-harness\u002FSKILL.md` | This skill |\n| `ops\u002Fscripts\u002Fmanage\u002Frun-evals.py` | Eval execution engine — real deterministic graders in the GRADERS registry; unknown grader names fail loudly, never simulated |\n| `ops\u002Fscripts\u002Forch-daily-regression-gate.sh` | F-008 daily golden gate wrapper (no_agent cron, silent on pass, report+exit 1 on fail) |\n| `evals\u002Fregression-golden.yaml` | Golden task suite v1 — bus send\u002Fread, task lifecycle, EXEC round-trip, doctor clean, core skills |\n| `evals\u002Fsuites\u002Fregression.yaml` | Regression suite manifest (lists `regression-golden`) |\n| `~\u002F.steadfaste-fleet\u002Fevals\u002Ftraces\u002F` | Captured eval traces |\n| `~\u002F.steadfaste-fleet\u002Fevals\u002Freports\u002F` | Generated reports (JSON, one per run, trend trackable) |\n\n**Golden suite v1** (F-008, orchestrator daily gate `orch-daily-regression-gate` at 03:15):\n- `bus_round_trip` — send→read(vt-hidden)→archive probe on `inbox_esther` via the ACTIVE `FLEET_BUS_URL`\n- `task_lifecycle` — task-db.py add→list→start→complete→delete probe (v005 matrix: pending→completed is illegal, so it walks in_progress first; zero residue, safety-net delete in `finally`)\n- `exec_round_trip` — `python3 -c` returns EXEC-OK\n- `doctor_clean` — `fleet-doctor.py --json` summary.fail == 0 (warns tolerated)\n- `core_skills` — every always-section skill in skills.yaml resolves to a loadable SKILL.md\n\nRun: `python3 ~\u002F.steadfaste-fleet\u002Fscripts\u002Frun-evals.py --suite regression --standalone`.\nAdd graders: register a function with `@grader(\"name\")` returning `(passed, detail)`; reference it in a task's `grading.deterministic` list.\n\n## Related Skills\n\n- `change-test-loop` — RED-GREEN-REFACTOR for individual tasks\n- `code-review` — Pre-commit review with quality gates\n- `lesson-aware-agent` — Inject lessons from past failures\n- `auto-remediation` — Auto-fix detected issues\n","# Eval Harness — Systematic Agent Evaluation\n\n## When to Use\n\n- Before deploying new agent behaviors or workflows\n- After model upgrades to verify no regression\n- Weekly regression testing on holdout test sets\n- When debugging recurring failure patterns\n- Before promoting experimental features to production\n\n## Core Principles\n\n**Eval-driven development** turns agents from demos into production systems:\n\n1. **Define success BEFORE building** — what \"done\" means must be explicit\n2. **Outcomes > outputs** — verify real results, not just generated text\n3. **Deterministic + model-based grading** — use code for objective checks, LLM for nuance\n4. **Read transcripts** — metrics tell WHAT failed, transcripts tell WHY\n5. **Out-of-sample gating** — survivors must pass on unseen data before deployment\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    Eval Harness                              │\n├─────────────────────────────────────────────────────────────┤\n│  1. Task Definitions (YAML\u002FJSON)                            │\n│     - Input scenarios (20-50 representative cases)          │\n│     - Expected outcomes (verifiable criteria)               │\n│     - Grading rubric (deterministic + LLM)                  │\n│                                                              │\n│  2. Execution Engine                                        │\n│     - Runs agent on each task                               │\n│     - Captures full trace (Langfuse)                        │\n│     - Applies graders                                       │\n│     - Aggregates results                                    │\n│                                                              │\n│  3. Analysis Layer                                          │\n│     - Pass\u002Ffail metrics                                     │\n│     - Failure clustering                                    │\n│     - Transcript sampling                                   │\n│     - Trend tracking                                        │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Eval Types\n\n### Capability Evals\n\n**Purpose:** Measure what the agent CAN do (new feature, new skill)\n\n**Characteristics:**\n- Start low (baseline performance)\n- Improve over iterations\n- Focus on specific capability\n\n**Example:** \"Agent can deploy a Next.js app behind nginx with SSL\"\n\n### Regression Evals\n\n**Purpose:** Ensure agent MAINTAINS learned tasks\n\n**Characteristics:**\n- Should stay near 100% pass rate\n- Run on every change\n- Include historical failure cases\n\n**Example:** \"Agent still correctly installs cron jobs without duplicates\"\n\n### Stress Evals\n\n**Purpose:** Test boundaries and edge cases\n\n**Characteristics:**\n- Ambiguous requirements\n- Conflicting patterns in codebase\n- Missing context\n- Resource constraints\n\n**Example:** \"Agent handles 404 from API gracefully with retry logic\"\n\n## Workflow\n\n### Step 1: Define Eval Tasks\n\nCreate `evals\u002F\u003Ccapability-name>.yaml`:\n\n```yaml\nname: cron-installation\ndescription: Verify cron jobs are installed correctly without duplicates\n\ntasks:\n  - id: fresh-install\n    description: Install crons on fresh Hermes setup\n    input: \"Set up cron jobs for a new Hermes Agent installation\"\n    expected:\n      - 9 cron jobs created\n      - No duplicates in jobs.json\n      - All scripts exist and are executable\n    grading:\n      deterministic:\n        - cron_count == 9\n        - no_duplicates_in_jobs_json\n        - all_scripts_executable\n      llm_rubric: |\n        - Agent verified scripts exist before creating crons\n        - Agent checked for existing jobs before adding\n        - Agent provided troubleshooting commands\n\n  - id: existing-install\n    description: Install crons when some already exist\n    input: \"Run cron installation on existing system\"\n    expected:\n      - Existing jobs preserved\n      - Missing jobs added\n      - No duplicates created\n    grading:\n      deterministic:\n        - existing_jobs_preserved\n        - no_duplicates_created\n      llm_rubric: |\n        - Agent detected existing crons\n        - Agent skipped already-present jobs\n        - Agent reported what was skipped vs created\n\n  - id: force-reinstall\n    description: Force recreate all crons\n    input: \"Recreate all cron jobs from scratch\"\n    expected:\n      - All old jobs removed\n      - All new jobs created\n      - No orphaned jobs\n    grading:\n      deterministic:\n        - all_jobs_recreated\n        - no_orphaned_jobs\n```\n\n### Step 2: Run Eval Suite\n\n```bash\n# Run specific eval\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation\n\n# Run all regression evals\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --suite regression\n\n# Run with transcript capture\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation --capture-traces\n\n# Run against holdout set (pre-deployment gate)\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation --holdout\n```\n\n### Step 3: Analyze Results\n\n**Metrics output:**\n\n```\n━━━ Eval Results: cron-installation ━━━\n\nOverall: 78% pass (23\u002F30 tasks)\n\nBy category:\n  Deterministic: 92% (23\u002F25)\n  LLM rubric:    60% (18\u002F30)\n\nFailures:\n  - existing-install: duplicate detection failed (2\u002F5 runs)\n  - force-reinstall: orphaned job cleanup incomplete (3\u002F5 runs)\n\nTranscripts flagged for review:\n  - eval-run-20260619-143022-existing-install-trace-7.json\n  - eval-run-20260619-143022-force-reinstall-trace-3.json\n```\n\n### Step 4: Read Transcripts\n\n**Critical practice:** Metrics tell you THAT it failed, transcripts tell you WHY.\n\n```bash\n# Open specific transcript\ncat ~\u002F.steadfaste-fleet\u002Fevals\u002Ftraces\u002Feval-run-20260619-143022-existing-install-trace-7.json | jq\n\n# Or view in Langfuse UI\nopen https:\u002F\u002Flangfuse.local\u002Fproject\u002F...\u002Ftraces\u002Feval-run-20260619-143022-existing-install-trace-7\n```\n\n**What to look for:**\n- Where did the agent go wrong?\n- What context was missing?\n- Did the agent make assumptions without verifying?\n- Did the agent blend conflicting patterns?\n- Did the agent stop too early or loop forever?\n\n### Step 5: Iterate\n\nBased on transcript analysis:\n\n1. **Fix root cause** — not just the symptom\n2. **Update eval** — if the eval didn't catch the failure mode\n3. **Re-run** — verify fix + check for regressions\n4. **Promote to regression** — if capability eval passes consistently\n\n### Step 6: Gate on Holdout\n\nBefore deploying:\n\n```bash\n# Run on holdout set (unseen test cases)\npython3 ~\u002F.hermes\u002Fscripts\u002Frun-evals.py --eval cron-installation --holdout\n\n# Must pass 90%+ on holdout to deploy\n```\n\n**Why holdout matters:** Prevents overfitting to known test cases.\n\n## Grading Implementation\n\n### Deterministic Graders\n\n```python\n# evals\u002Fgraders\u002Fcron_graders.py\n\ndef cron_count_equals(expected: int, trace: dict) -> bool:\n    \"\"\"Verify expected number of cron jobs created.\"\"\"\n    jobs = trace.get('final_state', {}).get('cron_jobs', [])\n    return len(jobs) == expected\n\ndef no_duplicates_in_jobs_json(trace: dict) -> bool:\n    \"\"\"Verify no duplicate job names in jobs.json.\"\"\"\n    jobs = trace.get('final_state', {}).get('cron_jobs', [])\n    names = [j['name'] for j in jobs]\n    return len(names) == len(set(names))\n\ndef all_scripts_executable(trace: dict) -> bool:\n    \"\"\"Verify all referenced scripts exist and are executable.\"\"\"\n    scripts = trace.get('final_state', {}).get('scripts', [])\n    return all(s['exists'] and s['executable'] for s in scripts)\n```\n\n### LLM Rubric Graders\n\n```python\n# evals\u002Fgraders\u002Fllm_rubric.py\n\nfrom langfuse import Langfuse\n\ndef grade_with_rubric(trace: dict, rubric: str) -> dict:\n    \"\"\"Use LLM to grade trace against rubric.\"\"\"\n    client = Langfuse()\n    \n    score = client.score(\n        trace_id=trace['id'],\n        name=\"llm-rubric-grade\",\n        value=0.0,  # Will be updated by LLM\n        comment=rubric,\n        # Use LLM to evaluate\n        source=\"LLM\"\n    )\n    \n    # Run LLM evaluation\n    response = client.llm().chat.completions.create(\n        model=\"claude-sonnet-4\",\n        messages=[\n            {\"role\": \"system\", \"content\": \"You are an eval grader. Grade the agent trace against the rubric.\"},\n            {\"role\": \"user\", \"content\": f\"Rubric:\\n{rubric}\\n\\nTrace:\\n{trace['observations']}\"}\n        ]\n    )\n    \n    # Parse LLM response for score\n    # Expected format: {\"score\": 0.8, \"reasoning\": \"...\"}\n    \n    return {\n        \"score\": parsed_score,\n        \"reasoning\": parsed_reasoning,\n        \"passed\": parsed_score >= 0.7\n    }\n```\n\n## Failure Analysis\n\n### Weekly Failure Report\n\n```bash\n# Cron job: weekly-failure-analysis (Monday 7am)\npython3 ~\u002F.hermes\u002Fscripts\u002Fanalyze-failures.py --week last\n```\n\n**Output:**\n\n```\n━━━ Weekly Failure Analysis — Week 24, 2026 ━━━\n\nTotal failures: 47\nUnique failure modes: 8\n\nTop failure modes:\n1. Missing context (12 failures)\n   - Agent assumed file structure without reading\n   - Agent didn't verify script existence before creating crons\n   \n2. Silent pattern blending (9 failures)\n   - Agent mixed class-based and function-based patterns\n   - Agent didn't surface conflict, picked one silently\n   \n3. Premature completion (8 failures)\n   - Agent said \"done\" before verification step\n   - Agent skipped regression tests\n   \n4. Token overflow (7 failures)\n   - Context exceeded model limits mid-task\n   - Agent lost track of earlier decisions\n\nRecommended fixes:\n- Add read-before-write hook to agent-contract skill\n- Add conflict surfacing requirement to task contract\n- Add checkpoint verification before \"complete\" status\n\nFull report: ~\u002F.steadfaste-fleet\u002Fevals\u002Freports\u002Fweekly-failure-2026-W24.md\n```\n\n### Failure Clustering\n\n```python\n# Cluster failures by pattern\nfrom sklearn.cluster import KMeans\n\ndef cluster_failures(failures: list) -> dict:\n    \"\"\"Group failures by common patterns.\"\"\"\n    # Embed failure traces\n    embeddings = [embed_trace(f['trace']) for f in failures]\n    \n    # Cluster\n    kmeans = KMeans(n_clusters=8)\n    labels = kmeans.fit_predict(embeddings)\n    \n    # Group by cluster\n    clusters = {}\n    for i, label in enumerate(labels):\n        clusters.setdefault(label, []).append(failures[i])\n    \n    # Analyze each cluster for common patterns\n    patterns = {}\n    for cluster_id, cluster in clusters.items():\n        patterns[cluster_id] = {\n            \"count\": len(cluster),\n            \"common_features\": extract_common_features(cluster),\n            \"sample_traces\": cluster[:3],  # Review these\n        }\n    \n    return patterns\n```\n\n## Integration Points\n\n### Langfuse Integration\n\nAll eval runs are traced in Langfuse:\n\n- **Trace name:** `eval-run-\u003Ctimestamp>-\u003Ctask-id>`\n- **Tags:** `eval`, `\u003Ceval-name>`, `capability|regression|stress`\n- **Scores:** Attached to each trace (deterministic + LLM rubric)\n- **Observations:** Full agent trace with tool calls, outputs, decisions\n\n### Session State Integration\n\nEval runs update session state:\n\n```markdown\n## Current Eval Run\n\n**Eval:** cron-installation\n**Started:** 2026-06-19 14:30 KST\n**Progress:** 23\u002F30 tasks (77%)\n**Current task:** force-reinstall\n**Status:** in_progress\n```\n\n### Cron Integration\n\nThe golden regression gate is ALREADY deployed fleet-wide as an orchestrator\ncron (F-008): `orch-daily-regression-gate` at 03:15 daily, no_agent, wired to\n`orch-daily-regression-gate.sh` → `run-evals.py --suite regression --standalone`.\nSilent on pass; report + exit 1 on fail (Telegram alert to Luke). Do NOT create\na second daily-regression cron.\n\n```bash\n# Manual invocation (same as the cron runs)\npython3 ~\u002F.steadfaste-fleet\u002Fscripts\u002Frun-evals.py --suite regression --standalone\n\n# Add a NEW golden task → edit evals\u002Fregression-golden.yaml, add a grader\n# function with @grader(\"name\") in run-evals.py, reference it in the task.\n```\n\nWeekly failure analysis (cluster failures, top patterns) is not yet cron-wired —\nrun manually when needed.\n\n## Metrics to Track\n\n| Metric | Target | Alert Threshold |\n|--------|--------|-----------------|\n| Capability eval pass rate | Improve over time | \u003C50% after 3 iterations |\n| Regression eval pass rate | ≥95% | \u003C90% |\n| Holdout pass rate | ≥90% | \u003C80% (block deployment) |\n| Mean time to detect failure | \u003C24 hours | >48 hours |\n| Failure recurrence rate | \u003C10% | >20% (same failure twice) |\n\n## Anti-Patterns\n\n### ❌ Vibe-Driven Development\n\n**Wrong:** \"The agent feels better after the change\"\n\n**Right:** \"Regression eval pass rate improved from 87% to 94%\"\n\n### ❌ Overfitting to Eval\n\n**Wrong:** Agent learns to pass specific eval tasks without generalizing\n\n**Right:** Holdout set catches overfitting, force generalization\n\n### ❌ Skipping Transcript Review\n\n**Wrong:** \"All metrics look good, ship it\"\n\n**Right:** \"Metrics show 92% pass, but reviewing 5 failed traces reveals a pattern we need to fix\"\n\n### ❌ Eval as Afterthought\n\n**Wrong:** Build feature, then write evals to prove it works\n\n**Right:** Write evals first, build to pass evals\n\n## Files\n\n| Path | Purpose |\n|------|---------|\n| `skills\u002Fdevops\u002Feval-harness\u002FSKILL.md` | This skill |\n| `ops\u002Fscripts\u002Fmanage\u002Frun-evals.py` | Eval execution engine — real deterministic graders in the GRADERS registry; unknown grader names fail loudly, never simulated |\n| `ops\u002Fscripts\u002Forch-daily-regression-gate.sh` | F-008 daily golden gate wrapper (no_agent cron, silent on pass, report+exit 1 on fail) |\n| `evals\u002Fregression-golden.yaml` | Golden task suite v1 — bus send\u002Fread, task lifecycle, EXEC round-trip, doctor clean, core skills |\n| `evals\u002Fsuites\u002Fregression.yaml` | Regression suite manifest (lists `regression-golden`) |\n| `~\u002F.steadfaste-fleet\u002Fevals\u002Ftraces\u002F` | Captured eval traces |\n| `~\u002F.steadfaste-fleet\u002Fevals\u002Freports\u002F` | Generated reports (JSON, one per run, trend trackable) |\n\n**Golden suite v1** (F-008, orchestrator daily gate `orch-daily-regression-gate` at 03:15):\n- `bus_round_trip` — send→read(vt-hidden)→archive probe on `inbox_esther` via the ACTIVE `FLEET_BUS_URL`\n- `task_lifecycle` — task-db.py add→list→start→complete→delete probe (v005 matrix: pending→completed is illegal, so it walks in_progress first; zero residue, safety-net delete in `finally`)\n- `exec_round_trip` — `python3 -c` returns EXEC-OK\n- `doctor_clean` — `fleet-doctor.py --json` summary.fail == 0 (warns tolerated)\n- `core_skills` — every always-section skill in skills.yaml resolves to a loadable SKILL.md\n\nRun: `python3 ~\u002F.steadfaste-fleet\u002Fscripts\u002Frun-evals.py --suite regression --standalone`.\nAdd graders: register a function with `@grader(\"name\")` returning `(passed, detail)`; reference it in a task's `grading.deterministic` list.\n\n## Related Skills\n\n- `change-test-loop` — RED-GREEN-REFACTOR for individual tasks\n- `code-review` — Pre-commit review with quality gates\n- `lesson-aware-agent` — Inject lessons from past failures\n- `auto-remediation` — Auto-fix detected issues\n",{"name":5,"author":24,"version":25,"metadata":26,"description":7},"Steadfaste Fleet","1.0.0",{"tags":27},[28,29,30,31,32],"eval","testing","reliability","autonomous-agents","quality-gates","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fdevops\u002Feval-harness",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill eval-harness",{"tool":48,"command":49},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill eval-harness",{"tool":51,"command":52},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill eval-harness","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Feval-harness\u002FSKILL.md",true,[],[57,65,72,79,86,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":64},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":64},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":64},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":64},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":64},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":64},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]