The CLI's facts in memory, notes_search, note_manage, skills_list, skill_view and skill_manage are `variables` now, filled with the CLI's own values (src/tool/spec-vars.ts): every description and parameter list the CLI sends is word for word what 1.1.0 said, except note and document ids, which are strings on both sides (a number is still taken). Descriptions are filled by the prompt texts' rules, parameter descriptions too. `narrow` says what a project offers of a shared tool's parameters. Memory's changes are one pure function (applyOps). Conformance: fill, narrow, memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
103 lines
4.0 KiB
JSON
103 lines
4.0 KiB
JSON
{
|
|
"name": "memory",
|
|
"scope": "shared",
|
|
"risk": "interact",
|
|
"exclusive": false,
|
|
"block": "tool",
|
|
"purpose": "purpose",
|
|
"aliases": {
|
|
"cli": [],
|
|
"llembas": [
|
|
"memory_add",
|
|
"memory_forget"
|
|
]
|
|
},
|
|
"variables": {
|
|
"project_home": "where facts about the current project belong instead, as a sentence after the WHEN paragraph's last one (\" Anything about this project belongs in its AGENTS.md or the project's decision log, not here.\"), or empty",
|
|
"targets": "the targets this project offers and what each is for",
|
|
"past_work": "how past work is found again, in parentheses after the SKIP list (\" (session_search finds past work)\"), or empty",
|
|
"when_seen": "when a saved entry reaches the model's instructions",
|
|
"target_values": "the `target` parameter's values and what each holds"
|
|
},
|
|
"description": "Save durable facts to persistent memory that survives across sessions. Memory goes into the system prompt of every future session, so keep entries short and worth their place.\n\nHOW: make all your changes in ONE call with an `operations` list ({action, content?, old_text?}). The list is applied together and the size limit is checked only on the result, so one call can remove or shorten stale entries AND add new ones. One call finishes the update; do not repeat it. Use the single action/content/old_text fields only for one lone change.\n\nWHEN: only for facts that hold in EVERY session, whatever the task: who the user is, stable facts about their machines and environment, standing conventions with no better home. How to do a kind of task — procedures, pitfalls, the user's corrections about that work — belongs in a skill (skill_manage), which loads only when relevant.{{project_home}}\n\nTARGETS: {{targets}}\n\nIF FULL: an add is refused and the current entries are shown. Send one call that removes or shortens enough stale entries and adds the new one.\n\nSKIP: the obvious, what is easy to find again, raw data, task progress, logs of finished work, temporary state{{past_work}}.\n\n{{when_seen}}",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"target": {
|
|
"type": "string",
|
|
"enum": [
|
|
"memory",
|
|
"user",
|
|
"project"
|
|
],
|
|
"description": "{{target_values}}"
|
|
},
|
|
"action": {
|
|
"description": "A single change. Omit when using operations.",
|
|
"type": "string",
|
|
"enum": [
|
|
"add",
|
|
"replace",
|
|
"remove"
|
|
]
|
|
},
|
|
"content": {
|
|
"description": "add/replace: the entry. For replace, the COMPLETE new entry.",
|
|
"type": "string"
|
|
},
|
|
"new_text": {
|
|
"description": "Another name for content.",
|
|
"type": "string"
|
|
},
|
|
"old_text": {
|
|
"description": "replace/remove: a short unique part of the existing entry, to find it.",
|
|
"type": "string"
|
|
},
|
|
"operations": {
|
|
"description": "Several changes, applied together or not at all. Preferred for more than one change, and for making room.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"enum": [
|
|
"add",
|
|
"replace",
|
|
"remove"
|
|
]
|
|
},
|
|
"content": {
|
|
"description": "add/replace: the entry. For replace, the COMPLETE new entry — the whole matched entry is overwritten.",
|
|
"type": "string"
|
|
},
|
|
"new_text": {
|
|
"description": "Another name for content.",
|
|
"type": "string"
|
|
},
|
|
"old_text": {
|
|
"description": "replace/remove: a short unique part of the existing entry, to find it.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"action"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"target"
|
|
]
|
|
},
|
|
"narrow": {
|
|
"llembas": {
|
|
"enum": {
|
|
"target": [
|
|
"user"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|