@lionlang/core 0.25 · @lionlang/cli 0.24 · @lionlang/ui 0.2 — SMT forall, PDR, proof/optimize & 14 live proof apps

Executable JSON.
Verifiable logic.

Use Lion to store dynamic app rules, verifiable policies, queryable knowledge bases, and streaming interactive UIs as plain JSON — evaluated in memory, explained with why, and formally proved across all inputs.

Copy into your coding agent llms.txt →

Read https://lionlang.dev/llms.txt and install Lion's agent skills with `npx skills add andrueandersoncs/lion` (or install `@lionlang/core` and `@lionlang/ui`). Help me build and verify our rules, logic model, or dynamic UI in Lion JSON.

What Only Lion Can Prove

6 flagship proof apps — zero backend, kernel-verified in browser

Each interactive artifact below is a single plain JSON file combining Datalog, exact rationals, DPLL(T) SMT, CDCL SAT, TLA+ liveness, and duality-certified optimization with a live generated UI. Open any app standalone or inspect and edit all 14 blueprints in the Lion Studio →

Promo & Margin Guardrail

proof/smt + optimize

Proves across every cart ($100–$5k) whether stackable promos bleed below COGS ($324k/yr exposure → $0k certified) and computes the exact duality-certified maximum safe discount cap.

Launch live proof app →

Zero-Trust IAM & SPOF Auditor

dominators + SAT RUP

Pinpoints hidden single-point-of-failure chokepoints ($480k/hr blast radius) via graph/dominators, traces transitive IAM escalation with why, and seals fixes with RUP SAT.

Launch live proof app →

Treasury Ledger Conservation

exact rationals + BMC

Eliminates floating-point penny drift with exact rationals, proves unbounded double-entry conservation via proof/invariant, and synthesizes live exploit traces under fault injection.

Launch live proof app →

Compliance & Policy Deadlock

Datalog + SAT Catch-22

Executable GDPR, HIPAA, and EU AI Act rules computing real-time fine exposure ($5M → $0M), why audit trails, and formal SAT proofs when legal mandates contradict.

Launch live proof app →

Consensus Liveness & WAL Refinement

proof/liveness + refines

Toggle Weak Fairness to switch between synthesized lasso starvation counterexamples and kernel-checked quorum progress proofs, plus stuttering-invariant buffered WAL refinement.

Launch live proof app →

SLA-Verified Cloud Cost Optimizer

proof/optimize MILP

Solves mixed-integer cluster sizing for throughput, RAM, and Multi-AZ Zero-SPOF constraints — emitting a Farkas / Chvátal-Gomory duality certificate proving no cheaper fleet exists.

Launch live proof app →
What you use Lion for

Live dynamic & streaming UIs, straight from JSON

Every interface below is rendered directly from a plain Lion JSON program running in a browser Web Worker — no React state, no template syntax, no unsafe eval(). Interact with any control, or toggle View / edit Lion JSON to inspect and change the program live.

Streaming & generative UI

Stream facts from an agent or server into a reactive UI

Watch four newline-delimited Lion JSON chunks stream into one logic database: contradiction alerts, graph bottlenecks, and exact proof/bounds financial intervals appear automatically as evidence arrives. Click the button inside the output to retract the unverified source.

Lion output research-stream.lion.json

Loading Lion runtime…

Dynamic app config & forms

Store validation lambdas and exact pricing in JSONB

Replace rigid feature-flag tables and unsafe JavaScript eval() with serializable lambdas and exact decimal arithmetic. Drag Nights to 1 with promo WEEKEND to trigger a live cross-field rule.

Lion output booking-rules.lion.json

Loading Lion runtime…

Verifiable auth & business rules

Audit every decision with why and prove invariants

Model RBAC/ReBAC and compliance limits in Datalog. Unsuspend Bo to watch the why provenance trace flip to Allowed, or drag the spend limit past $500 to watch proof/prove produce a live counterexample.

Lion output deploy-policy.lion.json

Loading Lion runtime…

Knowledge graphs & ontologies

Query dependencies, influence, and bottlenecks live

Built-in graph algorithms (graph/influence, graph/dominators, graph/pageRank, graph/shortestPath, graph/cycles) run as ordinary Datalog goals. Toggle the failover route to eliminate auth as a single point of failure.

Lion output service-graph.lion.json

Loading Lion runtime…

Every example above uses the same small JSON language — build workflows, research artifacts, or custom domain rules the same way.

Explore full Docs & Reference →
Agent-first

Built to work cleanly with coding agents

Machine-readable docs, official skills, and static checking with JSON pointers — zero guesswork.

llms.txt

Auto-verified

Generated from the same live-evaluated examples as docs.html. One request gives any agent Lion's syntax rules, CLI, packages, and complete Markdown reference.

Agent skills

Research & reasoning

Install lion-research (proof-building deep research with standalone explorer.html) and lion-reasoning (content-hashed working memory for long debugging and audit sessions).

npx skills add andrueandersoncs/lion

lion check

Static lints

Catches arity errors, typos, unreachable match cases, and unsafe rules with exact JSON pointers before anything runs — giving agents a tight self-correction loop.

npx @lionlang/cli check rules.json
Packages

Modular, MIT licensed, Effect-native

Run in Bun, Node, or the browser.

@lionlang/core

v0.25.0

Evaluator, sandbox metering & permissions, WAL journal with branching/OCC, JSON Schema export, RFC 6902 autofix, Ed25519 proof envelopes, DPLL(T) SMT with forall E-matching, PDR strengthening, and duality-certified proof/optimize.

npm install @lionlang/core effect
View on npm →

@lionlang/ui

v0.2.0

36 pure JSON UI primitives (ui/graph, ui/section, ui/proof with live SMT models & DPLL(T) lemma cards, ui/why, ui/diff), streaming sessions, and standalone public HTML artifact export.

npm install @lionlang/ui @lionlang/core effect
View on npm →

@lionlang/cli

v0.24.0

The lion command: evaluate files, run lion check, host lion mcp & lion serve (HTTP+SSE), persist databases with --database, inspect & diff, and emit a browser lion worker.

npx @lionlang/cli --help
View on npm →

@lionlang/typesafe-ai

v0.1.0

TypeSafe AI and Jev bindings (typesafe/noul, typesafe/choice, typesafe/score, typesafe/system-one) for hybrid neural-symbolic programs.

npm install @lionlang/typesafe-ai
View on npm →