1
0
Fork 0

feat: initial companion repo for OpenClaw vs Claude Code article

40 files demonstrating every major OpenClaw capability using Claude Code:
- 3 agents (researcher, writer, reviewer)
- 3 skills (daily-briefing, slack-message, web-research)
- 2 security hooks (pre-tool-use blocker, post-tool-use logger)
- 10 self-contained examples with copy-paste prompts
- Complete feature map (20 capabilities, 11 full match, 7 different, 2 gap)
- Security docs including NemoClaw comparison
- Automation, messaging, browser, memory documentation

Zero dependencies. Clone and run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-03-26 09:47:29 +01:00
commit 2491f5c732
40 changed files with 2037 additions and 0 deletions

13
memory/MEMORY.md Normal file
View file

@ -0,0 +1,13 @@
# Project Memory
Last updated: [date]
## Notes
This is the project's persistent memory. Add notes here that should persist
across Claude Code sessions.
CLAUDE.md is for instructions (how Claude should behave, what rules to follow).
MEMORY.md is for state (what happened, what was decided, what to pick up next).
## Preferences

53
memory/README.md Normal file
View file

@ -0,0 +1,53 @@
# Memory System
How Claude Code and OpenClaw handle cross-session persistence.
## Claude Code: File-based memory
Claude Code reads files at session start and writes them back on request.
**Mechanism:**
- `CLAUDE.md` files at `~/.claude/CLAUDE.md` (global), repo root, and subdirectories
- Auto-memory: files listed in `CLAUDE.md` under `memory:` are auto-loaded
- Project files: any file you explicitly tell Claude to read at session start
- No background process, no indexing, no database
**Properties:**
- Deterministic: Claude reads exactly what you wrote
- No semantic search: retrieval is positional, not by meaning
- Fully transparent: open any file to see what Claude knows
- Hierarchical: global < project < subdirectory, each level can override
## OpenClaw: Hybrid memory
OpenClaw maintains memory through a combination of structured logs and vector search.
**Mechanism:**
- Daily markdown logs with structured entries
- `MEMORY.md` as a curated summary file
- SQLite-vec or LanceDB for vector storage
- BM25 + cosine similarity for retrieval (hybrid search)
**Properties:**
- Semantic search: "find notes about authentication" works even without exact keywords
- Automatic logging: entries written by the agent during execution
- Higher complexity: requires a running database
- Retrieval can surface relevant context not explicitly linked
## Comparison
| Property | Claude Code | OpenClaw |
|----------------------|---------------------|---------------------------|
| Storage | Plain files | Files + SQLite/LanceDB |
| Retrieval | Positional/explicit | BM25 + cosine (hybrid) |
| Semantic search | No | Yes |
| Setup complexity | Zero | Moderate |
| Transparency | Full | Partial |
| Cross-session | Yes (manual) | Yes (automatic) |
## Recommendation
For most projects, Claude Code's file-based approach is sufficient. Keep MEMORY.md
short and curated. Long files degrade quality faster than missing context does.
Use this directory (`memory/`) to store any project state that should outlast a session.