ワンクリックで
ba-business-rules
[Agentic] Business Rules Management - decision tables, decision trees, rule catalog, conflict detection
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
[Agentic] Business Rules Management - decision tables, decision trees, rule catalog, conflict detection
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
[Meta] How to use BA-Kit effectively. Use when starting with BA-Kit, unsure which agent to invoke, or when an AI agent needs to map user intent to the right skill.
[Agentic] Agile BA Practices - User Story Mapping, MVP Definition, Hypothesis-Driven Development
[Agentic] Change Management - ADKAR, readiness assessment, training needs, go-live planning, benefits realization
[Agentic] Communication & Reporting - audience-adapted messaging, status reports, executive summaries
[Agentic] Conflict Resolution & Negotiation - resolve stakeholder disagreements (SKILL-06)
[Agentic] Confluence Integration Bridge — publish BA docs to Confluence, import existing pages, sync specs with Transport Gate reflection
| name | ba-business-rules |
| description | [Agentic] Business Rules Management - decision tables, decision trees, rule catalog, conflict detection |
| version | 1.0.0 |
If input is unclear, incomplete, or out-of-scope:
When NOT to use:
When activated via @ba-business-rules, perform the following cognitive loop:
| Rule Type | Definition | Representation | Example |
|---|---|---|---|
| Constraint | Limits on acceptable values or behavior | Decision Table, Text | "OT ≤ 4h/day, ≤ 200h/year" |
| Computation | Formula or calculation | Formula + example | "OT pay = hours × rate × 1.5" |
| Inference | If condition, then conclusion | Decision Tree | "If tenure > 5yr AND rating A → eligible for promotion" |
| Derivation | Value derived from other data | Derivation chain | "Work hours = check_out - check_in - break_duration" |
| Authorization | Who can do what | RBAC/ABAC matrix | "Only HR_MANAGER can approve OT > 2h" |
Generate the appropriate rule artifact:
Decision Table → For rules with multiple conditions and outcomes Decision Tree → For sequential branching logic Rule Catalog → For comprehensive rule inventory Rule Conflict Report → When reviewing existing rules
STOP & THINK. Validate your rule set:
Present the validated rule artifact with completeness status.
@ba-writing to embed these rules into User Story AC."@ba-validation to verify existing specs comply with these rules."@ba-test-gen to generate test cases covering all decision table rows."@ba-data to ensure database constraints match business rules."@ba-consistency to check rules across artifacts."| Rationalization | Reality |
|---|---|
| "Business rules are obvious" | Obvious rules hide edge cases. Decision table forces enumeration of all combinations, including the ones "everyone knows." |
| "Decision tables are too complex" | Complexity you avoid becomes complexity your code inherits — untested, undocumented, and wrong at 2am. |
| "Rules change too often to document" | High change velocity is the reason to catalog, not the excuse to skip it. Every change needs before/after snapshots. |
| "Rules are embedded in stories" | Embedded = scattered across 30 AC bullets. Catalog = single source of truth for dev, QA, legal, and auditors. |
After completing this skill's process, confirm:
# Decision Table: [Rule Name]
ID: [BR-XXX] | Source: [Policy/Regulation/SME] | Effective: [DD/MM/YYYY]
## Conditions & Actions
| # | Condition 1 | Condition 2 | Condition 3 | → Action |
|---|-----------|-----------|-----------|----------|
| 1 | Value A | Value X | Value P | Action 1 |
| 2 | Value A | Value X | Value Q | Action 2 |
| 3 | Value A | Value Y | Any | Action 3 |
| 4 | Value B | Any | Any | Action 4 |
Completeness: [N] rows / [Total possible combinations] = [X]%
Conflicts: [None detected / List conflicts]
graph TD
A[Start: OT Request Submitted] -->|Hours ≤ 2h| B{Approval Level}
A -->|Hours > 2h| C{Approval Level}
B --> D[Team Lead Approves]
C --> E[HR Manager Approves]
D -->|Approved| F[OT Scheduled]
D -->|Rejected| G[Notify Employee + Reason]
E -->|Approved| F
E -->|Rejected| G
# Business Rules Catalog: [Module/Domain]
Version: [X.Y] | Last Updated: [DD/MM/YYYY] | Owner: [Name]
| ID | Rule Name | Type | Statement | Source | Effective | Status |
|----|-----------|------|-----------|--------|-----------|--------|
| BR-001 | Max OT per day | Constraint | OT ≤ 4 hours per calendar day | Bộ Luật LĐ 2019, Đ.107 | 01/01/2020 | Active |
| BR-002 | OT pay calculation | Computation | OT_pay = hours × hourly_rate × 1.5 (weekday) / 2.0 (weekend) / 3.0 (holiday) | Bộ Luật LĐ 2019, Đ.98 | 01/01/2020 | Active |
| BR-003 | OT approval authority | Authorization | OT ≤ 2h: Team Lead. OT > 2h: HR Manager | Internal Policy HR-2024-03 | 01/03/2024 | Active |
## Rule Dependency Graph
- BR-002 depends on BR-001 (OT hours must be within limit before calculating pay)
- BR-003 depends on BR-001 (approval level determined by hours, which are capped by BR-001)
## Conflict Analysis
- ✅ No conflicts detected in current rule set
- ⚠️ Potential gap: No rule for OT request cancellation after approval
# Rule Conflict Report: [Domain]
Date: [DD/MM/YYYY] | Analyst: [Name]
## Conflicts Found
| # | Rule A | Rule B | Conflict Type | Description | Resolution |
|---|--------|--------|-------------|-----------|-----------|
| 1 | BR-001: Max 4h OT/day | BR-015: Night shift 12h allowed | Overlap | 12h night shift on 8h base = 4h OT, but what about breaks? | Clarify: break time excluded from OT calculation |
## Gaps Found
| # | Scenario | Missing Rule | Impact |
|---|----------|-------------|--------|
| 1 | Employee works at 2 sites same day | No rule for cross-site OT aggregation | OT could exceed daily limit undetected |
Tình huống: Decision Table cho quy trình phê duyệt điều chỉnh công.
# Decision Table: Attendance Adjustment Approval
ID: BR-ADJ-001 | Source: HR Policy 2024-05 | Effective: 01/04/2024
| # | Loại điều chỉnh | Thời gian submit | Lý do có evidence? | → Approver | → SLA |
|---|----------------|-----------------|-------------------|-----------|-------|
| 1 | Quên chấm công | ≤ 48h | Có (ảnh/mail xác nhận) | Team Lead | 24h |
| 2 | Quên chấm công | ≤ 48h | Không | Team Lead + HR | 48h |
| 3 | Quên chấm công | > 48h | Any | HR Manager | 72h |
| 4 | Lỗi hệ thống | Any | Có (log lỗi hệ thống) | Auto-approve | Instant |
| 5 | Lỗi hệ thống | Any | Không (tự khai) | Team Lead | 24h |
| 6 | Thay đổi ca | Any | Có (lịch ca mới) | Team Lead | 24h |
| 7 | Thay đổi ca | Any | Không | HR Manager | 48h |
Completeness: 7/7 scenarios covered (3 types × conditions)
Conflicts: None
Gap: Chưa có rule cho trường hợp cả Team Lead và HR Manager đều vắng → cần escalation rule
Before drafting, search for relevant knowledge:
run_command: python3 .agent/scripts/ba_search.py "<topic keywords>" --domain business-rulespython3 .agent/scripts/ba_search.py "<query>" --multi-domainActivation Phrase: "Rules Engine online. Describe the business logic or policy to document."