Sprint Ledger Spec v0.1
A metric specification for joining AI development spend to software delivery. Published with Zero-Cost Code part 4. Licence: CC BY 4.0. Author: Christopher Zerafa. Status: draft for comment.
1. Purpose
Most organisations can see their AI bill and their delivery metrics, but not in the same row. This spec defines one row per iteration (sprint) that joins planning, shipped change, delivery performance and AI activity, so an engineering leader can answer a finance question: what did this work cost, in machine spend and human time, and what did it deliver?
The spec defines metrics, sources, formulas, directions, thresholds and caveats. It ships no code and no data. It is tool-agnostic: any ticketing system with iteration and story states, any Git host with pull requests and deployment records, and any tracing system that records model cost per session.
2. Principles
- Join the bill to the delivery. An AI cost metric is only reported next to the delivery and quality metrics for the same period.
- State the bounds. Every metric that is an estimate says whether it is a lower bound, an upper bound or a proxy.
- Don’t trend what changed meaning. If a definition shifts (for example, stories shrink when agents write tickets), stop trending the affected count and say so.
- Pair volume with quality. Every volume metric that can be gamed sits beside a quality metric that would show the gaming.
- Recheck history. Metrics that depend on later events (retro actions closed, PRs deployed) are recomputed on every sync.
3. Unit of analysis
- Primary: one iteration, with start date, end date and status (unstarted, started, done).
- Secondary (optional): one feature or epic, for the human-versus-machine comparison in §7.
- Sync: daily, plus on demand. Record the last-synced timestamp on each row.
4. Sources
| Code | Source type | Examples | Used for |
|---|---|---|---|
| T | Ticketing | Jira, Linear, Shortcut | Plan, flow, work mix, retro actions |
| R | Repository | GitHub, GitLab | Merged change, AI attribution, line counts |
| D | Deployments | Git host environments, CD system | DORA metrics |
| A | AI tracing | Langfuse, OpenTelemetry GenAI spans, vendor usage exports | Sessions, model cost, activity mix |
5. Metric definitions
5.1 Retrospective follow-through
| Metric | Definition | Formula | Source | Direction | Caveat |
|---|---|---|---|---|---|
| Actions done % | Whether retro actions get closed | Done ÷ (actions linked to a story + untracked actions) | T | Higher | Rechecked each sync, so it rises as later iterations close work |
| Action follow-through | Status of each retro action | One line per linked story: done/open, state, owner, days open; untracked actions counted separately | T | — | Untracked actions are a smell in themselves |
5.2 Plan and flow
| Metric | Definition | Formula | Source | Direction | Caveat |
|---|---|---|---|---|---|
| Stories done / total, % done | Progress against everything in the iteration now | Done ÷ (done + started + unstarted + backlog) | T | Higher | Includes stories finished before the iteration began |
| Burndown | Open stories at each day’s end | Stories in iteration − stories completed by that day | T | Falls to 0 | Stops at today for a running iteration |
| Cycle time | Elapsed time per finished story | completed_at − started_at, in days | T | Lower | Plot per story, in completion order |
| Median / P85 cycle time | Typical and slow-end cycle time | Median and 85th percentile over stories finished in the iteration | T | Lower | P85 matters more than the median for planning |
| Feature median cycle time | Cycle time for new capability only | Median where story type = feature | T | Lower | |
| Throughput | Stories finished inside the iteration dates | Count with completed_at in [start, end] | T | — | Do not trend across a change in ticketing practice (e.g., agent-written stories) |
| Features done | New capability delivered | Feature stories completed inside the dates | T | Higher | |
| Say/do % | Delivery against the plan at the start | Planned stories done by end ÷ planned stories; planned = created on or before start date | T | Higher | Creation-date approximation of “planned” |
| Scope added % | Plan stability | Stories created after the start date ÷ all stories in the iteration | T | Lower | |
| Carry-over | Work still open | Open stories at end (or now, if running) | T | Lower | |
| Work mix (F/C/B) | Split of features, chores, bugs | Count by story type | T | — | |
| Feature % | Share of work that is new capability | Feature stories ÷ all stories | T | Higher | For an unstarted iteration this is the plan |
5.3 Shipped change and AI attribution
| Metric | Definition | Formula | Source | Direction | Caveat |
|---|---|---|---|---|---|
| Merged PRs | Code changes shipped | PRs merged in the dates across in-scope repos, excluding bots and environment-promotion PRs | R | — | Unit of shipped change, not of value |
| AI PR % | Share of merged PRs opened by an agent | AI-attributed merged PRs ÷ merged PRs | R | — | Lower bound. Attribution uses a machine-written marker in the PR description (e.g., an agent’s attribution footer); removing the marker hides the PR |
| AI commits | Commits inside AI-attributed PRs | Sum of commit counts of AI PRs | R | — | A few large PRs can dominate |
| AI line share | Share of changed lines in AI PRs | (Additions + deletions in AI PRs) ÷ (same over all merged PRs) | R | — | Mix indicator, not effort |
5.4 AI activity and cost
| Metric | Definition | Formula | Source | Direction | Caveat |
|---|---|---|---|---|---|
| AI sessions | Agent sessions with model calls in the dates | Count of traced sessions | A | — | |
| AI cost ($, token-equivalent) | Model usage priced at list rates | Sum of traced session cost | A | — | Not cash under flat-rate plans. Upper bound if tracing covers people or projects outside the team’s scope |
| AI cash cost ($) | What the organisation actually pays for agents in the dates | Subscription fees pro-rated to the dates + metered API spend | Billing | — | Under flat-rate plans this is capped; it is the floor of the forecast |
| AI pricing exposure (×) | Gap between list-price and cash cost | AI cost ($, token-equivalent) ÷ AI cash cost ($) | A, Billing | — | The multiple you’d pay if moved to metered pricing; the ceiling of the forecast |
| AI $ / PR | AI spend per unit of shipped change | AI cost ÷ merged PRs; report cash and token-equivalent versions | A, R | Lower | Report only beside lead time and change fail % |
| AI usage mix | How the agents were used | Tool calls grouped by kind (shell and git, code edits, code reading, data queries, ticketing, docs, browser, sub-agents, PRs); AI PRs by repo; spend by model | A, R | — | Descriptive; useful for spotting waste (e.g., high reading share with low edits) |
5.5 Delivery performance (DORA)
| Metric | Definition | Formula | Source | Direction | Caveat |
|---|---|---|---|---|---|
| Deploys | Deployment frequency | Successful production deployments in the dates across in-scope repos | D | Higher | |
| Lead time (h) | Lead time for changes | Median hours from PR merge to the next successful production deploy of the same repo, for PRs merged in the iteration | R, D | Lower | Undeployed PRs excluded |
| Change fail % | Change failure rate | Failed or errored production deployments ÷ finished production deployments | D | Lower | Proxy. Counts pipeline failures, not production incidents |
| Time to restore (h) | Recovery time | Median hours from a failed production deployment to the next successful one in the same repo | D | Lower | Proxy for incident recovery |
6. Thresholds and trends
Starting points. Tune them to your context and publish the tuned values alongside the scorecard.
| Metric | Green | Amber | Basis |
|---|---|---|---|
| Lead time to production | ≤ 24 h | ≤ 168 h | DORA bands |
| Production deploys per iteration | ≥ 20 | ≥ 5 | DORA bands, two-week iteration |
| Change fail % | ≤ 15% | ≤ 30% | DORA bands |
| Say/do % | ≥ 80% | ≥ 60% | Starting point |
| Retro actions done | ≥ 80% | ≥ 50% | Starting point |
| Feature % | ≥ 40% | ≥ 25% | Starting point |
| AI $ / PR | ≤ $25 | ≤ $50 | Starting point; depends on model prices and PR size |
Anything outside amber is red. Trend markers: compare each metric with the average of the previous three iterations and mark better or worse in the metric’s good direction.
7. Human-versus-machine comparison (per feature)
For a selected feature or epic:
- AI cost: traced model spend attributable to the feature (by branch, ticket reference or session tag). State the attribution method.
- Human cost: hours spent on specification and decision, plus hours on review and verification, × a loaded hourly rate (annual loaded cost ÷ productive hours; state both).
- Counterfactual: estimated cost and elapsed time without agents, from a reference class of comparable pre-AI work. Report a range, not a point.
- Report: AI cost, human cost, total, elapsed time, and counterfactual range side by side. Report the human share of the AI-assisted total.
- Frame savings as capacity. Hours freed are capacity redeployed, not payroll removed, unless headcount actually changed.
8. Data-quality rules
- Exclude bot authors and environment-promotion PRs (e.g., staging → production) from merged PRs.
- Record whether AI attribution and cost are lower or upper bounds on the sheet itself, not in a footnote elsewhere.
- Freeze definitions per version of this spec; record the spec version on each row.
- When a practice change alters a metric’s meaning, annotate the iteration where it happened.
9. Out of scope (v0.1)
Code-quality scores, security findings, production-incident data beyond the deploy proxy, per-person metrics. This spec is for teams, not for ranking individuals.
Planned for v0.2: two upstream quality measures. Rework rounds: how often a change returns to the builder after review. Spec returns: how often work is sent back because the specification, not the code, was wrong.
10. Changelog
- v0.1 (2 Dec 2026): first public draft.
Feedback and forks welcome. Licence: CC BY 4.0, https://creativecommons.org/licenses/by/4.0/