Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.selftune.dev/llms.txt

Use this file to discover all available pages before exploring further.

Usage

selftune search-run --skill-path <path> [options]
selftune search-run runs a bounded package search against your local draft skill package. It generates routing/body variants, evaluates them through the shared package evaluator, compares them against the accepted frontier, and records the measured winner plus provenance.

Options

FlagDescription
--skill-path <path>Path to a skill directory or SKILL.md file
--skill <name>Override the inferred skill name for lineage/reporting
--surface routing|body|bothLimit the mutation surface; defaults to both
--max-candidates <n>Cap the minibatch size; defaults to 5
--agent <name>Runtime agent used for shared package evaluation
--eval-set <path>Override the eval set used during package evaluation
--apply-winnerPromote the winning candidate back into the draft package
--jsonEmit the full search result as JSON
--helpShow command help

How it works

  1. Generate reflective routing/body variants from measured replay, routing, and grading failures when an agent is available.
  2. Fill any remaining routing/body budget with eval-informed targeted variants, then deterministic fallback variants.
  3. Fingerprint each candidate and skip duplicates already represented in the package frontier.
  4. Evaluate the minibatch through the shared package evaluator.
  5. If routing and body both produce accepted improvements, evaluate a merged candidate that combines the complementary surfaces before final winner selection.
  6. Compare accepted candidates against the measured frontier parent.
  7. Persist the search run, winner, and provenance.
  8. Optionally apply the winner back into the draft package.
When --surface both is used, the routing/body budget is biased toward the weaker measured surface from the accepted frontier or canonical package evaluation instead of always splitting evenly.

Relationship to improve

selftune improve --scope package --skill-path ./my-skill
selftune improve --scope package is the lifecycle alias for this low-level package-search command. It delegates to search-run, and unless --dry-run is set it applies the winning candidate automatically. Plain selftune improve also auto-selects this path when the target skill already has package evidence or a draft package manifest. selftune run / selftune orchestrate can also select package search automatically for eligible skills when accepted-frontier or canonical package-evaluation evidence exists.

Example

selftune search-run --skill-path ./my-skill --surface both --max-candidates 6 --apply-winner