Core AI Decision Engine • Powered by Cloudflare Workers AI

System 1 Intuition for Modern Laravel Apps.

Replace open-ended conversational generation and fragile JSON prompts with typed decision primitives (Noul, Choice, Score). Evaluated in sub-seconds at the edge against arbitrary application states.

$ composer require obelaw/systemone obelaw/systemone-clef
SecurityDecisionPipeline.php
@cf/cloudflare/clef
use Obelaw\SystemOne\Facades\SystemOne;
use Obelaw\SystemOne\Primitives\Noul;
use Obelaw\SystemOne\Primitives\Choice;
use Obelaw\SystemOne\Primitives\Score;

// 1. Pass arbitrary application state (string, array, or Eloquent model)
$response = SystemOne::state('Customer logged in from 3 distinct countries in 10 minutes with 2 failed MFA attempts.')
    // 2. Query typed decision primitives simultaneously
    ->ask('is_anomaly', Noul::make('Is this login pattern suspicious?'))
    ->ask('action', Choice::make('Recommended mitigation', [
        'allow'     => 'Allow session silently',
        'challenge' => 'Send push notification MFA',
        'block'     => 'Block session and freeze access',
    ]))
    ->ask('severity', Score::rubric('Escalation tier', ['Low', 'Medium', 'High', 'Critical']))
    ->run();

// 3. Consume calibrated probabilities in milliseconds
if ($response->isPositive('is_anomaly', 0.85)) {
    $action     = $response->value('action');     // "challenge"
    $confidence = $response->confidence('action'); // 0.94
    $severity   = $response->value('severity');   // 3.8 / 4.0
}
Cloudflare Workers AI Roundtrip: 68ms Zero GPU instances • Edge Inference
<100ms
Edge Latency
3
Typed Primitives
0
Hallucinations
100%
Offline Testable
Typed Mathematics

The Three Decision Primitives

Every business decision boils down to likelihood, categorization, or rating. SystemOne encapsulates these into three formal primitives.

Binary Likelihood

Noul

Evaluates affirmative/negative statements and computes a calibrated Bernoulli probability between 0.0 and 1.0.

Noul::make('Is transaction fraud?')
  • Calibrated probability float
  • isPositive(threshold) checks
  • Anomaly, fraud & compliance flags
Categorical Routing

Choice

Resolves decisions across distinct options with criteria rubrics. Emits top pick, confidence, and complete probability distributions.

Choice::make('Route', ['billing', 'tech'])
  • Associative criteria rubrics
  • Full probability distribution
  • Ticket triage & plan recommendations
Bounded Ratings

Score

Computes continuous scores across bounded numerical boundaries or maps state against ordered rubric scales.

Score::range('Risk 1-10', 1, 10)
  • Numerical ranges (min / max)
  • Ordered rubrics (Low → Critical)
  • Lead scoring & priority indexing
Architectural Contrast

The Paradigm Shift

Why transactional software architectures need structured decision primitives instead of conversational chat prompts.

Fragile Pattern

Conversational Prompting

  • Hallucinations & drift: Invented values and unsupported keys when edge cases occur.
  • JSON Parsing Failures: Unexpected markdown backticks, conversational preambles, or broken syntax break deserializers.
  • Heavy Latency: Autoregressively generating 250 tokens takes 1,200ms to 3,500ms per request.
  • Costly Token Waste: Hundreds of tokens spent on repetitive prompt framing and JSON formatting instructions.
SystemOne Pattern

Typed Decision Primitives

  • Strict Schema Guarantees: Primitives return mathematical types: float likelihoods, bounded scores, or enumerated keys.
  • Calibrated Distributions: Full softmax probability outputs reveal model confidence on every choice.
  • Sub-100ms Edge Speed: Edge routing executes decision evaluations close to users in milliseconds.
  • Atomic Multi-Questions: Evaluate 10 distinct questions concurrently in a single network round-trip.
Edge Infrastructure

Inference at the Edge with Cloudflare Workers AI

