Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 2.56 KB

File metadata and controls

29 lines (21 loc) · 2.56 KB

gitmetry

A personal developer-efficiency report from git history, 11 dimensions (DORA / SPACE / CodeScene) plus pre-aggregated year/quarter/window overviews. Details, dependencies and options live in README.md — read it.

What it is

A two-phase tool, read-only over git (git archive/git show, never touches the working tree):

  1. gitmetry.py scans local repos and emits raw data (markdown tables / JSON).
  2. You (the LLM) compose an interpreted report with 🟢/🟡/🔴 verdicts from it — the model is examples/sample-report.md (a generic, anonymized example).

When asked for a report

  1. Generate the raw data:
    ./gitmetry.py --since <YYYY-MM> [--until <YYYY-MM>] [--health-trend] \
      --format both --out ./reports/gitmetry-<window>.md
    Always write outputs to this project's gitignored ./reports/ dir (not ~/reports/). Derive the window from the request (5y/3y/24m/YYYY-MM..YYYY-MM, empty = default 24 months). Add --health-trend only when code-health is also wanted (scc snapshots, runs for minutes). Personal defaults (author / root / main_repo / main_ext / paths) come from the user's gitignored .gitmetry.json if present, so usually only the window needs passing; otherwise the tool defaults to the repo in the current directory and the author from git config user.name. Set --root / --main-repo / --author / --main-ext explicitly when the target differs. The user may also keep a gitignored CLAUDE.local.md with their own standing instructions.
  2. Load the generated .md (and .json for exact numbers) and interpret it per the "How the raw data becomes a report" section in README.md (header → summary with flags → yearly overview → 11 dimensions with legend + assessment → footer). The yearly/quarter/window overview is pre-computed in the rollup block — distil it rather than re-deriving figures from the monthly rows.
  3. Save the report to ./reports/gitmetry-<window>-report.md and summarize the 3–4 most important findings (including every 🔴/🟡).

Rules

  • Don't copy the raw tables wholesale — distill a story. Be concrete (file names, numbers, "X → Y" trends). Trend > absolute number.
  • Metrics are proxies, not truth. Most trustworthy: throughput, rework %, function CCN, ownership. Indicative only (skewed by generated code / commit discipline): line sums, corr %.
  • If scc / lizard is missing, the script just skips that layer — continue with what you have.
  • Don't edit the script for a one-off run; parameterize via the options.