···11+# Worklog Project
22+33+A tool that summarizes Claude Code sessions into a daily worklog.
44+55+## Architecture
66+77+- **CLI** (`src/cli/`): Process sessions, serve web UI
88+- **Core** (`src/core/`): Session parsing, DB, LLM summarization
99+- **Web** (`src/web/`): React frontend + Express API
1010+- **DB**: SQLite at `data/worklog.db`
1111+1212+Vite dev server (5173) proxies `/api` to backend (3456).
1313+1414+## Key Design Decisions
1515+1616+### Session Filtering
1717+1818+Only sessions with actual code changes (Write/Edit/NotebookEdit/MultiEdit) are included. Exploration-only sessions (just Read/Grep/Glob) are skipped entirely. This is intentional - reading code is not an accomplishment.
1919+2020+### Prompting for Outcomes
2121+2222+The LLM prompts explicitly say "OUTCOMES only, never exploration" to prevent summaries like "explored codebase" or "reviewed project structure". Focus is on what was BUILT, FIXED, or CHANGED.
2323+2424+## Gotchas
2525+2626+- Haiku sometimes returns malformed structured output (strings instead of arrays). The code has fallback handling for this.
2727+- Kill any stale process on port 3456 before running `bun cli serve`
2828+2929+## Commands
3030+3131+```bash
3232+bun cli process # Process new sessions
3333+bun cli process --week this # Process this week only
3434+bun cli serve # Serve web UI on :3456
3535+bun dev # Vite dev server on :5173
3636+```
+72
README.md
···11+# Worklog
22+33+Automatically generates a daily worklog from your Claude Code sessions. See what you actually accomplished, not what you looked at.
44+55+## What it does
66+77+- Scans Claude Code session files from `~/.claude/projects/`
88+- Filters to only sessions where code was actually changed (Write/Edit)
99+- Summarizes each session using Claude Haiku
1010+- Generates daily summaries grouped by project
1111+- Provides a web UI to browse your work history
1212+1313+## Setup
1414+1515+```bash
1616+# Install dependencies
1717+bun install
1818+1919+# Set your API key
2020+export WORKLOG_API_KEY=sk-ant-...
2121+2222+# Process your sessions
2323+bun cli process
2424+2525+# View the web UI
2626+bun dev
2727+```
2828+2929+Then open http://localhost:5173
3030+3131+## Commands
3232+3333+```bash
3434+bun cli process # Process new sessions
3535+bun cli process --force # Reprocess all sessions
3636+bun cli process -d today # Process today only
3737+bun cli process -w thisweek # Process this week only
3838+bun cli status # Show stats
3939+bun cli serve # Production server on :3456
4040+bun cli regenerate # Regenerate daily summaries
4141+bun cli regenerate --force # Regenerate all daily summaries
4242+```
4343+4444+## Configuration
4545+4646+| Environment Variable | Default | Description |
4747+|---------------------|---------|-------------|
4848+| `WORKLOG_API_KEY` | - | Anthropic API key (required) |
4949+| `WORKLOG_BASE_URL` | - | Custom API base URL (optional) |
5050+| `SUMMARIZER_MODEL` | `claude-haiku-4-5-20251001` | Model for summarization |
5151+5252+## How it works
5353+5454+**Session filtering**: Only sessions with actual code changes are included. Reading, searching, and exploring don't count as work.
5555+5656+**Summarization**: Each session is summarized focusing on outcomes - what was built, fixed, or changed. The daily summary rolls up all sessions by project into brief phrases.
5757+5858+**Storage**: Processed data is stored in `data/worklog.db` (SQLite).
5959+6060+## Development
6161+6262+```bash
6363+bun dev # Start Vite dev server + API
6464+bun run build # Build for production
6565+```
6666+6767+## Tech stack
6868+6969+- Bun runtime
7070+- React + Vite + Tailwind
7171+- SQLite (via bun:sqlite)
7272+- Anthropic AI SDK