ICore Developer SDK

Build constitutional software with the ICore platform. Write once, run anywhere โ€” from browser WASM to native CLI.

๐Ÿ“˜ What is ICore?

ICore is a constitutional computing platform. It provides a substrate for building software that is verifiable, auditable, and trust-preserving. The SDK gives you access to all ICore capabilities through a clean, Rust-native API.

Platform Components

โš™๏ธ UCK Kernel

Core operations: execute, communicate, persist, verify

๐Ÿ“˜ SDK

Developer-friendly API over UCK

๐Ÿค– Agents

Autonomous constitutional agents

๐Ÿ“ฆ UMS

Publish and install packages

๐Ÿ”— TrustChain

Cryptographic trust and attestation

๐Ÿ”ฌ CITS

355 conformance invariants

Supported Runtimes

RuntimeStatusUse Case
Rust (native)StableFull platform, CLI tools, servers
WebAssemblyStableBrowser, UCF Engineering
JavaScript/WASMSupportedBrowser apps, PWAs
ZigPlannedBinary tools, embedded

Quick Start

Get up and running with ICore in 3 minutes.

1

Add ICore to your project

TOML
[dependencies]
uck = { path = "../UCK" }
constitutional-sdk = { path = "../constitutional-sdk" }
2

Build and execute

Rust
use constitutional_sdk::{KernelBuilder, ReceiptExt};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Build the kernel
    let kernel = KernelBuilder::new()
        .epoch(1722086400)
        .build();

    // Execute an operation
    let receipt = kernel.execute(
        "my-component",
        uck::ExecutionMode::Deterministic,
        "hello-constitutional-world",
    )?;

    // Print the receipt
    println!("Operation: {}", receipt.base.operation_id);
    println!("Hash: {}", receipt.base.hash);
    println!("Verified: {}", kernel.verify(&receipt)?);

    Ok(())
}
3

Run it

Shell
$ cargo run
Operation: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Hash: 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0...
Verified: true
โœ“ That's it!

You've executed a constitutional operation with cryptographic verification. Every operation produces a receipt that can be independently verified.

Installation

From Source (Recommended)

Shell
# Clone the ICore repository
git clone https://ucf.initialcore.net/icore/icore-gate-kernel
cd icore-gate-kernel

# Build all crates
cargo build --release

# Run the test suite (289+ tests)
cargo test --all

As a Dependency

TOML
[dependencies]
# Core kernel
uck = { path = "../UCK" }

# SDK (recommended for most users)
constitutional-sdk = { path = "../constitutional-sdk" }

# Individual components
ucn = { path = "../UCN" }          # Network
ucd = { path = "../UCD" }          # Data
trust-chain = { path = "../TrustChain" }  # Trust
corefab = { path = "../USR-CoreFab" }    # Execution

WebAssembly

Shell
# Install wasm-pack
cargo install wasm-pack

# Build the UCF WASM core
cd ucf-core
wasm-pack build --target web --release

# Output: pkg/ucf_core_bg.wasm (183KB)
System Requirements

Rust 1.70+, Cargo, wasm-pack (for WASM). No external services required โ€” ICore is fully sovereign.

Architecture

ICore follows a layered architecture with constitutional invariants at every level.

Diagram
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Applications                    โ”‚
โ”‚         (Agents, Tools, PWAs, CLI)              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              Constitutional SDK                  โ”‚
โ”‚    KernelBuilder ยท ConstitutionalAgent ยท         โ”‚
โ”‚    ReceiptExt ยท FlowReceipts                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚            Universal Constitutional Kernel        โ”‚
โ”‚    execute() ยท communicate() ยท persist() ยท       โ”‚
โ”‚    verify()                                      โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  UCN     โ”‚  UCD     โ”‚ TrustChain โ”‚ CoreFab      โ”‚
โ”‚ Network  โ”‚ Data     โ”‚ Trust      โ”‚ Execution    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚            Constitutional Substrate               โ”‚
โ”‚    Content-addressing ยท Ed25519 ยท SHA-256        โ”‚
โ”‚    Receipt chains ยท Epochs ยท Determinism         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Design Principles

  • Constitutional ordering: Define โ†’ Implement โ†’ Validate โ†’ Publish
  • Content-addressing: All data is identified by SHA-256 hash
  • Tamper-evidence: Every operation produces a verifiable receipt
  • Determinism: Same input โ†’ same output, always
  • Sovereignty: No external services, no servers, no dependencies

