Trust Translator System Documentation
1. [System Overview](#system-overview) 2. [Architecture](#architecture) 3. [Trust Scoring System](#trust-scoring-system) 4. [Intent Preservation Engine](#intent-preservation-engine) 5. [Style Translation](#style-translation) 6. [Cross-Domain Translation](#cross-domain-translation) 7. [API Reference](#api-reference) 8. [Evolution History](#evolution-history)
Full Public Reader
Trust Translator System Documentation
Version: 2.5.0-gen13
Evolution: Generation 13 (Cross-Platform Intelligence)
Last Updated: February 2025
---
Table of Contents
1. [System Overview](#system-overview)
2. [Architecture](#architecture)
3. [Trust Scoring System](#trust-scoring-system)
4. [Intent Preservation Engine](#intent-preservation-engine)
5. [Style Translation](#style-translation)
6. [Cross-Domain Translation](#cross-domain-translation)
7. [API Reference](#api-reference)
8. [Evolution History](#evolution-history)
---
System Overview
Trust Translator is a sophisticated communication transformation system that converts text between communication styles while preserving semantic intent. Built on linguistic theory (Politeness Theory, Hofstede's Cultural Dimensions, Speech Act Theory), it enables contextually appropriate communication across different relationships, platforms, and cultures.
Core Capabilities
| Capability | Description |
|---|---|
| Style Translation | Transform casual ↔ formal, direct ↔ diplomatic |
| Intent Preservation | Maintain semantic meaning through transformations |
| Trust Calibration | Relationship-aware communication recommendations |
| Cultural Bridging | Cross-cultural adaptation (Gen 10) |
| Platform Intelligence | Platform-specific optimization (Gen 13) |
| Multi-party Facilitation | Group conversation dynamics (Gen 9) |
| Streaming Translation | Real-time token-by-token output (Gen 11) |
| Translation Memory | Adaptive learning from feedback (Gen 12) |
---
Architecture
┌────────────────────────────────────────────────────────────────────────────┐
│ TRUST TRANSLATOR │
├────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ STYLE ANALYZER │ │ INTENT EXTRACTOR │ │ TRUST MANAGER │ │
│ │ (styles.ts) │ │ (intent.ts) │ │ (trust.ts) │ │
│ └────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘ │
│ │ │ │ │
│ └──────────────────────┼──────────────────────┘ │
│ │ │
│ ┌────────────┴────────────┐ │
│ │ TRANSLATION ENGINE │ │
│ │ (translator.ts) │ │
│ └────────────┬────────────┘ │
│ │ │
│ ┌───────────────────────────────┼───────────────────────────────┐ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────────────┐ ┌─────────────────────┐ │
│ │ LLM Semantic │ │ Cultural Bridge │ │Platform Intelligence│ │
│ │ (Gen 7) │ │ (Gen 10) │ │ (Gen 13) │ │
│ └──────────────┘ └──────────────────────┘ └─────────────────────┘ │
│ │
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Conversation │ │ Multi-Party │ │ Streaming │ │
│ │ Flow (Gen 8) │ │ Engine (Gen 9) │ │ Engine (Gen 11) │ │
│ └──────────────────┘ └──────────────────┘ └──────────────────┘ │
│ │
│ ┌──────────────────────────┐ │
│ │ Translation Memory │ │
│ │ (Gen 12) │ │
│ └──────────────────────────┘ │
│ │
└────────────────────────────────────────────────────────────────────────────┘Module Responsibilities
| Module | File | Purpose |
|---|---|---|
| Styles | `src/styles.ts` | Communication style definitions, markers, analysis |
| Intent | `src/intent.ts` | Semantic extraction, SAO parsing, face threats |
| Trust | `src/trust.ts` | Relationship tracking, style recommendations |
| Translator | `src/translator.ts` | Core transformation engine |
| LLM Semantic | `src/llm-semantic.ts` | Deep semantic understanding via LLM |
| Conversation Flow | `src/conversation-flow.ts` | Multi-turn conversation tracking |
| Multi-Party | `src/multiparty-engine.ts` | Group dynamics, facilitation |
| Cultural Bridge | `src/cultural-bridge.ts` | Hofstede dimensions, cultural adaptation |
| Streaming | `src/streaming-engine.ts` | Token-by-token translation |
| Translation Memory | `src/translation-memory.ts` | Learning, feedback, preferences |
| Platform Intelligence | `src/platform-intelligence.ts` | Platform detection and optimization |
---
Trust Scoring System
The trust system is based on established trust research (Mayer, Davis & Schoorman) and uses four primary dimensions.
Trust Dimensions
interface TrustProfile {
competenceTrust: number; // 0-1: Do they know what they're doing?
benevolenceTrust: number; // 0-1: Do they have good intentions?
integrityTrust: number; // 0-1: Are they honest and consistent?
predictabilityTrust: number; // 0-1: Do they behave consistently?
// Derived
overallTrust: number; // Weighted combination
trustVelocity: number; // Rate of change (-1 to 1)
trustStability: number; // Variance indicator (0-1)
}Overall Trust Calculation
overallTrust = (competence × 0.25) + (benevolence × 0.30) +
(integrity × 0.30) + (predictability × 0.15)Weighting Rationale:
- Benevolence & Integrity (30
- Competence (25
- Predictability (15
Trust Change Mechanics
Trust changes follow an anchoring effect—changes are smaller at extremes:
function calculateNewTrust(current: number, impact: number): number {
// Sensitivity decreases at extremes (0 or 1)
const sensitivity = 1 - Math.abs(current - 0.5) * 0.5;
const change = impact * 0.15 * sensitivity;
return clamp(current + change, 0, 1);
}Trust-to-Style Mapping
| Overall Trust | Recommended Style | Rationale |
|---|---|---|
| ≥ 0.8 | `casual-friend` | High trust enables casual communication |
| 0.6 - 0.8 | `professional-colleague` | Moderate-high trust supports collegial tone |
| 0.4 - 0.6 | `professional-colleague` | Moderate trust suggests professional approach |
| 0.2 - 0.4 | `formal-executive` | Lower trust warrants formal communication |
| < 0.2 | `formal-executive` | Very low trust requires careful communication |
Trust Events
interface TrustEvent {
type: 'positive' | 'negative' | 'neutral';
dimension: 'competence' | 'benevolence' | 'integrity' | 'predictability';
impact: number; // -1 to 1
description: string;
}Example Usage:
trustManager.recordEvent('alice', {
type: 'positive',
dimension: 'competence',
description: 'Delivered excellent work',
impact: 0.5
});---
Intent Preservation Engine
The intent extraction system identifies and preserves the semantic core of messages.
Intent Core Structure
interface IntentCore {
primary: PrimaryIntent; // inform, request, confirm, clarify, etc.
secondary: PrimaryIntent[]; // Additional intents
// Subject-Action-Object
subject: string; // Who/what is the focus
action: string; // Core verb/action
object: string | null; // What is acted upon
recipient: string | null; // Who receives
// Context
entities: IntentEntity[]; // Named entities extracted
conditions: IntentCondition[]; // if/when/unless clauses
constraints: string[]; // "by Friday", "under budget"
// Emotional layer
emotion: EmotionalUndercurrent;
emotionIntensity: number; // 0-1
// Implicit content
assumptions: string[]; // What's taken for granted
implications: string[]; // What's implied
faceThreats: FaceThreat[]; // Politeness theory
confidence: number;
ambiguities: string[];
}Primary Intent Types
| Intent | Description | Detection Patterns |
|---|---|---|
| `inform` | Sharing information | Default for statements |
| `request` | Asking for something | "please", "could you", "can you" |
| `confirm` | Seeking confirmation | "is/are/was/were..?" questions |
| `clarify` | Seeking clarification | "what/how/why/when" questions |
| `persuade` | Convincing | "should", "must", "recommend" |
| `negotiate` | Reaching agreement | "what if", "how about", "instead" |
| `empathize` | Showing understanding | "understand", "hear you" |
| `apologize` | Expressing regret | "sorry", "apologize", "regret" |
| `appreciate` | Showing gratitude | "thank", "grateful", "appreciate" |
| `decline` | Saying no | "can't", "won't", "unable" |
| `critique` | Providing feedback | "however", "but", "issue" |
| `celebrate` | Sharing positive news | "congratulations", "excited" |
| `warn` | Alerting to risk | "warning", "danger", "careful" |
| `instruct` | Teaching/guiding | "first", "step", "here's how" |
| `connect` | Building relationship | "how are you", "catch up" |
Face-Threatening Acts (Politeness Theory)
Based on Brown & Levinson's framework:
interface FaceThreat {
type: 'positive-face' | 'negative-face';
target: 'speaker' | 'hearer' | 'third-party';
severity: number; // 0-1
description: string;
}| Intent | Face Threat | Severity | Description |
|---|---|---|---|
| `request` | Negative face (hearer) | 0.4 | Imposes on autonomy |
| `critique` | Positive face (hearer) | 0.6 | Challenges self-image |
| `decline` | Positive face (hearer) | 0.5 | May feel like rejection |
| `apologize` | Positive face (speaker) | 0.3 | Admits fault |
| Commands | Negative face (hearer) | 0.7 | Strongly imposes |
---
Style Translation
Available Styles
| Style ID | Formality | Directness | Min Trust | Use Case |
|---|---|---|---|---|
| `casual-friend` | casual | direct | 0.7 | Close friends |
| `professional-colleague` | neutral | balanced | 0.3 | Workplace peers |
| `formal-executive` | formal | diplomatic | 0.1 | C-suite, legal |
| `technical-peer` | casual | direct | 0.5 | Developer-to-developer |
| `support-customer` | neutral | diplomatic | 0.2 | Service interactions |
| `academic-formal` | formal | indirect | 0.2 | Research, academia |
| `crisis-urgent` | neutral | blunt | 0.0 | Emergencies |
Style Dimensions
type Formality = 'casual' | 'neutral' | 'formal' | 'ceremonial';
type Directness = 'indirect' | 'diplomatic' | 'balanced' | 'direct' | 'blunt';
type Emotionality = 'reserved' | 'measured' | 'warm' | 'expressive' | 'passionate';
type Technicality = 'layperson' | 'informed' | 'practitioner' | 'expert' | 'specialist';
type PowerDynamic = 'deferential' | 'equal' | 'authoritative' | 'commanding';
type Urgency = 'leisurely' | 'normal' | 'important' | 'urgent' | 'critical';Transformation Pipeline
1. Greeting Transformation - Adjust opening based on target style
2. Closing Transformation - Adjust sign-off appropriately
3. Formality Adjustment - Remove slang, emojis for formal; add for casual
4. Directness Adjustment - Add hedges for diplomatic; remove for direct
5. Emotional Tone - Reduce intensifiers for reserved; amplify for expressive
6. Technical Level - Simplify jargon for layperson audiences
7. Contractions - Expand for formal; contract for casual
8. Pronoun Handling - I → we/one based on target voice
9. Politeness Strategies - Add face-saving language per power dynamic
10. Sentence Structure - Split long sentences for concise styles
Quality Metrics
interface TranslationQuality {
intentPreservation: number; // 0-1
styleMatch: number; // 0-1
naturalness: number; // 0-1
overall: number; // Weighted combination
warnings: string[];
suggestions: string[];
}Overall Calculation:
overall = (intentPreservation × 0.5) + (styleMatch × 0.3) + (naturalness × 0.2)---
Cross-Domain Translation
Cross-Cultural (Gen 10)
Adapts communication across Hofstede's 6 cultural dimensions:
| Dimension | Low Score | High Score | Impact |
|---|---|---|---|
| Power Distance | Egalitarian | Hierarchical | Deference, titles |
| Individualism | Collectivist | Individualist | We vs I voice |
| Masculinity | Cooperative | Competitive | Tone, assertiveness |
| Uncertainty Avoidance | Flexible | Structured | Detail level |
| Long-Term Orientation | Traditional | Pragmatic | Framing |
| Indulgence | Restrained | Gratifying | Emotional expression |
Available Cultural Profiles: `us`, `jp`, `de`, `cn`, `uk`, `br`, `in`, `mx`, `nl`, `ae`
const result = translateCrossculturally(
"Hey John, need that report ASAP. Thanks!",
'us', // Source culture
'jp', // Target culture
{ context: 'business' }
);
// → "I was hoping for the report at your convenience, if that would be acceptable."Cross-Platform (Gen 13)
Optimizes for platform-specific constraints and norms:
| Platform | Max Length | Formality Range | Emoji | Markdown |
|---|---|---|---|---|
| `email` | Unlimited | 0.4-0.9 | Minimal | ❌ |
| `sms` | 160 | 0.1-0.5 | Moderate | ❌ |
| `slack` | 40,000 | 0.2-0.7 | Moderate | ✅ |
| `discord` | 2,000 | 0.1-0.5 | Liberal | ✅ |
| `twitter` | 280 | 0.2-0.6 | Moderate | ❌ |
| `linkedin` | 3,000 | 0.5-0.9 | Minimal | ❌ |
| `teams` | 28,000 | 0.3-0.8 | Minimal | ✅ |
| `document` | Unlimited | 0.7-1.0 | Avoid | ✅ |
const result = translateBetweenPlatforms(
message,
'email', // Source platform
'slack', // Target platform
);
// Adjusts formality, removes signoff, adds markdown if helpful---
API Reference
Core Functions
`translate(request: TranslationRequest): TranslationResult`
Translate text to target style with intent preservation.
const result = translate({
text: "hey can u review this by friday thx",
targetStyle: 'formal-executive',
preservationLevel: 'balanced' // 'strict' | 'balanced' | 'flexible'
});`extractIntent(text: string): IntentCore`
Extract semantic intent from text.
const intent = extractIntent("Could you please send the report by EOD?");
// intent.primary → 'request'
// intent.constraints → ['by EOD']`analyzeStyle(text: string): StyleAnalysis`
Analyze the communication style of text.
const analysis = analyzeStyle("Dear Sir, I am writing to inquire...");
// analysis.detected.name → 'formal-executive'
// analysis.dimensions.formality.confidence → 0.9Trust Functions
`trustManager.recordEvent(profileId, event)`
Record a trust-affecting event.
trustManager.recordEvent('alice', {
type: 'positive',
dimension: 'competence',
description: 'Delivered excellent work',
impact: 0.5
});`trustManager.recommendStyle(profileId, context)`
Get style recommendation based on trust level.
const rec = trustManager.recommendStyle('alice', {
topic: 'sensitive',
relationship: 'peer'
});
// rec.style.name → 'professional-colleague'
// rec.confidence → 0.75
// rec.warnings → []`calibrateRelationship(currentTrust, desiredStyle)`
Check if trust supports a desired style.
const cal = calibrateRelationship(0.4, 'casual-friend');
// cal.trustGap → 0.3 (need more trust)
// cal.suggestions → ['Focus on reliability...']Cross-Domain Functions
`translateCrossculturally(text, from, to, options)`
Translate between cultural contexts.
const result = translateCrossculturally(
"Get this done now.",
'us', 'jp',
{ context: 'business' }
);`translateBetweenPlatforms(text, from, to, context)`
Translate between platform contexts.
const result = translateBetweenPlatforms(
"Dear John, I hope this email finds you well...",
'email', 'slack'
);`optimizeForPlatform(message, platform, context)`
Optimize a message for a specific platform.
const result = optimizeForPlatform(
longMessage,
'twitter',
{ urgencyLevel: 'high' }
);Streaming Functions
`streamingTranslate(text, style, onToken)`
Stream translation token by token.
await streamingTranslate(
"hey can u send that",
"formal-executive",
(token, cumulative) => process.stdout.write(token)
);Multi-Party Functions
`createMultiPartyConversation(id, config)`
Track group conversation dynamics.
const engine = createMultiPartyConversation('meeting-1', {
coalitionThreshold: 0.6,
tensionThreshold: 0.7
});
engine.addParticipant('alice', 'Alice');
engine.addTurn('alice', "I propose we use React.");
const state = engine.getState();
// state.groupDynamics.polarization → 0.2---
Evolution History
| Gen | Feature | Status |
|---|---|---|
| 6 | Core styles, intent extraction, translator, trust calibration | ✅ Complete |
| 7 | LLM-powered semantic understanding | ✅ Complete |
| 8 | Conversation flow engine | ✅ Complete |
| 9 | Multi-party conversation optimization | ✅ Complete |
| 10 | Cross-cultural communication bridges | ✅ Complete |
| 11 | Streaming translation engine | ✅ Complete |
| 12 | Translation memory & adaptive learning | ✅ Complete |
| 13 | Cross-platform intelligence | ✅ Current |
| 14 | Voice/audio translation pipeline | 🔮 Planned |
| 15 | Multi-modal communication | 🔮 Planned |
| 16 | Meeting summarization & action items | 🔮 Planned |
---
Theoretical Foundations
Politeness Theory (Brown & Levinson, 1987)
- Positive Face: Desire to be liked and approved
- Negative Face: Desire for autonomy and freedom from imposition
- Face-Threatening Acts (FTAs) require mitigation strategies
Hofstede's Cultural Dimensions
Six dimensions measuring cultural differences that affect communication:
power distance, individualism, masculinity, uncertainty avoidance, long-term orientation, indulgence.
Speech Act Theory (Austin, Searle)
Messages perform actions (illocutionary force):
- Assertives: Stating facts
- Directives: Getting someone to do something
- Commissives: Committing to future action
- Expressives: Expressing psychological states
- Declarations: Bringing about changes
Trust Research (Mayer, Davis & Schoorman)
Three dimensions of interpersonal trust:
- Ability (competence)
- Benevolence
- Integrity
Extended with Predictability for communication contexts.
---
File Structure
trust-translator/
├── src/
│ ├── styles.ts # Style definitions & analysis
│ ├── intent.ts # Intent extraction & preservation
│ ├── translator.ts # Core translation engine
│ ├── trust.ts # Trust tracking & recommendations
│ ├── llm-semantic.ts # LLM-powered understanding (Gen 7)
│ ├── conversation-flow.ts # Conversation tracking (Gen 8)
│ ├── multiparty-engine.ts # Multi-party optimization (Gen 9)
│ ├── cultural-bridge.ts # Cross-cultural bridges (Gen 10)
│ ├── streaming-engine.ts # Streaming translation (Gen 11)
│ ├── translation-memory.ts # Memory & learning (Gen 12)
│ ├── platform-intelligence.ts # Platform optimization (Gen 13)
│ └── index.ts # Main exports
├── demo.ts # Basic demo
├── demo-*.ts # Feature-specific demos
├── cli.ts # Command-line interface
├── package.json
└── README.md---
Built with HEF (Holographic Evolution Framework) 🧬
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
trust-translator/docs/SYSTEM_DOCUMENTATION.md
Detected Structure
Method · Evaluation · References · Code Anchors · Architecture