| name | Domain Evaluation Harness |
| description | Create and configure domain-specific evaluation harnesses for the HyperAgents evolution loop. Defines how tasks are loaded, agents are invoked, predictions are collected, and scores are computed. Triggers when setting up evaluation domains or creating custom fitness functions. |
| version | 1.0.0 |
| metadata | {"filePattern":["**/harness*","**/domains/**","**/.hyperagents/domains/**"],"bashPattern":["harness","domain","evaluation"],"priority":65} |
Domain Evaluation Harness
The harness is the bridge between the HyperAgents evolution loop and domain-specific evaluation. It defines how to load tasks, run the agent, collect predictions, and compute fitness scores.
Harness Architecture
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Task List โโโโโ>โ Harness โโโโโ>โ Predictions โ
โ (input) โ โ (executor) โ โ (output) โ
โโโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ โ
โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโโ
โ Task Agent โ โ Reporter โ
โ (modified) โ โ (scorer) โ
โโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ
โโโโโโโโผโโโโโโโโ
โ report.json โ
โ (fitness) โ
โโโโโโโโโโโโโโโโ
Creating a Custom Domain
Step 1: Define the Task Format
Create a task list JSON file with evaluation items:
[
{
"question_id": "task_001",
"input": "Write a function that reverses a string",
"expected": "def reverse_string(s): return s[::-1]"
}
]
Step 2: Create the Harness Script
Place at .hyperagents/domains/<domain>/harness.sh:
#!/bin/bash
TASK_LIST=$2
AGENT_PATH=$4
OUTPUT_DIR=$6
NUM_SAMPLES=$8
Step 3: Create the Reporter
Place at .hyperagents/domains/<domain>/report.sh:
#!/bin/bash
OUTPUT_DIR=$2
Step 4: Register the Domain
Add to .hyperagents/config.json:
{
"domains": {
"my_domain": {
"harness": ".hyperagents/domains/my_domain/harness.sh",
"reporter": ".hyperagents/domains/my_domain/report.sh",
"score_key": "accuracy",
"splits": ["train", "val"],
"can_ensemble": true,
"staged_eval_fraction": 0.1,
"staged_eval_samples": 10
}
}
}
Built-in Domains for Claude Code
claude-skill โ Skill Quality
Evaluates a Claude Code skill by:
- Loading test prompts that should trigger the skill
- Running a simulated session with the skill active
- Scoring the output for relevance, accuracy, and helpfulness
claude-agent โ Agent Effectiveness
Evaluates a Claude Code agent by:
- Loading task descriptions the agent should handle
- Dispatching the agent on each task
- Scoring completions for correctness and quality
claude-hook โ Hook Reliability
Evaluates a Claude Code hook by:
- Simulating tool calls that should trigger the hook
- Checking that the hook fires correctly
- Measuring false positive/negative rates
- Scoring execution time
code-quality โ General Code Quality
Combines multiple signals:
- Test pass rate
- Lint issue count
- Type error count
- Cyclomatic complexity delta
Domain Configuration Reference
| Field | Type | Description |
|---|
harness | string | Path to harness script |
reporter | string | Path to reporter script |
score_key | string | JSON key in report.json for the fitness score |
splits | string[] | Evaluation splits: train, val, test |
can_ensemble | boolean | Whether ensemble evaluation makes sense |
staged_eval_fraction | number | Fraction of samples for staged eval |
staged_eval_samples | number | Absolute number of samples for staged eval |
eval_timeout | number | Timeout in seconds per task |
max_workers | number | Parallel evaluation workers |
Multi-Domain Evolution
HyperAgents supports evolving against multiple domains simultaneously:
- Each domain runs its own harness and scoring
- The aggregate fitness is the mean across domains
- A generation must score non-null on ALL domains to be valid
- Different domains can have different splits and sample sizes