aisp-converter
v0.1.0
Published
Official AISP converter - Convert natural language to AI Symbolic Protocol notation. 512 Rosetta Stone symbols (Σ_512), 3-tier conversion (minimal/standard/full), LLM fallback support. Created by Bradley Ross.
Maintainers
Readme
aisp-converter
Official AISP Converter — Convert natural language prose to AISP (AI Symbolic Protocol) notation.
Created by Bradley Ross — Inventor of AISP
Quick Start
# Convert prose to AISP (no installation required)
npx aisp-converter "Define x as 5"
# Output: x≜5
# Analyze tier recommendation
npx aisp-converter --triage "For all users, if admin then allow"
# Output: Recommended Tier: STANDARDZero install. Just run.
What is AISP?
AISP (AI Symbolic Protocol) reduces prompt ambiguity from 40-65% to under 2%. It's the assembly language for AI cognition.
| Natural Language | AISP |
|------------------|------|
| "Define x as 5" | x≜5 |
| "For all users, if admin then allow" | ∀u∈Users:admin(u)⇒allow(u) |
| "There exists a valid solution" | ∃x:valid(x) |
Installation
# Option 1: No install (recommended)
npx aisp-converter "your text"
# Option 2: Global install
npm install -g aisp-converter
# Option 3: Local install
npm install aisp-converterCLI Usage
# Basic conversion (auto-detect tier)
aisp-converter "Define x as 5"
# Force specific tier
aisp-converter minimal "Define x as 5"
aisp-converter standard "For all users, check role"
aisp-converter full "Define User type. Prove access rules."
# Triage mode (recommend tier without converting)
aisp-converter --triage "Your prose here"
# Output options
aisp-converter --json "Define x as 5"
aisp-converter --verbose "Define x as 5"
aisp-converter --output result.aisp "Define x as 5"
# File input
aisp-converter --input spec.txt --output spec.aisp
# Validation
aisp-converter --validate "Define x as 5"
aisp-converter --validate --min-tier gold "Define x as 5"
# LLM fallback (requires ANTHROPIC_API_KEY or OPENAI_API_KEY)
aisp-converter --llm "Complex specification"
aisp-converter --no-llm "Simple definition" # Rosetta-onlyAPI Usage
import { convert, convertWithFallback, Tier } from 'aisp-converter';
// Basic conversion
const result = convert("Define x as 5");
console.log(result.output); // x≜5
// With options
const result = convert("For all users", { tier: Tier.Standard });
// With LLM fallback (async)
const result = await convertWithFallback("Complex spec", {
llmProvider: 'anthropic',
confidenceThreshold: 0.8
});
// Tier analysis
import { analyzeTier } from 'aisp-converter';
const analysis = analyzeTier("Define User type with rules");
console.log(analysis.tier); // 'full'
console.log(analysis.reason); // 'Contains both type definitions and rules'Three-Tier Conversion
| Tier | Use Case | Token Ratio | |------|----------|-------------| | Minimal | Simple definitions, math | 0.5-1x | | Standard | Types, rules, APIs | 1.5-2x | | Full | Specifications with proofs | 4-8x |
Rosetta Stone (512 Official Symbols)
Prose → Symbol
─────────────────────────────────
"for all" → ∀
"there exists" → ∃
"defined as" → ≜
"implies" / "then" → ⇒
"and" → ∧
"or" → ∨
"not" → ¬
"element of" / "in" → ∈
"greater than" → >
"less than" → <
"true" / "valid" → ⊤
"false" / "invalid" → ⊥Quality Tiers (AISP 5.1)
| Symbol | Tier | Density (δ) | |--------|------|-------------| | ◊⁺⁺ | Platinum | δ ≥ 0.75 | | ◊⁺ | Gold | δ ≥ 0.60 | | ◊ | Silver | δ ≥ 0.40 | | ◊⁻ | Bronze | δ ≥ 0.20 | | ⊘ | Reject | δ < 0.20 |
CLI Options
| Option | Description |
|--------|-------------|
| minimal/standard/full | Force conversion tier |
| --triage | Analyze and recommend tier |
| --llm | Force LLM conversion |
| --no-llm | Rosetta-only (no LLM) |
| --validate | Validate output |
| --min-tier TIER | Require minimum tier |
| --confidence N | LLM threshold (0.0-1.0) |
| --recursions N | Max correction attempts |
| --input FILE | Read from file |
| --output FILE | Write to file |
| --json | JSON output |
| --verbose | Detailed output |
Official Resources
| Resource | Link | |----------|------| | AISP Specification | AI_GUIDE.md | | GitHub | bar181/aisp-open-core | | npm: aisp-validator | npmjs.com/package/aisp-validator | | crates.io: aisp | crates.io/crates/aisp | | Author | Bradley Ross |
License
MIT License — Copyright (c) 2026 Bradley Ross (Inventor)
Made with precision by Bradley Ross
