Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 2.41 KB

File metadata and controls

49 lines (32 loc) · 2.41 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Critical: never touch git

Do not commit, push, merge, branch, stage, or otherwise alter git state — ever. Make the code changes and stop. The maintainer manages all git operations and merges manually.

Spelling: UK English

The maintainer is in the UK. Use UK English spelling everywhere — command names, flags, help text, code identifiers, comments, and docs (e.g. analyse not analyze, behaviour not behavior). Note analysis is spelled the same in both, so identifiers like SaveAnalysis are fine as-is.

What this is

prflow is a CLI that ingests GitHub PR review feedback (inline comments + review summaries) into a local SQLite database, then uses an LLM to surface recurring themes per engineer — a code-review coaching aid.

Module: github.com/silverark/prflow (Go 1.25). CLI built with cobra. Key deps: go-github/v66, golang.org/x/oauth2, stack-bound/stackllm (LLM provider abstraction), modernc.org/sqlite (CGO-free driver).

Build & test

go build -o prflow ./cmd/prflow   # static binary to project root
go test ./...                     # tests live in internal/store

No lint config or CI is set up.

Layout

  • cmd/prflow/main.go — entry point, calls cli.NewRoot()
  • internal/cli/ — cobra command wiring (root + subcommands: ingest, search, users, analyse, login, status, auth)
  • internal/store/ — SQLite layer; migrations embedded and auto-applied
  • internal/ingest/ — GitHub API pagination & comment fetching
  • internal/analyse/ — LLM trend analysis
  • internal/ghclient/ — GitHub v3 REST wrapper
  • internal/search/ — full-text search

File locations (XDG)

User-scoped files live outside the repo, never committed:

  • Auth/config: $XDG_CONFIG_HOME/prflow/ (default ~/.config/prflow/)
  • Database: $XDG_DATA_HOME/prflow/prflow.db (default ~/.local/share/prflow/); --db overrides per-command. .db-wal/.db-shm are WAL aux files.

Auth gotchas

  • GITHUB_TOKEN env var (optional) overrides the stored token; use a fine-grained PAT with read-only pull requests permission.
  • Private repos return 404 (not 403) when the token is missing or under-scoped.
  • SAML SSO orgs require explicitly authorizing the token after creation.
  • LLM auth goes through stackllm (prflow login); GitHub token storage via prflow auth github.