Trust Postures are versioned. Every PUT creates a new revision; the parent posture’sDocumentation Index
Fetch the complete documentation index at: https://docs.mnemom.ai/llms.txt
Use this file to discover all available pages before exploring further.
current_revision_id pointer advances; older revisions stay immutable and queryable.
This page documents the versioning semantics, the immutability guarantees, the diff and rollback workflows, and what compliance reporting can rely on.
The model
Three tables underpin posture versioning:| Table | What it holds |
|---|---|
trust_postures | Library row — id, slug, name, scope, owner, current_revision_id pointer |
trust_posture_revisions | Versioned bodies — revision_id (PK), posture_id (FK), revision_no (monotonic per posture, starts at 1), body (JSONB), authored_by, authored_at, change_summary |
team_posture_assignments | Team↔posture link — team_id (PK), posture_id, optional assigned_revision_id to pin a specific revision (default: float against current) |
- Forward-only. Revisions are immutable once written. Editing a posture writes a new row to
trust_posture_revisionsand advancescurrent_revision_id. The old revision stays. - Float vs. pin. A team’s assignment may either float against the posture’s
current_revision_id(default — every PUT changes the team’s effective body too) or pin to a specificrevision_no(the team’s effective body never changes until the assignment is updated). Pinning is for change-controlled environments.
Revision lifecycle
First publish
trust_posturesrow withcurrent_revision_id = NULLtrust_posture_revisionsrow withrevision_no = 1- UPDATE
trust_posturesSETcurrent_revision_id = <new>
posture.create audit-log row lands with target_type='posture'.
Subsequent edits
revision_no, inserts a new revision with revision_no = max + 1, and PATCHes the parent’s current_revision_id. A posture.put audit-log row lands with metadata.revision_no populated.
The previous revision (1) stays. It’s still queryable. If you assigned a team to revision 1 (pinned), nothing changes for that team. If you assigned a team to current (floating), the team picks up revision 2 the next time the observer reads.
Rollback
There’s no destructive rollback. Rolling back to revision N means:current_revision_id points at revision 4, whose body equals revision 3’s. Audit linearity preserved — the log shows “rolled back to revision 3” rather than “revision 4 appears to have been deleted.”
Diff
Compare any two revisions:{path, op, before, after} entries. Op is added, removed, or changed. Useful for change-review and for compliance reports (“what changed between Q1 and Q2?”).
Immutability guarantees
Mnemom-shipped platform defaults
The three Mnemom-shipped postures (tp-platform-standard, tp-platform-high-compliance, tp-platform-low-latency) are immutable from REST. PUT and DELETE return 403. Future tuning ships as a new revision migration (a versioned platform-side change), not as an edit through the API. This keeps the seed-via-migration discipline auditable.
To customize a platform default, clone it into your org via mnemom posture clone and edit the clone.
Org-scope postures
Org admins (owner, admin) can:- Create new postures in the org
- PUT new revisions
- Soft-delete (refuses if the posture is currently assigned to any team — unassign first)
- Clone other postures (including platform defaults) into the org
- Assign / unassign to teams
- List postures
- Read postures and revisions
- Diff revisions
- Preview-compose
Compliance applications
Versioned postures + audit log together give compliance reporting a queryable foundation. Point-in-time policy state:Audit-log actions
Every posture mutation emits agovernance_audit_log row with target_type='posture':
| Action | Surface |
|---|---|
posture.create | New posture + initial revision |
posture.put | New revision on existing posture |
posture.clone | Source posture cloned to target org |
posture.delete | Soft-delete (refused if assigned) |
team_posture.assign | Assignment created or replaced (one-active-per-team) |
team_posture.unassign | Assignment removed |
before_json + after_json (where applicable) and metadata (org_id, team_id, revision_no, source_posture_id for clones, etc.).
API surface
Read endpoints — accessible to any org member:GET /v1/postures/{id}/revisions— list revisions, newest firstGET /v1/postures/{id}/revisions/{n}— read specific revisionGET /v1/postures/{id}/diff?from=N&to=M— structural diff between revisions
PUT /v1/postures/{id}— write a new revision (forward-only)
mnemom posture subcommands (update, revisions, diff, clone).
See also
- Trust Posture — overview
- Trust Posture vs. Cards — parallel cascades
- Mnemom-shipped default postures — the three immutable defaults
- Trust Posture schema — normative JSONB body