Skip to content

Architecture

tags: [general]

This section is the deep-dive reference for how Syn_OS is built. It complements the single-source-of-truth master architecture document at docs/internal/eyesonly/architecture/SYNOS_MASTER_ARCHITECTURE.md and the project roadmap. If a page here ever contradicts the master document, the master document wins.

Syn_OS is an Arch Linux derivative whose subsystems all live in a single 247-crate Rust workspace. The subsystems below are the load-bearing pieces — each has its own page with diagrams, crate paths, test counts, and known limitations.


tags: [general]

The Linux 7.0-synos-ai kernel target is built with LLVM and CONFIG_RUST=y, exposes 12+ CONFIG_SYNOS_* build options, loads 33 signed Rust char-device modules (ZeroC — zero Syn_OS-authored C in the kernel tree), and uses char-device + ioctl as the kernel-userspace AI interface (replacing the obsolete custom-syscall design).

All 33 modules are CAP_SYS_ADMIN-gated, signed, and QEMU-validated (67/67 PASS on the v101 core set; 5 additional v102-v108 modules built and in pipeline). The offensive synos_rootkit module is master/CoM-only (0600 root-only); all others are all-profile.

See: custom-kernel.md

ALFRED (Adaptive Learning Framework for Responsive Evolution & Defence) is the Rust AI daemon. Its consciousness fusion engine combines Traditional, Neuromorphic, Quantum, TNGS (Theory of Neuronal Group Selection), and MPS tensor-network cortex layers, and it supports both ONNX and Ollama backends for local inference with a STIX 2.1 threat-intel ingress and federation-capable consensus.

The v53 CortexSelector adds a pluggable backend (ClassicalSnn / MpsCortex) on the QuantumInspired path, selected via SYNOS_CORTEX_BACKEND env var.

See: alfred.md

GRIMOIRE is the gamified cybersecurity training platform — 117 labs across 13 categories (beginner, intermediate, advanced, nightmare, crypto, defence, forensics, privesc, homelab, mesh, ai-red-team, quests, raids) backed by the synos-gamification daemon and a real-time WebSocket world-server. The front-end is grimoire-tui, a pure terminal TUI (the Bevy 0.14 3D client is tabled). Features include playable quests, a learning-loop engine (per-lab analytics, DEBRIEF, login streaks, adaptive next-lab, knowledge-gap heatmap), Ed25519-signed certifications, real prestige passives, and codex unlocks.

Lab sandboxing is handled by synos-lab-sandbox with Firecracker microVMs, seccomp-bpf, and per-lab capability masks.

See: grimoire.md, grimoire-lab-firecracker-isolation.md

The Bevy 0.14 game-engine crate powering the desktop experience (8 plugins: Cutscene, Mindmap, RetroFilter, Cyberspace, SkillTree, FactionHQ, Rehoboam, Twin). Tabled in favor of grimoire-tui; excluded from workspace resolution. The v71 Multiplayer plugin is preserved but inactive.

See: bevy-engine.md

The authoritative backend for GRIMOIRE’s single shared world — every Syn_OS image (master, public, ChurchOfMalware) joins the same world; the server owns integrity-critical state (scores, faction control) on a 20 Hz tick while clients do the heavy lifting (featherweight hosting). Runs on a native-Linux mesh node, hardened to the tailnet (ACL + systemd sandbox + egress-lockdown; no lateral movement). Endpoint is env-configurable (SYNOS_WORLD_SERVER) — moving the host is not a rebuild.

See: world-server.md

The horizontally-scalable encrypted mesh for distributed Syn_OS deployments. Tailscale is the primary backbone, WireGuard is the fallback, and a K3s operator manages node lifecycle through the ArcanumNode custom resource. Node identity is established via ed25519 keypairs generated at first boot. v79 HotStuff BFT consensus provides Byzantine fault-tolerant agreement across the mesh.

See: arcanum-hive.md, ARCANUM_MESH_ARCHITECTURE.md

