Skip to content
View rokoss21's full-sized avatar
:electron:
Building FACET — deterministic AI instruction language & ecosystem…
:electron:
Building FACET — deterministic AI instruction language & ecosystem…

Block or report rokoss21

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
rokoss21/README.md
FACET Logo RMCP+FACET: Operating System for AI Ecosystems

👋 About Me

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:


🚀 The FACET Ecosystem

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

Architectural Overview

+-----------------------+  +-----------------------+  +-----------------------+
|     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      |
+-----------------------+  +-----------------------+  +-----------------------+

Operational Capabilities

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

What this architecture enables

  • 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.


(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.


(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.


(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


🛠️ Core Competencies & Technical Focus

AI Systems & Intelligence Engineering

  • 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

Platform & Backend Engineering

  • 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

Software Architecture & Standards

  • Contract-first architecture
  • Language and protocol design
  • Deterministic execution models
  • Domain-driven design (DDD)
  • Specification writing (RFC-style, normative language)

Languages & Ecosystems

  • 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

DevOps, Tooling & Quality

  • CI/CD pipelines (GitHub Actions)
  • Deterministic build systems
  • Test-driven development (TDD)
  • Snapshot / golden testing methodologies
  • Release engineering & versioning discipline

💬 Let's Connect

  • Email: ecsiar@gmail.com
  • 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.md files to get started.

Pinned Loading

  1. facet-standard facet-standard Public

    The Deterministic Contract Layer for AI. Defines strict tool-calling protocols, the Token Box Model for context allocation, and type-safe execution. Treats AI behavior as compiled software, not pro…

  2. facet-compiler facet-compiler Public

    FACET v2.0 — Deterministic AI Architecture Compiler (NADL)

    Rust 1

  3. FACET FACET Public

    FACET (Feature‑Aware Contracted Extension for Text) is a human‑readable, machine‑deterministic markup language for AI prompting, orchestration, and tooling

    Python

  4. IOSM IOSM Public

    IOSM (Improve → Optimize → Shrink → Modularize) is a reproducible methodology for continuous system improvement, combining engineering rigor with business rationality. Unlike declarative approaches…

    1

  5. FACET-AGENTS FACET-AGENTS Public

    The practical application layer. A comprehensive collection of specialized AI agents demonstrating FACET's power in real-world scenarios, featuring self-evolving orchestration and intelligent task …

  6. rmcp-protocol rmcp-protocol Public

    RMCP Protocol 0.2.0-alpha introduces the first standardized communication layer for AI orchestration, powered by Prometheus Engine 0.1.21-alpha - an intelligent decision-making system that enables …

    Python