diff --git a/FINDINGS.md b/FINDINGS.md new file mode 100644 index 0000000..a491c9a --- /dev/null +++ b/FINDINGS.md @@ -0,0 +1,21 @@ +# FINDINGS.md -- go-session + +## 2026-02-19: Split from core/go (Virgil) + +### Origin + +Extracted from `forge.lthn.ai/core/go` `pkg/session/` on 19 Feb 2026. + +### Architecture + +- Parses Claude Code JSONL transcripts into an `Event` array +- Each event has type, timestamp, content, and optional tool metadata +- Supported tool types: Bash, Read, Edit, Write, Grep, Glob, Task + +### Dependencies + +- Zero external dependencies -- standard library only (`encoding/json`, `bufio`, `os`) + +### Tests + +- Test coverage for JSONL parsing and event type detection diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..5c0e070 --- /dev/null +++ b/TODO.md @@ -0,0 +1,30 @@ +# TODO.md -- go-session + +## Phase 1: Parser Robustness + +- [ ] Handle truncated JSONL (incomplete final line, missing closing brace) +- [ ] Handle very large sessions (streaming parse, avoid loading entire file into memory) +- [ ] Handle non-standard tool formats (custom MCP tools, unknown tool names) +- [ ] Add graceful error recovery -- skip malformed lines, log warnings + +## Phase 2: Analytics + +- [ ] Session duration stats (start time, end time, wall clock, active time) +- [ ] Tool usage frequency (count per tool type, percentage breakdown) +- [ ] Error rate tracking (failed tool calls, retries, panics) +- [ ] Token usage estimation from assistant message lengths + +## Phase 3: Timeline UI + +- [ ] Feed parsed events into go-html for visual session timeline +- [ ] Colour-code events by type (tool call, assistant message, user message) +- [ ] Add collapsible detail panels for long tool outputs +- [ ] Export timeline as standalone HTML file + +--- + +## Workflow + +1. Virgil in core/go writes tasks here after research +2. This repo's dedicated session picks up tasks in phase order +3. Mark `[x]` when done, note commit hash