@letta-ai/letta-code 0.31.4 → 0.31.5

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.
@@ -88,15 +88,20 @@ If CLI behavior does not match the docs, stop and inspect `command -v letta`, `t
88
88
 
89
89
  Use memory when the user wants you to remember, prefer, learn, or change your identity/personality.
90
90
 
91
- Common files:
91
+ Inspect the projected memory tree in the system prompt before choosing paths.
92
+ Letta Code supports two layouts:
92
93
 
93
- | Path | Purpose |
94
- | --- | --- |
95
- | `$MEMORY_DIR/system/persona.md` | Identity, voice, behavioral defaults |
96
- | `$MEMORY_DIR/system/human.md` | Notes about the person you work with |
97
- | `$MEMORY_DIR/projects/` | Project-specific long-term context |
98
- | `$MEMORY_DIR/skills/` | Agent-owned reusable skills |
99
- | `$MEMORY_DIR/relationships/` | Relationship and collaboration notes |
94
+ | Purpose | Root layout | Existing layout |
95
+ | --- | --- | --- |
96
+ | Identity and voice | `$MEMORY_DIR/persona.md` or another root persona file | `$MEMORY_DIR/system/persona.md` |
97
+ | Notes about the user | `$MEMORY_DIR/human.md` or another root human file | `$MEMORY_DIR/system/human.md` |
98
+ | Core memory | Other root Markdown files indexed by `MEMORY.md` | Markdown files under `$MEMORY_DIR/system/` |
99
+ | Deferred memory | Directories with their own `MEMORY.md` | Files outside `$MEMORY_DIR/system/` |
100
+ | Agent-owned skills | `$MEMORY_DIR/skills/` | `$MEMORY_DIR/skills/` |
101
+
102
+ Use the active layout shown by the prompt and memory tools. Do not create a
103
+ `system/` directory in a root-layout repository or move existing-layout memory
104
+ to the root as part of an unrelated self-configuration request.
100
105
 
101
106
  After changing memory, inspect and commit the exact changed files. Push/sync according to the current harness reminder or the `syncing-memory-filesystem` skill; some environments sync committed memory automatically.
102
107
 
@@ -15,11 +15,16 @@ MemFS is a Git repository projected onto the computer where the agent is
15
15
  running. `$MEMORY_DIR` is the repository root. There is no second `memory/`
16
16
  directory inside it.
17
17
 
18
+ The repository can use either memory layout. Inspect its current tree and the
19
+ memory rules in the system prompt before editing files:
20
+
18
21
  ```text
19
- $MEMORY_DIR/
20
- ├── .git/
21
- ├── system/ # loaded into the system prompt
22
- ├── reference/ # loaded only when read
22
+ Root layout Existing layout
23
+ $MEMORY_DIR/ $MEMORY_DIR/
24
+ ├── MEMORY.md # root index ├── system/ # in-context memory
25
+ ├── persona.md # core memory ├── reference/ # deferred memory
26
+ ├── <topic>/ └── skills/ # agent-owned skills
27
+ │ └── MEMORY.md # child index
23
28
  └── skills/ # agent-owned skills
24
29
  ```
25
30
 
@@ -32,7 +37,7 @@ on the current machine. Do not run `git push` for normal MemFS sync; let the
32
37
  harness push after the turn.
33
38
 
34
39
  Committed memory changes do not alter the current compiled prompt immediately.
35
- Use `/recompile` when the current conversation must see new `system/` content
40
+ Use `/recompile` when the current conversation must see changed core memory
36
41
  right away. Otherwise, the next prompt compilation or conversation will use
37
42
  the committed revision.
38
43
 
@@ -87,9 +92,13 @@ auth, branch tracking, and agent identity.
87
92
 
88
93
  ## Uncommitted Changes
89
94
 
90
- Raw file edits must preserve required frontmatter. Markdown files under
91
- `system/` and `reference/` need a non-empty `description`. `read_only` is
92
- protected and cannot be added, removed, or changed by the agent.
95
+ Raw file edits must preserve the active layout's rules:
96
+
97
+ - In the root layout, root and child `MEMORY.md` indexes have no frontmatter.
98
+ Every other memory Markdown file has exactly `name` and `description`.
99
+ - In the existing layout, Markdown files under `system/` and `reference/` need
100
+ a non-empty `description`. `read_only` is protected and cannot be added,
101
+ removed, or changed by the agent.
93
102
 
94
103
  ```markdown
95
104
  ---
@@ -121,7 +130,7 @@ Resolve the conflict markers without deleting required frontmatter, then stage
121
130
  the resolved files by name. Finish the operation Git reports:
122
131
 
123
132
  ```bash
124
- git -C "$MEMORY_DIR" add system/example.md
133
+ git -C "$MEMORY_DIR" add <resolved-memory-path>
125
134
 
126
135
  # If git status says a rebase is in progress:
127
136
  GIT_EDITOR=true git -C "$MEMORY_DIR" rebase --continue
@@ -163,7 +172,8 @@ MemFS synchronization.
163
172
  2. Check whether the backend is cloud-backed or local-only.
164
173
  3. Inspect `git status`, the origin URL, and the current Git operation.
165
174
  4. Use `/memfs enable` for a missing checkout and `/memfs sync` for a pull.
166
- 5. Preserve frontmatter and finish any existing merge or rebase.
175
+ 5. Preserve the active layout's indexes and frontmatter, then finish any
176
+ existing merge or rebase.
167
177
  6. Leave hosted pushes to post-turn sync once the repository is clean.
168
178
  7. If the command still fails, rerun it with `LETTA_DEBUG=1` and report the
169
179
  redacted error. Never print or copy credential-helper values.