Memory
Long-term memory across sessions — search, read, save. The memory skill gives CLI-JAW persistent recall of user preferences, project decisions, and durable knowledge that survives beyond a single conversation.
Quick Reference
| Skill name | memory |
| Status | Active (auto-injected into every session) |
| Category | Productivity |
| SKILL.md path | ~/.cli-jaw/skills/memory/SKILL.md |
| Data directory | ~/.cli-jaw/memory/structured/ |
| Requires | None (no external dependencies) |
| Install | Pre-installed (ships with CLI-JAW) |
| Scope | L1 instance-local (read/write) + L2 dashboard (read-only) |
| Embedding search | Optional, default OFF |
Overview
The memory skill is the persistent knowledge layer for CLI-JAW. It enables the AI to remember facts, preferences, and decisions across sessions without relying solely on conversation context. Every session has the memory skill injected automatically — there is no need to load it manually.
Memory operates at two scopes:
L1 Instance-Local Memory
- Commands:
cli-jaw memory search/read/save - Default path for all operations
- Current instance only
- Read + Write
- Used for all save operations
L2 Dashboard Memory
- Commands:
cli-jaw dashboard memory search/read/instances - Cross-instance federation
- Multiple instances / homes
- Read-Only
- Used only when user explicitly asks for cross-instance data
Rules
The memory skill follows seven strict rules that govern when and how memory is used:
| # | Rule | Details |
|---|---|---|
| 1 | Search before answering | When asked about past work, decisions, or preferences, always run cli-jaw memory search <keywords> first before responding. |
| 2 | Save durable facts immediately | User preferences, key decisions, and stable project facts should be saved as soon as they are identified. |
| 3 | Use structured destinations | Prefer structured/profile.md, structured/semantic/..., or structured/episodes/... over ad-hoc paths. |
| 4 | Admit gaps | If search returns nothing, say "I don't have a record of that." Do not fabricate memories. |
| 5 | Save stable facts only | Do not save transient TODOs, phase logs, or temporary checklists. Only durable knowledge belongs in memory. |
| 6 | Search broadly | Consider Korean/English variants, error codes, symbols, and filenames when constructing search queries. |
| 7 | Use injected context | A task snapshot may already be in the prompt; still search when precision matters or exact wording is needed. |
Commands
Search
Search the memory index for keywords. Returns matching entries with their source file paths.
# Basic keyword search
cli-jaw memory search "keyword"
# Search for user preferences
cli-jaw memory search "user preference"
# Search with error codes or technical terms
cli-jaw memory search "auth login 401"
# Search with system/service terms
cli-jaw memory search "launchd plist service"
# Cross-instance search (L2 dashboard, read-only)
cli-jaw dashboard memory search "cross-instance topic"
Read
Read the full contents of a specific memory file, or a line range within it.
# Read the user profile
cli-jaw memory read structured/profile.md
# Read a semantic knowledge file
cli-jaw memory read structured/semantic/cli-jaw.md
# Read an episodic entry
cli-jaw memory read structured/episodes/live/2026-03-07.md
# Read only specific lines (useful for large files)
cli-jaw memory read structured/profile.md --lines 1-30
Save
Append durable facts to a memory file. Content is appended, not overwritten.
# Save a user preference to the profile
cli-jaw memory save structured/profile.md "- User prefers Korean UI and English code"
# Save a technical fact to a semantic file
cli-jaw memory save structured/semantic/cli-jaw.md "- Memory runtime uses task snapshots before response generation"
# Save a time-bound episode
cli-jaw memory save structured/episodes/live/2026-03-07.md "## 16:30\n- Decided to remove query-provider setup from memory UX"
List & Init
Utility commands for inspecting and initializing the memory directory.
# List all memory files and their sizes
cli-jaw memory list
# Initialize the memory directory structure (first-time setup)
cli-jaw memory init
Storage Layout
Memory is organized into a structured directory hierarchy under ~/.cli-jaw/memory/. Each subdirectory serves a distinct purpose:
| Path | Purpose | When to Use |
|---|---|---|
structured/profile.md |
Stable profile, preferences, long-lived project context | User preferences, tool settings, default behaviors |
structured/episodes/ |
Time-ordered episodic memory | Session outcomes, decisions with dates, time-bound events |
structured/semantic/ |
Durable facts and extracted knowledge | Technical knowledge, project architecture notes, API patterns |
structured/procedures/ |
Reusable workflows and rules | Step-by-step guides, deployment procedures, standard processes |
structured/sessions/ |
Optional session-derived memory | Auto-extracted insights from completed sessions |
structured/index.sqlite |
Search index | Automatically maintained; powers memory search |
~/.cli-jaw/memory/
structured/
profile.md # User preferences and identity
index.sqlite # Full-text search index
episodes/
live/
2026-03-07.md # Daily episodic entries
2026-05-29.md
semantic/
cli-jaw.md # CLI-JAW-specific knowledge
deployment.md # Deployment procedures
project-architecture.md # Architecture decisions
procedures/
release-checklist.md # Reusable workflows
code-review-process.md
sessions/
session-2026-05-29-abc123.md # Auto-extracted session notes
Workflows
The memory skill defines four standard workflows that govern how memory is used during a conversation.
New Conversation
When a new session begins:
User Mentions a Preference
When the user states a preference (e.g., "I prefer tabs over spaces"):
structured/profile.mdUser Asks "Do you remember...?"
When the user asks whether something was previously discussed:
cli-jaw memory search "<keywords>"End of Important Session
When a session yields a significant decision or outcome:
episodes/) for time-bound outcomesUsage Examples (~해줌)
Here are real-world usage patterns in the natural Korean style that CLI-JAW understands.
cli-jaw memory search "Tailwind", finds the saved preference in structured/profile.md, and responds with the exact entry and its source file.- Code language: English, UI text: Korean to structured/profile.md so all future sessions respect this preference.- API error handling: always use ErrorResponse type to structured/semantic/project-architecture.md so this architectural decision persists.cli-jaw dashboard memory search "project setup" to federate across instances, returning read-only results from the dashboard.What to Save vs. What to Skip
| Save (Durable) | Skip (Transient) |
|---|---|
| User prefers dark mode in all UIs | Current task: "fix the login bug" |
| Project uses pnpm, not npm | Phase log: "Phase 2 started at 3pm" |
| API response format decision | Temporary debug checklist |
| Deployment procedure for production | "Remind me to check this tomorrow" |
| Architecture: microservices with event bus | In-progress TODO list |
| Team uses Conventional Commits | Session-specific variable values |
Choosing the Right Destination
When saving a fact, select the destination based on the nature of the information:
| Information Type | Destination | Example |
|---|---|---|
| Personal preference | structured/profile.md | "User prefers Korean UI, English code" |
| Project architecture fact | structured/semantic/<project>.md | "CLI-JAW uses SQLite for memory index" |
| Decision with a date | structured/episodes/live/<date>.md | "2026-05-29: Chose Drizzle ORM over Prisma" |
| Reusable workflow | structured/procedures/<name>.md | "Release checklist: lint, test, tag, deploy" |
| Domain knowledge | structured/semantic/<domain>.md | "Cloudflare D1 has 10GB limit per database" |
Search Tips
The memory search index supports full-text keyword matching. To get the best results:
- Use both languages — search "auth" and "인증" if the user works bilingually
- Include error codes — search "401 unauthorized" to find auth-related memories
- Try file names — search "launchd" or "plist" for system service memories
- Be specific then broad — start with "Cloudflare D1 migration" then fall back to "database migration"
- Search symbols — error codes like "ECONNREFUSED" or config keys like "JAW_HOME" are indexed
Notes
- Prefer concise, durable entries over verbose logs
- Memory is append-only by convention — save commands append, they do not overwrite
- The search index (
index.sqlite) is automatically maintained when files are saved - Cross-instance (L2) memory is always read-only; you cannot save to another instance
- If embedding search is enabled in your instance, it supplements but does not replace keyword search
Related
- Concepts: Memory — high-level overview of the memory system architecture
- CLI Commands — full
cli-jaw memorycommand reference - Dashboard Guide — L2 dashboard memory and cross-instance federation
- Skill Catalog — browse all 118 skills
- Productivity Skills — category page for memory and related skills