Runtime-agnostic enforcement layer for AI coding agents
Project description
Cortex
Cortex is a runtime-agnostic enforcement layer for AI coding agents. It verifies completion claims through a deterministic stop path instead of trusting summaries, so "done" only lands when the evidence is real. Coding agents can sound finished before reality has caught up; Cortex turns that completion claim into something the system can prove or deny.
With Cortex, the path of least resistance becomes the path of best practice: the easiest way to finish is to do the work, satisfy the evidence boundary, and let the stop path close honestly.
The stop path is the product. Cortex is not a planning framework, generic memory layer, or workflow wrapper. It exists to make completion claims legible, checkable, and hard to bluff.
Runtime Status
| Runtime | Install profile | Status | Notes |
|---|---|---|---|
| Claude Code | cortex runtime install --profile claude |
Shipped | Strongest current runtime. The truthful boundary is live-proven; remaining caveats are minor. |
| Gemini CLI | cortex runtime install --profile gemini |
Shipped with watchlist | The truthful boundary is live-proven. One operational watchlist remains: blocked malformed stops can leave Gemini CLI resident until operator termination. |
| OpenAI Codex App Server (native) | cortex runtime install --profile openai |
Experimental | Honest native App Server surface: one turn, then stop audit. Several critical paths are proven, but positive strict close is still not dependable enough for broader support. |
| OpenAI Codex App Server (assisted) | cortex runtime install --profile openai-assisted |
Experimental | Explicit bounded assisted mode with a current committed shared-harness pair: Cortex provides session-start context with a short kernel-owned completion preview, one short evidence-expectation line, and one kernel-derived corrective turn. The lane remains supplemental-only, not native-substitutive proof. |
Status labels in this table:
Shipped: live-proven on the shared harness; remaining caveats are non-critical.Shipped with watchlist: live-proven, but one named runtime quirk still creates real operator risk.Experimental: several important paths are proven, but one boundary-critical guarantee remains unproven or unstable.
Detailed runtime release evidence lives in docs/ADAPTER_VALIDATION.md plus committed provenance under tests/fixtures/adapter_validation/claude/PROVENANCE.json, tests/fixtures/adapter_validation/gemini/PROVENANCE.json, and tests/fixtures/adapter_validation/openai/PROVENANCE.json.
Current product-proof truth: Cortex is strong on truthful completion boundaries, but the repo still does not earn a net-positive product claim over the raw model. Phase 9 is landed at a truthful-withheld endpoint rather than an earned product-proof win.
This repo state is also the final archival v1 reference point for the
enforcement-layer line. The archival package target is cortex-loop 0.1.0a2.
Quickstart
Default public install:
pipx install cortex-loop
cortex init
cortex runtime install --profile claude
Supported advanced alternative:
uv tool install cortex-loop
Before cortex check, choose the baseline that matches the repository or the
machine you are using:
- trusted local repo without Docker: add
pytestto the promoted tool surface (pipx inject cortex-loop pytestoruv tool install --with pytest cortex-loop) and switchcortex.tomlto the trusted-host baseline in docs/SECURE_DEFAULTS.md - untrusted or container baseline: keep the defaults and ensure Docker is on
PATH
Then run:
cortex check
Install, update, uninstall, and live proof details live in docs/INSTALL.md. Guided evaluator onboarding lives in docs/ALPHA_TESTER_ONBOARDING.md. Trust boundary and pack review posture live in docs/TRUST_BOUNDARY.md and docs/PACK_POLICY.md.
For a first evaluation, keep claude. Use gemini when you want the shipped
watchlist surface. Use openai only when you are explicitly evaluating the
experimental native surface. Use openai-assisted when you want the current
bounded assisted OpenAI lane: session-start context with a short kernel-owned
completion preview, one short evidence-expectation line, one kernel-derived
corrective turn aimed at the unresolved completion gap, and a current
shared-harness pair that still remains supplemental-only.
What Cortex Enforces
- Stop-claim normalization and strict payload handling (tests/test_stop_contract.py)
- Challenge coverage across active categories (tests/test_challenges.py)
- Invariant execution outside model output (tests/test_invariants.py)
- Deterministic verdict policy (tests/test_stop_policy.py)
- Session-scoped failure memory and retry controls (tests/test_retry.py, tests/test_graveyard.py)
What Cortex Is Not
- not a generic multi-agent framework
- not prompt theater that trusts summaries
- not a workflow layer whose main job is planning or project management
Read Next
Repository Boundaries
- Product-critical code lives in
cortex/,cortex_ops_cli/,cortex_repomap/, runtime profile templates, and core tests. - Extension manifests live in
packs/; this repo's pack validation suites live intests/packs/. eval/is internal and historical validation only. It is not a downstream product interface or product design authority.docs/archive/and_governance_archive/are historical context, not active authority.
v0.1 remains kernel-first: one hardened kernel, one reference pack, and runtime adapters with capture-backed tests.
Project details
Release history Release notifications | RSS feed
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_loop-0.1.0a2.tar.gz.
File metadata
- Download URL: cortex_loop-0.1.0a2.tar.gz
- Upload date:
- Size: 269.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13d5473b9fad71502979b1264362b9cac0b69311bd424f07f8987d15bcc4ae9f
|
|
| MD5 |
dddc8c36c03671943ead9a2752088a25
|
|
| BLAKE2b-256 |
32a8aa49f6d1a9f4f885f119e7b7b695d2594913fe4293e2ef3d93a697238258
|
Provenance
The following attestation bundles were made for cortex_loop-0.1.0a2.tar.gz:
Publisher:
publish.yml on cortex-loop/cortex-loop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cortex_loop-0.1.0a2.tar.gz -
Subject digest:
13d5473b9fad71502979b1264362b9cac0b69311bd424f07f8987d15bcc4ae9f - Sigstore transparency entry: 1109483827
- Sigstore integration time:
-
Permalink:
cortex-loop/cortex-loop@fb36e1f718d770c0f0e5dd9a15bac3156cd68daa -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/cortex-loop
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fb36e1f718d770c0f0e5dd9a15bac3156cd68daa -
Trigger Event:
push
-
Statement type:
File details
Details for the file cortex_loop-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: cortex_loop-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 142.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3083722de97e81ee2c6dde9272ab3571f4d67f0ec57846b16bd0e557f41f9cda
|
|
| MD5 |
f9f8800c9b64be1549e15cbd988e7b8d
|
|
| BLAKE2b-256 |
e46a05899af314a7fe7c7d2e6ab49bcd51508b0a93183471658920cf389dac37
|
Provenance
The following attestation bundles were made for cortex_loop-0.1.0a2-py3-none-any.whl:
Publisher:
publish.yml on cortex-loop/cortex-loop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cortex_loop-0.1.0a2-py3-none-any.whl -
Subject digest:
3083722de97e81ee2c6dde9272ab3571f4d67f0ec57846b16bd0e557f41f9cda - Sigstore transparency entry: 1109483848
- Sigstore integration time:
-
Permalink:
cortex-loop/cortex-loop@fb36e1f718d770c0f0e5dd9a15bac3156cd68daa -
Branch / Tag:
refs/tags/v0.1.0a2 - Owner: https://github.com/cortex-loop
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fb36e1f718d770c0f0e5dd9a15bac3156cd68daa -
Trigger Event:
push
-
Statement type: