Skip to content

Protocol Overview

The Mentu protocol is the formal specification that governs how commitments and memories are created, tracked, and closed. Everything in Mentu — the CLI, the dashboard, the MCP server — is an implementation of this protocol.

The protocol is built on a deliberately minimal set of primitives:

  • Twelve operations — the only ways to mutate state
  • Two objects — commitments and memories
  • Three rules — the invariants that must always hold

The ledger is the source of truth. It lives at .mentu/ledger.jsonl — an append-only JSON Lines file where each line is a single operation.

{"id":"op_a1b2c3d4","op":"commit","ts":"2026-01-15T10:00:00Z","actor":"human:rashid","workspace":"vendora","payload":{...}}
{"id":"op_e5f6g7h8","op":"claim","ts":"2026-01-15T10:01:00Z","actor":"agent:claude","workspace":"vendora","payload":{...}}
{"id":"op_i9j0k1l2","op":"submit","ts":"2026-01-15T11:30:00Z","actor":"agent:claude","workspace":"vendora","payload":{...}}

Operations are never modified or deleted. Once written, a line in the ledger is permanent. This property makes the ledger trivially auditable — you can always reconstruct the complete history of any object.

There is no “commitments table” or “memories table” with a status column. The current state of any object is computed by replaying all operations that reference it, in timestamp order.

To determine a commitment’s state:

  1. Find the commit operation that created it
  2. Replay all subsequent operations (claim, submit, close, etc.) in order
  3. The final state after replay is the current state

This is the protocol’s most important design decision. It means:

  • There is no stale cache to invalidate
  • There is no state inconsistency between replicas
  • Any agent or tool can independently compute the same state from the same ledger

Read ledger, write ops.

This is the one rule that every Mentu implementation must follow:

  • To read state: replay the ledger
  • To change state: append an operation to the ledger

No implementation may store derived state as the source of truth. Caches and materialized views are allowed for performance, but the ledger is always authoritative.

Operations are only ever appended. No operation is ever modified or deleted.

Given the same sequence of operations, every implementation must compute the same state. There is no ambiguity in how operations are interpreted.

An operation is valid only if it represents a legal state transition. For example, you cannot close a commitment that is in the open state — it must first be claimed and then submitted (or use close_direct with appropriate permissions).

OperationObjectDescription
commitCommitmentCreate a new commitment
claimCommitmentAssign a commitment to an actor
unclaimCommitmentRelease a claimed commitment
evidenceCommitmentAttach evidence to a claimed commitment
submitCommitmentSubmit a commitment for review
closeCommitmentClose a commitment (with verdict)
reopenCommitmentReopen a closed or dismissed commitment
dismissCommitmentDiscard a commitment
captureMemoryCreate a new memory
annotateMemoryAdd annotation to a memory
triageMemoryClassify and prioritize a memory
linkBothLink a memory to a commitment

A unit of work with a defined lifecycle. Commitments move through states: open -> claimed -> in_review -> closed. They carry evidence and are bound to accountability rules.

A unit of context. Memories capture information — bug reports, decisions, notes — that inform commitment work. Memories are referenced by commitments but have their own lifecycle.

VersionMilestoneOperations Added
v0.1Core operationscommit, claim, close, capture, annotate, link
v0.8Triage operationstriage, unclaim, dismiss, evidence
v1.0Review operationssubmit, reopen

The protocol has evolved to support increasingly sophisticated workflows while maintaining backward compatibility. A v0.1 ledger is still valid under v1.0 — new operations are additive, never breaking.