How do I generate sprint health charts?

Table of Contents

Question

How do I generate the sprint health charts (PRs & Commits, Line Churn, PR Cycle Time, Cumulative Stories Done) for a given sprint?

Answer

  1. Generate charts for a single sprint — one command does everything (CSV extraction + gnuplot rendering):

    ./projects/ores.compass/compass.sh sprint charts --sprint 18
    

    Omit --sprint to auto-detect the current sprint:

    ./projects/ores.compass/compass.sh sprint charts
    

    compass sprint charts extracts git and gh API data into CSVs under build/output/sprint_NN/, then calls the four gnuplot scripts to write the per-metric PNGs into doc/agile/versions/v0/sprint_NN/. Requires gnuplot on PATH — the command fails immediately if not found.

    Prefer the compass sprint charts command above — it needs only gnuplot (no cmake/vcpkg) and so works in a light environment. A thin sprint_charts CMake target still exists for full-environment builds, but the sprint number is a configure-time cache variable there (cmake --preset … -DSPRINT=18 before --build), which is why the direct compass command is simpler.

  2. Generate charts for all sprints:

    for s in $(seq 1 18); do
      ./projects/ores.compass/compass.sh sprint charts --sprint $s
    done
    
  3. Outputs — all four written into doc/agile/versions/v0/sprint_NN/:

    File Contents
    prs_commits.png Dual-axis bar: PRs and commits per day
    line_churn.png Bars: lines added (green) and deleted (red) per day
    pr_cycle.png Hours from PR open to merge (only when PR data available)
    stories_done.png Cumulative stories DONE per day (only when story data available)

    Commit these PNGs into the sprint directory; every sprint (01–18) follows this convention.

  4. Wire into the sprint page. Add a * Charts section with subheadings and file: links to each PNG (see Sprint 18 for the reference layout).

Script

compass sprint charts (lives in projects/ores.compass/src/compass.py) handles both CSV extraction and gnuplot rendering in one step. The four gnuplot scripts (scripts/sprint_*.gnuplot) are generated files, tangled from the literate sources in Sprint health charts; compass invokes them internally. Edit the org source blocks and re-tangle — never edit the .gnuplot files directly. The CMake sprint_charts target in CMakeLists.txt is a thin wrapper that calls compass sprint charts.

Tested by

Manual: run the target for sprint 18 and verify all four PNGs are generated.

See also

Emacs 29.1 (Org mode 9.6.6)