Logo de Business Rule

Business Rule

Comunidade
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.

Visão geral

Publicado porjdm4pku
RepositórioRE-Skills
Nome da habilidadebusiness-rule
Estrelas
27
Forks
1
Arquivos incluídos
2
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 2

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por jdm4pku no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Business Rule no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/business-rule
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Business Rule em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Business Rule automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Business Rule não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Business Rule faz?

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

Por que usar Business Rule no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Business Rule é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Business Rule no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/jdm4pku/RE-Skills/tree/main/skills/business-rule. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Business Rule?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Business Rule?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Business Rule com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Business Rule é gratuita?

A habilidade é publicada no GitHub por jdm4pku. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