How rutvikchandla3/paircli works
paircli turns local Claude Code, Codex CLI, and Pi session records plus a GitHub PR into review signals and human-readable artifacts; it does not review code or score people. The main workflow fetches the PR, discovers and links sessions, attributes changed lines, runs deterministic and optional LLM analysis, then writes reports and can post a PR comment. The graph also preserves documented hook, login, and diagnostic capabilities. Some subsystem links are based on the SOURCE INDEX or README; unsampled implementation details are not inferred.
Main entry points: main.go CLI commands · link.go Session discovery and linking · render.go Report rendering · hook.go Hook commands
Components 24
CLI and setup
- CLI commands
cmd/paircli/main.go - Machine diagnostics
cmd/paircli/doctor.go - Hook commands
cmd/paircli/hook.go - Configuration
internal/config/config.go
Session capture
- Claude transcripts
internal/claudecode/transcript.go - Codex capture
internal/codex/rollout_items.go - Pi sessions
internal/pi/session.go - Hook records
internal/hooklog/merge.go - Session discovery and linking
internal/link/link.go
Signal analysis
- Line attribution
internal/attrib/attrib.go - Command and change classification
internal/classify/command.go - Detector engine
internal/engine/engine.go - Eight signal domains
internal/detect - Optional LLM judgments
internal/judge/bundle.go
PR and identity
- PR and diff data
internal/pr/pr.go - GitHub CLI
- LLM providers
internal/llm/llm.go - Device login
internal/deviceauth/client.go - Pair backend
Reports and replay
- Report rendering
internal/render/render.go - Scan snapshots
internal/snapshot/snapshot.go - Snapshot replay
internal/scan/replay.go - Report files
Other components
- Engineer
Connections 27
- Engineer → CLI commands: runs commands
README.md - CLI commands → Configuration: loads settings
- CLI commands → Device login: logs in
- Device login → Pair backend: requests credentials
- Engineer → Machine diagnostics: checks setup
README.md - Engineer → Hook commands: installs hooks
README.md - Hook commands → Codex capture: configures capture
- CLI commands → PR and diff data: starts PR scan
- PR and diff data → GitHub CLI: fetches PR
internal/pr/pr.go - CLI commands → Session discovery and linking: discovers sessions
- Session discovery and linking → Claude transcripts: parses transcripts
internal/link/link.go - Session discovery and linking → Codex capture: parses transcripts
internal/link/link.go - Session discovery and linking → Pi sessions: parses sessions
internal/link/link.go - Session discovery and linking → Hook records: merges hook records
internal/link/link.go - CLI commands → Line attribution: attributes changed lines
- Line attribution → Command and change classification: uses classifications
internal/attrib/attrib.go - CLI commands → Detector engine: runs detectors
- Detector engine → Eight signal domains: dispatches detection
internal/engine/engine.go - Command and change classification → Eight signal domains: supports detection
internal/detect/decisions/dec2.go - CLI commands → Optional LLM judgments: runs optional pass
- Optional LLM judgments → LLM providers: requests completions
internal/llm/llm.go - CLI commands → Scan snapshots: writes snapshot
- CLI commands → Report rendering: writes outputs
- Report rendering → Report files: writes reports
internal/render/render.go - Engineer → Snapshot replay: replays snapshot
- Snapshot replay → Report rendering: writes outputs
internal/scan/replay.go - Report rendering → GitHub CLI: posts PR comment