Inspiration
CodeFire is an open-source (MIT) desktop companion that gives AI coding CLIs persistent memory via MCP. Several of its patterns would significantly improve ai-usage-log's session tracking and project intelligence capabilities.
What CodeFire Does Well
| Feature |
How It Works |
Direct .jsonl parsing |
Reads Claude Code session files line-by-line, extracting model, tokens (in/out/cache), tool counts, git branch, timestamps |
| Auto project discovery |
Scans ~/.claude/projects/, decodes path-encoded folder names back to real filesystem paths |
| Live session monitoring |
Watches active sessions — context window %, token burn rate, cost estimates |
| Session → task linking |
Sessions reference tasks worked on; tasks reference originating sessions |
| Cost tracking |
Per-session and aggregate cost estimates by model pricing |
| Codebase snapshots |
Point-in-time file tree capture per session |
| Daily briefings |
AI-generated digest summarizing activity across all projects |
Proposed Adaptations
Phase 1 — Direct .jsonl Parsing (High Priority)
Currently read_claude_sessions reads JSONL files but could extract more structured data. Adapt CodeFire's parsing approach:
This overlaps with #8 but focuses specifically on the .jsonl parsing layer rather than stats aggregation.
Phase 2 — Auto Project Discovery
Phase 3 — Session ↔ Avodah Task Linking
Enable bidirectional linking between ai-usage-log sessions and Avodah tasks:
This creates the feedback loop: AI reads tasks → works on them → session logs reference the tasks → next session can see history.
Phase 4 — Cost Tracking & Reporting
Phase 5 — Live Session Awareness (Stretch)
Non-Goals
- No GUI — ai-usage-log stays MCP-only; visual dashboards are Avodah Flutter app territory
- No code indexing/RAG — out of scope for session logging
- No browser automation — CodeFire feature, not relevant here
Relationship to Other Issues
References
Inspiration
CodeFire is an open-source (MIT) desktop companion that gives AI coding CLIs persistent memory via MCP. Several of its patterns would significantly improve ai-usage-log's session tracking and project intelligence capabilities.
What CodeFire Does Well
.jsonlparsing~/.claude/projects/, decodes path-encoded folder names back to real filesystem pathsProposed Adaptations
Phase 1 — Direct
.jsonlParsing (High Priority)Currently
read_claude_sessionsreads JSONL files but could extract more structured data. Adapt CodeFire's parsing approach:This overlaps with #8 but focuses specifically on the
.jsonlparsing layer rather than stats aggregation.Phase 2 — Auto Project Discovery
~/.claude/projects/to auto-discover project folders-home-sinh-git-repos-foo→/home/sinh/git-repos/foo)list_discovered_projectsPhase 3 — Session ↔ Avodah Task Linking
Enable bidirectional linking between ai-usage-log sessions and Avodah tasks:
task_idsfield to session metadatasession_idslookup — given a task ID, find all sessions that touched itlink_session_task,get_task_sessionsThis creates the feedback loop: AI reads tasks → works on them → session logs reference the tasks → next session can see history.
Phase 4 — Cost Tracking & Reporting
get_cost_summary(period, project?)Phase 5 — Live Session Awareness (Stretch)
.jsonlfile locks or recent writes)get_active_sessionsMCP tool showing: project, model, duration, tokens so far, context %Non-Goals
Relationship to Other Issues
References
swift/andelectron/src/