docs/harness-authoring.md

Harness Authoring Guide

Harness scenarios live under scenarios/cache-harness/ and are executed through scripts/cache/* or picasso harness run.

Scenario Shape

Each scenario needs:

Episode Packages

Episode packages are written under reports/cache-harness/episodes/<episode-id>/ and include:

Use none-local only for local debugging. Use public-safe for anything shareable.

Evaluators

Evaluators should inspect both outcome and process:

Provider Cache Scenarios

Provider cache scenarios should stay deterministic by default. Use deterministic provider usage for normal scenario runs, and reserve live provider calls for the opt-in comparison script.

Required provider coverage:

Do not put raw prompts, source files, memory bodies, tool output, credentials, explicit cached-content handles, or raw salts in shareable reports. Use hashes and counts unless a local-only scenario explicitly requests none-local.

Adding A Scenario

  1. Create scenarios/cache-harness/<scenario-id>/README.md.
  2. Add the scenario to the relevant scripts/cache/* runner.
  3. Add expected metrics and failure cases.
  4. Run the cache harness and privacy scripts.
  5. If the scenario touches provider behavior, add or update mocked provider adapter coverage before adding any live-provider expectation.
  6. Do not mark the scenario complete until reports exist under reports/cache-harness/.