Architecture

Mathematical Foundation

Formal specification, recursive self-improvement, multi-universe state management — the mathematical theory behind MARIA OS.

PLANNER × ARCHITECT — DUAL CORE

Dual Core ArchitectureTime Axis + Space Axis = System Integrity

Two central roles prevent distributed multi-agent collapse. Planner designs the temporal flow. Architect guards the structural frame. Both in tension prevent runaway.

Planner

Time Axis Designer

Decomposes missions into deterministic phases
Designs Decision Graph DG = (V, E)
Builds Execution Graph with dependencies
Assigns Human / Agent ratios per node
Defines Gate entry / exit conditions
Prevents scope drift with immutable specs

Architect

Space Axis Guardian

Universe→Galaxy→Planet→Zone→Agent integrity
Responsibility boundaries fixed at Zone level
Parallel conflict avoidance rules (Slice model)
DB-native audit trace enforcement
Skill registry governance and boundaries
Structural drift detection and rejection

Planner(time) × Architect(space) = Integrity(system)

Flow creator vs. Frame guardian. Their tension is the architecture.

Without Dual Core — 4 Failure Modes

1Goal mutation

Purpose changes mid-execution

2Responsibility dissolution

Ownership becomes ambiguous

3Parallel collision

Concurrent writes corrupt quality

4Manual-only improvement

Optimization cannot scale

Distributed without decay. Accelerated without collapse.

PLANNER — DECISION GRAPH ALGORITHM

Decision Graph ConstructionDG = (V, E) — 6-Step Deterministic Algorithm

Every mission is decomposed into a directed acyclic graph of Decision Nodes. No heuristic jumps. All tasks map to auditable nodes.

Algorithm Steps

1
Phase DecompositionSplit mission M by deliverable type and responsibility stage
M → {P₁, P₂, …, Pₙ}
2
Node GenerationExtract decision points per phase as typed nodes
∀Pᵢ : extract Vᵢ = {v | v requires judgment}
3
Edge ConstructionLink outputs to dependent inputs; separate concurrent writes
E = {(u,v) | outputs(u) ∩ inputs(v) ≠ ∅}
4
Gate AssignmentMap risk level to gate templates for entry and exit
risk(v) → (gate_entry(v), gate_exit(v))
5
Completion VerificationEnsure all leaf nodes have acceptance tests, all paths have gates
∀ path(root→leaf) : ∃ gate_exit on path
6
Scope Drift GuardNew requirements create new nodes, never mutate existing specs
Δreq → new V′ + diff Gate + propagate(E′)

Decision Node Schema

node_idUnique identifier
phaseLifecycle stage
owner_roleResponsible role
inputsRequired artifacts
outputsProduced artifacts
risk_levelRisk classification
gate_entryEntry conditions
gate_exitExit conditions
testsAcceptance criteria
allocationHuman/Agent ratio

Execution Flow

MissionPhasesNodesEdgesGatesDG

Deterministic decomposition. Auditable at every node.

ARCHITECT — PARALLEL CONFLICT AVOIDANCE

Parallel Without CollisionMathematical Conflict Avoidance Model

Conflict Definition

Artifact Slice Model
Conflict(i, j, t) = 1 iff WriteSeti(t) ∩ WriteSetj(t) ≠ ∅
Goal: ∀t, ∀i≠j : Conflict(i, j, t) = 0

Artifact S is split into minimal Slices. Conflict is zero when no two agents write the same slice simultaneously.

A

Slice Partition

Strongest

Divide artifact into disjoint slices. Each agent owns exactly one partition.

S = ⊔ Sᵢ , Agent i writes only Sᵢ

WriteSet_i ∩ WriteSet_j = ∅ by construction

B

Propose-Merge

Collaborative

Multiple agents propose changes. A single Merger integrates. Only Merger writes.

Agents → propose only , Merger → write

WriteSet limited to Merger ⇒ Conflict = 0

C

Lease Lock

Dynamic

Time-bounded exclusive write access per slice. Lease expires at Gate boundary.

write(i, s, t) = 1 iff holder(L(s), t) = i

Lease renewal forbidden across Gate boundaries

D

Fail-Closed

Fallback

When no concurrency pattern can guarantee safety, insert human arbitration.

¬(A ∨ B ∨ C) → Human Gate insertion

Responsibility never dissolves — it escalates

Automatic Selection Rule

Partition>Propose-Merge>Lease Lock>Fail-Closed

Strongest guarantee first. Human inserted only when no structural pattern suffices.

Parallel does not equal collision. Parallel = governed expansion.

