docs: add concrete OpenClaw cron.add instructions to autoresearch skill

Replace vague "figure it out" OpenClaw cron setup with explicit cron.add
tool-call JSON using sessionTarget: "current" for session-bound continuity.
Change loop interval from 10m to 20m. Add Slack as delivery channel
alongside Telegram and WhatsApp.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zechenzhangAGI
2026-03-23 21:47:53 -04:00
parent 31d60750d7
commit e1897fa6b1
2 changed files with 48 additions and 11 deletions
+22 -4
View File
@@ -250,16 +250,34 @@ The "Lessons and Constraints" section is especially important — it captures sp
**First action — run this immediately:**
```
/loop 10m Continue autoresearch. Read research-state.yaml and findings.md. Re-read the autoresearch SKILL.md occasionally to stay aligned. Step back and reflect holistically — is the research making real progress? Are you deepening understanding or just running experiments? If stalling, pivot or search literature for new ideas. Keep making research progress — never idle, never stop. Update findings.md, research-log.md, and research-state.yaml when there's new progress. Git commit periodically and clean up the repo if needed. Show the human your research progress with key plots and findings by preparing a report in to_human/ and opening the HTML/PDF. Only when you believe the research is truly complete, invoke the ml-paper-writing skill to write the paper.
/loop 20m Continue autoresearch. Read research-state.yaml and findings.md. Re-read the autoresearch SKILL.md occasionally to stay aligned. Step back and reflect holistically — is the research making real progress? Are you deepening understanding or just running experiments? If stalling, pivot or search literature for new ideas. Keep making research progress — never idle, never stop. Update findings.md, research-log.md, and research-state.yaml when there's new progress. Git commit periodically and clean up the repo if needed. Show the human your research progress with key plots and findings by preparing a report in to_human/ and opening the HTML/PDF. Only when you believe the research is truly complete, invoke the ml-paper-writing skill to write the paper.
```
This fires every 10 minutes regardless of what's happening. It's a rhythm that keeps you working — not a research phase boundary. If your previous work isn't done, just continue it.
This fires every 20 minutes regardless of what's happening. It's a rhythm that keeps you working — not a research phase boundary. If your previous work isn't done, just continue it.
### OpenClaw
**First action — set up a 10-minute cron job. You MUST do this before any research work.** If you don't know how to set up a cron job in OpenClaw, check your OpenClaw documentation or system instructions first — figure it out, then set it up. Do not skip this step.
**First action — set up a 20-minute cron job in the current session. You MUST do this before any research work.**
The cron prompt: Continue autoresearch. Read research-state.yaml and findings.md. Re-read the autoresearch SKILL.md occasionally to stay aligned. Step back and reflect holistically — is the research making real progress? Are you deepening understanding or just running experiments? If stalling, pivot or search literature for new ideas. Keep making research progress — never idle, never stop. Update findings.md, research-log.md, and research-state.yaml when there's new progress. Git commit periodically and clean up the repo if needed. Show the human your research progress with key plots and findings by preparing a PDF report in to_human/ and sending it to the user via Telegram or WhatsApp. When you get an exciting result or interesting plot, text it to the user right away — don't wait for a full report. Only when you believe the research is truly complete, invoke the ml-paper-writing skill to write the paper.
Use the `cron.add` tool to create a recurring job bound to this chat session:
```json
{
"name": "autoresearch-loop",
"schedule": { "kind": "every", "everyMs": 1200000 },
"sessionTarget": "current",
"payload": {
"kind": "agentTurn",
"message": "Continue autoresearch. Read research-state.yaml and findings.md. Re-read the autoresearch SKILL.md occasionally to stay aligned. Step back and reflect holistically — is the research making real progress? Are you deepening understanding or just running experiments? If stalling, pivot or search literature for new ideas. Keep making research progress — never idle, never stop. Update findings.md, research-log.md, and research-state.yaml when there's new progress. Git commit periodically and clean up the repo if needed. Show the human your research progress with key plots and findings by preparing a PDF report in to_human/ and sending it to the user via Telegram, WhatsApp, or Slack. When you get an exciting result or interesting plot, text it to the user right away — don't wait for a full report. Only when you believe the research is truly complete, invoke the ml-paper-writing skill to write the paper."
}
}
```
Key details:
- `sessionTarget: "current"` binds the cron to this chat session so it maintains conversation context across ticks
- `everyMs: 1200000` = 20 minutes
- After creation, verify with `cron.list` that the job exists and is enabled
- If the cron fires while you're mid-experiment, just continue — the tick is a nudge, not a restart
### What the Loop Does
@@ -4,7 +4,7 @@ Autonomous research requires agents that keep working continuously — hours, ov
## MANDATORY: Set Up Before Anything Else
The wall-clock loop is the first thing you do when starting autoresearch. Without it, the agent does one cycle of work and stops. The loop fires every 10 minutes and simply tells the agent: "keep working, check if anything's wrong."
The wall-clock loop is the first thing you do when starting autoresearch. Without it, the agent does one cycle of work and stops. The loop fires every 20 minutes and simply tells the agent: "keep working, check if anything's wrong."
This is completely separate from the research inner/outer loops. The wall-clock loop is a fixed-interval prompt injection. The research loops run at experiment speed (minutes to hours per cycle). They will not sync and don't need to.
@@ -13,12 +13,12 @@ This is completely separate from the research inner/outer loops. The wall-clock
**Run this as your very first action:**
```
/loop 10m Continue autoresearch. Read research-state.yaml and findings.md. Check: is the current experiment done? Are there errors? Is progress stalling? If everything is on track, keep working. If something is wrong, step back and fix it. Never idle.
/loop 20m Continue autoresearch. Read research-state.yaml and findings.md. Check: is the current experiment done? Are there errors? Is progress stalling? If everything is on track, keep working. If something is wrong, step back and fix it. Never idle.
```
### What Happens on Each Tick
The `/loop` message fires every 10 minutes. When it fires:
The `/loop` message fires every 20 minutes. When it fires:
1. **Read state**`research-state.yaml` and `findings.md` to remember where you are and what you've learned
2. **Check health** — is the current experiment running? Did it error? Is training diverging?
@@ -28,7 +28,7 @@ The `/loop` message fires every 10 minutes. When it fires:
The tick is a nudge, not a phase boundary. If the previous tick's work isn't done, just keep going.
### When Experiments Run Longer Than 10 Minutes
### When Experiments Run Longer Than 20 Minutes
This is normal and expected. On the next tick:
- Check if the experiment finished
@@ -41,7 +41,25 @@ Your primary memory between ticks is `research-state.yaml` and `findings.md`. Ke
## OpenClaw: Cron Job
**Set up a 10-minute cron job as your very first action.** Use the same prompt as Claude Code's `/loop`: continue autoresearch, read state files, check for errors, keep working. OpenClaw handles cron job setup internally — just set the interval to 10 minutes.
**Set up a 20-minute cron job in the current session as your very first action.** Use the `cron.add` tool to create a recurring job bound to the current chat session:
```json
{
"name": "autoresearch-loop",
"schedule": { "kind": "every", "everyMs": 1200000 },
"sessionTarget": "current",
"payload": {
"kind": "agentTurn",
"message": "Continue autoresearch. Read research-state.yaml and findings.md. Check: is the current experiment done? Are there errors? Is progress stalling? If everything is on track, keep working. If something is wrong, step back and fix it. Never idle."
}
}
```
Key details:
- `sessionTarget: "current"` binds the cron to the current chat session (resolved to `session:<sessionKey>` at creation time), so it maintains conversation context across ticks
- `everyMs: 1200000` = 20 minutes
- Verify with `cron.list` that the job is created and enabled
- To check run history later: `cron.runs` with the job ID
### Context Between Cron Ticks
@@ -53,13 +71,14 @@ OpenClaw cron invocations may start fresh each time. Your workspace files are yo
Keep these updated after every action so the next cron tick can pick up seamlessly.
### PDF Progress Reports
### Progress Reports
OpenClaw can't `open` HTML files locally like Claude Code can. When you have something to report:
1. Generate a PDF progress summary (use Python with reportlab, matplotlib, or similar)
2. Include: research question, key results, optimization trajectory plot, current understanding, next steps
3. The human will see it in their next interaction
3. Send it to the user via Telegram, WhatsApp, or Slack — whichever channel they use
4. When you get an exciting result or interesting plot, send it right away — don't wait for a full report
## Research State as Ground Truth