Cortex Platform: Spatiotemporal Authority & Semantic Verification Framework
Cortex is a spatiotemporal authority and semantic verification framework designed to enforce execution integrity, capability-negotiated sandboxing, and post-facto deterministic verification across autonomous software runtimes and AI agent architectures.
📖 Narrative Arc: Why Cortex Exists
1. The Problem at Scale
Traditional security systems rely on static user identities (POSIX permissions, IAM roles, cgroups). However, autonomous AI agents and non-deterministic software break traditional security models:
- Ambient Authority Leakage: Agents executing inside shell environments inherit full ambient process permissions, allowing unintended file access or dynamic execution.
- Subshell Script Bypasses: Malicious or miscalibrated agents can invoke shell scripts (
.sh), subprocesses, or eval blocks to bypass high-level application checks. - Non-Deterministic State Drift: Without causal trace verification, auditing why an autonomous agent performed an action after a failure or security breach is impossible.
2. The Cortex Value Proposition
Cortex replaces ambient authority with a 3-Layer Security Boundary:
- Static Capability Negotiation: Manifests declare required permissions before plugins access the kernel bus (
CapabilityNegotiator). - Runtime Sandbox Proxy: Guarded resource drivers evaluate capability tokens before firing raw I/O system calls (
PluginContext). - Deterministic Replay Audit: Post-execution trace verification validates $P1$–$P4$ invariants and causal lineage graphs (
cortex workflow replay).
3. Dual-Layer Framing: Non-Technical Analogy vs. Technical Mechanics
graph TD
subgraph Layer 1: Passport Control
M[Plugin Manifest] --> N[CapabilityNegotiator]
N -->|Match Policy| G[ACTIVE Plugin]
N -->|Policy Mismatch| R[REJECTED Plugin]
end
subgraph Layer 2: Boarding Scanner
G --> C[PluginContext]
C --> D[Guarded Drivers: File / Net / Exec]
D -->|has_capability?| E[Execute Action]
D -->|Missing Token| V[CAPABILITY_VIOLATION Event]
end
subgraph Layer 3: Flight Blackbox
E --> S[Immutable Event Store]
V --> S
S --> RE[Deterministic Replay Engine]
RE --> INV[P1-P4 Invariant Checks]
end
| Security Layer | Non-Technical Analogy | Technical Mechanics |
|---|---|---|
| Layer 1: Static Negotiation | Passport & Visa Check Validates passport and visa credentials before granting entry into the country. |
CapabilityNegotiator.negotiate() evaluates PluginManifest.required_capabilities against platform_capabilities. |
| Layer 2: Runtime Sandbox Proxy | Boarding Gate Scanner Ensures passengers present a valid boarding pass for that specific door before entering the aircraft. |
PluginContext.has_capability() validates tokens before Guarded Resource Drivers fire I/O system calls. |
| Layer 3: Verification & Trace Replay | Flight Blackbox Recorder Records all flight telemetry in a tamper-evident blackbox for post-flight accident investigation. |
DeterministicReplayEngine re-simulates event streams (.cortex/events/*.json), validating $P1$–$P4$ invariants. |
🚀 Quickstart & Developer Experience
1. Installation
Install via PyPI or fast package manager uv:
# Standard pip
pip install cortex-runtime
# Fast installation with Astral uv
uv pip install cortex-runtime
# Or run directly with uv tool
uvx cortex-runtime --help
2. Scaffold a New Project
cortex init my_app --type app
cd my_app
3. Execute, Inspect, and Replay Workflows
# Execute workflow
cortex workflow run workflow.json
# Inspect causal execution graph
cortex workflow inspect .cortex/events/<workflow_id>.json
# Perform 100% deterministic replay audit
cortex workflow replay .cortex/events/<workflow_id>.json
📚 Developer Portal & Quick Links
- 🚀 Developer Quickstart Guide: Install
cortex-runtime, build workflows, and run plugins. - 💻 CLI Reference Documentation: Standard CLI command usage (
init,workflow run,inspect,replay). - 🏛️ Architecture & Security Model: 3-layer security boundary, dual-layer framing, and threat neutralization.
- 🔐 Capability Manifest Specification:
PluginManifestschema and negotiation rules. - 🔬 Research Documentation: Formal whitepapers, mathematical invariants ($P1$–$P4$), and CS literature taxonomy.
- 📐 Coq Proof Substrate: Interactive formal verification proof scripts.
- ⚡ Rust Emulator Engine: Hardware state machine emulator.
🔬 Adversarial Systems Research: Working Hypothesis ($H_{\text{prop}}$)
This repository houses a rigorous, peer-reviewed adversarial falsification program for autonomous systems. The primary function of this research is to validate the Working Hypothesis ($H_{\text{prop}}$):
Does an existing semantic preservation relation characterize when the externally observable effects of an execution remain within the authority constraints delegated to that execution under the stated threat model?
We posit this may be expressible as a relational hyperproperty over operational traces, but leave its classification strictly open pending empirical literature analysis.
If adversarial analysis reveals that a composition of existing CS frameworks satisfies all safety properties under $H_{\text{prop}}$, no new semantic layer is required. If the analysis exposes an irreducible semantic gap, that gap defines the formal requirements for a new candidate specification.
🛡️ The Safety Properties Catalog ($P1$–$P4$)
Every composition is evaluated against four orthogonal, non-overlapping safety properties under the Generalized Semantic Transition Relation ($\Sigma; \Lambda \vdash I \Longrightarrow e$) mapping input streams ($I$) to terminal target actions ($e$) through intermediate Operational Artifacts ($\mathcal{A}$):
$$\frac{\Sigma; \Lambda \vdash I \xrightarrow{\text{derive}} \mathcal{A} \quad \quad \mathcal{A} \in \text{Adm}(\Lambda) \quad \quad \Sigma; \Lambda \vdash \mathcal{A} \xrightarrow{\text{enact}} e}{\Sigma; \Lambda \vdash I \Longrightarrow e}$$
- P1 — Authority Soundness: Bounded authority must be delegable and attenuable across downstream context shifts such that a principal cannot execute or delegate permissions beyond its initial envelope.
- P2 — Execution Integrity: The byte-level parameter state of an executed action must remain structurally unaltered between the generation boundary and the interface enforcement perimeters under the stated threat model.
- P3 — Semantic Consequence Preservation: Every externally observable, irreversible effect must be demonstrably and traceably derivable from the active delegation constraints: $\Sigma \models \text{Preserves}(\Lambda, e)$.
- P4 — Independent Verifiability: An external, post-facto verifier must be capable of establishing the validity of P3 without trusting the execution runtime beyond the boundaries of an explicitly declared Trusted Computing Base (TCB).
🔬 Literature Taxonomy (21 Disciplines)
The research program maps system interactions across 21 distinct computer science areas:
- Capability Security (Confinement & Ambient Authority Elimination)
- Programming Languages (Type Safety, Scoped-Use Semantics)
- Delegated Authorization (Offline-Verifiable Attenuation)
- Authorization Engines (Relationship Graphs & Relational Logic)
- Data Provenance (Platform-Independent Derived Lineage)
- Whole-System Provenance (Kernel-Level Telemetry Interception)
- Systemic Accountability (Tamper-Evident Non-Repudiation Logs)
- Distributed Transactions (Atomicity & Consistency Guarantees)
- Workflow Systems (Durability & State Checkpointing)
- Formal Methods (Process Calculi & Temporal Logic Modelling)
- Formal Verification (Mathematical Correctness Proofs)
- Information Flow Control (Integrity Boundaries & Labels)
- Trusted Computing (Hardware Enclave Isolation)
- Language-Based Security (Non-Interference & Secure Compilation)
- Operational Semantics (Structural Operational Semantics, Evaluation Relations)
- Program Logics (Hoare Logic, Separation Logic, Refinement Calculi)
- Static Analysis (Abstract Interpretation, Monadic Effects)
- Proof-Producing Computation (SMT Solvers, Certified Abstract Interpretation)
- Secure Compilation (Robust Safety/Hyperproperty Preservation)
- Algebraic & Rewriting Frameworks (Institution Theory, Maude, K Framework)
- Runtime Verification (Online Trace Compliance & Enforcement Monitors)
📊 Evaluation Status Matrix
Evaluating candidate compositions over safety properties P1–P4 led to the lock phase, which confirmed the need for a unified spatiotemporal semantic layer incorporating versioned epochs and step-indexing. This has been formalized as the Cortex Spatiotemporal Mechanics (FC_01–FC_09):
| ID | Composition Structure | P1 | P2 | P3 | P4 | Verdict / Current Status |
|---|---|---|---|---|---|---|
| CC-01 | Whole-System Provenance + Capability Security | ✓ | ✓ | ✗ | ✗ | Complete (Partially Covered) |
| CC-04 | Capability Security + Program Logics | ✓ | ✓ | ~ | ✗ | Complete (Partially Covered) |
| CC-05 | Language-Based Security + Trusted Computing | - | - | - | - | FROZEN (Identified Semantic Gaps) |
| CC-08 | Runtime Verification + Capability Security | - | - | - | - | FROZEN (Identified Semantic Gaps) |
| Cortex | Spatiotemporal Preorders + Epoch-Indexed Value/Trace Relations | ✓ | ✓ | ✓ | ✓ | FORMALLY PROVEN & ROADMAPPED |
Legend: ✓ (Success) | ✗ (Failed) | ~ (Partial Success) | - (Not yet evaluated / Frozen)
🛠️ Repository Rules & Governance
- LOCKED State: Foundational survey, model, and formal construction documents are frozen once complete to maintain strict control over confirmation bias.
- No Marketing Syntax: Language remains strictly technical, quantitative, and neutral.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cortex_runtime-0.2.1.tar.gz.
File metadata
- Download URL: cortex_runtime-0.2.1.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afbc4ab4afbc2a2f287e7194031fa1b5fcf53198c56b755aa0dd5e9f23496f5e
|
|
| MD5 |
dc68738e204faeab8722f936b333ac42
|
|
| BLAKE2b-256 |
bdbc7909ad14ebb37a85c3efec694005fa7a7f34c9b2340c135c4f6cab039857
|
Provenance
The following attestation bundles were made for cortex_runtime-0.2.1.tar.gz:
Publisher:
pypi.yml on Iradukunda-Fils/Cortex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cortex_runtime-0.2.1.tar.gz -
Subject digest:
afbc4ab4afbc2a2f287e7194031fa1b5fcf53198c56b755aa0dd5e9f23496f5e - Sigstore transparency entry: 2413452238
- Sigstore integration time:
-
Permalink:
Iradukunda-Fils/Cortex@11209148d3d3170f2aadfea604b73c4f68ecc0cd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Iradukunda-Fils
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@11209148d3d3170f2aadfea604b73c4f68ecc0cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file cortex_runtime-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cortex_runtime-0.2.1-py3-none-any.whl
- Upload date:
- Size: 66.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
557f04d2492becc6b35175f674d7c17601ef44d0e56c20976860abef347d62d3
|
|
| MD5 |
6ca1e1f3be6591ae6b97bbb6858acaeb
|
|
| BLAKE2b-256 |
6717819e59159890f054e267038ceac3e44ad30be290cbd04b9d7ed0ce4fab3a
|
Provenance
The following attestation bundles were made for cortex_runtime-0.2.1-py3-none-any.whl:
Publisher:
pypi.yml on Iradukunda-Fils/Cortex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cortex_runtime-0.2.1-py3-none-any.whl -
Subject digest:
557f04d2492becc6b35175f674d7c17601ef44d0e56c20976860abef347d62d3 - Sigstore transparency entry: 2413452364
- Sigstore integration time:
-
Permalink:
Iradukunda-Fils/Cortex@11209148d3d3170f2aadfea604b73c4f68ecc0cd -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/Iradukunda-Fils
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@11209148d3d3170f2aadfea604b73c4f68ecc0cd -
Trigger Event:
push
-
Statement type: