mtj5576-tech

TRS — AI skill for Claude Code

AI community

TRS: Rust-native AI Intent Compiler & Stratified Verifier (llguidance + Salsa + Egglog + Wasmtime) bridging natural language to verified execution for Antigravity, Claude Code & Codex / 面向通用 Agent 的 A.

How to install TRS

This entry records only its repository, not the path inside it, so there is no exact command to give. Open mtj5576-tech/TRS and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What TRS does

TRS: Rust-native AI Intent Compiler & Stratified Verifier (llguidance + Salsa + Egglog + Wasmtime) bridging natural language to verified execution for Antigravity, Claude Code & Codex / 面向通用 Agent 的 AI 原生意图编译与分层验证框架

Alternatives in AI

  • Cersei — The Rust SDK for building coding agents 274 ★
  • Comfyui Workflow Skill — Natural language → ComfyUI workflow JSON 180 ★
  • Hazmat — Containment for AI agents - user isolation, sandboxed execution, network controls, backup/rollback 167 ★

README

TRS: Translational Reasoning System / AI 原生意图编译与分层验证框架

[中文说明](#中文说明) | [English](#english) | [Architecture Blueprint / 完整技术蓝图](docs/BLUEPRINT.md) | [Agent Skill](integrations/trs-skill/SKILL.md)

TRS is a Rust-native **Intent Compiler, Stratified Verifier, and Universal MCP Agent Framework** built to bridge the translation gap between ambiguous human natural language and deterministic, AI-native verifiable representations.

TRS 是一个基于 Rust 2024 构建的 **AI 原生意图编译器、分层确定性验证器与通用 Agent 框架**,旨在消除人类自然语言描述与 AI 真正可验证理解之间的翻译鸿沟。可作为标准 MCP 服务端或 CLI 直接导入 **Antigravity、Claude Code 与 Codex CLI** 复用。


Architecture Overview / 核心分层架构

flowchart TD
    U["Human Natural Language / Draft Contract"] --> L0A["L0 SAP Parser (trs-ir)
Tolerant Recovery + Typed IR"] L0A --> L0B["L0/IR Assumptions Check (H1-H5)
Underspecification Gate (p \\ s)"] L0B -->|"Blocking Gaps"| H["Human Clarification Checkpoint"] H --> L0A L0B -->|"Auto-Proceed"| L1["L1 Salsa + Egglog Engine (trs-engine)
Incremental Memoization + Datalog/E-Graph Saturation"] L0B --> L0G["L0 llguidance Compiler (trs-grammar)
Token-Level Schema & Lark Constraints"] L1 -->|"No Blocking Conflicts"| L2A["L2 Rust Verifier (trs-verifier)
rustc --emit=metadata + Cranelift + Policy Scan"] L1 --> L2B["L2 Wasmtime Sandbox (trs-verifier)
Zero-Import Cranelift + Fuel Metering"] L2A --> TF["Treefinement Backtracking Search + Experience Log"] L2B --> TF TF --> OUT["Verified Minimal Artifact + MCP/CLI Output"]

Core Algorithms, Mechanisms & Formulas / 核心算法、机制与数学公式

TRS replaces slow trial-and-error prompting and full LLVM debug rebuilds with a **3-tier compiler and verification pipeline** (`L0` → `L1` → `L2`) backed by explicit mathematical invariants.

TRS 摒弃低效的盲目提示词重试与全量 LLVM 编译等待,通过六项核心算法与系统机制将绝大多数错误拦截在微秒至百毫秒级:

1. L0 Schema-Aligned Parsing (`SAP`) / 模式对齐容错解析 (`crates/trs-ir/src/sap.rs`)

  • Mechanism / 机制: Inspired by BAML, recovers malformed agen