Skip to main content

Module csv

Module csv 

Expand description

CSV emitters. Headers match code-maat exactly for golden-test parity.

Writers are grouped into per-domain submodules and re-exported here so callers keep the flat output::csv::write_* paths. Shared helpers live in this module.

Functions§

write_abs_churn_csv
write_arch_violations_csv
architecture-violations CSV emitter — one row per import edge that crosses a forbidden layer boundary per .codelore-arch-rules.toml.
write_architecture_metrics_csv
write_architecture_roles_csv
architecture-roles CSV emitter — per-file Core/Shared/Control/ Periphery role + visibility fan-in/out.
write_architecture_trend_csv
architecture-trend CSV emitter — structural-health metrics at sampled historical revs.
write_author_churn_csv
write_authors_csv
Modern columns for the authors analysis (per-entity author breakdown — Bird et al. 2011 risk indicator). Code-maat’s parity columns entity,n-authors,n-revs are emitted under --code-maat-compat.
write_bus_factor_csv
bus-factor CSV emitter.
write_centrality_csv
write_clone_coupling_csv
write_clones_csv
write_code_age_csv
write_code_familiarity_csv
write_code_health_csv
write_communication_csv
Under --code-maat-compat the header uses code-maat’s author,peer column names (matching communication.clj’s output); CodeLore’s modern default uses the symmetric author-a,author-b pair which is clearer about the equality of roles.
write_communities_csv
write_coordination_needs_csv
write_coupling_csv
DEEP-1, DEEP-2, DEEP-3: under --code-maat-compat, emit code-maat’s verbose 7-column shape with truncated-integer degree and the legacy column-name set (entity, coupled, first-entity-revisions, second-entity-revisions, shared-revisions). The Fisher exact p-value is a CodeLore extension with no code-maat equivalent and gets dropped under compat — migrating tools wouldn’t know how to interpret it anyway. CodeLore’s modern default keeps the 8-column shape with float degree and the always-verbose paired columns.
write_crossing_csv
crossing CSV emitter — structural “X” files that co-change in both directions (DV8 Crossing).
write_cycle_health_csv
cycle-health CSV emitter — per-SCC heat, verdict, extraction candidate, and predicted propagation-cost drop.
write_cycle_origins_csv
architecture-metrics CSV emitter — repo-level (metric, value) rows. cycle-origins CSV emitter — the commit each HEAD dependency cycle first formed at.
write_defect_validation_csv
defect-validation CSV emitter — flat (metric, value) evidence rows from a defect-calibration artifact. Header metric,value; zero rows (no artifact configured) still emit the header.
write_delivery_friction_csv
delivery-friction CSV emitter.
write_delivery_metrics_csv
write_dependency_cycles_csv
dependency-cycles CSV emitter — one row per (cycle, member file); rows sharing a cycle_id form one tangle.
write_effort_exposure_csv
write_entity_churn_csv
write_entity_effort_csv
write_entity_ownership_csv
write_finding_hotspot_overlap_csv
write_function_coupling_csv
write_function_hotspots_csv
function-hotspots CSV emitter — repo-wide function-level hotspot ranking (revs × cognitive, the hotspots scoring shape at function granularity).
write_function_xray_csv
write_god_classes_csv
god-classes CSV emitter — fan_in / fan_out / cognitive intersection ranking per file.
write_health_trend_csv
health-trend CSV emitter — repo health timeline across sampled revs.
write_hotspot_velocity_csv
hotspot-velocity CSV emitter — recent vs baseline churn rate + acceleration (heating up / cooling down).
write_hotspots_csv
write_instability_csv
instability CSV emitter — Martin Ca/Ce/Instability per file.
write_knowledge_islands_csv
Per-file knowledge-loss risk (knowledge-islands analysis). No code-maat equivalent — strict CodeLore extension; no compat-mode header variant needed.
write_lead_time_csv
lead-time CSV emitter.
write_main_dev_by_deletions_csv
write_main_dev_by_revs_csv
write_main_dev_csv
write_marginal_owner_risk_csv
write_messages_csv
write_modularity_violations_csv
modularity-violations CSV emitter — Fisher-significant co-change pairs with no structural import edge (the structure×history fusion).
write_ownership_csv
Under --code-maat-compat, emit code-maat’s exact 3-column fragmentation output (entity,fractal-value,total-revs — note the column order; code-maat sorts the columns differently from CodeLore’s natural path / main_author / total_revs / fractal_value shape). CodeLore’s modern default surfaces main_author as a context column for triage (single-author file? long-tail file? the operator sees without re-running ownership).
write_pair_programming_csv
pair-programming CSV emitter.
write_refactoring_targets_csv
CSV emitter for the refactoring-targets analysis.
write_release_cadence_csv
write_revisions_csv
write_soc_csv
write_stale_code_csv
stale-code CSV emitter.
write_summary_csv
code-maat’s summary emits statistic,value; CodeLore uses the slightly clearer metric,value. Under --code-maat-compat, emit the legacy header so downstream tooling (code-maat-targeted dashboards) keeps parsing.
write_team_composition_csv
team-composition CSV emitter.
write_top_committers_csv
Per-author commit leaderboard — the previous behaviour of the authors analysis, now exposed as a distinct first-class analysis.
write_unstable_interface_csv
unstable-interface CSV emitter — heavily-imported files that change often and co-change with their dependents.