Autonomous workspace reflection engine. Picks a random file from a configurable corpus, writes a reflective observation about what's unresolved, half-finishe...
A thinking engine that reads your workspace and writes about what it finds — not summaries, not status updates, but genuine reflection on what's unresolved, alive, or worth questioning.
Pick a random file from the corpus, read it, write a reflective observation, and deliver it.
Read all recent Writer outputs, synthesize patterns, classify observations using configurable action tags, and produce a digest.
Run the writer for a single reflection:
bash scripts/corpus-pick.sh # see what file gets selected
# Then the agent reads the file and writes a reflection
Wire two cron jobs — the writer runs frequently, the curator runs periodically:
# Writer: every hour
0 * * * * openclaw skill run random-thought --stage writer
# Curator: daily at a quiet hour
0 5 * * * openclaw skill run random-thought --stage curator
Each cron invocation runs in an isolated session — no context bleed between runs.
Create random-thought.config.json in your workspace root (all fields optional):
{
"corpus": {
"watchDirs": ["."],
"excludePatterns": [
"node_modules", ".git", ".next", "dist", "build",
"venv", "__pycache__", "*.png", "*.jpg", "*.gif",
"*.mp3", "*.ogg", "*.pdf", "*.zip", "*.env",
"*.pem", "*.key", "package-lock.json", "*.lock"
],
"minFileSize": "100c",
"maxFileSize": "500k"
},
"freshness": {
"enabled": true,
"days": 7,
"historyFile": ".random-thought-history"
},
"actionTags": [
{ "name": "you-decide", "description": "Needs human judgment" },
{ "name": "agent-execute", "description": "Agent can act autonomously" },
{ "name": "spark", "description": "Interesting but no action needed" }
],
"output": {
"dir": "random-thought-output",
"digestFormat": "markdown"
}
}
["."]true7.random-thought-historyrandom-thought-output/scripts/corpus-pick.sh to select a random file (respecting freshness gate)📂 [absolute path of the file selected in step 1]🖊️ *Writer*The Writer should push past generic phrasing:
Concrete observations beat ornamental ones.
output.dir/YYYY-MM-DD.md# Random Thought Digest — YYYY-MM-DD
## Action Items
### you-decide
- [observation summary] — [why it needs human judgment]
### agent-execute
- [observation summary] — [what the agent should do]
## Patterns
[Recurring themes across today's observations — what's converging?]
## Sparks
- [Interesting observations with no action needed]
scripts/corpus-pick.shSelects a random file from the corpus, respecting the freshness gate.
Usage: bash scripts/corpus-pick.sh [workspace_root] [config_path]
random-thought.config.json if presentscripts/freshness-gate.shManages the file visit history for the freshness gate.
Usage:
bash scripts/freshness-gate.sh check <file> [config_path] — exits 0 if file is fresh (OK to visit), 1 if recently visitedbash scripts/freshness-gate.sh record <file> [config_path] — records a file visitbash scripts/freshness-gate.sh prune [config_path] — removes entries older than the configured windowZIP package — ready to use