Logo vun Decision Table

Decision Table

Communautéit
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.

Iwwersiicht

Editeurjdm4pku
RepositoryRE-Skills
Skill-Nummdecision-table
Stären
27
Forks
1
Matgeliwwert Fichieren
2
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum jdm4pku op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Decision Table an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Decision Table an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Decision Table automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Decision Table net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Decision Table op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Decision Table besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Decision Table an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Decision Table benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Decision Table benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Decision Table domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Decision Table gratis?

De Skill gëtt vum jdm4pku op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