Chapter 3: The Four Commands


What Is memory_user_edits?

memory_user_edits is a system tool that allows direct control over what Claude remembers across all conversations in a project. Think of it as “sticky notes” that persist forever — or until you remove them.

The Core Idea

Regular Memory Memory Edits
Generated by Claude Written by you (or Claude with permission)
Narrative format Bullet points
Holistic summary Specific facts
Updates automatically Only changes when you edit
Can be verbose Max 200 chars per edit
Can drift over time Stays exact

Important Scope

  • Project-scoped: Memory edits only work in Claude Projects
  • Not available: In regular conversations outside Projects
  • Persistent: Edits stay until you manually remove them
  • Separate: Each Project has its own set of memory edits

The Memory Architecture

When you start a conversation with Claude in a project, two things load:

1. Automatic Memory (Long-Form Summary)

<userMemories>
  "Francesco is building 5Levels, a LinkedIn intelligence platform..."
  "[Automatically generated summary of past conversations]"
  "Uses two-layer architecture with local processing..."
  "Demonstrated strong technical skills and systematic approach..."
</userMemories>

2. Memory Edits (Your Explicit Instructions)

User memory edits:
1. 5Levels Layer 1: Chrome extension on user PC does feed scanning locally
2. 5Levels Layer 2: Hetzner servers only handle AI features
3. Mobile strategy: Dashboard-only viewing, desktop collects
4. Two-layer architecture provides strong anti-piracy
5. Browser extensions don't work on iOS/Android Chrome

The Four Commands

1. view — See Current Memory Edits

  • Command: view
  • Returns: Numbered list of all memory edits
  • Use: Check what’s currently stored

Example output:

Memory edits:
1. User works at Anthropic as Senior Engineer
2. Building 5Levels platform with two-layer architecture
3. Prefers TypeScript over JavaScript for production code
4. Uses Claude for strategy, Roo Code for implementation
5. Project deadline: December 2025 launch

2. add — Create New Memory Edit

  • Command: add
  • Parameter: control (max 200 characters)
  • Effect: Adds new numbered memory edit
  • Limit: Maximum 30 edits total

Example:

add control="5Levels uses feed-based scanning to avoid LinkedIn API limits"
// Returns: "Added memory #6: 5Levels uses feed-based scanning..."

3. remove — Delete Memory Edit

  • Command: remove
  • Parameter: line_number (the number from view)
  • Effect: Permanently deletes that memory edit
  • Warning: Cannot be undone

Example:

remove line_number=3
// Returns: "Removed memory #3"
// All subsequent numbers shift down

4. replace — Update Existing Memory

  • Command: replace
  • Parameters: line_number, replacement (max 200 chars)
  • Effect: Updates specific memory edit
  • Use: When information changes

Example:

replace line_number=5, replacement="Project deadline: January 2026 launch"
// Returns: "Replaced memory #5: Project deadline: January 2026 launch"

System Constraints

All memory edits operate under these constraints:

Constraint Limit
Maximum edits 30
Characters per edit 200
Formatting Plain text only (no markdown/HTML)
Scope Project-scoped only
Logic No conditionals (“if X then Y”)
Persistence Until manually removed
Numbering 1-30

Character Count Examples

Status Characters Example
✓ Good 54 “Backend uses PostgreSQL 15 with Knex.js query builder”
✓ Good 147 “Stitching engine = cross-referencing Sales Navigator data with LinkedIn feed patterns. NOT web scraping. NOT API calls. NOT automation.”
✓ At limit 198 “Layer 1 (Chrome extension): Scans LinkedIn feed at 5/20/60 min intervals, processes intelligence locally, stores in IndexedDB. Layer 2 (Hetzner API): Handles AI checks, stores final action cards.”
✗ Too long 247 “Architecture consists of Layer 1 which is the Chrome extension running on user’s PC doing feed scanning and intelligence processing locally at zero server cost, and Layer 2 which is Hetzner servers handling AI features like GPT-4 and Claude authenticity checks and storing final suggestions only.”

Pro Tip: Use a character counter tool when writing memory edits to stay under 200 characters.


Quick Start: Try It in 5 Minutes

Step 1: Verify You’re in a Project

Memory edits only work in Claude Projects. Check the top of your screen — you should see a project name.

If you’re not in a project: Create one first (Projects icon in sidebar).

Step 2: Add Your First Memory Edit

Ask Claude:

“Add a memory edit: I am testing memory edits with the 5Levels architecture”

Step 3: Start a New Conversation

In the same project, start a brand new conversation.

Step 4: Test the Memory

Ask:

“What am I testing?”

Step 5: Check the Result

  • If it works ✓: Claude should mention “testing memory edits” or “5Levels architecture”
  • If it doesn’t work ✗:
    • Check you’re in a Claude Project (not regular chat)
    • Try: “View my memory edits” to verify it was stored
    • See Chapter 8: Troubleshooting

Step 6: Clean Up

Remove the test edit:

“Remove memory edit #[number]”