memory_write
Create durable memories for coding agents, validating claims against the filesystem and git to flag stale or ungrounded facts.
Instructions
Create a new memory. Call PROACTIVELY when something durable enters the conversation — aggressive writing is safe; the gates below catch bad writes.
Parameters:
content: the memory body.scopes: non-empty list. Avoid the catch-all 'general'; prefer narrow tags liketools,infrastructure,projects:<name>.category(default 'fact'): one offact,user-inference,ambient.fact: project / infra / reference / tooling. Commits immediately (unlessrequire_write_confirmation).user-inference: claims ABOUT THE USER. Always returns {status:'pending', pending_id} regardless of config — ask the user in plain language, then memory_write_confirm or memory_write_cancel. Misattribution sticks; user gets the veto.ambient: context that shapes replies without being cited. Commits like fact, excluded from dead-weight curation; a body over 500 words gets a non-blockingambient_body_longwarning.
confidence('low' / 'medium' / 'high'),source('explicit-statement' / 'inferred').claims(optional): claims the body makes about this repo —path,path::symbol,path::NAME=literal,!path(absent). Checked against the worktree NOW (false ⇒ refused); drift watches the claimed bindings, not whole files. Declare when citing code.groundedness_check=True+source_transcript: optional gate. Sentences with <30% token overlap to the transcript return {status:'ungrounded', claims:[…]}. Override viaacknowledge_ungrounded=Truewhen grounding came from outside the transcript (file reads, tool results).supersedes(optional): ids of active memories this write replaces (each gets asupersedeslink,superseded_byon the stale hit). Also set unasked when a claim-sized body updates a stored claim — a change cue plus a diverging value; with no cue the pair is filed for memory_conflicts.
Return statuses:
committed— write succeeded; payload carries the new id,relatedmatches, and anysupersedes/conflicts_filedrows.duplicate— content dedup fired; the matched memory is credited a corroboration (corroboration_recorded: true, once per session); thehintcarries the remedy.transient_warning/credential_warning/previously_removed/scope_mismatch— gate rejects; each returns what matched and ahintwith the remedy and itsacknowledge_*/force=Trueoverride.user_claim_warning— the body reads as a claim ABOUT THE USER butcategoryisn'tuser-inference. Re-issue as that (the user gets the veto) or passacknowledge_user_claim=Trueif the subject is someone else.pending—category='user-inference'orrequire_write_confirmation.pending_reasondistinguishes.ungrounded— groundedness gate fired.
A committed or confirm response may carry a one-shot per-session curation_hint block ({pressure, threshold, counts, message}) when curation pressure (dead_weight + drifted + cold_endorsement_memories) crosses the configured threshold; memory_health has the full buckets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| claims | No | ||
| scopes | Yes | ||
| source | No | explicit-statement | |
| content | Yes | ||
| category | No | fact | |
| confidence | No | medium | |
| supersedes | No | ||
| source_transcript | No | ||
| groundedness_check | No | ||
| acknowledge_transient | No | ||
| acknowledge_credential | No | ||
| acknowledge_ungrounded | No | ||
| acknowledge_user_claim | No | ||
| acknowledge_scope_mismatch | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||