Deterministic compiler and execution layer for FACET v2.1.3.
facet-fct compiles .facet contracts into canonical, policy-aware AI request context with explicit failure semantics (F* codes), deterministic ordering, and bounded execution behavior.
- Deterministic pipeline: normalization -> resolution -> type check -> compute -> layout -> render
- Strict type and placement checks (FTS)
- Policy and guard fail-closed behavior (
F454,F455) - Canonical JSON output + stable document and policy hashes
- Spec-oriented examples and conformance suites in CI
cargo install --git https://github.com/rokoss21/facet-compiler --bin facet-fct
facet-fct --versionOptional short alias:
alias fct=facet-fctfacet-fct --version
# fct 0.1.2@meta
name: "hello"
@context
budget: 32000
@vars
query: @input(type="string")
@system
content: "You are a helpful assistant."
@user
content: $query
Save as hello.facet and create runtime input:
{ "query": "Hello FACET" }Save as hello.input.json.
facet-fct build --input hello.facet
facet-fct run --input hello.facet --runtime-input hello.input.json --exec --format prettycargo install --git https://github.com/rokoss21/facet-compiler --bin facet-fct
facet-fct --versionFrom Releases:
- Linux:
facet-fct-linux-x86_64.tar.gz - macOS (Intel):
facet-fct-macos-x86_64.tar.gz - Windows:
facet-fct-windows-x86_64.zip
Example (Linux/macOS):
tar -xzf facet-fct-*.tar.gz
chmod +x facet-fct
./facet-fct --versiongit clone https://github.com/rokoss21/facet-compiler
cd facet-compiler
cargo build --release --bin facet-fct
./target/release/facet-fct --versioncargo install --path . --bin facet-fct
facet-fct --versionOfficial Homebrew formula is not published yet. Use cargo install or release binaries.
# Parse + resolve + type check
facet-fct build --input file.facet
# Full execution (default mode: --exec)
facet-fct run --input file.facet --exec
facet-fct run --input file.facet --pure
# Provide runtime @input values
facet-fct run --input file.facet --runtime-input input.json --exec
# Run @test blocks
facet-fct test --input file.facet --exec
# Dump internals
facet-fct inspect --input file.facet \
--ast ast.json --dag dag.json --layout layout.json --policy policy.json
# Help
facet-fct --help
facet-fct run --help- Documentation portal: rokoss21.github.io/facet-compiler
- Quick Start: docs/01-quickstart.md
- Execution Model: docs/15-execution-model.md
- Production Failure Scenario: docs/16-production-scenario.md
- Integration Guide: docs/18-integration-guide.md
- Spec-conformance checklist: docs/14-v2.1.3-migration-checklist.md
- Language specification: FACET-v2.1.3-Production-Language-Specification.md
facet-fct build --input examples/spec/01_minimal.facet./scripts/smoke_examples_spec.sh ./target/release/facet-fct
./scripts/spec_matrix_examples.sh ./target/release/facet-fctcargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test -q --workspaceMinimal-risk adoption path:
- Keep your current provider SDK and business logic.
- Replace prompt assembly with
facet-fct run. - Keep strict response schema validation in host code.
- Add bounded retry/fallback policy in host runtime.
Detailed guide: docs/18-integration-guide.md
FACET does guarantee deterministic contract compilation/execution boundaries.
FACET does not guarantee deterministic model generation output or correctness of external APIs.
src/commands/*- CLI commands (build,run,test,inspect,codegen)crates/fct-parser- parser and normalizationcrates/fct-resolver- import resolution and deterministic mergecrates/fct-validator- type/semantic/policy checkscrates/fct-engine- compute/layout and guard-aware runtime behaviorcrates/fct-render- canonical JSON and provenance outputcrates/fct-std- standard lens registrydocs/- documentation and conformance evidenceexamples/spec/- ordered specification scenarios
- FACET Standard: github.com/rokoss21/facet-standard
- IOSM Methodology: github.com/rokoss21/IOSM
- IOSM CLI: github.com/rokoss21/iosm-cli
- Contribution guide: CONTRIBUTING.md
- Issues: github.com/rokoss21/facet-compiler/issues
Emil Rokossovskiy
- GitHub: github.com/rokoss21
- Email: ecsiar@gmail.com
- Site: facetcore.dev
Dual-licensed under MIT or Apache-2.0.