> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# meta-harness plugin

> Scaffold a workspace, validate candidate harness.py files, and run outer-loop search over prompt, retrieval, parsing, and memory strategies for LLM tasks.

**meta-harness** scaffolds a workspace, validates candidate `harness.py` files, runs an outer-loop search over prompt / retrieval / parsing / memory strategies, and exposes script-based query and report tools for inspecting search state.

## Quick start

Run from the repo root:

```bash theme={null}
# 0. (Optional) Clarify a fuzzy goal into structured config
uv run python plugins/meta-harness/scripts/clarify_task.py --workspace ./workspace

# 1. Initialize a workspace with baselines and starter config
uv run python plugins/meta-harness/scripts/init_workspace.py \
  --workspace ./workspace \
  --task_type qa \
  --num_baselines 3

# 2. Run the outer-loop search
uv run python plugins/meta-harness/scripts/meta_harness_scaffold.py \
  --workspace ./workspace \
  --iterations 30 \
  --candidates 2

# 3. Inspect the resulting search state
uv run python plugins/meta-harness/scripts/query_cli.py --workspace ./workspace summary
uv run python plugins/meta-harness/scripts/query_cli.py --workspace ./workspace top --metric accuracy -k 5
```

In Claude Code:

```bash theme={null}
claude --plugin-dir ./plugins/meta-harness
/meta-harness:meta-harness
```

## What gets created

`init_workspace.py` creates the stable workspace scaffold:

* `.gitignore`
* `search_config.json`
* `eval_results.json`
* `proposer_skill.txt`
* `workspace_manifest.json`
* `history/candidates/candidate_*/harness.py` baseline seeds
* `candidates/`, `logs/`, `traces/`, and `reports/` directories

`meta_harness_scaffold.py` creates the live search artifacts:

* `candidates/candidate_<iteration>_<variant>/harness.py`
* `search_state.json`
* updated `eval_results.json`
* per-iteration history, Pareto frontier, and best-by-metric state

## Validation

```bash theme={null}
uv run pytest plugins/meta-harness/tests
```
