How do I generate sprint health charts?
Question
How do I generate the sprint health charts (PRs & Commits, Line Churn, PR Cycle Time, Cumulative Stories Done) for a given sprint?
Answer
Generate charts for a single sprint — one command does everything (CSV extraction + gnuplot rendering):
./projects/ores.compass/compass.sh sprint charts --sprint 18
Omit
--sprintto auto-detect the current sprint:./projects/ores.compass/compass.sh sprint charts
compass sprint chartsextracts git and gh API data into CSVs underbuild/output/sprint_NN/, then calls the four gnuplot scripts to write the per-metric PNGs intodoc/agile/versions/v0/sprint_NN/. RequiresgnuplotonPATH— the command fails immediately if not found.Prefer the
compass sprint chartscommand above — it needs onlygnuplot(no cmake/vcpkg) and so works in a light environment. A thinsprint_chartsCMake target still exists for full-environment builds, but the sprint number is a configure-time cache variable there (cmake --preset … -DSPRINT=18before--build), which is why the direct compass command is simpler.Generate charts for all sprints:
for s in $(seq 1 18); do ./projects/ores.compass/compass.sh sprint charts --sprint $s done
Outputs — all four written into
doc/agile/versions/v0/sprint_NN/:File Contents prs_commits.pngDual-axis bar: PRs and commits per day line_churn.pngBars: lines added (green) and deleted (red) per day pr_cycle.pngHours from PR open to merge (only when PR data available) stories_done.pngCumulative stories DONE per day (only when story data available) Commit these PNGs into the sprint directory; every sprint (01–18) follows this convention.
- Wire into the sprint page. Add a
* Chartssection with subheadings andfile: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
- CMake setup — presets reference.
- Sprint 18 — charts section example.