loop-automation-run reference

loop-automation-run は、Codex Automation や cron から loop-controller-run を呼ぶための薄い wrapper である。自動発動せず、外部 scheduler または利用者が明示した時だけ動く。

まず何が起きるか

/loop-automation-run scope=daily target=all yes のように呼ぶと、次の順で実行する。

  1. worktree が clean か確認する。
  2. 同じ scope の open PR または Issue がないか調べる。
  3. state と target を loop-controller-run へ渡す。
  4. 実行可能な候補がなければ PR を作らず no-op を報告する。
  5. validation、review、E2E、PR 作成が blocked の場合は必要な対応を返して停止する。

yes がない場合は dry-run として扱う。target=all yes は候補を無条件に実行する指定ではない。候補ごとの安全確認を行う。

Scheduler の指定

Automation prompt は次の形を基本にする。

/loop-automation-run scope=<scope> out-dir=tmp/loop/<scope>-<date> target=all agents=claude reviewers=none yes

scheduler はこの Skill を決まった cadence で呼ぶだけにする。RRULE、通知先、credential、Codex Automation の UI 設定は scheduler 側で管理する。

Options

指定 意味
state=<path> 既存の loop-state.v1 を controller へ渡す
scope=<scope> state 作成に使う scope
issue=<ref> / pr-ref=<ref> / doc=<path> state 作成に使う対象
out-dir=<path> report、state、controller result の出力先
target=<workflow-id> / target=<index> 実行候補を1件選ぶ
target=all state に並んだ全候補を評価する
agents=codex / agents=claude / agents=copilot / agents=none 後続 Skill に渡す local reviewer selector
reviewers=copilot / reviewers=codex / reviewers=codex,copilot / reviewers=none 後続 Skill に渡す GitHub reviewer selector
dry-run 後続 Skill を実行せず評価だけを行う。既定
yes 許可された候補の実行を認める

agents=reviewers= は後続 Skill へ渡す intent であり、wrapper 自体は review を起動しない。

停止条件

  • worktree が dirty である。
  • 同じ scope の open PR または Issue があり、重複作業になる可能性がある。
  • scopeissuepr-refdocstate のどれもなく、対象を決められない。
  • reviewer の none とほかの値を同時に指定している。
  • Issue が曖昧、または利用者確認が必要である。
  • controller が実行を拒否した、または現在の runtime が後続 Skill を直接起動できない。

停止時は controller result と、次に実行できる /loop-controller-run ... を報告する。merge、auto-merge、required check bypass、scheduler 設定の変更は行わない。

Examples

/loop-automation-run scope=daily out-dir=tmp/loop/daily-2026-06-29 target=all agents=claude reviewers=none yes
/loop-automation-run scope=issue issue=1056 target=all dry-run
/loop-automation-run state=tmp/loop/daily/loop-state.json target=all dry-run
このページは生成物です。原本は元リポジトリ側にあります。