1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Token-cost telemetry and the overall trajectory signal.
//!
//! Why: profiling many contributors multiplies LLM spend, so the run must
//! report what it cost; and every consumer of a profile wants one
//! high-level direction before reading any detail.
//! What: defines [`TokenCostSummary`] and [`Trajectory`].
//! Test: `token_cost_summary_defaults_to_zero`, `token_cost_summary_accumulate`,
//! and `trajectory_serde_roundtrip` in the parent `types` test module.
use ;
// ─── TokenCostSummary ─────────────────────────────────────────────────────────
/// Aggregate LLM token usage and cost for one profile run.
///
/// Populated by the narrative pass; all-zero on a deterministic-only run.
// ─── Trajectory ───────────────────────────────────────────────────────────────
/// Direction of a contributor's quality scores over the profile window.
///
/// Why: this single value is what routes action — a `Declining` profile is
/// worth a conversation, a `Stable` one usually is not. Deriving it from the
/// score slope (`derive_trajectory`) rather than from the narrative means it
/// is still correct when the LLM pass is skipped or fails.
/// What: three variants, serialised as `snake_case`.
/// Test: `trajectory_serde_roundtrip`, `synthesizer_trajectory_from_slope`.