Module factors
Expand description
Zero-config four-factor dashboard header tiles.
Each FactorTile summarises one named quality dimension into a
(headline 0–100, historical series, XmR-gated attention flag) triple.
Tiles are assembled in codelore-cli/src/main.rs::build_spa_dashboard
from whichever analyses were already run during the current invocation.
§Factor sources
| Factor | Primary source | Fallback |
|---|---|---|
| Code | health_trend code_health | — |
| Architecture | health_trend arch_health | — |
| Knowledge | code_familiarity familiarity_pct + islands_pct | knowledge_islands island prevalence |
| Delivery | delivery_metrics rework_pct + branch_duration_hours; release_cadence summary | hidden (no tile) when all sources absent |
§XmR attention rule
Uses the Shewhart individuals chart (2.66 = 3/d₂, where d₂ = 1.128 for n=2 moving ranges). Attention is signalled when either:
- The last point is outside
mean ± 2.66 × mean(|xᵢ−xᵢ₋₁|)(natural process limit excursion), OR - The last 8 consecutive points are on the same side of the mean (Western Electric rule 4 — sustained drift).
Series shorter than 4 points return false (insufficient data for
reliable limit estimation).
Structs§
- Factor
Tile - One KPI dimension in the four-factor dashboard header.
Functions§
- delivery_
factor_ from_ metrics - Build the Delivery factor tile from
delivery-metricsandrelease-cadenceoutput. - health_
trend_ factors - Build the Code and Architecture factor tiles from
health_trendoutput. - knowledge_
factor_ from_ familiarity - Build the Knowledge factor tile from
code_familiarityoutput. - knowledge_
factor_ from_ islands - Build the Knowledge factor tile from
knowledge_islandsoutput as a fallback whencode_familiaritydata is unavailable (e.g. repositories whose primary language has nocomplexity_metricssupport). - xmr_
attention - Returns
truewhen the series shows a statistically significant signal by the Shewhart individuals (XmR) chart rules.