Two complementary updaters — don’t conflate them:

  • Hive-coordinated (patch-level) — mesh nodes pull ed25519-signed patches from a master with btrfs snapshot rollback, canary rollout groups, and SBOM cross-reference. See: ota-updates.md
  • Standalone A/B (image-level) — a single install updates itself by swapping whole rootfs slots, verifying the new image boots before committing (QEMU-verify + watchdog rollback), behind a production HTTPS transport and a pubkey-only hybrid (ed25519 + ML-DSA-65) fail-closed verifier. See: ota-standalone.md

Syn_OS ships as four imagesMaster, GRIMOIRE Public, GoodLife, and ChurchOfMalware — built from one workspace. A build-time Curtain (ELF symbol scanner + feature audit + lab integrity SHA-256 manifests) plus a Curtain v4 runtime capability ceiling enforce the boundary so proprietary capabilities never leak into the wrong build.

CapabilityMasterGRIMOIREGoodLifeCoM
Full toolset + BlackArchPer-tool unlockSafe subsetPer-tool unlock
Kernel modulesAll 3332 (no offensive)32 defensive32 + CoM offensive
Fragment Field IDSKernel + userspaceUserspace onlyUserspaceKernel + userspace
Lab / mesh authoringNoNoMember-tiered
C2 framework binariesPresentScrubbedScrubbedPresent
Offensive capabilityYesGated → EPERMNoGame-mode gated

See: iso-profiles.md, CURTAIN_V2.md

Fragment Field IDS is an energy-topology intrusion detection system that treats attack patterns as physics-layer perturbations. Attack patterns produce distinct energy topologies (cache-miss storms for Spectre/Meltdown, elongated fragment paths for ROP chains, entropy reduction for timing attacks) measured via RAPL + PMU + eBPF and classified in userspace. Kernel/userspace bridge uses char-device + ioctl (not custom syscalls).

This is a Master-only proprietary feature. The source is LicenseRef-Proprietary and excluded from the public forge.

See: fragment-field-ids.md (internal — Master only)

Every ISO profile ships with a CycloneDX Software Bill of Materials. The pipeline generates SBOMs for both the Rust workspace (cargo-cyclonedx) and the Docker builder image (syft), signs them with cosign, and cross-references them against deny.toml policy. ALFRED model weights carry their own provenance manifest with SHA-256 pins.

See: iso-build-pipeline.md (SBOM section)

The 51-stage mkarchiso pipeline under fruit/iso/iso-build/scripts/stages/ is the authoritative ISO producer. It wraps mkarchiso in an Arch Docker container on the build oracle, runs pacstrap to bootstrap the Arch base, compiles the kernel and Rust workspace, installs Cinnamon + Xfce4, stages 155 native security tools (plus full BlackArch on demand) and GRIMOIRE labs, builds the squashfs with SOURCE_DATE_EPOCH, generates the SBOM, and publishes patch manifests. SYNOS_STRICT=1 is always set.

See: iso-build-pipeline.md, iso-build-deep-dive.md

GRIMOIRE labs run inside synos-lab-sandbox — Firecracker microVMs with seccomp-bpf isolation, per-lab capability masks, a golden-file regression suite, and a Criterion benchmark suite. The vetted_catalog allowlist is a fixed, hand-maintained list between “what an author can describe” and “what the platform executes.”

See: grimoire-lab-firecracker-isolation.md

The Build Observatory is a tmux-based live dashboard for monitoring ISO builds in real time. It provides a rich multi-pane view with wizard + logs + unified panel, or a minimal 2-pane fallback. The panel shows brand, weighted completion %, ETA, timeline, gates, and errors. An HTTP+SSE mesh viewer (synos-obs-serve.py) allows remote monitoring.

See: build-observatory.md, build-runbook.md


tags: [general]

Defense is a stack — every layer assumes everything below it can be compromised.

