Repository navigation
Closed
Labels
Description
Part of #1412 (Track C).
Context
24+ CI checks each compute a signal (coverage, ratchets, dead-code counts, size, slow tests, graph stats) but there is no single read surface. Per the #1409 lesson, this is DATA for agents to query, not a dashboard.
Deliverables
pnpm repo-health [--json]: one command emitting a single JSON snapshot by REUSING the analyzers (never reimplementing): coverage summary (json-summary), layering ratchet values (R6 baseline, waiver counts), fallow issue/suppression counts, package size (size-report measurement), slow-test ratchet state, depgraph stats from feat(scripts): dependency-graph report over the layering gate's model #1410 (files, edges, cycles-by-kind, redundant-edge count), bench case/topic counts, skillgym case count.- Component metrics per zone, from the depgraph model's fan-in/fan-out: instability I = fan-out/(fan-in+fan-out), abstractness A (type-only export share is an acceptable first approximation), and distance from the main sequence |A+I-1|. These are observatory data to locate concrete high-fan-in modules worth pinning harder (see CONTEXT.md "Principles and their gates") — they must NEVER become CI thresholds.
- Include the depgraph-vs-layering consistency assertion (feat(scripts): dependency-graph report over the layering gate's model #1410: R6 count must reproduce TYPE_INVERSION_BASELINE) and fail the command on mismatch; wire that single assertion into the Layering Guard CI job.
- Snapshot schema documented in scripts/depgraph/README.md or a sibling; stable field names (they become the trend/delta contract for the follow-up issues).
Acceptance
- Runs from a clean checkout in < 2 min without network.
- Field names reviewed against the delta-comment issue so the schema does not churn immediately.
- Main-sequence report spot-checked against expectations (e.g. exec.ts and ref-frame.ts should surface as concrete + high fan-in).
Out of scope
History, trends, PR comments (follow-up issue); any rendering; gating on any component metric.
Review amendments (2026-07-27)
- The snapshot must carry provenance BEFORE obs: evolve the size-report PR comment into a quiet quality-delta comment + metric history on main #1424 starts persisting history: schemaVersion, commit SHA, tool versions (or config content hashes) per analyzer, and input provenance (which lockfile/config each metric was computed from). Schema changes bump schemaVersion; obs: evolve the size-report PR comment into a quiet quality-delta comment + metric history on main #1424 refuses to diff across schema versions without a migration note.
Activity
docs: architecture principles mapped to enforcing gates and open ledg…
quality-delta: consume the merged artifact freshness status from #1423
quality-delta: consume the merged artifact freshness status from #1423
obs: repo-health snapshot command aggregating existing analyzers into…