# Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger

> Optimizes failing agent prompts without overfitting via K=3 contrastive probes, a $0 Static Leak & Bloat Shield, holdout rollback gates, and a DO/AVOID Lesson Ledger.

Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger is a paid AI agent skill on Agensi by Pritam Kumar Panda, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [Pritam Kumar Panda](https://www.agensi.io/creators/pritam-kumar-panda)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/contrastive-harness-optimizer-propose-probe-compose-lesson-ledger
- Tags: prompt-skill-engineering, llm-ops, agents-orchestration

## About this skill

Naive single-candidate prompt editing routinely overfits to the exact failure in front of it—either pasting literal expected answers into the prompt or adding overly broad restrictions (such as global character caps) that break unrelated tasks.

**Contrastive Optimizer** implements two-level recursive harness optimization:
1. **Task-Level Contrastive Recursion (`Propose → Probe → Compose`)**: Proposes 3 orthogonal candidate strategies (*Invariant Reasoning*, *Task-Scoped Skill*, *Hard Guardrail*), filters them through a `$0` **Static Leak & Bloat Shield**, probes survivors in isolated sandboxes, and promotes only edits that strictly improve `dev` with **zero regression on hidden `holdout` cases**.
2. **Experience Reflection (`DO` / `AVOID` Ledger)**: Distills accepted and rejected probe contrasts into a persistent `lessons/lessons.json` + `LESSONS.md` prior store.

See `references/propose_probe_compose.md` for contrastive composition rules.

## Requires

- Python 3.10+

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger do?

Optimizes failing agent prompts without overfitting via K=3 contrastive probes, a $0 Static Leak & Bloat Shield, holdout rollback gates, and a DO/AVOID Lesson Ledger.

### Which AI agents support Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger?

Connect your AI agent to Agensi through MCP, then ask it to use Contrastive Harness Optimizer — Propose-Probe-Compose & Lesson Ledger on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
