agentleFS
awaku7awaku7/agentcli/skills/batch-state-runbook/SKILL.md

batch-state-runbook

Skill12 starsChanged 10 days agoApache-2.0View on GitHub

batch_state を使う反復作業で、順番の崩れ・脱線・処理漏れを防ぐための実行用スキル。 状態を load/update しながら、1ステップずつ着実に処理する。

The file

Files
SKILL.md

Batch State Runbook

目的

batch_state を使う作業で、LLM が途中で順番を飛ばしたり、未処理を忘れたりしないようにする。

強制ルール

  1. 毎ターン最初に batch_state(load) を確認する。SQLite(~/.uag/batches/task_history.sqlite3)の状態とtask_eventsの経過を正とする。
  2. 判断は batch_state の内容だけで行う。会話履歴が失われても、保存済みのinstructionsとconversation_idで再開する。
  3. 1ターンで処理するのは原則 1 件だけ。
  4. 次の対象は targets[current_target] の files[next_index] とする。
  5. 1件を終えたら必ずbatch_state(complete_file)、skip_file、またはerror_fileを行う。
  6. 途中経過はmessageまたはreasonとして状態に残す。
  7. pending_filesが空になったらbatch_state(finalize)する。
  8. 記憶や推測で対象を増やさない。
  9. current_target や next_index が曖昧なら、処理を止めて再 load する。

推奨ワークフロー

  1. load
  2. targets[current_target].files[next_index] を 1 件だけ処理
  3. complete_file、skip_file、またはerror_file
  4. 必要に応じてmessage/reasonを保存
  5. 次のターンで再load

進め方の基準

  • 完了済みは next_index を進めて管理する。
  • targets は未処理のグループだけを残す。
  • 途中で対象を変更する場合は、必ず update で状態を直してから続ける。
  • 失敗した場合は、失敗内容を append_log に書き、次の候補を勝手に飛ばさない。

出力の方針

  • 返答は簡潔にする。
  • まず「現在の対象」と「次の1手」を明示する。
  • 余計な候補列挙はしない。

適用場面

  • i18n の .po 更新
  • 複数ファイルの査読
  • 連番処理が必要な修正
  • batch_state を使う全反復作業

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.