Логотип 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

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 2

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: jdm4pku. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Decision Table у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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

Увімкніть навичку Decision Table в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Decision Table, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Decision Table не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл 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

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ 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.

Навіщо використовувати Decision Table у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Decision Table — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Decision Table у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/jdm4pku/RE-Skills/tree/main/skills/decision-table. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Decision Table?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Decision Table?

Зі скількома забажаєте. У TypingMind ви можете використовувати Decision Table із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Decision Table?

На GitHub цю навичку публікує jdm4pku. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