[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81320":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":15,"starSnapshotCount":15,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},81320,"pi-insights","BlazeUp-AI\u002Fpi-insights","BlazeUp-AI","Personal usage analytics for Pi coding agent. Temporal-aware insights, context-aware suggestions, model efficiency analysis.","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@observal\u002Fpi-insights",null,"TypeScript",53,5,44,0,1,9,43.73,"GNU Affero General Public License v3.0",false,"main",true,[24,25,26,27,28,29,30],"ai-agent","analytics","insights","observability","pi-coding-agent","pi-extension","usage-analytics","2026-06-12 04:01:32","\u003C!-- SPDX-FileCopyrightText: 2026 Hari Srinivasan \u003Charisrini21@gmail.com> -->\n\u003C!-- SPDX-License-Identifier: AGPL-3.0-only -->\n\n![Pi Insights header showing weekly changes and navigation](assets\u002Fmain.png)\n\n# Pi Insights\n\nPersonal usage analytics for the [Pi coding agent](https:\u002F\u002Fgithub.com\u002Fearendil-works\u002Fpi). Scans your session history, extracts deterministic stats and LLM-powered facets, then generates a self-contained HTML report covering your workflows, friction points, and suggestions for improvement.\n\nBuilt by the [Observal](https:\u002F\u002Fgithub.com\u002FBlazeUp-AI\u002FObserval) team while developing our agent observability platform. We needed to understand how we actually use Pi across hundreds of sessions, what patterns emerge, and where we waste time or money. This extension is the result.\n\n## Install\n\n**From npm** (recommended):\n\n```bash\npi install npm:@observal\u002Fpi-insights\n```\n\n**From source:**\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FBlazeUp-AI\u002Fpi-insights.git\npi install .\u002Fpi-insights\n```\n\n**Try without installing:**\n\n```bash\npi -e npm:@observal\u002Fpi-insights\n```\n\n## Usage\n\nRun the command inside any Pi session:\n\n```\n\u002Fpi-insights\n```\n\nThe report opens in your browser automatically.\n\n### Flags\n\n| Flag | Description |\n|------|-------------|\n| `--refresh` \u002F `-r` | Invalidate all cached LLM facet extractions and re-run them |\n| `--no-open` | Generate the report without opening it in the browser |\n| `--since \u003CN>d` | Only analyze sessions from the last N days (e.g. `--since 7d`) |\n| `--md` | Output a Markdown report instead of opening the HTML version |\n\n### Examples\n\n```bash\n# Normal run (uses caches, fast on re-runs)\n\u002Fpi-insights\n\n# Force re-extraction of all session facets\n\u002Fpi-insights --refresh\n\n# Generate without auto-opening\n\u002Fpi-insights --no-open\n\n# Only analyze the last 7 days\n\u002Fpi-insights --since 7d\n\n# Export as Markdown (for Slack, docs, etc.)\n\u002Fpi-insights --md\n```\n\n## What the Report Shows\n\n### Session stats at a glance\n\nTokens, cost, lines changed, commits, tool errors, parallel sessions, and more.\n\n![Stats grid showing sessions, messages, tokens, cost, lines, commits](assets\u002Fstats.png)\n\n### Context-aware suggestions with copyable prompts\n\nSuggests features, skills, and config additions tailored to your actual workflow. References your real projects and tools.\n\n![Features to try section with lifecycle hooks and skills suggestions](assets\u002Ffeatures.png)\n\n### \"Stop Doing\" section\n\nTells you what patterns are costing you time or money, with concrete alternatives.\n\n![Consider Stopping section with three anti-patterns and green alternatives](assets\u002Fbad_patterns.png)\n\n### Model spend analysis\n\nIdentifies overspend (Opus on simple tasks) and underspend (Sonnet failing on complex work), with a recommendation and estimated savings.\n\n![Model efficiency showing overspend, underspend, and recommendation](assets\u002Fsave_money.png)\n\n## What Makes This Different\n\nMost Pi insight extensions dump flat aggregates into an LLM prompt and get the same generic report every time. This one is temporal-aware:\n\n- **Week-over-week diffs**: see what actually changed, not a static portrait\n- **Decay-weighted charts**: recent sessions have more influence on friction\u002Fsatisfaction\u002Foutcome charts (10-day half-life)\n- **Trajectory detection**: are your costs\u002Ferrors improving, worsening, or stable?\n- **Anomaly detection**: spikes in cost or errors are surfaced with context\n- **Resolved vs ongoing friction**: only surfaces problems you still have, not ones you fixed\n- **Context-aware suggestions**: reads your existing AGENTS.md, installed skills, extensions, and packages. Will not suggest what you already have.\n- **Negative suggestions**: tells you what to stop doing, not just what to add\n\n## How It Works\n\nThe pipeline runs in five phases:\n\n1. **Scan** all Pi session log files\n2. **Extract stats** deterministically from each session (tool counts, tokens, languages, git activity, response times)\n3. **LLM facet extraction** per session to classify goals, outcomes, satisfaction, and friction\n4. **Aggregate with decay weighting**, compute diffs, detect anomalies and transitions, gather user context\n5. **Generate insights** using 8 parallel LLM prompts (with temporal and user context injected) plus a synthesis prompt, then **render** a self-contained HTML report\n\nResults are cached in `~\u002F.pi\u002Fagent\u002Fusage-data\u002F`:\n\n| Path | Contents |\n|------|----------|\n| `session-meta\u002F\u003Cid>.json` | Deterministic stats, cached permanently |\n| `facets\u002F\u003Cid>.json` | LLM-extracted facets, cached permanently (clear with `--refresh`) |\n| `report.html` | Last generated report |\n| `report.md` | Last markdown export (when using `--md`) |\n\n## Requirements\n\n- [Pi](https:\u002F\u002Fgithub.com\u002Fearendil-works\u002Fpi) v0.74.0 or later\n- An active model configured in Pi (used for both facet extraction and insight generation)\n\n## License\n\nAGPL-3.0-only\n","Pi Insights 是一个针对 Pi 编码代理的个人使用分析工具，能够提供基于时间感知的洞察、上下文感知的建议以及模型效率分析。该项目采用 TypeScript 开发，通过扫描用户的会话历史记录，提取确定性统计数据和由大语言模型支持的特征，并生成包含工作流程、摩擦点及改进建议的自包含HTML报告。特别适用于开发者希望优化其编码实践、提高生产力并减少资源浪费的场景。此外，它还支持多种命令行选项以满足不同需求，如刷新缓存数据、仅生成而不打开报告等。",2,"2026-06-11 04:04:36","CREATED_QUERY"]