The Shape of a Review Finding

a validated finding schema

Part of: AI Code Reviewer

A code reviewer that answers in paragraphs is hard to use. You can't sort a paragraph by severity, you can't jump to the line it talks about, and you can't count how many security problems it found. This project starts by deciding exactly what one piece of feedback looks like, then refusing anything from the model that doesn't fit. One finding, four fields. Every problem the reviewer reports is a finding with the same four fields. - line is a positive whole number pointing at the line the problem is on. - category is one of bug, style, security, or performance. - severity is one of low, medium, or high. - message is one short sentence a person can act on. You ask the model for a JSON list of these and nothing else. A fixed set of categories and severities is what lets later lessons merge, sort, gate, and score the output with plain code. The model will break the schema. Even with a clear prompt, a model sometimes invents a category ("speed"), drops a field, cites line 0, or returns an empty message. If you pass those straight to the UI, the page crashes on a missing key or shows a finding nobody can locate. So every finding goes through a validator before it counts. The validator r

Challenge: Validate the Findings