/harbor:harbor-trace-distillationfrom harbor
Distills completed Harbor development traces into evidence-cited skill patches. Use when consolidating recurring failures, checking a copied candidate on known cases, and gating one frozen bundle on independent validation. Keeps raw evidence and private outcomes outside proposals.
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.
Use Harbor 0.18.0 as the execution and evidence surface. Keep discovery, candidate development, and holdout roles explicit, preserve raw Harbor artifacts, and change only the copied candidate bundle.
Runtime: use uv and Python 3.12 or newer. In commands, <skill-root> 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 starting distillation, freeze the discovery/development dataset used to
author and check the candidate and a separate optimizer-invisible validation
dataset. Plan the validation stage before evolution starts. In schema 2, the
configured holdout inputs normally serve as this bundle's independent
validation dataset; candidate development is a replay gate over evolution
cases and does not satisfy that independence. A study may reserve an additional
holdout after validation.
Freeze and digest-bind the materialized candidate before opening validation. Never use validation rewards, task identities, diagnostics, or trajectories as new proposal evidence in the same run. If validation rejects the candidate, preserve the result; another unbiased attempt requires a new study with fresh validation.
Separate an observed failure, its proposed cause, and the reusable instruction that could address it. Check successful traces and counterexamples before consolidating a lesson; a low reward alone cannot establish the cause. Group evidence by semantic family as well as trial and task checksum: the executable two-task minimum does not prove that two generated variants are independent.
Prefer the smallest coherent patch set whose evidence explains both the failure and why passing behavior should survive. Remove redundant or conflicting proposals rather than accumulating a rule per trace. Candidate development checks the frozen patch on known cases; it cannot establish generalization. If support is insufficient, preserve the unchanged candidate and report the missing evidence instead of manufacturing a lesson.
For an iterative campaign, maintain concise development pattern notes outside the candidate bundle. Cite exact native evidence and prior proposal diffs, retain successes, counterexamples, rejected edits, and unresolved causes, and consult that history before proposing the same intervention again. Reconsider a rejection only with new development evidence or a changed, explicit hypothesis. Keep the notes when a candidate is rejected; do not turn every observation into an executable rule. The CLI preserves proposal artifacts but does not automatically maintain or retrieve a wiki.
Give the task-executing agent only the declared task resources and frozen candidate. Keep evolution notes, raw traces, answer-bearing provenance, and previous sessions outside its mounts, prompt, tools, and retrieval indexes. Use a separate access-controlled workspace for proposal authoring. Any imported memory inherits its source datasets' exposure; sanitization alone does not make those families eligible for independent validation.
The runner applies its bundled authoring checks to the baseline and the complete candidate after accepted patches are applied. Fix structural errors before evaluation; task performance still requires the declared native Harbor gates.
uv run <skill-root>/scripts/distill_harbor_traces.py <config.yaml> --dry-run
uv run <skill-root>/scripts/distill_harbor_traces.py <config.yaml> --doctor
uv run <skill-root>/scripts/distill_harbor_traces.py <config.yaml> --analyze-only
Analyze-only never authors diagnoses or patch text. With an empty proposal
file, it deliberately produces an unchanged candidate.
7. Add agent-authored diagnoses and patch operations to the proposal JSON.
Every proposal must cite discovery evidence IDs and target only the skill
bundle. Reward or error state can identify a weak case, but does not alone
establish the cause or a safe edit. If bounded trajectory, output, log, or
verifier evidence does not support a diagnosis, keep the candidate
unchanged. Re-run analyze-only until the accepted set is coherent.
8. For a promotion-capable run, use config schemaVersion: 2. Declare native
candidate-development artifacts or JobConfigs over the same cases as
discovery and an explicit minimum pass rate. The runner freezes the
materialized candidate digest, validates the candidate with metric-only
evidence, and opens holdout only after that gate passes. Then run:
uv run <skill-root>/scripts/distill_harbor_traces.py <config.yaml>
Inspect trace-pool.json, proposal-state.json, consolidation.json, the
staged baseline/skills/<name>/ and candidate/skills/<name>/ bundles,
development-gate.json, holdout-gate.json, and report.md. Promote only
when candidate development passes, the holdout decision is promote, and
ordinary skill validation still passes. The script never overwrites the
source skill.
The three discovery/proposal artifacts are saved before candidate development or holdout can fail, preserving rejected edits as well as accepted ones. Their presence alone does not mean the run completed or passed a gate. Preserve failed run directories and consult only the development artifacts when compiling development lessons; gate outcomes remain outside that memory. If the materialized candidate has the baseline's exact digest, the live runner keeps the baseline without opening candidate-development or holdout inputs. An empty accepted set or a content-neutral edit is not an evolved improvement, regardless of a different proposal ID or a noisy reward.
not-evaluable.verifier/diagnostics.json files. Aggregate every
classified diagnostic for the trial. A diagnostic classified to the provider or
infrastructure domain makes that trial non-evaluable: preserve the verifier's
reported reward for audit, but expose the semantic reward as null. Do not
require diagnostics from verifiers that do not produce them, and keep Harbor
exceptions classified as errors. Classify these diagnostics before testing
primary-reward availability so a provider failure that emitted no reward is
not mislabeled as an evaluator failure.provider-context-limit or context_length_exceeded as actionable only
for an execution-efficiency/context-budget proposal. Require the ordinary
two-trial and two-task-checksum support before accepting that operational
patch. Context-budget evidence cannot support a semantic-improvement domain.
Quota, rate-limit, authentication, environment, and other external failures
remain ineligible patch evidence. A context-limit signal is actionable only
when every classified diagnostic for that trial is a provider context-budget
failure; any mixed external domain keeps the trial non-actionable.harbor.requiredRewards when verifier metrics are qualification
gates rather than compensating fitness terms. Every trial must report every
required metric at or above its finite threshold. Missing values remain null,
and missing or below-threshold values are reported with distinct reasons.development block. Config schema 2 requires candidate
development and fails closed before holdout. This version boundary prevents
an older runner from silently ignoring the new gate.max_retries: 0. Imported evidence must be a whole job artifact whose root
JobLock records every retry field, matches the JobConfig retry policy, and
reports zero actual retries. Paired phases require matching canonical retry
digest multisets. A lone trial artifact cannot prove this contract. Holdout
retry inputs remain unopened until candidate development passes.not-evaluable.A,A,B cannot pass
as equivalent to A,B,B.requireDiscoveryLocks: false keeps older unlocked evidence
inspectable in analyze-only mode; it does not make that evidence promotable.SKILL.md frontmatter name to be an exact portable lowercase
basename. Stage every live baseline and candidate job-config bundle at
<output>/<role>/skills/<name> so Harbor's physical basename matches its
logical name. Locked live artifacts must use that exact name as both lock
name and source basename. Analyze-only may import legacy discovery locks that
used a physical alias, but marks that evidence and its consolidation
non-promotable; live discovery and every holdout reject such aliases.requiredRewards mapping, no additional verifier metrics are
required.harbor.passThreshold, holdout minimumMeanGain,
primary rewards, and required-reward thresholds. Reject NaN and infinities
before scoring or serializing artifacts.not-evaluable rather than treating a missing primary
reward or provider/infrastructure failure as semantic reward zero. Keep
unaffected side means visible and report the affected mean and gain as null.After editing this bundle, run:
uv run <skill-root>/scripts/skill_authoring.py <skill-root> --require-directory-name
python -m py_compile <skill-root>/scripts/distill_harbor_traces.py
uv run <skill-root>/scripts/distill_harbor_traces.py --help
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
12 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.npx claudepluginhub gvillarroel/plugins --plugin harbor