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
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)
| Part | Example | Rule |
|---|---|---|
| Prefix and severity | Redline/BLOCKER | One 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. |
| Problem | the rest of the first line | One line: what is wrong. |
| Why and fix | the next one or two sentences | Why 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
| Severity | Meaning |
|---|---|
| BLOCKER | Must not merge. Security exposure, data loss, crash, silent corruption, or a contract break for live consumers. |
| HIGH | Merge is a deliberate trade-off. A reviewer must acknowledge it explicitly. |
| SUGGESTION | Optional. 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/uncataloguedis 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:
$ pnpm redline explain core/query-string-concatenation
$ npx redlinegate explain core/query-string-concatenation
$ yarn redline explain core/query-string-concatenation
$ bun run 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 comment | How it is counted |
|---|---|
Has no Redline/<SEVERITY> prefix | Untagged. Its severity is guessed, and the dashboard warns that it ignored the output contract. |
| Has a prefix but no rule id | Counted, but invisible to per-rule tuning. The dashboard warns. |
| Cites an id that is not in the standard | Counted, 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.
Related
- Telemetry & value: what is measured from these lines.
- Standards: every rule and its id.
- Deterministic rules: findings a checker writes with no model, in the same format.