# Repository Briefing: CharlesHoskinson/selune
> Source: https://repoforai.com/repo/CharlesHoskinson/selune (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/CharlesHoskinson/selune
- **Official Docs / Website**: https://charleshoskinson.github.io/selune/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: MoonBit
- **License**: Apache-2.0
- **Engineering Health**: A+ (89/100 · Maintenance 35/35 · Adoption 14/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.4.0 (2026-12-03) — https://github.com/CharlesHoskinson/selune/releases
- **Review Snapshot**: 2026-12-02 (Note: v0.4.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: MCP, Self-Hosted, CLI
- **Momentum**: 40 ★ total (+4 24h / +39 7d) · 14 forks
- **When to Use**: Best for: MoonBit teams on Linux or WSL2 that want several agents to edit one repository while requiring auditable checks and protected acceptance tests before changes land. Skip if: A single agent with Git worktrees and CI already meets your needs, Linux sandboxing or exact tool pins are impractical, or you need MoonBit-equivalent proofs in another language.

## Overview
```text
### Architecture & Core Mechanics
Selûne is a MoonBit 1.0 RC1 toolchain for coordinating edits by multiple coding agents. Each agent works in a locked, detached Git worktree cell with a private object store, and Bubblewrap confines commands run in the cell. Git remains the source of truth; SQLite stores facts derived from Git revisions, candidate records and validation evidence. Edit plans pair typed operations such as `Rename` and `ReplaceBody` with definition-level read sets and digests, making the assumptions behind each edit explicit.

The `agentic` CLI stages a change through propose, validate and commit. Validation runs `moon check`, `moon test` and the integrity gate; commit requires passing records for the exact tree and updates the branch head with compare-and-swap. A shared stdio MCP server exposes the workflow to agent CLIs. The local pre-tool hook catches common protected-path mutations early, but the server-side integrity gate is what controls whether a candidate can land.

### Key Capabilities & Differentiators
Agents can publish revision facts, look up definitions and build a task-specific context pack containing relevant definitions, dependents and tests. The LedgerFlow walkthrough uses a 16,000-token budget and labels compiler-resolved and parser-extracted facts separately. MoonBit is the first-party path, with exported `.mbti` signatures, `moon ide` queries and `moon prove` contract checks. Rust, TypeScript, Python and Go connect through language servers and SCIP indexers without proof support.

MARS 1.0 links requirements to MoonBit code, tests and Lean proofs. `mars check --fresh` recomputes source and Lean artifact digests to catch stale bindings. That freshness check is distinct from proof replay: `formal verify` checks a receipt against a required release manifest and re-executes proofs only with `--replay`. A revert likewise produces a new candidate, which must pass validation before it can land.

### Trade-offs & Limitations
Compared with running Claude Code or another agent CLI directly in Git worktrees and relying on CI, Selûne adds explicit records of what each edit read, what tree was validated and whether protected tests changed. That matters when concurrent agents make edits that can conflict semantically without touching the same lines. It is not a replacement for review: passing gates establish the checks recorded for a candidate, not correctness beyond those checks and any applicable proofs.

The cost is a Linux-oriented sandbox, exact toolchain pins, configuration to maintain and validation work per candidate. Adapter installers can overwrite same-named files without backups, and generated MCP configurations default to `publisher`; use `--dry-run` and set `read_only` explicitly for query-only access. If MoonBit proofs and multi-agent landing controls are not priorities, ordinary worktrees and CI are a simpler operational fit.

### Hardware & Deployment Guide
The self-hosted route targets Linux and WSL2. Run `./bin/selune doctor --strict-tier 1` to check the pinned MoonBit `1.0.0-rc1+3c0520448`, Node.js `26.13.1` and Bubblewrap `0.13.1`, along with Git 2.38+, a C compiler, SQLite with development headers, and `jq`. The core workflow runs locally; any model service is a separate concern of the attached agent CLI. `hello` skips `moon prove` if no Z3 or CVC5 solver is present, so a successful smoke test does not itself imply a proof ran.

Start with `./bin/selune hello` and the bundled LedgerFlow staged-landing exercise before attaching a team repository. For agent setup, preview changes with `--dry-run`, then verify the installed configuration with `--check`. Recent releases also cover separate subsystems: v0.2.1 shipped SelûneCraft browser runtime and verification updates, v0.3.0 introduced the MoonBit Silverfire cryptography library, and v0.3.1 added a Jasmin ECDSA engine for `secp256k1` and `P-256`. Those milestones are not measures of agent-workflow performance.
```

## Key Capabilities
```text
- Execution isolation: Locked, detached Git worktree cells use private object stores and run agent commands through Linux Bubblewrap.
- Dependency tracking: Typed plans record definition read sets with interface and body digests; exported MoonBit signatures come from `moon info`.
- Landing guarantees: `agentic commit` requires three passing verdicts for the exact candidate tree and updates the target head with compare-and-swap.
- Test integrity: The binding gate rejects held-out test edits and hand-edited verdicts; deleting tests or weakening assertions requires a spec-only reviewer token.
- Agent integration: The shared stdio MCP server supports `read_only` and `publisher` roles; the generated configuration defaults to `publisher`.
- Formal evidence: MARS 1.0 tracks requirement-to-artifact links, and `mars check --fresh` detects stale source and Lean bindings.
```

## Quick Start / Clone
```bash
git clone https://github.com/CharlesHoskinson/selune.git
cd selune
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s -- 1.0.0-rc1+3c0520448
export PATH="$HOME/.moon/bin:$PATH"
moonc -v
```
