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
//! Project and issue **health**: a state, a rationale, and a versioned policy for
//! deriving one from the things that contribute to it (mission
//! `project-issue-health-status-01M3C8HX`).
//!
//! # What health is, and what it is not
//!
//! Health is *metadata*: the current value lives in an issue's frontmatter, every
//! change is an append-only History event carrying an actor, a timestamp and a
//! rationale, and the policy that derives a parent's health from its children's is
//! configuration in `tix.toml` (C-001). It is deliberately **not** the board's
//! status: health never replaces a status category, never means "done", and never
//! changes what a column is (C-006). Health is also not the *board status*
//! column — a healthy epic is not a completed epic.
//!
//! # The closed vocabulary, and why that is the point
//!
//! `unknown`, `on_track`, `needs_attention`, `at_risk`. Four values, one version
//! string (`health-v1`), and **no free-form state**: an arbitrary string is refused
//! by name rather than stored and rendered, because a state nobody can interpret is
//! worse than no state at all. Adding a fifth value, or changing how a rollup picks
//! one, is an escalation — a version decision with its own plan — and this module's
//! shape is what makes that visible: the states are an enum, the precedence is a
//! field of the versioned policy, and the version is checked against it.
//!
//! # The pieces
//!
//! - [`state`] — the four states, their labels, and the versioned policy that names
//! the precedence and what an empty scope or a missing reference resolves to.
//! - [`policy`] — the policy configuration: the version in force, its provenance,
//! and the validation that refuses a version this build does not know.
pub mod diagnostics;
pub mod events;
pub mod index;
pub mod policy;
pub mod portable;
pub mod rollup;
pub mod state;
pub use diagnostics::{HealthDiagnostic, HealthDiagnosticKind, RemoteTarget};
pub use events::{
AppliedHealth, HealthError, HealthEvent, HealthOverride, HealthScope, HealthSource,
HealthUpdate, HealthView, apply, event, project, validate,
};
pub use index::HealthIndex;
pub use policy::{HEALTH_POLICY_VERSION, HealthPolicy, HealthPolicyError};
pub use portable::{
PortableContribution, PortableHealth, PortableHealthDiagnostic, PortableHealthEvent,
PortableRollup, PortableScopeHealth,
};
pub use rollup::{Contribution, HealthRollup, rollup};
pub use state::{HealthState, StateParseError};