🔄preset-cli-mutations
- プラグイン
- preset-cli-skills
- ソース
- GitHub で見る ↗
説明
状態を変更する定型的な `sup` コマンドラインワークフロー:グラフ・ダッシュボード・データセットのプッシュ、ユーザーのプッシュ/招待、破壊的な操作フラグ、およびワークスペース間の同期に対応しています。 **使用場合:** - CLI(コマンドラインインターフェース)による変更系ワークフローのみ - MCP単独での処理には使用しないこと - HTTP/SDK(プログラムライブラリ)による直接的な変更には使用しないこと
原文を表示
State-changing Preset `sup` CLI workflows: chart/dashboard/dataset push, user push/invite, destructive flags, and cross-workspace sync. Use only for CLI mutation workflows. Do not use for MCP-only work. Do not use for direct HTTP/SDK mutations.
ユースケース
- ✓グラフ・ダッシュボード・データセットをプッシュするとき
- ✓ユーザーをプッシュ/招待するとき
- ✓破壊的な操作を実行するとき
- ✓ワークスペース間で同期するとき
- ✓CLIによる状態変更ワークフロー
本文(日本語訳)
preset-cli-mutations
状態を変更するCLI操作に使用: 単一のワークスペース内での書き込み(push、--force、--overwrite)とワークスペース間のプロモーション(sync)。
常に実施すること
- 認証、ワークスペース、出力コンテキストを確立するために、まず
preset-cliを使用します。 - CLIの状態変更操作のみが対象です。HTTP経由の状態変更操作は
preset-api-skillsにルーティングしてください。 - 実行前に必ずプレビューを実施:
sup sync run、sup user push、sup user inviteはネイティブの--dry-runオプション、sup chart push/sup dashboard push/sup dataset pushは差分確認(ネイティブの--dry-runなし)を使用してください。 - ワークスペース間の操作を行う前に、送信元と送信先のワークスペースを明確に特定してください。
- 該当する場合は、
--force/--overwriteフラグの文字列を含む明示的で具体的なユーザー確認を取得してください。 - トランスクリプト内のトークンと認証情報を含む出力を削除してください。
判定ルール
- 単一ワークスペース内の書き込み(
sup chart/dashboard/dataset push)とワークスペース間のsync(sup sync run)を区別してください。 --forceと--overwriteを危険性の高いフラグとして扱い、明示的なフラグごとの確認なしに実行しないでください。- このドキュメントに名前が挙がっていない状態変更コマンドについては、コマンドの対応状況を確認し、そのコマンドが状態変更操作として明確にマークされていない場合は処理を中止してください。
- CI(継続的インテグレーション)や自動化のコンテキストで確認ステップをスキップしないでください。対話的なオペレーターが利用できない場合は拒否してください。
- HTTP経由の状態変更操作はAPIプラグインへ、MCPワークフローはMCPプラグインへルーティングしてください。
ワークフローの順序
- 送信元のワークスペースと(ワークスペース間の場合は)送信先のワークスペースを確認します。
- コマンドが対応している場合は、プレビューの前に設定を検証します(例:
sup sync validate)。 - プレビュー/差分確認で変更内容を明らかにします。
- アセット数、対象への影響、ロールバックの可能性、危険性の高いフラグを要約します。
- 危険性の高いフラグの文字列を含む具体的な確認を求めます。
- 確認を受け取るまで実行前に停止します。
- 確認後にのみ実行します。
参考資料
- 単一ワークスペース内の書き込み(push、
--overwrite、--force、依存関係の処理): references/write-operations.md - ワークスペース間のプロモーション(sync、送信元/送信先、Jinja2、
--dry-run): references/cross-workspace-sync.md - Syncのテンプレート化、ロールバック、複数対象のリスク: references/sync-templating-and-rollback.md
- プレビューとdry-runの扱い: references/preview-and-dry-run.md
- 確認テンプレートと処理中止のトリガー: references/confirmation-template.md
- 確認の概要と監査期待事項: references/confirmation-and-dry-run.md
- 登録済みコマンドの対応状況と非対応の状態変更操作のルーティング:
preset-cliを読み込んでから references/command-coverage.md を参照してください。 - 承認ゲート、出力削除、処理中止のトリガー:
preset-cliを読み込んでから references/safety-policy.md を参照してください。
原文(English)を表示
preset-cli-mutations
Use for state-changing CLI operations: single-workspace writes (push, --force, --overwrite) and cross-workspace promotion (sync).
Always
- Use
preset-clifirst to establish auth, workspace, and output context. - CLI mutation surface only; route HTTP mutations to
preset-api-skills. - Preview before execution: native
--dry-runforsup sync run,sup user push, andsup user invite; pull-and-diff forsup chart push/sup dashboard push/sup dataset push(no native--dry-run). - Identify source AND target workspace explicitly before any cross-workspace operation.
- Require explicit typed user confirmation that contains the literal
--force/--overwriteflag string when applicable. - Redact tokens and credential-bearing output in transcripts.
Decision Rules
- Distinguish single-workspace writes (
sup chart/dashboard/dataset push) from cross-workspace sync (sup sync run). - Treat
--forceand--overwriteas destructive flags; never invoke without explicit per-flag confirmation. - For mutating command groups not named on this card, load command coverage and stop unless it explicitly marks the command as mutation-gated.
- Do not let CI / automation context bypass the confirmation step; refuse if no interactive operator is available.
- Route HTTP mutations to the API plugin; route MCP-driven workflows to the MCP plugin.
Workflow Order
- Resolve source and (if cross-workspace) target workspace.
- Validate configuration where the command supports it (e.g.
sup sync validate) before previewing. - Preview / diff to surface what will change.
- Summarize asset counts, target effects, rollback expectations, and any destructive flags.
- Ask for typed confirmation containing the literal destructive flag string.
- Stop before execution and wait for the typed confirmation.
- Execute only after confirmation.
Retrieve
- Single-workspace writes (push,
--overwrite,--force, dependency handling): references/write-operations.md - Cross-workspace promotion (sync, source/target, Jinja2,
--dry-run): references/cross-workspace-sync.md - Sync templating, rollback, and multi-target risk: references/sync-templating-and-rollback.md
- Preview and dry-run handling: references/preview-and-dry-run.md
- Confirmation template and abort triggers: references/confirmation-template.md
- Confirmation overview and audit expectations: references/confirmation-and-dry-run.md
- Registered command coverage and uncovered mutation routing: load
preset-cliand thenreferences/command-coverage.md. - Approval gates, redaction, abort triggers: load
preset-cliand thenreferences/safety-policy.md.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。