Skip to content

ecoPrimals/sourDough

Repository files navigation

sourDough

The nascent primal. The budding primal. The starter culture for ecoPrimals.

Version: 0.3.1 License: AGPL-3.0-or-later (scyBorg Provenance Trio) Edition: Rust 2024

Purpose

sourDough scaffolds new primals that are self-contained and independent. When sourDough creates a new primal, the result has its own inlined core traits, its own workspace, and zero runtime dependency on sourDough. Like biological budding, the offspring is complete.

sourDough also serves as a reference implementation demonstrating ecoPrimals standards: UniBin, ecoBin, genomeBin, JSON-RPC 2.0 IPC, and capability-based discovery.

Crates

Crate Role
sourdough-core Core traits library: lifecycle, health, identity, discovery, config, JSON-RPC 2.0 IPC, zero-copy RPC, PeekedStream transport
sourdough UniBin CLI: scaffold, sign, verify, validate, layout, genomebin, doctor
sourdough-genomebin Pure Rust genomeBin: platform detection, metadata, archive, validation, Ed25519 signing

Quick Start

# Scaffold a new self-contained primal
sourdough scaffold new-primal myPrimal "Purpose of my primal" --output ../myPrimal

# Validate primal compliance
sourdough validate primal ../myPrimal

# System health check
sourdough doctor

Production binary comes from plasmidBin. For local development:

cargo build --release
./target/release/sourdough --help

Scaffolded primals include:

  • Core crate: inlined traits (PrimalLifecycle, PrimalHealth, PrimalState, PrimalError)
  • Server crate: JSON-RPC 2.0 server with capability wire + btsp.negotiate + MethodGate + primal.announce
  • Neural API: Auto-announces to biomeOS on startup for adaptive routing (Wave 42 standard)
  • CI/CD: GitHub Actions workflows (ci.yml, notify-plasmidbin.yml, release.yml musl cross-compilation)
  • Supply chain: deny.toml (ecoBin v3.0, explicit ring ban, cc allowed for blake3)

No dependency on sourDough after creation.

Quality

Metric Value
Tests 281 passing (152 unit, 31 CLI integration, 2 e2e, 8 doc, 88 genomebin)
Coverage 95%+ (llvm-cov, target: 90%)
Clippy zero warnings (workspace-level pedantic + nursery)
Unsafe zero (forbid(unsafe_code) via workspace lints)
C deps zero (Pure Rust, blake3 pure feature)
LOC ~10,500 Rust across 37 files
Max file < 750 lines (target: 1000)

Standards Compliance

  • UniBin: single binary, multiple subcommands
  • ecoBin: Pure Rust, zero C dependencies, static linking, cross-compilation
  • genomeBin: Pure Rust platform detection, metadata, archive operations
  • JSON-RPC 2.0: primary IPC with semantic domain.verb method naming
  • Binary RPC: secondary high-throughput path (bytes::Bytes zero-copy, transport-agnostic)
  • scyBorg Provenance Trio: AGPL-3.0-or-later (software), ORC (research/data), CC-BY-SA-4.0 (docs)

Project Layout

sourDough/
  Cargo.toml                  Workspace manifest
  crates/
    sourdough-core/           Core traits + IPC
    sourdough/                UniBin CLI (sign, verify, validate, layout, scaffold, genomebin, doctor)
    sourdough-genomebin/      Pure Rust genomeBin library
  specs/
    ARCHITECTURE.md           Technical architecture
    SOURDOUGH_SPECIFICATION.md  Full specification
    ROADMAP.md                Evolution roadmap
    EPHEMERAL_PRIMAL_SCAFFOLDING.md  Session-as-primal spec
  archive/                    Fossil record of past sessions

Development

cargo test --workspace
cargo clippy --workspace --all-targets -- -W clippy::pedantic -W clippy::nursery -D warnings
cargo fmt --all -- --check
cargo deny check
cargo doc --workspace --no-deps
cargo llvm-cov --workspace

Design Principles

  • Primal sovereignty: primals know only themselves, discover others at runtime
  • Zero hardcoding: OS-assigned ports, capability-based discovery, no primal name coupling
  • Scaffold independence: generated primals are complete and self-sufficient
  • Pure Rust: no C dependencies, no shell scripts, no external tooling
  • Modern idiomatic Rust: edition 2024, #[expect(reason)], #![forbid(unsafe_code)]

Documentation

About

Starter culture primal — project scaffolding, template propagation, ecosystem seeding. Pure Rust, AGPL-3.0

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors