@code-insights/cli 3.3.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +11 -7
  3. package/dashboard-dist/assets/{index-cAfuFBOl.js → index-BRUFVAPq.js} +148 -138
  4. package/dashboard-dist/assets/index-CYJdtaMC.css +1 -0
  5. package/dashboard-dist/favicon.svg +17 -3
  6. package/dashboard-dist/index.html +2 -2
  7. package/dist/commands/dashboard.d.ts.map +1 -1
  8. package/dist/commands/dashboard.js +9 -1
  9. package/dist/commands/dashboard.js.map +1 -1
  10. package/dist/commands/init.d.ts.map +1 -1
  11. package/dist/commands/init.js +4 -1
  12. package/dist/commands/init.js.map +1 -1
  13. package/dist/commands/install-hook.d.ts.map +1 -1
  14. package/dist/commands/install-hook.js +48 -40
  15. package/dist/commands/install-hook.js.map +1 -1
  16. package/dist/commands/reset.d.ts.map +1 -1
  17. package/dist/commands/reset.js +4 -1
  18. package/dist/commands/reset.js.map +1 -1
  19. package/dist/commands/status.d.ts.map +1 -1
  20. package/dist/commands/status.js +66 -58
  21. package/dist/commands/status.js.map +1 -1
  22. package/dist/commands/sync.d.ts.map +1 -1
  23. package/dist/commands/sync.js +5 -1
  24. package/dist/commands/sync.js.map +1 -1
  25. package/dist/types.d.ts +27 -3
  26. package/dist/types.d.ts.map +1 -1
  27. package/dist/utils/banner.d.ts +6 -0
  28. package/dist/utils/banner.d.ts.map +1 -0
  29. package/dist/utils/banner.js +30 -0
  30. package/dist/utils/banner.js.map +1 -0
  31. package/dist/utils/telemetry.d.ts +16 -0
  32. package/dist/utils/telemetry.d.ts.map +1 -1
  33. package/dist/utils/telemetry.js +76 -0
  34. package/dist/utils/telemetry.js.map +1 -1
  35. package/dist/utils/welcome.d.ts.map +1 -1
  36. package/dist/utils/welcome.js +2 -3
  37. package/dist/utils/welcome.js.map +1 -1
  38. package/package.json +1 -1
  39. package/server-dist/llm/analysis.d.ts +5 -1
  40. package/server-dist/llm/analysis.d.ts.map +1 -1
  41. package/server-dist/llm/analysis.js +58 -17
  42. package/server-dist/llm/analysis.js.map +1 -1
  43. package/server-dist/llm/prompts.d.ts +45 -9
  44. package/server-dist/llm/prompts.d.ts.map +1 -1
  45. package/server-dist/llm/prompts.js +199 -60
  46. package/server-dist/llm/prompts.js.map +1 -1
  47. package/server-dist/llm/providers/anthropic.js +1 -1
  48. package/server-dist/llm/providers/gemini.js +1 -1
  49. package/server-dist/llm/providers/openai.d.ts.map +1 -1
  50. package/server-dist/llm/providers/openai.js +1 -0
  51. package/server-dist/llm/providers/openai.js.map +1 -1
  52. package/server-dist/routes/analysis.d.ts.map +1 -1
  53. package/server-dist/routes/analysis.js +80 -28
  54. package/server-dist/routes/analysis.js.map +1 -1
  55. package/server-dist/routes/analytics.d.ts.map +1 -1
  56. package/server-dist/routes/analytics.js +10 -0
  57. package/server-dist/routes/analytics.js.map +1 -1
  58. package/dashboard-dist/assets/index-BMhL7wL8.css +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  All notable changes to `@code-insights/cli` will be documented in this file.
4
4
 
