Skip to main content

Module factors

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

FactorPrimary sourceFallback
Codehealth_trend code_health
Architecturehealth_trend arch_health
Knowledgecode_familiarity familiarity_pct + islands_pctknowledge_islands island prevalence
Deliverydelivery_metrics rework_pct + branch_duration_hours; release_cadence summaryhidden (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§

FactorTile
One KPI dimension in the four-factor dashboard header.

Functions§

delivery_factor_from_metrics
Build the Delivery factor tile from delivery-metrics and release-cadence output.
health_trend_factors
Build the Code and Architecture factor tiles from health_trend output.
knowledge_factor_from_familiarity
Build the Knowledge factor tile from code_familiarity output.
knowledge_factor_from_islands
Build the Knowledge factor tile from knowledge_islands output as a fallback when code_familiarity data is unavailable (e.g. repositories whose primary language has no complexity_metrics support).
xmr_attention
Returns true when the series shows a statistically significant signal by the Shewhart individuals (XmR) chart rules.