|
|
I am an AI & Platform Engineer and the author of FACET — the Deterministic Contract Layer for AI (since 2025).
My work focuses on a single core problem in modern AI systems:
the absence of enforceable contracts.
Most LLM-based systems rely on best-effort prompts, retries, and post-hoc validation — approaches that do not scale and cannot guarantee correctness.
FACET was created to address this at the standard level, not as another framework or wrapper, but as a formal contract layer that treats AI behavior as compiled software, not probabilistic improvisation.
The FACET standard defines:
- deterministic tool-calling contracts
- canonical, provider-independent intermediate representation
- reproducible context allocation and execution semantics
- explicit conformance levels and adapter requirements
This work is documented as a public specification and reference architecture, designed to outlive any single vendor, model, or SDK.
The broader FACET ecosystem — compilers, agents, orchestrators — exists to prove the standard in practice, not to replace it. Implementations may evolve; the contract remains.
My goal is to establish deterministic contracts as a baseline expectation for AI systems — in the same way type systems, IRs, and protocols became non-negotiable in traditional software engineering.
If this direction resonates with you, start with the standard itself:
- 📜 FACET Standard & Specification: https://github.com/rokoss21/facet-standard
- đź§ Design Rationale & History: https://github.com/rokoss21/facet-standard/blob/main/RATIONALE.md
- 🦀 Reference Compiler (Rust): https://github.com/rokoss21/facet-compiler
My work is centered around the FACET ecosystem — a vertically integrated, contract-first stack designed to make AI interactions as rigorous, predictable, and scalable as modern cloud infrastructure.
Each layer builds upon the previous one, forming a coherent system: from a deterministic language and formal specification, through a high-performance Rust compiler, to distributed orchestration and production-grade execution.
FACET is not a collection of tools. It is an architecture.
$ facetctl diag --arch --wide
[12:07:53] INFO loading FACET language ............. OK
[12:07:53] INFO loading MCP runtime ................ OK
[12:07:54] INFO connecting RMCP orchestrator ....... OK
[12:07:54] INFO shared services: policy | artifacts | event-bus+-----------------------+ +-----------------------+ +-----------------------+
| FACET Language | | FACET Compiler | | FSSG Publisher |
+-----------------------+ +-----------------------+ +-----------------------+
| Deterministic grammar | | High-performance Rust | | Deterministic builds |
| Pure lenses (|>) | | Type checking (FTS) | | HTML / Markdown |
| Output contracts | | Token Box Model | | Artifact generation |
| Canonical JSON (IR) | | Lens pipeline engine | | Byte-stable output |
+-----------------------+ +-----------------------+ +-----------------------+
+-----------------------+ +-----------------------+ +-----------------------+
| Policy Store | | Artifact Registry | | Event Bus / IO |
+-----------------------+ +-----------------------+ +-----------------------+
| RBAC & approvals | | Contracts & schemas | | Topics & queues |
| Guard rules | | Prompts & lenses | | Tool events |
| Audit logs | | Versioned modules | | Tracing & telemetry |
| Config management | | Reproducible inputs | | Deterministic IO |
+-----------------------+ +-----------------------+ +-----------------------+
fct build app.facet # Compile FACET to Canonical JSON
fct run app.facet --budget 4096 # Execute with strict token bounds
fct test app.facet # Run deterministic tests (golden)
facetctl lint ./specs/app.facet # Validate contracts & constraints
fssg build -c site.config.json # Generate deterministic artifacts
facetctl logs --follow # Observe agent execution- Deterministic execution — identical inputs produce identical outputs
- Contract-first AI systems — invalid states are rejected before runtime
- Provider independence — OpenAI, Anthropic, Gemini as interchangeable backends
- Reproducibility & auditability — snapshot testing, stable diffs, stable hashes
- Scalability by design — from single-agent workflows to distributed fleets
Each layer is a direct application of the same core principle:
AI systems should be engineered, not improvised.
đź‘‘ FACET Language
(Normative Language Definition)
The language-level definition of the FACET standard. A deterministic markup language for AI instructions, defining contracts, interfaces, and execution semantics.
This repository defines:
- the surface syntax of FACET
- contract constructs (
@input,@output,@interface) - deterministic composition primitives (lenses, pipelines)
It is the authoritative source of the language layer, not an application framework.
🦀 FACET Compiler
(Reference Compiler Implementation)
The reference compiler for the FACET standard. Implements the specification exactly, without extensions or shortcuts.
This compiler:
- parses FACET into a strict AST
- enforces the Facet Type System (FTS)
- builds the Reactive DAG (R-DAG)
- emits Canonical JSON as the intermediate representation
Other implementations are expected to match its observable behavior.
(Conformance Demonstrations)
A collection of AI agents built strictly on top of FACET contracts, used to validate reproducibility, tool-calling correctness, and multi-step determinism.
This repository exists to:
- stress-test the standard
- surface edge cases
- provide real-world failure data
It is a testbed, not a dependency.
⚡ FACET MCP Server
(Protocol Adapter & Execution Host)
An execution host that exposes FACET contracts to agents via a stable protocol boundary.
Used to validate:
- adapter behavior
- tool invocation guarantees
- isolation between contract definition and execution
(Canonical JSON Consumer)
Demonstrates how Canonical JSON enables deterministic downstream systems.
FSSG proves that:
- Canonical JSON is stable enough for publishing pipelines
- identical inputs produce byte-for-byte identical outputs
- FACET IR is suitable for caching, diffs, and audits
(Scaling & Coordination Layer)
A distributed orchestration engine that applies FACET contracts at scale.
This project explores:
- contract-aware scheduling
- deterministic coordination across agents
- protocol-level guarantees
- Deterministic AI system design
- AI orchestration & multi-agent coordination
- Contract-based tool calling & structured generation
- Agent execution models and reproducibility guarantees
- Failure-mode analysis of LLM systems across providers
- High-performance systems (SIMD-aware design)
- Asynchronous and event-driven architectures
- Distributed systems & coordination protocols
- API and protocol design for long-lived systems
- Runtime isolation and execution boundaries
- Contract-first architecture
- Language and protocol design
- Deterministic execution models
- Domain-driven design (DDD)
- Specification writing (RFC-style, normative language)
-
Rust — Expert
- Compiler construction
- Deterministic execution engines
- Memory-safe high-performance systems
- Zero-cost abstractions
-
Python — Expert
- AI tooling and orchestration
- Performance tuning (NumPy, Numba)
- Packaging and distribution (PyPI)
- Async systems and agent runtimes
-
JavaScript / TypeScript — Proficient
- Node.js services
- SDK and adapter development
- Tooling and integration layers
- CI/CD pipelines (GitHub Actions)
- Deterministic build systems
- Test-driven development (TDD)
- Snapshot / golden testing methodologies
- Release engineering & versioning discipline
- Email:
[email protected] - GitHub Discussions: Feel free to start a conversation on any of the project repositories.
- Contributing: I welcome contributions to my open-source projects. Check out the
CONTRIBUTING.mdfiles to get started.

