SOP definitions are loaded from subdirectories under sops_dir. When sops_dir is omitted from config, CLI commands fall back to <workspace>/sops for offline inspection, but runtime SOP execution is disabled.
<workspace>/sops/
deploy-prod/
SOP.toml
SOP.md
Each SOP must have SOP.toml. SOP.md is optional, but runs with no parsed steps will fail validation.
Steps are parsed from the ## Steps section.
## Steps
1. **Preflight** — Check service health and release window.
- tools: http_request
2. **Deploy** — Run deployment command.
- tools: shell
- requires_confirmation: trueParser behavior:
- Numbered items (
1.,2., ...) define step order. - Leading bold text (
**Title**) becomes step title. - tools:maps tosuggested_tools.- requires_confirmation: trueenforces approval for that step.
| Type | Fields | Notes |
|---|---|---|
manual |
none | Triggered by tool sop_execute (not a zeroclaw sop run CLI command). |
webhook |
path |
Exact match against the event path. Defined and matched, but no live event source is wired (see Connectivity). |
mqtt |
topic, optional condition |
MQTT topic supports + and # wildcards. |
cron |
expression |
Supports 5, 6, or 7 fields (5-field gets seconds prepended internally). |
peripheral |
board, signal, optional condition |
Matches "{board}/{signal}". |
condition is evaluated fail-closed (invalid condition/payload => no match).
- JSON path comparisons:
$.value > 85,$.status == "critical" - Direct numeric comparisons:
> 0(useful for simple payloads) - Operators:
>=,<=,!=,>,<,==
Use:
Validation warns on empty names/descriptions, missing triggers, missing steps, and step numbering gaps.