-
-
Limina: Neuro-symbolic physics verification uniting NVIDIA NIM extraction, a deterministic Rust engine, and a Three.js 3D lab.
-
Chimera Architecture: strict separation between Angular/Three.js UI, NVIDIA NIM extraction, and the deterministic Rust core.
-
Live Law Forge: compiles plain English rules into draft JSON DSL laws using dual-model consensus and SI dimensional checks.
-
3D Physics Laboratory: interactive WebGL Carnot boundary surface with real-time parameter sliders, violation zone, and claim probe.
-
Verification Pipeline: 5-step flow from unstructured text to SI mapping, Rust v5 interval engine, and 4 audited physical verdicts.
-
Analysis Workbench: evaluates 6 engineering claims, catching an IMPOSSIBLE speed claim (3.60e+8 m/s vs. c) with a 1.20x gauge.
Inspiration
Limina — The Frankenstein of Scientific Verification
A stitched-together fusion of probabilistic LLM extraction (NVIDIA NIM), a deterministic interval-arithmetic physics engine (Rust), and a real-time procedural 3D WebGL laboratory (Angular 21 + Three.js), exposed to AI agents over MCP.
Large Language Models write fluent engineering prose, yet they routinely endorse numbers that violate fundamental laws of nature—claiming heat engines above the Carnot efficiency ceiling, wind turbines past the Betz limit, or applying thermal cycle bounds to fuel cells and solar cells where those assumptions do not hold. Purely statistical models lack compile-time SI dimensional algebra, interval arithmetic over uncertain inputs, and formal tracking of physical assumptions.
We built Limina around one strict architectural firewall:
LLMs read prose and propose candidate rules, while deterministic Rust computes every physical bound, dimensional check, and final verdict.
What it does
Limina audits quantitative engineering claims against 35 declarative physical bounds across five domains of physics, visualizes theoretical limit barriers in interactive 3D, compiles user-authored rules from plain English, lints technical Markdown documents in CI and agent workflows, and exposes verification tools to AI assistants via MCP.
How a Claim Flows Through Limina
Paste text or drop an image → Extract quantities & units (
NVIDIA NIM) → Evaluate SI bounds (Rust) → Inspect in 3D & export audit report
1. Three Integrated Interfaces + MCP Server
Analysis Workbench (Text & Image Claim Auditing)
- Paste technical prose (up to 5,000 characters) or drop an image (PNG, JPEG, WebP transcribed via
/v1/transcribe). - Evaluates every extracted claim into one of four deterministic verdicts—
COMPATIBLE,CONDITIONAL,IMPOSSIBLE, orINSUFFICIENT_DATA—backed by theoretical ratios, primary literature references, and explicit physical assumptions. - Includes per-claim interactive instruments (gauges, Carnot/COP visualizers, curve explorers), a
Ctrl+Kcommand palette, and structured PDF report export (pdfmake).

Interactive 3D Physics Laboratory (/laboratory)
- Dual Visualization Modes: Switch between
- Physical apparatus—which procedurally assembles one of four generic physical benches (
flow,trajectory,wave, orquantum) strictly from parameter units and kinds without hardcoding law names—and - Mathematical boundary, mapping 0 parameters to a chamber (
/v1/evaluate), 1 parameter to a corridor (/v1/curve), and 2+ parameters to a 30 × 30 3D surface grid (/v1/surface).
- Physical apparatus—which procedurally assembles one of four generic physical benches (
- Live Limit Barrier & Breaking-Point Solver: Drag bench elements directly or edit values and units in real time; crossing a theoretical bound triggers a hatched past-limit overlay and a 3D alert barrier. Clicking Find breaking point (
/v1/solve) computes the exact threshold where a system crosses intoIMPOSSIBLE. - Multi-Law System Stress Test: Load 2 to 4 physical laws simultaneously and sweep a System load slider (
20%to150%) to locate the First breaking limit.

Live Law Forge, Markdown Physics Linter CLI (limina check) & MCP Server (limina-mcp)
- Describe a new physical constraint in plain English (
POST /v1/limits/author) to compile its SI formula and spawn a live 3D bench taggedDraft: written by AI, not validated. - Run
limina check design-spec.mdin local workflows or agent hooks (with--format textor--format json) to audit documents using deterministic exit codes (0clean,1at least oneIMPOSSIBLE,2execution error). - Connect
limina-mcpover stdio in Kiro or any MCP client to calllist_limits,explain_limit,evaluate_claim,solve_threshold, andanalyze_textdirectly during agent sessions.

2. Physics Coverage: 35 Bounds Across 5 Domains
Every built-in law is stored in data/limits/*.json with its mathematical formula, bounded SI dimension, constraint direction (max, min, or equal), validity domain, primary literature references (75 total references: 20 DOIs machine-checked against Crossref with zero mismatches, 1 arXiv DOI verified on DataCite, and 54 references without a DOI marked as not machine-checked), and explicit limitations:
| Domain | Count | Representative Governing Equations | Bounded SI Units |
|---|---|---|---|
| Mechanics & Relativity | 13 | Δv ≤ vₑ · ln(max(m₀, mf) / min(m₀, mf)) | m/s, J, W, N, s, dimensionless |
| Thermodynamics & Info | 6 | η ≤ 1 − Tc / Th, E ≥ kB · T · ln 2 | dimensionless, W/m², bit/s, J |
| Electromagnetism & Optics | 8 | F = q₁·q₂ / (4π ε₀ r²), d ≥ λ / (2 · NA) | N, V, J, m, rad, lm/W |
| Quantum, Atomic & Nuclear | 5 | Δx ≥ ħ / (2 Δp), Q = Δm · c² | m, J, dimensionless |
| Astrophysics & Cosmology | 3 | rs = 2GM / c², H = √(8π G ρ / 3) | W, m, Hz |
- Mechanics & Relativity (13):
speed_limit,tsiolkovsky,mass_energy,power_conservation,escape_speed_min,energy_momentum,relativistic_kinetic_energy,time_dilation,length_contraction,newton_gravity,kepler_third,escape_velocity,betz - Thermodynamics & Information (6):
carnot,cop,stefan_boltzmann,shannon_hartley,landauer,shockley_queisser - Electromagnetism & Optics (8):
coulomb,faraday_emf,photon_energy,photon_energy_wavelength,lorentz_force,abbe_limit,rayleigh_criterion,luminous_efficacy - Quantum, Atomic & Nuclear (5):
heisenberg,de_broglie,nuclear_q,hydrogen_levels,radioactive_decay - Astrophysics & Cosmology (3):
eddington_luminosity,schwarzschild_radius,friedmann_flat
3. Real Production Trace: Catching an Unstated Heat-Engine Assumption
Suppose an engineering draft claims an energy conversion efficiency of η = 0.90 operating between Th = 600 K and Tc = 300 K, without specifying whether the device is a two-reservoir heat engine. Limina computes the Carnot ceiling:
η_Carnot =
1 − (Tc / Th) = 1 − (300 / 600) = 0.50· Exceedance Ratio =0.90 / 0.50 = 1.8×
Instead of falsely rejecting a fuel cell or electrochemical system as IMPOSSIBLE, POST /v1/evaluate returns CONDITIONAL with the exact assumption required (using 1e+300 as the sentinel value for an open upper bound when the heat-engine cycle assumption is not stated):

How we built it
High-Level Architecture

1. Deterministic Rust Engine (limina-core & limina-dsl)
Our 6-crate Rust workspace (limina-core, limina-dsl, limina-extract, limina-api, limina-cli, limina-mcp) isolates all physical math inside limina-core, which depends solely on thiserror with zero .unwrap() calls in non-test library code across all crates:

Why this matters: Every numerical input is wrapped in a finite
Intervaland tagged with a 7-dimensional SI exponent vector at runtime. At startup,limina-dslcompiles all 35 JSON laws alongside 3 native Rust reference laws (betz,carnot,cop), rejecting dimensional mismatches (DimensionMismatch,DimensionlessArgumentRequired,OddExponentUnderSqrt,TemperatureKindMismatch) before a single user request is served, and loweringequal-direction laws into dual boundsF(x) ± abs(F(x)) · t.
2. Neuro-Symbolic Extraction & Dual-Model Law Forge (NVIDIA NIM)

All LLM interactions sit behind the ExtractionProvider Rust trait (nvidia/nemotron-3.5-lightning-30b-a3b, nvidia/nemotron-3-ultra-550b-a55b, and poolside/laguna-xs-2.1 fallback, guarded by a 15-second timeout and 60-second failure cooldown):
- Law Identification: Maps prose or transcribed images to one of the 35 built-in limits.
- Dual-Model Law Synthesis (Forge): When no built-in law applies, two independent models compile the user's English sentence into JSON DSL definitions and are cross-checked across 200 fixed-seed samples within a
10⁻⁶tolerance (compare.rs). Both models must agree across at least 50 mutually valid samples to earndraft_agreed; otherwise the candidate is quarantined asdraft_disputedand emits no verdict. - Parameter Extraction: Extracts numerical values, uncertainties, and units.
- Deterministic Evaluation: Hands intervals to
limina_core::decide.

3. Model Context Protocol Server (limina-mcp)
Built with the official Rust MCP SDK (rmcp), limina-mcp exposes Limina over stdio as a thin, stateless client of the HTTP API (LIMINA_API_URL) without duplicating any verdict logic or forwarding API keys. Registered in .kiro/settings/mcp.json and connected inside Kiro IDE, it gives coding agents five deterministic verification tools (list_limits, explain_limit, evaluate_claim, solve_threshold, analyze_text).
4. Spec-Driven Development & Guardrails with Kiro
We engineered Limina using 49 specs, 7 steering rules, and 4 hooks (backed by 2 PowerShell support/test scripts) to keep generative AI strictly bounded during development:
| Kiro Pillar | Repository Implementation | Concrete Impact on Code Quality |
|---|---|---|
| Specs (49) | decision-engine (v5 rules P-02, P-03, E-04), two-model-laws, laboratory-3d, limina-mcp |
Linked numbered specification invariants directly to Rust property tests and forbade hardcoded law names in 3D scene builders. |
| Steering (7) | Global (product.md, structure.md, tech.md) + file-scoped (physics-rules.md, testing.md, physics-claims.md, ui-design.md) |
Enforced SI Kelvin temperatures, banned invented physical constants, and blocked unverified claims in documentation. |
| Hooks (4) | submission-guard.json, core-tests-on-save.json, physics-lint.json, permission-guard.json |
Ran cargo fmt, clippy, and core tests on .rs saves, executed limina check when Markdown docs were edited, and guarded shell/file permissions. |
| Property Tests | proptest across 22 property-based test files (out of 55 Rust test files, 727 passing Rust tests + 374 web tests) |
Verified parity between JSON DSL laws and native Rust references (Betz, Carnot, COP) and proved draft laws never emit IMPOSSIBLE. |
5. Frontend (Angular 21.2 + Three.js 0.187.0) & Production Stack
- Backend & Rate Limiting: Served by Axum 0.8.9 and Tokio 1.54.1 with per-IP rate limiting (15 requests/hour default) on LLM-backed endpoints (
/v1/analyze,/v1/limits/author,/v1/transcribe). - Interactive 3D Client: Built with Angular 21.2, PrimeNG, Tailwind CSS 4, Three.js 0.187.0 (
UnrealBloomPasslighting), a zero-asset Web Audio procedural synthesizer (lab-audio.ts), and automatic WebGL fallback detection. - CI/CD & Hosting: GitHub Actions (
ci.yml) runscargo fmt --check,cargo clippy -D warnings, andcargo test --workspaceon every push;deploy.ymlships release binaries to our VPS behind Nginx and Cloudflare athttps://limina.backnd-api.cloudalongside a multi-stageDockerfile.
Challenges we ran into
Eliminating False IMPOSSIBLE Verdicts on Non-Heat-Engine Systems (6ecc1b0)
Carnot's efficiency limit (η ≤ 1 − Tc / Th) initially flagged fuel cells, batteries, and solar cells operating between two temperatures as IMPOSSIBLE. Without touching the frozen limina-core v5 engine, we wrapped Carnot in the API qualification layer (qualified.rs) with an open conversion_process assumption so missing heat-engine context yields CONDITIONAL—locked in by carnot_without_a_stated_heat_engine_is_never_impossible.
Quarantining Unvalidated AI-Authored Rules (6ecc1b0)
Even when two models agree across 200 samples, an AI-synthesized formula lacks external peer review. We updated compare.rs to require at least 50 mutually valid samples, restricted evaluation strictly to the compared parameter ranges, and wrapped every draft-* law in an open draft_formula assumption (a_draft_law_is_never_impossible).
Floating-Point Guard Design Flaw Near Zero Bounds (D-24 & regressions.rs)
A design flaw found by a smoke test, not by the property suite (D-24): our properties passed, yet a live Landauer test (bound about 3 × 10⁻²¹ J) returned CONDITIONAL instead of IMPOSSIBLE, because an absolute guard of 10⁻¹² (SI units) made IMPOSSIBLE unreachable for small quantities. We replaced it with a relative guard and added properties across scales. Separately, we injected bugs on purpose (a broken guard, a verdict taken from the wrong enclosure) to verify that the properties catch them; they did, with shrunk counterexamples kept in regressions.rs.
Rendering 35 Diverse Laws in 3D Without Hardcoding Scenes
Instead of building 35 bespoke 3D scenes, we engineered apparatus.ts to assemble four generic physical benches (flow, trajectory, wave, quantum) strictly from parameter units and kinds, while topology.ts maps 0, 1, or 2+ parameters to a chamber, corridor, or 30 × 30 surface grid.
Accomplishments that we're proud of
Deterministic Verdict Guarantee: No LLM ever computes a bound or a verdict. Extraction and AI-written laws can still be wrong, which is why AI-written laws are labelled drafts and never produce
IMPOSSIBLE, while every bound and verdict is computed deterministically in Rust with zero.unwrap()calls in non-test library code.Differential & Property-Based Proof Suite: Validating engine invariants across 55 Rust test files (including 22 property-based test files with
proptest, 1,101 total passing automated tests across Rust and web), proving numerical parity between declarative JSON DSL laws and native Rust reference implementations of Betz (Cp ≤ 16/27), Carnot, and COP.Audited Scientific Transparency: Embedding primary literature references (75 references, with 20 DOIs machine-checked against Crossref and 1 arXiv DOI verified on DataCite), validity domains, assumption branches (such as Shockley-Queisser single-junction
33.7%vs. multi-junction/concentrated86.8%), and explicit limitations inside every law file.
What we learned
Isolating generative models upstream of an interval-arithmetic symbolic engine turns LLMs into reliable extraction interfaces so the verdict layer cannot hallucinate arithmetic.
Executable Kiro governance—combining file-scoped steering rules, numbered specification invariants (
P-02,P-03,E-04), save hooks (core-tests-on-save,physics-lint), and a live MCP server (limina-mcp)—catches dimensional errors, formatting drift, and unstated assumptions immediately during development.
What's next for Limina
Persistent Law Registry: Adding database persistence (such as SQLite) beyond in-memory drafts so engineering teams can review, version, and promote domain-validated laws.
External Domain-Expert Review & Coverage Expansion: Submitting the 35 built-in JSON law definitions for formal domain-expert review and expanding coverage into structural mechanics, fluid dynamics, and electrochemical systems.
IDE & CI Ecosystems: Packaging
limina checkandlimina-mcpas reusable GitHub Actions and pre-built MCP bundles for hardware and simulation engineering teams.
Built With
- angular-cdk
- angular.js
- axum
- cloudflare
- docker
- github-actions
- kiro
- nginx
- nvidia-nim
- pdfmake
- playwright
- poolside
- primeng
- proptest
- rust
- rxjs
- serde
- tailwind-css
- three.js
- tokio
- typescript
- vitest
- web-audio-api
- webgl