Skip to content

Data Schemas Reference

Ciprian-LocalPulse edited this page Jul 31, 2026 · 1 revision

Data Schemas Reference

Cross-cutting reference. These are the conceptual shapes of the objects passed between components described throughout the wiki; canonical JSON Schema files live in schemas/ in the repository.

Schema Overview

erDiagram
    NormalizedMessage ||--o{ AnalysisResult : "scored into"
    AnalysisResult ||--o| NegotiationBrief : "may generate"
    AnalysisResult ||--o| DraftResponse : "may generate"
    StyleProfile ||--o{ DraftResponse : "informs"
    CapacityState ||--o{ AnalysisResult : "gates routing of"
    NormalizedMessage {
        string message_id
        string source
        string sender
        string thread_id
        string body_clean
        datetime received_at
        array pii_flags
    }
    AnalysisResult {
        string message_id
        object urgency
        object sentiment
        string priority_tier
        array routing_target
    }
    StyleProfile {
        string profile_id
        int version
        object lexical_features
        object syntactic_features
        object structural_features
    }
    NegotiationBrief {
        string thread_id
        int leverage_score
        array leverage_factors
        object pricing_recommendation
    }
    CapacityState {
        int capacity_score
        object contributing_factors
        datetime computed_at
    }
    DraftResponse {
        string message_id
        string mask_applied
        string draft_text
        string status
    }
Loading

NormalizedMessage

Produced by Cortex Ingestion Pipeline. The canonical shape every downstream component consumes instead of raw channel-specific payloads.

{
  "message_id": "string, fingerprint-derived",
  "source": "email | chat | form | sms",
  "sender": "normalized sender identity",
  "thread_id": "string",
  "body_clean": "string, sanitized",
  "received_at": "ISO 8601 UTC",
  "pii_flags": ["array of detected PII categories, not values"],
  "explicit_priority": "string | null"
}

AnalysisResult

Produced by Cortex Scoring Model. Note that every score field carries its contributing factors — this is a hard schema requirement, not optional, per the explainability principle in Design Philosophy.

{
  "message_id": "string",
  "urgency": { "score": "0-100", "factors": ["array of contributing signals"] },
  "sentiment": { "label": "see Cortex Emotional Taxonomy", "confidence": "0-1" },
  "priority_tier": "Critical | High | Normal | Low",
  "routing_target": ["persona_draft", "negotiation_flag", "..."]
}

StyleProfile

Produced and versioned by Persona Stylometry Engine.

{
  "profile_id": "string",
  "version": "integer, monotonically increasing",
  "lexical_features": { "...frequency distributions..." },
  "syntactic_features": { "...sentence length, clause complexity..." },
  "structural_features": { "...greeting/sign-off conventions..." },
  "corpus_size": "integer, samples used to compute this version"
}

NegotiationBrief

Produced by Negotiation Intelligence Algorithms.

{
  "thread_id": "string",
  "leverage_score": "0-100",
  "leverage_factors": [{ "factor": "string", "contribution": "signed number" }],
  "pricing_recommendation": { "suggested": "number", "range": ["low", "high"], "basis": "string" },
  "scarcity_signal": "string | null — must reference real evidence if present"
}

CapacityState

Produced by the Energy Shield, combining Decision Fatigue Model output.

{
  "capacity_score": "0-100",
  "contributing_factors": { "hrv_trend": "...", "sleep_quality": "...", "decision_fatigue": "..." },
  "computed_at": "ISO 8601 UTC"
}

DraftResponse

Produced by Persona Mirror Drafting, after mask selection (Persona Contextual Masks).

{
  "message_id": "string",
  "mask_applied": "string — see Persona Contextual Masks catalog",
  "draft_text": "string",
  "style_consistency_score": "0-1",
  "status": "pending_review | approved | edited | rejected"
}

Schema Evolution Policy

All schemas are versioned. A breaking change to any schema requires a version bump and a documented migration path — components should never silently assume a schema shape has stayed constant across a deployment upgrade. See Prompt Specification Standard for the equivalent versioning policy on prompts.

See Also

Clone this wiki locally