Wilder Cosmos Runtime is a Nim-based runtime for deterministic world-state execution, boundary validation, structured messaging, and layered reconciliation.
This repository is the development home for the runtime itself. It combines unit/ integration/ uat/ the implementation, the requirements and specification documents that define correctness, and the tests used to verify progress. proto/ scripts/ dev/ build/ verify/ ops/ templates/ Version: 0.1.0
Contact: teamwilder@wildercode.org
flowchart LR
A[Config] --> B[Runtime Core]
B --> C[Validation]
C --> D[Messaging]
C --> E[Persistence]
B --> F[Runtime Modules]
B --> G[Optional Modules]
E --> H[Reconciliation]
At a high level, the runtime loads typed configuration, brings up the core lifecycle, validates data at boundaries, routes messages, reconciles persistence layers, and then opens the module surface.
Wilder Cosmos Runtime is designed to support systems that need:
- deterministic startup and lifecycle sequencing
- fail-fast validation at public boundaries
- structured message envelopes and transport abstraction
- multi-layer persistence with reconciliation on load and recovery
- explicit module boundaries and typed runtime APIs
The project is guided by a requirements-first workflow. The runtime behavior is defined in the documentation before it is considered complete in code.
The project is in active development.
Current implemented foundations include:
- public runtime API types and validation helpers
- runtime configuration loading and validation
- JSON and Protobuf-oriented serialization foundations
- message envelope dispatch and validation
- validation prefilter foundations
- runtime lifecycle scaffolding for startup sequencing
Planned and expanding areas include deeper persistence behavior, broader integration coverage, startup enforcement, and release hardening.
This repository keeps the code and the governing documents in one place so the runtime can be developed with traceable intent.
It includes:
- source code for runtime and cosmos modules
- verification tests and harnesses
- requirements, plans, and implementation notes
- scripts for compliance checks and scaffolding
- examples and templates for new modules
Cosmos uses a single, stable entry point for all operations: the cosmos CLI.
Starting the Runtime: The runtime operates as a long-running daemon. To start or attach to it:
cosmos startGit-Style CLI Grammar:
Cosmos uses an explicit, composable command structure: cosmos <verb> [noun] [args]
- Daemon:
cosmos start,cosmos stop,cosmos restart - Watch Management:
cosmos add watch /path/to/app,cosmos list watch - Thing Management:
cosmos add thing screenkeys.cosmos,cosmos list things - Introspection:
cosmos inspect world,cosmos console - Mode Switching:
cosmos mode step,cosmos mode aware
Install:
- Nim 1.6 or newer
- Nimble
- PowerShell for the repository scripts on Windows
Build and run the compliance gate:
nimble buildRuntimeRun compliance checks only:
nimble complianceCompile-check the test suites:
nimble testCompileRun tests:
nimble testRun the full verification flow:
nimble verifyBuild and stage release artifacts locally:
nimble releaseArtifactsTo reduce platform trust and policy risk, this repository does not place direct .exe
download links in primary documentation.
Use this release pattern instead:
- Publish artifacts through GitHub Releases.
- Include checksum evidence (
SHA256SUMS) for every release. - Include a release summary (
RELEASE-SUMMARY.md) for traceability. - If signing secrets are configured, include signature evidence (
SHA256SUMS.sig).
Verification examples:
# Windows PowerShell checksum verification
Get-FileHash .\cosmos-windows-amd64.exe -Algorithm SHA256# Linux/macOS checksum verification
sha256sum cosmos-linux-amd64Release notes should use the safe template at:
.github/release_notes_template.md
- GitHub CI:
.github/workflows/ci.ymlruns compile/test gates on pushes and pull requests tomain. - GitHub pre-release verify:
.github/workflows/pre_release_verify.ymlruns compliance and verify gates on push/PR and manual dispatch. - GitHub release matrix:
.github/workflows/release_artifacts.ymlruns onv*tags and manual dispatch; it builds cross-platform artifacts, verifies checksums, and publishes a GitHub Release. - GitHub release promotion:
.github/workflows/promote_release.ymlpromotes a preview release tag to a stable tag and republishes assets with promotion notes. - GitHub CD fallback:
.github/workflows/cd_release.ymlis a manual Windows-only fallback staging workflow. - Codeberg CI/CD:
.woodpecker.ymlprovides:- push/pull-request CI for
main - tag-driven
v*release staging (Linux artifact generation and dist packaging)
- push/pull-request CI for
- Release operator playbook:
docs/public/runtime/release-tooling-guide.md
src/
cosmos/
examples/
modules/
runtime/
runtime_modules/
style_templates/
tests/
docs/
config/
proto/
scripts/
examples/
templates/
Useful starting points:
src/runtime/api.nimsrc/runtime/config.nimsrc/runtime/validation.nimsrc/runtime/serialization.nimsrc/runtime/messaging.nimsrc/runtime/persistence.nimsrc/runtime/core.nim
If you are approaching the project for the first time, start with:
- docs/index.md
- docs/public/index.md
- docs/implementation/REQUIREMENTS.md
- docs/implementation/SPECIFICATION-NIM.md
- docs/implementation/PLAN.md
- docs/implementation/IMPLEMENTATION-DETAILS.md
- docs/implementation/DEVELOPMENT-GUIDELINES.md
- docs/implementation/MODULES.md
- Application Developer Getting Started Guide
The standard repository workflow is:
- Read the affected requirement sections.
- Update compliance mappings when requirements change.
- Implement code changes.
- Add or update tests.
- Run verification commands.
- Record evidence in the pull request.
The compliance gate script is located at
scripts/verify/check_requirements.ps1.
Header templates live under templates/headers/.
To generate a new Nim module with the expected project header structure, use:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/dev/new_nim_module.ps1 -Kind runtime -Name API -RelativePath src/runtime/api.nim -Summary "Public runtime API types and input validation framework." -Simile "API is the contract between modules and the runtime." -MemoryNote "All types are validated at boundaries; private procs assume correctness." -Flow "Public proc input -> validate -> fail-fast on error -> proceed with private implementation."Supported -Kind values:
runtimecosmostestexamplestyle
This project is licensed under the Wilder Foundation License 1.0.
Read the full license text in LICENSE.
© 2026 Wilder. All rights reserved.
Contact: teamwilder@wildercode.org
Licensed under the Wilder Foundation License 1.0.
See LICENSE for details.
