CSM-1 Specification

Complete specification for the Compact State Message format.

Overview

CSM-1 (Compact State Message v1) is a human-readable token format for encoding VCP context. It's designed to be:

  • Compact — Minimal bytes, fits in headers and logs
  • Human-readable — Developers can inspect tokens visually
  • Privacy-preserving — Private data is represented by markers only
  • Versioned — Forward compatible with future extensions
Version note: The VCP protocol is at v3.1. The CSM-1 format is at v1.0 — the token header reads VCP:1.0. These are separate version numbers: the protocol version tracks the overall specification (layers, adaptation, personal state), while the format version tracks the token grammar itself.

Token Format

A CSM-1 token consists of 8 lines (the R-line was added in VCP 3.1 for personal state):

VCP:<version>:<profile_id>
C:<constitution_id>@<version>
P:<persona>:<adherence>
G:<goal>:<experience>:<learning_style>
X:<constraint_flags>
F:<active_flags>
S:<private_markers>
R:<personal_state_dimensions>

Example Token

VCP:1.0:user_001
C:learning-assistant@1.0
P:muse:3
G:learn_guitar:beginner:visual
X:🔇quiet:💰low:⏱️30minutes
F:time_limited|budget_limited
S:🔒work|🔒housing
R:🧠focused:3|💭calm:4|🔋rested:3|⚡unhurried:2|🩺neutral:1

Line-by-Line Breakdown

Line 1: Header

VCP:<version>:<profile_id>
FieldTypeDescription
versionstringVCP protocol version (e.g., "1.0")
profile_idstringUnique user/profile identifier

Line 2: Constitution Reference

C:<constitution_id>@<version>
FieldTypeDescription
constitution_idstringConstitution identifier (e.g., "learning-assistant")
versionstringConstitution version

Line 3: Persona

P:<persona>:<adherence>
FieldTypeValues
personaenummuse, ambassador, godparent, sentinel, nanny, mediator
adherence1-5How strictly to follow constitution rules

Line 4: Goal Context

G:<goal>:<experience>:<learning_style>
FieldTypeValues
goalstringUser's primary goal (e.g., "learn_guitar")
experienceenumbeginner, intermediate, advanced, expert
learning_styleenumvisual, auditory, hands_on, reading, mixed

Line 5: Constraint Flags (X-line)

X:<emoji_flags>

Colon-separated constraint markers using emoji shortcodes:

EmojiMeaningExample
🔇Quiet mode preference🔇quiet
🔕Silent required🔕silent
💰Budget tier💰low
🆓Free only🆓
💎Premium budget💎high
Energy variable⚡var
Time limited⏰lim
⏱️Session length⏱️30minutes
📅Irregular schedule📅irreg

If no constraints: X:none

Line 6: Active Flags (F-line)

F:<flag1>|<flag2>|...

Pipe-separated list of currently active constraint flags:

  • time_limited
  • budget_limited
  • noise_restricted
  • energy_variable
  • schedule_irregular
  • mobility_limited
  • health_considerations

If none: F:none

Line 7: Private Markers (S-line)

S:🔒<category1>|🔒<category2>|...

Shows categories of private data that influenced the context, but never the values:

  • 🔒work — Work-related private context exists
  • 🔒housing — Housing-related private context exists
  • 🔒health — Health-related private context exists
  • 🔒financial — Financial private context exists

If no private context: S:none

Line 8: Personal State (R-line) — v3.1

R:<emoji><value>:<intensity>|...

Pipe-separated personal state dimensions. Each dimension is an emoji symbol followed by a categorical value and intensity (1-5):

SymbolDimensionValuesIntensity
🧠Cognitive Statefocused, distracted, overloaded, foggy, reflective1–5
💭Emotional Tonecalm, tense, frustrated, neutral, uplifted1–5
🔋Energy Levelrested, low_energy, fatigued, wired, depleted1–5
Perceived Urgencyunhurried, time_aware, pressured, critical1–5
🩺Body Signalsneutral, discomfort, pain, unwell, recovering1–5

If intensity is omitted, it defaults to 3 (fail-open design). Extended sub-signals can follow a second colon: 🩺unwell:4:migraine.

If no personal state: R:none

Situational Context Encoding

VCP 3.1 also defines a separate context wire format using the Extended Enneagram Protocol — 9 situational dimensions plus the 5 personal state dimensions above:

⏰🌅|📍🏡|👥👶|📡💻‖🧠focused:4|💭calm:5|🔋rested:4|⚡unhurried:2|🩺neutral:1
└── situational (|) ──┘‖└──── personal state (|) ────────────────────────────────┘

The | pipe separates dimensions within a layer. The double bar separates Layer 2 (situational) from Layer 3 (personal state).

SymbolDimensionExample
Time🌅morning, 🌙night, 📅weekday
📍Space🏡home, 🏢office, 🏫school
👥Company👤alone, 👶children, 👔colleagues
🌍Culture🇺🇸american, 🌍global
🎭Occasion➖normal, 🚨emergency
🌡️Environment🔇quiet, 🥵hot
🔷Agency👑leader, 🤝peer, 🔐limited
🔶Constraints○minimal, ⚖️legal, 💸economic
📡System Context💻personal_device, 🏢workplace_system