5
+ ## [3.3.2] - 2026-03-02
6
+
7
+ ### Added
8
+
9
+ - **Richer analysis prompts (v3.0.0)** — Decomposed insight schemas: decisions now include situation, choice, reasoning, alternatives (with rejection reason), trade-offs, and revisit conditions. Learnings include symptom, root cause, transferable takeaway, and applicability. Summaries include outcome status.
10
+ - **Session traits in prompt quality** — Detects higher-level behavioral patterns: context drift, objective bloat, late context, no planning, and good structure. Each trait includes severity, evidence, and suggestions.
11
+ - **LLM-based session character classification** — Sessions are classified into one of 7 types (deep_focus, bug_hunt, feature_build, exploration, refactor, learning, quick_task) by the LLM during analysis, replacing the heuristic-only approach.
12
+ - **PR link extraction** — GitHub PR links referenced in session messages are automatically detected and displayed as clickable badges on the session detail page.
13
+ - **Few-shot examples in analysis prompt** — Two curated examples (a decision and a learning) set the quality bar for LLM output.
14
+ - **Chain-of-thought pre-analysis** — Prompt quality analysis now uses a 6-step mental walkthrough before scoring.
15
+
16
+ ### Changed
17
+
18
+ - **Analysis version bumped to 3.0.0** — New decomposed schemas are not backward-compatible with v2 insight format. Re-analyze sessions to generate v3 insights.
19
+ - **Tool result cap raised from 200 to 500 chars** — Better context for error messages in analysis input.
20
+ - **Source tool badge shown for all sessions** — Previously hidden for claude-code sessions.
21
+
22
+ ### Fixed
23
+
24
+ - **Dashboard compact layout** — Higher information density across dashboard pages.
25
+ - **7-day range filter** — Default range filter applied to dashboard and analytics.
26
+ - **LLM JSON truncation** — 3-layer fix: max_tokens 8192, jsonrepair fallback, conciseness constraints.
27
+ - **PostHog exception tracking** — Stack trace frames included in error reports.
28
+
29
+ ## [3.3.1] - 2026-03-02
30
+
31
+ ### Added
32
+
33
+ - **Error telemetry with PostHog `captureException`** — All CLI commands (sync, dashboard, init, status, reset, install-hook) and server analysis routes now capture exceptions with classified error types and enriched context via `captureError()`.
34
+ - **Structured parse errors** — Server analysis routes use `ParseResult<T>` type for structured LLM response parsing with error classification (`error_type`, `response_length`).
35
+ - **CLI ASCII art banner** — Branded ASCII banner displayed on `code-insights init` welcome message and `code-insights dashboard` launch.
36
+ - **Logo integration** — Monochrome logo component added to dashboard header and mobile nav. Favicon replaced with branded logo. Logo assets added to READMEs.
37
+ - **CI gate** — GitHub Actions workflow for automated build + test on push/PR to master.
38
+ - **Test coverage expansion** — New tests for `config.ts` utilities and `config.test.ts` server route. Existing `read-write.test.ts` and `prompts.test.ts` tests enhanced.
39
+
40
+ ### Fixed
41
+
42
+ - **Server chunked analysis** — Guard against all chunks failing in chunked analysis path, preventing unhandled errors.
43
+
5
44
  ## [3.3.0] - 2026-03-02
6
45
 
7
46
  ### Changed
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # Code Insights CLI
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/melagiri/code-insights/master/docs/assets/logo.svg" width="80" height="80" alt="Code Insights logo" />
3
+ </p>
4
+
5
+ <h1 align="center">Code Insights CLI</h1>
2
6
 
3
7
  Analyze AI coding sessions from the terminal. Parses session history from Claude Code, Cursor, Codex CLI, and Copilot CLI — stores everything in a local SQLite database — and serves a built-in browser dashboard.
4
8
 
@@ -52,15 +56,14 @@ Opens the built-in React dashboard at `http://localhost:7890`. The dashboard pro
52
56
 
53
57
  - **Session Browser** — search, filter, and view full session details
54
58
  - **Analytics** — usage patterns, cost trends, activity charts
55
- - **LLM Insights** — AI-generated summaries, decisions, learnings, and techniques
59
+ - **LLM Insights** — AI-generated summaries, decisions (with reasoning and trade-offs), learnings (with root cause analysis), prompt quality scoring with session traits
56
60
  - **Settings** — configure your LLM provider for analysis
57
61
 
58
- > **Screenshot:** _Coming soon_
59
-
60
- ### Custom Port
62
+ ### Options
61
63
 
62
64
  ```bash
63
- code-insights dashboard --port 8080
65
+ code-insights dashboard --port 8080 # Custom port
66
+ code-insights dashboard --no-open # Start server without opening browser
64
67
  ```
65
68
 
66
69
  ## CLI Commands
@@ -152,8 +155,9 @@ code-insights stats models
152
155
  # Show sync statistics (sessions, projects, last sync)
153
156
  code-insights status
154
157
 
155
- # Open the local dashboard in your browser (server must already be running)
158
+ # Open the local dashboard in your browser
156
159
  code-insights open
160
+ code-insights open --project # Open filtered to the current project
157
161
 
158
162
  # Delete all local data and reset sync state
159
163
  code-insights reset --confirm