memory_classify
Classify content into structured memory kinds (fact, procedure, decision, task, epic, etc.) and scope, with optional persistence as a capsule's sidecar label.
Instructions
Classify content into {kind: fact|procedure|decision|task|epic|brainstorm|doc|constraint|capability|failure_pattern, scope: project|global|session, authority_class, instruction_taint}. origin (extracted-candidate|owner-stated|tool-observation|external-import|session-note; default extracted-candidate) drives authority and default scope; external-import is BORN tainted. Pass kind to carry a memory_extract candidate's kind forward (never re-derived); omit it to derive from the content via the extract cue tables — closed ENGLISH + PORTUGUESE keyword lists (typed error when underivable — nothing is guessed; other languages: pass kind explicitly; the same extract ENTITY GATE applies, so a declarative/copular sentence derives a fact ONLY with an entity anchor — an acronym/number/path/dotted/backtick token — and "o sistema é resiliente" is underivable while "a API é lenta" derives fact). The schema-minimal call {content} is therefore wire-valid only when the content carries a derivable cue — the minimal ALWAYS-valid call is {content, kind}. taint_hint=true is monotone (never cleared by a clean local scan). With capsule_id (alias id — memory_get/memory_forget spell it id; capsule_id is canonical, both at once is a duplicate-field error) the label is PERSISTED as that capsule's sidecar record (upsert; audited) and readable back on memory_get's classification field; without it the call is advisory only. A persist onto a live capsule also answers content_matches_capsule — false means the label was derived from OTHER bytes than the capsule holds (the persist still executes, but the drift is named on the response and in the audit detail, never bound silently). Optional epistemic sidecar (u-r2, REQUIRES capsule_id — advisory-only calls carrying these are rejected with the teaching error, never silently dropped): evidence_state (closed set observed | inferred | unverified — how the claim relates to observation), proof_hint (the command that re-proves the claim), stale_if (the condition under which the claim expires). Persisted PER FIELD — an omitted field never clears a stored one — and read back on memory_get's epistemics and on retrieve envelopes. proof_hint/stale_if are ADVISORY STRINGS stored and surfaced verbatim, NEVER executed or evaluated by any code path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | When set, the classification is PERSISTED as this capsule's sidecar label (`kind` + `scope`; upsert). Unknown id → typed error, nothing written. Omitted → advisory only. q101: `id` is accepted as an alias (memory_get/memory_forget spell it `id`); `capsule_id` is canonical, and sending BOTH is a duplicate-field error (the q60 content/text precedent). | |
| kind | No | Carry-forward kind (e.g. from a `memory_extract` candidate — donor law: a supplied kind is never re-derived). Omitted → derived from the content; typed error when underivable. | |
| scope | No | Explicit scope override. Omitted → the origin's default scope. | |
| origin | No | Where the content came from — drives authority, default scope, and the born-tainted law. Omitted → `extracted-candidate` (the humble default: agent-inferred authority). | |
| content | Yes | The content to classify. | |
| stale_if | No | u-r2: OPTIONAL expiry condition persisted onto `capsule_id`'s epistemic sidecar. ADVISORY STRING ONLY — stored and surfaced verbatim, NEVER evaluated by any code path. Requires `capsule_id`. | |
| capsule_id | No | When set, the classification is PERSISTED as this capsule's sidecar label (`kind` + `scope`; upsert). Unknown id → typed error, nothing written. Omitted → advisory only. q101: `id` is accepted as an alias (memory_get/memory_forget spell it `id`); `capsule_id` is canonical, and sending BOTH is a duplicate-field error (the q60 content/text precedent). | |
| proof_hint | No | u-r2: OPTIONAL re-prove command persisted onto `capsule_id`'s epistemic sidecar. ADVISORY STRING ONLY — stored and surfaced verbatim, NEVER executed by any code path. Requires `capsule_id`. | |
| taint_hint | No | Upstream taint verdict (monotone: `true` can never be cleared). | |
| evidence_state | No | u-r2: OPTIONAL epistemic state persisted onto `capsule_id`'s epistemic sidecar (closed set observed | inferred | unverified — how the claim relates to observation). Requires `capsule_id`: the epistemic fields are capsule annotations, an advisory-only call carrying one is a teaching rejection, never a silent drop. |