Decision Table logo

Decision Table

Community
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.

Overview

Publisherjdm4pku
RepositoryRE-Skills
Skill namedecision-table
Stars
27
Forks
1
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jdm4pku on GitHub. Read the source before you install it.

Installation

Install the Decision Table AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Decision Table in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Decision Table on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Decision Table is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Decision Table AI skill do?

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.

Why use Decision Table on TypingMind?

Because you install it once and use it with any model. Decision Table is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Decision Table in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Decision Table?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Decision Table?

As many as you like. As long as a model supports skills, you can use Decision Table with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Decision Table AI skill free?

It is published on GitHub by jdm4pku. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