A Locally Sovereign, Replayable, Graph-Executed Cognitive System
Intelligence emerges from traceable structural constraints, not generation
Installation β’ Documentation β’ Contributing
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.
- 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
ORTHOS is built in four progressive phases:
- Typed node system with strict interfaces
- Topological execution with complete trace recording
- Zero external dependencies
- Structured LLM outputs wrapped in Claim objects
- Structural validation (consistency, redundancy, contradiction)
- Confidence propagation without subjective scoring
- Stress monitoring and dynamic graph mutation
- System complexity reduction under pressure
- Adaptive simplification when failing
- Personas define operational boundaries, not content generation
- Local inference enforcement with ethical constraints
- Dynamic persona switching capabilities
# 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 startVisit http://localhost:3000 to access the web interface.
- Node.js β₯18.0.0
- npm or pnpm
npm install
npm run build
npm run devcd frontend
npm install
npm start# Backend
npm run build
# Frontend
cd frontend && npm run buildORTHOS provides a comprehensive web interface with five main modules:
Create and visualize cognitive graphs with typed nodes and directed edges.
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
Execute cognitive graphs with JSON inputs and view deterministic outputs with complete execution traces.
Explore Cognitive Trace Objects (CTOs) with timeline and graph visualization modes.
Monitor system health, performance metrics, and stress indicators.
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| 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 |
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[];
}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
# 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- Zero warnings in static analysis
- 100% test coverage for kernel components
- Comprehensive type annotations
- Clear separation of concerns
We welcome contributions that align with ORTHOS's architectural principles.
- Follow the implementation roadmap - phases must be completed sequentially
- Maintain determinism - all executions must be replayable
- Zero external dependencies for core functionality
- Comprehensive testing - every component needs full coverage
- Type safety - all code must be fully typed
- Each phase requires comprehensive testing before proceeding
- Performance benchmarks must be maintained
- Security audit required for production readiness
- Adding autonomy or "cleverness"
- Breaking deterministic execution
- Introducing external API dependencies in core paths
- Adding subjective scoring or "reward models"
This project is licensed under the MIT License - see the LICENSE file for details.
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