Claude
Skills
Sign in
Back

business-rules-analysis

Included with Lifetime
$97 forever

Business rules elicitation and analysis techniques. Covers rule types (constraints, derivations, inferences), decision tables, rule templates, and policy documentation. Use when identifying business policies, constraints, calculations, and decision logic during requirements elicitation.

General

What this skill does


# Business Rules Analysis

Comprehensive framework for eliciting, documenting, and validating business rules during requirements discovery.

## When to Use This Skill

**Keywords:** business rules, policies, constraints, calculations, derivations, inferences, decision tables, decision logic, rule templates, validation rules, authorization rules, computation rules, condition-action, if-then rules

**Use this skill when:**

- Identifying business policies and constraints
- Documenting calculation and derivation rules
- Creating decision tables for complex logic
- Eliciting authorization and validation rules
- Translating policies into requirement statements
- Analyzing rule interactions and conflicts
- Validating rule completeness and consistency

## Business Rule Categories

### Structural Rules (Facts)

Define the nature of things and relationships:

```yaml
structural_rules:
  definition: "Rules that define terms, concepts, and their relationships"

  types:
    terms:
      description: "Definitions of business concepts"
      example: "A 'Premium Customer' is a customer who has spent more than $10,000 in the last 12 months"

    facts:
      description: "Assertions about the business domain"
      example: "Each Order must have exactly one Customer"

    relationships:
      description: "How concepts relate to each other"
      example: "A Customer may have zero or more Orders"

  documentation_template:
    term: "{Term} is defined as {definition}"
    fact: "{Subject} {verb} {object}"
    relationship: "{Entity A} {cardinality} {Entity B}"
```

### Derivation Rules (Computations)

Calculate or derive values from other data:

```yaml
derivation_rules:
  definition: "Rules that compute values from other information"

  types:
    calculations:
      description: "Mathematical computations"
      example: "Order Total = Sum of (Line Item Quantity × Unit Price)"

    aggregations:
      description: "Summary calculations across sets"
      example: "Monthly Revenue = Sum of all Order Totals for the month"

    transformations:
      description: "Data conversions"
      example: "Full Name = First Name + ' ' + Last Name"

  documentation_template:
    calculation: "{Result} = {formula}"
    with_conditions: "IF {condition} THEN {Result} = {formula}"
```

### Constraint Rules (Restrictions)

Limit what can happen or exist:

```yaml
constraint_rules:
  definition: "Rules that restrict or mandate conditions"

  types:
    mandatory:
      description: "Must always be true"
      example: "Every Order must have at least one Line Item"

    prohibited:
      description: "Must never occur"
      example: "An Order cannot be shipped to a country on the embargo list"

    conditional:
      description: "Restrictions that apply under certain conditions"
      example: "IF Customer is under 18 THEN alcohol products cannot be ordered"

    range:
      description: "Numeric or value boundaries"
      example: "Order Quantity must be between 1 and 999"

  documentation_template:
    must: "{Subject} must {condition}"
    must_not: "{Subject} must not {condition}"
    if_then: "IF {condition} THEN {subject} {must/must not} {action}"
```

### Action Rules (Behaviors)

Define what should happen when conditions are met:

```yaml
action_rules:
  definition: "Rules that trigger actions based on conditions"

  types:
    authorization:
      description: "Who can do what"
      example: "Only Managers can approve orders over $5,000"

    triggers:
      description: "Events that initiate actions"
      example: "When inventory falls below reorder point, create purchase order"

    workflows:
      description: "Sequences of actions"
      example: "After order is placed, send confirmation email, then notify warehouse"

  documentation_template:
    authorization: "{Role} may/must/must not {action} {object} [when {condition}]"
    trigger: "WHEN {event} THEN {action}"
    workflow: "AFTER {event}, {action1}, THEN {action2}"
```

### Inference Rules (Deductions)

Derive new facts from existing information:

