Observer

A 12-module analytics engine for AI-assisted development sessions. Tracks tokens, costs, tool calls, timing, and patterns -- then runs intelligence analysis to surface actionable insights.

What the Observer Does

The observer collects metrics during every AI assistant session and runs them through 12 intelligence modules. It answers questions like:

  • How efficiently am I using the AI assistant?
  • Am I exhibiting anti-patterns (retry storms, context bloat, edit churn)?
  • What is my projected session cost?
  • Is the context window filling up? When will compaction be needed?

All analysis is local. No data leaves your machine.

Core Tracking

Every session automatically tracks:

  • Tokens -- Input, output, and total token consumption per turn
  • Costs -- Estimated spend based on the model in use (Opus, Sonnet, Haiku)
  • Tool calls -- Count, types, success/failure ratio, duration
  • Timing -- Session duration, time per turn, idle gaps
  • Patterns -- Repeated file edits, search patterns, tool sequences

Intelligence Modules

The bootspring observe intelligence command runs all 12 modules:

Efficiency Scorer

6-dimension weighted geometric mean producing a 0-100 composite score with a letter grade (A-F). Dimensions: task completion rate, tool accuracy, context utilization, cost efficiency, time management, code quality.

Session Fingerprint

Maps sessions to a 16-dimensional feature vector and classifies them into 8 types (exploration, implementation, debugging, refactoring, testing, review, planning, mixed) using nearest-centroid classification.

Context Pressure

Tracks context window fill rate over time. Uses EWMA (exponentially weighted moving average) to predict when compaction will be needed. Four pressure levels: low, moderate, high, critical.

Pattern Detector

Detects 8 anti-patterns:

  • Thrashing -- Repeatedly switching between unrelated tasks
  • Blind search -- Searching without narrowing scope
  • Retry storm -- Repeating the same failing operation
  • Context bloat -- Loading unnecessary files into context
  • Tool misuse -- Using the wrong tool for a task
  • Prompt starvation -- Not providing enough context in prompts
  • Subagent sprawl -- Spawning too many parallel agents
  • Edit churn -- Editing the same file many times without converging

Drift Detector

Uses binary segmentation to find change points in session behavior. Calculates Jensen-Shannon divergence between phases. Produces phase summaries showing how the session evolved.

Predictive Cost

EWMA burn rate estimation with linear regression extrapolation. Runs Monte Carlo simulation to produce a 95% confidence interval for total session cost. Predicts budget exhaustion time.

Anomaly Detector

Combines four statistical methods to flag unusual events: modified Z-score with MAD, CUSUM (cumulative sum), IQR fencing, and Grubbs' test. Detects 6 anomaly types.

Time Series

Simple moving average, trend detection, change point identification, and learning curve fitting across 7 metrics. Shows whether performance is improving, stable, or declining.

Session Comparator

Compares two sessions metric-by-metric with significance testing. Produces a weighted Jaccard similarity score. Useful for A/B testing different approaches.

Cost Optimizer

Analyzes token waste, compares costs across models (Opus vs Sonnet vs Haiku), and projects monthly spend. Recommends model switches for exploratory vs focused work.

Smart Alerts

Dynamic threshold alerting with suppression, escalation, and rate limiting. Prevents alert fatigue while ensuring critical issues surface.

Intelligence Hub

Orchestrates all modules, isolates errors, synthesizes cross-module insights, and produces a composite health score.

Three Modes

ModeCommandDescription
Fullbootspring observe onTracking + context injection into assistant prompts
Quietbootspring observe quietTracking only, no injection
Offbootspring observe offDisabled

CLI Commands

Loading code block...

Further Reading