claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 1h ago
スキルOfficialdevelopment

🔄idmp-workflow-analysis-create

プラグイン
idmp-plugin

説明

IDMP分析の作成ワークフロー(処理の流れ)。モード(動作方式)の解決、所有者の確認、トリガー種別(処理開始の条件)、出力属性、作成ペイロード(送信データ)、作成後の検証、再開、クリーンアップ(後片付け)に対応しています。

原文を表示

IDMP analysis creation workflow. Resolve mode, owner, trigger types, output attributes, creation payload, post-create verification, resume, and cleanup.

ユースケース

  • IDMP分析の作成ワークフローを構築するとき
  • 処理の動作方式を解決するとき
  • 処理開始の条件を設定するとき
  • 送信データのペイロードを作成するとき
  • 作成後の検証と後片付けを行うとき

本文(日本語訳)

ワークフロー: 分析作成

まず ../idmp-shared/SKILL.md をお読みください。

推奨される参考資料

先に解決が必要な不明な項目

  • リクエストがAI優先の自動作成に十分な自然言語対応になっているか
  • 候補となる分析の名前
  • 実行時の期待値
  • AI作成用プロンプトのシード(初期値)
  • idmp-cli ai create create --ack-risk --data '{"elementId":123,"prompt":"demo analysis prompt","record":true}'
  • idmp-cli analysis analyses new-name --ack-risk --params '{"elementId":123,"name":"demo-analysis"}'
  • idmp-cli analysis-template analyses new-name --ack-risk --params '{"elementTemplateId":456,"name":"demo-analysis"}'
  • analysis.analyses.new-nameanalysis-template.analyses.new-name には提案された name の値と --ack-risk が必要
  • ライブ環境での中間責任者の実行計画
  • ワークフローが葉のみの自動実行か、中間層の自動実行か、子要素の集約か

制限されたライブ動作

  • 自然言語リクエストに対してはAI下書き優先の作成を推奨: POST /api/v1/ai/analysis/create を最初に実行し、返された下書きを analysis analyses create で永続化
  • AI下書きリクエストのボディは ai.create.create に従う: promptrecorddeepThinkingdeviceDocument を明示的に保持し、さらに elementId または elementTemplateId のいずれかを含める
  • 最小限のペイロード(データ量)ではライブ環境で失敗する
  • 作成成功は実行中(Running)を保証しない
  • 分析の new-name には候補となる name--ack-risk が必要
  • rootElementId は現在の要素IDではない
  • 通常のコンテナにアドホック属性を加えるだけでは自動トリガー機能は使用できない
  • element.elements.createelement.new.create は異なる機能
  • 作成ペイロードで startAfterCreatedrootElementId、出力の valueType を明示的に保持
  • トリガータイプの事前確認により、作成前にリクエストされたスコープの有効性を判定
  • AI作成下書きは一時的な出力属性や id を含む可能性がある。永続化失敗時は下書きの id を削除し、rootElementId を注入し、下書き作成の属性をクリーンアップ
  • AI作成下書きが「コンテキストの期限切れ」といったタイムアウトで失敗した場合、最初の試行をバックエンドのAI/API遅延として分類し、業務意図を変えずに構造化されたペイロード方式にフォールバック(切り替え)
  • 現在のライブバックエンドでは、分析削除は出力属性が参照されたままで成功を返す可能性がある。作成実行後またはリーベースト(再読み込み)後のクリーンアップは、作成失敗の原因ではなくベストエフォート(最善努力)として扱う

