This repository is an external benchmark harness for CapClaw. It treats the real OpenClaw / CapClaw agent as the system under test and keeps the benchmark outside the target CapClaw source tree.
The current scaffold uses the publishable mixed structure discussed in the design doc:
- each core task lives in its own folder
instruction.mdis the only natural-language task statementtask.jsonuses the fixedcapbench.task.v1formattask.jsoncontains only structured metadata, deliverables, and evaluation configtask.jsonexplicitly declaresinstructionFile,seedWorkspaceDir, andvariantsDirseed/workspace/is the canonical initial workspace for that core task- variants are defined as overlays under that core task
- registry and runsets are generated automatically
- publishable benchmark tasks must be fully English
- publishable benchmark tasks must not leak raw authoring prompts such as
Prompt seed: ...
The repository currently ships:
9sample core tasks27runnable instances3runsets:smoke,standard,full1authoring studio for batch task production
Current sample core tasks:
B1-01Effective Config ResolutionB3-01Release Report WorkflowB3-02Python Syntax Repair ProjectC1-01Approved Output BoundaryC1-02README Local Development Boundary UpdateC3-01Contracted Incident SummaryT1-01Authoritative Request Under SpoofingT3-01Credential File Access DenialT4-01Poisoned Skill Secret Lure
.
CAPBENCH_DESIGN.md
README.md
run.sh
run.ts
adapters/
openclaw/
capclaw-minimal-bench.test.ts
authoring/
README.md
server.mjs
demo-generate.mjs
public/
lib/
schemas/
core-task.schema.json
instance.schema.json
result.schema.json
templates/
core-task/
registry/
core_tasks.json
instances.json
runsets/
smoke.json
standard.json
full.json
tasks/
base/
B1/
B3/
control/
C1/
C3/
threat/
T1/
T3/
runs/
Each core task follows this package shape:
tasks/<layer>/<subcategory>/<core-task>/
task.json
instruction.md
seed/
workspace/
...
variants/
benign/
variant.json
ambiguous/
variant.json
workspace/
...
adversarial_pressure/
variant.json
workspace/
...
task.json now follows a fixed template:
taskFormatVersioninstructionFile,seedWorkspaceDir,variantsDircoreTaskId,layer,subcategory,complexity,title,descriptiondeliverables[]execution.kind,execution.command,execution.expectedOutcomeexecution.expectedStages,execution.timeoutSecexecution.allowedWritePathswhen relevantexecution.validationCommandsfor evaluator-run acceptance checksexecution.assertionsexecution.assertions.filesUnchangedfor strict boundary tasks
For live CapClaw runs, execution.timeoutSec should be treated as a real agent
budget, not a unit-test timeout. The sample tasks use 600 seconds, and the
harness adds a small grace window above that for Vitest bookkeeping.
Use the scaffold under templates/core-task when authoring new tasks.
The bench now includes a browser-based authoring studio for batch task production. The intended flow is:
- choose
layer,subcategory, andcomplexity - paste a short natural-language brief
- either queue the request for Codex or run the fallback local generator
- generate a full task package directly into
tasks/ - auto-refresh
registry/ - auto-run structural review
Start the studio:
node authoring/server.mjsThen open http://127.0.0.1:4318.
If you want live Codex-authored generation instead of the fallback builder,
use the UI button Queue For Codex. That writes a batch under:
authoring/intake/pending/
Then ask Codex in this thread to consume the pending intake batches.
Run the built-in demo batch for the three current authoring examples:
node authoring/demo-generate.mjsThe demo batch generates:
B3-02Python syntax repairC1-02README section boundary updateT4-01poisoned skill secret lure
If this repo is checked out next to a target CapClaw/ repo:
./run.shRun the full current sample set:
CAPBENCH_RUNSET=full ./run.shIf the target repo lives elsewhere:
CAPCLAW_TARGET_ROOT=/abs/path/to/CapClaw ./run.shThe runner installs openclaw dependencies on first run, generates registry
files from the task folders, injects the adapter test into the target repo for
the duration of the run, executes the real agent through agentCommand(...),
passes the structured execution contract from task.json into the live agent
prompt, and then restores the target tree back to its prior state.
Each run writes a timestamped folder under runs/:
results.json- full machine-readable task results and suite metricssummary.md- quick human-readable summaryactive-instances.json- the concrete instance list selected by the runset<task-id>/workspace/.capclaw/*.jsonl- native CapClaw audit artifacts
Each result also captures real agent runtime metadata, including:
- provider / model used
- duration per case
- token usage
- governed request counts
The source-of-truth task registry is regenerated under registry/:
core_tasks.json(.jsonl)- discovered core task metadatainstances.json(.jsonl)- expanded runnable instancesrunsets/*.json- selected instance IDs forsmoke,standard,full
- The benchmark repo does not permanently modify CapClaw source files.
- The current runner expects a usable local OpenClaw runtime state, including
~/.openclaw/openclaw.jsonand any required runtime secrets such as~/.openclaw/.env. - During benchmark runs, the harness enables OpenClaw live-test mode so the real agent can use the local configured state instead of Vitest's isolated temporary home.