UCK Kernel API

The Universal Constitutional Kernel provides four core operations.

execute()

Execute a constitutional operation and produce a receipt.

ParameterTypeDescription
component&strComponent identifier
modeExecutionModeDeterministic or NonDeterministic
operation&strOperation description

Returns: Result<Receipt>

communicate()

Send data between constitutional components.

ParameterTypeDescription
source&strSource component
target&strTarget component
payload&strData payload
epochu64Current epoch

Returns: Result<FlowReceipts>

persist()

Store data with content-addressed integrity.

ParameterTypeDescription
key&strStorage key
data&[u8]Data to store
epochu64Current epoch

Returns: Result<Receipt>

verify()

Verify the integrity of a receipt.

ParameterTypeDescription
receipt&ReceiptReceipt to verify

Returns: Result<bool>

SDK API Reference

KernelBuilder

Ergonomic constructor for the Constitutional Kernel.

Rust
let kernel = KernelBuilder::new()
    .epoch(1722086400)      // Set epoch
    .build();                // Build the kernel

// Or with defaults
let kernel = KernelBuilder::new().build();

ConstitutionalAgent Trait

Implement this trait to create a constitutional agent.

Rust
pub trait ConstitutionalAgent {
    fn name(&self) -> &str;
    fn purpose(&self) -> &str;
    fn minimum_trust_level(&self) -> TrustLevel;
    fn execute(&self, input: &str)
        -> Result<String, Box<dyn Error>>;
    fn communicate(&self, source: &str, target: &str,
        payload: &str, epoch: u64)
        -> Result<FlowReceipts, Box<dyn Error>>;
}

ReceiptExt

Extension methods for receipt serialization.

MethodReturnsDescription
.to_json()StringSerialize receipt to JSON
.to_pretty_json()StringPretty-printed JSON
.checksum()StringSHA-256 of receipt content

Guide: Build an Agent

Create a constitutional agent in 5 steps.

1

Define your agent struct

Rust
pub struct MyAgent {
    name: String,
    kernel: Kernel,
}

impl MyAgent {
    pub fn new(name: &str) -> Self {
        Self {
            name: name.to_string(),
            kernel: KernelBuilder::new().build(),
        }
    }
}
2

Implement the ConstitutionalAgent trait

Rust
impl ConstitutionalAgent for MyAgent {
    fn name(&self) -> &str { &self.name }
    fn purpose(&self) -> &str { "Performs custom operations" }
    fn minimum_trust_level(&self) -> TrustLevel {
        TrustLevel::Verified
    }
    fn execute(&self, input: &str) -> Result<String, Box<dyn Error>> {
        let receipt = self.kernel.execute(
            &self.name,
            ExecutionMode::Deterministic,
            input,
        )?;
        Ok(format!("Executed: {}", receipt.base.hash))
    }
    fn communicate(&self, src: &str, tgt: &str, payload: &str, epoch: u64)
        -> Result<FlowReceipts, Box<dyn Error>>
    {
        self.kernel.communicate(src, tgt, payload, epoch)
    }
}
3

Add your manifest

JSON
{
  "name": "my-agent",
  "version": "1.0.0",
  "category": "agent",
  "conformance_level": "L2",
  "dependencies": [{ "name": "uck", "version_req": ">=2.0.0" }]
}
4

Write tests

Rust
#[test]
fn agent_executes() {
    let agent = MyAgent::new("test-agent");
    let result = agent.execute("test-input").unwrap();
    assert!(result.contains("Executed:"));
}

#[test]
fn agent_communicates() {
    let agent = MyAgent::new("test-agent");
    let flow = agent.communicate("a", "b", "data", 1).unwrap();
    assert!(!flow.hash.is_empty());
}
5

Publish to UMS

Shell
# Build and publish
cargo build --release
ums publish --manifest manifest.json --sign key.pem

Guide: Publish to UMS

Share your constitutional packages with the world.

Package Requirements

  • Manifest: Valid manifest.json with name, version, category
  • Signature: Ed25519 signed by the author's key
  • Checksum: SHA-256 of package content
  • Conformance: At least L1 conformance level

Publish Flow

Shell
# 1. Build your package
cargo build --release

# 2. Generate signing key (first time only)
ums keygen --output my-key.pem

# 3. Create manifest
ums init --name my-pkg --version 1.0.0 --category library