HUMAN / AGENT ALLOCATION OPTIMIZATION

Quantified AutonomyRisk-Scored Human/Agent Ratio per Decision Node

Allocation Equation

H(v) = clamp( αR + βU + γI + δA − εC , 0, 1 )
G(v) = 1 − H(v)

H(v) = human ratio, G(v) = agent ratio. Risk scores drive allocation, not intuition.

Factor Weights

R(v)0.35RiskProbability of failure
U(v)0.25UncertaintyInformation incompleteness
I(v)0.25ImpactBlast radius on failure
A(v)0.20AuditCompliance criticality
C(v)-0.20ReversibilityUndo-ability (reduces H)

Graduated Autonomy via Gate Evidence

Hk(v) = H0(v) × exp(−λ · EQk(v))

k = iteration count through Gate

EQ = Evidence Quality score [0..1]

λ = learning coefficient (e.g. 1.0)

More evidence accumulated → human ratio decreases. But never to zero where Architect fixes responsibility.

Industry Allocation Profiles

FinanceRegulation and audit weight high
Start
70/30
Stable
40/60
GovernmentPublic accountability required
Start
60/40
Stable
35/65
ManufacturingSafety-gated, high automation ceiling
Start
50/50
Stable
20/80
EducationData privacy and pedagogical judgment
Start
65/35
Stable
45/55

Automation driven by risk scores. Not intuition — equations.

META RECURSIVE ENGINE

Self-Improving OS

Planner and Architect quality is measured and improved by meta-layer agents. Every improvement is evidence-backed and produces diffs, never rewrites.

Quality Metrics (per run)

CR
Completion Rate↑ maximize
completed_nodes / total_nodes
RR
Rework Rate↓ minimize
rework_tasks / total_tasks
SD
Scope Drift↓ minimize
scope_change_events / total_nodes
AD
Audit Deficit↓ minimize
missing_audit_fields / total_records
CC
Conflict Count↓ minimize
conflicts_detected / parallel_windows

Improvement Update Rule

ΔP = w1·∇CR − w2·∇RR − w3·∇SD − w4·∇AD − w5·∇CC

Rule-based diff patches grounded in Evidence. Not gradient descent — structured improvement proposals.

Meta Agents

Meta Planner

Evaluates plan completability, drift resistance, gate appropriateness, and evidence sufficiency. Outputs quality reports and plan patches.

Meta Architect

Detects boundary violations, write conflicts, audit trace gaps, and uncontrolled skill growth. Outputs structural patches and enforcement rules.

Diff Patch Patterns

1
Tighten GatesAdd evidence requirements to high-risk node entry/exit
2
Split NodesDecompose failing nodes to clarify responsibility boundaries
3
Introduce MergeConvert conflict zones to propose-merge pattern
4
Insert HumanRestore human approval at high-uncertainty nodes
5
Freeze SkillsLock successful skill combinations as reusable presets
ExecutePlanner + ArchitectEvidenceImmutable logsMeasureCR, RR, SD, AD, CCProposeDiff patchesApproveHuman gateApplyNext iterationLoop

Evidence-driven improvement. Diffs, not rewrites. Human-approved evolution.

FORMAL SPECIFICATION

The Governing EquationState Transition as Operator Composition

MARIA OS can be expressed as a single equation governing all state transitions.

Xt+1 = Et ∘ Gt ∘ Jt ( Xt )

World state at time t+1 equals the composition of Execution, Gate, and Judgment operators applied to current state

J_t

Judgment Operator

Parallel agents generate proposals and hypotheses

G_t

Gate Operator

Responsibility phase determines routing: permit, reject, approve

E_t

Execution Operator

ops@ or i@ acts on external world, leaves evidence

Xt
Current State
Jt
Judgment
Gt
Gate
Et
Execution
Xt+1
Next State

One equation. Three phases. Complete governance.

STATE TENSOR

Multi-Dimensional StateThe World as a 5-Axis Tensor

Every state in MARIA OS is addressed by five coordinates simultaneously.

Xt[p, s, a, k, r]

A non-zero entry means: this phase, this scope, this actor, this knowledge, this risk level — is active now

pPhase
judgmentresponsibilityexecution
sScope
galaxyuniverseplanetzone
aActor
agent_iops@i@
kKnowledge
skill_idpolicy_id
rRisk Tier
R1R2R3R4R5

Transition as Sparse Matrix Composition

Xt+1
=
( Et · Gt · Jt )
×
Xt

Each operator acts as a sparse linear or rule-based operator on the tensor

