/harbor:harbor-population-searchfrom harbor
Evaluates and ranks candidate skill bundles with native Harbor jobs. Use when running scalar-reward population generations or analyzing completed development artifacts, preserving a baseline, and checking one frozen winner on an independent dataset.
Ships in harbor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Run one evidence-complete generation at a time. Let Harbor execute tasks and write native job directories; let the bundled script validate, summarize, and rank those artifacts. Semantic mutation remains agent work so every child has an explicit hypothesis.
Runtime: Python 3.12+ through uv. The script pins harbor==0.18.0. In commands, means this installed skill directory.
This is an atomic bundle. Copy the entire directory, not only SKILL.md.
Its executable and reference are included here, dependencies are declared in
the executable's PEP 723 metadata, and no Skill Arena repository module is
required.
Before any live development generation, freeze two disjoint study inputs: the
development dataset used for mutation and ranking, and an independent
validation dataset that is unavailable to those activities. Plan the
validation stage before starting evolution and record the selected candidate
bundle by digest before opening it. In this bundle, --holdout-template
normally supplies that first optimizer-invisible validation dataset; a study
may reserve an additional holdout after it.
Never turn validation rewards, task identities, diagnostics, or trajectories into another mutation or ranking pass in the same study. A failed gate consumes that validation cohort. Preserve the result and use a fresh validation dataset in a new study for another unbiased claim. A development-only invocation is an intermediate receipt, not a completed evolution methodology.
Use this method when one predeclared scalar reward orders otherwise qualified candidates meaningfully. Put non-compensating requirements in required-reward gates; use Pareto search when important case strengths conflict. Give each content-changing child a mechanism, supporting development evidence, expected effect, and preservation check for passing cases. An unsupported mechanism is a reason to retain the baseline.
Freeze the generation/call budget and plateau rule in the study protocol before inspecting scores; this CLI does not enforce a campaign-wide budget. Continue development only while validation is unopened. Freeze one qualified finalist before releasing it. A deterministic ranking is reproducible selection, not a confidence estimate or proof that small score differences generalize.
Keep persistent development knowledge outside every evaluated candidate bundle and the execution agent's accessible context. Link reusable failure and success patterns to native development evidence, parent/child digests, the exact change, and its accepted, rejected, or unavailable outcome. Retain rejected interventions when a candidate is discarded. Before proposing the same mechanism again, consult its prior evidence and diff and identify what new development evidence justifies another attempt. Never import independent-validation outcomes into this knowledge; the runner's generation history is not a WikiSkill implementation.
The runner applies its bundled authoring checks to source and staged candidate bundles before evaluation. Fix structural errors before spending calls; task performance still requires the declared native Harbor gates.
Require:
Every candidate is a version of the same logical skill, so each SKILL.md must
preserve the same frontmatter name. The baseline is the frozen incoming
version of that skill, not a no-skill control or a placeholder bundle.
The name must be an exact portable skill basename: 1-64 lowercase letters,
digits, or interior hyphens, excluding reserved device names. The script fails
closed instead of inventing a sanitized fallback, because Harbor installation
identity must remain equal to the declared logical name.
Candidate bundles must also be self-contained. An in-bundle file symlink is
dereferenced while staging; a broken or escaping symlink and every directory
symlink or Windows junction/reparse directory fails closed before Harbor runs.
Use a separate native Harbor template for holdout tasks. Never include holdout trials in development ranking. Read references/harbor-artifacts.md when reviewing raw artifacts, diagnosing validation failures, or defining a holdout.
Run the dependency and input check without writing output:
uv run <skill-root>/scripts/search_harbor_population.py \
--job-template harbor-development.yaml \
--candidate baseline=/path/to/baseline-skill \
--candidate candidate-01=/path/to/candidate-skill \
--baseline baseline \
--holdout-template harbor-validation.yaml \
--output /path/to/search-run \
--doctor
Replace --doctor with --dry-run to print the exact candidate job plan. Both modes validate the native JobConfig and candidate bundles without creating a Harbor Job.
Run live evaluation by omitting the mode flag:
uv run <skill-root>/scripts/search_harbor_population.py \
--job-template harbor-development.yaml \
--candidate baseline=/path/to/baseline-skill \
--candidate candidate-01=/path/to/candidate-skill \
--baseline baseline \
--generation 0 \
--reward-key reward \
--pass-threshold 1 \
--minimum-development-pass-rate 1 \
--required-reward mechanical_qualification_gate=1 \
--holdout-template harbor-validation.yaml \
--output /path/to/search-run
The script freezes every candidate under an isolated
candidates/<id>/skills/<frontmatter-name>/ path, injects that exact path into
one native JobConfig per candidate, and executes each through Harbor
Job.create() and Job.run(). Consequently the basename Harbor installs is the
logical skill name, never a generic skill alias or the population candidate
id. The staging copy contains regular local files rather than dependencies on
the source tree. It then parses the native config.json, optional lock.json, root result.json,
trial result.json, rewards, execution errors, trajectories, verifier files,
agent outputs, and artifact manifests.
Every native JobConfig skill source is reconciled with every available trial and job lock. A verified job must lock exactly one skill with the candidate bundle digest and logical name; a digest mismatch or JobConfig/lock source disagreement fails closed. This binding applies to development and holdout.
When a verifier emits verifier/diagnostics.json, the analyzer preserves and
normalizes its status, failure domain, terminal outcome, and error code.
Provider, authentication, environment, evaluator, and infrastructure aliases
are classified across all four fields, including signals such as verifier
errors, invalid credentials, Docker failures, platform failures, quotas, and
context limits. They are not semantic zeros. Their raw verifier reward remains
visible for forensics, but fitness and evaluable mean are null and the
candidate cannot survive or promote.
External diagnostics take precedence over reward availability: a provider
failure that emitted no reward remains a provider failure and is not relabeled
as a missing-primary evaluator failure. Only a non-errored trial without an
external failure is marked missingPrimaryReward. Both categories are
unavailable rather than invented zero. Every primary and required reward must
also be finite; NaN and infinity fail closed before ranking.
Ranking is deterministic: highest fitness first, then candidate id. Repeat
--required-reward KEY=MIN for verifier metrics that every trial must report
and meet. A missing required metric remains explicitly missing, and any
required-metric failure or execution exception makes the candidate unqualified
with fitness zero; an infrastructure failure makes fitness unavailable instead.
The raw mean reward remains visible. The top two evaluable candidates become
survivors; an unavailable result sorts below numeric fitness.
Only an evaluable candidate that passes every configured qualification gate is
a development winner or holdout input. Additionally,
--minimum-development-pass-rate requires its primary selected-reward pass
rate to meet the configured 0..1 threshold; the default 0 preserves prior
behavior. A candidate below that threshold can still survive as a mutation or
repair parent, but it is not called a winner and cannot open holdout. When no
candidate is eligible, the run records per-candidate reasons, selects no winner,
and keeps evaluable survivors (or the baseline fallback) available for repair.
Repair-parent selection then greedily preserves complementary required-reward
gates that candidates met across every trial, followed by pass rate, observed
mean reward, and candidate id as deterministic tie-breakers. This never relaxes
promotion; it only retains distinct repair signals for the next generation.
When a qualified winner would otherwise fall outside the top-two survivor set
on a deterministic zero-fitness tie, the winner replaces the lower survivor so
the next generation never loses its selected parent.
Use completed native Harbor job directories without launching agents:
uv run <skill-root>/scripts/search_harbor_population.py \
--job-template harbor-development.yaml \
--candidate baseline=/path/to/baseline-skill \
--candidate candidate-01=/path/to/candidate-skill \
--job baseline=/path/to/baseline-job \
--job candidate-01=/path/to/candidate-job \
--baseline baseline \
--output /path/to/search-run \
--analyze-only
Provide exactly one --job mapping per candidate. Analysis fails closed on incomplete jobs, invalid locks, non-finite rewards, candidate digest mismatch, JobConfig/lock source disagreement, config drift, or task/agent drift. The template must describe the same benchmark as the completed jobs; reusing one completed job's config.json is appropriate after confirming that only job identity, output directory, and candidate skill paths vary.
Map each job only to the exact skill version it evaluated. Analyze-only accepts
a digest-matching legacy installed alias or a lock without complete skill
records only as exploratory; such evidence can support diagnostic ranking but
is always non-promotable. A digest mismatch is never a legacy exception.
Prefer jobs created by this script, which freeze and inject each candidate
before Harbor execution.
Declare and digest-bind the independent validation template in the study
protocol before development starts. For a multi-generation search, omit
--holdout-template from intermediate invocations and keep their results
explicitly staged. Supply it only for the final generation or frozen offline
completion: this flag releases the gate within that invocation once a changed,
qualified winner exists. The runner freezes its holdout contract when the flag
is first supplied; the organizer owns the earlier study-level commitment.
Harbor evaluates only the preserved
baseline and the development winner after selection. Each role is copied to
holdout/generation-NNN/attempt-NNN/<role>/skills/<frontmatter-name>/ before
its native JobConfig is written, preserving the same installed identity and
isolating holdout inputs. Every invocation gets a new attempt directory. Its
immutable attempt.json seals the generation, selected winner id and content
digest, baseline digest, evaluation fingerprints, and promotion policy before
Harbor runs; its result.json is created once after analysis. A failed or
non-evaluable attempt remains inspectable and is terminal for this search.
Once a live or imported holdout attempt exists, the runner rejects subsequent
search, ranking, or holdout invocations before writing output. An unfinished
attempt also fails closed. An artifact-only staged attempt may be completed
with --analyze-only for the same generation, candidate digests, development
jobs, and unchanged development evidence; it cannot select a new population.
For offline analysis, also provide:
--holdout-template harbor-holdout.yaml
--holdout-job baseline=/path/to/holdout-baseline-job
--holdout-job winner=/path/to/holdout-winner-job
The gate rejects development/holdout task overlap, job drift, errors, missing
required rewards, unverified provenance, an unqualified winner, development
pass rate below the configured minimum, reward gain below
--minimum-holdout-gain, or any matched task-signature reward regression.
--allow-task-regressions is an explicit opt-in that relaxes only the final
condition; the default is no regressions. run.json and report.md enumerate
every task comparison, regressed task, and promotion blocker. Without holdout
evidence, the result is explicitly staged and is not marked promoted.
A selected winner whose content digest equals the preserved baseline is a
no-op even when it has a different candidate id. Record baseline-retained
with blocker no-skill-change, do not spend holdout calls, and continue with a
content-changing repair generation. It can never be marked promoted merely
because the configured minimum gain is zero.
Read generation-NNN/ranking.json and candidate-result.json files. Give each new child one focused hypothesis, keep the original baseline as an unchanged control candidate, create mutation or crossover directories from the two survivors, then rerun with the next --generation value. Do not change the Harbor template, reward rule, task set, agent, or model mid-search.
Stop after a validated success or a declared plateau. Never overwrite the incoming baseline; baseline-skill is immutable across generations.
The first executed generation writes an immutable search-contract.json that
binds the baseline digest, logical skill, normalized development JobConfig,
reward key, thresholds, qualification gates, and promotion policy. Every later
generation in the same output directory must match it exactly.
development-signatures.json additionally binds the observed task checksum,
agent, model, and attempt multiset so mutable local task paths cannot drift
behind an unchanged JobConfig. The first provided holdout template similarly
writes holdout-contract.json, and the first completed release writes
holdout-signatures.json; use a new output directory to change any contract.
Holdout attempts remain append-only beneath their generation. Use the recovery
skill only for independently proven external failures of the frozen pair;
this runner does not reopen a consumed gate or finalize recovery by reranking.
Inspect existing receipts directly or with the native reporter. A new output
path alone does not make a consumed dataset fresh.
The output directory contains:
Do not invoke another benchmark CLI, consume a foreign report schema, or import scripts from sibling skills.
These checks use only the copied bundle and its declared runtime dependencies:
uv run <skill-root>/scripts/skill_authoring.py <skill-root> --require-directory-name
python -m py_compile <skill-root>/scripts/search_harbor_population.py
uv run <skill-root>/scripts/search_harbor_population.py --help
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gvillarroel/plugins --plugin harbor12 skills in this plugin
/harbor-author-evaluation-datasetsAuthors and audits leakage-resistant native Harbor task datasets before study registration, or consolidates finalized schema-v1 native Harbor reports into privacy-safe aggregate comparisons. Use when Codex needs to define semantic task families, partition discovery, development, sealed validation, and holdout cohorts, generate deterministic seeded response-surface variants, diversify artifact contracts, test adapters and verifiers against shortcuts, compare completed report artifacts without exposing task-level details, or hand completed dataset roots to harbor-organize-evaluations. Do not use to run or score Harbor jobs or to manage study releases./harbor-evolve-skillEvolves SKILL.md with Harbor trials and GEPA reflective Pareto search. Use when improving instructions from development evidence, freezing one candidate, and checking it on independent validation and holdout datasets. Preserves the source bundle and sealed evaluation boundaries./harbor-maximize-knowledge-expertisePlans knowledge and expert skill mutations from digest-bound, sanitized development evidence. Use when preparing complementary expertise operators and exact mutation handoffs. Leaves candidate creation, scoring, selection, and promotion to their owning skills./harbor-metaskill-evolutionReplays and audits development ledgers and typed meta-policy snapshots bound to Harbor evidence. Use when checking lineage, utility, budgets, frozen-meta parity, or identity-specific frontiers. Performs analysis without Harbor or model calls, candidate generation, or selection./harbor-operator-coevolutionCoevolves skill candidates and mutation operators using native Harbor jobs. Use when repeated development generations need parent-to-child operator credit, evidence-bound breeding, and an independent gate for a frozen winner. Keeps private gate outcomes outside development./harbor-organize-evaluationsOrganizes Harbor studies, frozen protocols, dataset locks, split access, and ordered validation gates. Use when preparing or auditing an evaluation lifecycle, reviewing leakage, or cataloging published skill metrics. Leaves scoring and evolution to their owning skills.