claude-skills/

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

last sync 1h ago
スキルOfficialdevelopment

🏗️idmp-workflow-panel-build

プラグイン
idmp-plugin

説明

IDMP パネル構築ワークフロー(画面部品の組み立てプロセス)。所有者の確定、名前の予約、パネル部品の作成、クエリと SQL 出力の検証、ダッシュボードへのパネル配置、安全なクリーンアップを行います。

原文を表示

IDMP panel build workflow. Resolve owner, reserve names, create panel objects, verify query and SQL output, place panels into dashboards, and clean up safely.

ユースケース

  • 画面部品を組み立てるとき
  • パネルの所有者を確定する場面
  • パネル部品を作成するとき
  • クエリとSQL出力を検証する場面
  • ダッシュボードにパネルを配置するとき

本文(日本語訳)

ワークフロー: パネル構築

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

推奨される参考資料

最初に解決すべき不明な点

  • リクエストがAI主導のパネル下書き作成に十分な自然言語形式かどうか
  • 候補となるパネル名
  • 配置計画
  • AIの作成プロンプトの初期値
  • idmp-cli ai create create-post --ack-risk --data '{"elementId":123,"prompt":"demo panel prompt","record":true}'
  • idmp-cli panel panels new-name --params '{"elementId":123,"name":"demo-panel"}'
  • 候補となるダッシュボード名
  • idmp-cli dashboard dashboards new-name --params '{"elementId":123,"name":"demo-dashboard"}'
  • 階層構造の永続化計画
  • 目的が単一レベルの自己、中位レベルの自己、子要素の集約、またはテキスト・手動パネルのどれなのか

制限された動作特性

  • 自然言語のパネルリクエストではAI下書き優先の作成を推奨:まずPOST /api/v1/ai/panels/createを実行し、その後、返されたドラフトをpanel.panels.createで永続化する
  • panel verify createは時間範囲のみを検証し、所有者の--paramsは受け付けない
  • panel verify create-postは高度なSQL入力を検証する
  • パネルの作成はそれをダッシュボードに配置することはない
  • panel.paramsがパネルの時間範囲を管理する
  • dashboard.paramsがダッシュボードの更新設定を管理する
  • 生成されたSQLが空の場合、永続化前に停止する
  • すべての高度なフォールバックは有効なadvancedQueryTypeを保持する必要がある
  • panel.panels.querypanel.panels.createはパネルの定義形式(DTO)を使用する
  • checkedブール値とdimensionsを文字列の配列として保持する
  • 標準的な子要素スコープのラウンドトリップ(往復通信)は自己スコープに戻される可能性がある
  • 再読でenableAdvanced=trueが示された後にのみ高度なフォールバックを永続化する。そのSQLをenableAdvanced=trueで保存する。検証済みの高度なフォールバックは、子要素スコープのパネルワークでも最初の試行成功としてカウントされる
  • 本文なしの400レスポンスは通常、ペイロード形式が不正であることを意味する
  • AIパネルの下書きはidを含むことができる。永続化前に削除する。AIドラフトが子要素スコープを縮小した場合、必要な配置フィールドが失われた場合、または永続化に失敗した場合は、既存の構造化ワークフローにフォールバックする

