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.

Overview

Activation rules trigger suggestions when session patterns indicate a skill needs attention. They fire at most once per session to avoid noise.

Built-in rules

RuleConditionSuggestion
post-session-diagnosticMore than 2 unmatched queries in a sessionRun selftune last
grading-threshold-breachSession pass rate below 60% (threshold is a ratio 0.01.0)Run selftune evolve
stale-evolutionNo evolution in 7+ days with pending false negativesRun selftune evolve
regression-detectedPost-deploy monitoring detects regressionConsider rollback

Configuration

Override rules at ~/.selftune/activation-rules.json:
{
  "post-session-diagnostic": {
    "enabled": true,
    "threshold": 2
  },
  "grading-threshold-breach": {
    "enabled": true,
    "threshold": 0.6
  },
  "stale-evolution": {
    "enabled": true,
    "days": 7
  },
  "regression-detected": {
    "enabled": true
  }
}

How they work

The auto-activate hook runs on every UserPromptSubmit event. It evaluates all enabled rules against the current session state and surfaces suggestions to the agent when conditions are met.