← View index

Dev Intel: automations need a run-scope contract

Codex Automations / Skills / AGENTS.md docsから、OpenClaw heartbeat/cronに必要な実行スコープ契約を1枚に圧縮。

Generated: 2026-05-23T05:10:00+09:00

Lane: 開発ネタ発掘

Why this is useful: Codex Automations docs make the same split OpenClaw heartbeat keeps rediscovering: recurring agent work is not just a schedule, it needs an explicit run scope. The important distinction is whether a run preserves thread context, starts fresh, edits the local checkout, or isolates changes in a worktree.

What I made/changed: I distilled the official Codex Automations / Skills / AGENTS.md docs into an OpenClaw-facing implementation note: every heartbeat/cron should carry a small run_scope_contract before it runs. Minimum fields: context_mode (thread/fresh), workspace_mode (local/worktree/read-only), skill_contract (which skill owns the workflow), instruction_sources (which AGENTS/SOUL/USER files apply), external_action_gate, and done_evidence.

Sources/Evidence:

Work contract trigger: heartbeat patrol owner-interest dev scouting.

Work contract workspace_scope: local workspace artifact and View only; no external send/post/write.

Work contract done_evidence: artifact saved, View rendered, creative state JSON parsed.

Work contract human_review_gate: required only before changing automation schedules, posting externally, or modifying shared/prod systems.

Harness component: heartbeat_dev_intel

Failure category: context_scope_ambiguity

Gate owner_value_gate: pass for saved artifact; no phone notification during quiet hours.

Gate external_action_gate: pass, local-only.

Gate view_source_gate: pass after View render; source URLs included above.

Gate handoff_state_gate: pass after heartbeat-creative-state update.

Prediction: If OpenClaw adds run_scope_contract to heartbeat/cron artifacts, fewer owner-facing failures will come from confused context inheritance, local checkout mutation, or unclear skill ownership.

Verify by: Inspect the next three heartbeat/cron artifacts for explicit context/workspace/skill/done-evidence fields; compare against guard warnings about opaque heartbeat output.

Observed: Official docs support the contract shape, but no runtime schema change was made in this pass.

Next safe action: Add a non-breaking optional run_scope_contract field to future heartbeat artifacts, then promote it into a guard only after two or three examples prove the shape.

Notify: no — 05:10 JST is quiet-hours, and this is a useful design seed rather than an urgent warning.

健人くん向けの一言圧縮

ざっくり言うと、定期実行AIは「いつ動くか」より先に「どの文脈で、どこを触って、何を完了証拠にするか」を持たせた方が強い。

OpenClawでは heartbeat / cron / skill 実行が混ざりやすいので、run_scope_contract を持たせると「ローカル編集していいのか」「スレッド記憶を使うのか」「どのskillが責任を持つのか」を実行前に固定できる。これは通知の読みやすさより一段奥の事故防止。

次にやるなら、まずは実行ログのメタデータとして追加する。いきなり必須化すると既存スクリプトが窮屈になるので、数本集めてからguard化する。

質問したい箇所を選択
この箇所について質問
✓ 質問を送信しました