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-violationsCSV 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-rolesCSV emitter — per-file Core/Shared/Control/ Periphery role + visibility fan-in/out.- write_
architecture_ trend_ csv architecture-trendCSV emitter — structural-health metrics at sampled historical revs.- write_
author_ churn_ csv - write_
authors_ csv - Modern columns for the
authorsanalysis (per-entity author breakdown — Bird et al. 2011 risk indicator). Code-maat’s parity columnsentity,n-authors,n-revsare emitted under--code-maat-compat. - write_
bus_ factor_ csv bus-factorCSV 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-compatthe header uses code-maat’sauthor,peercolumn names (matchingcommunication.clj’s output);CodeLore’s modern default uses the symmetricauthor-a,author-bpair 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-integerdegreeand the legacy column-name set (entity,coupled,first-entity-revisions,second-entity-revisions,shared-revisions). The Fisher exact p-value is aCodeLoreextension 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 floatdegreeand the always-verbose paired columns. - write_
crossing_ csv crossingCSV emitter — structural “X” files that co-change in both directions (DV8 Crossing).- write_
cycle_ health_ csv cycle-healthCSV emitter — per-SCC heat, verdict, extraction candidate, and predicted propagation-cost drop.- write_
cycle_ origins_ csv architecture-metricsCSV emitter — repo-level(metric, value)rows.cycle-originsCSV emitter — the commit each HEAD dependency cycle first formed at.- write_
defect_ validation_ csv defect-validationCSV emitter — flat(metric, value)evidence rows from a defect-calibration artifact. Headermetric,value; zero rows (no artifact configured) still emit the header.- write_
delivery_ friction_ csv delivery-frictionCSV emitter.- write_
delivery_ metrics_ csv - write_
dependency_ cycles_ csv dependency-cyclesCSV emitter — one row per (cycle, member file); rows sharing acycle_idform 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-hotspotsCSV emitter — repo-wide function-level hotspot ranking (revs × cognitive, thehotspotsscoring shape at function granularity).- write_
function_ xray_ csv - write_
god_ classes_ csv god-classesCSV emitter —fan_in/fan_out/ cognitive intersection ranking per file.- write_
health_ trend_ csv health-trendCSV emitter — repo health timeline across sampled revs.- write_
hotspot_ velocity_ csv hotspot-velocityCSV emitter — recent vs baseline churn rate + acceleration (heating up / cooling down).- write_
hotspots_ csv - write_
instability_ csv instabilityCSV emitter — Martin Ca/Ce/Instability per file.- write_
knowledge_ islands_ csv - T8: per-file knowledge-loss risk (
knowledge-islandsanalysis). No code-maat equivalent — strictCodeLoreextension; no compat-mode header variant needed. - write_
lead_ time_ csv lead-timeCSV 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-violationsCSV 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 fromCodeLore’s naturalpath / main_author / total_revs / fractal_valueshape).CodeLore’s modern default surfacesmain_authoras a context column for triage (single-author file? long-tail file? the operator sees without re-running ownership). - write_
pair_ programming_ csv pair-programmingCSV emitter.- write_
refactoring_ targets_ csv - CSV emitter for the
refactoring-targetsanalysis. - write_
release_ cadence_ csv - write_
revisions_ csv - write_
soc_ csv - write_
stale_ code_ csv stale-codeCSV emitter.- write_
summary_ csv - code-maat’s
summaryemitsstatistic,value;CodeLoreuses the slightly clearermetric,value. Under--code-maat-compat, emit the legacy header so downstream tooling (code-maat-targeted dashboards) keeps parsing. - write_
team_ composition_ csv team-compositionCSV emitter.- write_
top_ committers_ csv - Per-author commit leaderboard — the previous behaviour of the
authorsanalysis, now exposed as a distinct first-class analysis. - write_
unstable_ interface_ csv unstable-interfaceCSV emitter — heavily-imported files that change often and co-change with their dependents.