Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 23 additions & 107 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,118 +1,34 @@
<div align="center">
# Open CoT

<img src="./assets/open-cot-banner.png" alt="Open CoT banner" width="100%" />
Open CoT is **Cognitive Operations Theory**: a compact, schema-first standard for the boundary between cognition and execution.

### Schemas for Cognitive Artifacts, Capabilities, and Reconciliation
The model contributes a typed cognitive artifact. Runtime code validates, authorizes, executes endpoint capabilities, records observations, and reconciles final state. Reasoning remains important as evidence, but it is never authority.

**Open CoT** — an open standard for portable cognitive artifacts, capability snapshots, execution intent, observations, policy boundaries, receipts, and reconciliation results.
## Core RFCs

<img src="https://img.shields.io/badge/Project-Open%20CoT-5c6bc0?style=for-the-badge" alt="Open CoT" />
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue?style=for-the-badge" alt="License: MIT" /></a>
<a href="./docs/contributing.md"><img src="https://img.shields.io/badge/Contributions-Welcome-4caf50?style=for-the-badge" alt="Contributions welcome" /></a>
<a href="./schemas/rfc-0052-cognitive-artifact.json"><img src="https://img.shields.io/badge/Schema-JSON%20Draft-ff9800?style=for-the-badge" alt="JSON Schema" /></a>
The active RFC set is intentionally small and sequential:

</div>
1. Cognitive Artifact & Reasoning Evidence
2. Capability Snapshot & Endpoint Descriptor
3. Execution Intent & Endpoint Invocation
4. Policy Gate & Permission Evaluation
5. Observation, Receipt & Audit Evidence
6. Reconciliation Result & Error Taxonomy
7. Runtime Boundary & Cognitive Pipeline
8. Budget, Cost & Temporal Bounds
9. Requester Identity & Governance Context
10. Human Approval, Yield & Resume
11. Conformance, Registry & Compatibility Rules
12. Compact Context Serialization

---
Schemas are embedded in the RFC markdown and generated into `schemas/` with `python3 tools/sync_schemas_from_rfcs.py`.

## Why This Exists

Modern AI systems need a stable contract between fuzzy cognition and concrete capability. The model-like component can interpret, summarize, propose, and produce typed artifacts, but it must not own runtime authority or side effects.

Open CoT defines the portable interface layer for that boundary:

- what cognitive artifacts look like,
- how available capabilities are represented,
- how execution intent binds to an immutable capability snapshot,
- how policy, delegation, budget, and receipts are recorded,
- how observations and final reconciliation results are serialized.

Earlier runtime-governance language was useful while the project was searching for the right security shape. The standard is now moving toward a sharper inversion: **cognition emits structured artifacts; runtimes reconcile those artifacts against capability, policy, budget, and evidence**.

## The Core Insight

The LLM is not the runtime, orchestrator, or authority boundary. It is a non-deterministic cognitive function. A runtime can use its output only after validation and reconciliation.

**Cognition emits.** Schemas express. Capability snapshots bound what may be requested. Policy gates authorize or refuse. Runtimes execute through explicit endpoints. Observations, receipts, and reconciliation results prove what happened.

This makes Open CoT useful beyond any one framework. An implementation can use Restate, Temporal, a queue worker, a local process, MCP, HTTP, or a custom executor. The portable layer is the schema contract, not the implementation stack.

## What This Repo Contains

| Area | Role |
|------|------|
| [`rfcs/`](./rfcs/) | **53 RFCs** covering reasoning traces, tool invocation, governed execution, policy, delegation, receipts, capability manifests, cognitive artifacts, and reconciliation results |
| [`schemas/`](./schemas/) | Versioned JSON Schemas per RFC, including `registry.json` |
| [`harness/`](./harness/) | Reference TypeScript core package that exercises earlier governed execution RFCs |
| [`examples/`](./examples/) | Validated instance fixtures keyed by registry shortname |
| [`reference/python/`](./reference/python/) | Reference Python tooling |
| [`tools/`](./tools/) | Schema and fixture validation, registry sync, and RFC helpers |
| [`standards/`](./standards/) | Human-readable reasoning patterns and evaluation metrics |
| [`datasets/`](./datasets/) | Conventions and converters for training-ready data |
| [`benchmarks/`](./benchmarks/) | Tasks, scoring, leaderboards |
| [`conformance/`](./conformance/) | Conformance and interoperability material |
| [`docs/`](./docs/) | Architecture, philosophy, contributing, experiments, and launch notes |

For the current architecture framing, see [`docs/architecture.md`](./docs/architecture.md).

## Forward Spine

The newer reconciliation-oriented spine is:

- **RFC 0052** — cognitive artifacts, execution intent, observations, and immutable capability snapshots.
- **RFC 0053** — reconciliation result envelope and structured error taxonomy.
- **RFC 0049** — capability manifests, now a predecessor to more precise capability snapshots.
- **RFC 0041** — policy documents and policy gate semantics.
- **RFC 0047** — delegation requests, decisions, and authority receipts.
- **RFC 0048** — execution receipts and audit envelopes.
- **RFC 0051** — temporal semantics for validity, replay, and ordering.

Older RFCs still matter. RFC 0001, 0003, and 0007 define foundational reasoning, tool invocation, and governed execution concepts. The new RFCs clarify how those ideas become a portable schema layer for reconciliation runtimes.

