Idiomark File Format
Complete guide to the .idiomark file structure.
Overview
A .idiomark file is a JSON document that represents a personality blueprint. It follows the Idiomark Specification.
File Structure
{
"idiomark": "1.0.0",
"id": "idiomark_<uuid>",
"created": "2026-02-10T00:00:00Z",
"updated": "2026-02-10T00:00:00Z",
"metadata": { ... },
"personality": { ... },
"signature": "sha256:..."
}
Top-Level Fields
| Field | Type | Required | Description |
|---|---|---|---|
idiomark | string | Yes | Protocol version (semver) |
id | string | Yes | Unique identifier (must start with idiomark_) |
created | string | Yes | ISO 8601 creation timestamp |
updated | string | Yes | ISO 8601 last updated timestamp |
metadata | object | Yes | Metadata about the entity and extraction |
personality | object | Yes | Personality data |
signature | string | No | Cryptographic signature for verification |
Metadata Object
{
"metadata": {
"entity": {
"name": "Optional Entity Name",
"type": "human|brand|bot|fictional",
"sources": ["twitter", "github", "reddit"]
},
"extraction": {
"date": "2026-02-10T00:00:00Z",
"sample_size": 2500,
"timeframe": {
"from": "2025-11-10T00:00:00Z",
"to": "2026-02-10T00:00:00Z"
}
},
"validator": "idiomark-validator@1.0.0"
}
}
Entity Metadata
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Human-readable name |
type | string | Yes | Entity type |
sources | array | Yes | Platforms data was extracted from |
Entity Types:
human- Real personbrand- Company/organizationbot- Automated accountfictional- Fictional character
Extraction Metadata
| Field | Type | Required | Description |
|---|---|---|---|
date | string | Yes | When extraction occurred |
sample_size | number | Yes | Number of posts analyzed |
timeframe.from | string | Yes | Start of data range |
timeframe.to | string | Yes | End of data range |
Personality Object
{
"personality": {
"voice": { ... },
"patterns": { ... },
"domains": [ ... ],
"values": [ ... ],
"knowledge": { ... }
}
}
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
}
}
| Field | Type | Range | Description |
|---|---|---|---|
tone.primary | string | - | Main communication tone |
tone.secondary | string | - | Secondary tone (optional) |
tone.confidence | number | 0-1 | Confidence in tone classification |
formality | number | 0-1 | 0=casual, 1=formal |
humor | number | 0-1 | 0=serious, 1=very humorous |
sarcasm | number | 0-1 | 0=sincere, 1=heavily sarcastic |
enthusiasm | number | 0-1 | 0=flat, 1=high energy |
directness | number | 0-1 | 0=euphemistic, 1=blunt |
Tone Options:
casual- Informal, relaxedformal- Professional, properprofessional- Work-appropriatefriendly- Warm, approachablesarcastic- Ironic, snarkydry- Deadpan, literalenthusiastic- Excited, energetictechnical- Precise, detailedpoetic- Artistic, expressiveabrupt- Brief, to-the-point
Patterns
Statistical patterns in communication.
{
"patterns": {
"sentence_length": {
"mean": 12.4,
"stddev": 5.2
},
"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
}
}
}
| Field | Type | Values | Description |
|---|---|---|---|
emoji_usage.frequency | string | `none | low |
emoji_usage.position | string | `start | end |
ellipsis_usage | string | `none | low |
Domains
Areas of knowledge and expertise.
{
"domains": [
{
"name": "javascript",
"confidence": 0.92,
"evidence": ["technical_terms", "code_blocks", "project_mentions"]
}
]
}
| Field | Type | Description |
|---|---|---|
name | string | Domain/topic name |
confidence | number | 0-1 confidence score |
evidence | array | Why this domain was detected (optional) |
Values
Inferred beliefs and positions.
{
"values": [
{
"name": "open_source",
"sentiment": "positive",
"confidence": 0.89
}
]
}
| Field | Type | Values | Description |
|---|---|---|---|
name | string | - | Value/belief name |
sentiment | string | `positive | negative |
confidence | number | 0-1 | Confidence in classification |
Knowledge
Specific entities and concepts referenced.
{
"knowledge": {
"frequent_terms": ["react", "typescript", "web3"],
"mentions": {
"people": ["@dan_abramov", "@sebastienlorber"],
"projects": ["react", "nextjs", "tailwindcss"],
"organizations": ["vercel", "facebook", "openai"]
},
"topics": {
"primary": ["frontend", "web_development"],
"secondary": ["ai", "crypto", "gaming"]
}
}
}
Signature (Optional)
For file integrity verification.
{
"signature": {
"algorithm": "sha256",
"hash": "a1b2c3d4e5f6...",
"signed_by": "optional-identity"
}
}
Example Complete File
See examples/demo.idiomark for a complete example.
Validation
Use the CLI to validate files:
idiomark validate file.idiomark
idiomark validate file.idiomark --strict
Or programmatically:
import { IdiomarkValidator } from '@idiomark/core'
const validator = new IdiomarkValidator({ strict: true })
const result = await validator.validate(data)
if (result.valid) {
console.log('Valid!')
} else {
console.log('Errors:', result.errors)
}
Best Practices
- Required fields only - Don't add custom fields without schema update
- Range validation - All 0-1 scores must be within range
- Timestamp format - Always use ISO 8601
- ID format - Must start with
idiomark_ - Versioning - Match
idiomarkfield to spec version
Extension Points
Future versions may add:
- Custom personality dimensions
- Platform-specific metadata
- Multilingual support
- Temporal personality evolution
See spec.md for versioning policy.