Establish counter semantics before totals
Determine whether metrics are increments or cumulative observations before aggregating them.
These examples and illustrative results are independently authored teaching materials, not measured model results.
Use case
One session’s cumulative token observations are 100,140,200. Usage between first and last is not their sum 440. A separate per-call total task has different boundaries.
Mechanism
Establish incremental/cumulative semantics, units, session/call identity and starting boundary. Sum non-overlapping increments; difference cumulative endpoints and segment resets. For call totals, take one valid final snapshot per non-overlapping call. Preserve missing values and establish parent/child inclusion before aggregating. Tokens, characters, costs and cache categories are distinct.
Bad example
Sum 100+140+200 as 440 for the interval, fill missing samples with 0 and treat output_chars as tokens.
Good example
These are cumulative observations of one counter: the 100-to 200 interval uses 100. Supported intermediate deltas are 40 and 60; without the middle sample, report the interval only. For call totals, count final snapshots once and check resets/nested duplication.
Why the change matters
Cumulative samples include earlier usage. Semantics/boundaries determine aggregation, while identity and categories prevent sampled/nested/different-unit double counting.
Observable expectation
Teaching 200−100=100, with 40+60. A fall 200→10 may be reset, not negative 190 or automatically 10 for the interval. Repeated final 200 counts once; missing baseline means unknown interval.
Limits
Usage/cache fields differ across providers and require actual contracts. Characters are not measured tokens, and tokens are not currency. Billing also needs model, pricing basis and failed attempts; frozen rates are not current prices.
Sources and evidence
- obra/superpowers · Tokens and wall-clock
File at this version8ca22dba9a94 - obra/superpowers · Record meanings
File at this version8ca22dba9a94 - anthropics/skills · Usage, timing boundaries and separate judge spend
File at this version8a1541c4a3ff - anthropics/skills · Character-count fallback mislabeled tokens
File at this version8a1541c4a3ff - anthropics/skills · Uncached remainder versus total
File at this version8a1541c4a3ff - anthropics/skills · Prompt echoes versus action census
File at this version8a1541c4a3ff - affaan-m/ECC · Cumulative rows
File at this versionef648e01899b