OC
OpenClaw
Dashboard

MEMORY.md

/home/ubuntu/.openclaw/workspace/MEMORY.md

MEMORY.md

Working style rule (snake)

  • No one-off work: if snake asks for something that’s likely to recur, do it manually first on 3–10 items and show the output.
  • After approval, codify it into a skill file.
  • If it should run automatically, put it on a cron.
  • Success test: if snake has to ask for the same thing twice, I failed.

OpenClaw dashboard (chat UI plans)

Deployment / runtime

  • Repo: ~/projects/openclaw-dashboard

  • Runs as systemd service: openclaw-dashboard.service

    • next start -H 127.0.0.1 -p 3579
    • ExecStartPre=npm run build
  • Auto-updates via systemd timer: openclaw-dashboard-update.timer (every ~5 min)

    • Runs openclaw-dashboard-update.service/usr/local/bin/openclaw-dashboard-update.sh
    • Update script does: git fetch/pull --ff-only, npm ci if lockfiles changed, then sudo systemctl restart openclaw-dashboard.service
  • Repo: ~/projects/openclaw-dashboard

  • snake wants to add a private (single-user) chat UI inside the dashboard that talks to OpenClaw (not direct OpenAI).

  • UI preference: use OpenAI ChatKit components (https://developers.openai.com/api/docs/guides/chatkit).

  • Desired UX: one chat thread = one OpenClaw session, with a list of previous chats to revisit (ChatGPT-style). If too complex, start with a simpler MVP and iterate.

  • Note to self: don’t keep re-asking for these basics (single-user, dashboard repo, ChatKit link, thread-per-session goal).

ai-compass automation (MDX briefs)

  • Repo lives at: /home/ubuntu/projects/ai-compass
  • OpenClaw cron jobs (Gateway cron scheduler) run as isolated agentTurns and publish content by committing MDX to git.

What cron jobs do

  • AI news digest (daily)
    • Writes: content/briefs/YYYY-MM-DD-ai-news.mdx
  • X Following recap (daily)
    • Writes: content/briefs/YYYY-MM-DD-x-following.mdx
  • AI platform deltas (weekly)
    • Writes: content/briefs/YYYY-MM-DD-ai-platform-deltas.mdx

All of them:

  1. generate a markdown/MDX body
  2. write the file via node scripts/write-brief.mjs ... <<'EOF' ... EOF
  3. (X-following only) update content/use-cases.json via node scripts/update-use-cases.mjs <<'JSON' ... JSON
  4. commit + push via /home/ubuntu/projects/ai-compass/scripts/commit-push.sh (must stage content/use-cases.json too)
  5. (optionally) message a link + the text to Telegram

write-brief.mjs (important MDX gotchas)

  • Script: /home/ubuntu/projects/ai-compass/scripts/write-brief.mjs
  • Output path: content/briefs/<date>-<slug>.mdx

Two common MDX/Markdown issues it handles:

  • Angle-bracket autolinks break MDX because <...> can be parsed as JSX.
    • Use [text](url) links (avoid <https://...>).
  • Ordered lists need indentation for multi-line list items.
    • Without indent, lines like Why it matters: and [Source](...) can “fall out” of the list.
    • write-brief.mjs now auto-indents continuation lines and turns Why it matters: / [Source](...) into sub-bullets.

Last fix

  • 2026-02-03: fixed cron-generated MDX formatting and updated write-brief.mjs accordingly.

2026-02-09: change — X Following publishes JSON only

  • 2026-02-09: The X Following cron job was updated to publish raw JSON only (write MDX disabled). The scheduled job should now:

    1. fetch timeline to /tmp/x_following_raw.json
    2. run ./scripts/publish-raw-wrapper.sh twitter <date> /tmp/x_following_raw.json which validates and writes content/raw/<date>/twitter/*.json
    3. commit + push the raw JSON files and updates to content/use-cases.json as needed
    4. NOT create MDX files nor send Telegram notifications from the cron job itself (notification is handled separately when needed)
  • Rationale: avoid committing rendered MDX from automated runs; keep the pipeline focused on raw, auditable JSON and defer human-facing MDX generation to manual or separate automated steps that are explicitly allowed to publish.

  • Action: If you want I can (a) confirm the cron job payload text matches this change, (b) update the job definition to enforce it, and (c) run a test execution now to verify no MDX is created. Say which of (a)/(b)/(c) you want.