Merge commit '4601b000768b79077e568e59a83a3569599f000a'

This commit is contained in:
Alexa Amundson
2025-11-28 23:03:42 -06:00
3 changed files with 110 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
**Total Archived Items:** 1 **Total Archived Items:** 1
**Last Updated:** 2025-11-25 **Last Updated:** 2025-11-25
**Total Archived Items:** 0 **Total Archived Items:** 0
**Total Archived Items:** 7
**Purpose:** Master index of all archived content **Purpose:** Master index of all archived content
--- ---
@@ -149,6 +150,11 @@ Canonical versions of intellectual property, protocols, and frameworks.
- Version: 0.1 - Version: 0.1
- Archived: 2025-11-28 - Archived: 2025-11-28
- Source: `BlackRoad-OS/blackroad-os-archive` @ `N/A (initial archival)` - Source: `BlackRoad-OS/blackroad-os-archive` @ `N/A (initial archival)`
- [Trinary Encoding Specification (Base27, Base81, Base729)](../ip/trinary-encoding-spec.md)
- Category: IP / Protocol
- Archived: 2025-11-28
- Source: `BlackRoad-OS/blackroad-os-archive`
- Focus: Balanced ternary alphabets, Base81 ordering, Base729 mapping via Base27 pairs
--- ---
@@ -267,6 +273,8 @@ Archive documentation and operational files.
- New categories: Deploy Logs, System Pings, Beacon Maps, Artifacts, Reports - New categories: Deploy Logs, System Pings, Beacon Maps, Artifacts, Reports
- Updated invariants (append-only, stable IDs, timestamps, context tags) - Updated invariants (append-only, stable IDs, timestamps, context tags)
- Added compliance and security guidance - Added compliance and security guidance
### 2025-11-28
- Trinary Encoding Specification archived under IP (Base27/Base81/Base729 mapping)
### 2025-11-24 ### 2025-11-24
- Initial archive structure created - Initial archive structure created

View File

@@ -26,6 +26,11 @@
- Compliance and security guidance added - Compliance and security guidance added
- Local emoji legend created - Local emoji legend created
- **Significance:** Archive now serves as immutable memory for all of BlackRoad OS - **Significance:** Archive now serves as immutable memory for all of BlackRoad OS
#### 2025-11-28
- **Trinary Encoding Alphabet & Base729 Mapping** 🧬
- [Trinary Encoding Specification](../ip/trinary-encoding-spec.md) defines Base27, Base81, and Base729 alphabets with balanced-ternary semantics for RoadChain/Lucidia payloads.
- Significance: Establishes canonical mapping for paraconsistent trits and high-density archival strings, enabling PS-SHA∞ and coherence-aware data interchange.
- Related: Extends the archive's IP catalog beyond workflows and snapshots.
#### 2025-11-24 #### 2025-11-24
- **BlackRoad OS Archive Initialized** 🕯️ - **BlackRoad OS Archive Initialized** 🕯️
@@ -115,6 +120,7 @@ Incident postmortems and audits
Formal intellectual property registrations Formal intellectual property registrations
- 2025-11-28: Agent Soul Seeds (11 personas) - 2025-11-28: Agent Soul Seeds (11 personas)
- 2025-11-28: Trinary Base729 Encoding Specification archived as first IP artifact - 2025-11-28: Trinary Base729 Encoding Specification archived as first IP artifact
- 2025-11-28: Trinary Encoding Alphabet & Base729 Mapping ([spec](../ip/trinary-encoding-spec.md))
### 📚 Documentation ### 📚 Documentation
Major documentation milestones Major documentation milestones
@@ -220,6 +226,9 @@ Legal and corporate structure events
- **Total IP Registrations:** 0 - **Total IP Registrations:** 0
- **Total System Prompts:** 1 - **Total System Prompts:** 1
- **Timeline Span:** 1 day - **Timeline Span:** 1 day
- **Total Snapshots:** 1
- **Total IP Registrations:** 1
- **Timeline Span:** 4 days (2025-11-24 to 2025-11-28)
- **Most Active Month:** November 2025 (3 entries) - **Most Active Month:** November 2025 (3 entries)
- **Most Active Year:** 2025 (3 entries) - **Most Active Year:** 2025 (3 entries)

View File

