Memory & Artifacts Upgrade Plan (v4)
The Problem
Three related issues:
- Artifacts not in recall.
memory_searchonly indexesMEMORY.mdandmemory/*.md. Ten substantial research documents in the workspace are invisible to the agent. - Artifact pipeline was fragile. 5 generated files per artifact, a registration script, a JSON index, two separate render paths. Broke when artifacts were created without running the script. Display bugs required a parity eval to catch because two renderers drifted.
- Agent sprawl without benefit. Wendy and David have separate workspaces with blank memory. Any knowledge gained during runs is siloed and lost.
Current State (after Phase 1)
Phase 1 is complete. Artifacts are flat .md files in workspace/artifacts/. MC auto-discovers them and renders via a single path.
Vinny's workspace (~/.openclaw/workspace/)
├── MEMORY.md curated preferences
├── memory/*.md daily notes
├── artifacts/ 10 flat .md files with YAML frontmatter
│ ├── voice_solutions_analysis.md
│ ├── linkedin_post_analysis_2026.md
│ ├── plan-memory-artifacts-upgrade.md (this file)
│ └── ...
├── ARTIFACT-GUIDE.md per-type writing guidance
├── AGENTS.md, SOUL.md, USER.md, etc. bootstrap files (always loaded)
└── mission-control/ Next.js web UI at localhost:3100
Wendy's workspace (~/.openclaw/workspace-jobsearch/) ← still exists, pending removal
David's workspace (~/.openclaw/workspace-builder/) ← still exists, pending removal
Memory search: Builtin engine, Gemini embeddings
Indexes: MEMORY.md + memory/*.md ONLY (artifacts NOT searched)
Artifact rendering: single path via renderMarkdownToHtml()What's Done (Phase 1)
- [x] 1a. New artifact format: Flat
.mdfiles with optional YAML frontmatter inworkspace/artifacts/ - [x] 1b. Per-type writing guidance:
ARTIFACT-GUIDE.mdat workspace root, referenced in AGENTS.md - [x] 1c. Single-path rendering: One
renderMarkdownToHtml()call, no dual render paths, no parity eval - [x] 1d. Migrate existing artifacts: 9 artifacts migrated from
by-id/(5 files each) to flat.mdfiles viascripts/migrate-artifacts.mjs. 10th artifact (this plan) created directly. - [x] Eval:
scripts/eval-artifacts-v2.mjspasses 14/14 - [x] Bug fixes: Code block CSS (dark text on dark background), GitHub auto-link double-linking on lines with existing markdown links
Phase 2: QMD Hybrid Search + Agent Consolidation
2a. Fix QMD install
Current state: binary exists at /Users/vinny/.bun/bin/qmd but module is missing.
bun remove -g @tobilu/qmd
bun install -g @tobilu/qmd
qmd --version # verifyPrerequisites already met: Bun 1.3.10, SQLite 3.51.0, 370GB free disk.
2b. Configure QMD backend
{
"memory": {
"backend": "qmd",
"citations": "auto",
"qmd": {
"includeDefaultMemory": true,
"paths": [
{
"name": "artifacts",
"path": "artifacts",
"pattern": "**/*.md"
}
],
"update": {
"interval": "5m",
"debounceMs": 15000,
"onBoot": true,
"waitForBootSync": false
},
"limits": {
"maxResults": 6,
"maxSnippetChars": 700,
"timeoutMs": 4000
}
}
}
}Indexes: MEMORY.md + memory/*.md (via includeDefaultMemory) + artifacts/*.md (via paths).
2c. Verify recall
| Query | Expected source |
|---|---|
| "Pete prefers light mode" | MEMORY.md |
| "voice solutions discord DAVE encryption" | artifacts/voice_solutions_analysis.md |
| "LinkedIn post impressions analysis" | artifacts/linkedin_post_analysis_2026.md |
| "Codex token rotation bug" | memory/2026-03-18.md |
2d. Write eval script
scripts/eval-memory-recall.mjs: runs queries above, checks results include expected source file, reports pass/fail.
2e. Remove Wendy and David agents
- Remove agent definitions from
openclaw.json - Remove Discord account bindings for wendy and david
- Archive
workspace-jobsearch/andworkspace-builder/ - Update AGENTS.md: remove references to Wendy/David as named agents, add per-task model routing guidance
- Update MEMORY.md: agent architecture section
2f. Update AGENTS.md
- Remove: "delegate to Wendy for research, David for code"
- Add: "use
sessions_spawnwith model override for task-appropriate model"
Effort: ~3 hours total
Phase 3: Remote Access via Tailscale (separate project)
Make Mission Control accessible from laptop and phone without exposing it to the public internet.
3a. Install Tailscale on Mac mini
brew install tailscale
tailscale up3b. Expose MC via Tailscale Serve
tailscale serve --bg http://127.0.0.1:3100MC becomes available at https://mac-mini.tailXXXXX.ts.net from any device on the tailnet.
3c. Install Tailscale on laptop and phone
- Laptop:
brew install tailscaleor Mac App Store - iPhone: Tailscale app from App Store
- Log into same account, join tailnet
3d. Configure OpenClaw gateway for Tailscale (optional)
If we also want the OpenClaw gateway UI remotely:
{
"gateway": {
"bind": "loopback",
"tailscale": { "mode": "serve" }
}
}3e. Mobile UX validation
- Verify MC renders usably on iPhone Safari
- Identify any mobile-specific CSS/layout issues
- Decide if MC needs responsive tweaks or if a future mobile-optimized view is needed
Effort: ~1 hour setup + testing
Execution Order
| Step | What | Effort | Status |
|---|---|---|---|
| 1a | New artifact format | 15 min | ✅ Done |
| 1b | ARTIFACT-GUIDE.md | 30 min | ✅ Done |
| 1c | Single-path MC rendering | 3 hours | ✅ Done |
| 1d | Migrate 9 artifacts to flat .md | 1 hour | ✅ Done |
| 2a | Fix QMD install | 15 min | Pending |
| 2b | Configure QMD backend | 30 min | Pending |
| 2c | Verify recall across all sources | 30 min | Pending |
| 2d | Write memory recall eval | 30 min | Pending |
| 2e | Remove Wendy/David, consolidate config | 30 min | Pending (needs approval) |
| 2f | Update AGENTS.md | 15 min | Pending |
| 3a-e | Tailscale remote access | 1 hour | Separate project |
Remaining: ~3 hours (Phase 2) + 1 hour (Phase 3)
What we delete (when Phase 2 completes)
mission-control/artifacts/by-id/(8 dirs, 32 generated files)mission-control/data-v2/artifacts.jsonmission-control/scripts/create-artifact.mjsmission-control/scripts/seed-artifacts.mjsmission-control/scripts/eval-artifact-parity.mjsmission-control/scripts/eval-protocol.mjs- Wendy and David agent definitions in openclaw.json
- Discord account bindings for wendy and david
- Dual render path code (old
lib/mc2/artifacts.ts)
What we archive (move, don't delete yet)
~/.openclaw/workspace-jobsearch/~/.openclaw/workspace-builder/
What we keep
- Single
renderMarkdownToHtml()renderer in MC - All artifact content (already migrated to flat .md)
- Per-task model routing via
sessions_spawn ARTIFACT-GUIDE.mdas the quality lever (input guidance, not output validation)scripts/eval-artifacts-v2.mjs(14 tests)