Skip to content

obs: repo-health snapshot command aggregating existing analyzers into one JSON #1423

Description

@thymikee

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions