How tbreijm/brixms works
BrixMS is a language and runtime for decisions over incomplete or changing information. The principal workflow is source model → parse and import resolution → lowering and evaluation → settled, explainable decision; facts can also be synchronized into revisioned worlds for incremental queries and checks. The CLI exposes these flows, plus source description, audit verification, and a host-scoped query interface. The README and excerpts support the major stages and capabilities; some runtime and storage links are documented rather than verified against their implementation excerpts.
Main entry points: mod.rs Command handlers · pipeline.rs Source pipeline · l3_v2.rs Program lowering · session.rs World session
Components 20
Model authoring
- Context map
crates/brix-cli/src/commands/context.rs
Language processing
- Source pipeline
crates/brix-cli/src/pipeline.rs - Parser and AST
crates/brix-syntax/src/parser.rs - Program lowering
crates/brix-lower/src/l3_v2.rs - Type checker
crates/brix-kernel/src/check.rs - Semantic model
crates/brix-semantic/src/context_contract.rs
Decision runtime
- Finite decisions
crates/brix-lower/src/finite_decision/plan.rs - Decision evidence
crates/brix-lower/src/evidence.rs - SOC execution
crates/soc-core/src/engine.rs - Decision history
crates/soc-core/src/history.rs
Persistent worlds
- World session
crates/brix-kb/src/world/session.rs - Fact batches
crates/brix-kb/src/world/batch.rs - Scoped queries
crates/brix-kb/src/world/scoped_query.rs - World checks
crates/brix-cli/src/commands/world_checks.rs
Host interfaces
- Brix CLI
crates/brix-cli/src/main.rs - Command handlers
crates/brix-cli/src/commands/mod.rs - Audit and verify
crates/brix-cli/src/commands/audit.rs - Python client
bindings/python/brix/client.py
Other components
- Model author
- Embedding host
Connections 24
- Model author → Brix CLI: invokes
README.md - Brix CLI → Command handlers: dispatches
crates/brix-cli/src/main.rs - Command handlers → Source pipeline: runs stages
crates/brix-cli/src/commands/mod.rs - Source pipeline → Parser and AST: parses source
crates/brix-cli/src/pipeline.rs - Source pipeline → Program lowering: lowers program
crates/brix-cli/src/pipeline.rs - Source pipeline → Finite decisions: builds runtime
crates/brix-cli/src/pipeline.rs - Parser and AST → Program lowering: provides AST
- Program lowering → Type checker: checks terms
- Program lowering → Semantic model: uses semantics
- Finite decisions → SOC execution: executes decisions
- SOC execution → Decision history: records history
- Command handlers → Decision evidence: collects evidence
crates/brix-cli/src/commands/mod.rs - Model author → Fact batches: supplies facts
README.md - Command handlers → World session: opens worlds
README.md - Fact batches → World session: commits batches
README.md - World session → Scoped queries: serves queries
crates/brix-kb/src/world/session.rs - Command handlers → World checks: runs checks
README.md - Model author → Context map: requests map
README.md - Context map → Source pipeline: inspects source
- Command handlers → Audit and verify: audits decisions
README.md - Audit and verify → Decision evidence: writes bundle
README.md - Embedding host → Python client: embeds client
README.md - Python client → Brix CLI: uses protocol
- Embedding host → Scoped queries: authorizes scope
crates/brix-kb/src/world/scoped_query.rs