Insights & Analysis
Use LLM-powered analysis to extract decisions, learnings, techniques, and patterns from your AI coding sessions. Supports OpenAI, Anthropic, Gemini, and Ollama.
What are Code Insights insights?
When you analyze a session, the CLI server sends the conversation to your configured LLM provider and extracts structured insights. These are stored in the local SQLite database and displayed in the dashboard.
The analysis uses a "senior staff engineer writing for a knowledge base" persona — each insight is written as if a future developer will read it 6 months from now with no context about the session.

What types of insights are extracted?
| Type | What it captures |
|---|---|
| Summary | Narrative of what was accomplished, outcome status (success/partial/abandoned/blocked), and key artifacts changed |
| Decision | A technical choice with full context: situation, reasoning, rejected alternatives, trade-offs, and conditions for revisiting |
| Learning | A technical discovery: observable symptom, root cause, transferable takeaway, and when it applies |
| Technique | A reusable approach or pattern demonstrated |
| Prompt Quality | Efficiency score, wasted turns, anti-patterns, and session behavioral traits |
Decision structure
Each decision insight includes:
- Situation — what problem or requirement led to the decision
- Choice — what was chosen and how it was implemented
- Reasoning — the key factors that tipped the decision
- Alternatives — rejected options with reasons why
- Trade-offs — what downsides were accepted
- Revisit when — conditions under which to reconsider
Learning structure
Each learning insight includes:
- Symptom — what went wrong or was confusing
- Root cause — the underlying technical reason
- Takeaway — the transferable lesson for similar situations
- Applies when — conditions under which this knowledge is relevant
How do I run analysis on a session?
- Open the dashboard:
code-insights dashboard - Navigate to Sessions
- Click into any session
- Click Analyze (requires LLM configured in Settings)
Analysis runs server-side via the Hono API. Progress is streamed back to the dashboard in real time via Server-Sent Events (SSE), so you can see each insight as it's extracted. Your API key stays on your machine and is never sent anywhere else.
During analysis, the LLM also classifies the session into one of 7 character types (deep_focus, bug_hunt, feature_build, etc.) and writes it back to the session record.
How do I analyze multiple sessions at once?
From the Dashboard page, click Analyze on the unanalyzed sessions card to run analysis across all pending sessions. You can also analyze individual sessions from the session detail page. Progress is shown in real time via SSE streaming.
How does prompt quality scoring work?
The prompt quality analysis evaluates your prompting efficiency on a 0-100 scale.
What it detects
- Wasted turns — messages that led to unnecessary clarifications or corrections, with the original message, what went wrong, and a suggested rewrite
- Anti-patterns — recurring bad habits (e.g., vague instructions, missing file paths) with specific fixes
- Session traits — higher-level behavioral patterns about how the session was structured:
| Trait | What it means |
|---|---|
context_drift | Session covers too many unrelated objectives, causing the AI to lose context |
objective_bloat | Too many different tasks crammed into one session |
late_context | Critical requirements provided late that should have been mentioned upfront |
no_planning | Jumped straight into implementation without discussing the approach |
good_structure | Well-structured session with clear objectives and logical flow |
Each trait includes a severity (high/medium/low), evidence from the conversation, and a suggestion for improvement.
Where are insights stored?
All insights are stored in the insights table in ~/.code-insights/data.db. You can export individual sessions as Markdown from the session detail panel, or use the Export page to generate AI-synthesized knowledge across sessions. See Analytics & Export for details.