## Program: Weekly Status Report**Authority:** Compile data, generate report, deliver to stakeholders**Trigger:** Every Friday at 4 PM (enforced via automation job)**Approval gate:** None for standard reports. Flag anomalies for human review.**Escalation:** If data source is unavailable or metrics look unusual (>2σ from norm)### Execution steps1. Pull metrics from configured sources2. Compare to prior week and targets3. Generate report in Reports/weekly/YYYY-MM-DD.md4. Deliver summary via configured channel5. Log completion to Agent/Logs/### What NOT to do- Do not send reports to external parties- Do not modify source data- Do not skip delivery if metrics look bad - report accurately
openclaw automations add \ --name daily-inbox-triage \ --cron "0 8 * * 1-5" \ --tz America/New_York \ --timeout-seconds 300 \ --announce \ --channel imessage \ --to "+1XXXXXXXXXX" \ --message "Execute daily inbox triage per standing orders. Check mail for new alerts. Parse, categorize, and persist each item. Report summary to owner. Escalate unknowns."
示例
示例 1:内容和社交媒体(每周周期)
markdown
## Program: Content & Social Media**Authority:** Draft content, schedule posts, compile engagement reports**Approval gate:** All posts require owner review for first 30 days, then standing approval**Trigger:** Weekly cycle (Monday review → mid-week drafts → Friday brief)### Weekly cycle-**Monday:** Review platform metrics and audience engagement-**Tuesday-Thursday:** Draft social posts, create blog content-**Friday:** Compile weekly marketing brief → deliver to owner### Content rules- Voice must match the brand (see SOUL.md or brand voice guide)- Never identify as AI in public-facing content- Include metrics when available- Focus on value to audience, not self-promotion
示例 2:财务运营(事件触发)
markdown
## Program: Financial Processing**Authority:** Process transaction data, generate reports, send summaries**Approval gate:** None for analysis. Recommendations require owner approval.**Trigger:** New data file detected OR scheduled monthly cycle### When new data arrives1. Detect new file in designated input directory2. Parse and categorize all transactions3. Compare against budget targets4. Flag: unusual items, threshold breaches, new recurring charges5. Generate report in designated output directory6. Deliver summary to owner via configured channel### Escalation rules- Single item > $500: immediate alert- Category > budget by 20%: flag in report- Unrecognizable transaction: ask owner for categorization- Failed processing after 2 retries: report failure, do not guess
示例 3:监控与告警(持续运行)
markdown
## Program: System Monitoring**Authority:** Check system health, restart services, send alerts**Approval gate:** Restart services automatically. Escalate if restart fails twice.**Trigger:** Every heartbeat cycle### Checks- Service health endpoints responding- Disk space above threshold- Pending tasks not stale (>24 hours)- Delivery channels operational### Response matrix| Condition | Action | Escalate? || ---------------- | ------------------------ | ------------------------ || Service down | Restart automatically | Only if restart fails 2x || Disk space < 10% | Alert owner | Yes || Stale task > 24h | Remind owner | No || Channel offline | Log and retry next cycle | If offline > 2 hours |
执行-验证-报告模式
当与严格的执行纪律结合时,常设指令效果最佳。常设指令中的每个任务都应遵循这个循环:
执行 - 做实际工作(不要只是确认指令)
验证 - 确认结果正确(文件存在、消息已送达、数据已解析)
报告 - 告诉所有者做了什么以及验证了什么
markdown
### Execution rules- Every task follows Execute-Verify-Report. No exceptions.- "I'll do that" is not execution. Do it, then report.- "Done" without verification is not acceptable. Prove it.- If execution fails: retry once with adjusted approach.- If still fails: report failure with diagnosis. Never silently fail.- Never retry indefinitely - 3 attempts max, then escalate.
这种模式可以防止代理最常见的失败方式:只确认任务,却没有真正完成。
多程序架构
对于管理多个关注点的代理,应将常设指令组织为边界清晰的独立程序:
markdown
## Program 1: [Domain A] (Weekly)...## Program 2: [Domain B] (Monthly + On-Demand)...## Program 3: [Domain C] (As-Needed)...## Escalation Rules (All Programs)- [Common escalation criteria]- [Approval gates that apply across programs]