Skip to main content
NORMATIVE FROZENFROZENprotocol

Common Schemas Reference

Scope

This specification defines the foundational schemas shared across MPLP modules:

  • Metadata schema (standard MPLP metadata fields)
  • Common types schema (shared type definitions)
  • Learning sample schema (runtime learning data)

Non-Goals

  • Module-specific schemas (covered in respective module docs)
  • Event schemas (covered in Event Taxonomy)

1. Purpose

This document provides a normative reference for the foundational schemas shared across MPLP modules. It mirrors the protocol definition and does not create new semantics.

Claim Type: Normative Quote
Truth Source: L1 (schemas/v2/common/)

2. Schema Inventory

Schema FilePurposeSection
metadata.schema.jsonStandard metadata fields搂4
common-types.schema.jsonShared type definitions搂5
learning-sample.schema.jsonRuntime learning data搂6

3. Metadata Schema

File: metadata.schema.json

4.1 Required Fields

FieldTypeDescription
protocol_versionString (SemVer)MPLP protocol version
schema_versionString (SemVer)Schema version used

4.2 Optional Fields

FieldTypeDescription
created_atISO 8601 datetimeObject creation time
created_byStringCreator identifier
updated_atISO 8601 datetimeLast update time
updated_byStringLast updater identifier
tagsArray of stringsTags for indexing/search
cross_cuttingArray of enumsCross-cutting concerns enabled

4.3 Cross-Cutting Concerns Enum

The 9 governance plane concerns:

coordination, error-handling, event-bus, orchestration, 
performance, protocol-version, security, state-sync, transaction

4.4 Example

{
"protocol_version": "1.0.0",
"schema_version": "1.0.0",
"created_at": "2025-01-28T15:30:00.000Z",
"created_by": "agent-planner",
"tags": ["production", "high-priority"],
"cross_cutting": ["security", "transaction"]
}

4. Common Types Schema

File: common-types.schema.json

Shared type definitions for cross-module consistency.

5.1 Definitions

TypeDescription
MplpIdReference to identifiers.schema.json
RefStandard reference to another MPLP object
BaseMetaReference to metadata.schema.json

5.2 Ref Object

A standard way to reference other MPLP objects.

Required: id, module

FieldTypeDescription
idUUID v4Referenced object ID
moduleEnumModule name
descriptionStringReference description

Module Enum:

context, plan, confirm, trace, role, extension, dialog, collab, core, network

5.3 Example

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"module": "plan",
"description": "Parent plan reference"
}

5. Learning Sample Schema

File: learning-sample.schema.json

Structured format for collecting learning data from MPLP runtime executions.

6.1 Required Fields

FieldTypeDescription
sample_idUUID v4Unique sample identifier
project_idStringProject identifier
success_flagBooleanWhether action succeeded
timestampsObjectExecution timeline

6.2 Core Optional Fields

FieldTypeDescription
intent_beforeObjectOriginal intent representation
planObjectPlan used
delta_intentsArrayDelta intents proposed/applied
graph_beforeObjectGraph state before change
graph_afterObjectGraph state after change
pipeline_pathArrayPipeline stages traversed

6.3 Metrics Fields

FieldTypeDescription
token_usageObjectLLM token consumption
execution_time_msNumberExecution time (ms)
impact_scoreNumber (0-1)Impact score

6.4 Feedback & Extensibility Fields

FieldTypeDescription
user_feedbackObjectHuman feedback on result
error_infoObjectError details if failed
governance_decisionsArrayGovernance rules evaluated
metadataObjectAdditional metadata (extensibility point)
vendor_extensionsObjectOptional vendor-specific extensions

6.5 Token Usage Structure

{
"total_tokens": 15000,
"prompt_tokens": 10000,
"completion_tokens": 5000,
"by_agent": [
{ "agent_id": "planner", "role": "orchestrator", "tokens": 8000 },
{ "agent_id": "coder", "role": "executor", "tokens": 7000 }
]
}

6.6 User Feedback Structure

{
"decision": "approve", // approve, reject, override, unknown
"comment": "Looks good",
"rating": 4.5 // 0-5
}

Total Schemas: 6 foundational schemas
Standards: UUID v4, CloudEvents v1.0, W3C Trace Context, ISO 8601