## Design Principles

- **Typed artifacts over prompt contracts** — model output is structured input, not authority.
- **Capability snapshots over ambient tools** — cognition sees an explicit inventory and cannot invent endpoints.
- **Execution intent over direct execution** — proposed work is reconciled before side effects.
- **Policy gates over schema-only safety** — valid shape is not permission.
- **Observations and receipts over logs alone** — every side effect should leave replayable evidence.
- **Implementation neutrality** — Open CoT should not require Restate, MCP, Vercel AI SDK, Open Lagrange, or any specific runtime.
- **Spec gaps become RFC work** — if an implementation needs a general interface, it belongs here.

## Quick Start

Validate schemas and examples:

```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements-tools.txt
python tools/validate.py
```

Run the reference package:
## Validate

```bash
cd harness && npm install && npm test
python3 tools/sync_schemas_from_rfcs.py
python3 tools/validate.py
cd harness && npm test
```

## Open Lagrange Relationship

Open Lagrange is the opinionated TypeScript proving ground for this standard. It uses Restate for durable reconciliation, Zod for runtime boundaries, Vercel AI SDK for structured cognitive artifact generation, and MCP-shaped endpoints for side effects.

That implementation pressure-tests Open CoT. If Open Lagrange needs a portable structure, this repo should receive the RFC/schema update instead of letting a private dialect grow elsewhere.

## Current Status

- **53 RFCs** and a versioned JSON Schema registry.
- New draft schemas for cognitive artifacts and reconciliation results.
- Reference package coverage for governed execution, policy, delegation, receipts, budgets, and capability manifests.
- Cross-language validation tooling for schemas and examples.
- Experiment cards and local runbooks under [`docs/experiments/`](./docs/experiments/).

## Contributing

See [`docs/contributing.md`](./docs/contributing.md). Normative changes belong in RFCs first; implementations should follow the spec and feed gaps back into it.

## License

This project is licensed under the **MIT License**. See [`LICENSE`](./LICENSE).
Open Lagrange is the opinionated implementation proving this interface under durable execution, policy gates, endpoint execution, and reconciliation.
27 changes: 7 additions & 20 deletions conformance/fixtures/fixture_matrix.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
{
"version": "0.1.0",
"profiles": {
"A": [
"core": [
{
"shortname": "reasoning",
"path": "conformance/fixtures/profile_a/reasoning.json"
}
],
"B": [
{
"shortname": "reasoning",
"path": "conformance/fixtures/profile_b/reasoning.json"
"shortname": "cognitive_artifact",
"path": "conformance/fixtures/profile_core/cognitive_artifact.json"
},
{
"shortname": "tool_invocation",
"path": "conformance/fixtures/profile_b/tool_invocation.json"
"shortname": "capability_snapshot",
"path": "conformance/fixtures/profile_core/capability_snapshot.json"
},
{
"shortname": "verifier_output",
"path": "conformance/fixtures/profile_b/verifier_output.json"
}
],
"C": [
{
"shortname": "dataset_packaging",
"path": "conformance/fixtures/profile_c/manifest.json"
"shortname": "reconciliation_result",
"path": "conformance/fixtures/profile_core/reconciliation_result.json"
}
]
}
Expand Down
12 changes: 0 additions & 12 deletions conformance/fixtures/profile_a/reasoning.json

This file was deleted.

24 changes: 0 additions & 24 deletions conformance/fixtures/profile_b/reasoning.json

This file was deleted.

13 changes: 0 additions & 13 deletions conformance/fixtures/profile_b/tool_invocation.json

This file was deleted.

12 changes: 0 additions & 12 deletions conformance/fixtures/profile_b/verifier_output.json

This file was deleted.

26 changes: 0 additions & 26 deletions conformance/fixtures/profile_c/manifest.json

This file was deleted.

18 changes: 18 additions & 0 deletions conformance/fixtures/profile_core/capability_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"snapshot_id": "snapshot-1",
"created_at": "2026-04-27T15:00:00Z",
"capabilities_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"capabilities": [
{
"endpoint_id": "repo-status",
"capability_name": "status",
"description": "Read repository status.",
"input_schema": {
"type": "object"
},
"risk_level": "read",
"requires_approval": false,
"capability_digest": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
]
}
39 changes: 39 additions & 0 deletions conformance/fixtures/profile_core/cognitive_artifact.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"artifact_id": "artifact-1",
"schema_version": "open-cot.core.v1",
"capability_snapshot_id": "snapshot-1",
"intent_verification": {
"objective": "Summarize repository status.",
"request_boundaries": [
"read-only"
],
"allowed_scope": [
"inspect files"
],
"prohibited_scope": [
"write files"
]
},
"reasoning_trace": {
"evidence_mode": "audit_summary",
"summary": "The request is read-only and can use the repository status endpoint.",
"steps": [
{
"step_id": "r1",
"kind": "interpretation",
"content": "Classified as read-only inspection.",
"visibility": "audit_summary",
"confidence": 0.9
}
]
},
"assumptions": [
"Repository access is available."
],
"execution_intents": [],
"observations": [],
"uncertainty": {
"level": "low",
"explanation": "The requested operation is narrow."
}
}
Loading
Loading