実行フロー

  1. idmp-cli element elements get --paramsidmp-cli panel panels list --paramsidmp-cli dashboard dashboards list --paramsで所有者と現在のシェル(操作環境)をロックする

  2. 自然言語リクエストの場合、idmp-cli ai create create-post --ack-risk --dataでAI下書き優先作成を試行してから、idを削除した後、idmp-cli panel panels create --ack-risk --paramsで返されたドラフトを永続化する

  3. AIドラフトが不適切な場合、永続化に失敗した場合、または再読・クエリがドラフトのスコープ縮小を証明した場合は、既存の構造化パネルパスにフォールバックする

  4. AIパスがスキップされた場合または不適切な場合、idmp-cli panel panels new-name --paramsidmp-cli dashboard dashboards new-name --paramsで名前を予約する

  5. 配置が必要な場合、idmp-cli dashboard dashboards create --ack-risk --paramsでダッシュボードシェルを作成または検査する

  6. idmp-cli panel panels create --ack-risk --paramsでパネルオブジェクトを作成し、idmp-cli panel panels get --paramsで再読する

  7. クエリ動作を3つの異なるブランチで検証:完全なパネル定義形式にはidmp-cli panel panels query --ack-risk --paramsidmp-cli panel panels sqls --ack-risk --paramsを使用し、時間範囲検証のみにidmp-cli panel verify create --ack-risk --dataを使用し、高度な子要素スコープフォールバック定義のみにidmp-cli panel verify create-post --ack-risk --paramsを使用する。現在生成されたスキーマでは、panel.panels.queryは読み取り専用のため--ack-riskはオプションだが、panel.panels.sqlsと両方のpanel.verify.*コマンドはまだ書き込みリスク(権限が必要)のコマンドとして生成され、--ack-riskを保持する。コード無し子要素スコープ定義が再読で縮小された場合または空本文の400を返した場合、検証済みSQLを保持し、ワークフローを再開する代わりに高度なフォールバックを永続化する

  8. パネルが安定した後、idmp-cli dashboard dashboards update --ack-risk --paramsで配置を追加または更新する

例外パス

  • 子要素スコープクエリ結果が縮小した場合またはSQLが空の場合、停止して意図的に高度なフォールバックに切り替える

  • AIパネルドラフトが形式不正な場合、所有者スコープに不適切な場合、またはget/query/sqls再読に耐えられない場合、そのドラフトの使用を停止し、構造化定義ファミリーで続行する

  • ダッシュボード更新設定をパネル定義に混在させない

  • 高度なフォールバックがenableAdvanced=trueで再読され、SQLが依然として意図した子要素スコープと一致する場合、元のコード無し定義が再読に耐えなくても、ワークフローを成功として扱う

  • ワークフローが探索的なだけの場合、一時的なダッシュボードシェルまたはパネルを削除する

検証シナリオ

1. 単一レベルのクエリ連動パネル

idmp-cli panel panels create --ack-risk --paramsを使用してからidmp-cli panel panels get --paramsを実行する。永続化されたパネルは再読時もクエリでき、表示されなければならない。

2. 中位レベルのクエリ連動パネル

同じパネル定義ファミリーを保持するが、中位レベルの所有者が本当にメトリクス(測定値)の文脈を持つかどうか確認する。クエリとSQL読み取りは成功のままであるべき。

3. 中位レベルの子要素集約と高度なクエリフォールバック

idmp-cli panel panels sqls --ack-risk --paramsを先に使用してからidmp-cli panel verify create-post --ack-risk --paramsを使用する。高度なペイロードが検証された後にのみ永続化し、元のコード無し子要素スコープ定義が再読で縮小されるたびに、その高度な永続化を成功パスとして扱う。

4. テキストまたは手動パネルシェル

SQLで支援されたパネルが不要な場合、オブジェクトをシンプルに保ち、高度な検証をスキップする。パネルは作成後も再読が必要。

5. パネルとダッシュボード配置およびクリーンアップ

idmp-cli dashboard dashboards update --ack-risk --paramsの後、dashboard.dashboards.updateの後、ダッシュボードを再読する。ワークフローが試験的なだけの場合、一時的なシェルを削除する。

原文(English)を表示

workflow: panel build

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

Recommended references

Missing context to resolve first

  • Whether the request is natural-language friendly enough for AI-first panel drafting.
  • Candidate panel name.
  • Placement plan.
  • AI create prompt seed.
  • idmp-cli ai create create-post --ack-risk --data '{"elementId":123,"prompt":"demo panel prompt","record":true}'
  • idmp-cli panel panels new-name --params '{"elementId":123,"name":"demo-panel"}'
  • Candidate dashboard name.
  • idmp-cli dashboard dashboards new-name --params '{"elementId":123,"name":"demo-dashboard"}'
  • Hierarchy persistence plan.
  • Whether the goal is leaf self, middle self, child aggregation, or a text/manual panel.

