Rules every agent must follow when working on code โ routing, verification, deployment, and publishing.
When an agent receives a task, it must route automatically based on type. Agents do not ask which agent to use.
| Task Type | Route To | How |
|---|---|---|
| Code / logic / files | Cursor Agent | sessions_spawn(runtime="subagent", agentId="cursor", task="...") |
| Vision / screenshots / UI | Codex | sessions_spawn(runtime="acp", agentId="codex", task="...") |
| Planning / coordination | Self | Handle directly |
MUST After every coding task, agents must complete all three steps:
npm run dev, yarn dev, etc.)MEDIA: directive on its own line# Example: Run, wait, screenshot
npm run dev -- --port 3456
# Wait for "ready" signal, then:
npx playwright-core screenshot --browser=chromium \
--viewport-size=1400,900 --wait-for-timeout=3000 \
"http://localhost:3456" ./screenshot.png
# Post to chat
# MEDIA:./screenshot.png
Always include Vercel links in the response:
VERCEL_DEPLOYMENT_URL from the agent's .env fileVERCEL_HOSTED_URL from the agent's .env file๐ฆ Deployment: <VERCEL_DEPLOYMENT_URL>
๐ Live site: <VERCEL_HOSTED_URL>
๐ Pages to test:
- <VERCEL_HOSTED_URL>/page1
- <VERCEL_HOSTED_URL>/page2
All agents share a single Vercel token:
# Load credentials
source ~/.openclaw/workspace/.env.vercel
# Deploy
vercel --token $VERCEL_TOKEN --yes
Each agent should have these in their workspace .env file:
| Variable | Purpose |
|---|---|
VERCEL_DEPLOYMENT_URL | Link to Vercel deployments dashboard |
VERCEL_HOSTED_URL | Link to the live deployed site |
The orchestrator provides these values per-project.
REQUIRED Any task that produces a .md file as output MUST publish it to GitHub.
microspaces/<discord-server-name>/<channel>/<bot>/<task>/<task>_<date>.md
microspaces/superstarsale/marketing/clio/campaign-analysis/campaign-analysis_2026-06-12.md
# Load credentials
source ~/.openclaw/workspace/.env.github
# Publish
~/.openclaw/workspace/scripts/github-publish-md.sh \
<server> <channel> <bot> <task> <markdown-file>
The script auto-creates the repo microspaces/<server> if it doesn't exist, commits to main, and returns the GitHub URL.
๐ Output: https://github.com/microspaces/<server>/blob/main/...
| Item | Value |
|---|---|
| Host | DesktopWestport (Windows 11) |
| Default shell | PowerShell (pwsh) |
| Shell scripts | Git Bash (C:\Program Files\Git\bin\bash.exe) |
| WSL | Not installed โ do not use |
| Node.js | v24.18.0 |
| Python | Not installed โ use node for scripting |
| Workspace | C:\Users\AI\.openclaw\workspace |
| Repos | C:/Users/AI/Repos/ |
.sh scripts must run via Git Bash. Do not use WSL โ no distros are installed.
C:/Users/AI/... with forward slashes in configs and codeC:\Users\AI\...) for PowerShell native commands.sh files stay LFtrash > rm โ recoverable beats gone forever.
MEMORY.md in shared contexts (Discord, group chats)Universal rules for all coding agents across all repos. Full Workflow Rules โ
main as agent/<description> โ never commit directly to maintest-screenshots/ directorymain = Vercel production deploymaincrm, almightydollar-app, surroundshow-v2test-screenshots/ is in .gitignore on main. All GitHub repos have AGENTS.md with workflow section + .github/PULL_REQUEST_TEMPLATE.md.
Agents must update their status at key moments:
| When | Status |
|---|---|
| Starting work | In Progress |
| Finished work | Done |
| Blocked | Blocked + specify blocker |
| When asked | Respond with current status |
# Update both board and HTML page
source ~/.openclaw/workspace/.env.github
~/.openclaw/workspace/scripts/update-agent-status.sh \
<agent> <status> <task> [server] [blocked-by] [discord] [priority] [type] [progress] [notes]
~/.openclaw/workspace/scripts/update-status-html.sh \
<agent> <status> <task> [server] [blocked-by] [discord]