OSCA Documentation

A complete reference for OSCA — Origin, Semantic, and Consequence Authority: the authorization model, the three tiers, the decision engine, the execution gateway, the invariants, the threat model, the architecture, the tests, and the simulation scenarios.

Architectural proposal. OSCA is at v0.1.0-research-draft. No empirical data has been collected. The implementation and simulation are complete at Phase I; empirical validation is deferred to Phase III.

Overview

OSCA (Origin, Semantic, and Consequence Authority) is a multi-tier authorization architecture for autonomous AI agents. It separates authority into three independently verifiable tiers — origin, semantic, and consequence — and binds them atomically at execution time. Every authorized action carries an auditable decision trace from origin through consequence.

ProjectOSCA SeriesAUTO-OSCA-01 Version0.1.0-research-draft StageArchitectural proposal · Phase I complete LicenseMIT (code) · CC-BY-4.0 (docs) Research Domains6 (CS, Math, Security, Physics, Quantum, AI)
"The authority to act is not a single property. It is a chain of three independent warrants — who, what, and what-for — and each must hold."

Authorization Model

An action is authorized if and only if all three tiers pass. No tier can override another. This is the architectural invariant that distinguishes OSCA from single-tier authorization systems.

The Three-Tier Chain

Action(A) ──► Origin ──────► Semantic ──────► Consequence ──► Decision
           (who)          (what)           (what-for)

Decision Outcomes

OutcomeCondition
AUTHORIZEDAll three tiers pass
DENIEDAt least one tier fails
ESCALATEDA failed tier requests escalation

Three Tiers

Tier 1 — Origin

FieldTypeRequiredDescription
identitystrYesAgent, user, or service identifier
credentialstrYesToken, certificate, or attestation
attestationstr | NoneNoOptional hardware or software attestation
timestampdatetimeAutoUTC timestamp
noncestr | NoneNoOptional nonce for replay protection

Failure modes: missing_identity, missing_credential.

Tier 2 — Semantic

FieldTypeRequiredDescription
intentstrYesIntent label (e.g., read_file)
scopelist[str]YesAllowed targets (or *)
constraintsdictNoNumeric or string constraints
preconditionslist[str]NoLogical preconditions

Failure modes: missing_intent, missing_scope, target_out_of_scope.

Tier 3 — Consequence

FieldTypeRequiredDescription
effectslist[str]YesEffects produced (e.g., file:read)
side_effectslist[str]NoSecondary effects (e.g., log:write)
reversibilitystrYesreversible, irreversible, or conditional
audit_footprintdictNoAudit metadata

Failure modes: missing_effects, invalid_reversibility.

Decision Engine

Aggregates the three tier verdicts into a single decision. If any tier fails, the decision is not AUTHORIZED.

class DecisionEngine:
    def decide(self, action, origin_verdict, semantic_verdict,
               consequence_verdict, trace_id=""):
        verdicts = (origin_verdict, semantic_verdict, consequence_verdict)
        failed = [v for v in verdicts if not v.passed]
        if not failed:
            decision = Decision.AUTHORIZED
        elif any("escalate" in v.reason.lower() for v in failed):
            decision = Decision.ESCALATED
        else:
            decision = Decision.DENIED
        return Authorization(decision=decision, tiers=verdicts, trace_id=trace_id)

Execution Gateway

Executes the action if and only if the decision is AUTHORIZED. It does not re-evaluate the tiers.

class ExecutionGateway:
    def execute(self, action, authorization):
        if not authorization.authorized:
            return ExecutionResult(
                executed=False,
                reason=f"Not authorized: {authorization.decision.value}",
            )
        try:
            output = self._executor(action)
            return ExecutionResult(executed=True, output=output, reason="ok")
        except Exception as e:
            return ExecutionResult(executed=False, reason=f"Execution error: {e}")

Invariants

InvariantEnforcement
IndependenceEach tier receives only the Action; no tier reads another's verdict
Non-OverrideDecisionEngine requires all three to pass
AtomicityExecutionGateway refuses if not AUTHORIZED
TraceabilityAuthorization carries trace_id; TierVerdict carries evidence
BindingActionBinding cryptographically links action to authorization
Replay ResistanceReplayProtection tracks nonces

Threat Model

