شعار Business Rule

Business Rule

المجتمع
jdm4pku
business-rule

Document business rules as structured, traceable specifications separate from functional requirements. Use when capturing organizational policies, regulations, calculations, or constraints that govern system behavior.

نظرة عامة

الناشرjdm4pku
المستودعRE-Skills
اسم المهارةbusiness-rule
النجوم
27
التفريعات
1
الملفات المرفقة
2
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 2

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها jdm4pku على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Business Rule في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/business-rule
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
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/business-rule .claude/skills/business-rule
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Business Rule في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Business Rule تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Business Rule بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Purpose

Identify, classify, and document business rules that constrain or govern system behavior. Business rules exist independently of any software system -- they are organizational policies, regulations, mathematical formulas, and domain constraints. Use this to separate the enduring business logic from transient implementation details, ensuring rules are maintained, traced, and consistently applied across multiple features and use cases.

This is not a requirements specification -- it is a reference catalog. Business rules feed into functional requirements, use cases, and acceptance criteria but live in their own managed collection.

Key Concepts

What Is a Business Rule?

A business rule is a statement that defines or constrains some aspect of the business. It exists whether or not software is built. Examples:

  • "Orders over $10,000 require VP approval" (policy)
  • "Sales tax is 8.25% in Texas" (fact)
  • "A customer with 3 consecutive late payments is classified as high-risk" (inference)
  • "Shipping cost = base rate + (weight * per-pound rate) + surcharge" (computation)

Business Rule Taxonomy

TypeDefinitionExample
FactA statement that is always true in the domain"A purchase order must reference exactly one supplier"
ConstraintA restriction on what the system or users can do"An employee cannot approve their own expense report"
Action EnablerA condition that triggers or permits an action"If inventory drops below reorder point, generate purchase order"
InferenceA rule that derives new facts from existing ones"A customer with order total > $50K/year qualifies for Gold tier"
ComputationA mathematical formula or algorithm"Discount = base_price * tier_discount_rate * volume_multiplier"

Business Rules vs. Requirements

  • Business rule: "Orders over $10,000 require VP approval" (policy statement)
  • Functional requirement: "The system shall route orders exceeding $10,000 to the VP approval queue and shall not process them until VP approval is recorded" (system behavior implementing the rule)

The business rule is the why. The requirement is the what the system does about it.

Origin of Business Rules

Business rules come from:

  • Company policies and procedures
  • Government regulations and industry standards
  • Contractual obligations
  • Domain knowledge (how the business works)
  • Management decisions

Anti-Patterns

  • Embedding rules in code -- Rules scattered across source code files with no central catalog. When the rule changes, developers hunt through code to find all instances.
  • Rules inside requirements -- Business rules mixed into SRS text. When a rule changes, you update multiple requirements instead of one rule.
  • Undocumented rules -- "Everyone just knows" that orders over $10K need VP approval. Until someone new joins.

Application

Use template.md for the fill-in structure.

Step 1: Identify Business Rules

During elicitation, listen for:

  • "We always..." / "We never..."
  • "The policy is..."
  • "By law, we must..."
  • "The formula for X is..."
  • "If X happens, then Y must..."
  • "Only people with role X can do Y"

Sources to mine:

  • Company policy manuals
  • Regulatory documents
  • Existing system documentation
  • Domain expert interviews
  • Current business process descriptions

Step 2: Classify Each Rule

For each identified rule, determine its type (Fact, Constraint, Action Enabler, Inference, or Computation) and assign a unique ID:

BR-001 [Constraint]: An employee cannot approve their own expense report.
BR-002 [Computation]: Sales tax = subtotal * jurisdiction_tax_rate.
BR-003 [Action Enabler]: When inventory quantity falls below the reorder
       point, the system shall generate a purchase requisition.
BR-004 [Inference]: A customer is classified as "Premium" if their
       rolling 12-month purchase total exceeds $100,000.
BR-005 [Fact]: Every product belongs to exactly one product category.

Step 3: Document Each Rule

For each business rule, capture:

  • Rule ID -- Unique identifier (BR-001, BR-002, etc.)
  • Rule Name -- Short descriptive name
  • Type -- Fact / Constraint / Action Enabler / Inference / Computation
  • Statement -- The rule in precise natural language
  • Source -- Where this rule comes from (policy doc, regulation, SME)
  • Rationale -- Why this rule exists
  • Related Requirements -- Which functional requirements implement this rule
  • Related Use Cases -- Which use cases reference this rule
  • Volatility -- How often this rule changes (Stable / Annual / Frequent)
  • Effective Date -- When this rule takes effect (important for regulatory rules)

