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.
The feedback loop
selftune operates as a continuous improvement cycle:selftune run
handle the full loop.
Four layers
selftune is organized into four architectural layers:1. Capture
Hooks and ingestors produce raw evidence from real agent sessions.- Claude Code has the deepest hook coverage, including prompt logging, guardrails, trigger tracking, and session telemetry
- Codex, OpenCode, Pi, and Cline have narrower platform adapters with varying hook coverage
- Platform ingestors replay native session formats (Claude Code, Codex, OpenCode, OpenClaw, Pi) into a normalized format
- All data stays local in
~/.selftune/selftune.db(SQLite)
2. Normalize
selftune sync replays raw sources into a trustworthy SQLite database with repaired overlays.
- Deduplicates sessions across multiple ingest runs
- Repairs skill usage attribution when hooks missed events
- Produces a consistent timeline of queries, triggers, and outcomes
3. Decide and Act
The analysis and evolution layer uses normalized evidence to improve skills.| Component | What it does |
|---|---|
| Grading | 3-tier evaluation: trigger accuracy, process correctness, output quality |
| Evolution | Proposes improved skill descriptions, validates against eval sets, deploys or rejects |
| Run | Autonomous sync → grade → evolve → watch loop |
| Watch | Post-deploy regression detection with auto-rollback |
4. Surface
Status, dashboard, and reports explain what the system knows and what it did.selftune status— one-line health summaryselftune last— quick insight from the most recent sessionselftune dashboard— full local SPA with charts and timeline
Invocation taxonomy
selftune classifies every user query into one of four types:| Type | Example | Description |
|---|---|---|
| Explicit | ”use the pptx skill” | User names the skill directly |
| Implicit | ”make me a slide deck” | User describes the task without naming the skill |
| Contextual | ”I need slides for the Q3 board meeting” | Task is buried in domain context |
| Negative | ”what format should I use for a presentation?” | Should NOT trigger the skill |
How does signal-reactive improvement work?
selftune detects user corrections in real-time and feeds them back into the evolution pipeline:- The prompt-log hook detects correction patterns like “why didn’t you use X?” via regex
- selftune logs an improvement signal linked to the mentioned skill
- The session-stop hook spawns a focused background run
- Skills with signals get priority boosts (+150, capped at +450) and bypass evidence gates
Data architecture
- SQLite (
~/.selftune/selftune.db) is the sole write target for all local data - Hooks write directly via optimized direct-write paths
- No external services required for local operation
- Optional cloud sync via
selftune alpha uploadfor team dashboards
Explore core concepts
Deep dive into skills, grading, evolution, and evals.