feat(core): P0 Sprint 1 - Zig to .t27 specs (6 files)#311
Merged
Conversation
…oses #222) Add brain summaries pipeline for Queen Lotus orchestration: - specs/queen/brain_summaries.t27: Spec for episode summarization - 6 tests for aggregation functions - 4 invariants for consistency checks - 2 benchmarks for performance - conformance/BRAIN_SUMMARIES_SCHEMA.json: JSON schema for summaries - .trinity/queen-brain/summaries/: Directory structure - .github/workflows/schema-validation.yml: Add brain summaries validation - .trinity/seals/BrainSummaries.json: Seal file Phase 4 progress: 50% (7/9 steps complete) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add similarity search operations for VSA trit vectors: - specs/vsa/similarity_search.t27: Similarity search spec - Cosine similarity [-1, 1] - Hamming similarity [0, 1] - Jaccard index [0, 1] - Top-K search with multiple metrics - HNSW-like approximate search structure - 8 tests, 5 invariants, 2 benchmarks - .trinity/seals/VSASimilaritySearch.json: Seal file Spec growth: 81 → 82 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Phase 4 progress: 50% → 60% - Spec count: 81 → 82 - Add Rings 061 (brain summaries) and 062 (VSA similarity search) to completed rings - Update queen health to 0.95 - Update revision note φ² + 1/φ² = 3 | TRINITY
Add fundamental ternary logic gates: - specs/isa/ternary_gates.t27: Ternary logic gates spec - NOT gate (ternary inverter) - MIN gate (acts as AND) - MAX gate (acts as OR) - Consensus, majority, any, all gates - 13 tests, 7 invariants, 4 benchmarks - .trinity/seals/TernaryGates.json: Seal file Spec growth: 82 → 83 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Phase 4 progress: 60% → 70% - Spec count: 82 → 83 - Add Ring 063 to completed rings - Update revision note φ² + 1/φ² = 3 | TRINITY
…loses #228) Add balanced ternary arithmetic operations: - specs/isa/ternary_arithmetic.t27: Ternary arithmetic spec - Single trit addition with carry propagation - Single trit subtraction with borrow - Single trit and word-level operations - Ternary to decimal and decimal to ternary conversion - Comparison operations for ternary words - 8 tests, 6 invariants, 4 benchmarks - .trinity/seals/TernaryArithmetic.json: Seal file Spec growth: 83 → 84 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…oses #230) Add ternary encoding schemes: - specs/base/ternary_encoding.t27: Ternary encoding spec - Bit to trit and trit to bit conversion - Nibble to 3 trits mapping - Byte to trit array conversion - Balanced to unipolar ternary conversion - String/character encoding - 9 tests, 5 invariants, 3 benchmarks - .trinity/seals/TernaryEncoding.json: Seal file Spec growth: 84 → 85 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Phase 4 progress: 70% → 80% - Spec count: 83 → 85 - Add Rings 064 (ternary arithmetic), 065 (ternary encoding) to completed rings - Update queen health to 0.98 - Update revision note with ISA layer progress φ² + 1/φ² = 3 | TRINITY
Add ternary memory operations: - specs/base/ternary_memory.t27: Ternary memory spec - TritCell with metadata (state, access count, timestamp) - TernaryWord (27 trits) with checksum - TernaryMemoryBank for allocation and access - Locking and dirty state tracking - 8 tests, 6 invariants, 4 benchmarks - .trinity/seals/TernaryMemory.json: Seal file Spec growth: 85 → 86 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Phase 4 progress: 80% → 90% - Spec count: 85 → 86 - Add Ring 066 (ternary memory) to completed rings - Update queen health to 1.0 (excellent) - Update revision note with base layer progress φ² + 1/φ² = 3 | TRINITY
Add ternary shift and rotate operations: - specs/isa/ternary_shift.t27: Ternary shift spec - Left/right shift with zero fill - Left/right rotate (circular shift) - Arithmetic shift right (sign-preserving) - Trit extraction and insertion - 9 tests, 5 invariants, 4 benchmarks - .trinity/seals/TernaryShift.json: Seal file Spec growth: 86 → 87 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ternary bitwise operations: - specs/isa/ternary_bitwise.t27: Ternary bitwise spec - Tritwise AND, OR, XOR, NOT operations - NAND, NOR, XNOR operations - Mask and merge operations - 9 tests, 5 invariants, 5 benchmarks - .trinity/seals/TernaryBitwise.json: Seal file Spec growth: 87 → 88 specs (target: 100 by Ring 070) φ² + 1/φ² = 3 | TRINITY Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rings 071-082 added to completed rings - Spec count: 90 -> 100 (MILESTONE) - Phase 4 progress: 93% -> 99% - Crown automation ring: 070 -> 082 phi^2 + 1/phi^2 = 3 | TRINITY
TA1 Conformance (7/7 requirements compliant): - ternary_logic.t27 (Ring 18) - K3 semantics - proof_trace.t27 (Ring 19) - Bounded traces <=10 steps - datalog_engine.t27 (Ring 20) - Forward-chaining O(n) - restraint.t27 (Ring 21) - Bounded rationality - explainability.t27 (Ring 22) - XAI <=10 steps - asp_solver.t27 (Ring 23) - ASP with NAF - composition.t27 (Ring 24) - ML+AR patterns TA2 Conformance (4/5 compliant, 1 pending validation): - Hypervector bind/unbind - Similarity metrics - Bundle operations - ML+AR composition - Performance benchmarks (pending measurement) phi^2 + 1/phi^2 = 3 | TRINITY
- Add specs/physics/pellis-formulas.t27 (L5 anchor, Pell block, TDD blocks) - Add tri math compare with --pellis, --pellis-extended, --hybrid, --sensitivity - Append JSONL proof lines to .trinity/experience/math_compare.jsonl - Scaffold research/trinity-pellis-paper/ (README + formula table) - Seal PellisFormulas; update docs/NOW.md handoff Closes #277 Made-with: Cursor
…tepaper v3 Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
- Extracts WHAT: 5-trit-per-byte encoding for ternary data - Extracts WHY: Efficient storage for balanced ternary computation - Constants: TRITS_PER_BYTE=5, MAX_PACKED_BYTES=2400, MAX_TRITS=12000 - Functions: encodePack, decodePack, PackedBigInt arithmetic - L4 Compliance: 10+ tests, invariants for encoding/roundtrip - References: issue #298 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ractor Implements Sprint 3.5 addressing "generative mechanism" gap: - φ is unique fixed point of balancing recursion f(x) = (x + x⁻¹ + 1)/2 - Zero free parameters — analytically proven, no fitting - Convergence rate λ = (√5 - 1)/4 ≈ 0.309 Files added: - specs/math/phi_universal_attractor.t27: TDD spec with 8 tests + 5 invariants + 2 bench - coq/Kernel/PhiAttractor.v: Coq proof (phi_is_fixed_point, uniqueness lemma) - benchmarks/phi_attractor_convergence.py: Numerical verification - GITHUB_ISSUE_THEOREM3.md: GitHub issue template - docs/WHITEPAPER/gf_paper_v3_imrad_draft.md: Added §2.6, updated Abstract/Conclusion/§7 Co-authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Theorem: C(b) = b/ln(b) achieves unique minimum at b = e Among integer bases: ternary (b=3) costs 5.4% less than binary (b=2) Files: - specs/math/radix_economy.t27: TDD spec with 8 tests + 7 invariants - conformance/radix_economy_vectors.json: existing conformance vectors - .trinity/seals/RadixEconomy.json: seal hashes - .trinity/experience/2026-04-07_ring-050_sprint-3.5_radix-economy.json: TRI-LOOP entry Co-authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add three new .t27 specs for P0 Core Rewrite Sprint 1: - specs/numeric/formats.t27: GF16/f32 format conversion, ternary quantization - specs/vsa/sdk.t27: VSA SDK wrapper with Hypervector abstraction - specs/server/vm.t27: VSA Virtual Machine with opcode set All specs parse successfully with 0 errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add .github/workflows/release.yml for automated multi-platform publication - Add workspace Cargo.toml with ffi, python, javascript members - Update JavaScript package name to "golden-float" for npm consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, T-12, T-13) (#309) * feat(ring-071): NotebookLM backend - config, token, cookie_auth (T-11, T-12, T-13) * fix(ring-071): Rename token.py to auth_token.py to avoid stdlib conflict --------- Co-authored-by: Dmitrii Vasilev <admin@t27.ai>
Migrated 6 Zig files from gHashTag/trinity to .t27 specifications: 1. specs/vm/jit_semantics.t27 - JIT compilation semantics for VSA operations 2. specs/graph/knowledge_graph.t27 - Vector Symbolic Architecture knowledge graph 3. specs/numeric/bigint.t27 - Balanced ternary BigInt with Karatsuba multiplication 4. specs/hslm/forward_pass.t27 - Minimal forward pass for LLM inference 5. specs/vsa/sequence_hdc.t27 - Hyperdimensional Computing for language detection 6. specs/vsa/packed_vsa.t27 - Packed VSA operations with lookup tables Each spec follows L4 TESTABILITY with 8+ tests, invariants, and benchmarks. L6 CEILING: All numeric constants use GF16 encoding. L5 IDENTITY: TRINITY = φ² + φ⁻² = 3 preserved in comments. Co-authored-by: Dmitrii Vasilev <admin@t27.ai> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- Add Python PyO3 bindings (GF16, GF32) - Add JavaScript wasm-bindgen bindings - Add FFI layer with C ABI exports - Add unified C header (include/golden_float.h) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert 6 Zig source files from trinity-source/src/ to .t27 specs: 1. specs/ternary/bigint.t27 - Balanced ternary arbitrary precision arithmetic - TVCBigInt with 256 trit capacity - SIMD-optimized operations (Vec32i8, Vec32i16) - Karatsuba multiplication O(n^1.585) - Newton-Raphson division - 32 tests, 15 invariants, 11 benchmarks 2. specs/jit/jit.t27 - JIT compiler for VSA operations - x86-64 instruction encoding - mmap for executable memory - Code generation: bind, bundle, dot_product - JitCache for dimension-based caching - 15 tests, 10 invariants, 8 benchmarks 3. specs/vsa/vsa_core.t27 - Core VSA operations - bind/unbind (associative memory) - bundle2/bundle3 (superposition) - permute (position encoding) - similarity functions (cosine, hamming, dot) - 22 tests, 13 invariants, 12 benchmarks 4. specs/ternary/hybrid_bigint.t27 - Memory/speed trade-off - Packed storage (5 trits/byte) + unpacked computation - SIMD-accelerated operations - Lazy unpacking, dirty tracking - 30 tests, 15 invariants, 14 benchmarks 5. specs/neural/forward_pass.t27 - VSA-based neural network - Multi-head attention (3 heads) - Resonator training - Direct role averaging - Autoregressive generation - 30 tests, 15 invariants, 14 benchmarks 6. specs/numeric/format_conversion.t27 - Format conversions - GF16 (6:9 format), FP16, BF16, Ternary - CNN operations (conv2d, max_pool2d) - Quantization utilities - 22 tests, 14 invariants, 14 benchmarks Author: Dmitrii Vasilev SPDX-License-Identifier: Apache-2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Convert 6 Zig source files from trinity-source/src/ to .t27 specs as part of P0 Core Rewrite Sprint 1.
Files Converted
specs/ternary/bigint.t27 - Balanced ternary arbitrary precision arithmetic
specs/jit/jit.t27 - JIT compiler for VSA operations
specs/vsa/vsa_core.t27 - Core VSA operations
specs/ternary/hybrid_bigint.t27 - Memory/speed trade-off
specs/neural/forward_pass.t27 - VSA-based neural network
specs/numeric/format_conversion.t27 - Format conversions
Test Plan
Breaking Changes
None - this adds new spec files without modifying existing code.
Checklist
🤖 Generated with Claude Code