Encoding Rules

String Encoding

  • All strings are UTF-8
  • Spaces in values are replaced with underscores
  • Colons (:) in values must be escaped as \:
  • Pipes (|) in values must be escaped as \|

Optional Fields

  • Missing goal: G:unset:beginner:mixed
  • Missing persona: P:muse:3 (default)
  • Empty constraints: X:none

Parsing

To parse a CSM-1 token:

function parseCSM1(token: string) {
  const lines = token.split('\n');
  const result = {};

  for (const line of lines) {
    const [key, ...values] = line.split(':');
    result[key] = values.join(':');
  }

  return result;
}

// Returns:
// {
//   VCP: "1.0:user_001",
//   C: "learning-assistant@1.0",
//   P: "muse:3",
//   G: "learn_guitar:beginner:visual",
//   X: "🔇quiet:💰low:⏱️30minutes",
//   F: "time_limited|budget_limited",
//   S: "🔒work|🔒housing",
//   R: "🧠focused:3|💭calm:4|🔋rested:3|⚡unhurried:2|🩺neutral:1"
// }

Display Formatting

For visual display, tokens can be boxed:

┌──────────────────────────────────────────────────────────────────┐
│ VCP:1.0:user_001                                                 │
│ C:learning-assistant@1.0                                         │
│ P:muse:3                                                         │
│ G:learn_guitar:beginner:visual                                   │
│ X:🔇quiet:💰low:⏱️30minutes                                      │
│ F:time_limited|budget_limited                                    │
│ S:🔒work|🔒housing                                               │
│ R:🧠focused:3|💭calm:4|🔋rested:3|⚡unhurried:2|🩺neutral:1       │
└──────────────────────────────────────────────────────────────────┘

Security Considerations

What CSM-1 Guarantees

  • Private context values are never included in tokens
  • Only category names appear in the S-line, not values
  • Tokens can be logged and inspected without privacy leakage

What CSM-1 Does NOT Do

  • Encryption — Tokens are readable by anyone who receives them
  • Authentication — Tokens don't prove who created them
  • Integrity — Tokens can be modified in transit

Authentication and integrity are handled by the VCP Transport layer (VCP/T), which wraps CSM-1 tokens in signed bundles using the verify-then-inject pattern. The orchestrator verifies signatures and content hashes before the LLM receives the text. See Core Concepts for the full protocol stack.

Economic Governance (VCP/E)

VCP/E extends CSM-1 with economic scope codes and counterparty requirements, enabling machine-inspectable fiduciary governance for agentic transactions.

Economic Scope Codes

Economic scopes appear in the F-line alongside behavioral flags. Each code represents a domain of economic activity:

CodeScopeDescription
$EconomicGeneral economic activity
$PProcurementPurchasing goods and services
$CContractingEntering agreements with duration
$AAdvertisingAd spend and marketing budget
$DDataData acquisition and licensing
$IInfrastructureCompute, storage, networking
$LLaborEngaging human or agent labor

Economic Adherence Levels

The existing 0–5 adherence scale maps to economic governance with domain-specific semantics:

LevelEconomic Meaning
0No economic governance (unsafe)
1Logging only — all transactions permitted, all audited
2Soft limits — overspend generates warnings
3Hard limits — transactions blocked above thresholds
4Escalation required for any novel transaction type
5Pre-approved transactions only

F-line Economic Encoding

Economic scopes appear in the F-line with adherence levels:

F:$P:3,$A:4,$I:2

This encodes: Procurement at level 3 (hard limits), Advertising at level 4 (escalation required), Infrastructure at level 2 (soft limits).

Q-line: Counterparty Requirements

A new optional line Q: encodes what an agent expects of its transaction partners, enabling lightweight pre-screening without exchanging full passport data:

Q:<min_trust>:<min_standing>:<required_attestations>:<blocked_categories>

Example

Q:0.6:NEUTRAL:compliance_attestation:weapons,surveillance

This requires a minimum trust score of 0.6, at least NEUTRAL standing, a compliance_attestation, and blocks counterparties in the weapons or surveillance categories.

Full Economic Token Example

VCP:2.0:agent-ad-buyer-7
C:acme.marketing.agent.creed@1.0.0
P:Z:4
G:procurement:standard:efficient
X:🔒💰📊
F:$P:3,$A:4,$I:2
S:budget_util=0.34,period_remain=52000s
R:V:6 G:8 P:7
Q:0.6:NEUTRAL:compliance_attestation:weapons,surveillance

Extensions

CSM-1 is designed for forward compatibility. Future versions may add:

  • Additional lines for new context types
  • New emoji shortcodes for constraints
  • Compression for high-volume scenarios

Parsers should ignore unrecognized lines gracefully.

Next Steps

  • API Reference — Encoding/decoding functions
  • Playground — Build tokens interactively
  • Gentian Demo — See a CSM-1 token travel across platforms (portability)
  • Campion Demo — Watch tokens switch between work and home contexts (adaptation)