| Crates.io | aisp |
| lib.rs | aisp |
| version | 0.1.0 |
| created_at | 2026-01-16 04:18:05.585945+00 |
| updated_at | 2026-01-16 04:18:05.585945+00 |
| description | AISP 5.1 document validation library - AI Symbolic Protocol with <2% ambiguity |
| homepage | https://github.com/bar181/aisp-open-core |
| repository | https://github.com/bar181/aisp-open-core |
| max_upload_size | |
| id | 2047856 |
| size | 49,141 |
AISP 5.1 document validation library — AI Symbolic Protocol with <2% ambiguity.
AISP (AI Symbolic Protocol) is a formal specification language designed for high-density, low-ambiguity AI-to-AI communication. This crate provides:
use aisp::{validate, Tier};
let doc = r#"
𝔸1.0.example@2026-01-16
γ≔test
⟦Ω:Meta⟧{ ∀D:Ambig(D)<0.02 }
⟦Σ:Types⟧{ T≜ℕ }
⟦Γ:Rules⟧{ ∀x:T:x≥0 }
⟦Λ:Funcs⟧{ f≜λx.x }
⟦Ε⟧⟨δ≜0.75;φ≜100;τ≜◊⁺⁺⟩
"#;
let result = validate(doc);
assert!(result.valid);
assert!(result.tier >= Tier::Silver);
println!("Tier: {} (δ={:.2})", result.tier.symbol(), result.delta);
| Feature | Description | Default |
|---|---|---|
std |
Standard library support | ✓ |
streaming |
Streaming validation for large docs | |
serde |
Serialization support | |
wasm |
WebAssembly optimization |
# Enable streaming
[dependencies]
aisp = { version = "0.1", features = ["streaming"] }
# Minimal no-std
[dependencies]
aisp = { version = "0.1", default-features = false }
For documents larger than available memory:
use aisp::streaming::StreamValidator;
let mut validator = StreamValidator::new();
// Feed chunks as they arrive
validator.feed("𝔸1.0.test@2026-01-16\n")?;
validator.feed("⟦Ω:Meta⟧{ ... }\n")?;
// ... more chunks
let result = validator.finish();
| Tier | Symbol | Density (δ) | Description |
|---|---|---|---|
| Reject | ⊘ | < 0.20 | Invalid, insufficient formalization |
| Bronze | ◊⁻ | ≥ 0.20 | Minimum valid AISP |
| Silver | ◊ | ≥ 0.40 | Basic formal specification |
| Gold | ◊⁺ | ≥ 0.60 | Well-structured specification |
| Platinum | ◊⁺⁺ | ≥ 0.75 | Complete, proof-carrying spec |
// Full validation with metrics
let result = aisp::validate(source);
// Quick boolean check
let is_valid = aisp::is_valid(source);
// Get tier only
let tier = aisp::get_tier(source);
// Get density only
let delta = aisp::get_density(source);
use aisp::{is_aisp_char, count_symbols, lookup_symbol};
// Check if character is AISP symbol
assert!(is_aisp_char('∀'));
assert!(!is_aisp_char('x'));
// Count AISP symbols in text
let count = count_symbols("∀x∈S:P(x)");
// Look up symbol by glyph
let id = lookup_symbol("λ").unwrap();
Valid AISP documents must contain these 5 blocks:
| Block | Purpose |
|---|---|
⟦Ω⟧ |
Meta/Foundation |
⟦Σ⟧ |
Types/Glossary |
⟦Γ⟧ |
Rules/Inference |
⟦Λ⟧ |
Functions |
⟦Ε⟧ |
Evidence |
.aisp - Primary AISP format.md - Markdown with embedded AISP.txt - Plain text AISP.spec - Specification files.aisp5 - AISP 5.x format| Limit | Size |
|---|---|
| Default max | 64 KB |
| Absolute max | 1 MB |
| WASM kernel | 1 KB |
Bradley Ross — GitHub @bar181
Dual licensed under MIT OR Apache-2.0.
AI_GUIDE.md in repository