agentleFS
danielgefendanielgefen/sous/skills/merge-risk/SKILL.md

merge-risk

Skill0 starsChanged 3 months agoMITView on GitHub

Joint merge-risk assessment. Two independent agents rate a change low/medium/high from different angles; the conservative verdict decides whether an agent may merge it or a human must. Runs after reviewer, before security. Usage - /sous:merge-risk <change-id>

6 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use handoff.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 6

    1. bholmesdev/hubble.md★ 1.5ksame name
    2. warpdotdev/common-skills★ 630same name
    3. nicknisi/skills★ 5same name
    4. connorch/skills★ 2same name
    5. gilsmt/skills★ 2same name
    6. moisesrj97/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository10 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep the two apart. A risk assessment that drifts into re-reviewing the code is a risk assessment nobody trusts.

    line 14
  2. Very specific:

    Read sous.config.yaml and backends/code/<configured code host>.md.

    line 22
  3. Very specific:

    Call code.get_head_sha. The verdict is bound to this exact commit.

    line 24
  4. Distinctive:

    If the two raters disagree by two levels, say so explicitly in the comment — that gap is usually the most interesting thing in the …

    line 71
  5. Distinctive:

    Never rate a change you implemented.

    line 102
  6. Distinctive:

    Never round down. When genuinely torn between two levels, take the higher one and say why.

    line 103
  7. Distinctive:

    Never post a marker for a sha other than the current head.

    line 104
  8. Distinctive:

    Do not report bugs here. If a rater spots one, note it as an observation and say it belongs to the reviewer gate — then rate the risk …

    line 105

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Merge-risk assessment

This gate answers one question, and only this question: does a human need to be in the loop for this change?

It is not a second code review. It does not look for bugs — the reviewer already did that, and the security gate will do its own pass. Risk is orthogonal to correctness: a perfectly correct change to an authorization boundary is still high risk, and a sloppy typo fix is still low risk. Keep the two apart. A risk assessment that drifts into re-reviewing the code is a risk assessment nobody trusts.

Unlike the other gates, merge-risk is not a hireable role. It is a ritual — run it whether or not any particular role is staffed.

Step 1 — Resolve the change and its head sha

Read sous.config.yaml and backends/code/<configured code host>.md.

Call code.get_head_sha. The verdict is bound to this exact commit. A risk rating for an older commit is worthless: the diff it rated no longer exists.

Step 2 — Dispatch two independent raters

Dispatch both as separate subagents. Do not rate it yourself, and do not let one rater see the other's answer. The whole value is that two different lenses disagree; if they share context they converge, and you have paid for two opinions and received one.

Give each code.get_diff and code.list_files, and exactly one of these briefs:

Rater A — architecture and blast radius

Rate this change low, medium, or high risk based on what it touches and what depends on that, not on whether the code looks correct.

Escalate for: schema or data migrations; authentication, session, or authorization logic; anything that changes who can read or write what; shared code with many callers; public API or contract changes; anything that runs on every request or every startup; destructive or irreversible operations; changes to the gate or merge machinery itself.

Ask: if this is wrong, how much breaks, how loudly, and how fast can it be undone? A change that fails obviously and reverts cleanly is lower risk than a quiet one that corrupts data.

Rater B — change precision

Rate this change low, medium, or high risk based on how surgical the diff itself is.

Escalate for: large diffs; diffs that mix refactoring with behaviour change; changes with no accompanying tests; changes touching many unrelated files; deletions of code whose purpose is unclear; changes that brush authorization, credentials, or destructive operations even incidentally.

Ask: could a reviewer hold this entire change in their head at once? If not, that is itself risk, regardless of how good the code is.

Each rater returns a level and two or three sentences of reasoning. Nothing else.

Step 3 — Reconcile

The joint verdict is the more conservative of the two. A joint verdict is not a vote, and it is not an average. If A says low and B says high, the verdict is high.

This is deliberately asymmetric. The cost of over-escalating is that a human clicks merge on something safe. The cost of under-escalating is an unreviewed change reaching production. Those are not comparable, so do not treat them as if they are.

If the two raters disagree by two levels, say so explicitly in the comment — that gap is usually the most interesting thing in the assessment, and it is often where the real risk is hiding.

Step 4 — Post the verdict

Comment via code.comment with:

  • The verdict, and what it means: low means an agent may merge once the other gates pass; medium or high means a human must merge, regardless of what any other gate concludes.
  • Both raters' levels and reasoning, attributed, including any disagreement.

End with the marker, rendered per the backend's marker.write:

sous-gate: merge-risk-low sha=<head_sha>

using -low, -medium, or -high as decided.

Then apply labels per config: merge-risk:<level>, plus a blocking needs-human-merge:<level> label for medium and high.

Applicability

There is no not-applicable case for a code change. Every change has a risk level, including a trivial one — that is the point of rating it rather than assuming.

Documentation-only changes may be rated low without dispatching raters. Say that is what you did.

Rules

  • Never rate a change you implemented. Dispatch the raters.
  • Never round down. When genuinely torn between two levels, take the higher one and say why.
  • Never post a marker for a sha other than the current head.
  • Do not report bugs here. If a rater spots one, note it as an observation and say it belongs to the reviewer gate — then rate the risk anyway.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.