This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
PR-Helper is a self-hosted web service that auto-generates PR descriptions from Git history and performs AI-powered code review. Designed for internal/local use only (no auth).
- **SSE streaming**: Clone progress, PR generation, and AI review all use Server-Sent Events. Handlers write `event:` / `data:` lines; frontend consumes via `static/js/sse.js`.
- **Large diff handling**: Diffs are split per-file, sorted by change size, truncated to Top-N (configurable, default 20). Each file analyzed independently by LLM, then a summary prompt aggregates results.
- **Review notes**: Three-level scoping — `overall`, `file`, `suggestion` — stored in `review_notes` table. AI output is read-only; users append notes separately.
- **Diff rendering**: diff2html in Split view by default. AI review suggestions are inline-embedded next to code lines via `line` + `side` fields from SSE.