Skip to content

kliewerdaniel/orthos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 ORTHOS

A Locally Sovereign, Replayable, Graph-Executed Cognitive System

Intelligence emerges from traceable structural constraints, not generation

License: MIT TypeScript Node.js React npm

Installation β€’ Documentation β€’ Contributing


πŸ“‹ Overview

ORTHOS is a cognitive architecture that treats language models as fallible sensory organs rather than authorities. Intelligence emerges from traceable structural constraints that ensure every operation can be replayed, validated, and contradicted.

Core Principles

  • Traceability: Nothing exists unless it can be traced and replayed
  • Structural Intelligence: Intelligence emerges from constraints, not generation
  • Deterministic Execution: Same inputs always produce same outputs
  • Local Sovereignty: No external API dependencies for core functionality

πŸ—οΈ Architecture

ORTHOS is built in four progressive phases:

βœ… Phase I: Deterministic Cognitive Kernel

  • Typed node system with strict interfaces
  • Topological execution with complete trace recording
  • Zero external dependencies

βœ… Phase II: Claim & Validation Layer

  • Structured LLM outputs wrapped in Claim objects
  • Structural validation (consistency, redundancy, contradiction)
  • Confidence propagation without subjective scoring

βœ… Phase III: Reorganization Engine

  • Stress monitoring and dynamic graph mutation
  • System complexity reduction under pressure
  • Adaptive simplification when failing

βœ… Phase IV: Persona as Constraint

  • Personas define operational boundaries, not content generation
  • Local inference enforcement with ethical constraints
  • Dynamic persona switching capabilities

πŸš€ Quick Start

# Clone and setup
git clone <repository-url>
cd orthos

# Install dependencies
npm install

# Start backend development server
npm run dev

# In another terminal, start frontend
cd frontend && npm install && npm start

Visit http://localhost:3000 to access the web interface.

πŸ“¦ Installation

Prerequisites

  • Node.js β‰₯18.0.0
  • npm or pnpm

Backend Setup

npm install
npm run build
npm run dev

Frontend Setup

cd frontend
npm install
npm start

Production Build

# Backend
npm run build

# Frontend
cd frontend && npm run build

πŸ’» Usage

Web Interface

ORTHOS provides a comprehensive web interface with five main modules:

πŸ•ΈοΈ Graph Editor

Create and visualize cognitive graphs with typed nodes and directed edges.

🎭 Persona Manager

Select from constraint-based personas that define system boundaries:

  • Conservative Analyst: High evidence requirements, strict validation
  • Creative Assistant: Moderate constraints for creative tasks
  • Minimalist Processor: Resource-efficient with minimal complexity
  • Educational Guide: Pedagogical constraints with safety checks

⚑ Execution Interface

Execute cognitive graphs with JSON inputs and view deterministic outputs with complete execution traces.

πŸ” Trace Viewer

Explore Cognitive Trace Objects (CTOs) with timeline and graph visualization modes.

πŸ“Š Dashboard

Monitor system health, performance metrics, and stress indicators.

Programmatic Usage

import {
  CognitiveGraph,
  DeterministicExecutor,
  OrthosPersonaRegistry
} from 'orthos';

// Create a simple graph
const graph = new CognitiveGraph();
graph.addNode('input', new InputNode('input.v1'));
graph.addNode('process', new ArithmeticNode('add.v1', 'add'));
graph.addNode('output', new OutputNode('output.v1'));

// Execute with persona constraints
const registry = new OrthosPersonaRegistry();
registry.setActivePersona('conservative-analyst');

const executor = new DeterministicExecutor(graph);
const result = await executor.execute({ value: { a: 3, b: 2 } });

console.log(result.outputs); // { value: { a: 3, b: 2, result: 5 } }
console.log(result.trace);   // Complete execution trace

πŸ“š API Reference

Core Classes

Class Description
DeterministicExecutor Executes cognitive graphs with full trace recording
CognitiveGraph Typed directed graph of epistemic operators
OrthosPersonaRegistry Manages persona constraints and validation
CognitiveTraceObject Complete execution trace with inputs, outputs, confidence

Key Interfaces

interface CognitiveGraph {
  nodes: Map<string, Node>;
  edges: Edge[];
  entry_points: string[];
  exit_points: string[];
}

interface Persona {
  id: string;
  name: string;
  constraints: PersonaConstraints;
  local_inference_only: boolean;
}

interface CognitiveTraceObject {
  step: number;
  node: string;
  inputs: Record<string, any>;
  outputs: Record<string, any>;
  assumptions: string[];
  confidence: number;
  timestamp: string;
  parent_steps: number[];
}

πŸ”§ Development

Project Structure

orthos/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ kernel/          # Core execution engine
β”‚   β”œβ”€β”€ nodes/           # Node implementations
β”‚   β”œβ”€β”€ claims/          # Claim validation system
β”‚   β”œβ”€β”€ personas/        # Persona constraint system
β”‚   β”œβ”€β”€ trace/           # Trace recording & replay
β”‚   └── types/           # TypeScript definitions
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/       # React application pages
β”‚   β”‚   └── components/  # Reusable UI components
β”‚   └── public/          # Static assets
β”œβ”€β”€ tests/               # Comprehensive test suites
β”œβ”€β”€ examples/            # Usage examples
β”œβ”€β”€ docs/                # Detailed documentation
└── config/              # Configuration files

Development Commands

# Backend
npm run dev              # Development server with hot reload
npm run build           # Production build
npm run test            # Run test suites
npm run typecheck       # TypeScript validation

# Frontend
cd frontend
npm start               # React development server
npm run build          # Production build
npm test               # Component tests

Code Quality

  • Zero warnings in static analysis
  • 100% test coverage for kernel components
  • Comprehensive type annotations
  • Clear separation of concerns

🀝 Contributing

We welcome contributions that align with ORTHOS's architectural principles.

Development Guidelines

  1. Follow the implementation roadmap - phases must be completed sequentially
  2. Maintain determinism - all executions must be replayable
  3. Zero external dependencies for core functionality
  4. Comprehensive testing - every component needs full coverage
  5. Type safety - all code must be fully typed

Quality Gates

  • Each phase requires comprehensive testing before proceeding
  • Performance benchmarks must be maintained
  • Security audit required for production readiness

Prohibited Actions

  • Adding autonomy or "cleverness"
  • Breaking deterministic execution
  • Introducing external API dependencies in core paths
  • Adding subjective scoring or "reward models"

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

ORTHOS is built on principles of disciplined cognitive architecture, emphasizing epistemic rigor over computational power. The system survives pressure through simplification rather than complexity.

"Intelligence is not generation. Intelligence is constraint satisfaction under irreversible time."


Built with ❀️ for traceable, replayable cognition

πŸ“– Documentation β€’ πŸ§ͺ Examples β€’ πŸ› Issues β€’ πŸ’¬ Discussions

About

A Locally Sovereign, Replayable, Graph-Executed Cognitive System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages