skills/sefirot-loop/SKILL.md
sefirotループを実行し、質問があればユーザーに確認する
npx skillsauth add agarichan/sefirot sefirot-loopInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Sefirot は Claude Code 上のマルチエージェントオーケストレーションフレームワーク。3つのエージェント(Planner / Builder / Verifier)が Milestone 単位で設計→実装→検証のループを自動で回す。
すべての状態は milestones.json(タスクディレクトリ内)と設計ドキュメント(Markdown)で管理される。エージェント間の直接通信はなく、これらのファイルを介して連携する。
エージェントが判断に迷った場合は milestones.json の questions 配列に質問を書き込み、ループが一時停止する。このスキルがその質問をユーザーに仲介し、回答を設計ドキュメントに反映してループを再開する。
まず sefirot CLI がインストールされているか確認してください:
command -v sefirot
インストールされていない場合は、以下のメッセージを返して終了してください:
sefirotCLI がインストールされていません。以下のコマンドでインストールしてください:uv tool install git+https://github.com/agarichan/sefirot.git
sefirot のビルドループをバックグラウンドで実行し、エージェントからの質問があればユーザーに確認して回答を反映した上で再実行する。
sefirot list --active を実行して未完了タスクの一覧を確認する:
未完了のタスクがありません。
/planで設計ドキュメントを作成し、/milestoneで milestones.json を生成してください。
sefirot list --active の結果を提示して AskUserQuestion でユーザーにどのタスクを実行するか確認する。Bash ツールの run_in_background: true を使ってバックグラウンドで起動する:
sefirot loop --from-skill --task-dir <ステップ0で特定したタスクディレクトリ>
起動後、ユーザーに以下を伝える:
sefirot loop をバックグラウンドで開始しました。 完了時に通知します。実行中も自由に質問できます。
バックグラウンドタスクの完了通知が届くまで、ユーザーの入力を待つ。 ユーザーから質問や依頼があった場合は通常通り応答する。
典型的なリクエスト:
.sefirot/sessions/<タスク名>/ 配下にあるので、必要に応じてそちらも確認するバックグラウンドタスクが完了したら、TaskOutput で出力を取得する。
出力の末尾に [SEFIROT:ACTION] 行が含まれているので、そのアクション指示に従う:
[SEFIROT:ACTION] COMPLETE: 正常完了。ステップ5 に進む。[SEFIROT:ACTION] QUESTIONS_PENDING: 質問が保留中。ステップ4 に進む。[SEFIROT:ACTION] ERROR: エラー。[SEFIROT:MESSAGE] 行のメッセージをユーザーに報告し、終了する。[SEFIROT:ACTION] が見つからない場合: 予期しないクラッシュ。出力の末尾をユーザーに報告し、終了する。エージェントからの質問が milestones.json の $.questions 配列に格納されている。
milestones.json は docs/tasks/<タスクディレクトリ>/milestones.json に配置されている。
questions 配列を取得する質問内容をユーザーに提示する。フォーマット:
[質問 N/{total}] from {agent} (task: {task_id})
{question}
AskUserQuestion ツールを使ってユーザーの回答を得る
回答を関連する設計ドキュメントに反映する:
a. milestones.json から該当タスクの所属する Milestone を特定する
b. その Milestone の plan_doc フィールドから設計ドキュメントのパスを取得する。plan_doc がない場合(Planner からの質問等)は、milestones.json の source フィールド(design.md)を使う
c. 設計ドキュメント内の該当タスクのセクション(または末尾)に「追加指示」として回答を追記する:
#### 追加指示(ユーザー回答)
- Q: {元の質問}
- A: {ユーザーの回答}
milestones.json の questions 配列を空にする("questions": [])git add -A && git commit -m "chore: resolve agent questions"
ループが正常完了したら、結果を報告する:
milestones.json を読み、現在の状態を把握するtools
設計ドキュメントを作成する (sefirot)
tools
Milestoneを設計する (sefirot)
tools
設計ドキュメントからサブエージェントで並列実装する(軽量版)
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.