a2ui
Make a reply easier to read and act on with rich blocks inside ordinary Markdown — a choice the user picks from, a form that…
Improve an Agent State through versioned scores and score-linked Traces from a frozen Benchmark.
Claude Code
$ npx -y skills add Prism-Shadow/penguin-harness --skill agent-optimization --agent claude-code
Codex
$ npx skills add Prism-Shadow/penguin-harness --skill agent-optimization -a codex -y
Cursor
$ npx skills add Prism-Shadow/penguin-harness --skill agent-optimization -a cursor -y
Gemini CLI
$ npx skills add Prism-Shadow/penguin-harness --skill agent-optimization -a gemini-cli -y
GitHub Copilot
$ npx skills add Prism-Shadow/penguin-harness --skill agent-optimization -a github-copilot -y
OpenCode
$ npx skills add Prism-Shadow/penguin-harness --skill agent-optimization -a opencode -y
Windsurf
$ npx skills add Prism-Shadow/penguin-harness --skill agent-optimization -a windsurf -y
name: agent-optimization description: Improve an Agent State through versioned scores and score-linked Traces from a frozen Benchmark. version: 2026.11.05.1
Improve one Test Agent through an evidence → hypothesis → Candidate → evaluation → accept or rollback loop. Use public Statements, scores, and Test Traces as black-box feedback. Delegate every evaluation to an `agent-evaluation` subagent; never run or score the Test Agent directly.
If the request does not identify the Test Agent, frozen Benchmark, desired target score, positive Run count, and round limit, ask for the missing inputs. When they are already supplied, proceed without asking the user to restate them.
Require an explicit Test Agent, a frozen Benchmark with a complete valid Formal Baseline, a desired target score, a positive `runs` value, and a positive round limit. The Benchmark's `benchmark_config.toml` must say `status = "published"`; a `draft` Benchmark is still being built and is not frozen, and a `failed` one never finished calibrating, so stop and explain in either case. `runs` is the number of Runs per Case for every Candidate in this optimization Session. Freeze it for the Session; do not infer it from `benchmark_config.toml` or the Formal Baseline. Read the evaluation `(provider, model_id, thinking_level)` from the complete Evaluation that matches the current Agent State; do not require the user to repeat it. When the request names `provider` and `model_id`, that pair is the model under test: use the complete Evaluation of the current Agent State recorded on that pair, and when there is none, stop and say a Formal Baseline on that model is needed. The model this Session runs on is not the model under test. An Evaluation without any part of this runtime is incomplete and cannot be used as a Reference. The top-level Session must provide `run_subagent`, and the current Agent must have the `agent-evaluation` Skill. If a prerequisite is missing, stop and explain what is needed. Do not create the missing Agent, Benchmark, or Baseline, and do not evaluate the Test Agent directly.
A **Reference** is the Agent State currently kept as best, together with its complete Evaluation on the frozen Benchmark.
Each round starts from the Reference and tests a bounded, general **Candidate**. Evaluate every Candidate on the frozen Case set with the requested `runs` count and the Reference evaluation runtime. The initial Formal Baseline has one Run per Case; do not rerun or backfill it to the requested count. Compare each Candidate's stored top-level average directly with the current Reference score even when their Run counts differ. Accept the Candidate only when the change is admissible, its Evaluation is complete and valid, and its top-level `score` is strictly higher than the Reference Evaluation's `score`. An accepted Candidate and its Evaluation become the next Reference; otherwise restore the previous Reference. Stop early when the Reference reaches the desired target; otherwise run no more than the requested number of complete valid Candidate rounds.
Resolve paths from the Environment's App Data Dir without recursively discovering the Project:
PROJECT_DIR = <app_data_dir> PROJECT_ID = <basename_of_project_dir> PENGUIN_HOME = <parent_of_project_dir> TARGET = <app_data_dir>/agents/<test_agent_id> STATE = <target>/agent_state TRACES = <target>/traces BENCHMARK = <app_data_dir>/benchmarks/<benchmark_id> SCOREBOARD = <benchmark>/scoreboard.yaml SNAPSHOTS = <target>/snapshots
The Benchmark is Project-level rather than owned by the Test Agent: it sits beside `agents/` and may evaluate several Agents. `test_agent_id` names the one this Session optimizes, and every Evaluation records it. Use only the Evaluations whose `agent_id` is that Agent as a Reference or for diagnosis.
Inspect only the requested Test Agent and Benchmark: the Agent State, public Statements, Scoreboard, and score-linked Test Traces or artifacts from the Baseline and this optimization, including rejected Candidates.
Do not inspect Rubrics, Gold answers, private scoring conditions, Evaluator State, Workspace, or Trace, other Agents, or Project secrets. If private evaluation information enters the Optimizer context, restore the active Candidate and stop as contaminated.
A Benchmark whose Cases are run through Harbor (their statements say so; the built-in PenguinHarness Benchmarks) is used like any published one. A Run's Session id `harbor:<trial>` names a trial directory under `<benchmark>/.jobs/<job>/`, whose `agent/penguin/traces/` holds the Test Traces; the trial's `verifier/` output and the tasks' `tests/` and `solution/` folders are private scoring material. Before the first Candidate evaluation, perform the shared setup in `agent-evaluation`'s `reference/harbor.md` §A once, and run every Candidate's cells as its *Running the cells* says.
Modify only the Test Agent State and the versioned snapshot required to protect it. Do not change the frozen Benchmark, Test Traces, or Project configuration. The only Benchmark write is appending a complete accepted Candidate Evaluation to `scoreboard.yaml`.
For each round:
1. **Establish the Reference.** Confirm that its complete Evaluation covers the frozen Case set, uses the frozen evaluation runtime, and matches the current Agent State version. Do not require its Run count to equal the requested Candidate `runs` count. 2. **Diagnose capability gaps.** Compare each Case's `runs[].score` on the fixed `0..100` scale; use the Evaluation's top-level average `score` only for whole-version comparison. Use public Statements, score-linked Test Traces, and prior accepted or rejected attempts to identify observable behaviors that general Agent State changes could improve. Use repeated Runs to distinguish stable behavior from variation. 3. **State a falsifiable hypothesis.** Choose the related g
Make a reply easier to read and act on with rich blocks inside ordinary Markdown — a choice the user picks from, a form that…
Run ACE (Agentic Context Engineering, Zhang et al. 2025) on an agent the sequential offline way - a Reflector reads each training…
Run a PenguinHarness organization as its CEO — turn the mission into a ticket tree, hire HR and finance first, partition the…
The protocol every employee of a PenguinHarness organization follows — read the handbook first, act on [org_trigger] work runs,…
Run finance for a PenguinHarness organization — set and adjust monthly budgets along the reporting line, audit spend daily with…
Run HR for a PenguinHarness organization — guarantee every employee has an enabled calendar event, hire and offboard employees…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.