此文件控制什么
BOOT.md 定义了你的智能体在启动时执行一次的操作——验证其运行环境是否健康、加载关键数据、记录就绪状态。其目的是在启动时发现问题,而不是在会话中途。没有 BOOT.md,智能体会以环境碰巧处于的任何状态启动,配置错误只会在用户在对话中遇到它们时才暴露出来。
运行时在所有其他工作区文件加载完毕后,将 BOOT.md 作为初始化序列的最后一步执行。它按顺序运行 bootVerify 检查;如果任何检查失败,智能体可以以降级模式启动(记录警告)或完全停止,取决于严重性配置。bootLog 字段随后记录启动事件以供监控和审计。
BOOT.md 只有两个字段,使其成为最简单的工作区文件——但它对运营可靠性的影响却不成比例地大。配置良好的 BOOT.md 可以防止最令人沮丧的一类智能体故障:一切看似正常,直到某个关键功能在会话进行 30 分钟后静默失败。
为什么重要: Catch problems at launch, not mid-session.
逐字段详解
定义智能体行为的 2 个字段
bootVerify必填Checks to run at startup to confirm everything is ready.
bootLog可选What the agent should record when it starts up.
实际配置示例
## bootVerify
- Confirm GOV.UK API access is functional (test query)
- Confirm client database read-only connection is active
- Confirm Slack bot token is valid and scoped to #tax-queries
- Load current filing deadline calendar from shared drive
- Check for any unresolved escalations from previous sessions
## bootLog
FINLEY ONLINE — [date] — APIs: [status] | DB: [status] | Pending escalations: [count] | Next filing deadline: [date, client]常见错误
将 bootVerify 留空
没有验证检查,智能体会无视环境健康状况直接启动。API 密钥可能已过期、数据库可能离线、权限可能已被撤销——而你直到用户遇到故障时才会知道。
编写总是通过的检查
像'检查配置文件是否存在'这样的验证即使文件为空或损坏也会通过。检查应该验证实际功能:发起测试 API 调用、运行测试查询、验证响应格式。
日志写入不可靠的位置
如果 bootLog 写入的位置本身不可用(例如挂载失败的网络驱动器),启动日志会在你最需要它的时候丢失。先在本地记录,然后复制到外部监控系统。
bootLog 中未包含时间戳或版本信息
没有时间戳的启动日志无法与事件关联。没有版本信息,你无法确定问题发生时哪个工作区配置处于活动状态。
SetupClaw 如何处理
每次 SetupClaw 部署都包含上线前的启动序列验证。我们的专家为 TOOLS.md 中引用的每个工具和数据源配置验证检查,然后在交付前运行完整的启动序列以确认干净启动。
所有已配置工具的启动验证 + 结构化启动日志 + 上线前验证
以上全部 + 降级模式配置(带警告启动 vs 停止)+ 自动重启处理
以上全部 + bootLog 与现有监控系统(Datadog、Grafana)集成 + 结构化 JSON 启动事件
- 两个字段均已配置有意义的检查
- 每个 TOOLS.md 功能在启动时都已验证
- 启动日志格式包含时间戳、状态和待处理项
- 交付前上线验证已通过
- 降级模式行为已记录(Standard+)
部署期间配置和验证(第 1-2 天)。第 5 天完成监控集成(Professional)。
进阶主题
用于监控集成的结构化 JSON 启动事件
对于拥有现有监控基础设施的 Professional 套餐部署,配置 bootLog 发出结构化 JSON 事件,可以被 Datadog、Grafana 或类似工具摄取。这使得启动失败的自动告警、启动时间的趋势分析以及与事件时间线的关联成为可能。
## bootLog
{
"event": "BOOT",
"agent": "Finley",
"timestamp": "[ISO 8601]",
"version": "[workspace-version]",
"checks": {
"govuk_api": "[pass/fail]",
"client_db": "[pass/fail]",
"slack_bot": "[pass/fail]"
},
"pending_escalations": [count],
"boot_duration_ms": [duration],
"status": "ONLINE|DEGRADED|FAILED"
}配置示例
Persona A — Meridian首席参谋
# BOOT.md -- Startup Actions
## bootVerify
- Confirm calendar, email, and Notion API access
- Load current OKR document and verify it is up to date
- Check for unresolved escalations from previous sessions
- Verify Slack connectivity and channel permissions
## bootLog
MERIDIAN ONLINE — [date] — Current critical path: [item] | Pending escalations: [count] | OKR status: [loaded/stale]Persona B — Axiom (增长黑客)
# BOOT.md -- Startup Actions
## bootVerify
- Confirm Mixpanel and analytics database connectivity
- Load experiment backlog and check for experiments needing sample size review
- Verify Google/Meta Ads API read access
- Check for experiments past their scheduled end date
## bootLog
AXIOM ONLINE — [date] — Active experiments: [N] | Overdue experiments: [N] | Funnel baseline loaded: [yes/no]Persona C — Lumen (科研人员)
# BOOT.md -- Startup Actions
## bootVerify
- Confirm PubMed and Zotero API access
- Load current research agenda and active threads
- Check for flagged papers awaiting full review
- Verify citation database is synchronised
## bootLog
LUMEN ONLINE — [date] — Active research threads: [N] | Papers pending review: [N] | Database sync: [current/stale]Persona D — Narrative (内容创作者)
# BOOT.md -- Startup Actions
## bootVerify
- Confirm CMS, Ahrefs, Buffer, and GA4 API access
- Load editorial calendar and check for pieces due within 7 days
- Check for pending content briefs awaiting approval
- Verify social scheduling queue is populated
## bootLog
NARRATIVE ONLINE — [date] — Pieces due this week: [N] | Pending briefs: [N] | Social queue: [N items scheduled]Persona E — Architect (首席工程师)
# BOOT.md -- Startup Actions
## bootVerify
- Confirm GitHub, Datadog, and AWS EKS API access
- Load active ADRs and check for pending decisions
- Check for open P1/P2 incidents
- Verify CI/CD pipeline status
## bootLog
ARCHITECT ONLINE — [date] — Open incidents: [N] | PRs awaiting review: [N] | Active ADRs: [N] | Pipeline: [green/red]