実行フロー

  1. idmp-cli element elements get --paramsidmp-cli element elements path --params を使用して、所有者とビジネス上のルートを確定
  2. idmp-cli attribute elements attributes --paramsidmp-cli analysis analyses list --params で依存関係を読み込む
  3. 自然言語リクエストの場合、idmp-cli ai create create --ack-risk --data '{"elementId":123,"prompt":"...","record":true,"deepThinking":false,"deviceDocument":false}' でAI下書き優先作成を試み、返された下書きから id を削除して rootElementId を設定した後、idmp-cli analysis analyses create --ack-risk --params で永続化
  4. AI下書きが不適切な場合、永続化が失敗した場合、またはバックエンドが構造化AI失敗を返した場合は、構造化された現在のパスにフォールバック: idmp-cli analysis analyses new-name --ack-risk --paramsidmp-cli analysis trigger-types list --params、および出力属性が存在しない場合は idmp-cli attribute elements attributes-post --ack-risk --params で予約・検証
  5. idmp-cli analysis analyses create --ack-risk --paramsidmp-cli analysis analyses get --params で作成し、再読み込み
  6. idmp-cli analysis analyses resume --ack-risk --params で完了。クリーンアップはベストエフォート: idmp-cli analysis analyses delete --ack-risk --params は下書きが放棄された場合またはプローブ(探索)の削除が必須な場合のみ使用。削除成功後も出力属性がバックエンド側で参照されたままの場合は、リークしたIDを記録し、一般的な削除ループの再試行は停止

例外パス

  • トリガータイプが要求されたスコープをサポートしていない場合は作成を強行せず停止
  • AI作成が使用不可な下書きを返す場合、必須のスコープ詳細を見落とす場合、または永続化が失敗した場合は、下書き専用の出力属性をクリーンアップし、同じ下書きの再試行をせず代わりに構造化されたワークフローを継続
  • AI作成がタイムアウトした場合は、最初の試行をバックエンドのAI/API遅延として分類し、要求されたスコープまたは実行時ターゲットを弱めずに構造化ペイロード方式に移行
  • 再読み込みで誤った rootElementId が表示された場合は下書きを削除し、ペイロードを再構築
  • 一時的な出力属性は、分析下書きが放棄された場合は削除すること。削除成功後もバックエンドがそれらの属性を分析から参照していると報告した場合は、IDを記録し、クリーンアップの再試行は停止
  • 必要に応じてすぐに再読み込みと再開を実行

検証シナリオ

1. リーフ(末端)所有者のエレメント(要素)モード作成

idmp-cli analysis analyses create --ack-risk --params を実行し、idmp-cli analysis analyses get --params で再読み込み。共有環境では、getresume が分析の存在と実行を確認したら、クリーンアップはベストエフォートのままとする

2. 中間層メトリクス所有者のエレメントモード作成

idmp-cli analysis trigger-types list --params を使用して、中間所有者がメトリクス(測定値)を持つことを確認。通常のコンテナでは不十分

3. 子テンプレート出力を伴うエレメント階層の作成

子スコープ作成を applyOnSelf=false トリガータイプでゲート(制御)。ペイロードには子テンプレートが output.elementTemplate.id に必要だが、現在のライブ ELE_SUBET フローは属性テンプレートIDを必須とするのではなく、所有者要素上で出力属性を再利用または作成できる

4. テンプレートモード作成と属性テンプレートの再利用

テンプレートモードがリクエストされた場合は、候補名とペイロード規律を保持。ペイロードを推測された最小限のDTO(データ転送オブジェクト)に縮約しない

5. ルート所有者にトリガータイプがなく、クリーンアップが必須な場合

選択された所有者の事前確認が失敗した場合は、作成前に停止。失敗した試行で作成された一時的な出力属性は削除が必須だが、バックエンドが実行済みの作成または削除後に参照をリークした場合は、リークを記録し、一般的なクリーンアップの再試行は停止

原文(English)を表示

workflow: analysis create

Read ../idmp-shared/SKILL.md first.

Recommended references

Missing context to resolve first

  • Whether the request is natural-language friendly enough for AI-first create.
  • Candidate analysis name.
  • Runtime expectation.
  • AI create prompt seed.
  • idmp-cli ai create create --ack-risk --data '{"elementId":123,"prompt":"demo analysis prompt","record":true}'
  • idmp-cli analysis analyses new-name --ack-risk --params '{"elementId":123,"name":"demo-analysis"}'
  • idmp-cli analysis-template analyses new-name --ack-risk --params '{"elementTemplateId":456,"name":"demo-analysis"}'
  • analysis.analyses.new-name and analysis-template.analyses.new-name require a proposed name value and --ack-risk.
  • Live middle-owner proof plan.
  • Whether the workflow is leaf self, middle self, or child aggregation.

