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 run [options]
selftune orchestrate [options]
Runs the full improvement loop: sync → grade → evolve → package-search → watch. Prefer selftune run in normal product guidance; selftune orchestrate remains the backing runtime and advanced alias for the same operation.

Options

FlagDescription
--dry-runShow what would happen without executing
--review-requiredRequire human review before deploying evolutions
--auto-approveDeprecated alias. Autonomous deploy is already the default behavior.
--skill NAMEOnly process a specific skill
--max-skills NMaximum number of skills to process per run
--recent-window HOURSOnly consider sessions from the last N hours
--sync-forceForce re-sync of already processed sessions
--max-auto-grade NMaximum auto-grade operations per run
--loopRun continuously
--loop-interval SECSSeconds between loop iterations (default: 3600)
--helpShow command help

Candidate actions

Each skill is assigned one of four actions during a run:
ActionMeaning
evolveFull evolution via replay and LLM rewrite
package-searchBounded mutation search across pre-generated variants (see below)
watchRe-evaluate recently deployed skills with no new evolution
skipExcluded — hit the --max-skills cap or missing required state
When a skill has sufficient package-level evidence — specifically, an accepted frontier candidate from a prior search run — orchestrate routes it through package search instead of full evolution. Package search generates a bounded set of routing and body mutations for the skill, evaluates each variant, and applies the best-performing one. It is faster and more targeted than full evolution because it only explores changes within the skill’s existing structure. Run output includes two counters for this phase:
  • package_searched — number of skills that entered the package search phase
  • package_improved — number of skills where a winning variant was found and applied
In --dry-run mode, package search is skipped and both counters report 0.

Continuous mode

selftune run is the lifecycle-first entrypoint for this runtime. Use selftune orchestrate when you need the legacy command name explicitly or are following low-level automation references. Use --review-required when you want a stricter one-off run, or --dry-run to preview the plan without mutating skill files. For fully autonomous operation:
selftune run --loop --loop-interval 3600
selftune orchestrate --loop --loop-interval 3600
Or set up OS-level scheduling:
selftune cron setup

Concurrency

Orchestrate uses a lock file (~/.claude/.orchestrate.lock) to prevent concurrent runs. The lock is considered stale after 30 minutes.
Override the lock path with the SELFTUNE_ORCHESTRATE_LOCK_PATH environment variable for non-Claude environments. See environment variables.

Workflow skill proposals

After evolution and watch, orchestrate discovers multi-skill workflow patterns from telemetry and proposes new skills to formalize them. Proposals appear in the output as “Phase 6: Workflow Skill Proposals” and are persisted alongside the source skill. In --dry-run mode, proposals are discovered but not written to disk.

Priority system

Skills are processed in priority order:
  • Skills with improvement signals get +150 priority boost (capped at +450)
  • Skills with lower pass rates get higher priority
  • Skills that haven’t been evolved recently get a small boost