LayerDomainControls
9Audit & visibilitysynos-ops 23-tab TUI · synos-audit-trail HMAC-SHA256 append-only chain · ALFRED SecurityEvent routing
8AI & LLM securityCurtain prompt-guard (CPI classifier, v74) · LLM federation tier-isolation · ALFRED adversary-AI anomaly detection · Fragment Field energy signatures
7Runtime capability ceilingCurtain v4 — tier gate · seccomp · AppArmor · taint flag · prompt guard · syscall filter · mesh isolation
6Identity & trust chained25519 node keypair at first boot · per-tier HMAC roots · synos-audit-trail tamper detection · mTLS client certs
5NetworkingARCANUM Hive mTLS · Tailscale + WireGuard fallback · K3s operator TLS · authenticated ALFRED intel REST endpoints
4Process isolationSeccomp BPF · AppArmor per-service profiles · namespace + cgroup isolation for lab overlays
3System integritySecureBoot + cosign-signed kernel modules · SLSA-3 provenance · reproducible squashfs · CycloneDX SBOM
2Kernel7.0-synos-ai patches · CONFIG_SYNOS_* · LLVM CFI · lockdown · 33 memory-safe signed Rust char-device modules (ZeroC)
1Hardware / firmwareTPM attestation · SecureBoot MOK helper · DRAM Rowhammer detection · hedged-read tail slayer

See: security-posture.md, CURTAIN_V2.md, APPARMOR_ENFORCEMENT.md

  • SOURCE_DATE_EPOCH propagated through all stages
  • mksquashfs over deterministic sorted file list
  • cargo-auditable encodes exact dependency graph into every binary
  • slsa-github-generator wired into release workflow
  • Two builds from same commit produce identical SHA-256 checksums

See: REPRODUCIBLE_BUILDS.md


tags: [general]

  • decisions.md — Architecture decision records: Apache 2.0 + LicenseRef-Proprietary hybrid, Arch base shift, LLVM kernel build, three-image strategy, Tailscale + WireGuard topology, ed25519 mesh identity, and more.
  • AI_SURFACE_HARDENING.md — Wave 10 AI security recommendations: prompt injection defenses, taint tracking, federation trust scoring.
  • Biological architecture — See FEV section 4: the codebase mirrors four living systems (mammalian CNS, fungal mycelium, eukaryotic cell, prokaryotic cell) as a design constraint.

tags: [general]

These features are excluded from the public forge and documented in the internal tree:

FeatureProfileInternal Doc
Multi-Tenant IsolationMaster / Enterprisesynos-tenant.md
Sovereign KeyringMastersynos-sovereign-keyring.md
Fragment Field IDS (full)Mastersynos-fragment-field.md
Browser ControlMaster / Enterprisesynos-browser-control.md
Rootkit PrimitivesMaster / CoMsynos-rootkit.md
Consciousness DaemonMastersynos-consciousness.md
Security Boundary / GodModeMastersynos-security-boundary.md
ALFRED Cortex FusionMasteralfred-consciousness-fusion.md
Tenant Crypto HarnessMastersynos-redteam-tenant-crypto.md

See: INDEX.md


tags: [general]

Updated: v111.0.0 Last Light, August 2026.


graph TB
subgraph "User Space"
ALFRED[ALFRED Daemon]
GRIMOIRE[GRIMOIRE TUI]
OPS[synos-ops]
PROGRESSION[synos-progression]
end
subgraph "Kernel Space"
KERNEL[7.0-synos-ai]
CHARDEV[33 Char-Device Modules]
CURTAIN[Curtain]
FFI[synos-safe-ffi]
end
subgraph "Mesh"
HIVE[ARCANUM Hive]
BFT[HotStuff BFT]
PROFILER[Hive Profiler]
end
subgraph "Security"
BOUNDARY[synos-security-boundary]
AUDIT[synos-audit-trail]
ATTEST[TPM2 Attestation]
end
ALFRED --> KERNEL
GRIMOIRE --> PROGRESSION
OPS --> AUDIT
KERNEL --> CHARDEV
CURTAIN --> BOUNDARY
HIVE --> BFT
HIVE --> PROFILER
ATTEST --> BOUNDARY