Constrained live behaviors

  • Prefer AI draft-first create for natural-language panel requests: POST /api/v1/ai/panels/create first, then persist the returned draft through panel.panels.create.
  • panel verify create is the time-range-only validator and does not take owner --params.
  • panel verify create-post validates advanced SQL entries.
  • Creating a panel does not place it into a dashboard.
  • panel.params owns the panel time range.
  • dashboard.params owns dashboard refresh settings.
  • If generated SQL is empty, stop before persistence.
  • Every advanced fallback must keep a valid advancedQueryType.
  • panel.panels.query and panel.panels.create use the panel DTO shape.
  • Keep checked boolean and dimensions as an array of strings.
  • Standard child-scope roundtrips can collapse back to self scope.
  • Persist the advanced fallback only after reread shows enableAdvanced=true; save that SQL with enableAdvanced=true. A verified advanced fallback still counts as first-attempt success for child-scope panel work.
  • Empty-body 400 responses usually mean the payload shape is wrong.
  • AI panel drafts can include an id; remove it before persistence. If the AI draft collapses child scope, loses required placement fields, or fails to persist, fall back to the existing structured workflow.

Execution flow

  1. Lock the owner and current shells with idmp-cli element elements get --params, idmp-cli panel panels list --params, and idmp-cli dashboard dashboards list --params.
  2. For natural-language requests, try AI draft-first create with idmp-cli ai create create-post --ack-risk --data, then persist the returned draft through idmp-cli panel panels create --ack-risk --params after removing id.
  3. If the AI draft is unsuitable, persistence fails, or reread/query proves the draft collapsed scope, fall back to the current structured panel path.
  4. Reserve names with idmp-cli panel panels new-name --params and idmp-cli dashboard dashboards new-name --params when the AI path is skipped or unsuitable.
  5. Create or inspect the dashboard shell through idmp-cli dashboard dashboards create --ack-risk --params when placement is required.
  6. Create the panel object with idmp-cli panel panels create --ack-risk --params, then reread with idmp-cli panel panels get --params.
  7. Validate query behavior in three separate branches: use idmp-cli panel panels query --ack-risk --params and idmp-cli panel panels sqls --ack-risk --params for the full panel DTO, use idmp-cli panel verify create --ack-risk --data only for time-range validation, and use idmp-cli panel verify create-post --ack-risk --params only for the advanced child-scope fallback DTO. In the current generated schema, panel.panels.query is readonly so --ack-risk is optional there, but panel.panels.sqls and both panel.verify.* commands are still generated as write-risk commands and keep --ack-risk. If the no-code child-scope DTO collapses on reread or returns empty-body 400, keep the verified SQL and persist the advanced fallback instead of restarting the workflow.
  8. Attach or update placement with idmp-cli dashboard dashboards update --ack-risk --params after the panel is stable.

Exception paths

  • If child-scope query results collapse or SQL is empty, stop and switch to the advanced fallback deliberately.
  • If the AI panel draft is malformed, unsuitable for the owner scope, or cannot survive get/query/sqls rereads, stop using that draft and continue with the structured DTO family.
  • Do not mix dashboard refresh settings into the panel DTO.
  • If the advanced fallback rereads with enableAdvanced=true and the SQL still matches the intended child scope, count the workflow as successful even when the original no-code DTO did not survive reread.
  • Delete temporary dashboard shells or panels when the workflow is only exploratory.

Validation scenarios

1. Leaf self query-backed panel

Use idmp-cli panel panels create --ack-risk --params, then idmp-cli panel panels get --params. The persisted panel must still query and render on reread.

2. Middle self query-backed panel

Keep the same panel DTO family, but verify the middle owner really has metric-bearing context. Query and SQL reads should still succeed.

3. Middle child aggregation with advanced-query fallback

Use idmp-cli panel panels sqls --ack-risk --params first, then idmp-cli panel verify create-post --ack-risk --params. Persist only after the advanced payload is verified, and treat that advanced persistence as the success path whenever the original no-code child-scope DTO collapses on reread.

4. Text or manual panel shell

If no SQL-backed panel is needed, keep the object simple and skip advanced verification. The panel still needs a reread after create.

5. Panel plus dashboard placement and cleanup

After idmp-cli dashboard dashboards update --ack-risk --params, reread the dashboard after dashboard.dashboards.update. Remove temporary shells if the workflow was only a probe.

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