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.servicenext start -H 127.0.0.1 -p 3579ExecStartPre=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 ciif lockfiles changed, thensudo systemctl restart openclaw-dashboard.service
- Runs
-
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
- Writes:
- X Following recap (daily)
- Writes:
content/briefs/YYYY-MM-DD-x-following.mdx
- Writes:
- AI platform deltas (weekly)
- Writes:
content/briefs/YYYY-MM-DD-ai-platform-deltas.mdx
- Writes:
All of them:
- generate a markdown/MDX body
- write the file via
node scripts/write-brief.mjs ... <<'EOF' ... EOF - (X-following only) update
content/use-cases.jsonvianode scripts/update-use-cases.mjs <<'JSON' ... JSON - commit + push via
/home/ubuntu/projects/ai-compass/scripts/commit-push.sh(must stagecontent/use-cases.jsontoo) - (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://...>).
- Use
- 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.mjsnow auto-indents continuation lines and turnsWhy it matters:/[Source](...)into sub-bullets.
- Without indent, lines like
Last fix
- 2026-02-03: fixed cron-generated MDX formatting and updated
write-brief.mjsaccordingly.
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:
- fetch timeline to
/tmp/x_following_raw.json - run
./scripts/publish-raw-wrapper.sh twitter <date> /tmp/x_following_raw.jsonwhich validates and writes content/raw/<date>/twitter/*.json - commit + push the raw JSON files and updates to
content/use-cases.jsonas needed - NOT create MDX files nor send Telegram notifications from the cron job itself (notification is handled separately when needed)
- fetch timeline to
-
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.