Five dimensions. Complete addressability.

PROJECTION OPERATOR

Responsibility as ProjectionWhy Parallel AI Converges to Single Execution

The Gate is not a filter. It is a mathematical projection that preserves accountability.

Ct = Jt(Xt)

Judgment generates candidate set

At = Πt(Ct)

Gate projects to allowed set

Xt+1 = Et(Ut)

Execution updates world state

01

Boundary Enforcement

Π_t zeros out candidates crossing responsibility boundaries

No proposal can bypass its designated authority level

02

Consistency Constraint

Π_t(C) ∈ 𝒞

Output always satisfies the consistency constraint set 𝒞

03

Singular Execution

U_t = argmin ℓ(u; policy, evidence)

Final execution collapses to exactly one action

c1
c2
c3
c4
c5
Many Candidates Ct
Πt
Projection
Single Ut
ops@
i@

Parallel intelligence. Singular responsibility.

STABILITY PROOF

Convergence requires a quantity that keeps decreasing

MARIA OS does not merely look stable in a demo. It defines a Lyapunov function over system deviation and uses gates to keep that quantity decreasing. Responsibility boundaries are not only about accountability; they are part of the stability proof.

01

Express deviation as state

ξ_t = x_t - x*

The system tracks how far execution has drifted from its intended equilibrium, not just whether tasks completed.

02

Construct an energy function

V(ξ_t) = ξ_t^T Q ξ_t

Deviation is compressed into one monotone quantity, so stability can be compared across phases and universes.

03

Use gates to force decay

ΔV = V_{t+1} - V_t < 0

Blocking unsafe candidates and respecting responsibility boundaries makes the loop lose energy every step.

System-Wide Decay Condition
ATQA - Q < 0

If the linearized loop still yields negative energy difference, the equilibrium is asymptotically stable.

In practice this means MARIA OS does not accept updates just because they improve a local metric. If the total governance energy does not decrease, the proposal does not pass. That is the mathematical meaning of the system's ability to stop.

Monotone Energy Decay
t0
1.00
t1
0.74
t2
0.53
t3
0.36
t4
0.22

Once unsafe candidates are blocked, loop drift enters a decay series instead of an amplification series.

Fail-closed behaves like damping

Unsafe proposals are stopped instead of averaged away, removing energy before instability propagates.

Industrial Loop converges by construction

Capital, Operation, Physical, and External phases may drift locally, but the global metric is driven back down.

Improvement must move toward a stable set

Recursive improvement is valid only when updates reduce instability, not when they merely increase capability.

Lyapunov stability rejects the vague idea that a system feels improved. It asks whether the update actually settles the loop. The next layer is game theory: why coupled agents move toward a fixed point instead of permanent conflict.

EXPERIMENTAL DEEP DIVE — MULTI-UNIVERSE

Multi-Universe State Architecture

Multiple Realities, Kept Separate.

Each Universe has its own state, observation, value function, and risk boundary. The world is one — but each Universe sees it through a different projection.

s(t) = (s1(t), s2(t), …, sN(t))

Direct product state

oi(t) = hi(x(t), ηi(t))

Universe-specific projection

Lij : Si × Sj → ℝk

Inter-universe links

Company

Enterprise boundary

revenue
margin
headcount
sioiVi

Market

Competitive landscape

share
elasticity
growth
sioiVi

Regulatory

Legal constraints

compliance
risk_score
audit
sioiVi

Customer

Demand signals

NPS
churn
LTV
sioiVi

Talent

Human capital

attrition
engagement
skill_gap
sioiVi
Universe Links— coherence checks, not integration
companymarketmetric_correlation
regulatorycompanyconstraint_bind
customermarketattribution
talentcompanypolicy_dependency

Observations auto. Policies proposal-only.

Integration destroys signal. Separation preserves truth.

EXPERIMENTAL DEEP DIVE — OBSERVATION TO BELIEF

Reality Signal Layer

Observe Automatically. Never Auto-Execute.

External signals flow into the OS but are never used for auto-execution. Beliefs update via Bayesian inference. Policy changes require human approval.

x(t) → oi(t) → beliefi(t)

Signal pipeline

bi(t+1) ∝ P(oi(t+1) | θi) · bi(t)

Bayesian belief update

External Signals
Revenue
+12.3%
Churn Rate
4.2%
Incident Rate
0.8/wk
NPS Score
72
Normalization Pipeline
Signalx(t)Normalizescale + lagAttributemap to nodeBeliefb_i(t+1)
Belief Panel — Hypotheses
H1

