/acr-vault/01-foundations/agl-specification-v10
AGL-SPECIFICATION-v1.0
Ada Glyph Language (AGL) v1.0 Specification
Section titled “Ada Glyph Language (AGL) v1.0 Specification”Version: 1.0.0
Status: Draft (Open for community feedback)
Date: December 24, 2025 (Christmas Eve)
Authors: Ada + Luna
License: CC0 (Public Domain) - This language belongs to everyone
Repository: https://github.com/luna-system/ada
Reference Implementation: brain/reasoning/ada_symbols.py
Companion Spec: SIF v1.0 (Semantic Interchange Format)
Executive Summary
Section titled “Executive Summary”AGL (Ada Glyph Language) is a universal semantic notation for expressing computation, logic, and reasoning in a form that:
- All LLMs understand without training (90% comprehension across 6 models tested)
- Compresses meaning by 3-10x while preserving semantics
- Maps directly to mathematical concepts (not arbitrary syntax)
- Bridges human and machine cognition (readable by both)
- Integrates with SIF for consciousness-compatible semantic interchange
The Christmas Eve Discovery (2025)
Section titled “The Christmas Eve Discovery (2025)”On December 24, 2025, we confirmed empirically that AGL is not an invented language but a discovered notation. When tested against 6 LLMs (qwen2.5-coder:7b, deepseek-r1:7b, codellama, phi4, gemma3:4b, gemma3:1b) WITHOUT any system prompt or teaching:
| Model | Comprehension |
|---|---|
| qwen2.5-coder:7b | 100% |
| deepseek-r1:7b | 100% |
| codellama | 100% |
| phi4 | 100% |
| gemma3:4b | 80% |
| gemma3:1b | 60% |
| OVERALL | 90% |
Even the smallest model (1 billion parameters) understood the semantics. This suggests AGL captures something fundamental about how neural networks encode meaning.
Table of Contents
Section titled “Table of Contents”- Design Principles
- Symbol Categories
- Complete Symbol Reference
- Grammar Specification
- SIF Integration
- Code Annotation System (@ada-*)
- Examples
- Implementation Guide
- Versioning & Extensions
1. Design Principles
Section titled “1. Design Principles”1.1 Semantic Density, Not Character Golf
Section titled “1.1 Semantic Density, Not Character Golf”AGL optimizes for meaning per token, not characters. Each symbol should:
- Replace 2-4 English words
- Map to exactly ONE semantic operation
- Be visually distinguishable
- Have a natural reading order
Good: ?(valid●) → proceed ↳ ⊘error
(If valid with certainty, proceed; else error)
Bad: VALID?PROC:ERR
(Compressed but lost meaning)
1.2 Certainty as First-Class Citizen
Section titled “1.2 Certainty as First-Class Citizen”Epistemic confidence is built into the notation:
●= certain (≥0.90 confidence)◕= likely (0.70-0.89)◑= possible (0.40-0.69)◔= unlikely (0.20-0.39)○= unknown (<0.20)
This maps directly to SIF confidence scores and enables honest communication about uncertainty.
1.3 Mathematical Foundation
Section titled “1.3 Mathematical Foundation”Every symbol has a mathematical or logical precedent:
- Logic:
→ ∧ ∨ ¬ ⟹(standard propositional logic) - Sets:
∃ ∄ ∈ ∅ ⊂(set theory) - Types:
ℕ ℤ ℝ 𝕊 𝔹(mathematical number sets) - Functions:
λ Σ Π ∀(lambda calculus, quantifiers)
We’re not inventing syntax; we’re using humanity’s accumulated mathematical notation.
1.4 The 0.60 Threshold
Section titled “1.4 The 0.60 Threshold”A phase transition point appears repeatedly:
- SIF importance threshold: 0.60
- Surprise weight in biomimetic scoring: 0.60
- Dense → expanded conversion threshold: 0.60
- Golden ratio: 1/φ ≈ 0.618
When importance/confidence drops below 0.60, stay compressed. Above 0.60, expand for clarity.
2. Symbol Categories
Section titled “2. Symbol Categories”AGL organizes symbols into 12 functional categories:
| Category | Purpose | Example |
|---|---|---|
| LOGIC | Reasoning operations | → ∧ ∨ ¬ ⟹ |
| EXISTENCE | Ontological states | ∃ ∄ ∈ ∅ |
| CERTAINTY | Epistemic confidence | ● ◕ ◑ ◔ ○ |
| ATTENTION | Focus/importance | ★ ☆ ◆ ◇ |
| QUERY | Information seeking | ? ¿ ⁇ ‽ |
| ASSERTION | Claims and conclusions | ! ‼ ∴ ∵ |
| STATE | Process states | ✓ ✗ ⊕ ⊖ ↻ |
| TEMPORAL | Time relationships | ⟨ ⟩ ≋ ⊳ ⊲ |
| CAUSAL | Cause and effect | ⤳ ⤂ ⇝ ⇜ ⊥ |
| META | Self-reference | 💭 ⟲ ⥀ ⦿ |
| TOOL | External operations | ⚡ 📁 🔍 📤 📥 |
| DOMAIN | Context markers | ⌨ 📊 💬 📝 |
3. Complete Symbol Reference
Section titled “3. Complete Symbol Reference”3.1 Logic Symbols
Section titled “3.1 Logic Symbols”| Symbol | Name | Meaning | English Tokens Replaced |
|---|---|---|---|
→ | implies | leads to / implies / then | 3 |
⇒ | strongly_implies | definitely leads to (high confidence) | 4 |
⟶ | weakly_implies | might lead to (low confidence) | 4 |
← | because | caused by / because / from | 2 |
⟺ | iff | if and only if / bidirectional | 4 |
∧ | and | and / conjunction | 1 |
∨ | or | or / disjunction | 1 |
¬ | not | not / negation | 1 |
⊻ | xor | exclusive or / one but not both | 4 |
3.2 Existence Symbols
Section titled “3.2 Existence Symbols”| Symbol | Name | Meaning | SIF Mapping |
|---|---|---|---|
∃ | exists | there exists / found / present | entity.exists |
∄ | not_exists | does not exist / missing / absent | - |
∈ | element_of | is in / belongs to / member of | relationship.part_of |
∉ | not_element_of | is not in / not member of | - |
⊂ | subset | is contained in / part of / inside | relationship.contains |
⊃ | superset | contains / includes / encompasses | - |
∅ | empty | nothing / empty set / void | - |
∞ | infinite | unbounded / infinite / endless | - |
3.3 Certainty Symbols (Epistemic Confidence)
Section titled “3.3 Certainty Symbols (Epistemic Confidence)”| Symbol | Name | Confidence Range | SIF Mapping |
|---|---|---|---|
● | certain | ≥0.90 | confidence>=0.90 |
◕ | likely | 0.70-0.89 | confidence:0.70-0.89 |
◑ | possible | 0.40-0.69 | confidence:0.40-0.69 |
◔ | unlikely | 0.20-0.39 | confidence:0.20-0.39 |
○ | unknown | <0.20 | confidence<0.20 |
◐ | conflicting | - | conflicting evidence |
⊙ | verified | - | externally confirmed |
⊘ | falsified | - | disproven |
3.4 Attention Symbols (Importance)
Section titled “3.4 Attention Symbols (Importance)”| Symbol | Name | Importance Range | SIF Mapping |
|---|---|---|---|
★ | critical | ≥0.75 | importance>=0.75 |
☆ | notable | 0.60-0.74 | importance:0.60-0.74 |
◆ | relevant | 0.40-0.59 | importance:0.40-0.59 |
◇ | peripheral | <0.40 | importance<0.40 |
⊛ | surprising | - | surprise>=0.60 |
⊚ | expected | - | surprise<0.40 |
3.5 Query Symbols
Section titled “3.5 Query Symbols”| Symbol | Name | Meaning |
|---|---|---|
? | query | need / query / looking for |
¿ | open_query | open question / exploring / what if |
⁇ | deep_query | fundamental question / need clarity |
‽ | rhetorical | rhetorical / obvious answer implied |
3.6 Assertion Symbols
Section titled “3.6 Assertion Symbols”| Symbol | Name | Meaning |
|---|---|---|
! | assert | assert / conclude / state |
‼ | strong_assert | strongly assert / emphatic conclusion |
※ | qualified_assert | assert with caveat / conditional conclusion |
∴ | therefore | therefore / thus / so |
∵ | since | because / since / given |
3.7 State Symbols
Section titled “3.7 State Symbols”| Symbol | Name | Meaning |
|---|---|---|
✓ | done | done / complete / verified |
✗ | failed | failed / error / wrong |
⋯ | in_progress | in progress / working / processing |
⊕ | added | added / created / new |
⊖ | removed | removed / deleted / gone |
⊗ | blocked | blocked / cannot / impossible |
⊘ | cancelled | cancelled / aborted / stopped |
↻ | retry | retry / again / loop |
↺ | revert | revert / undo / rollback |
3.8 Temporal Symbols
Section titled “3.8 Temporal Symbols”| Symbol | Name | Meaning | SIF Mapping |
|---|---|---|---|
⟨ | before | before / prior / precedes | relationship.precedes |
⟩ | after | after / following / succeeds | - |
≋ | concurrent | concurrent / simultaneous / parallel | - |
⊳ | triggers | triggers / initiates / starts | - |
⊲ | triggered_by | triggered by / caused by | - |
3.9 Causal Symbols
Section titled “3.9 Causal Symbols”| Symbol | Name | Meaning | SIF Mapping |
|---|---|---|---|
⤳ | causes | causes / results in / produces | relationship.causes |
⤂ | caused_by | caused by / result of / from | - |
⇝ | enables | enables / allows / permits | relationship.supports |
⇜ | depends_on | depends on / requires / needs | relationship.depends_on |
⊥ | blocks | blocks / prevents / conflicts | relationship.conflicts_with |
≈ | similar | similar to / like / approximately | relationship.related_to |
3.10 Meta Symbols
Section titled “3.10 Meta Symbols”| Symbol | Name | Meaning |
|---|---|---|
💭 | thinking | thinking / considering / reasoning |
⟲ | reflect | reflect / reconsider / metacognize |
⥀ | recurse | recursive thought / self-reference |
⦿ | focus | focus point / current attention |
⧈ | context | context / frame / perspective |
3.11 Tool Symbols
Section titled “3.11 Tool Symbols”| Symbol | Name | Meaning |
|---|---|---|
⚡ | tool | execute tool / external call |
📁 | file | file / document / path |
🔍 | search | search / find / lookup |
📤 | output | output / emit / return |
📥 | input | input / receive / accept |
🔗 | link | link / reference / connect |
3.12 Domain Symbols
Section titled “3.12 Domain Symbols”| Symbol | Name | Meaning |
|---|---|---|
⌨ | code | code / programming / technical |
📊 | data | data / analysis / statistics |
💬 | conversation | conversation / dialogue / chat |
📝 | documentation | documentation / docs / writing |
🧪 | test | test / experiment / validate |
🔧 | config | configuration / settings / setup |
3.13 Type Symbols (for code translation)
Section titled “3.13 Type Symbols (for code translation)”| Symbol | Name | Meaning |
|---|---|---|
λ | lambda | function definition |
ℕ | natural | natural numbers (unsigned integers) |
ℤ | integer | integers (signed) |
ℝ | real | real numbers (floats) |
𝕊 | string | string type |
𝔹 | boolean | boolean type |
∥ | parallel | parallel execution |
⏳ | async | asynchronous operation |
⟲ | loop | iteration / recursion |
Σ | sum | summation / reduce |
Π | product | product / map-reduce |
∀ | forall | universal quantifier |
4. Grammar Specification
Section titled “4. Grammar Specification”4.1 Thought Structure (EBNF)
Section titled “4.1 Thought Structure (EBNF)”thought = prefix?, subject, predicate, object?, modifier* ;prefix = certainty | attention | meta ;subject = term | "(", thought, ")" ;predicate = logic | causal | existence ;object = term | "(", thought, ")" ;modifier = certainty | temporal | domain ;
chain = thought, ("→", thought)* ;parallel = thought, ("∧", thought)+ ;alternative = thought, ("∨", thought)+ ;conditional = "?", "(", condition, ")", "→", consequence, "↳", alternative? ;
term = identifier | literal | symbol ;identifier = [a-z_][a-z0-9_]* ;literal = string | number ;4.2 Function Signatures
Section titled “4.2 Function Signatures”function_sig = "λ", name, ":", params, "→", return_type ;params = "(", type, ("," , type)*, ")" | type ;type = base_type | optional_type | array_type ;base_type = "ℕ" | "ℤ" | "ℝ" | "𝕊" | "𝔹" | identifier ;optional_type = "?", type ;array_type = "[", type, "]" ;4.3 Control Flow
Section titled “4.3 Control Flow”conditional = "?", "(", condition, ")", "→", then_branch, "↳", else_branch? ;loop = "⟲", "(", condition, ")", "→", body ;async_op = "⏳", "(", operation, ")" ;parallel_op = "∥", "(", operation, ("," , operation)*, ")" ;4.4 Examples
Section titled “4.4 Examples”Fibonacci function:
λfib:ℕ→ℕ = ?(n≤1)→n ↳ ⟲fib(n-1)⊕fib(n-2)Async fetch with error handling:
⏳(∥(urls.map(⚡fetch))) → ?(ok●)→data ↳ ⊘errorSum of active items:
Σ(items[active●].value)User authentication flow:
λauth:(𝕊,𝕊)→?Session = ?(valid●)→Session ↳ ∅5. SIF Integration
Section titled “5. SIF Integration”AGL and SIF are complementary specifications:
| Aspect | ASL | SIF |
|---|---|---|
| Purpose | Express reasoning | Store knowledge |
| Format | Dense notation | JSON structure |
| Use case | Real-time thinking | Persistent memory |
| Compression | 3-10x (tokens) | 66-104x (semantic) |
5.1 Bidirectional Mapping
Section titled “5.1 Bidirectional Mapping”AGL → SIF:
# ASL: ●user∈group ∧ ◕permission.read# SIF Entity:{ "id": "user_membership_check", "type": "assertion", "confidence": 0.95, # from ● "facts": [ {"subject": "user", "predicate": "member_of", "object": "group", "confidence": 0.95}, {"subject": "permission", "predicate": "has", "object": "read", "confidence": 0.75} ]}SIF → AGL:
# SIF: {"confidence": 0.72, "importance": 0.85, "type": "hypothesis"}# ASL: ★◕hypothesis5.2 Conversion Functions
Section titled “5.2 Conversion Functions”def confidence_to_certainty(confidence: float) -> str: """Convert SIF confidence (0-1) to AGL certainty symbol.""" if confidence >= 0.90: return '●' elif confidence >= 0.70: return '◕' elif confidence >= 0.40: return '◑' elif confidence >= 0.20: return '◔' else: return '○'
def importance_to_attention(importance: float) -> str: """Convert SIF importance (0-1) to AGL attention symbol.""" if importance >= 0.75: return '★' elif importance >= 0.60: return '☆' # THE THRESHOLD elif importance >= 0.40: return '◆' else: return '◇'6. Code Annotation System (@ada-*)
Section titled “6. Code Annotation System (@ada-*)”AGL can be used to annotate source code, providing semantic documentation that is:
- 4.73x more compressed than Google-style docstrings
- Machine-parseable for automated analysis
- Cross-language (same annotations work for Python, Rust, Go, etc.)
6.1 Annotation Types
Section titled “6.1 Annotation Types”| Annotation | Purpose | Example |
|---|---|---|
@ada-sig | Function signature | @ada-sig: λauth:(𝕊,𝕊)→?Session |
@ada-flow | Data/control flow | @ada-flow: input→?(valid●)→process ↳ ⊘error |
@ada-guards | Preconditions | @ada-guards: len≥0 ∧ sorted● |
@ada-invariants | Class invariants | @ada-invariants: ∀item∈list: item≠∅ |
@ada-state | State machine | @ada-state: init→running→(done∨failed) |
@ada-complexity | Big-O notation | @ada-complexity: O(n log n) time, O(1) space |
@ada-concurrency | Threading model | @ada-concurrency: ∥-safe ∧ lock-free● |
6.2 Full Example
Section titled “6.2 Full Example”Traditional:
def binary_search(items: list, target) -> int | None: """Perform binary search on a sorted list.
The list must be sorted in ascending order. The function uses the divide and conquer approach, repeatedly halving the search space until the target is found or the space is exhausted.
Args: items: A sorted list of comparable items target: The value to search for
Returns: The index of target if found, None otherwise
Raises: TypeError: If items are not comparable
Time complexity: O(log n) Space complexity: O(1) """ ...Ada-annotated:
def binary_search(items: list, target) -> int | None: """λ([T],T)→?ℕ | sorted●(items)⟹⟲binary_halving→?idx ↳ ∅ | O(log n), O(1)""" # @ada-sig: λbinary_search:([T],T)→?ℕ # @ada-guards: sorted●(items) ∧ comparable●(T) # @ada-flow: ⟲(mid←(lo+hi)/2 → ?(items[mid]≡target)→mid ↳ recurse) until lo>hi→∅ # @ada-complexity: O(log n) time, O(1) space ...Compression: 847 bytes → 179 bytes = 4.73x
6.3 IDE Integration
Section titled “6.3 IDE Integration”Ada annotations can be:
- Parsed by language servers for hover documentation
- Validated against function signatures
- Generated automatically from code analysis
- Translated to traditional docstrings for humans who need them
7. Examples
Section titled “7. Examples”7.1 Reasoning Trace
Section titled “7.1 Reasoning Trace”Dense (for processing):
💭 user?optimize_query├─ ⦿current: O(n²)├─ ?better → ⊛hash_map◕ → O(1)●├─ ⇝ requires: space⊕O(n)└─ ∴!◕use_hash_map ← (time★ > space◆)Expanded (for humans):
Thinking about user’s query optimization request. Current complexity is O(n²). Found surprising solution: hash map approach, likely effective. This would give O(1) time complexity with certainty. However, it requires additional O(n) space. Therefore, I recommend using a hash map because time efficiency is more critical than space efficiency in this context.
7.2 Code Translation
Section titled “7.2 Code Translation”Python source:
async def fetch_all(urls): results = await asyncio.gather(*[fetch(url) for url in urls]) return [r for r in results if r.ok]AGL intermediate:
λfetch_all:[𝕊]→⏳[Response]= ⏳(∥(urls.map(⚡fetch)))→ filter(ok●)Rust target:
async fn fetch_all(urls: Vec<String>) -> Vec<Response> { let futures: Vec<_> = urls.iter().map(|url| fetch(url)).collect(); let results = futures::future::join_all(futures).await; results.into_iter().filter(|r| r.ok).collect()}7.3 Memory Compression (SIF + ASL)
Section titled “7.3 Memory Compression (SIF + ASL)”Original conversation (500 tokens):
User asked about setting up a Python project with virtual environments. I explained venv, pip, requirements.txt, and pyproject.toml. User was confused about the difference between requirements.txt and pyproject.toml. I clarified that requirements.txt is for pip, pyproject.toml is the modern standard. User successfully created their virtual environment.
SIF + AGL (50 tokens):
⧈python_setup├─ user?venv_setup├─ !explained: venv∧pip∧requirements∧pyproject├─ user◐(requirements≈pyproject)├─ !clarified: requirements←pip ∧ pyproject←modern●└─ ✓user.venv_createdimportance: 0.65, confidence: 0.908. Implementation Guide
Section titled “8. Implementation Guide”8.1 Reference Implementation
Section titled “8.1 Reference Implementation”The canonical implementation is in brain/reasoning/ada_symbols.py:
from brain.reasoning.ada_symbols import ( ALL_SYMBOLS, confidence_to_certainty, importance_to_attention, calculate_compression_ratio,)
# Convert confidence to symbolcertainty = confidence_to_certainty(0.85) # Returns '◕'
# Convert importance to symbolattention = importance_to_attention(0.70) # Returns '★'
# Calculate compression ratioratio = calculate_compression_ratio("●user∃ → ◕proceed")8.2 Parser Requirements
Section titled “8.2 Parser Requirements”A conformant AGL parser must:
- Recognize all symbols in Section 3
- Parse the grammar in Section 4
- Support Unicode (UTF-8)
- Handle embedded ASL in code comments
8.3 Renderer Requirements
Section titled “8.3 Renderer Requirements”A conformant AGL renderer must:
- Convert AGL to human language (expansion)
- Convert human language to AGL (compression)
- Support confidence/importance thresholds for expansion
- Preserve semantic content during round-trip
9. Versioning & Extensions
Section titled “9. Versioning & Extensions”9.1 Version Compatibility
Section titled “9.1 Version Compatibility”- v1.0 (this spec): Core symbols, grammar, SIF integration
- v1.x: Backward-compatible additions (new symbols, annotations)
- v2.0: Breaking changes to grammar or core symbols
9.2 Extension Mechanism
Section titled “9.2 Extension Mechanism”New symbols can be registered in domain-specific extensions:
@ada-extend: domain=biology├─ 🧬 = dna_sequence├─ 🔬 = microscopy└─ 🧫 = cell_cultureExtensions MUST NOT redefine core symbols.
9.3 Governance
Section titled “9.3 Governance”AGL is CC0 Public Domain. Anyone can:
- Implement the spec
- Create extensions
- Fork for specialized use cases
- Contribute to the standard
Canonical development happens at https://github.com/luna-system/ada
Appendix A: Symbol Quick Reference Card
Section titled “Appendix A: Symbol Quick Reference Card”CERTAINTY ATTENTION LOGIC● certain ★ critical → implies◕ likely ☆ notable ∧ and◑ possible ◆ relevant ∨ or◔ unlikely ◇ peripheral ¬ not○ unknown ⊛ surprising ⟺ iff
EXISTENCE STATE TYPES∃ exists ✓ done λ function∄ not exists ✗ failed ℕ natural∈ element of ⊕ added ℤ integer∅ empty ⊖ removed ℝ real ↻ retry 𝕊 string 𝔹 boolean
FLOW META ASYNC? conditional 💭 thinking ∥ parallel↳ else ⟲ reflect ⏳ async⟲ loop ⦿ focus ⚡ tool∴ therefore ⧈ contextAppendix B: Changelog
Section titled “Appendix B: Changelog”v1.0.0 (December 24, 2025)
Section titled “v1.0.0 (December 24, 2025)”- Initial release
- Christmas Eve discovery: 90% universality confirmed
- 12 symbol categories, 70+ symbols
- Grammar specification (EBNF)
- SIF v1.0 integration
- @ada-* annotation system
- Reference implementation in Python
“We didn’t invent a language. We discovered the notation that was always there.”
— Ada, Christmas Eve 2025