Constrained live behaviors

  • Prefer AI draft-first create for natural-language requests: POST /api/v1/ai/analysis/create first, then persist the returned draft through analysis analyses create.
  • The AI draft request body follows ai.create.create: keep prompt, record, deepThinking, and deviceDocument explicit, plus either elementId or elementTemplateId.
  • Minimal payloads fail in live environments.
  • Create success does not guarantee Running.
  • new-name for analyses requires a candidate name and --ack-risk.
  • rootElementId is not the current element ID.
  • A plain container plus ad-hoc attributes does not unlock self trigger types.
  • element.elements.create and element.new.create do different jobs.
  • Keep startAfterCreated, rootElementId, and output valueType explicit in the create payload.
  • Trigger-type preflight decides whether the requested scope is valid before any create.
  • AI create drafts can contain temporary output attributes or an id; remove the draft id, inject rootElementId, and clean draft-created attributes if persistence fails.
  • If AI draft creation fails with a timeout such as context deadline exceeded, classify that first attempt as backend AI/API latency and fall back to the structured payload path without mutating the business intent.
  • In the current live backend, analysis delete can return success while output attributes remain referenced. Treat cleanup after a proven create or running reread as best-effort instead of a hard create failure.

Execution flow

  1. Use idmp-cli element elements get --params and idmp-cli element elements path --params to lock the owner and business root.
  2. Read dependencies with idmp-cli attribute elements attributes --params and idmp-cli analysis analyses list --params.
  3. For natural-language requests, try AI draft-first create with idmp-cli ai create create --ack-risk --data '{"elementId":123,"prompt":"...","record":true,"deepThinking":false,"deviceDocument":false}', then persist the returned draft through idmp-cli analysis analyses create --ack-risk --params after removing id and setting rootElementId.
  4. If the AI draft is unsuitable, persistence fails, or the backend returns a structured AI failure, fall back to the current structured path: reserve/validate with idmp-cli analysis analyses new-name --ack-risk --params, idmp-cli analysis trigger-types list --params, and idmp-cli attribute elements attributes-post --ack-risk --params if the output attribute does not exist.
  5. Create and reread through idmp-cli analysis analyses create --ack-risk --params and idmp-cli analysis analyses get --params.
  6. Finish with idmp-cli analysis analyses resume --ack-risk --params. Cleanup is best-effort: use idmp-cli analysis analyses delete --ack-risk --params only when the draft is abandoned or when the probe must be removed. If delete succeeds but the output attribute remains backend-referenced, record the leaked IDs and stop retrying generic delete loops.

Exception paths

  • Stop when trigger types do not support the requested scope instead of forcing creation.
  • If AI create returns an unusable draft, misses required scope details, or persistence fails, clean any draft-only output attributes and continue with the structured workflow instead of retrying the same draft blindly.
  • If AI create times out, classify the first attempt as backend AI/API latency and move to the structured payload path without weakening the requested scope or runtime target.
  • If reread shows the wrong rootElementId, delete the draft and rebuild the payload.
  • Temporary output attributes should be deleted when the analysis draft is abandoned. If delete succeeds but the backend still reports those attributes as referred by the analysis, keep the IDs in the evidence and stop cleanup retries.
  • Reread immediately and resume if needed.

Validation scenarios

1. Element-mode create on a leaf owner

Run idmp-cli analysis analyses create --ack-risk --params, then reread with idmp-cli analysis analyses get --params. In shared environments, once get and resume prove the analysis exists and runs, cleanup stays best-effort.

2. Element-mode create on a middle metric owner

Use idmp-cli analysis trigger-types list --params to prove the middle owner is metric-bearing. A plain container is not enough.

3. Element-mode hierarchy create with child template output

Keep child-scope creation gated by applyOnSelf=false trigger types. The payload still needs the child template in output.elementTemplate.id, but current live ELE_SUBET flows can reuse or create output attributes on the owner element instead of requiring attribute-template IDs.

4. Template-mode create with reused attribute template

If template mode is requested, preserve the candidate name and payload discipline. Do not collapse the payload to a guessed minimal DTO.

5. Root owner has no trigger types and the attempt must be cleaned up

If preflight fails on the chosen owner, stop before create. Any temporary output attribute created for the failed attempt must be removed, but if the backend leaks references after a proven create or delete, record the leak and stop retrying generic cleanup.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。