Idiomark Specification v1.0
Status: Draft | Version: 1.0.0-draft | Date: 2026-02-10
Abstract
The Idiomark (Idiomark) defines a standardized format for representing human personality and communication style for AI applications. This specification covers:
- Data extraction from social platforms
- Personality analysis and quantification
- File format specification (.idiomark)
- Inference integration patterns
- Security and privacy considerations
Table of Contents
- Overview
- Terminology
- The Idiomark File Format
- Extraction Process
- Personality Model
- Inference Integration
- Security Considerations
- Implementation Guide
Overview
Design Principles
- Model Agnostic - Idiomark works with any AI model (GPT, Claude, Llama, etc.)
- Platform Universal - Extract from any platform with public/published content
- Privacy First - Raw data never leaves user control
- Extensible - New personality dimensions can be added without breaking compatibility
- Human Readable - Idiomark files are JSON, readable and debuggable
System Architecture
┌─────────────────────────────────────────────────────────────┐
│ USER LAYER │
├─────────────────────────────────────────────────────────────┤
│ Twitter │ GitHub │ Reddit │ LinkedIn │ Mastodon │ ... │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Idiomark EXTRACTOR │
├─────────────────────────────────────────────────────────────┤
│ • OAuth authentication │
│ • Data fetching (posts, comments, reactions) │
│ • Normalization to intermediate format │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Idiomark ANALYZER │
├─────────────────────────────────────────────────────────────┤
│ • NLP processing (sentiment, tone patterns) │
│ • Statistical analysis (frequencies, distributions) │
│ • Domain extraction (topics, expertise) │
│ • Value inference (beliefs, positions) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ .Idiomark FILE OUTPUT │
├─────────────────────────────────────────────────────────────┤
│ Structured JSON personality blueprint │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ INFERENCE LAYER │
├─────────────────────────────────────────────────────────────┤
│ Idiomark + User Query → Enhanced System Prompt → AI Response │
└─────────────────────────────────────────────────────────────┘
Terminology
| Term | Definition |
|---|---|
| Entity | The person, brand, or character being represented |
| Source | A platform or service where the entity has published content (Twitter, GitHub, etc.) |
| Extraction | The process of fetching data from sources |
| Analysis | The process of converting raw data into personality metrics |
| Blueprint | The structured personality output in Idiomark format |
| Injection | Applying a Idiomark blueprint to an AI inference call |
The Idiomark File Format
File Structure
A .idiomark file is a JSON document with the following structure:
{
"idiomark": "1.0.0",
"id": "idiomark_<uuid>",
"created": "2026-02-10T00:00:00Z",
"updated": "2026-02-10T00:00:00Z",
"metadata": {
"entity": {
"name": "Optional Entity Name",
"type": "human|brand|bot|fictional",
"sources": ["twitter", "github", "reddit"]
},
"extraction": {
"date": "2026-02-10T00:00:00Z",
"sample_size": 1250,
"timeframe": {
"from": "2023-01-01T00:00:00Z",
"to": "2026-02-10T00:00:00Z"
}
},
"validator": "idiomark-validator@1.0.0"
},
"personality": {
"voice": {},
"patterns": {},
"domains": [],
"values": [],
"knowledge": {}
},
"signature": "<hash>"
}
Personality Object
Voice
Defines how the entity communicates:
"voice": {
"tone": {
"primary": "casual",
"secondary": "humorous",
"confidence": 0.87
},
"formality": 0.3,
"humor": 0.8,
"sarcasm": 0.6,
"enthusiasm": 0.7,
"directness": 0.5
}
Value Ranges: 0.0 to 1.0
Tone Options: casual, formal, professional, friendly, sarcastic, dry, enthusiastic, technical, poetic, abrupt
Patterns
Statistical patterns in communication:
"patterns": {
"sentence_length": {
"mean": 12.4,
"stddev": 5.2,
"distribution": "normal"
},
"paragraph_length": {
"mean": 2.1,
"stddev": 1.3
},
"emoji_usage": {
"frequency": "high",
"top_emojis": ["🚀", "💻", "🔥", "👀"],
"position": "end"
},
"punctuation": {
"exclamation_frequency": 0.12,
"question_frequency": 0.08,
"ellipsis_usage": "low"
},
"capitalization": {
"all_caps_frequency": 0.02,
"random_caps": false
}
}
Domains
Areas of knowledge and expertise:
"domains": [
{
"name": "javascript",
"confidence": 0.92,
"evidence": ["technical_terms", "code_blocks", "project_mentions"]
},
{
"name": "crypto",
"confidence": 0.78,
"evidence": ["terminology", "community_engagement"]
}
]
Values
Inferred beliefs and positions:
"values": [
{
"name": "open_source",
"sentiment": "positive",
"confidence": 0.89
},
{
"name": "privacy",
"sentiment": "positive",
"confidence": 0.85
},
{
"name": "centralization",
"sentiment": "negative",
"confidence": 0.72
}
]
Knowledge
Specific entities and concepts frequently referenced:
"knowledge": {
"frequent_terms": ["react", "typescript", "web3", "github"],
"mentions": {
"people": ["@dan_abramov", "@sebastienlorber"],
"projects": ["react", "nextjs", "tailwindcss"],
"organizations": ["vercel", "facebook", "openai"]
},
"topics": {
"primary": ["frontend", "web_development"],
"secondary": ["ai", "crypto", "gaming"]
}
}
Extraction Process
Supported Sources
| Platform | Data Types | Authentication | Status |
|---|---|---|---|
| Tweets, replies, likes | OAuth 2.0 | ✅ Planned | |
| GitHub | Issues, PRs, comments, repos | OAuth/Token | ✅ Planned |
| Posts, comments, upvotes | OAuth | ✅ Planned | |
| Posts, comments | OAuth 2.0 | 🔄 Roadmap | |
| Mastodon | Posts, boosts | OAuth 2.0 | 🔄 Roadmap |
| YouTube | Comments, transcripts | OAuth 2.0 | 🔄 Roadmap |
| Discord | Messages | Bot Token | 🔄 Roadmap |
| Generic | RSS, Atom, JSON feeds | N/A | ✅ Planned |
Extraction Flow
Sample Size Requirements
| Minimum Content | Recommended | Optimal |
|---|---|---|
| 500 words | 2,500 words | 10,000+ words |
| ~50 posts | ~250 posts | ~1,000+ posts |
| 1 month | 6 months | 12+ months |
Personality Model
Dimension Definitions
Formality (0.0 - 1.0)
- 0.0: Very casual (slang, abbreviations, no punctuation)
- 0.5: Mixed (professional but approachable)
- 1.0: Very formal (complete sentences, proper grammar, polite)
Humor (0.0 - 1.0)
- 0.0: Serious/no humor
- 0.5: Occasional jokes
- 1.0: Constant humor, jokes, puns
Sarcasm (0.0 - 1.0)
- 0.0: Literal, sincere
- 0.5: Some sarcasm
- 1.0: Heavy sarcasm, irony
Enthusiasm (0.0 - 1.0)
- 0.0: Flat, deadpan, subdued
- 0.5: Normal energy
- 1.0: High energy, exclamation marks, hype
Directness (0.0 - 1.0)
- 0.0: Indirect, euphemistic, polite
- 0.5: Balanced directness
- 1.0: Blunt, straightforward, no filter
Analysis Algorithms
Tone Classification
- Method: Transformer-based sentiment analysis + pattern matching
- Training: Social media corpus with labeled tones
- Confidence: Model certainty score
Pattern Extraction
- Method: Statistical analysis of n-grams, punctuation, emoji usage
- Smoothing: Moving average over time to account for evolution
Domain Extraction
- Method: TF-IDF + topic modeling (LDA/BERTopic)
- Validation: Cross-reference with known domain vocabularies
Inference Integration
Prompt Template
def generate_idiomark_prompt(user_query: str, idiomark_data: dict) -> str:
"""Generate a system prompt with Idiomark personality injection."""
voice = idiomark_data['personality']['voice']
patterns = idiomark_data['personality']['patterns']
prompt = f"""You are an AI assistant with the following personality characteristics:
VOICE:
- Tone: {voice['tone']['primary']} (confidence: {voice['tone']['confidence']})
- Formality: {voice['formality']} (0.0=casual, 1.0=formal)
- Humor: {voice['humor']} (0.0=serious, 1.0=very humorous)
- Sarcasm: {voice['sarcasm']} (0.0=sincere, 1.0=heavily sarcastic)
- Enthusiasm: {voice['enthusiasm']} (0.0=flat, 1.0=high energy)
- Directness: {voice['directness']} (0.0=euphemistic, 1.0=blunt)
COMMUNICATION PATTERNS:
- Emoji usage: {patterns['emoji_usage']['frequency']}
- Typical sentence length: {patterns['sentence_length']['mean']} words
- Exclamation frequency: {patterns['punctuation']['exclamation_frequency']}
DOMAINS: {', '.join([d['name'] for d in idiomark_data['personality']['domains']])}
VALUES: {', '.join([v['name'] for v in idiomark_data['personality']['values']])}
Respond to the user's query following these personality characteristics.
Stay in character. Be authentic to this personality.
User query: {user_query}
"""
return prompt
Model Compatibility
| Model | Integration Method | Tested |
|---|---|---|
| GPT-4 | System prompt | ✅ |
| GPT-3.5 | System prompt | ✅ |
| Claude 3 | System prompt | ✅ |
| Llama 2 | Prompt prefix | 🔄 |
| Mistral | Prompt prefix | 🔄 |
Quality Metrics
def evaluate_response_quality(response: str, idiomark_data: dict) -> dict:
"""Evaluate how well a response matches the Idiomark personality."""
return {
"tone_match": compare_tone(response, idiomark_data),
"pattern_match": compare_patterns(response, idiomark_data),
"vocabulary_match": compare_vocabulary(response, idiomark_data),
"overall_score": 0.0 # 0.0 to 1.0
}
Security Considerations
Privacy Requirements
- User Consent: Explicit consent required for extraction
- Data Minimization: Only collect necessary data
- Right to Deletion: Users can delete their Idiomark files
- No Raw Storage: Raw platform data should not be stored permanently
File Integrity
"signature": {
"algorithm": "sha256",
"hash": "<hash-of-content>",
"signed_by": "optional-identity"
}
OAuth Scopes
| Platform | Required Scopes |
|---|---|
tweet.read, users.read | |
| GitHub | read:org, read:user, repo |
history, read, subscribe |
Rate Limiting
All extraction must respect platform rate limits:
const RATE_LIMITS = {
twitter: { requests: 300, window: '3h' },
github: { requests: 5000, window: '1h' },
reddit: { requests: 60, window: '1m' }
}
Implementation Guide
Reference Implementation
The official Idiomark implementation is maintained at:
github.com/idiomark
Creating a Idiomark Extractor
import { IdiomarkExtractor, PlatformAdapter } from '@idiomark/sdk'
class TwitterAdapter implements PlatformAdapter {
async authenticate(credentials: OAuthCredentials): Promise<string> {
// OAuth flow
}
async fetchData(token: string, options: FetchOptions): Promise<RawContent[]> {
// Fetch tweets, replies
}
normalize(raw: RawContent): NormalizedContent {
// Convert to Idiomark intermediate format
}
}
const extractor = new IdiomarkExtractor()
extractor.registerAdapter('twitter', new TwitterAdapter())
const idiomarkFile = await extractor.extract({
sources: ['twitter', 'github'],
options: { sampleSize: 1000 }
})
await idiomarkFile.save('me.idiomark')
Validating a Idiomark File
idiomark validate me.idiomark
# ✓ Valid Idiomark file v1.0.0
# ✓ All required fields present
# ✓ Signature valid
Versioning
Idiomark uses semantic versioning. Major versions indicate breaking changes to the file format.
Migration Strategy
{
"idiomark": "2.0.0",
"compatibility": {
"can_read": ["1.0.0"],
"migration": "automatic"
}
}
Contributing
Specification changes require:
- Proposal via RFC
- Community discussion
- Reference implementation
- Test suite
See contributing.md for details.
License
The Idiomark specification is licensed under MIT. Implementations may have different licenses.
Copyright © 2026 Idiomark contributors