The obelaw/systemone-clef adapter routes decisions directly to Cloudflare’s global edge network. Zero GPU instance provisioning, zero cluster autoscaling, and zero cold starts.

300+ Global Data Centers

Requests route to the closest geographical data center, eliminating long haul API lag.

Dual Model Architecture

Switch seamlessly between @cf/cloudflare/clef (deep reasoning) and clef-flash (ultra low-latency).

Predictable Edge Pricing

Fractions of a cent per decision evaluation with zero idle GPU infrastructure costs.

Read Clef Driver Setup Guide
Cloudflare Edge Benchmark Live Simulation
DNS + TLS Handshake 12ms
Edge Worker Cold Start 0ms (Zero)
Inference (@cf/cloudflare/clef) 54ms
JSON Parsing & Hydration 2ms
Total Execution Time 68ms
Production Implementations

Real-World Use Cases

From checkout fraud to customer support triage, SystemOne drives mission-critical decision logic across applications.

Transaction & Fraud Shield

Evaluate high-velocity transactions, IP mismatches, and purchase sizes in real-time. Block compromised cards and challenge suspicious checkouts without interrupting legitimate users.

Noul::make('Is this payment transaction fraudulent?')

Automated Ticket Routing & Triage

Classify incoming customer inquiries across departments (billing, technical, sales) and compute urgency rubric scores (Low to Critical) before an agent even opens the inbox.

Choice::make('Department', [...]) + Score::rubric('Urgency', [...])

Inbound Lead ICP Qualification

Score demo requests and signups instantly based on company size, job title, and message intent to route high-value accounts directly to enterprise account executives.

Score::range('ICP Fit Score 1-10', 1, 10)

Dynamic Workflow Approval Gates

Auto-approve expense reports, warranty returns, and refund requests that fall within safe compliance bounds, while flagging borderline items for human review.

response->isPositive('auto_approve_eligible')
Answers & Details

Frequently Asked Questions

Everything you need to know about Obelaw SystemOne architecture and usage.

What is Obelaw SystemOne?

SystemOne is the modular Core Decision Engine for the Obelaw AI ecosystem. Inspired by behavioral psychology (System 1 fast, intuitive thinking), it replaces unpredictable conversational LLM prompts with typed decision primitives evaluated deterministically against application state.

How is SystemOne different from standard LLM prompts?

Standard LLMs output unstructured text or loose JSON with high latency, hallucinations, and non-deterministic schemas. SystemOne evaluates structured primitives (Noul for binary likelihoods, Choice for categorical routing, Score for bounded rubrics) that produce calibrated probability distributions and reliable, typed values in milliseconds.

What are the three decision primitives?

SystemOne ships with three core primitives: 1) Noul (Bernoulli/binary likelihood questions returning a 0.0-1.0 probability); 2) Choice (categorical classification with criteria rubrics returning top pick, confidence, and probability distribution); and 3) Score (bounded numeric ranges or ordered rubric tiers like Low, Medium, High, Critical).

What AI models power SystemOne?

SystemOne is driver-agnostic. Out-of-the-box, it integrates with Cloudflare Workers AI via the obelaw/systemone-clef driver (@cf/cloudflare/clef and @cf/cloudflare/clef-flash) for ultra-low latency edge inference without managing GPU infrastructure. You can also implement custom drivers for local models (Ollama) or external APIs.

Can I run multiple decision questions in a single request?

Yes. You can chain as many primitives as needed using ->ask('key', $primitive) or ->questions([...]). All questions evaluate concurrently in a single round-trip against the same context state.

How do I test SystemOne decisions in my Laravel test suite?

Because SystemOne drivers implement DriverInterface, you can test with zero token costs and zero latency using Laravel's native Http::fake() or by extending SystemOne with in-memory mock drivers in Pest and PHPUnit.

Ready to Make Edge AI Decisions in Laravel?

Install Obelaw SystemOne today and build robust, deterministic decision logic with sub-100ms edge speed.