Expand description
lobe explain — AI-driven analysis of a captured session.
Reads a CaptureSessionExport JSON file, preprocesses it into a compact summary,
and calls the Anthropic Messages API with a USE-method prompt. Returns the
rendered markdown report as a String.
Key setup: reads ANTHROPIC_API_KEY from the process environment. If unset,
explain_session returns a TloxError::MissingApiKey error which the CLI
layer converts to a friendly onboarding message.
Structs§
- Errors
Block - Explain
Options - Explain
Result - Phase
Medians - Route
Aggregate - Sample
Request - Session
Meta - Session
Summary - Status
Code Count
Enums§
- Explain
Model - Which Claude model powers the analysis. Haiku is the default because the task is structured USE-method application over a preprocessed payload, not open-ended reasoning — Haiku handles it well at a fraction of the cost.
Functions§
- estimate_
input_ tokens - Estimate input tokens for cost warning. Very rough — 4 chars per token.
- explain_
session - Top-level entry point. Reads env, loads session, builds prompt, calls Anthropic, returns the markdown report.
- load_
session - Load a session export from disk. Errors carry the underlying I/O or parse failure so the CLI can print an actionable message.
- read_
api_ key - Read the API key from environment. Empty string counts as missing.
- summarize_
session