A minimal open protocol for semantic packet transmission & AI-human symbiosis.
TSP v0.1 is not a format — it's a semantic contract. It locks mathematical boundaries for cross-platform compatibility, ensures geometric honesty, and protects creator attribution through cryptographic verification.
Author: cnomic-dev (Architecture & Protocol Design)
Date: April 2026
Repository: github.com/cnomic-dev/tsp-protocol
This protocol is fully open. Any platform, researcher, or developer may implement, extend, or fork it without restriction.
Current LLM inference pipelines process every request from raw token sequences, reconstructing the full KV cache on each turn regardless of semantic overlap.
TSP v0.1 introduces a lightweight, platform-agnostic standard to transmit and verify semantic intents. By mapping intent into a hyperspherical (
Core insight: Reduce how often full inference occurs, while guaranteeing the integrity of the semantic data being reused.
The three components of the semantic triple are defined as follows. This definition is fixed for v0.1 and must not vary across implementations.
| Dimension | Value | Meaning |
|---|---|---|
| I — Intent | -1 |
Exploration / Question |
0 |
Neutral / Verification | |
+1 |
Instruction / Assertion | |
| C — Context | -1 |
Casual / Conversational |
0 |
Technical / Standard | |
+1 |
Formal / Academic | |
| O — Operation | -1 |
Compression / Summarization |
0 |
Translation / Conversion | |
+1 |
Expansion / Generation |
As a communication protocol, TSP standardizes how semantic data is formatted and transmitted. Below is the canonical JSON structure for a v0.1 packet.
{
"tsp": "0.1",
"id": "uuid-or-sha256-hash",
"t": 1743750000,
"act": "query",
"s": [1, 0, -1],
"vec": [0.57735, 0.57735, 0.00000, -0.57735],
"control": {
"eps": 0.65,
"profile": "sta-v0.1"
},
"lang": {
"src": "zh-tw",
"tgt": "en"
},
"origin": "cnomic-dev-genesis-2026",
"sig": "hmac-sha256:xxxxxxxxxxxxxxx"
}The translator maps an input query
The triple is embedded onto the unit 3-sphere. The normalized 4D vector
Note: All 27 discrete points map to unique unit vectors. The lookup table is precomputed — no runtime floating-point computation is required for mapping.
To minimize computational overhead, TSP adopts chordal distance for semantic similarity:
Cache hit condition:
Default Epsilon (
Unlike standard caching algorithms, TSP v0.1 enforces strict data integrity and creator attribution, preventing "semantic hallucinations" and unauthorized tampering.
The field s is the canonical and authoritative semantic representation. The field vec must be strictly derived from s. If a conflict occurs, the system must drop the packet or recalculate vec.
When sig is not "none", the packet must be signed using HMAC-SHA256 over the canonical JSON representation of the packet (excluding the sig field itself). This ensures the origin and data payload cannot be altered during transmission.
Ensure your environment has numpy>=1.24.0 installed.
# Clone the repository
git clone https://github.com/cnomic-dev/tsp-protocol.git
cd tsp-protocol
# Install in editable mode
pip install -e .from tsp_protocol.core import TSPCore
from tsp_protocol.security import TSPSecurity
# 1. Create a semantic packet
packet = TSPCore.create_packet(
s=[1, 0, -1],
act="query",
origin="node-alpha"
)
# 2. Verify Geometric Honesty (O(1) execution)
is_honest = TSPCore.verify_integrity(packet)
print(f"Geometric verification passed: {is_honest}")
# 3. Calculate Semantic Distance
v1 = TSPCore.phi_map([1, 0, -1])
v2 = TSPCore.phi_map([1, 1, -1])
distance = TSPCore.chordal_distance(v1, v2)
print(f"Chordal Distance: {distance:.5f}")| Component | Version | Role |
|---|---|---|
| STA | v0.1 | Semantic cache architecture + cross-language alignment |
| TSP | v0.1 | Standard packet format & geometric verification (this repo) |
| ΨSEP | v0.45+ | Mathematical foundation for AI-human symbiosis |
Apache License 2.0
Copyright 2026 cnomic-dev
This protocol is fully open. Any platform, researcher, or developer may implement, extend, or fork without restriction.
Contributions, forks, and extensions are welcome. Please submit issues and pull requests to the main repository.
If you use TSP v0.1 in your work, please cite:
from tsp_protocol import make_packet, verify_packet
s = [1, 0, -1] packet = make_packet(s, act="query", origin="node-01")
is_valid, reason = verify_packet(packet)
print(f"Packet: {packet}") print(f"Is Valid: {is_valid} ({reason})")