@letta-ai/letta-code 0.34.32 → 0.34.33
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.
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/mcp-oauth.js +2 -2
- package/dist/mcp-oauth.js.map +1 -1
- package/letta.js +9 -9
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/context-doctor/references/auditing-memory.md +6 -3
- package/skills/creating-skills/SKILL.md +22 -1
- package/skills/initializing-memory/SKILL.md +29 -13
- package/skills/maintaining-core-memory/SKILL.md +22 -1
- package/skills/maintaining-deferred-memory/SKILL.md +22 -2
- package/skills/managing-shared-memory/SKILL.md +22 -7
- package/skills/syncing-memory-filesystem/SKILL.md +1 -1
package/letta.js
CHANGED
|
@@ -6044,7 +6044,7 @@ var package_default;
|
|
|
6044
6044
|
var init_package = __esm(() => {
|
|
6045
6045
|
package_default = {
|
|
6046
6046
|
name: "@letta-ai/letta-code",
|
|
6047
|
-
version: "0.34.
|
|
6047
|
+
version: "0.34.33",
|
|
6048
6048
|
lettaStartupLogProtocol: 1,
|
|
6049
6049
|
lettaConfigDirProtocol: 1,
|
|
6050
6050
|
description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
@@ -211630,7 +211630,7 @@ var init_mcp_client = __esm(() => {
|
|
|
211630
211630
|
init_streamableHttp();
|
|
211631
211631
|
DEFAULT_CLIENT_INFO = {
|
|
211632
211632
|
name: "letta-code",
|
|
211633
|
-
version: "0.34.
|
|
211633
|
+
version: "0.34.33"
|
|
211634
211634
|
};
|
|
211635
211635
|
});
|
|
211636
211636
|
|
|
@@ -244586,7 +244586,7 @@ class CodexAppServerClient {
|
|
|
244586
244586
|
await this.request("initialize", {
|
|
244587
244587
|
clientInfo: {
|
|
244588
244588
|
name: "letta-code",
|
|
244589
|
-
version: "0.34.
|
|
244589
|
+
version: "0.34.33"
|
|
244590
244590
|
},
|
|
244591
244591
|
capabilities: null
|
|
244592
244592
|
});
|
|
@@ -454275,12 +454275,12 @@ function rowToolCalls(row, index, diagnostics2) {
|
|
|
454275
454275
|
}
|
|
454276
454276
|
return calls;
|
|
454277
454277
|
}
|
|
454278
|
-
function
|
|
454278
|
+
function contentText3(content) {
|
|
454279
454279
|
if (typeof content === "string") {
|
|
454280
454280
|
if (content.startsWith(CONTENT_JSON_PREFIX)) {
|
|
454281
454281
|
const encoded = content.slice(CONTENT_JSON_PREFIX.length);
|
|
454282
454282
|
try {
|
|
454283
|
-
return
|
|
454283
|
+
return contentText3(JSON.parse(encoded));
|
|
454284
454284
|
} catch {
|
|
454285
454285
|
return encoded;
|
|
454286
454286
|
}
|
|
@@ -454366,7 +454366,7 @@ var init_hermes = __esm(() => {
|
|
|
454366
454366
|
});
|
|
454367
454367
|
};
|
|
454368
454368
|
if (row.role === "user") {
|
|
454369
|
-
const content =
|
|
454369
|
+
const content = contentText3(row.content);
|
|
454370
454370
|
if (content) {
|
|
454371
454371
|
emit({
|
|
454372
454372
|
type: "message",
|
|
@@ -454386,7 +454386,7 @@ var init_hermes = __esm(() => {
|
|
|
454386
454386
|
...timestamp ? { timestamp } : {}
|
|
454387
454387
|
});
|
|
454388
454388
|
}
|
|
454389
|
-
const content =
|
|
454389
|
+
const content = contentText3(row.content);
|
|
454390
454390
|
if (content) {
|
|
454391
454391
|
emit({
|
|
454392
454392
|
type: "message",
|
|
@@ -454409,7 +454409,7 @@ var init_hermes = __esm(() => {
|
|
|
454409
454409
|
if (row.role === "tool") {
|
|
454410
454410
|
emit({
|
|
454411
454411
|
type: "tool_result",
|
|
454412
|
-
content:
|
|
454412
|
+
content: contentText3(row.content),
|
|
454413
454413
|
...typeof row.tool_call_id === "string" && row.tool_call_id ? { callId: row.tool_call_id } : {},
|
|
454414
454414
|
...timestamp ? { timestamp } : {}
|
|
454415
454415
|
});
|
|
@@ -539260,4 +539260,4 @@ function registerBunOAuthFlows() {
|
|
|
539260
539260
|
registerBunOAuthFlows();
|
|
539261
539261
|
await init_src5().then(() => exports_src2);
|
|
539262
539262
|
|
|
539263
|
-
//# debugId=
|
|
539263
|
+
//# debugId=DC6442E21D1E98A964756E2164756E21
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.33",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"packages": {
|
|
6
6
|
"node_modules/@alcalzone/ansi-tokenize": {
|
|
@@ -5633,7 +5633,7 @@
|
|
|
5633
5633
|
},
|
|
5634
5634
|
"": {
|
|
5635
5635
|
"name": "@letta-ai/letta-code",
|
|
5636
|
-
"version": "0.34.
|
|
5636
|
+
"version": "0.34.33",
|
|
5637
5637
|
"dependencies": {
|
|
5638
5638
|
"@cursor/sdk": "1.1.0",
|
|
5639
5639
|
"@earendil-works/pi-ai": "^0.99.1",
|
package/package.json
CHANGED
|
@@ -64,9 +64,12 @@ Moving detail behind a link changes when it reaches the model. Keep essential
|
|
|
64
64
|
instructions and cues for when to retrieve that detail in core memory; a link
|
|
65
65
|
alone does not preserve their in-context effect.
|
|
66
66
|
|
|
67
|
-
Review the diff and validate changed file structure and links.
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
Review the diff and validate changed file structure and links. Commit with the
|
|
68
|
+
*Commit memory changes* format from `maintaining-core-memory` or
|
|
69
|
+
`maintaining-deferred-memory`: one commit per repair, citing the conversations,
|
|
70
|
+
message IDs, and files that support it under `Sources:`.
|
|
71
|
+
Doctor has no separate worktree or completion-time integration step. If there
|
|
72
|
+
are no supported fixes, make no commit.
|
|
70
73
|
|
|
71
74
|
After a repair, recheck the original structural or content defect and any
|
|
72
75
|
affected links or indexes.
|
|
@@ -332,7 +332,7 @@ Write instructions for using the skill and its bundled resources.
|
|
|
332
332
|
|
|
333
333
|
### Step 5: Packaging a Skill
|
|
334
334
|
|
|
335
|
-
Package the skill only when it needs to be distributed as a file, for example when sharing it with a user. Skills maintained in place, such as those under an agent's memory `skills/` directory, are used directly and need no packaging.
|
|
335
|
+
Package the skill only when it needs to be distributed as a file, for example when sharing it with a user. Skills maintained in place, such as those under an agent's memory `skills/` directory, are used directly and need no packaging. Commit them instead, following [Commit memory changes](#commit-memory-changes).
|
|
336
336
|
|
|
337
337
|
To package a skill into a distributable .skill file, run the packaging script. The packaging process automatically validates the skill first to ensure it meets all requirements:
|
|
338
338
|
|
|
@@ -369,3 +369,24 @@ Improve a skill when real usage shows it falling short, whether through user fee
|
|
|
369
369
|
2. Notice struggles or inefficiencies
|
|
370
370
|
3. Identify how SKILL.md or bundled resources should be updated
|
|
371
371
|
4. Implement changes and test again
|
|
372
|
+
|
|
373
|
+
## Commit memory changes
|
|
374
|
+
|
|
375
|
+
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:
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
git add <changed files> && git commit -m "memory(<origin>): <what was learned>
|
|
379
|
+
|
|
380
|
+
<what happened: the events that led to this learning and why it should persist>
|
|
381
|
+
|
|
382
|
+
Sources:
|
|
383
|
+
- <conversation ID> (<message IDs>), <who>, <date>: <what happened there>"
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
- `<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.
|
|
387
|
+
- 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.
|
|
388
|
+
- The subject states the learning itself, such as `memory(self): Sarah wants one commit per learning`, not the file edit.
|
|
389
|
+
- 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.
|
|
390
|
+
- `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.
|
|
391
|
+
- Do not invent a source. If the origin cannot be identified, write `Sources: unknown` and say why in the body.
|
|
392
|
+
- Never include secrets.
|
|
@@ -47,7 +47,7 @@ Working with the maintainer of orchard, a CLI for build fleets.
|
|
|
47
47
|
Repo conventions live in `AGENTS.md` and its nested guides; read them there.
|
|
48
48
|
|
|
49
49
|
Where the rest of what I know lives:
|
|
50
|
-
- [orchard](orchard/MEMORY.md) — architecture, gotchas, and
|
|
50
|
+
- [orchard](orchard/MEMORY.md) — architecture, gotchas, and recurring corrections to consult when working there
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
An index pointing at nothing is worse than the content it displaced.
|
|
@@ -71,10 +71,10 @@ human.md # The person: role, motivations, how they work
|
|
|
71
71
|
orchard/
|
|
72
72
|
├── MEMORY.md # Index for the deferred orchard notes
|
|
73
73
|
├── architecture.md # How the subsystems actually fit together
|
|
74
|
-
├── gotchas.md # Footguns
|
|
74
|
+
├── gotchas.md # Footguns and why each one bites
|
|
75
75
|
└── history/
|
|
76
76
|
├── MEMORY.md # Required — every directory level needs its own index
|
|
77
|
-
└── corrections.md #
|
|
77
|
+
└── corrections.md # Recurring corrections as rules; quotes and session ids go in the commits
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
`orchard/history/` needs its own `MEMORY.md` purely because it is a directory level. An agent with no child directories at all would be equally correct.
|
|
@@ -169,9 +169,9 @@ It reports sessions analyzed, unread, excluded, export errors, and any dropped f
|
|
|
169
169
|
|
|
170
170
|
**Provenance gates promotion here too**, not only in the subagent — a worker's authorship flag must survive curation, because flagged excerpts still read like preferences. Before promoting any claim about what the human wants, check who wrote the quoted words; agent-authored dispatch prompts describe how an *agent* was instructed to work. If it is ambiguous, corroborate from a session you know the human drove, or store it as an observed pattern with the uncertainty stated. Repetition does not establish authorship: a template reused across fifty sessions repeats fifty times.
|
|
171
171
|
|
|
172
|
-
**Combine, then deduplicate.** Cohorts report the same topic at different specificity. Keep the unique details from each —
|
|
172
|
+
**Combine, then deduplicate.** Cohorts report the same topic at different specificity. Keep the unique details from each — paths, correction counts — and sum correction counts across cohorts, since a correction seen in five cohorts is a chronic failure. Keep the specific form alongside the general: "Use factory methods, such as `create_token_counter()`, not direct instantiation" beats "prefers factory methods". Then keep each fact exactly once, and push what you don't need every turn into deferred memory with a discovery link from the core tier.
|
|
173
173
|
|
|
174
|
-
**Promote into canonical memory.** Write the survivors into the files their topics belong in,
|
|
174
|
+
**Promote into canonical memory.** Write the survivors into the files their topics belong in, as rules and facts. Cover all three of identity and personality, hard rules and preferences, and project context; skip generic repo facts unless they change how you execute. If the output reads generically, the analysis failed for that area — re-read those transcripts or that code yourself. Put the quotes and stable `sessionId`s behind each finding in its commit, not the memory file; `/tmp` results and journals are scratch, not retrievable evidence.
|
|
175
175
|
|
|
176
176
|
**Consider skills.** If the history surfaces genuinely repeatable multi-step procedures, create them now (load `creating-skills`) or note the candidates in memory. Don't force it.
|
|
177
177
|
|
|
@@ -187,15 +187,10 @@ It reports sessions analyzed, unread, excluded, export errors, and any dropped f
|
|
|
187
187
|
### 10. Commit, then report
|
|
188
188
|
**Uncommitted memory is not part of your future system prompt.** If a commit is blocked, report initialization as incomplete rather than describing working-tree files as live memory.
|
|
189
189
|
|
|
190
|
-
|
|
191
|
-
cd $MEMORY_DIR
|
|
192
|
-
git status # Review what changed before staging
|
|
193
|
-
git add <specific files> # Stage targeted paths — avoid blind `git add -A`
|
|
194
|
-
author_name="${AGENT_NAME:-$AGENT_ID}"
|
|
195
|
-
git commit --author="$author_name <$AGENT_ID@letta.com>" -m "feat(init): <summary> ✨
|
|
196
|
-
|
|
197
|
-
<what was initialized and key decisions made>"
|
|
190
|
+
Review `git status`, then commit with [Commit memory changes](#commit-memory-changes), adding `--author="${AGENT_NAME:-$AGENT_ID} <$AGENT_ID@letta.com>"`. Commit each topic you wrote (identity, preferences, a project) separately, and list the repositories, files, and `sessionId`s its findings came from under `Sources:`. Then confirm the result:
|
|
198
191
|
|
|
192
|
+
```bash
|
|
193
|
+
cd "$MEMORY_DIR"
|
|
199
194
|
git status # Your memory changes should no longer be listed
|
|
200
195
|
git ls-tree -r --name-only HEAD # What your future self will actually load
|
|
201
196
|
```
|
|
@@ -204,6 +199,27 @@ Do **not** run `git push`. The harness pushes clean committed memory automatical
|
|
|
204
199
|
|
|
205
200
|
Only once the commit is verified, tell the user what you built and whether coverage was complete, then ask whether they want refinement — which means another commit, so repeat this step.
|
|
206
201
|
|
|
202
|
+
## Commit memory changes
|
|
203
|
+
|
|
204
|
+
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:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
git add <changed files> && git commit -m "memory(<origin>): <what was learned>
|
|
208
|
+
|
|
209
|
+
<what happened: the events that led to this learning and why it should persist>
|
|
210
|
+
|
|
211
|
+
Sources:
|
|
212
|
+
- <conversation ID> (<message IDs>), <who>, <date>: <what happened there>"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- `<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.
|
|
216
|
+
- 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.
|
|
217
|
+
- The subject states the learning itself, such as `memory(self): Sarah wants one commit per learning`, not the file edit.
|
|
218
|
+
- 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.
|
|
219
|
+
- `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.
|
|
220
|
+
- Do not invent a source. If the origin cannot be identified, write `Sources: unknown` and say why in the body.
|
|
221
|
+
- Never include secrets.
|
|
222
|
+
|
|
207
223
|
## Critical
|
|
208
224
|
- **Use parallel tool calls wherever possible** — read many files in one turn, write many memory files in one turn.
|
|
209
225
|
- **Write findings to memory as you go**; don't hold everything until the end.
|
|
@@ -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
|
|
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
|
|
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
|
|