R-Think

Architecture

R-Think is built on a layered, model-independent architecture that separates protocol definition, state control, evidence governance, artifact persistence, and inspection.

Runtime Data Flow

An external consumer submits a mission to the Mission Runtime Coordinator. The coordinator delegates to the Cognitive State Machine, which advances the mission through canonical algorithm steps using the Artifact Registry and Evidence Graph. The Router selects methods and providers. Persistence and Replay record every event. The Inspector observes the read model without mutating runtime state.

data-flow.txt text
External Consumer
        ↓
Mission Runtime Coordinator
        ↓
State Machine · Artifact Registry · Evidence Graph
Router · Persistence · Replay
        ↓
Read-Only Inspector

Module Responsibilities

Each module has a single responsibility. They compose together to form complete reasoning systems:

  • Mission Runtime Coordinator — Orchestrates all runtime components. Manages mission lifecycle without executing business logic.
  • Cognitive State Machine — Controls cognitive and operational states, transition decisions, and reason codes.
  • Artifact Registry — Records artifacts, versions, provenance, and integrity metadata for every step.
  • Evidence Graph — Links source, observation, claim, evidence, decision, contradiction, and acceptance into a traversable graph.
  • Method and Provider Router — Selects capability or provider based on requirement, status, and rejection reason.
  • Persistence — Stores mission state and events in an append-only log.
  • Replay Engine — Reconstructs mission execution from persisted events for debugging and audit.
  • Inspector — Provides read-only access to mission timeline, evidence graph, artifacts, authority records, and replay.

Consumer Map

R-Think is consumed by multiple interfaces. The runtime does not depend on any single consumer:

  • SDK
  • AI Agent package
  • MCP Server
  • Inspector
  • VS Code Extension
  • CLI

Ownership Map

Ownership is explicit. The runtime owns state, transition, artifact, and evidence. Consumers own only the mission contract and external interfaces. Business logic never enters the runtime.

Event Flow

Every state transition, artifact creation, evidence update, and decision is emitted as an appended event. The event stream is the single source of truth for replay, inspection, and audit.

event.json json
{
  "eventId": "evt-001",
  "missionId": "mission-001",
  "step": "validate",
  "cognitiveState": "VALIDATING",
  "operationalState": "RUNNING",
  "artifact": { "type": "trace", "step": "validate", "output": { "passed": true } },
  "evidence": { "claimId": "claim-01", "evidenceId": "ev-01", "confidence": "high" },
  "timestamp": "2026-07-22T10:00:00Z",
  "reasonCode": null
}

Inspector Read Model

The Inspector queries a read model derived from the persisted event stream. It presents mission timeline, evidence graph, artifact versions, authority records, and system health. The Inspector never writes to runtime state and never mutates mission history.