mcpField
W
workflow-orchestrator

workflow-orchestrator

github.com/zhaono1エージェントワークフロー85834 回インストール9 週間前に更新
リポジトリ

workflow-orchestrator について

Workflow Orchestratorは、ワークフローの節目、完了、エラー時に複数のスキルの後続処理を調整するスキルです。宣言されたフックとホストの対応状況を確認し、リスクや権限に応じて処理を記録または実行します。

主な機能

  1. 01ワークフローの節目とエラーを検出
  2. 02宣言的なフックメタデータを読み取る
  3. 03対応する後続処理を実行または記録
  4. 04自動、バックグラウンド、承認必須の処理を区別
  5. 05ホスト対応状況と権限境界を遵守

活用シーン

  1. 01スキル完了後のログや振り返りを記録
  2. 02PRなど重要な操作の前に承認を求める
  3. 03実装やPRDの節目に続く処理を調整

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/zhaono1/agent-playbook --skill workflow-orchestrator

インストール後、Claude Code で/workflow-orchestratorを入力して読み込まれたか確認します。

同梱ファイルREADME.md

詳細

ワークフローオーケストレーター

フックのメタデータを評価し、保留中のフォローアップを記録して、現在のホストランタイムで安全かつサポートされているアクションのみを実行することで、複数のスキルにまたがるワークフローを調整するスキルです。

このスキルが有効になるタイミング

このスキルは、次の場合に使用します。

  • スキルがメインのワークフローを完了したとき
  • マイルストーンに到達したとき(PRD の完成、実装の完了など)
  • ユーザーが「ワークフローを完了して」または「プロセスを終了して」と言ったとき

動作の仕組み

┌─────────────────────────────────────────────────────────────┐
│                    Workflow Orchestration                   │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  1. Detect Milestone → 2. Read Hooks → 3. Record/Run Safe Follow-ups │
│                                                             │
│  prd-planner complete                                       │
│       ↓                                                     │
│  workflow-orchestrator                                      │
│       ↓                                                     │
│  ┌─────────────────────────────────────┐                   │
│  │ declared self-improving follow-up   │ (record/run)       │
│  │ declared session logging follow-up  │ (record/run)       │
│  └─────────────────────────────────────┘                   │
│                                                             │
└─────────────────────────────────────────────────────────────┘

トリガー設定

skills/auto-trigger/SKILL.md からトリガー定義を読み込みます。

hooks:
  after_complete:
    - trigger: self-improving-agent
      mode: background
    - trigger: session-logger
      mode: auto
  on_error:
    - trigger: self-improving-agent
      mode: background

実行モード

モード動作使用する状況
autoホストがサポートしている場合、低リスクのフォローアップを実行または記録しますログ記録、ステータス更新
backgroundブロックしないフォローアップを記録します振り返り、分析
ask_first実行前にユーザーに確認しますPR、デプロイ、大きな変更

マイルストーンの検出

PRD の完成
Detected when:
- docs/{scope}-prd.md exists
- All phases in {scope}-prd-task-plan.md are checked
- Status shows "COMPLETE"

Actions:
1. Record self-improving-agent as a background follow-up
2. Run or record session-logger if the host supports it
実装の完了
Detected when:
- All PRD requirements implemented
- Tests pass
- Code committed

Actions:
1. Ask before running code-reviewer
2. Run create-pr only when the user requested submission
3. Run or record session-logger if the host supports it
自己改善の適用
Detected when:
- Candidate validated with auditable evidence
- One named durable owner changed
- Representative behavior rerun
- Candidate recorded as applied

Actions:
1. Ask before running create-pr
2. Run or record session-logger if the host supports it
学習候補(スキル完了)
Detected when:
- A skill completes its workflow and produces reusable evidence
- User provides feedback
- Error or issue encountered

Actions:
1. Record self-improving-agent as a background follow-up
2. Run or record session-logger if the host supports it

The self-improving-agent:
- Captures a candidate only when reusable evidence exists
- Excludes raw transcripts and private tool payloads
- Keeps uncertain findings under observation
- Validates candidates only with explicit, auditable evidence
- Applies validated changes only to a named durable owner with a change reference
- Proves the representative behavior after application

エラー処理(on_error)

次の場合に検出します。

  • コマンドがゼロ以外の終了コードを返したとき
  • スキルのガイダンスに従った後にテストが失敗したとき
  • ガイダンスによって誤った結果が生じたとユーザーが報告したとき

アクション:

  1. 自己修正のため、self-improving-agent を(background で)記録します
  2. エラーの状況を記録するため、session-logger を実行または記録します

スキルでのフックの実装

フォローアップのメタデータを宣言するには、任意のスキルの SKILL.md に次のセクションを追加します。