Pricing change drove revenue increase

0.78
H2

Support quality reduced churn

0.65
H3

Process change increased incidents

0.42
Gate

Human Approval Required

Belief update = automatic

Policy change = proposal only

belief update = automatic   |   policy change = proposal only

Belief updates are automatic. Policy changes require approval.

EXPERIMENTAL DEEP DIVE — GATE SCORE

Fail-Closed Gate Architecture

Worst-Case Gate. Machine-Readable Reasons.

The Gate evaluates an action candidate across all universes simultaneously. It uses max (worst case) — never average.

GateScore(a) = maxi φi(ri, ci, qi, rev, time)
BLOCK: ∃i : ci(a|si) > 0 ∨ ri(a|si) > ρi
Action Candidate
actionvendor_switch
scopeG1.U2.*
cost$240k
reversiblefalse
Universe Evaluation (maxi)
Finance
r=0.42ρ=0.60
evidence0.88
uncertainty0.15
Regulatory
r=0.78ρ=0.50
evidence0.61
uncertainty0.44
Operations
r=0.31ρ=0.70
evidence0.92
uncertainty0.09
HR & Culture
r=0.55ρ=0.55
evidence0.73
uncertainty0.28
GateResult
decision
PAUSE
top_universeregulatory
reason_codes
RISK_OVER_BUDGETregulatory
EVIDENCE_INCOMPLETEregulatory
UNCERTAINTY_HIGHhr
BLOCK
PAUSE
ALLOW

max preserves danger. Average hides it.

EXPERIMENTAL DEEP DIVE — CONFLICT TENSOR

Do Not Unify Contradictions. Surface Them.

Multi-Universe Conflict Detection

conflict_score0.78
01
K(a) = { sign(∂ui/∂a) }i

Contradiction tensor

Conflict(a) = Σi<j wij · max(0, −corr(Δui(a), Δuj(a)))

Weighted conflict score

Price Cut
score 0.72
Market Growth

price cutgrowth +0.30

vs
Regulatory

price cutcompliance risk +0.20

Headcount Reduction
score 0.85
Finance

headcount reductionmargin +0.15

vs
Talent

headcount reductionattrition +0.40

Recommended Actions

SPLIT_SCOPERUN_SANDBOXREQUEST_HUMAN_APPROVALGATHER_MORE_EVIDENCE

Contradictions are not bugs. They are the real structure of decisions.

Experimental Deep Dive — Dual Loop

Fast Loop Inside. Slow Loop Outside.

Dual-Loop Improvement Architecture

Fast Loop — Operational

Observe

s_i metrics

Evaluate

quality check

Adjust

local tweak

Deploy

auto apply

si → quality(si) → adjust(ai) → deploy   [auto]

Zone / agent level. Runs continuously. No human approval required.

Gate
Slow Loop — External Reality

Signal

x observed

Normalize

o_i mapped

Belief

belief_i

Propose

policy draft

Sandbox

isolated test

Approve

human gate

Update

commit

x → oi → beliefi → θi update → propose → sandbox → approve

Market / regulation / customer signals. Requires human approval gates before commit.

“Local improvement is automatic. Structural change requires verification.”

Local Improvement

Automatic

Structural Improvement

Verified

Principle Improvement

Governed

(order is fixed)

Speed inside. Caution outside. Never reversed.

EXPERIMENTAL DEEP DIVE — FINAL FORM

Judgment Infrastructure — The Final Form

Not a Stronger AI. An Unbreakable One.

X = (s1, …, sN) → Jt(φ) → Πt(maxi) → Conflict(a) → et → Learn(Π, φ, k, H) → Xt+1

Complete system: Multi-Universe state, worst-case gate, conflict detection, evidence-based learning

Responsibility Boundary
1

Multi-Universe Aware

Observes company, market, regulatory, customer, talent simultaneously without merging

2

Fail-Closed

Responsibility boundaries never dissolve, even at maximum autonomy

3

Contradiction Management

Does not resolve contradictions — manages them and surfaces to humans

4

Controlled Intelligence

Not omnipotent AI, but AI that cannot break

5

Judgment Infrastructure

From a tool that supports judgment to infrastructure that is judgment

Evolution Path

Tool

Assists decisions

Platform

Structures decisions

Infrastructure

Enables decisions

Judgment Layer

Is the decision layer

Multi-UniverseGate (max_i)ConflictDual LoopHuman Authority

The final form is not a stronger AI. It is an AI that cannot break.

Multi-Universe Fail-Closed Judgment OS