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
13 changes: 13 additions & 0 deletions docs/adding-a-metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,16 @@ 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.

## What the catalog keeps, and why

Check a new metric against these decisions before you add it.

- Each metric must give its own actionable signal. A metric that mostly repeats another one is cut, not kept as a variant.
- Removed on purpose: the Low Comments penalty (replaced by `comment_noise`), hardcoded and duplicated TSX string counts, and the class, type and import risk weights. Removed metrics get no compatibility layer.
- TODO counts are neutral detail, never risk.
- React and Solid components have their own component-scoped metrics, such as hooks, effects, JSX depth and props.
- Findings come from the project's own `tsc` and `eslint` when present. Otherwise srcly runs `ruff` and its own TypeScript rules. Each finding names its tool.
- Named 2x2 presets use absolute cut-offs, not cut-offs relative to the repo.
- Below the cut line: clones, coverage, CRAP, temporal coupling and trends.
- Tune defaults with evidence. The October 2026 pilot adjudicated 729 top-10 cases on four repositories, then set the defaults (for example, `comment_noise` flags 1.0 comment line per code line or more). Its method, results and open follow-ups are in `docs/research/metric-pilot-2026-10/README.md`. Rerun a pilot with `server/scripts/evaluate_metric_portfolio.py`.
22 changes: 22 additions & 0 deletions docs/initiative-history.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,27 @@
"follow_ups": [
"Longer-horizon ideas in claim C8 (change islands, PR splittability, ripple frontier) were never planned and are not tracked."
]
},
{
"title": "Metric system overhaul",
"slug": "metric-system-overhaul",
"outcome": "completed",
"retired_at": "2026-11-12",
"summary": "The metric system overhaul landed as seven stacked PRs: trust fixes, catalog cuts with comment noise and component metrics, one server-owned catalog with a single-metric list, Git activity, 2x2 presets, zero-config findings, and a four-repo pilot that tuned the defaults.",
"reason": "All seven milestones merged on 2026-10-16 (#73-#79); the map already recorded completion.",
"documentation": [
"docs/adding-a-metric.md",
"docs/CODE_MAP.md",
"docs/research/metric-pilot-2026-10/README.md"
],
"revision": "0bfb05ba",
"follow_ups": [
"Scope LOC (and commit count) to code languages, so Markdown, HTML and CSS stop ranking beside code.",
"Make parameter_count's file and folder value the max arity with a witness instead of a sum.",
"Fix the LOC description or count: TS and Python LOC include comment lines; then revisit comment_ratio.",
"Weight findings by severity, or set stylistic rules (eslint curly) apart, so one project rule can't fill the Findings preset.",
"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."
]
}
]
106 changes: 0 additions & 106 deletions docs/intent/metric-system-overhaul/implementation-plan.md

This file was deleted.

Loading
Loading