## Auto-Trigger (After Completion)

When this skill completes, record or run supported follow-ups:

```yaml
hooks:
  after_complete:
    - trigger: skill-name
      mode: auto|background|ask_first
      context: "relevant context"
  on_error:
    - trigger: self-improving-agent
      mode: background
現在のフック契約

フックのメタデータは宣言された意図であり、CLI による自動化の証明ではありません。アクションを実行する前に、現在のスキルのフロントマターを読み込んでください。フックがない場合、宣言されたフォローアップはありません。フックが存在する場合でも、対象のアクションにはホストのサポートと権限の境界が必要です。

汎用学習パターン
┌─────────────────────────────────────────────────────────────┐
│                  Skill Completes With Evidence              │
└──────────────┬──────────────────────────────────────────────┘
               │
               ↓
    ┌──────────────────────┐
    │ workflow-orchestrator │
    └──────────┬───────────┘
               │
    ┌──────────┴─────────┐
    ↓                   ↓
self-improving-agent  session-logger
    ↓                   ↓
Capture candidate     Save bounded context
    ↓                   ↓
Validate evidence     Log session
    ↓
Apply to named owner
    ↓
create-pr (only if submission was requested)

## Workflow Examples

### Example 1: PRD Creation Workflow

User: "Create a PRD for user authentication" ↓ prd-planner executes ↓ Phase 6 complete: PRD delivered ↓ workflow-orchestrator detects milestone ↓ ┌─────────────────────────────────┐ │ Background: self-improving-agent │ → 学習提案を記録 │ Auto: session-logger │ → サポートされている場合はセッションを保存 └─────────────────────────────────┘


### Example 2: Full Feature Workflow

User: "Create a PRD and implement it" ↓ prd-planner → workflow-orchestrator ↓ self-improving-agent (candidate capture only) ↓ prd-implementation-precheck ↓ implementation complete → workflow-orchestrator ↓ code-reviewer → optional candidate capture ↓ create-pr (only when requested) → workflow-orchestrator ↓ session-logger


Each milestone can produce a `self-improving-agent` follow-up, but durable
skill edits still require validation or explicit approval.

## Implementation Steps

### Step 1: Detect Milestone

Check for completion indicators:

```bash
# PRD complete?
grep -q "COMPLETE" docs/{scope}-prd-task-plan.md

# All phases checked?
grep -q "^\- \[x\].*Phase 6" docs/{scope}-prd-task-plan.md

# PRD file exists?
ls docs/{scope}-prd.md
ステップ 2:トリガー設定を読み込む
# Read hooks from auto-trigger skill
cat skills/auto-trigger/SKILL.md
ステップ 3:フックを記録または実行する

各フックについて、順番に(before_start、after_complete、on_error):

  1. 条件を満たしているか確認します
  2. モードとホストのサポートに応じて、記録または実行します
  3. コンテキストをトリガーされたスキルに渡します
  4. モードに応じて待機または続行します
ステップ 4:ステータスを更新する

トリガーされた内容と結果を記録します。

## Workflow Execution

- [x] self-improving-agent (background) - Started
- [x] session-logger (auto) - Session saved
- [ ] create-pr (ask_first) - Pending user approval

自動トリガーを持つスキル

スキルトリガーされるもの
prd-plannerself-improving-agent、session-logger
self-improving-agent自動 PR はありません。適用された変更では、ログ記録のフォローアップを宣言できます
prd-implementation-precheckself-improving-agent、session-logger
code-reviewerself-improving-agent、session-logger
create-prsession-logger
refactoring-specialistself-improving-agent、session-logger
debuggerself-improving-agent、session-logger

既存のスキルにフォローアップのメタデータを追加する

既存のスキルにフォローアップのメタデータを追加するには、その SKILL.md の末尾に次を追加します。

---

## Auto-Trigger

When this skill completes, record or run supported follow-ups:

```yaml
hooks:
  after_complete:
    - trigger: session-logger
      mode: auto
      context: "Save session context"

For more complex triggers, specify mode and context:

```markdown
## Auto-Trigger

When this skill completes:

```yaml
hooks:
  after_complete:
    - trigger: next-skill
      mode: background
      context: "Description"
    - trigger: session-logger
      mode: auto
      context: "Save session"
    - trigger: create-pr
      mode: ask_first
      context: "Create PR if files modified"
  on_error:
    - trigger: self-improving-agent
      mode: background

## Best Practices

1. **Log only when supported and appropriate** - Session logging is a bounded optional follow-up
2. **Ask before major actions** - PRs, deployments, destructive changes
3. **Background for analysis** - Reflection, evaluation, optimization
4. **Auto for status** - Logging, status updates, bookmarks
5. **Don't create loops** - Ensure chains terminate

コメント