Introduction
R-Think is a Cognitive Reasoning Runtime that transforms opaque AI outputs into an observable, challengeable, verifiable, and replayable reasoning process.
What is R-Think?
R-Think is neither an AI model, an LLM, nor an agent framework. It is a framework, protocol, and runtime layer that governs how a reasoning process observes real conditions, understands context, questions assumptions, validates claims, connects evidence, challenges decisions, discovers new understanding, and evolves in a controlled manner.
At its core, R-Think provides:
- A cognitive state machine that tracks observable, reasoning, challenge, and complete states.
- A protocol layer for structuring decision flows with explicit transitions.
- A contract system for defining validation rules and reason codes.
- An evidence graph that links source, observation, claim, evidence, decision, and acceptance.
- An artifact registry that persists reasoning traces and integrity metadata.
- An event store and replay engine for full mission replay.
Why R-Think?
Modern reasoning systems produce answers without leaving trustworthy traces. When a decision is challenged, the path from observation to conclusion is often invisible. Evidence is disconnected. History is overwritten on correction. Completion is asserted rather than validated.
This creates a structural trust gap. R-Think closes that gap by enforcing evidence-governed execution: every step in the cognitive cycle must produce an artifact or evidence that satisfies the requirements of the mission's risk level before the mission can transition to accepted.
How It Works
R-Think separates reasoning into governed layers. The Mission Runtime Coordinator orchestrates the cognitive process. The State Machine tracks cognitive and operational states. The Evidence Graph ensures every claim is backed by traceable evidence. The Artifact Registry preserves the full history. The Inspector provides read-only access for audit and replay.
import { Runtime, Protocol, Rule } from '@r-think/core';
const mission = Runtime.create({
id: 'first-mission',
protocol: Protocol.sequential,
rules: [Rule.required('observation')]
});
const result = await mission.execute({
observation: 'Input arrived from the source'
});
console.log(result.trace.id);
console.log(result.output);
console.log(result.validated); Documentation Structure
Concepts
Canonical algorithm, cognitive states, operational states, adaptive depth, loop rules, and authority boundaries.
Runtime
State machine, transition rules, artifact registry, evidence graph, router, persistence, replay, coordinator, inspector.
Protocol and Contracts
RTP message format, enums, interfaces, Zod schemas, JSON schemas, validation rules, and reason codes.
Architecture
Runtime data flow, module responsibilities, consumer map, ownership map, event flow, and inspector read model.
API Reference
Generated from exported public code. Complete interface and method reference.
Examples
Minimal missions, L0-L3 missions, artifact registration, evidence graph, router decisions, persistence, and inspector integration.