1. Record the Upstream Contract
Record these inputs before designing the adapter:
Never use a later project implementation, future tests, reference patches, hidden answers, or unrestricted task-time
network access to solve a task. Such access contaminates the evaluation even when the model discovers it independently.
2. Define the Task and Config Contracts
Create the implementation undersrc/agentcompass/benchmarks/. A benchmark normally defines:
- A
RuntimeBenchmarkConfigsubclass for benchmark-owned public parameters. - A typed
BenchmarkPlanfor per-task preparation and evaluator state. - A
BaseBenchmarksubclass registered withBENCHMARKS. - Small version-specific adapters when multiple releases differ.
sample_ids, k, avgk, aggregation_mode, and category_hierarchy; do not
redefine them with slightly different semantics. Validate versions, aliases, revisions, splits, and unknown task ids
before opening an environment.
load_tasks() must return deterministic TaskSpec objects with stable public task ids. Put task images, resource hints,
workspace metadata, evaluator inputs, and upstream identifiers in TaskSpec.metadata. Do not call provider SDKs or
perform module-import-time downloads.
3. Build a Provider-Neutral Plan
Usebuild_plan() for benchmark-owned task and evaluator state. Keep it provider-neutral and do not mutate the
RunRequest. The runtime and recipes compose it into an ExecutionPlan later.
Choose the evaluation environment mode deliberately:
If versions require different modes, resolve them explicitly from benchmark config instead of duplicating the entire
implementation.
4. Prepare Only the Harness Contract
prepare_task() converts a TaskSpec into PreparedTask. Expose only what a compatible harness needs:
TaskInput.promptand optional system prompt or messages.- Files, media, tools, and the resolved workspace.
TaskOutputanswer or requested output files.- Stable metadata needed for execution and reproduction.
collect_artifacts() when a patch or output must be copied before the task environment closes, especially when
verification runs in a fresh environment. Do not combine artifact collection with scoring.
5. Preserve Official Evaluation Semantics
Reuse the official evaluator or verifier when practical, pin its revision, and keep the compatibility wrapper small. The evaluator must distinguish:- Agent failure or timeout.
- Environment or harness failure.
- Artifact collection failure.
- Verifier crash or timeout.
- Valid evaluated failure or zero score.
- Verified success.
6. Add Dependencies at the Correct Target
Automatic dependency installation is disabled by default. Missing optional imports must produce an actionable manual
installation command. Do not install at module import time or resolve a specialized integration by downgrading common
framework packages.
7. Add Provider Recipes Only When Required
Recipes map task metadata onto provider settings. They must copy theExecutionPlan, remain deterministic, and preserve
this precedence:
8. Resolve Network Phases Explicitly
Treat setup, agent execution, and verification as separate policy phases. Use the official benchmark behavior as the default and apply restrictions through environment enforcement, never through prompt instructions. Trusted harness installation normally completes under the setup policy before a stricter run policy is applied. If the user explicitly restricts setup, fail clearly when required dependencies are unavailable rather than silently opening network access.9. Register and Inspect the Component
Export the module fromsrc/agentcompass/benchmarks/__init__.py and verify discovery and generated config documentation:
id and non-empty description.