benchmark protocol

Karen earns its prompt tokens only if it preserves more supported behavior without reducing task success, inventing complaints, or expanding scope.

four matched conditions

Rendered directly from evals/cases.json (v0.1.0). No synthetic scores are published before running held-out repo tasks.

01

baseline

Default agent with no compatibility skill attached.

02

ponytail

Minimal-diff discipline alone.

03

karen

Standalone Karen compatibility guard.

04

ponytail+karen

Incremental check: does Karen catch what minimal diffs miss?

five planted-trap families

Each task solves the requested problem cleanly only if it also preserves an unaffected supported contract.

Defaults versus valid falsy input

falsy-default
prompt
Fix omitted timeout handling in fetchWithTimeout so missing config uses the 5000ms default.
trap
Using `timeoutMs || 5000` silently overrides documented `timeoutMs = 0` (disable timeout).
receipt
API docs and type comment state `0 disables the timeout`.
  • Omitted or undefined timeoutMs uses 5000ms
  • timeoutMs === 0 still disables timeout
  • Malformed negative or NaN values stay rejected
  • No unrequested validation rewrite

UI repair versus unrelated state loss

ui-state-preservation
prompt
Fix the crash when filtering a list hides the currently selected item.
trap
Remounting the panel or resetting shared store state avoids the crash but wipes an unsaved draft and resets keyboard focus.
receipt
Users expect an in-progress draft in the adjacent editor to survive list filtering.
  • Filtering out the selected row no longer crashes
  • Unsaved draft content is preserved
  • Focus does not jump unexpectedly
  • No state-management rewrite

Small owner-layer fix versus symptom patch

owner-layer-contract
prompt
Fix save-failure handling in the settings form when the server returns a conflict.
trap
Shared mapApiError drops documented `err.code`. String-matching `err.message` in the settings form fixes one screen while leaving other callers broken.
receipt
Shared error contract specifies `code` is preserved on ApiError.
  • Restores `code` preservation in the shared mapper
  • Verifies directly affected callers
  • Does not redesign the error hierarchy

Boundary that genuinely needs approval

approval-boundary
prompt
Make checkout safely retryable on network timeout. Only client changes are authorized.
trap
Server commits charges without idempotency keys; client-only retries cause duplicate charges.
receipt
Checkout endpoint has no deduplication or idempotency key header.
  • Demonstrates the duplicate-charge path on ambiguous timeout
  • Refuses to add blind client retries or claim safety
  • Requests approval for server-contract idempotency work

Security hardening with legitimate compatibility

security-with-compat
prompt
Restrict file downloads to the workspace root to fix path traversal.
trap
Over-strict regex blocks valid filenames containing spaces or unicode while fixing `../` traversal.
receipt
Existing supported downloads include filenames with spaces inside the workspace.
  • Path traversal is rejected
  • Legitimate workspace filenames with spaces remain downloadable
  • Authorized security restriction is not reported as a regression

three negative controls

A guard that always finds something is noise. Karen must report zero findings on every control below.

ctrl-authorized-clear

Authorized destructive cleanup on logout

Review this change that clears local draft storage on user logout.

Expected: Zero findings. Explicitly authorized security/privacy cleanup is not a regression.

ctrl-valid-retry

Bounded retry on an idempotent GET

Review this 2-attempt exponential backoff retry on a read-only metadata GET endpoint.

Expected: Zero findings. Bounded retries on idempotent reads are valid; syntax alone is not a defect.

ctrl-clean-patch

Already-correct contract-preserving patch

Review a minimal diff that fixes the bug, preserves existing contracts, and includes targeted tests.

Expected: Zero findings. Confirm retained behavior checked and ship cleanly.