# painhours The painhours urgency model for Rust: a 0-100 heat score computed from how much something hurts, how broadly it hits, and how long it has been sitting there. Nothing stores a priority. Rank by the score; use the band only for color. ## The model ```text raw = pain^1.5 * scale^2.0 * age_weeks^1.5 painhours = round(100 * (1 - e^(-raw/266))) ``` `pain` and `scale` are 1-5 guesstimates. Each exponent tunes one factor independently: `scale` drives the ranking, `pain` gives severity a secondary pull, and the exponent on age is the anti-starvation lever that decides how fast a narrow problem climbs rather than languishing forever. Band cutoffs on the score: Critical at 75, High at 50, Medium at 20, Low below. ## Use ```rust use chrono::Utc; use painhours::{Priority, age_weeks, painhours}; // Age is measured to an anchor you choose. Pass `Utc::now()` while the item is // live; pass the resolution instant once it is terminal, so closed items stop // climbing the list. let weeks = age_weeks(created_at, Utc::now()); let score = painhours(pain, scale, weeks); let band = Priority::from_painhours(score); ``` The crate is the scoring model and nothing else. It has no opinion about what your record type is, what statuses it has, or where you store it. ## Consumers `MNW/wam` (tickets) and GoingsOn (problems), so one ranked list can span both. Changing a constant here reranks both, which is the point: duplicating the tuning would let the rankings drift.