Module analyses
Expand description
Analysis implementations. Each is a SQL view over the fact store plus a thin Rust orchestrator.
Modules§
- arch_
violations architecture-violationsanalysis.- architecture_
metrics architecture-metricsanalysis — repo-level structural-health numbers over the resolved import graph, the kind you trend over time.- architecture_
roles architecture-rolesanalysis — per-file architectural role from the structural import graph’s “hidden structure” (Baldwin,MacCormack& Rusnak 2014).- architecture_
trend architecture-trendanalysis — structural decay over the commit sequence.- authors
authorsanalysis — number of distinct authors per file (modernised).- bus_
factor bus-factoranalysis.- centrality
- Centrality analysis on the behavioural coupling graph.
- churn
- Churn analyses per spec §1.1:
- clone_
coupling - Clone-coupling intersection. The strategic differentiator
vs every existing clone detector: only flag clones that ALSO change
together at Fisher-significant rates.
CodeScenecalls this “X-Ray”; we ship the same analytical pattern with our published-formula transparency. - clones
- Clones analysis. Walks the working tree at HEAD, fingerprints every function in every Tier-1 file, groups by structural digest, emits one row per clone-family member.
- code_
age - Code age analysis — entity → time since last modification.
- code_
familiarity code-familiarityanalysis — what fraction of SLOC is actively known by the team’s current contributors.- code_
health - Code Health composite analysis.
- communication
- Communication analysis per spec §1.1 — Conway’s law shared-work author pairs.
- communities
- Leiden community detection on the behavioural coupling graph.
- coordination_
needs coordination-needsanalysis — per-file coordination overhead signal.- coupling
- Change-coupling analysis per spec §3.2.1 correctness invariants:
- crossing
crossinganalysis — the “X” of Kazman & Cai’s DV8 hotspot patterns (Mo, Cai, Kazman, Xiao 2015 Hotspot Patterns).- cycle_
health cycle-healthanalysis — per-cycle behavioral heat, live/fossil verdict, and the cheapest cut point for each import tangle.- cycle_
origins cycle-originsanalysis — pinpoint the commit where each HEAD dependency cycle first formed.- dashboard
- Dashboard-specific analyses: the parameterised SQL queries that feed the single-file SPA dashboard’s widgets.
- defect_
validation defect-validationanalysis — surfaces a defect-calibration artifact’s own evidence as flat, human-scannable(metric, value)rows.- delivery_
friction delivery-frictionanalysis — where technical debt actively slows delivery.- delivery_
metrics delivery-metricsanalysis — repo-level delivery flow distributions.- delta_
health delta-health— change-level health verdict forcodelore diff.- dependency_
cycles dependency-cyclesanalysis — non-trivial strongly-connected components of the structural import graph.- effort_
exposure effort-exposureanalysis — what fraction of engineering activity (commits, churn) flows into each code-health band (red / yellow / green).- entity_
effort entity-effortanalysis — code-maat parity.- entity_
ownership entity-ownershipanalysis — code-maat parity.- factors
- Zero-config four-factor dashboard header tiles.
- finding_
hotspot_ overlap finding-hotspot-overlap— external scanner findings fused with behavioral hotspot and code-health signal.- function_
coupling function-couplinganalysis.- function_
xray function-xrayanalysis.- god_
classes god-classesanalysis — files combining high cognitive complexity with high coupling (both inbound + outbound). Classic god-class symptom (Brown et al. 1998AntiPatterns§3.1; Riel 1996 Object-Oriented Design Heuristics).- grouped_
complexity - Shared helper for routing complexity-metric reads through
complexity_metrics_groupedwhenopts.group_fileis set. - health_
trend - Repo Health Timeline: architectural, code, and combined health (each 0–100,
higher = healthier) across evenly-spaced historical revisions. Reuses the
architecture_trendsampler for the rev set and the rev-parameterizablecode_healthengine for the per-rev code score. On-demand, never cached. - hotspot_
velocity hotspot-velocityanalysis — which files are heating up.- hotspots
- Hotspot ranking analysis.
cognitive_healthis on[0, 100](higher = healthier);percentile_rankis on[0, 1]; the score formula combines them so unhealthy + frequently-changed + complex files rank highest. Output range is[0, 10]: - import_
graph - Shared structural-import-graph kernel.
- instability
instabilityanalysis — Robert C. Martin’s package-coupling metrics per file (Martin 1994, “OO Design Quality Metrics: An Analysis of Dependencies”; canonised in Clean Architecture 2017).- knowledge
- Decayed-knowledge and Degree-of-Expertise (DOE) materialisation layer.
- knowledge_
islands knowledge-islandsanalysis — automatic bus-factor / knowledge-loss detection per file.- lead_
time lead-timeanalysis.- lineage
- Shared helper for routing analysis SQL through
changes_lineagewhenopts.use_canonical_lineageis on. Each path-aggregating analysis callsmaterialize_if_neededonce at the top of itsrun_*function, then wraps its SQL withrewrite(or usessource_tableif it builds the SQL viaformat!()). - main_
dev main-dev/main-dev-by-revs/main-dev-by-deletionsanalyses.- marginal_
owner_ risk - Marginal-owner risk: ownership concentration × code-health fusion.
- memo
- Process-local analysis memos, owned by the analyses layer.
- messages
messagesanalysis — code-maat parity. Match commit messages against a user-supplied regex; count one row per (file, matching-commit). High match counts surface files repeatedly touched by commits matching the regex — useful for “where do my bug-fix commits land?” or “which files get the most refactor mentions?”.- mi
- Maintainability Index banding — repo-relative, not absolute.
- modularity_
violations modularity-violationsanalysis — file pairs that co-change (Fisher-significant) yet have NO structural import edge between them.- new_
code new-codegate scope — the born/touched partition of the active working set that the[new_code]two-band gate evaluates.- ownership
- Code ownership analysis per spec §1.1 — Fractal Value (1 − HHI).
- pair_
programming pair-programminganalysis.- query
- Shared
prepare → query_map → collect → format!()-wrapped errorsboilerplate. Without this helper every analysis would copy-paste the same 7-line pattern with only the SQL constant, params, and mapper closure varying, and the error-message format would drift across analyses. - refactoring_
targets refactoring-targetsanalysis.- release_
cadence - Release-cadence analysis — inter-release gap statistics from git tags.
- revisions
revisionsanalysis — file → revision count. Code-maat parity output: (entity, n-revs). See spec §1.1 (“authors and revisions are addressable standalone”).- soc
- Sum of Coupling (
soc) — code-maat parity. - stale_
code stale-codeanalysis.- summary
- Summary analysis per spec §1.1 — 4-row repo overview.
- team_
composition - Team-composition analysis — contribution-span buckets with a behavioral veteran gate and onboarding-velocity metric.
- top_
committers top-committersanalysis — per-author commit leaderboard.- unstable_
interface unstable-interfaceanalysis — heavily-depended-on files that change often AND drag their dependents along when they do.