Pull request change risk

Rate how much review attention a pull request needs, from a light look to an expert reviewer. Never merges anything.

F@f

Limits to keep in mind

Never merge, approve or skip review based on this score. Every change still gets a human review.

Problem

Every PR gets the same review request, so a one-line doc fix and a change to authentication wait in the same queue for the same reviewers.

Goal

Match reviewer attention to risk, and bring changes in sensitive areas to someone who knows them.

Input / state

PR summary, changed paths with line counts, and which paths your code owners mark as sensitive.

description
PR title and description.
changed_files
Paths with added and removed line counts, computed in code.
sensitive_paths
Paths your code owners mark as sensitive, such as auth or migrations.

Decision question

ScoreQuestion key change_risk

How much review attention does this change need?

Rubric levels

  • 0Docs, comments, or tests only.
  • 1A small, contained code change in one area.
  • 2Shared code, data handling, or many files across areas.
  • 3Authentication, payments, migrations, security configuration or concurrency.

Allowed outcomes

Decided in your code from the answer and its confidence. Thresholds are yours to set and test.

  • Light reviewMost likely level is 0 and confidence meets your threshold.
  • Standard reviewMost likely level is 1 and confidence meets your threshold.
  • Careful reviewMost likely level is 2 and confidence meets your threshold.
  • Expert reviewerMost likely level is 3 and confidence meets your threshold.
  • Maintainer decidesConfidence is below your threshold: probability is spread across options.

Example scenarios

Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.

Example state

{
  "description": "Fix typo in README",
  "changed_files": [
    {
      "path": "README.md",
      "added": 1,
      "removed": 1
    }
  ],
  "sensitive_paths": [
    "src/auth/",
    "migrations/"
  ]
}

Outcome

Illustrative
Light review

Most likely level is 0 and confidence meets your threshold.

Why

Docs only.

Using it well

  • Sensitive paths should force an expert reviewer in code, whatever the score.
  • Count lines and files in code and pass the numbers.

Request definition

POST https://api.typesafe.ai/v1/systemone
{
  "model": "jev-latest",
  "state": {
    "description": "<description>",
    "changed_files": "<changed_files>",
    "sensitive_paths": "<sensitive_paths>"
  },
  "questions": {
    "change_risk": {
      "type": "score",
      "instructions": "How much review attention does this change need?",
      "criteria": [
        "Docs, comments, or tests only.",
        "A small, contained code change in one area.",
        "Shared code, data handling, or many files across areas.",
        "Authentication, payments, migrations, security configuration or concurrency."
      ]
    }
  }
}

Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.

Version History

v1Current Versionabout 8 hours ago@f

Initial version

Comments (0)