Rootly Morning Brief
Run scripts/rootly_morning_brief.py to print a short Rootly digest to stdout. OpenClaw cron --announce handles Slack delivery.
The output is phone-friendly by default: one line per item, Slack deep links for drill-down, and --max-items defaults to 3.
Required Inputs
- -
ROOTLY_API_KEY: Rootly API key (or a readable secret file fallback)
Optional Inputs
- -
ROOTLY_BASE_URL (default https://api.rootly.com) - INLINECODE7 (default
America/Toronto) - INLINECODE9 (
true/false, default false) - INLINECODE13 (path to a file containing only the API key)
- INLINECODE14 (
WARNING default; set to INFO or DEBUG for troubleshooting) - INLINECODE18 (optional local mock data directory)
Run Commands
Manual test:
CODEBLOCK0
Include private incidents (opt-in):
CODEBLOCK1
Run with local sandbox data (no Rootly account needed):
CODEBLOCK2
Machine-readable output:
CODEBLOCK3
Cron Setup (Daily 8:00 AM Toronto)
CODEBLOCK4
To pin delivery to a specific Slack channel, add:
Example stdout
CODEBLOCK5
Agent Execution Rules
- 1. Always run
scripts/rootly_morning_brief.py located in the rootly-morning-brief skill directory; do not reimplement the digest manually. - Return script stdout as-is for delivery; do not paraphrase or rewrite the section structure.
- If
--mock-data-dir is set, run entirely from local mock files. - If
--mock-data-dir is not set, use ROOTLY_API_KEY, then ROOTLY_API_KEY_FILE, then standard OpenClaw secret-file paths. - Use timezone
America/Toronto unless the user asks otherwise. - Default to public-only incidents.
- Only include private incidents if the user explicitly opts in.
- Keep output short and readable on a phone screen.
- If one section has no data, include a clear "none" line instead of omitting the section.
Rootly 晨间简报
运行 scripts/rootlymorningbrief.py 将简短的 Rootly 摘要输出到标准输出。OpenClaw cron --announce 负责 Slack 投递。
输出默认针对手机优化:每项一行,提供 Slack 深度链接以便下钻,--max-items 默认为 3。
必需输入
- - ROOTLYAPIKEY:Rootly API 密钥(或可读的密钥文件作为备选)
可选输入
- - ROOTLYBASEURL(默认 https://api.rootly.com)
- ROOTLYTIMEZONE(默认 America/Toronto)
- ROOTLYINCLUDEPRIVATE(true/false,默认 false)
- ROOTLYAPIKEYFILE(仅包含 API 密钥的文件路径)
- ROOTLYBRIEFLOGLEVEL(默认 WARNING;故障排查时设为 INFO 或 DEBUG)
- ROOTLYMOCKDATADIR(可选的本地模拟数据目录)
运行命令
手动测试:
bash
python3 scripts/rootlymorningbrief.py
包含私有事件(主动选择加入):
bash
python3 scripts/rootlymorningbrief.py --include-private
使用本地沙箱数据运行(无需 Rootly 账户):
bash
python3 scripts/rootlymorningbrief.py --mock-data-dir ./mock-data
机器可读输出:
bash
python3 scripts/rootlymorningbrief.py --json
Cron 设置(每天多伦多时间 8:00)
bash
openclaw cron add \
--name Rootly 晨间简报 \
--cron 0 8 * \
--tz America/Toronto \
--session isolated \
--message 使用 rootly-morning-brief。运行 scripts/rootlymorningbrief.py 并输出完整摘要。 \
--announce
要指定投递到特定 Slack 频道,添加:
- - --channel slack --to channel:CXXXXXXX
标准输出示例
text
Rootly 晨间简报 — 3月15日 周日
概览:2 个活跃(1 个 SEV0/SEV1)· 24 小时内 1 个已解决 · 当前 2 人值班 · 1 个逾期
当前活跃
• 🚨 — [SEV0] · [开放] · 周日 6:42 AM 开始
• 🟧 — [SEV2] · [开放] · 周日 5:25 AM 开始
当前值班
• Nicole Bu — L1 主值班
• Jordan Patel — L2 副值班
逾期操作
• ⚠️ — [P1] · 周六 7:30 AM 到期 · Nicole Bu · SEC-742
已解决(24 小时内)
• — 周日 12:02 AM 已解决
代理执行规则
- 1. 始终运行位于 rootly-morning-brief 技能目录中的 scripts/rootlymorningbrief.py;不要手动重新实现摘要。
- 按原样返回脚本的标准输出用于投递;不要改写或重写章节结构。
- 如果设置了 --mock-data-dir,完全从本地模拟文件运行。
- 如果未设置 --mock-data-dir,依次使用 ROOTLYAPIKEY、ROOTLYAPIKEY_FILE,然后使用标准 OpenClaw 密钥文件路径。
- 除非用户另有要求,使用时区 America/Toronto。
- 默认仅包含公开事件。
- 仅在用户明确选择加入时包含私有事件。
- 保持输出简短,适合手机屏幕阅读。
- 如果某个章节没有数据,包含明确的无行,而不是省略该章节。