Mission Control

Documents

K

Memory & Artifacts Upgrade Plan (v4)

Implementation PlanCreated Mar 25, 2026Updated Mar 29, 20265 min readFull screen ↗
Artifact Preview

Memory & Artifacts Upgrade Plan (v4)

The Problem

Three related issues:

  1. Artifacts not in recall. memory_search only indexes MEMORY.md and memory/*.md. Ten substantial research documents in the workspace are invisible to the agent.
  2. 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.
  3. 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 .md files with optional YAML frontmatter in workspace/artifacts/
  • [x] 1b. Per-type writing guidance: ARTIFACT-GUIDE.md at 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 .md files via scripts/migrate-artifacts.mjs. 10th artifact (this plan) created directly.
  • [x] Eval: scripts/eval-artifacts-v2.mjs passes 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.

bash
bun remove -g @tobilu/qmd
bun install -g @tobilu/qmd
qmd --version  # verify

Prerequisites already met: Bun 1.3.10, SQLite 3.51.0, 370GB free disk.

2b. Configure QMD backend

json
{
  "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

QueryExpected 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/ and workspace-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_spawn with 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

bash
brew install tailscale
tailscale up

3b. Expose MC via Tailscale Serve

bash
tailscale serve --bg http://127.0.0.1:3100

MC 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 tailscale or 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:

json
{
  "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

StepWhatEffortStatus
1aNew artifact format15 min✅ Done
1bARTIFACT-GUIDE.md30 min✅ Done
1cSingle-path MC rendering3 hours✅ Done
1dMigrate 9 artifacts to flat .md1 hour✅ Done
2aFix QMD install15 minPending
2bConfigure QMD backend30 minPending
2cVerify recall across all sources30 minPending
2dWrite memory recall eval30 minPending
2eRemove Wendy/David, consolidate config30 minPending (needs approval)
2fUpdate AGENTS.md15 minPending
3a-eTailscale remote access1 hourSeparate 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.json
  • mission-control/scripts/create-artifact.mjs
  • mission-control/scripts/seed-artifacts.mjs
  • mission-control/scripts/eval-artifact-parity.mjs
  • mission-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.md as the quality lever (input guidance, not output validation)
  • scripts/eval-artifacts-v2.mjs (14 tests)