
A next-generation Domain-Specific Language (DSL) designed to define, orchestrate, and execute AI-native, composable, reactive, and multimodal systems.
- Declarative-first: Express what should happen, not how
- Typed & Validated: Strong types, constraint logic, schema compliance
- AI-Native: Prompts, LLM inference, dynamic generation as first-class citizens
- Composable: Modular specs, reusable patterns, namespaced imports
- Extensible: Plugin-based architecture with secure runtime extensions
- Reactive: Trigger-based, event-driven, lifecycle-aware
- Secure: Field permissioning, trusted imports, deterministic evaluation
sigmos/
├── crates/
│ ├── core/ # Grammar, AST, parser
│ ├── runtime/ # Evaluation engine
│ ├── cli/ # CLI binary
│ ├── plugins/ # Official plugins (mcp, rest, etc.)
│ └── transpiler/ # Export formats (json, yaml, etc.)
├── docs/
├── examples/
├── spec/ # DSL EBNF, version log
├── registry/ # Plugin manifest JSON
└── tests/
# Clone the repository
git clone https://github.com/copyleftdev/sigmos.git
cd sigmos
# Build the project
cargo build --release
# Install the CLI
cargo install --path crates/cli
spec "Agent" v1.0 {
description: "Defines an AI Agent with LLM prompt capabilities."
inputs:
name: string
tone: enum("friendly", "hostile")
api_key: string { secret: true }
computed:
greeting: -> "Hello, I'm {{name}}, and I'm {{tone}}."
events:
on_create(agent): mcp.call("mission.begin", {
auth: ref("api_key"),
payload: { id: agent.name }
})
constraints:
assert name != ""
ensure tone in ["friendly", "hostile"]
lifecycle:
before: validate
after: log("agent init complete")
}
# Validate a specification
sigmos validate spec.sigmos
# Run a specification
sigmos run spec.sigmos
# Transpile to JSON
sigmos transpile spec.sigmos --to json
# Describe a specification
sigmos describe spec.sigmos
- Rust 1.70+
- Cargo
# Check all crates
cargo check --workspace
# Run tests
cargo test --workspace
# Run with all features
cargo test --workspace --all-features
This project enforces strict code quality standards:
- Zero unsafe code: All code must be memory-safe
- Clippy clean: No warnings allowed
- Formatted:
cargo fmt
enforced - Documented: All public APIs have doc comments with examples
- Tested: Comprehensive test coverage including doctests
# Format code
cargo fmt
# Run lints
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Test documentation
cargo test --workspace --doc
sigmos-core
: PEG grammar, AST definitions, parser implementationsigmos-runtime
: Async execution engine, event handling, lifecycle managementsigmos-cli
: Command-line interface with rich error reportingsigmos-plugins
: Plugin system and official plugin implementationssigmos-transpiler
: Export to JSON, YAML, TOML formats
SIGMOS features a rich type system with:
- Primitive types:
string
,int
,float
,bool
,null
- Generic types:
list<T>
,map<K,V>
- Custom types via
types {}
blocks - Constraint validation and type checking
Extend SIGMOS with custom functionality:
- Secure sandboxed execution
- Signature verification
- Runtime registration
- Async plugin methods
- Fork the repository
- Create a feature branch
- Make your changes following the code rules
- Ensure all tests pass and code is formatted
- Submit a pull request
- Idiomatic Rust: Zero unsafe, strict ownership model
- Highly Modular: Decoupled, trait-oriented design
- Extensive Docstrings: Every public item documented with examples
- Property-based Testing: Use
proptest
for comprehensive testing - Strong Typing: Avoid stringly-typed code, use newtypes
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.
SIGMOS is designed for the builders of what comes next - a future-proof DSL for orchestrating cognition, automation, and intelligence across AI-native systems.
SIGMOS: The modular operating specification for the AI era.