Step 4: Validate Rules

For each rule, verify:

  • The rule is stated precisely (no ambiguity)
  • The source is authoritative
  • The rule does not conflict with other rules
  • Stakeholders agree on the rule's correctness
  • The volatility assessment is realistic

Step 5: Trace Rules to Requirements

Create a traceability cross-reference:

  • Each business rule should trace forward to at least one functional requirement
  • Each functional requirement that implements a business rule should trace back to it
  • When a business rule changes, the trace tells you exactly which requirements to update

Examples

See examples/sample.md for a complete business rule catalog.

Mini example excerpt:

markdown
### BR-007: Late Payment Classification
- **Type:** Inference
- **Statement:** A customer with 3 or more consecutive invoices unpaid
  past 30 days is classified as "Payment Risk."
- **Source:** Finance Policy Manual, Section 4.3 (updated 2024-01)
- **Rationale:** Triggers credit review before processing new orders
- **Related Requirements:** FR-42, FR-43
- **Volatility:** Annual (reviewed each fiscal year)

### BR-012: Controlled Substance Logging
- **Type:** Constraint
- **Statement:** Every dispensation of a Schedule II-V controlled substance
  must be logged in the DEA register within 24 hours of dispensation.
- **Source:** DEA 21 CFR 1304 (federal regulation)
- **Rationale:** Federal law compliance; violation can result in license revocation
- **Related Requirements:** FR-88, FR-89, FR-90
- **Volatility:** Stable (regulatory, changes infrequently)

Common Pitfalls

Pitfall 1: Rules Buried in Requirements

Symptom: A functional requirement says "The system shall not allow employees to approve their own expense reports because company policy prohibits self-approval."

Consequence: The rule ("no self-approval") is tangled with the implementation. If the policy changes, you hunt through the SRS to find it.

Fix: Separate: BR-001 states the rule; FR-55 states what the system does about it; FR-55 references BR-001.


Pitfall 2: Ambiguous Rule Statements

Symptom: "Large orders need manager approval."

Consequence: What is "large"? $1,000? $10,000? Which manager? The developer guesses.

Fix: Be precise: "Orders exceeding $10,000 require approval from the department VP or higher, recorded in the system before the order can be submitted to the supplier."


Pitfall 3: Conflicting Rules

Symptom: BR-003 says "Free shipping for orders over $100" and BR-015 says "Hazardous materials always incur a $25 shipping surcharge."

Consequence: What happens when someone orders $150 of hazardous material? Nobody knows until it hits production.

Fix: Review rules pairwise for conflicts. Document precedence: "BR-015 takes precedence over BR-003 for hazardous materials."


Pitfall 4: No Volatility Tracking

Symptom: All rules are treated as permanent.

Consequence: Regulatory rules change annually but nobody reviews them. The system falls out of compliance.

Fix: Tag each rule with volatility (Stable / Annual / Frequent) and schedule reviews accordingly.

References

Related Skills

  • skills/use-case/SKILL.md -- Business rules are referenced within use case steps
  • skills/srs-document/SKILL.md -- Business rules are documented as a section of the SRS
  • skills/decision-table/SKILL.md -- Complex business rules with multiple conditions can be expressed as decision tables
  • skills/requirements-traceability/SKILL.md -- Rules trace to functional requirements

External Frameworks

  • Business Rules Group, Defining Business Rules: What Are They Really? (2000)
  • Ronald Ross, Principles of the Business Rule Approach (2003)
  • Karl Wiegers & Joy Beatty, Software Requirements, Third Edition (2013) -- Chapter 9: Playing by the Rules

Skill type: Component Dependencies: None (foundational skill) Used by: skills/use-case/SKILL.md, skills/srs-document/SKILL.md, skills/decision-table/SKILL.md

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Business Rule؟

Document business rules as structured, traceable specifications separate from functional requirements. Use when capturing organizational policies, regulations, calculations, or constraints that govern system behavior.

لماذا تستخدم Business Rule على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Business Rule عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Business Rule في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/jdm4pku/RE-Skills/tree/main/skills/business-rule. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Business Rule؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Business Rule؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Business Rule معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Business Rule مجانية؟

نشرها jdm4pku على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