```yaml
inference_rules:
  definition: "Rules that infer new information from existing facts"

  types:
    classification:
      description: "Categorize based on criteria"
      example: "IF Customer lifetime value > $50,000 THEN Customer is 'VIP'"

    status:
      description: "Determine state based on conditions"
      example: "IF all line items shipped THEN Order status is 'Complete'"

    eligibility:
      description: "Determine if conditions are met"
      example: "Customer is eligible for discount IF loyalty points > 1000"

  documentation_template:
    inference: "IF {conditions} THEN {conclusion}"
    classification: "{Entity} is classified as {category} WHEN {criteria}"
```

## Decision Tables

For complex rules with multiple conditions:

```yaml
decision_table:
  structure:
    conditions: "Rows listing input conditions"
    actions: "Rows listing possible actions"
    rules: "Columns combining conditions and actions"

  example:
    name: "Order Discount Rules"
    conditions:
      C1: "Customer Type"
      C2: "Order Amount"
      C3: "Payment Method"

    actions:
      A1: "Apply Discount %"
      A2: "Free Shipping"

    rules:
      R1:
        C1: "VIP"
        C2: "> $500"
        C3: "Any"
        A1: "20%"
        A2: "Yes"

      R2:
        C1: "Regular"
        C2: "> $100"
        C3: "Credit Card"
        A1: "10%"
        A2: "No"

      R3:
        C1: "Any"
        C2: "Any"
        C3: "Any"
        A1: "0%"
        A2: "No"
```

### Decision Table Template

```text
┌─────────────────────────────────────────────────────────────┐
│ Decision Table: {Name}                                      │
├─────────────────┬───────┬───────┬───────┬───────┬───────────┤
│ CONDITIONS      │  R1   │  R2   │  R3   │  R4   │  Default  │
├─────────────────┼───────┼───────┼───────┼───────┼───────────┤
│ {Condition 1}   │   Y   │   Y   │   N   │   N   │     -     │
│ {Condition 2}   │   Y   │   N   │   Y   │   N   │     -     │
├─────────────────┼───────┼───────┼───────┼───────┼───────────┤
│ ACTIONS         │       │       │       │       │           │
├─────────────────┼───────┼───────┼───────┼───────┼───────────┤
│ {Action 1}      │   X   │       │   X   │       │           │
│ {Action 2}      │       │   X   │   X   │       │     X     │
└─────────────────┴───────┴───────┴───────┴───────┴───────────┘
```

## Rule Documentation Templates

### Standard Rule Template

```yaml
rule_template:
  id: "BR-{domain}-{number}"
  name: "{descriptive name}"
  category: "constraint|derivation|inference|action|structural"
  statement: "{clear, unambiguous rule statement}"

  source:
    origin: "{stakeholder, document, regulation}"
    date: "{when identified}"
    authority: "{who can change this rule}"

  conditions:
    - "{condition 1}"
    - "{condition 2}"

  actions:
    - "{action if conditions met}"

  exceptions:
    - "{exception case}"

  examples:
    positive:
      - "{example where rule applies}"
    negative:
      - "{example where rule does not apply}"

  related_rules:
    - "{BR-xxx}"

  validation:
    testable: true
    test_approach: "{how to verify}"

  metadata:
    priority: "high|medium|low"
    volatility: "stable|volatile"
    enforcement: "automatic|manual"
```

### SBVR-Style Template

Semantics of Business Vocabulary and Business Rules (OMG standard):

```yaml
sbvr_template:
  vocabulary:
    term: "{term}"
    definition: "{meaning in business context}"

  structural_rule:
    format: "It is obligatory/permitted/forbidden that {statement}"
    example: "It is obligatory that each order has at least one line item"

  operative_rule:
    format: "If {condition} then {consequence}"
    example: "If order total exceeds $1000 then manager approval is required"
```

## Elicitation Techniques

### Rule Discovery Questions

```yaml
discovery_questions:
  constraints:
    - "What must always be true?"
    - "What must never happen?

Related in General