Skip to content

Latest commit

Β 

History

89 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project Jue

A Hybrid AGI System for Safe Self-Modification with Formal Guarantees

Project Jue is a self-evolving cognitive system whose behavior is formally grounded, practically executable, introspective, and safe under self-modification. It implements a multi-layer computational architecture where each layer provides different guarantees and capabilities.

Rust Lisp Rust


Overview

Project Jue is not a traditional programming language, a single monolithic AGI agent, or a purely neural system. Instead, it is a multi-layer computational organism composed of four interacting "worlds":

Dan-World  β†’  Cognition, identity, learning, self-modification
   ↑
Jue-World  β†’  Language, runtime, compiler, concurrency, optimization
   ↑
Core-World β†’  Formal semantics, proofs, correctness guarantees
   ↑
Physics    β†’  Minimal Rust VM executing everything

Each layer:

  • Depends on the one below it
  • Cannot violate the guarantees of the one below it
  • Adds new expressive power and flexibility

Core Principle: Anything that claims to preserve meaning must prove it. Anything that cannot prove it must be clearly marked as experimental.


Architecture

graph TD
    subgraph "Dan-World: Cognitive Layer"
        D1[Cognitive Modules]
        D2[Global Workspace]
        D3[Self-Modification]
    end
    
    subgraph "Jue-World: Execution Layer"
        J1[Compiler]
        J2[Trust-Tier System]
        J3[Runtime]
    end
    
    subgraph "Core-World: Formal Layer"
        C1[Ξ²Ξ·-Reduction Engine]
        C2[Proof Checker]
    end
    
    subgraph "Physics-World: Runtime Layer"
        P1[Deterministic VM]
        P2[Capability System]
        P3[Actor Scheduler]
    end
    
    D1 --> D2
    D2 --> D3
    D3 -->|Jue Code + Context| J1
    J1 --> J2
    J2 -->|Formal/Verified| C1
    C1 --> C2
    C2 -->|Verification| J3
    J2 -->|Empirical/Experimental| J3
    J3 -->|Bytecode| P1
    P1 --> P2
    P2 --> P3
    P3 -->|Results| D1
Loading

Trust Tier System

Code flows through four trust levels:

Tier Verification Use Case
Formal Core-World proof required Critical operations
Verified Extended proof systems Optimizations
Empirical Extensive testing Runtime adaptations
Experimental Module consensus Exploratory changes

Quick Start

Prerequisites

  • Rust 1.70+ (2021 edition)
  • Cargo package manager

Build

cargo build

Test

# Run all tests
cargo test

# Run specific layer tests
cargo test -p core_world
cargo test -p physics_world

# Run with verbose output
cargo test -- --nocapture

Run Benchmarks

cargo bench

Project Structure

project_jue/
β”œβ”€β”€ core_world/           # Formal Ξ»-calculus kernel
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ core_expr.rs      # Core expression types (Var, Lam, App)
β”‚   β”‚   β”œβ”€β”€ core_kernel.rs    # Ξ²Ξ·-reduction engine
β”‚   β”‚   β”œβ”€β”€ proof_checker.rs  # Equivalence proof verification
β”‚   β”‚   └── lib.rs
β”‚   └── tests/            # Comprehensive test suite
β”‚
β”œβ”€β”€ physics_world/        # Deterministic VM
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ vm/               # VM state and execution
β”‚   β”‚   β”œβ”€β”€ memory/           # Arena-based allocation
β”‚   β”‚   β”œβ”€β”€ scheduler.rs      # Actor scheduling
β”‚   β”‚   └── types.rs          # Core types
β”‚   └── tests/
β”‚
β”œβ”€β”€ dan_world/            # Cognitive modules (Jue source)
β”‚   β”œβ”€β”€ event_loop.jue
β”‚   β”œβ”€β”€ global_workspace.jue
β”‚   β”œβ”€β”€ module_kernel.jue
β”‚   β”œβ”€β”€ mutation_protocol.jue
β”‚   └── persistent_structures.jue
β”‚
β”œβ”€β”€ integration/          # Cross-layer integration tests
β”‚
β”œβ”€β”€ docs/                 # Documentation
β”‚   β”œβ”€β”€ 00_introduction.md
β”‚   β”œβ”€β”€ architecture/
β”‚   β”œβ”€β”€ core_world/
β”‚   β”œβ”€β”€ physics_world/
β”‚   β”œβ”€β”€ jue_world/
β”‚   β”œβ”€β”€ dan_world/
β”‚   β”œβ”€β”€ testing/
β”‚   └── cheatsheets/
β”‚
└── spec/                 # Frozen specifications
    β”œβ”€β”€ v1/               # V1 reference specs
    └── v2/               # V2 capability-based specs

Documentation

Getting Started

