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.

Related articleAI Agent Stop Conditions: Decide \"Done\" with Yes/No Probabilities

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.6.0 @system-one-ai/transport-fetch@0.6.0 @system-one-ai/adapter-system-one@0.6.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;