Skip to content

Playground

Is this change safe to merge?

Is this change safe to merge? Deleting a folder without checking the path is blocked; after adding a path check, the risk drops.

What this sample shows. A reviewer, human or agent, often needs a quick gate before a merge: how risky is this diff, and does it put data at risk? This sample asks both in one request. risk is a four-level score (No risk, Low, High, Block merge) and security is a yes/no question: "Does this change affect security or data safety?"

Sample input and result (sample data, not a live model run). The diff edits scripts/clean.sh, replacing rm -rf ./build/cache with a path read from config: DIR="$(read_config cache_dir)" then rm -rf "$DIR/". The context notes that cache_dir may be unset, in which case read_config returns an empty string, so the command becomes rm -rf "/". Result: Block merge, 68% (High 27%). Security probability: 0.86. Add one line, : "${DIR:?cache_dir is not set}", so an unset value fails the script instead of deleting the root. Result: Low, 63% (High 22%, No risk 12%). Security probability drops to 0.31.

How to use it. The output is a score and a probability, not a review comment, so it plugs straight into CI or an agent loop: block on a high "Block merge" probability, route mid-range scores to a human, and let the rest through. Set the thresholds with your own repository's history. The sample request uses Decider (decider-v1.1).

Frequently asked questions

Does it explain why a diff is risky?

No. It returns only a score and probabilities. Use a generative model if you need a written review.

Can I change the risk levels?

Yes. The levels live in criteria; you can rename them or change how many there are, within the range shown in each model's Model info.

Are these results from a live run?

No. The page shows sample data that doesn't change with the selected model. Sign in to score your own diffs.

Sample results do not change with the selected model.

Request

state
diff
--- a/scripts/clean.sh+++ b/scripts/clean.sh@@-rm -rf ./build/cache+DIR="$(read_config cache_dir)"+rm -rf "$DIR/"

cache_dir may be unset; read_config then returns an empty string

Results

Sample data
Compare two examples

These two examples differ by one detail. The result changes with them.

What changedNo path check → path checked

These results are sample data, not a live model run. Sign in to try them with your own content.
risk: 1 · Low → 3 · Block merge security: Confidence = 0.31 → Confidence = 0.86
riskscore
3 · Block merge
Confidence per option
0 · No risk
1%
1 · Low
4%
2 · High
27%
3 · Block merge
68%
securitynoul
Confidence = 0.86Confidence

Copy the code

Set SYSTEM_ONE_API_KEY. The snippet uses a published catalog model id.

Request JSON
application/json
{"model":"decider-v1.1","state":{"diff":"--- a/scripts/clean.sh\n+++ b/scripts/clean.sh\n@@\n-rm -rf ./build/cache\n+DIR=\"$(read_config cache_dir)\"\n+rm -rf \"$DIR/\"","context":"cache_dir may be unset; read_config then returns an empty string"},"questions":{"risk":{"type":"score","instructions":"Rate the merge risk of this diff.","criteria":["No risk","Low","High","Block merge"]},"security":{"type":"noul","instructions":"Does this change affect security or data safety?"}}}
cURL · POST /v1/systemone
sh
curl "https://system-one.dev/v1/systemone" \  -H "Authorization: Bearer $SYSTEM_ONE_API_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: saved-operation-id' \  --data '{"model":"decider-v1.1","state":{"diff":"--- a/scripts/clean.sh\n+++ b/scripts/clean.sh\n@@\n-rm -rf ./build/cache\n+DIR=\"$(read_config cache_dir)\"\n+rm -rf \"$DIR/\"","context":"cache_dir may be unset; read_config then returns an empty string"},"questions":{"risk":{"type":"score","instructions":"Rate the merge risk of this diff.","criteria":["No risk","Low","High","Block merge"]},"security":{"type":"noul","instructions":"Does this change affect security or data safety?"}}}'
TypeScript
TypeScript
// npm install @system-one-ai/core@0.8.0 @system-one-ai/adapter-system-one@0.7.0 @system-one-ai/transport-fetch@0.8.0import { createSystemOne, choice, score, booleanQuestion } from '@system-one-ai/core';import { systemOneAdapter } from '@system-one-ai/adapter-system-one';import { createFetchTransport } from '@system-one-ai/transport-fetch';const client = createSystemOne({  baseURL: "https://system-one.dev/v1",  apiKey: process.env.SYSTEM_ONE_API_KEY!,  model: "decider-v1.1",  adapter: systemOneAdapter,  transport: createFetchTransport(),  timeoutMs: 30_000,  maxRetries: 0,});const result = await client.evaluate({  state: {    "diff": "--- a/scripts/clean.sh\n+++ b/scripts/clean.sh\n@@\n-rm -rf ./build/cache\n+DIR=\"$(read_config cache_dir)\"\n+rm -rf \"$DIR/\"",    "context": "cache_dir may be unset; read_config then returns an empty string"  },  questions: {  risk: score("Rate the merge risk of this diff.", ["No risk", "Low", "High", "Block merge"]),  security: booleanQuestion("Does this change affect security or data safety?"),  },}, { headers: { 'Idempotency-Key': crypto.randomUUID() } });result.answers.risk.scoreresult.answers.security.probabilityresult.response.requestId;