Add use case: Intelligent Memory-Driven Assistant#98
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Intelligent Memory Assistant Documentation README.md, usecases/intelligent-memory-assistant.md |
Added README entry and a new use-case doc detailing multi-file memory structure (MEMORY.md, decisions.md, memory/YYYY-MM-DD.md, contacts.md), routing rules for storing information, decision-confirmation behavior, auto intent detection, and a complete agent system prompt and setup commands. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
🐰 I hop through files, nest thoughts by date and name,
Core rules, daily crumbs, and choices kept the same,
I check past promises before I change the plan,
Quiet, precise—your memory's little fan.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title 'Add use case: Intelligent Memory-Driven Assistant' directly and accurately summarizes the main change: introducing a new productivity use case with documentation and README entry. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@usecases/intelligent-memory-assistant.md`:
- Around line 63-67: The instruction list uses a literal placeholder
"[latest-date].md" which is not a real path; implement deterministic lookup
logic instead: add a resolver (e.g. getLatestMemoryPath or
resolveLatestMemoryFile) that scans ~/.openclaw/workspace/memory, finds the most
recent memory file by ISO date-named filenames (YYYY-MM-DD.md) or by filesystem
mtime, and returns an explicit filepath to use in the “BEFORE EVERY RESPONSE,
READ:” sequence; update the text to reference this resolver or the concrete rule
(use ISO date filenames or mtime-based selection) rather than the placeholder
"[latest-date].md".
- Around line 149-155: The heredoc that creates ~/.openclaw/workspace/MEMORY.md
(cat > ~/.openclaw/workspace/MEMORY.md << 'EOF') is missing its terminating EOF
and the closing markdown code fence; close the heredoc by adding a lone EOF on
its own line after the content and then add the closing triple backticks to end
the fenced code block so the initialization snippet is complete and
copy-pasteable.
- Around line 55-57: Before creating the system-prompt.txt file, ensure the
agent directory (~/.openclaw/agents/[YOUR-AGENT-ID]) exists by creating the
directory with parent directories (use mkdir -p semantics) and then run the
existing command to write system-prompt.txt; reference the target file name
system-prompt.txt and the agent directory ~/.openclaw/agents/[YOUR-AGENT-ID]
when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cf96b34b-23e1-4bb2-8052-2b0e52b3bd4c
📒 Files selected for processing (2)
README.mdusecases/intelligent-memory-assistant.md
| BEFORE EVERY RESPONSE, READ: | ||
| 1. ~/.openclaw/workspace/MEMORY.md (core context) | ||
| 2. ~/.openclaw/workspace/memory/[latest-date].md (current work) | ||
| 3. ~/.openclaw/workspace/decisions.md (past decisions) | ||
| 4. ~/.openclaw/workspace/contacts.md (people) |
There was a problem hiding this comment.
Replace placeholder daily-memory path with deterministic lookup guidance.
[latest-date].md is a literal placeholder, not an actual file path. This can lead to invalid behavior unless resolution logic is explicitly defined.
Suggested fix
-BEFORE EVERY RESPONSE, READ:
-1. ~/.openclaw/workspace/MEMORY.md (core context)
-2. ~/.openclaw/workspace/memory/[latest-date].md (current work)
-3. ~/.openclaw/workspace/decisions.md (past decisions)
-4. ~/.openclaw/workspace/contacts.md (people)
+BEFORE EVERY RESPONSE, READ:
+1. ~/.openclaw/workspace/MEMORY.md (core context)
+2. Latest existing daily file in ~/.openclaw/workspace/memory/YYYY-MM-DD.md (current work; create today's file if missing)
+3. ~/.openclaw/workspace/decisions.md (past decisions)
+4. ~/.openclaw/workspace/contacts.md (people)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| BEFORE EVERY RESPONSE, READ: | |
| 1. ~/.openclaw/workspace/MEMORY.md (core context) | |
| 2. ~/.openclaw/workspace/memory/[latest-date].md (current work) | |
| 3. ~/.openclaw/workspace/decisions.md (past decisions) | |
| 4. ~/.openclaw/workspace/contacts.md (people) | |
| BEFORE EVERY RESPONSE, READ: | |
| 1. ~/.openclaw/workspace/MEMORY.md (core context) | |
| 2. Latest existing daily file in ~/.openclaw/workspace/memory/YYYY-MM-DD.md (current work; create today's file if missing) | |
| 3. ~/.openclaw/workspace/decisions.md (past decisions) | |
| 4. ~/.openclaw/workspace/contacts.md (people) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@usecases/intelligent-memory-assistant.md` around lines 63 - 67, The
instruction list uses a literal placeholder "[latest-date].md" which is not a
real path; implement deterministic lookup logic instead: add a resolver (e.g.
getLatestMemoryPath or resolveLatestMemoryFile) that scans
~/.openclaw/workspace/memory, finds the most recent memory file by ISO
date-named filenames (YYYY-MM-DD.md) or by filesystem mtime, and returns an
explicit filepath to use in the “BEFORE EVERY RESPONSE, READ:” sequence; update
the text to reference this resolver or the concrete rule (use ISO date filenames
or mtime-based selection) rather than the placeholder "[latest-date].md".
Add use case: Intelligent Memory-Driven Assistant
What problem does this solve?
Most AI assistants are stateless - they forget context between conversations, give inconsistent recommendations, and require constant repetition of preferences. Standard OpenClaw memory is passive storage without intelligent routing or decision consistency.
What this use case provides
An upgraded OpenClaw assistant with:
Why this is useful
Verification
Tested for 3+ days with real projects:
Confirmed working:
Category
Productivity
Summary by CodeRabbit