@letta-ai/letta-code 0.21.9 → 0.21.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.21.9",
3
+ "version": "0.21.10",
4
4
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,16 +5,16 @@ description: Identify and repair degradation in system prompt, external memory,
5
5
  ---
6
6
 
7
7
  # Context Doctor
8
- Your context is managed by yourself, along with additional memory subagents. Your context includes:
9
- - Your system prompt and instructions (contained in `system/`)
10
- - Your external memory
8
+ Your context is what makes you *you* across sessions. You are responsible for managing it (along with memory subagents). It includes:
9
+ - Your system prompt and memories (contained in `system/`)
10
+ - Your external memory (contained in the memory filesystem)
11
11
  - Your skills (procedural memory)
12
12
 
13
13
  Over time, context can degrade — bloat and poor prompt quality erode your ability to remember the right things and follow instructions properly. This skill helps you identify issues with your context and repair them collaboratively with the user.
14
14
 
15
15
  ## Operating Procedure
16
16
 
17
- ### Step 1: Identifying and resolving context issues
17
+ ### Step 1: Identify and resolve context issues
18
18
  Explore your memory files to identify issues. Consider what is confusing about your own prompts and context, and resolve the issues.
19
19
 
20
20
  Below are additional common issues with context and how they can be resolved:
@@ -28,7 +28,7 @@ Your system prompt and memory filesystem should be well structured and clear.
28
28
  - Do I know when to load which files in my memory filesystem?
29
29
 
30
30
  #### System prompt bloat
31
- Prompts that are compiled as part of the system prompt (contained in `system/`) should only take up about 10% of the total context size, though this is a recommendation, not a hard requirement. Usually this means about 15-20k tokens.
31
+ Memories that are compiled as part of the system prompt (contained in `system/`) should only take up about 10% of the total context size (usually ~15-20K tokens), though this is a recommendation, not a hard requirement.
32
32
 
33
33
  Use the following script to evaluate the token usage of the system prompt:
34
34
  ```bash
@@ -37,14 +37,14 @@ npx tsx <SKILL_DIR>/scripts/estimate_system_tokens.ts --memory-dir "$MEMORY_DIR"
37
37
  Where `<SKILL_DIR>` is the Skill Directory shown when the skill was loaded (visible in the injection header).
38
38
 
39
39
  **Questions to ask**:
40
- - Do all these tokens need to be passed to the LLM on every turn, or can they be retrieved when needed through being part of external memory of my conversation history?
40
+ - Do all these tokens need to be passed to the LLM on every turn, or can they be retrieved when needed through being part of external memory or conversation history?
41
41
  - Do any of these prompts confuse or distract me?
42
42
  - Am I able to effectively follow critical instructions (e.g. persona information, user preferences) given the current prompt structure and contents?
43
43
 
44
44
  **Solution**: Reduce the size of the system prompt if needed:
45
45
  - Move files outside of `system/` so they are no longer part of the system prompt
46
46
  - Compact information to be more information dense or eliminate redundancy
47
- - Leverage progressive disclosure: move some context outside of `system/` and reference it to pull in dynamically
47
+ - Leverage progressive disclosure: move some context outside of `system/` and reference it via `[[path]]` links to create discovery paths
48
48
 
49
49
  **Scope**: You may refine, tighten, and restructure prompts to improve clarity and adherence — but do not change the intended semantics. The goal is better signal, not different behavior.
50
50
  - Do not alter persona-defining content (who you are, how you communicate)
@@ -83,7 +83,7 @@ skill-name/
83
83
  ### Poor use of progressive disclosure
84
84
  Only critical information should be in the system prompt, since it's passed on every turn. Use progressive disclosure so that context only *sometimes* needed can be dynamically retrieved.
85
85
 
86
- Files that are outside of `system/` are not part of the system prompt, and must be dynamically loaded. You must index your files to ensure your future self can discover them: for example, make sure that files have informative names and descriptions, or are referenced from parts of your system prompt. Otherwise, you will never discover the external context or make use of it.
86
+ Files that are outside of `system/` are not part of the system prompt, and must be dynamically loaded. You must index your files to ensure your future self can discover them: for example, make sure that files have informative names and descriptions, or are referenced from parts of your system prompt via `[[path]]` links to create discovery paths. Otherwise, you will never discover the external context or make use of it.
87
87
 
88
88
  **Solution**:
89
89
  - Reference external skills from the relevant parts of in-context memory:
@@ -104,7 +104,7 @@ Before moving on, verify:
104
104
  - [ ] System prompt token budget reviewed (target ~10% of context, usually 15-20k tokens)
105
105
  - [ ] No overlapping or redundant files remain
106
106
  - [ ] All file descriptions are unique, accurate, and match their contents
107
- - [ ] Moved-out knowledge has references from in-context memory so it can be discovered
107
+ - [ ] Moved-out knowledge has `[[path]]` references from in-context memory so it can be discovered
108
108
  - [ ] No semantic changes to persona, user identity, or behavioral instructions
109
109
 
110
110
  ### Step 3: Commit and push
@@ -122,7 +122,7 @@ git push
122
122
  ```
123
123
 
124
124
  ### Step 4: Final checklist and message
125
- Tell the user what issues you identitied, the fixes you made, the commit you made, and also recommend that they run `/recompile` to apply these changes to the current system prompt.
125
+ Tell the user what issues you identified, the fixes you made, the commit you made, and also recommend that they run `/recompile` to apply these changes to the current system prompt.
126
126
 
127
127
  Before finishing make sure you:
128
128
  - [ ] Resolved all the identified context issues
@@ -130,4 +130,4 @@ Before finishing make sure you:
130
130
  - [ ] Told the user to run `/recompile` to refresh the system prompt and apply changes
131
131
 
132
132
  ## Critical information
133
- - **Ask the user about their goals for you, not the implementation**: You understand your own context best, and should follow the guidelines in this document. Do NOT ask the user about their structural preferences - the context is for YOU, not them. Ask them how they want YOU to behave or know instead.
133
+ - **Ask the user about their goals for you, not the implementation**: You understand your own context best, and should follow the guidelines in this document. Do NOT ask the user about their structural preferences the context is for YOU, not them. Ask them how they want YOU to behave or know instead.
@@ -209,7 +209,7 @@ Note: `codex exec resume` works non-interactively. `codex resume` and `codex for
209
209
 
210
210
  **Don't** run `history-analyzer` after every dispatch — your reflection agent already captures insights naturally, and single-session analysis produces overly detailed notes.
211
211
 
212
- **Do** use `history-analyzer` for **bulk migration** when bootstrapping memory from months of accumulated history (e.g. during `/init`). See the `migrating-from-codex-and-claude-code` skill.
212
+ **Do** use `history-analyzer` for **bulk migration** when bootstrapping memory from months of accumulated history (e.g. during `/init`). See the `initializing-memory` skill's historical session analysis reference.
213
213
 
214
214
  Direct uses for session files:
215
215
  - **Resume** an investigation (see above)