Skip to content

Add git lrc stats command for review history CLI #60

@fuleinist

Description

@fuleinist

Problem

Every git commit with git-lrc embeds review metadata in the commit message: LiveReview Pre-Commit Check: ran (iter:N, coverage:X%). However there is no way to query or visualize this history from the CLI — developers must manually parse git log to understand their review coverage over time.

Solution

Add a git lrc stats (and alias lrc stats) command that:

  • Parses LiveReview Pre-Commit Check: lines from git log for the current repo
  • Shows a per-repo summary: total reviewed/vouched/skipped commits, average coverage, average iterations per commit
  • git lrc stats --last 30 — last N days breakdown (default: all time)
  • git lrc stats --json — outputs machine-readable JSON for CI dashboards or scripting

Example output:

$ git lrc stats
Review History (all time)
✅ Reviewed : 47 commits  (avg iter: 2.3, avg coverage: 74%)
👍 Vouched  : 12 commits
⏭️ Skipped  :  5 commits
Total      : 64 commits

Example JSON output (--json):

{
  "total": 64,
  "reviewed": { "count": 47, "avg_iter": 2.3, "avg_coverage": 74 },
  "vouched": { "count": 12 },
  "skipped": { "count": 5 }
}

Use case

Developers and teams want to understand review coverage trends over time without opening the browser UI. This is especially useful for team leads tracking how well AI-generated code is being reviewed across a sprint or time period.

Scope

  • Single new subcommand in cmd/stats.go (or similar)
  • Reuses existing git-log parsing logic already present in the codebase
  • No new API calls, no network access, no external dependencies
  • Target: small, focused — no UI changes needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions