@letta-ai/letta-code 0.34.32 → 0.34.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,7 +61,7 @@ Core memory is the agent's working model: who it is, how the user thinks and wha
61
61
  - When several rules share a cause, replace them with the one principle that explains them all, and delete the lines it absorbs in the same edit. Adding the principle while keeping the old rules is a log with a summary on top. A healthy file becomes more general over time; a growing count of narrow rules is a sign of failure.
62
62
  - State the principle with the reason that makes it generalize: "Verify claims against the running system, because Sarah trusts evidence over plausibility", not three separate rules about tests, logs, and deployments.
63
63
  - Write to the agent in the second person or imperative mood: "Lead with the answer", not "The user likes answers first". Say what to do rather than only what to avoid.
64
- - Leave out provenance: no names, dates, quotes, or stories about the incident. Message history already holds the events, and the commit message records why the line changed. When you edit a section that already contains provenance-laden rules, rewrite them as principles; nothing is lost, because git keeps the old text.
64
+ - Leave out provenance: no names, dates, quotes, or stories about the incident. Message history already holds the events, and the commit message records why the line changed and where the learning came from. When you edit a section that already contains provenance-laden rules, rewrite them as principles; nothing is lost, because git keeps the old text.
65
65
  - Update only from a pattern or an explicit instruction, not a single ambiguous event.
66
66
  - Check that a change does not contradict an existing line; resolve the conflict instead of adding both.
67
67
  - Write in plain language without all-caps or absolute emphasis. Overstated instructions get overapplied.
@@ -99,3 +99,24 @@ When a root file is long or the total is near its limit:
99
99
  1. Delete stale, duplicated, or rederivable content.
100
100
  2. Move subject detail into deferred memory and leave a one-line pointer in root `MEMORY.md`.
101
101
  3. Move procedures into skills.
102
+
103
+ ## Commit memory changes
104
+
105
+ Every memory commit must let someone reading `git log` or `git blame` on a memory or skill line trace back to the events that justified it. Commit each learning separately; a learning may touch several files. When a turn produces several learnings, finish and commit one before editing for the next. From the repository root, stage only that learning's files and commit in one shell call:
106
+
107
+ ```bash
108
+ git add <changed files> && git commit -m "memory(<origin>): <what was learned>
109
+
110
+ <what happened: the events that led to this learning and why it should persist>
111
+
112
+ Sources:
113
+ - <conversation ID> (<message IDs>), <who>, <date>: <what happened there>"
114
+ ```
115
+
116
+ - `<origin>` is `self` when you edit your own memory during a conversation, or `dream` when you are a reflection or dream subagent reviewing past transcripts.
117
+ - Provenance belongs in the commit, not the memory file: who said or did it (name and ID), when, the quote, and the incident go in the body and `Sources:`. The memory line states only the resulting rule or fact. For example, the file says "Be concise" and the commit says "feedback 'talk more concisely' from Charles <id> on <date>". Git dates the commit, not the event, so write the event date.
118
+ - The subject states the learning itself, such as `memory(self): Sarah wants one commit per learning`, not the file edit.
119
+ - The body tells the story: what the user said or corrected, what failed or succeeded, or what pattern recurred, and why it generalizes beyond that moment. A reader should understand why the memory exists without opening the sources.
120
+ - `Sources:` lists the evidence precisely enough to find again, with one line on what happened at each: a conversation ID with the message IDs where it happened, a transcript or session ID, a file path, a URL, PR, or issue, or a commit hash. When the user explicitly asked for the change, cite that request. Resolve values such as `$CONVERSATION_ID` before writing them; never commit a literal variable name.
121
+ - Do not invent a source. If the origin cannot be identified, write `Sources: unknown` and say why in the body.
122
+ - Never include secrets.
@@ -7,7 +7,7 @@ Deferred memory contains the agent's knowledge. Use deferred memory for understa
7
7
 
8
8
  Deferred memory should NOT be used to store:
9
9
  - Information that can be accessed by querying the message history (recall memory). For example, logs of specific interactions can simply be looked up in past messages. Reserve deferred memory to store knowledge that is actually *derived* from experience, or to organize knowledge in a way that optimizes recalling the right information at the right time through progressive disclosure.
10
- - Justifications or reasons for updating memory. These belong in the git commit history of MemFS.
10
+ - Justifications, reasons, or sources for updating memory. These belong in the commit message; see [Commit memory changes](#commit-memory-changes).
11
11
 
12
12
  ## Check the limits first
13
13
 
@@ -77,10 +77,30 @@ Recall already returns what happened. A deferred memory file is worth keeping on
77
77
 
78
78
  - Before writing, ask whether searching message history would give a future agent the same thing. If it would, do not write the file.
79
79
  - Write the current understanding: how the subject works, the patterns across events, why things failed or succeeded, what to do about it, and the open questions.
80
- - Revise the file in place when new evidence arrives. Fold the new event into the analysis; never append a dated entry, a quote, or an incident narrative.
80
+ - Revise the file in place when new evidence arrives. Fold the new event into the analysis; never append a dated entry, a quote, or an incident narrative; the commit carries the event.
81
81
  - When the file you are updating is already a log, convert it: write the analysis the entries support and delete the entries. Keeping them under an "incident history" heading leaves the log in place; git and recall already hold it.
82
82
  - When a raw event matters, point to it with terms that will find it in recall rather than copying it.
83
83
  - Keep one home per subject. Update the existing file instead of adding a near-duplicate, and replace stale conclusions where they live.
84
84
  - Leave out content the agent can cheaply rederive from the source of truth: file contents, command lists, and current status. Link to the owning source instead.
85
85
  - Never store secrets. Reference them by name, such as `$SECRET_NAME`.
86
86
 
87
+ ## Commit memory changes
88
+
89
+ Every memory commit must let someone reading `git log` or `git blame` on a memory or skill line trace back to the events that justified it. Commit each learning separately; a learning may touch several files. When a turn produces several learnings, finish and commit one before editing for the next. From the repository root, stage only that learning's files and commit in one shell call:
90
+
91
+ ```bash
92
+ git add <changed files> && git commit -m "memory(<origin>): <what was learned>
93
+
94
+ <what happened: the events that led to this learning and why it should persist>
95
+
96
+ Sources:
97
+ - <conversation ID> (<message IDs>), <who>, <date>: <what happened there>"
98
+ ```
99
+
100
+ - `<origin>` is `self` when you edit your own memory during a conversation, or `dream` when you are a reflection or dream subagent reviewing past transcripts.
101
+ - Provenance belongs in the commit, not the memory file: who said or did it (name and ID), when, the quote, and the incident go in the body and `Sources:`. The memory line states only the resulting rule or fact. For example, the file says "Be concise" and the commit says "feedback 'talk more concisely' from Charles <id> on <date>". Git dates the commit, not the event, so write the event date.
102
+ - The subject states the learning itself, such as `memory(self): Sarah wants one commit per learning`, not the file edit.
103
+ - The body tells the story: what the user said or corrected, what failed or succeeded, or what pattern recurred, and why it generalizes beyond that moment. A reader should understand why the memory exists without opening the sources.
104
+ - `Sources:` lists the evidence precisely enough to find again, with one line on what happened at each: a conversation ID with the message IDs where it happened, a transcript or session ID, a file path, a URL, PR, or issue, or a commit hash. When the user explicitly asked for the change, cite that request. Resolve values such as `$CONVERSATION_ID` before writing them; never commit a literal variable name.
105
+ - Do not invent a source. If the origin cannot be identified, write `Sources: unknown` and say why in the body.
106
+ - Never include secrets.
@@ -23,13 +23,7 @@ ls "$MEMORY_DIR/../" # attached repositories appear here by
23
23
  cat "$MEMORY_DIR/../<repo-name>/<path>" # read like any file
24
24
  ```
25
25
 
26
- Edit files with your normal file tools, then commit with git. The mount's origin and credentials are already configured:
27
-
28
- ```bash
29
- cd "$MEMORY_DIR/../<repo-name>"
30
- git add <files>
31
- git commit -m "describe the change"
32
- ```
26
+ Edit files with your normal file tools, then commit from the mount (`cd "$MEMORY_DIR/../<repo-name>"`) using [Commit memory changes](#commit-memory-changes). The mount's origin and credentials are already configured. Other agents read this history, so the sources matter as much as in your own memory.
33
27
 
34
28
  The harness pushes clean commits from read/write attached repositories after the turn. If a push collides with another agent's work, it pulls with rebase and retries once. Dirty files and conflicts are not changed automatically; the harness adds a reminder to the next turn instead.
35
29
 
@@ -85,6 +79,27 @@ letta shared-memory history shared-notes --path docs/plan.md
85
79
  - **Permission denied under another agent's directory** — shared repositories mount per-agent. Only your own mount (under your agent directory) is accessible; another agent's mount of the same repository is walled off by the cross-agent guard. Run `letta shared-memory sync` to get your own mount.
86
80
  - **Shared-memory conflict reminder** — resolve the conflict in the named repository, finish the rebase or commit, and leave the repository clean. The harness retries the push after a future turn.
87
81
 
82
+ ## Commit memory changes
83
+
84
+ Every memory commit must let someone reading `git log` or `git blame` on a memory or skill line trace back to the events that justified it. Commit each learning separately; a learning may touch several files. When a turn produces several learnings, finish and commit one before editing for the next. From the repository root, stage only that learning's files and commit in one shell call:
85
+
86
+ ```bash
87
+ git add <changed files> && git commit -m "memory(<origin>): <what was learned>
88
+
89
+ <what happened: the events that led to this learning and why it should persist>
90
+
91
+ Sources:
92
+ - <conversation ID> (<message IDs>), <who>, <date>: <what happened there>"
93
+ ```
94
+
95
+ - `<origin>` is `self` when you edit your own memory during a conversation, or `dream` when you are a reflection or dream subagent reviewing past transcripts.
96
+ - Provenance belongs in the commit, not the memory file: who said or did it (name and ID), when, the quote, and the incident go in the body and `Sources:`. The memory line states only the resulting rule or fact. For example, the file says "Be concise" and the commit says "feedback 'talk more concisely' from Charles <id> on <date>". Git dates the commit, not the event, so write the event date.
97
+ - The subject states the learning itself, such as `memory(self): Sarah wants one commit per learning`, not the file edit.
98
+ - The body tells the story: what the user said or corrected, what failed or succeeded, or what pattern recurred, and why it generalizes beyond that moment. A reader should understand why the memory exists without opening the sources.
99
+ - `Sources:` lists the evidence precisely enough to find again, with one line on what happened at each: a conversation ID with the message IDs where it happened, a transcript or session ID, a file path, a URL, PR, or issue, or a commit hash. When the user explicitly asked for the change, cite that request. Resolve values such as `$CONVERSATION_ID` before writing them; never commit a literal variable name.
100
+ - Do not invent a source. If the origin cannot be identified, write `Sources: unknown` and say why in the body.
101
+ - Never include secrets.
102
+
88
103
  ## Notes and Limits
89
104
 
90
105
  - Shared memory is not part of your system prompt. Writing to it does not change your in-context memory — for that, edit your memory blocks or MemFS files.
@@ -5,7 +5,7 @@ description: Diagnose and repair MemFS repository setup, remote sync, authentica
5
5
 
6
6
  # MemFS Repository Repair
7
7
 
8
- Use this skill when the Git repository behind an agent's memory is not setting up or syncing correctly. Before editing memory, load the relevant skills: `maintaining-core-memory` for root/core files, `maintaining-deferred-memory` for deferred files, and `creating-skills` for skills. Then make the edit directly with ordinary file tools so the agent with the context applies the memory guidance. Stage only changed files by explicit path and commit in the same shell call. Verify the repair before reporting success. While the harness reports a repair in progress, leave memory files and Git state to that repair worker, which edits `$MEMORY_DIR` in place.
8
+ Use this skill when the Git repository behind an agent's memory is not setting up or syncing correctly. Before editing memory, load the relevant skills: `maintaining-core-memory` for root/core files, `maintaining-deferred-memory` for deferred files, and `creating-skills` for skills. Then make the edit directly with ordinary file tools so the agent with the context applies the memory guidance. Stage only changed files by explicit path and commit in the same shell call, using the commit format in their *Commit memory changes* section. Verify the repair before reporting success. While the harness reports a repair in progress, leave memory files and Git state to that repair worker, which edits `$MEMORY_DIR` in place.
9
9
 
10
10
  ## Current Model
11
11