Package Exports
- semanticencoding
- semanticencoding/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (semanticencoding) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
π§© SCE β Semantic Communication Encoding
SCE (Semantic Communication Encoding) is a lightweight symbolic ontology that enables humans, LLMs, and automated systems to communicate meaning using a compact set of standardized emoji-based semantic operators.
Instead of relying solely on natural language β which is ambiguous, verbose, and difficult for machines to interpret consistently β SCE provides a structured vocabulary where each emoji carries an explicit role, definition, and usage rule.
π§ Think of SCE as a cross-lingual shorthand layer between reasoning and expression β useful in prompting, annotation, classification, compliance workflows, legal review, decision trees, and automated reasoning systems.
π Why SCE Exists
Existing large language systems understand emojis implicitly β but there is no global shared semantic contract that defines what they mean.
SCE solves that problem by providing:
- A machine-readable ontology (TypeScript schema)
- A runtime interpreter that can parse and resolve meanings from text
- A validation layer to ensure semantic consistency
- A lookup and extraction API for tool builders
The core benefit: Replace verbose natural language with compact semantic symbols:
Before: "This is a non-negotiable fact that must remain true..." (28 tokens)
After: π Student was injured on 11/06/24 (2 tokens for the symbol)
Result: ~93% token reduction + increased semantic precision.
π See the Prompting Guide for detailed token savings analysis and examples.
This makes semantic signals:
- Readable by humans
- Interpretable by LLMs
- Executable by downstream tools
π¦ Core Features
| Capability | Supported | Documentation |
|---|---|---|
| Extract emojis from text | β | CLI |
| Map emojis β formal definition | β | API |
| Validate ontology uniqueness & structure | β | API |
| Use ontology programmatically (TypeScript types) | β | API |
| MCP server for LLM integration | β | MCP |
| CLI for terminal workflows | β | CLI |
| Generate emoji β meaning lookup table | β | API |
| Extend or replace the ontology | π§ Yes (modular) | Contributing |
π Ontology Structure
The ontology is divided into semantic domains, each containing symbol definitions:
export const SemanticOntologySchema = {
structure: { ... },
legalPolicy: { ... },
reasoning: { ... },
tasks: { ... },
privacy: { ... },
actors: { ... },
state: { ... },
control: { ... },
} as const;Each definition adheres to:
interface SceSymbolDefinition {
emoji: string;
role: SceRole;
meaning: string;
allowedContext: SceContext[];
usage: SceUsage;
conflictsWith: string[];
example: string;
}π Runtime API
Import the interpreter:
import { interpreter, getDefinitionsFromText } from "semanticencoding";Extract meaning from free-form text
const text = "π Notify parents of outcome. β³ Pending response.";
const result = getDefinitionsFromText(text);
console.log(result);β‘οΈ This returns structured semantic metadata for each symbol found.
Parse raw emoji arrays
interpreter().forEmojis(["π", "β³"]);π§ͺ Ontology Validation
Validate your ontology instance to ensure:
- No duplicate emojis
- Required metadata exists
- allowedContext values are valid
import { validateOntology } from "semanticencoding";
console.log(validateOntology());
// β [] if no issuesπ§ Emoji Map Utility
Useful when embedding semantic references in front-end UIs or prompts:
import { SemanticOntologyEmojiMap } from "semanticencoding";
console.log(SemanticOntologyEmojiMap.tasks);
// β { action: 'π', todo: 'β', complete: 'β
', ... }π§± Extending SCE
SCE is intentionally modular and can be extended or forked:
import { interpreter } from "semanticencoding";
const CustomOntology = {
...SemanticOntologySchema,
domain: { debug: { emoji: "π οΈ", ... } }
};
const customInterpreter = interpreter(CustomOntology);π Intended Use Cases
- Prompt engineering & LLM semantic signaling
- Document annotation / legal review workflows
- AI-assisted compliance and investigation tooling
- Knowledge representation / reasoning frameworks
- Case management and structured task systems
- HumanβAI collaborative decision making
- Machine reasoning pipelines
πΊ Roadmap
| Stage | Status |
|---|---|
| v1 Core Ontology | βοΈ Complete |
| Validator + Interpreter | βοΈ Complete |
| Prompt-side decoding utility | π§ In progress |
| AI-assisted ontology expansion | π§ͺ Experimental |
| Plugin format (VSCode / Obsidian / ChatGPT) | Planned |
| Community symbol proposals | Planned |
π‘ Vision
SCE aims to become an open semantic layer enabling LLM-native communication protocols β similar to:
- Markdown (structure)
- Unicode (universality)
- RFC communication standards
β¦but optimized for compressed meaning, machine parsing, and human ergonomics.
π License
π€ Contributing
Contribution guidelines and governance are available online or in the repository documentation - CONTRIBUTING GOVERNANCE
Initial plans include:
- Symbol Proposal Process (SPP)
- Backward-compatibility guarantees
- Domain stewardship model
π Quick Demo
Input:
π Student harmed on 11/06/24
π Investigate witness list
β Notify OCR
β³ Await replyParsed output:
[
{ "emoji": "π", "role": "STRUCTURE", "meaning": "Pinned fact..." },
{ "emoji": "π", "role": "REASONING", "meaning": "Analysis step..." },
{ "emoji": "β", "role": "TASK", "meaning": "Uncompleted action..." },
{ "emoji": "β³", "role": "STATE", "meaning": "Pending action..." }
]π§ Project Status: Active Prototype
You are looking at a working draft of a standard.
If this resonates β help shape it. More information is available online and at our repository.