Skip to main content

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​

FieldTypeRequiredDescription
idiomarkstringYesProtocol version (semver)
idstringYesUnique identifier (must start with idiomark_)
createdstringYesISO 8601 creation timestamp
updatedstringYesISO 8601 last updated timestamp
metadataobjectYesMetadata about the entity and extraction
personalityobjectYesPersonality data
signaturestringNoCryptographic 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​

FieldTypeRequiredDescription
namestringNoHuman-readable name
typestringYesEntity type
sourcesarrayYesPlatforms data was extracted from

Entity Types:

  • human - Real person
  • brand - Company/organization
  • bot - Automated account
  • fictional - Fictional character

Extraction Metadata​

FieldTypeRequiredDescription
datestringYesWhen extraction occurred
sample_sizenumberYesNumber of posts analyzed
timeframe.fromstringYesStart of data range
timeframe.tostringYesEnd 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
}
}
FieldTypeRangeDescription
tone.primarystring-Main communication tone
tone.secondarystring-Secondary tone (optional)
tone.confidencenumber0-1Confidence in tone classification
formalitynumber0-10=casual, 1=formal
humornumber0-10=serious, 1=very humorous
sarcasmnumber0-10=sincere, 1=heavily sarcastic
enthusiasmnumber0-10=flat, 1=high energy
directnessnumber0-10=euphemistic, 1=blunt

Tone Options:

  • casual - Informal, relaxed
  • formal - Professional, proper
  • professional - Work-appropriate
  • friendly - Warm, approachable
  • sarcastic - Ironic, snarky
  • dry - Deadpan, literal
  • enthusiastic - Excited, energetic
  • technical - Precise, detailed
  • poetic - Artistic, expressive
  • abrupt - 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
}
}
}
FieldTypeValuesDescription
emoji_usage.frequencystring`nonelow
emoji_usage.positionstring`startend
ellipsis_usagestring`nonelow

Domains​

Areas of knowledge and expertise.

{
"domains": [
{
"name": "javascript",
"confidence": 0.92,
"evidence": ["technical_terms", "code_blocks", "project_mentions"]
}
]
}
FieldTypeDescription
namestringDomain/topic name
confidencenumber0-1 confidence score
evidencearrayWhy this domain was detected (optional)

Values​

Inferred beliefs and positions.

{
"values": [
{
"name": "open_source",
"sentiment": "positive",
"confidence": 0.89
}
]
}
FieldTypeValuesDescription
namestring-Value/belief name
sentimentstring`positivenegative
confidencenumber0-1Confidence 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​

  1. Required fields only - Don't add custom fields without schema update
  2. Range validation - All 0-1 scores must be within range
  3. Timestamp format - Always use ISO 8601
  4. ID format - Must start with idiomark_
  5. Versioning - Match idiomark field 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.