Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/adding-a-metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ For a metric that flows end to end (analyzer → API → treemap, Hot Spots, exp
- Confirm the metric appears in the **Color** and **Rank by** pickers (Rank by only when it isn't neutral), ranks Hot Spots with its unit and N/A group, and shows in the tooltip and code viewer for the languages that measure it.
- Avoid `// @ts-ignore` / `// @ts-expect-error`; instead, update types so the pipeline is type-safe from API response through to the UI.

## How ranking treats a metric

- Ranking works on one cohort at a time: files or functions, never both mixed.
- A measured zero stays in the denominator. N/A drops out of the ranking and is listed apart.
- The client (`client/src/utils/hotSpotRanking.ts`) and the report (`server/app/services/reporting.py`) must give the same order. `tests/test_ranking_parity.py` checks this. `client/src/utils/hotSpotRanking.test.ts` covers cohorts, zeros, N/A and neutral metrics.
- Treemap areas: a scope with children gets a `(body)` child for its remaining LOC (`client/src/viz/treemap/utils/tree.ts`), so leaf areas add up to the scope.

## What the catalog keeps, and why

Check a new metric against these decisions before you add it.
Expand Down
16 changes: 16 additions & 0 deletions docs/initiative-history.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,21 @@
"Detect components that return .map(...) of JSX (explorEDA DslCode.tsx).",
"Run the next pilot on a TS repo without tsc or eslint and a non-author repo, with a second reviewer."
]
},
{
"title": "Trustworthy metrics and ranking",
"slug": "metric-trust",
"outcome": "completed",
"retired_at": "2026-11-12",
"summary": "The metric-trust plan was carried out inside the metric system overhaul rather than on its own. Measured zero versus N/A, executable-scope counts, witnesses and one consistent ranking story all shipped in #73 and #75. Reconciled against origin/main 0bfb05ba.",
"reason": "Replaced by the metric system overhaul: its milestones shipped as #73 (zero vs N/A, witnesses, cohorts) and #75 (one catalog, report and client parity).",
"documentation": [
"docs/adding-a-metric.md",
"docs/research/metrics-2026-10-15/README.md"
],
"revision": "0bfb05ba",
"follow_ups": [
"Dropped: a declared display-area ownership rule with area-union fixtures (m2). Nothing tracks it."
]
}
]
57 changes: 0 additions & 57 deletions docs/intent/metric-trust/implementation-plan.md

This file was deleted.

265 changes: 0 additions & 265 deletions docs/intent/metric-trust/initiative-map.json

This file was deleted.

34 changes: 0 additions & 34 deletions docs/intent/metric-trust/intent-brief.md

This file was deleted.

Loading
Loading