Decision Tableのロゴ

Decision Table

コミュニティ
jdm4pku
decision-table

Create decision tables and decision trees to specify complex business logic with multiple conditions and outcomes. Use when requirements involve combinatorial logic that is error-prone to express in prose.

概要

公開者jdm4pku
リポジトリRE-Skills
スキル名decision-table
スター
27
フォーク
1
同梱ファイル
2
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    jdm4pkuがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Decision Table」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jdm4pku/RE-Skills.git /tmp/RE-Skills
mkdir -p .claude/skills
cp -r /tmp/RE-Skills/skills/decision-table .claude/skills/decision-table
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDecision Tableを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDecision Tableを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Decision Tableは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Purpose

Express complex business logic as decision tables or decision trees. Use this when multiple interacting conditions determine system behavior, and prose requirements would be ambiguous or incomplete.

Decision tables guarantee completeness. If you have N binary conditions, the table has 2^N columns. Every column gets a defined action. No gaps, no ambiguity.

Key Concepts

Decision Table Structure

Rule 1Rule 2Rule 3Rule 4
Conditions
Condition A?YYNN
Condition B?YNYN
Actions
Action XXX
Action YXX
  • Conditions (upper half): Input conditions that can be true or false
  • Actions (lower half): System behaviors triggered by condition combinations
  • Rules (columns): Each unique combination of conditions and its resulting actions
  • X marks which actions execute for each rule

Decision Table Types

Limited-entry: Conditions are binary (Y/N). Full coverage = 2^N rules.

Extended-entry: Conditions have multiple values (e.g., "Order total: <$50 / $50-$100 / >$100"). More compact but harder to verify completeness.

Decision Tree (Alternative Representation)

A decision tree shows the same logic as a branching diagram:

Order total?
├── < $50
│   └── Shipping: Standard ($5)
├── $50 - $100
│   ├── Member? 
│   │   ├── Yes -> Shipping: Free
│   │   └── No -> Shipping: Reduced ($3)
└── > $100
    └── Shipping: Free

When to use which:

  • Decision table -- When completeness checking is critical (regulated, safety). Tables make gaps visible.
  • Decision tree -- When the logic is hierarchical and some conditions only matter in certain branches. Trees are more readable for stakeholders.

Completeness Check

For a limited-entry decision table with N conditions:

  • Expected number of rules = 2^N
  • If you have fewer rules, either:
    • Some combinations are consolidated (marked with "--" meaning "don't care")
    • Some combinations are missing (a bug)

Anti-Patterns

  • The Missing Column -- Not accounting for all condition combinations. This is the exact bug decision tables prevent.
  • Ambiguous Conditions -- "Large order" instead of "Order total > $100." Conditions must be precise and binary.
  • Redundant Rules -- Two columns with identical conditions but different actions. This is a contradiction.

Application

Step 1: Identify the Decision

Look for requirements with language like:

  • "If X and Y, then..."
  • "Depending on..."
  • "When A but not B..."
  • Multiple nested if-then-else statements

Step 2: List All Conditions

Extract every condition that affects the outcome. Phrase each as a yes/no question for limited-entry tables.

Example conditions:

  • Is the order total >= $100?
  • Is the customer a member?
  • Is the shipping address domestic?

Step 3: List All Possible Actions

List every possible system action:

  • Apply free shipping
  • Apply standard shipping rate
  • Apply international surcharge
  • Send membership discount offer

Step 4: Build the Table

  1. Calculate rules: 2^N for N binary conditions (2^3 = 8 rules for 3 conditions)
  2. Fill in condition combinations systematically (alternate Y/N to ensure completeness)
  3. For each rule, mark which actions apply

Step 5: Simplify (Optional)

Look for conditions that do not matter for certain rules. If the action is the same regardless of Condition C's value, consolidate two rules into one with "--" for Condition C.

Step 6: Validate

  • Number of rules = 2^N (or fewer with documented consolidation)
  • Every rule has at least one action
  • No two rules have identical condition combinations (no duplicates)
  • No two rules have the same conditions but different actions (no contradictions)
  • Review with domain expert: "For this combination, is this the right action?"

Examples

See examples/sample.md for complete decision tables.

Mini example:

markdown
## Chemical Disposal Authorization

| | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
|---|--------|--------|--------|--------|
| **Conditions** | | | | |
| Chemical is hazardous? | Y | Y | N | N |
| Quantity > 5 kg? | Y | N | Y | N |
| **Actions** | | | | |
| Require EHS officer approval | X | X | | |
| Require lab director approval | X | | | |
| Technician can self-authorize | | | X | X |
| Generate hazmat disposal form | X | X | | |
| Generate standard disposal form | | | X | X |

Common Pitfalls

Pitfall 1: Incomplete Table

Symptom: The table has 6 rules for 3 binary conditions (should be 8).

Consequence: Two combinations have no defined behavior. When they occur in production, the system does something unpredictable.

Fix: Always calculate 2^N and account for every combination. If two rules are identical, consolidate explicitly with "--" for the irrelevant condition.


Pitfall 2: Contradictory Rules

Symptom: Two rules have the same condition values but specify different actions.

Consequence: The requirement is contradictory. Developers pick one; it may be wrong.

Fix: Review contradictions with domain experts. One rule is wrong -- find out which.


Pitfall 3: Conditions Are Not Binary

Symptom: "Customer type: Gold / Silver / Bronze" in a limited-entry table.

Consequence: The table is incomplete because multi-valued conditions do not fit the Y/N format.

Fix: Either use extended-entry tables, or convert to binary: "Is customer Gold?", "Is customer Silver?" (with constraint that only one can be true).

References

Related Skills

  • skills/business-rule/SKILL.md -- Decision tables implement complex business rules
  • skills/srs-document/SKILL.md -- Decision tables appear in SRS Appendix B (Analysis Models)
  • skills/acceptance-criteria/SKILL.md -- Decision table rules map directly to acceptance criteria
  • skills/requirements-analysis-process/SKILL.md -- Decision table analysis is part of the analysis workflow

External Frameworks

  • Karl Wiegers & Joy Beatty, Software Requirements, Third Edition (2013) -- Chapter 12
  • Systematic Software Testing (2002) -- Decision table testing technique

Skill type: Component Dependencies: References skills/business-rule/SKILL.md Used by: skills/srs-document/SKILL.md, skills/requirements-analysis-process/SKILL.md

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Decision Table」では何ができますか?

Create decision tables and decision trees to specify complex business logic with multiple conditions and outcomes. Use when requirements involve combinatorial logic that is error-prone to express in prose.

TypingMindでDecision Tableを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Decision Tableはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDecision Tableをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-tableを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Decision Tableを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Decision Tableで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDecision Tableを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Decision Table」は無料ですか?

jdm4pkuがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