Skip to content

Operation Envelope

Every operation in the Mentu protocol follows the same envelope structure. Whether it is a commit, capture, close, or any other operation, the outer shape is identical. Only the payload varies by operation type.

{
"id": "op_a1b2c3d4",
"op": "capture",
"ts": "2026-01-15T10:30:00Z",
"actor": "human:rashid",
"workspace": "my-project",
"payload": { }
}
FieldTypeDescription
idstringUnique identifier for this operation
opstringOperation type (one of the twelve operations)
tsstringISO 8601 UTC timestamp
actorstringIdentity of who performed the operation
workspacestringWorkspace this operation belongs to
payloadobjectOperation-specific data (varies by op)

All Mentu identifiers follow the pattern {prefix}_{8chars}, where the prefix indicates the object type and the 8 characters are alphanumeric.

PrefixObjectExample
op_Operationop_a1b2c3d4
mem_Memorymem_e5f6g7h8
cmt_Commitmentcmt_i9j0k1l2

IDs are generated at the point of creation using a random alphanumeric string. They must be unique within the workspace. Collision probability is negligible for typical workload sizes, but implementations should check for uniqueness before writing.

Actors identify who performed an operation. The format is {type}:{identity}:

TypeDescriptionExamples
humanA personhuman:rashid, human:maria
agentAn AI agent or automated systemagent:claude, agent:ci
sdkA client SDKsdk:bug-reporter
ciA CI/CD systemci:github-actions
systemThe Mentu system itselfsystem:scheduler
  • The type portion is a well-known category (one of the types listed above)
  • The identity portion is a freeform string unique within the type
  • Actor identities should be consistent across operations — the same person should always use the same actor string
  • Actor mappings in the Genesis Key can translate external identities to Mentu actors

All timestamps are ISO 8601 format in UTC:

2026-01-15T10:30:00Z
  • Always UTC (the Z suffix)
  • Millisecond precision is allowed but not required: 2026-01-15T10:30:00.123Z
  • Timestamps must be monotonically increasing within a single actor’s operation stream
  • Operations from different actors may have overlapping timestamps

The payload field contains operation-specific data. Below is the payload structure for each of the twelve operations.

{
"commitment_id": "cmt_i9j0k1l2",
"title": "Fix invoice NaN bug",
"description": "Handle empty discount field in calculateTotal()",
"tags": ["bugfix", "invoices"],
"tier": "t2",
"refs": ["mem_e5f6g7h8"]
}
FieldRequiredDescription
commitment_idYesID for the new commitment
titleYesShort description of the work
descriptionNoLonger description with context
tagsNoClassification tags (used for tier assignment)
tierNoExplicit tier override (t1/t2/t3)
refsNoMemory IDs this commitment relates to
{
"commitment_id": "cmt_i9j0k1l2"
}
FieldRequiredDescription
commitment_idYesID of the commitment to claim
{
"commitment_id": "cmt_i9j0k1l2",
"reason": "Blocked by dependency"
}
FieldRequiredDescription
commitment_idYesID of the commitment to release
reasonNoWhy the commitment is being released
{
"commitment_id": "cmt_i9j0k1l2",
"evidence": [
{ "kind": "build", "status": "pass", "log": "..." },
{ "kind": "test", "status": "pass", "summary": "24 passed" }
]
}
FieldRequiredDescription
commitment_idYesID of the commitment
evidenceYesArray of evidence items
evidence[].kindYesEvidence type: build, test, pr, review, screenshot, custom
evidence[].statusNopass or fail
evidence[].urlNoLink to the evidence (PR URL, build log, etc.)
evidence[].logNoInline log content
evidence[].summaryNoHuman-readable summary
{
"commitment_id": "cmt_i9j0k1l2",
"evidence": [
{ "kind": "pr", "url": "https://github.com/org/repo/pull/42" },
{ "kind": "build", "status": "pass" }
]
}
FieldRequiredDescription
commitment_idYesID of the commitment to submit
evidenceNoFinal evidence to attach with the submission
{
"commitment_id": "cmt_i9j0k1l2",
"verdict": "pass",
"evidence": [
{ "kind": "review", "note": "Fix verified, PR merged" }
]
}
FieldRequiredDescription
commitment_idYesID of the commitment to close
verdictYespass or fail
evidenceYesEvidence supporting the close (can be empty array for fail)
{
"commitment_id": "cmt_i9j0k1l2",
"reason": "Regression found in production"
}
FieldRequiredDescription
commitment_idYesID of the commitment to reopen
reasonNoWhy the commitment is being reopened
{
"commitment_id": "cmt_i9j0k1l2",
"reason": "Duplicate of cmt_m3n4o5p6"
}
FieldRequiredDescription
commitment_idYesID of the commitment to dismiss
reasonNoWhy the commitment is being dismissed
{
"memory_id": "mem_e5f6g7h8",
"kind": "bug",
"title": "Invoice total shows NaN",
"body": "Steps to reproduce...",
"meta": {
"url": "/invoices/new",
"browser": "Chrome 125"
}
}
FieldRequiredDescription
memory_idYesID for the new memory
kindYesMemory kind: bug, context, decision, note
titleYesShort title
bodyNoFull content
metaNoArbitrary metadata
{
"memory_id": "mem_e5f6g7h8",
"note": "Confirmed: this only happens with empty string, not null"
}
FieldRequiredDescription
memory_idYesID of the memory to annotate
noteYesAnnotation text
{
"memory_id": "mem_e5f6g7h8",
"severity": "medium",
"priority": 2,
"tags": ["invoices", "calculation"]
}
FieldRequiredDescription
memory_idYesID of the memory to triage
severityNolow, medium, high, critical
priorityNoNumeric priority (lower = higher priority)
tagsNoClassification tags
{
"memory_id": "mem_e5f6g7h8",
"commitment_id": "cmt_i9j0k1l2",
"relation": "fixes"
}
FieldRequiredDescription
memory_idYesID of the memory
commitment_idYesID of the commitment
relationNoRelationship type: fixes, relates_to, caused_by, blocks