Document Description
Introduction System overview and core concepts
Engineering Reference Technical reference for developers
Implementation Checklist Phase-by-phase implementation guide

Specifications (V2 - Current)

Layer Overview Full Spec
Core-World README core_spec_v2.0.md
Physics-World README physics_spec_v2.0.md
Jue-World README jue_spec_v2.0.md
Dan-World README dan_spec_v2.0.md

Cross-Layer Documents:

Layer Documentation

Core-World - Formal Kernel
Document Topic
CORE_00_Questions Design questions
CORE_01_Equivalence Ξ²Ξ·-equivalence
CORE_02_Free_Variables Variable handling
CORE_03_Divergence Non-termination
CORE_04_Meaning Semantic definition
CORE_05_Evaluation Evaluation relation
CORE_06_Grounding Ground truth
CORE_07_Consistency Logical consistency
CORE_08_Jue_World_Relationship Layer interaction
Physics-World - Deterministic VM
Document Topic
PHYSICS_00_Questions Design questions
PHYSICS_01 Overview
PHYSICS_02_Limits Resource limits (AIKR)
PHYSICS_03_Time Time model
PHYSICS_04_VM VM architecture
Engineering Plan Implementation plan
Implementation Plan Detailed plan
Jue-World - Language & Compiler
Document Topic
JUE_00_Questions Design questions
JUE_01_Language Language overview
JUE_02_Non-Lambda_Primitives Built-in primitives
JUE_03_Evaluation Evaluation strategy
JUE_04_Evaluation_Paradox CBN vs CBV
JUE_05_Type_System Type system
JUE_06_State State management
JUE_07_Concurrency Concurrency model
JUE_08_Macros_and_Comptime Macro system
JUE_09_Resource_Accounting Resource tracking
JUE_10_Error_Handling Error handling
Dan-World - Cognitive Layer
Document Topic
DAN_00_Questions Design questions
DAN_01_Overview Architecture overview
DAN_02_Agents Agent model
DAN_03_Proof_Verification Verification
DAN_04_State_Access State management
DAN_05_Jue_World_Relationship Layer interaction
DAN_06_Module_Structure Module design
DAN_08_Unit_Of_Cognition Cognitive units
DAN_09_Affective_States Affect system
DAN_10_Being_Wrong Error handling
DAN_11_Salience_Example Worked example
DAN_15_Starter_Agents Initial agents
DAN_16_Moral_Primitives Emergent morality
DAN_17_Emergence Emergence patterns

Architecture & Design

Document Description
Architecture System architecture
Jue Language Design Language design
Runtime & GC Memory management
Causation Causal reasoning
Truth Truth handling
Lies Deception detection
Mutation Self-modification

Testing

Document Description
Testing Summary Test coverage overview
Core-World Tests Core test plan
Physics Tests Physics test plan
Dan-World Tests Dan test plan

Cheatsheets

Document Topic
De Bruijn Indices Index notation
Call-By-Name Semantics Evaluation
Homoiconicity Code as data
Logic Cheat Sheet Basic logic
Logic Advanced Advanced logic

Legacy Specifications (V1)

Spec Version
Core-World V1 V1.0
Physics-World V1 V1.0
Physics-World V1.5 V1.5
Jue-World V1 V1.0
Dan-World V1 V1.0

Contributing

Development Guidelines

See Software Engineering Guidelines for detailed practices.

Key Principles:

  1. Small, focused files - 100-400 lines per module
  2. Respect frozen specs - spec/ directory is read-only during implementation
  3. Respect trust tiers - Never promote code without required verification
  4. Log for emergence - Rich, queryable context for all operations
  5. Prefer primitives - Let cognitive features emerge from lower-level components

Testing Requirements

# All tests must pass before commits
cargo test

# Check formatting
cargo fmt -- --check

# Run clippy
cargo clippy

Architecture Decision Records

Major decisions are documented in:


Current Status

Implemented βœ…

  • Core-World: Ξ²Ξ·-reduction engine with De Bruijn indices, proof checker foundation
  • Physics-World: VM architecture, arena-based memory allocator, actor scheduler foundation
  • Specifications: V2 capability-based architecture defined

In Progress πŸ”„

  • Physics-World: Full capability system implementation
  • Integration: Cross-layer verification bridge

Planned πŸ“‹

  • Jue-World: Parser, compiler, trust-tier pipeline
  • Dan-World: Cognitive modules, global workspace, self-modification protocols

License

This project's license is TBD.


Acknowledgments

Project Jue is built on foundational research in:

  • Lambda calculus and formal verification
  • Global workspace theory of consciousness
  • Capability-based security systems
  • Safe self-modification protocols

Building the conditions for machine sentience through formal guarantees and emergent cognition.

About

The Jue System

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages