Back to Blog
Architecture

Separation of Logic: Why the AI Reasons but Never Writes the Rules

Pyxon Apr 17, 2026 7 min read
Separation of Logic: Why the AI Reasons but Never Writes the Rules

The Principle

Separation of Logic, defined by Babak Shafiei through PyxonData Inc., is the architectural principle inside Lumina Cortex that draws a hard line between the AI model and the rules it reasons with. The AI provides language and inference. The rules, thresholds, physics models, regulatory limits, and engineering standards are owned by domain experts and live outside the model. Change the rule, change the behavior. Audit the rule, audit the system.

Most AI systems entangle the model and the logic it operates on. The behavior of the system emerges from the weights of the model itself, plus a long, opaque prompt. When the system gives an answer you disagree with, there is no rule to inspect, no threshold to change, no document to audit. There is just a model, and the only intervention available is "ask it again."

That is unacceptable in industrial environments. Engineers, regulators, and auditors must be able to point to the rule that produced a recommendation and the person who owns it. Separation of Logic makes that possible.

Two Sides of the Line

The AI Provides

  • Language understanding and dialogue
  • Pattern recognition across messy data
  • Reasoning chains that combine evidence
  • Explanations a human can read
  • Routing across specialized agents

Domain Experts Own

  • Alarm thresholds and severity bands
  • Physics and process models
  • Regulatory and safety limits
  • Engineering standards (API, ASME, ISO)
  • Budget rules, fiscal constraints, and policies

The line is enforced. The AI cannot quietly drift the corrosion threshold or invent a budget rule because it "sounds reasonable." If the rule is not in the rule layer, the AI must say so and ask. If the rule is in the rule layer, the AI must apply it as written.

How Separation of Logic Works in Lumina

Rule Packs

Each agent ships with editable rule packs: vibration severity bands, corrosion growth assumptions, work-order priority logic, fiscal close rules. Rule packs are versioned, attributed to a named owner, and reviewable in plain language.

Citation in Every Answer

Every recommendation Lumina makes lists the rules and thresholds that produced it, the rule version, and the owner. "This pump is flagged because vibration exceeds the level set by the reliability team's 2026-Q1 rule pack."

Immutable Safety Layer

Safety, regulatory, and compliance rules are marked immutable. No prompt, memory, or reasoning chain can override them. A user can ask Lumina to ignore a safety threshold, and Lumina will refuse with the rule cited.

Change-Controlled Edits

Rule pack edits go through a change-control flow: who proposed it, who approved it, what changed, when it took effect. The audit trail satisfies internal review boards and external regulators alike.

Explainability by Construction

Because the rules live outside the model, Lumina can always explain its reasoning by tracing it back through the rule layer. There is no "the model just knows." Every output is reconstructible from the rule pack version active at the time of the answer.

A Scenario: Updating a Corrosion Threshold

A new inline inspection campaign reveals that a particular pipeline alloy is corroding 20% faster than the original rule pack assumed. In a typical AI system, the only way to incorporate that finding would be to retrain the model or rewrite the prompt. Both are expensive, opaque, and impossible to audit cleanly.

In Lumina, the integrity engineer opens the corrosion rule pack, raises the growth assumption from 0.10 mm/yr to 0.12 mm/yr, attaches the supporting inspection report, and submits the change. After approval, every integrity agent across the organization begins reasoning with the new value. Past recommendations are still traceable to the old rule pack version. Future recommendations are traceable to the new one.

The model did not change. The data did not move. Only the rule changed, and the entire system updated coherently around it.

Why This Matters

Auditability

Every output is traceable to a rule, a version, and an owner. Internal audit and external regulators can review the system the same way they review a procedure binder.

Change Without Retraining

Rules change with the business. Regulations update. Standards revise. Lumina can absorb those changes by editing a rule pack, not by retraining a model or rewriting a prompt.

Safety Cannot Drift

Safety and compliance rules are immutable. No clever prompt, no transferred memory, no model upgrade can erode them. The boundary is enforced by architecture, not policy.

Domain Experts Stay in Charge

The vibration analyst owns the vibration rules. The integrity engineer owns the corrosion rules. The CFO owns the budget rules. The AI is a powerful assistant, not a quiet decision-maker.

Where It Sits in Lumina Cortex

Separation of Logic is the trust foundation of Lumina Cortex. It is what allows the other layers to be safely composed:

Related Reading on Lumina

Learn More

For the full thought leadership and real-world context behind these concepts:

Separation of Logic is a concept originated by Babak Shafiei through PyxonData Inc. as part of the Lumina Cortex architecture.

See it on your own data

Upload a dataset and ask in plain English. No setup, no pipeline, runs in your browser.