بنقرة واحدة
diagram-craft
報告書・説明文書で図を使うか判断する際、図を設計する際、frontmatter の figures 宣言を書く際に発火する。図トリガー表・定量上限・雛形で「認知負荷を減らす図」を設計する
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
報告書・説明文書で図を使うか判断する際、図を設計する際、frontmatter の figures 宣言を書く際に発火する。図トリガー表・定量上限・雛形で「認知負荷を減らす図」を設計する
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Fires when deciding whether a report or explanatory document needs figures, when designing a figure, or when writing the figures declaration in frontmatter. Designs cognitive-load-reducing figures via the trigger table, quantitative limits, and templates
Fires when generating or verifying deterministic HTML from report MDs. Runs render / verify / lint / selftest / check via the bundled md2html.cjs
Fires when producing a report or completion notice. Generates a report that includes the interlock verification section.
Discipline for preventing the stop bug (malformed tool call -> self-priming). Fires when the stopbug-observe hook emits a trip-wire (migration advice) or the time-based timer (calibration prompt), or as a minimal focus-check right before heavy processing.
報告書 MD から決定論 HTML を生成・検証する際に発火する。md2html.cjs(同梱)で render / verify / lint / selftest / check を実行する
報告書・完了報告を出力する際に発火する。インターロック検証欄を含む報告書を生成する
| name | diagram-craft |
| description | 報告書・説明文書で図を使うか判断する際、図を設計する際、frontmatter の figures 宣言を書く際に発火する。図トリガー表・定量上限・雛形で「認知負荷を減らす図」を設計する |
図は情報を「増やす装飾」ではなく「減らす道具」。1図1メッセージ。 読者がどこを見れば判断できるかを最短にすることだけが図の目的である。
figures: 宣言を書く時本文を書き始める前に、図トリガー表(§2)に当てて使う図を決め、frontmatter に宣言する:
figures: [da-table, where-map] # 使う図種: da-table / where-map / flow / state / arch-svg
# 図を使わない場合(figures_reason の例: 選択肢比較なし・影響範囲は単一モジュール):
figures: none
figures_reason: <省略理由を 1 行で>
黙って図なしは禁止。省略にも理由 1 行のコストを払う(負の宣言)。
md2html.cjs --lint が宣言-実体一致を双方向に機械検査する: 宣言した図種の実体が本文に無い場合、および本文の mermaid/svg 図が未宣言(none 含む)の場合は exit 1 でブロック。数値列表のみ warning(任意の数値列にバーが自動描画されるため)。
| 状況 | 推奨図 | 使う条件 | 使わない条件 |
|---|---|---|---|
| 選択肢比較 | DA 表+比例バー (da-table) | 選択肢 2 件以上で判断を求める | 既に選択済みで比較不要 |
| 現在地・影響範囲 | mermaid ツリー+現在地ハイライト (where-map) | 複数モジュール・複数層(3 領域以上) | 変更ファイル 1〜2 個で単純 |
| 手順・処理順 | mermaid flowchart LR (flow) | 3 ステップ以上 or 分岐あり | 直列 2 ステップ以下 |
| 状態遷移 | mermaid stateDiagram (state) | 状態 3 個以上、戻り・失敗・再試行あり | 単なる成功/失敗のみ |
| システム構成 | SVG (arch-svg) | 境界・責務・外部依存が主役 | mermaid で足りる場合 |
| 原因分析 | mermaid graph TD (flow) | 原因が分岐・階層化 | 原因が 1 つだけ |
| 実装差分・ファイル一覧 | 図にしない(テキスト) | — | 図はソースの劣化コピーになる |
図種選択の優先順位: ①比較→da-table ②状態→state ③手順/依存→flow ④境界/配置→arch-svg ⑤どれでもない→図なし(理由明記)。
templates/palette.md の固定パレットのみ使用(ダークテーマ前提・決定論)。
役割区別を厳守: 意味色(推奨・リスク等 = 状態の意味)と、DA バーの値依存グラデ(値の大小位置のみ = 意味中立)は別系統。混用しない。
| ファイル | 図種 |
|---|---|
templates/palette.md | 意味色パレット + classDef 雛形 + バー値グラデ仕様 |
templates/where-map.md | 現在地ツリー |
templates/da-table.md | DA 表(評価軸方向の規約ポインタ付き) |
templates/flow.md | 手順フロー |
templates/state.md | 状態遷移 |
templates/arch-svg.md | 構成図 SVG スケルトン |
figures: none + figures_reason: で理由を明記する--lint exit 1 を放置)