Metrics framework: metrics-core + metrics Gradle plugin#7
Open
isaac-udy wants to merge 4 commits into
Open
Conversation
… summary
- metrics-core: the MetricRecord/MetricFinding/MetricsRun model (the
contract every integration emits), a GitBranchStore that appends one
JSON per run to a dedicated branch with git plumbing (never checked
out), and a self-contained HTML report renderer with SVG trend
charts and latest-findings tables.
- metrics-gradle-plugin (dev.isaacudy.udytils.metrics, root-project):
metrics { integrations { … } } DSL with architecture, linesOfCode,
readmeHealth (frontmatter + git-dated staleness), buildWarnings
(captured-log parsing), and custom (any task emitting the contract);
collectMetrics / publishMetrics / generateMetricsReport tasks.
Collection never fails the build: metrics are a report, not a gate.
- architecture-core: writeArchitectureMetrics emits a machine-readable
run summary (rules by enforcement tag, per-Construct census per
module, every @ArchitectureException, every audit finding); the
generated tests gain a MetricsTest hook and the architecture plugin
an architectureMetrics task driving it.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…etric index.html is a monospace table with modules on the vertical axis and one column per metric (latest values, dimensions summed); each column header links to the metric's page. Each metric page shows a trend chart of the codebase total (all subjects summed, not split by module), the latest per-subject values, and the source's found items from the latest run. generateMetricsReport now writes a directory (build/metrics/report/) instead of a single file. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-ups
- Modules everywhere use Gradle notation (":app:client:desktop", ":"
for the root project): the integrations and the architecture summary
emit it as the canonical subject format, not just a display concern.
- The index table renders the module tree: every path prefix is a row
(:app › :client › :desktop), indented, with group rows summing every
record in their subtree; groups collapse/expand via an inline
vanilla-JS toggle. Column headers stack metric-name segments and the
cell padding tightens, so columns are much narrower.
- generateMetricsReport must-run-after collect/publish so a combined
invocation renders the fresh run, not the previous one.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tables were display:block for overflow scrolling, which made width:100% apply to the scroll box rather than the table itself, so tables sized to content and stopped short of the page's title divider. Tables are now real tables inside an overflow wrapper, stretched to the container, with one designated grow column per table absorbing the slack: the module tree on the index, the detail column on Latest values, and the item column on Found items. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codebase health metrics for udytils consumers:
dev.isaacudy.udytils.metrics, root project):metrics { integrations { … } }DSL with architecture / linesOfCode / readmeHealth / buildWarnings / custom integrations andcollectMetrics/publishMetrics/generateMetricsReporttasks. Collection never fails the build.writeArchitectureMetricsrun summary (rules by tag, per-Construct census per module, exceptions, audit findings) + anarchitectureMetricstask in the architecture plugin.Verified end-to-end in ukpt (see the companion ukpt PR, which depends on this merging first — its submodule pointer references this branch). The report layout will likely get more polish later.
🤖 Generated with Claude Code