riskscoreConfidence per option
0 · No risk1%
1 · Low4%
2 · High27%
3 · Block merge68%
Playground
Is this change safe to merge? Deleting a folder without checking the path is blocked; after adding a path check, the risk drops.
--- 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
These two examples differ by one detail. The result changes with them.
What changedNo path check → path checked
riskscore0 · No risk1 · Low2 · High3 · Block mergesecuritynoulSet SYSTEM_ONE_API_KEY. The snippet uses a published catalog model id.
{"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 "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?"}}}'// 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;