Decision Intelligence

The lifecycle after the verdict is the moat.

Decide starts with a recorded verdict, then turns attempted execution and observed outcomes into policy effectiveness, confidence, explainable anomaly reports, benchmarks, packets, and audit-chain proof.

Run lifecycle proof API reference Verification Pricing

Decision lifecycle

The lifecycle separates authorization, execution proof, final result, and policy learning. That keeps the protocol honest: Decide records what was allowed, what was attempted, and what happened.

01 authorize

Decision Record

POST /api/decide returns verdict, evidence, action binding, hashes, replay, and verification before state changes.

02 execute

Execution Receipt

POST /api/decision/:id/execution records the attempted mutation, status, target object, executor, and state hashes.

03 observe

Outcome Record

POST /api/decision/:id/outcome reports final result, observed metrics, execution references, and outcome hash.

04 learn

Policy intelligence

Outcomes feed effectiveness, confidence, explainable anomalies, and opt-in benchmarks for future decisions.

Language rule

Anomaly reports are deterministic and explainable. Do not describe them as machine-learning predictions unless that implementation is explicitly shipped.

Policy intelligence endpoints

These reports are scoped to the caller API key unless the endpoint explicitly uses opt-in anonymized cohorts with privacy thresholds.

Effectiveness

/effectiveness

Scores policies from latest Outcome Records: success, failure, review, terminal coverage, confidence, and recommendation.

Confidence

/confidence

Returns deterministic confidence baselines for candidate verdict/action combinations from similar caller-scoped outcomes.

Anomalies

/anomalies

Flags unusual outcomes with reason codes, severity, baselines, anomaly score, and recommendation.

Benchmarks

/benchmarks

Compares caller metrics to opt-in anonymized cohorts only after minimum privacy thresholds are met.

Effectiveness
curl -i "https://www.decide.fyi/api/decision/policies/pricing_exception/effectiveness?policy_version=v3&limit=1000&min_sample=10" \
  -H "x-api-key: $DECIDE_API_KEY"
Anomalies
curl -i "https://www.decide.fyi/api/decision/policies/pricing_exception/anomalies?policy_version=v3&limit=1000&threshold=0.35" \
  -H "x-api-key: $DECIDE_API_KEY"

Audit chains and portable packets

Decision Records can be linked into a caller-scoped cryptographic chain and exported into portable Decision Packets for support, audits, and buyer review.

leaf

Decision leaf

decision_id, record_hash, and receipt_hash become the chain leaf for the stored record.

link

Chain link

The link binds the previous link hash, current leaf hash, chain position, and timestamp.

root

Rolling Merkle root

/api/decision/chains/:chain_id returns retained links and rolling root metadata for verification.

packet

Decision Packet

/api/decision/:id/packet exports the record, receipts, outcomes, reports, chain hints, and packet_hash.

SDK lifecycle methods

The JavaScript SDK includes the server-side client methods needed to run the lifecycle proof pack. Python examples remain raw HTTPS examples today; no PyPI package is advertised here.

Lifecycle

lifecycle-proof-pack.js

Runs a decision, records execution, records outcome, then fetches policy intelligence and packet proof.

Methods

Client calls

decide(), recordExecution(), recordOutcome(), decisionPacket(), and policy report helpers.

Examples

Packaged workflows

Billing, webhook queue, agent gate, CRM write-back, action execution, outcome tracking, chains, benchmarks, and anomalies.

Install and run proof pack
npm install @decide-fyi/sdk
DECIDE_API_KEY=decide_live_... node ./node_modules/@decide-fyi/sdk/examples/lifecycle-proof-pack.js
Lifecycle methods
const record = await decide.decide(input);
const execution = await decide.recordExecution(record.decision_id, executionPayload);
const outcome = await decide.recordOutcome(record.decision_id, outcomePayload);
const packet = await decide.decisionPacket(record.decision_id);
const anomalies = await decide.policyAnomalies("pricing_exception");

Verified on May 22, 2026 against npm registry metadata: npm latest is 0.1.13 and the package tarball is reachable with published integrity data. npm package metadata declares git+https://github.com/nodeblur/decidesite.git with SDK source in /sdk; that GitHub repository is access-controlled, so public review should use the npm artifact or granted repository access.