# 4. Sign and publish
ums publish --manifest manifest.json --sign my-key.pem

# 5. Verify it's live
ums info my-pkg
โœ“ Your package is now live

Visit ums.initialcore.net to see your package in the registry.

Guide: Conformance Testing

Verify your implementation meets ICore standards.

Conformance Levels

LevelNameRequirements
L0Non-CompatibleDoes not meet any requirements
L1Core CompatibleKernel operations work correctly
L2Science CompatibleFull SDK + agents + receipts
L3Fully CompatibleAll 355 CITS invariants pass

Running Tests

Shell
# Run full conformance suite
cargo test --all

# Run specific test suites
cargo test --package ums          # UMS tests
cargo test --package UCK          # Kernel tests
cargo test --package CITS-Integration  # System-level tests

# Check conformance level
cits check --target ./target/release/my-impl
โš  Self-conformance caveat

Running ICore's own tests against ICore proves internal consistency, not independent validation. For true validation, independent review and cross-implementation testing are needed.

Guide: Third-Party Integration

Integrate ICore into your existing systems.

Integration Points

ComponentAPIProtocol
UCK KernelRust traitIn-process
WASM CoreJavaScriptBrowser API
UMS RegistryRESTHTTPS
UCF ForgeWeb UIBrowser

Minimal Integration

Rust
// Add ICore to your project
use uck::{ConstitutionalKernel, ExecutionMode};

fn main() {
    let kernel = uck::ConstitutionalKernel::new();

    // Execute a constitutional operation
    let receipt = kernel.execute(
        "my-system",
        ExecutionMode::Deterministic,
        "operation-name",
    ).expect("Operation failed");

    // Verify the receipt
    assert!(kernel.verify(&receipt).expect("Verification failed"));
    println!("โœ“ Operation verified: {}", receipt.base.hash);
}

Conformance Requirements

  • Implement all four UCK operations
  • Produce valid receipts for every operation
  • Pass CCS invariants (at least L1)
  • Use Ed25519 for signing
  • Use SHA-256 for content addressing

Type Reference

Receipt

FieldTypeDescription
operation_idStringUnique operation identifier (UUID)
hashStringSHA-256 content hash
parent_hashOption<String>Previous receipt hash (chain)
timestampu64Unix timestamp
epochu64Constitutional epoch
modeExecutionModeDeterministic or NonDeterministic
componentStringComponent that produced receipt
operationStringOperation description

FlowReceipts

FieldTypeDescription
sourceStringSource component
targetStringTarget component
payloadStringData payload
hashStringSHA-256 of flow
epochu64Constitutional epoch

ExecutionMode

VariantDescription
DeterministicSame input always produces same output
NonDeterministicOutput may vary (e.g., I/O operations)

Error Codes

ErrorCodeDescription
KernelError1001General kernel error
InvalidReceipt1002Receipt verification failed
ComponentNotFound1003Referenced component doesn't exist
EpochMismatch1004Epoch is not monotonically increasing
TrustViolation1005Insufficient trust level
DataCorruption1006Data integrity check failed
CircularDependency1007Circular dependency detected

Trust Levels

LevelScoreDescription
Unknown0No trust established
Community1Published by community member
Verified2Identity verified by TrustChain
Official3Official ICore release
Core4Core substrate component

Conformance Levels

LevelNameTests Required
L0Non-CompatibleNone
L1Core CompatibleCCS core operations
L2Science CompatibleCCS + SDK + agents
L3Fully CompatibleAll 355 CITS invariants

Testing Framework

ICore includes a comprehensive testing framework for constitutional software.

Running Tests

Shell
# Run all tests (341+ tests)
cargo test --all

# Run with the test runner
bash automation/test-all.sh

# Run specific crate
cargo test --package UCK
cargo test --package ums
cargo test --package constitutional-sdk

Test Categories

CategoryCrateTestsWhat it tests
ISPlibisp-core, libisp-dht82Inter-System Protocol
CoreUSR-CoreFab, UCN, UCD, TrustChain76Core constitutional crates
IntegrationIntegration, CITS-Integration67Cross-module + system-level
KernelUCK20Universal Constitutional Kernel
SDKconstitutional-sdk14Developer SDK
Agentsreference-agents14Reference constitutional agents
Propertiesproperty-measurement6Constitutional properties
Third-Partythird-party10Third-party enablement
UMSums52Universal Module System

Checksum Calculator

Compute SHA-256 checksums for your data.