Five foundational principles govern every architectural, operational, and implementation decision in Soveraign. These are binding design decisions, not merely aspirational statements:
Constrain the environment, not the agent.
An agent must be able to perform ordinary engineering work, install software, modify its container environment, execute commands, and resolve unforeseen problems without unnecessary interactive permission prompts.
The human operator retains absolute authority over the underlying host infrastructure, external resource grants, credentials, container lifecycle management, network boundaries, and emergency intervention.
An agent is never done. A task is done.
An agent is a persistent identity, not a continuously running AI process. Its identity, configuration, memory, credentials, workspaces, and task history must survive container replacement.
The execution environment remains available indefinitely while individual AI processes are invoked on demand — consuming zero inference tokens merely by being idle.
Default to ordinary files, directories, and persistent volumes.
Do not introduce databases, message brokers, distributed caches, object storage dependencies, or other infrastructure prematurely. Learn from practical hands-on usage before selecting additional persistence technologies, introducing infrastructure only when demonstrated requirements justify it or the maintainer explicitly requests it. Optional remote backups must never become operational dependencies.
Use deterministic software engineering for operations that do not require intelligence.
Prefer PowerShell 7 and modern .NET/C# — including file-based C# applications where appropriate — over Python for automation, provisioning, validation, and future orchestration.
Invoke AI agents only when reasoning is genuinely necessary. Avoid unnecessary token consumption, recursive delegation, unbounded retries, and AI-driven coordination that could be implemented deterministically.
Soveraign distinguishes independently identifiable contributors — humans and persistent digital colleagues (synths) — from the AI models, providers, tools, and execution harnesses they use.
A synth retains its configured identity regardless of whether its work is performed using Claude Code, Codex, Antigravity, OpenCode, GitHub Copilot CLI, Freebuff, or another runtime. Models and harnesses are instruments; the contributor is the accountable human or synth identity.
Identity-first attribution requires that Soveraign:
- Preserve each synth's configured Git author and committer identities without ever hard-coding specific synth identities into Soveraign.
- Preserve legitimate human and independently identifiable synth co-authorship.
- Suppress automatically generated vendor-specific
Co-Authored-Bytrailers, promotional attribution footers, and AI session URLs in commits and pull requests. - Preserve mandatory disclosures, licensing notices, Developer Certificate of Origin (
Signed-off-by) sign-offs, and repository-specific contribution requirements.
These operational invariants reinforce the five governing principles:
- Independent operational identity: Agents are independently identifiable with their own workspaces, Git identities, mailboxes, and scoped resource grants, separate from AI subscription ownership.
- Identity continuity: An agent's identity survives changes in models, runtimes, container images, and underlying hosts.
- Deny by default on external and host resources: Agents never implicitly inherit the operator's host files, SSH keys, Docker daemon socket, or external permissions; every external grant is explicit.
- Transparency & human authority: Operators can inspect all persisted state directly and intervene at the host level at any time; agents cannot disable external lifecycle controls or expand their own infrastructure grants.
- Provider independence & portability: No mandatory AI provider, model, runtime, or commercial orchestration platform; one portable OCI foundation supporting native
linux/amd64andlinux/arm64. - Engineering discipline: Standalone semantic versioning, explicit compatibility contracts, native multi-architecture verification, and controlled human-approved promotion.
Soveraign establishes the following conceptual vocabulary for documentation, configuration, and operational reasoning:
| Concept | Definition |
|---|---|
| Operator / Supervisor | Human accountable for infrastructure, lifecycle control, external grants, and agent supervision. |
| Agent / Synth | Independently identifiable, persistent digital colleague, distinct from the AI models, providers, tools, and execution harnesses it uses. |
| Personality | An agent's behavioral instructions, values, communication style, and preferences. |
| Instance | An isolated execution environment (container + instance-scoped persistent volumes) associated with an agent. |
| Runtime | Official, unmodified AI CLI software through which an agent reasons and performs work (e.g., Codex, Claude Code, Antigravity CLI, OpenCode, Copilot CLI, Freebuff). |
| Workspace | Files, repositories, and working resources associated with an instance. |
| Grant | Explicit authorization to access an external resource or perform a privileged infrastructure operation. |
| Task | A bounded unit of work assigned to an agent. |
| Activity | An attributable record of an agent's actions. |
Key conceptual invariants:
- An Agent may operate across multiple Instances on heterogeneous machines, each with independently scoped writable volumes.
- Multiple Agents may coexist on the same host infrastructure while maintaining independent identities, volumes, and external authorization boundaries.
- A model is not an agent's identity. Changing models, providers, or runtimes does not change who the agent is.
- In v0.1.0, these concepts remain architectural vocabulary and file/directory conventions. Soveraign deliberately avoids introducing a database, domain service, or control-plane API solely to represent them.
An agent's operational identity and its AI subscription owner are distinct concepts:
- Operational identity establishes who performed engineering actions and which external resources are accessible. Where appropriate and permitted, each agent has its own container OS user (
agent), Git identity, SSH keys, mailbox, scoped GitHub machine user or App, dedicated workspace, and persistent memory. - AI subscription ownership governs who is authorized to pay for and consume model inference via an official runtime. An operator may authenticate supported official AI runtimes inside an instance using their own authorized subscription where permitted by the provider's terms, or using scoped API credentials. See docs/runtimes.md for detailed provider terms, delegation boundaries, and unresolved compliance considerations.
Identity governance rules:
- Transparent identification: Agent operational identities should be clearly identifiable as synths/agents where appropriate and must never falsely impersonate human beings.
- Identity-first attribution: Commits and pull requests attribute the accountable human or synth identity rather than the underlying AI model, provider, or execution harness. Configured Git author/committer identities, legitimate human and synth co-authorship, mandatory disclosures, licensing notices, DCO sign-offs, and repository-specific contribution rules remain intact, while automatic vendor
Co-Authored-Bytrailers, promotional footers, and AI session URLs are suppressed through official runtime settings and global instructions. - Real security boundaries: Prompt-based restrictions are not security boundaries. Boundaries are enforced via container isolation, host resource denial, instance-scoped volumes, network controls, and service-level grants.
- Revocation vs. deletion: Revoking an external resource grant stops future access, but does not erase data already written to persistent volumes. Operators must audit and purge retained files explicitly when offboarding or revoking sensitive access.
- Repository independence: Specific agent deployments keep their personal identity files, accounts, host addresses, topology, and resource grants completely outside this reusable repository.
Soveraign explicitly separates four lifecycles (detailed further in docs/operations.md):
- Agent identity lifecycle: Long-lived across machines, container replacements, and runtime changes.
- Execution environment lifecycle: Long-lived idle container (
tini+sleep infinity) managed via Docker Compose and host controls; replaced cleanly on image upgrades while volumes persist. - Individual AI process lifecycle: Ephemeral; launched on demand inside
tmuxor a script, consuming inference tokens only while actively executing. - Task lifecycle: Bounded unit of work with durable file-based outputs (commits, branches, notes, artifacts) that outlive both individual AI processes and container replacements.
- Decision: Base Soveraign on official
ubuntu:26.04(Resolute) and maintain one curated engineering image supporting nativelinux/amd64andlinux/arm64. - Rationale: Developer toolchains and official agent CLIs depend on glibc, full ICU globalization, standard terminal libraries, and native package availability. Maintaining one reusable image avoids combinatorial variant sprawl.
- Consequences: Image size is larger than a minimal runtime container, trading footprint for broad native compatibility and predictable engineering ergonomics.
- Decision: Copy
/usr/share/dotnetfrom officialmcr.microsoft.com/dotnet/sdk:10.0-resoluteandmcr.microsoft.com/dotnet/sdk:11.0-resolutemulti-arch images ontoubuntu:26.04with native Ubuntu ICU (libicu78) and TLS libraries. - Rationale: Both upstream images target Ubuntu 26.04 (
resolute) glibc natively onamd64andarm64, ensuring exact ABI alignment for modern .NET/C# development and automation. - Consequences: Both
net10.0(LTS) andnet11.0(STS) compile and execute natively with full globalization support.
- Decision: Exclude all AI agent runtimes from
docker/Dockerfile— including permissively licensed runtimes — and provision every supported official runtime (codex,claude,antigravity,opencode,copilot,freebuff) explicitly post-deployment viasoveraign-install-runtimefrom its official upstream channel into persistent~/.local. - Rationale: Separating the immutable engineering environment from fast-moving third-party AI runtimes eliminates redistribution ambiguity across both proprietary and permissively licensed CLIs, decouples runtime updates from OCI image rebuilds, keeps the base image free of vendor binaries and startup network calls, and lets each instance install only the runtimes it actually needs.
- Consequences: Containers start immediately without vendor downloads or credentials. Selected runtimes install into
/home/agent/.localand survive container replacement.
- Decision: Retain dedicated non-root user
agent(1000:1000), grant passwordlesssudoinside the container (/etc/sudoers.d/agent), run containers withprivileged: falseand Docker's normal default capability set and confinement (omittingno-new-privileges:trueandcap_drop: [ALL]), usetinias PID 1, and inject operational identity viadocker/entrypoint.sh. - Rationale: Enforces Maximum autonomy. Absolute sovereignty. Ordinary engineering work runs cleanly as
agent(1000:1000) with predictable volume ownership, while legitimate administrative operations (sudo apt-get install, system tooling configuration) succeed inside the container without interactive prompts or custom permission engines — without granting host administrative authority. - Consequences: System-level changes outside persistent volumes survive ordinary restarts but do not persist across container replacement; reproducible provisioning scripts should capture any needed host-package additions. Host isolation relies on
privileged: false, default container confinement, no host Docker socket, and optionally VM isolation for stronger kernel boundaries.
- Decision: Scope Docker Compose project names, container names, networks, and named volumes per instance via
SOVERAIGN_INSTANCE_NAME(orCOMPOSE_PROJECT_NAME). Runsleep infinityundertiniwith no exposed container ports; operators connect via SSH to the host,docker exec, andtmux, and exercise lifecycle control/kill switches from the host. - Rationale: Prevents independent instances (even of the same logical agent) from accidentally sharing writable authentication or session state, keeps idle token consumption at zero, avoids premature control planes, and relies on proven infrastructure tools.
- Consequences: Live processes survive terminal disconnection via
tmux, while container replacement or host reboot cleanly restarts an idle container with persistent volumes intact.
- Decision: Version the repository with standalone
minver-cliin.config/dotnet-tools.json(--tag-prefix v) without placeholder.csprojfiles. Build and smoke-testlinux/amd64(ubuntu-26.04) andlinux/arm64(ubuntu-26.04-arm) once each on native GitHub runners. Assemble the multi-arch OCI index offline from the exact verified archives without rebuilding. Pin third-party Actions by full commit SHA and reference Codebelt-owned Actions by release tag. Require human approval for publication (see ADR-008). - Rationale: Eliminates QEMU verification blind spots, prevents drift between tested and published artifacts, preserves Codebelt CI/CD standards, and enforces human-gated releases.
- Decision: Distribute publicly through Docker Hub only (
docker.io/codebeltnet/soveraign), following the Codebeltpr.yml/container.yml/release.yml/deploy.ymllifecycle used bycodebeltnet/docfxandcodebeltnet/csrun. GitHub Actions artifacts only transfer outputs between jobs of one run. The verified OCI archive is attached durably to the GitHub Release in 1 GiB pieces, and deployment reconstructs and re-verifies it from there. GitHub Releases plus theProductionenvironment gate publication. Docker Hub creates the repository on the first authorized push, and public visibility is verified after publication. Stable releases publishMAJOR,MAJOR.MINOR, andMAJOR.MINOR.PATCH, and prereleases only their complete version. Exact tags are immutable, floating tags never regress, andlatestis never published. BuildKit SBOM and SLSA provenance stay embedded per platform. GitHub-signed build provenance is created by the originatingrelease.ymlrun and verified during deployment.deploy.ymladds publication evidence that is stored in Docker Hub. The v0.1.0 GHCR-based design is superseded. - Rationale: GHCR duplicated the registry without adding capability for a public image and required staging tags. Docker Hub lets consumers pull anonymously. Reusing the Codebelt lifecycle avoids yet another release methodology. Build-once promotion keeps the tested and published content identical by digest.
- Consequences: Release tooling lives in
scripts/SoveraignRelease.psm1with 100% Pester coverage. Recovery depends only on durable release assets. A missing or altered asset cannot be rebuilt and requires a new patch release. Operators maintain theProductionenvironment and the Docker Hub credentials (see docs/release.md).
- Decision: Integrate identity-first attribution into
soveraign-install-runtimefor every supported runtime (on initial installation and explicit updates), preferring officially supported native runtime settings and adding concise global attribution instructions where native configuration is unavailable or insufficient. Merge configuration files safely and idempotently inside the persistent/home/agentvolume without overwriting existing user settings. Deliberately omit a mandatory global Gitcore.hooksPathoverride, custom Git hook framework, or duplicated commit-validation scripts. - Rationale: Enforces Attribute the identity, not the intelligence while respecting File first. Infrastructure on merit. and preserving existing repository-local Git hooks (such as Husky, pre-commit, or repository DCO/commit-msg checks). Maintains a clean separation of responsibilities between Soveraign (persistent synth identity, native runtime settings, global attribution instructions, and provisioning) and optional engineering workflow suites such as Codebelt Agentic (
git-visual-commitsdeterministic commit identity and trailer validation viavalidate-commit-trailers.ps1, andgit-remote-releasecontributor attribution). - Consequences: Soveraign operates independently without Codebelt Agentic and complements Codebelt Agentic skills seamlessly when installed. Runtimes that enforce vendor attribution server-side (such as Codex ChatGPT account settings) or via hardcoded tool prompts without a user setting (such as Freebuff) are documented transparently alongside their operational mitigations in docs/runtimes.md.