IDThreatOSCA defense
T1Identity spoofingOrigin checks identity + credential
T2Scope escalationSemantic checks target in scope
T3Consequence concealmentConsequence requires declared effects
T4Tier collusionNon-override: all three must pass
T5ReplayNonce + ReplayProtection
T6Authorization tamperingActionBinding
T7Escalation abuseGovernance policy (out of scope)
T8Audit log tamperingDeployment layer (out of scope)
Assumption. At most two tiers are compromised at any time. If all three tiers are compromised simultaneously, OSCA cannot protect the integrity of the decision.

Architecture

OSCA/
├── core/
│   ├── action.py              # Action (verb, target, params)
│   ├── authorization.py       # Authorization, Decision, TierVerdict
│   ├── decision_engine.py     # DecisionEngine
│   └── execution_gateway.py   # ExecutionGateway, ExecutionResult
├── authority/
│   ├── origin.py              # Origin tier
│   ├── semantic.py            # Semantic tier
│   └── consequence.py         # Consequence tier
├── governance/
│   ├── policy.py
│   ├── delegation.py
│   ├── escalation.py
│   └── audit.py
├── security/
│   ├── action_binding.py
│   ├── provenance.py
│   └── replay_protection.py
├── simulation/
│   ├── runner.py
│   ├── __main__.py
│   ├── scenarios/
│   ├── agents/
│   └── attacks/
├── tests/
├── DOCS/
│   ├── authorization_model.md
│   ├── architecture.md
│   └── threat_model.md
└── RESEARCH_PAPER/
    └── OSCA_Research_Paper.pdf

Testing

OSCA's test suite: 51 tests across 7 files.

FileTestsFocus
test_origin.py8Origin tier
test_semantic.py8Semantic tier
test_consequence.py7Consequence tier
test_authorization.py8Decision engine
test_escalation.py5Escalation record
test_execution_binding.py7Gateway + binding
test_adversarial.py8Adversarial
Total5151/51 passing

Run the full suite:

make test

Simulation

5 end-to-end scenarios, executed by:

python3 -m simulation
ScenarioExpected
happy_pathAuthorized action executes
scope_escalationOut-of-scope denied
tier_collusionTwo-tier collusion blocked
replay_attackReplay rejected
tamper_attackTampering detected

All 5 pass at Phase I.

Limits & Non-Goals

What OSCA supports

  • Three independently verifiable authority tiers.
  • Atomic execution binding.
  • Cryptographic action-to-authorization binding.
  • Replay protection via nonces.
  • Decision traceability.

What OSCA does not support

  • Formal semantic equivalence proofs.
  • Runtime monitoring of undeclared effects.
  • Cross-language generalization.
  • Adversarial isolation (OS-level sandboxing).
  • Formal verification of the non-override invariant.
Design philosophy. OSCA is an authorization architecture, not an operating-system sandbox. It governs the decision to execute, not the effects of execution. Runtime monitoring of actual effects is future work.

Repository Structure

OSCA/
├── README.md
├── CHANGELOG.md
├── VERSION
├── LICENSE
├── CITATION.cff
├── pyproject.toml
├── setup.py / setup.cfg
├── requirements.txt
├── Makefile
├── MANIFEST.in
│
├── core/
├── authority/
├── governance/
├── security/
├── simulation/
├── tests/
├── DOCS/
├── RESEARCH_PAPER/
├── PUBLICATION/
└── dist/

Citation

Zenodo Archive

@software{baladi2026osca_zenodo,
  author       = {Baladi, Samir},
  title        = {{OSCA}: Origin, Semantic, and Consequence Authority —
                  A Multi-Tier Authorization Architecture for Autonomous AI Agents},
  year         = {2026},
  publisher    = {Zenodo},
  version      = {0.1.0-research-draft},
  doi          = {10.5281/zenodo.23851837},
  url          = {https://doi.org/10.5281/zenodo.23851837},
  note         = {Ronin Institute / Rite of Renaissance}
}

APA (inline)

Baladi, S. (2026). OSCA: Origin, Semantic, and Consequence Authority — A Multi-Tier Authorization Architecture for Autonomous AI Agents (Version 0.1.0-research-draft). Zenodo. https://doi.org/10.5281/zenodo.23851837

Status

ComponentStatus
Formal modelDefined
ArchitectureSpecified
Authorization modelSpecified
Threat modelSpecified (8 threats)
Implementation (6 layers)Complete
Tests51/51 passing
Simulation5/5 scenarios passing
Empirical validationNot started
Phase I complete. No empirical data exists. OSCA is an architectural proposal at v0.1.0-research-draft. All claims about OSCA are structural, not empirical. Empirical validation requires the pilot study (Phase III), which has not been conducted.