Selûne keeps Git and MoonBit 1.0 RC1 source code as the single source of truth. Every derived fact shard, context pack, evidence attestation, and optional export flows through explicit trust boundaries verified directly against moon.mod, moon.work, and host bridges.
Five disciplined planes separate stateless agent access, compiler-backed reading, hermetic worktree cell execution, atomic object-store convergence, and offline formal verification.
Selûne Constellation Architecture: solid silver and aquamarine paths form the Trusted Commit Core; dotted amethyst paths denote optional fail-open overlays.
Verified MoonBit Module & Bridge Dependency DAG
Each library under libs/<name>/ is an independent MoonBit 1.0 RC1 module using moon.mod and module-local moon.work files so parallel workers never contend on a shared _build/ lock.
Fail-closed on policy weakening, cache drift (CacheDriftError), sandbox escape, timeout (non-servable), or mismatched validated tree OID at atomic CAS git update-ref.
Selûne maintains a persistent, repo-local Karpathy-style LLM knowledge base under llm-wiki/ paired with a typed Self-Improvement Memory (SIM.md). Like Graphify, it is strictly optional and fail-open with zero commit-path dependency: compiler-resolved facts and Git remain sole authorities (source_wins=true, commit_path_affected=false).
Compiled Wiki & SIM Ledger (llm-wiki/)
29 compiled pages across 12 sources, 7 entities, 7 concepts, and 3 syntheses backed by canonical repo-relative pointers in raw/SOURCES.tsv, an append-only wiki/log.md, and 4 SIM root-cause entries (moon-mod-manifest-syntax, veil-mc-state-explosion, wcag-contrast-drift, stale-metric-drift) audited via llm-wiki/tools/lint.py (0 failures, 0 orphans) and llm-wiki/tools/sim.py.
Governance · Off Commit Path
MoonBit Runtime, CLI & Stateless MCP Integration
libs/knowledge/wiki.mbt parses frontmatter, [[wikilink]] graphs, and logs with deterministic BM25-style ranking and fail-open fallback (provenance="llm_wiki_compiled"). Accessible via ./bin/selune wiki {status,lint,query,log,sim} and 3 read-only, repo-confined stateless MCP tools: agentic_wiki_index, agentic_wiki_lint, and agentic_wiki_query.
Optional Overlay
./bin/selune wiki status
./bin/selune wiki lint && ./bin/selune wiki sim
./bin/selune wiki query "MARS"
Six-Phase Lunar Worktree Cell Lifecycle
Every agent cell progresses monotonically through six CAS-versioned lifecycle states formally verified in spec/cell_lifecycle.qnt and spec/cell_lifecycle_proofs.lean.
Six-phase lunar cell lifecycle: only the supervisor may transition to Submitted; only the fenced single collector may seal and reclaim.
State
Lunar Phase
Glyph
Authority & Invariant
Created
New Moon
Supervisor leases CAS row, locks detached worktree, seeds CoW _build/ on btrfs, mounts private object store.
Supervisor imports candidate commit into hub refs/candidates/<cell>; convergence lands with zero live worktrees.
Abandoned
Lunar Eclipse
Lease expired or policy vetoed; collector claims and fences lease version in SQLite before terminating processes.
Sealed
Waning Crescent
Positive empty-cgroup termination confirmed; unsubmitted changes salvaged to refs/salvage/<cell>; worktree unlocked and quarantined.
Reclaimed
Dark of the Moon
Quarantine trash deleted, ephemeral refs dropped, disk freed, idempotent on repeat; hand-made non-cell worktrees untouched.
Effect v4-Inspired Concurrency in MoonBit 1.0 RC1
Auditing MoonBit's core/async/task_group.mbt exposed two constraints: TaskGroup::add_defer overwrites prior errors during cleanup, and diagnostic E4188 disallows combining raise? with async. libs/runtime resolves both:
Flat Multi-Reason Cause[E]
Preserves every Fail, Die, Interrupt, and CleanupFailure inside Exit[A, E] and Outcome[A, E] without losing earlier errors during teardown.
Pure Sync Layer 1
Keeps ValidationServices, Scope, TxRef STM, TestClock, Schedule, and Pool pure and synchronous so libs/sim runs 1M schedules natively without E4188.
Shielded async_rt
Isolates core/async in libs/runtime/async_rt with bracket_protected, LIFO/parallel exit-aware finalizers, Deferred, Latch, MultiSemaphore, and FiberMap.
Five-Pillar Technical Synthesis
Five-pillar architectural convergence anchoring Selûne.End-to-end change lifecycle from context pack to atomic CAS commit.Identity & assurance prism: separating interface, body, and closure invalidation.Trust boundary matrix: fail-closed commit core vs fail-open optional overlays.
Selûne Design Language v2 Tokens
Use the theme toggle in the header to switch live between Astral Midnight (dark default) and Celestial Vellum (House of the Moon white marble light mode). All 162 token color pairs pass WCAG AA/AAA contrast audits.
Selûne Design Language v2 specimen sheet: Astrolabe geometry, dual themes, and semantic verification accents.