The output contract

Every finding starts with the same machine-readable line: a severity and a permanent rule id. That line is what lets Redline count findings, per rule, across every reviewer and every repository.

Why a fixed format

Free-text review comments cannot be counted. If Copilot writes “possible SQL injection” and Claude writes “unsafe query building”, nothing can tell that both are the same rule, or whether anyone fixed either. A fixed first line solves that: every reviewer names the same rule the same way, so the organisation can ask “which rules do people act on, and which do they ignore?”

Anatomy of a finding

a finding, as posted on a pull request
Redline/BLOCKER [core/query-string-concatenation]: user-supplied `name` is
concatenated into the SQL string, so a crafted value changes the query.
Use a parameterised query: db.Query("SELECT id FROM users WHERE name = $1", name)
PartExampleRule
Prefix and severityRedline/BLOCKEROne of BLOCKER, HIGH, SUGGESTION. Nothing else.
Rule id[core/query-string-concatenation]The id of the rule being applied, exactly as written in the standard.
Problemthe rest of the first lineOne line: what is wrong.
Why and fixthe next one or two sentencesWhy it breaks, and the concrete change.

One finding per comment. No preamble, no praise, no restating the diff. If nothing qualifies, the reviewer posts nothing.

Severities

SeverityMeaning
BLOCKERMust not merge. Security exposure, data loss, crash, silent corruption, or a contract break for live consumers.
HIGHMerge is a deliberate trade-off. A reviewer must acknowledge it explicitly.
SUGGESTIONOptional. The author may dismiss it without justification.

A reviewer may not invent a severity, or raise a SUGGESTION to HIGH to get attention. Which severity actually stops a merge is set per repository by its rung.

Rule ids

Every rule has a permanent id of the form <stack>/<slug>: core/hardcoded-secrets, javascript/floating-promises, react/effect-derived-state. The id never changes when the rule's wording does, so a year of findings stays comparable.

  • One rule per comment. A line that breaks two rules gets two comments.
  • core/uncatalogued is for a real problem no rule covers. Each use names the principle it offends, and a rising count is how a missing rule gets discovered.
  • Counted per id. A rule's acted-on rate is computed against its id. That is how the organisation finds the rules that earn their place and the ones that only make noise.

To read what a rule id in a finding means, and which files it applies to:

terminal
$ pnpm redline explain core/query-string-concatenation

What happens to a finding that breaks the contract

The telemetry collector reads the first line of every automated review comment. A comment that does not follow the contract is not lost, but it cannot be measured properly:

The commentHow it is counted
Has no Redline/<SEVERITY> prefixUntagged. Its severity is guessed, and the dashboard warns that it ignored the output contract.
Has a prefix but no rule idCounted, but invisible to per-rule tuning. The dashboard warns.
Cites an id that is not in the standardCounted, and the dashboard warns that it cited a rule outside the catalogue.

Untagged findings are reported as noise. When the CLI reviews with a model itself (review --engine api), the model returns JSON and the CLI writes the line, so these cases cannot occur. See Reviewing before you push.

Noise control

Review that flags everything gets ignored. The core standard has a “What NOT to flag” section that applies to every review, whatever the stack:

  • formatting, import order, or anything a linter or formatter already enforces
  • existing patterns the pull request touches but does not change
  • suggestions to use a different library when the current one works
  • naming preferences where the existing name is clear
  • the same issue on every occurrence: flag the first, then say “and N similar”

The test for any finding: if you cannot describe the input that breaks it, it is not a finding.

ℹ

The contract is checked in CI. scripts/validate.mjs fails the build if the core standard stops documenting the three prefixes, the rule id or the “What NOT to flag” section, or if the collector's parser can no longer read a finding in this format.

Learn step 03 reads a real finding, looks up its rule, and fixes it.