The shape
The full set is 12 primitives × 4 scopes × 2 verbs = 96 endpoints. Every endpoint shares the same contract:PUT vs PATCH
PUT replaces the entire primitive. The body is the new full value of that spec key.null deletes a key, missing keeps it, present replaces it. Arrays are replaced wholesale (RFC 7396 §1, not item-merged).
escalation_contact to the existing principal block. The type, identifier, and relationship fields are kept; the response carries the merged shape.
The primitive list
Alignment (8 primitives)
Protection (4 primitives)
Recompose-on-write
Every sub-resource write triggers a recompose so the agent’s effective card reflects the change immediately.- Agent scope — recompose runs synchronously in the request lifecycle. The response carries the new
content_hash+version. - Org / team / platform scope — fan-out: every member agent is marked for recompose. The response carries
agents_flagged_for_recompose: N. Background workers drain the queue over the next few seconds.
Splice-and-validate-whole
Writes don’t blindly accept your patch. The composer reads the current full spec, splices your primitive in, then validates the merged result against the unified card schema.- Errors inside the primitive you wrote — 400 with a care-framed message. The write doesn’t land.
- Errors outside the primitive (pre-existing structural problems in unrelated keys) — surface as
_warningson the 200 response. The write lands; you’re alerted to issues elsewhere in the spec that would benefit from a follow-up.
principal is never blocked by a validation problem in, say, audit — but you’re told about the unrelated problem so it can be addressed on its own write.
Care-framed errors
Every error path returns a structured JSON body with care-framed prose. The runtime asserts no compliance language slips through; the test suite scans the source modules for the forbidden words.When to use sub-resource verbs
- Operator updates one slot — bump retention_days, change the principal’s escalation_contact, add a forbidden tool. Sub-resource verbs are surgical.
- CI Action edits a single primitive — the
mnemom/cards-actiondrives sub-resource verbs from per-file YAML diffs. - Programmatic auditing tooling — a script that audits a fleet and tightens one mode value across many agents.
PUT /v1/<resource>/<scope>/<scope_id> documented in Cards as Resources. For previewing a write before committing, use the simulate endpoint.
Related reading
- Cards as Resources — the URL surface this builds on.
- AI helpers — scaffold + explain + simulate + tools/import as a coordinated authoring surface.
- Unified Cards overview — the alignment + protection spec.
- Card composition — how the four scopes merge.