@@ -0,0 +1,93 @@
# Trinary Encoding Specification (Base27, Base81, Base729)
**Category:** IP | Protocol
**Source Repo:** `BlackRoad-OS/blackroad-os-archive`
**Source Path:** `ip/trinary-encoding-spec.md`
**Source Commit:** `N/A (initial archival in this repository)`
**Archived On:** 2025-11-28
**Archived By:** agent:gpt-5.1-codex-max
**Status:** Living Document
---
## Purpose
Define a balanced-ternary encoding stack that bridges binary data to higher-density alphabets suitable for RoadChain and related Lucidia components. The spec emphasizes deterministic mapping, collision-free symbol choices, and graceful handling of paraconsistent states (1, 0, +1) used in the coherence formula:
\[ C(t) = \frac{\Psi'(M_t) + \delta_t}{1 + |\delta_t|} \]
## Balanced Ternary Model
- **Digits (trits):** 1, 0, +1
- **Semantics:**
- 1 → Negation / contradiction
- 0 → Null / unknown / superposition
- +1 → Affirmation / confirmation
- **Information density:** log₂(3) ≈ 1.585 bits per trit.
- **Normalization:** The absolute value in the coherence formula collapses sign while preserving contradiction magnitude, making balanced ternary a native fit.
## Alphabet Tiers
### Base27 (3³)
- **Symbols:** `A``Z`, `_` (27 total)
- **Indexing:** `025` map to `A``Z`; `26` maps to `_`.
- **Use Cases:** Compact labels, namespace prefixes, checksum syllables.
### Base81 (3⁴)
- **Symbols:**
- 26 uppercase: `AZ`
- 26 lowercase: `az`
- 10 digits: `09`
- 19 specials: `! @ # $ % ^ & * ( ) - _ = + [ ] { } |`
- **Ordering (value → symbol):**
- `025`: `AZ`
- `2651`: `az`
- `5261`: `09`
- `62 → !`, `63 → @`, `64 → #`, `65 → $`, `66 → %`, `67 → ^`, `68 → &`, `69 → *`, `70 → (`, `71 → )`, `72 → -`, `73 → _`, `74 → =`, `75 → +`, `76 → [`, `77 → ]`, `78 → {`, `79 → }`, `80 → |`
- **Rationale for specials:** All ASCII, visually distinct, shell-safe, and avoid whitespace/quote ambiguity.
- **Use Cases:** URI-safe payloads, human-facing keys, structured labels where case sensitivity is acceptable.
### Base729 (3⁶)
- **Symbolization options:**
1. **Base27 pairs (recommended):** Encode each 6-trit block as two Base27 symbols (27 × 27 = 729). Example mapping: high-order trits → first symbol; low-order trits → second symbol.
2. **Base81 digraphs:** Use two Base81 symbols but restrict to the first 729 combinations for backward compatibility; reject/flag overflow combos `>=729`.
3. **Unicode glyph set:** Reserve a contiguous Unicode block (e.g., Mathematical Operators) and map indices directly for dense, single-symbol rendering.
- **Use Cases:** High-density archival strings, PS-SHA∞ representations, inter-agent coherence payloads.
## Encoding Pipeline
1. **Binary → Integer:** Treat the byte string as a big-endian integer.
2. **Integer → Balanced Ternary:** Repeatedly divide by 3; remap remainders `0,1,2` to ternary digits `0,+1,1` using carry to keep digits in {1,0,+1}.
3. **Group Trits:** Chunk from most significant to least into:
- 3-trit groups → Base27
- 4-trit groups → Base81 (pad with leading zeros as needed)
- 6-trit groups → Base729
4. **Map to Alphabet:** Use the ordering tables above to convert each group to its symbol.
5. **Padding/Alignment:** When input length is not divisible by the group size, left-pad with `0` trits; record original bit length in framing metadata when round-tripping exact byte counts matters.
6. **Error Handling:** Reject symbols outside the defined alphabets; for Base81 digraphs used as Base729 surrogates, enforce the `0728` range and emit a contradiction flag (`1`) for out-of-range pairs.
## Binary Compatibility Notes
- **Lossless decode:** The balanced-ternary conversion is reversible; carries are deterministic and do not alter numeric value.
- **Flag-friendly trits:** The `1/0/+1` space can embed contradiction or integrity bits without leaving ternary space.
- **Interchange with Base64:** For interoperability, consider a shim where Base64 sextets are reinterpreted as 063 integers and lifted into balanced ternary blocks before symbol mapping, avoiding floating carries across block boundaries.
## Example Mapping (6 Trits → Base729 via Base27 pairs)
1. Trits: `[+1, 1, 0, +1, +1, 1]`
2. Value: \((+1)·3^5 + (1)·3^4 + 0·3^3 + (+1)·3^2 + (+1)·3 + (1) = 162 81 + 0 + 9 + 3 1 = 92\)
3. High digit: `92 // 27 = 3` (symbol `D`), low digit: `92 % 27 = 11` (symbol `L`)
4. Encoded pair: `DL`
## Integration with Coherence Formula
- **Contradiction channel:** Represent `δ_t` directly as a trit (1, 0, +1); downstream modules can attach this trit alongside payload trits without widening the alphabet.
- **Normalization:** Because `|δ_t|` collapses sign, a single trit can both mark contradiction and participate in normalization without leaving ternary space.
- **Hash embedding:** PS-SHA∞ outputs can be rendered in Base729 for density while preserving explicit contradiction markers during aggregation.
## Implementation Checklist
- [ ] Reference encoder/decoder covering Base27/Base81/Base729
- [ ] Test vectors for binary round-trips and contradiction flag propagation
- [ ] Service-level framing that records bit-length for exact byte recovery
- [ ] Optional Unicode glyph map for Base729 when single-symbol density is required