business-logic-patterns

business-logic-patterns is a cursor rule for Cursor from madebyaris/poinf-of-sales. It costs 17 tokens per session (7,226 once invoked), scanned A, original, MIT.

A collection of business rules and user journeys for restaurant point-of-sale systems, the software used to take orders, process payments, and manage restaurant operations. It describes areas such as tables, staff, kitchens, inventory, reporting, and pricing.

In plain words
What is it for?
Use it when designing or reviewing features for restaurant ordering, payment, stock management, table service, staff operations, kitchen workflows, analytics, and financial reports.
Why use it?
It gives a coding agent context about how restaurant operations fit together, reducing the risk of building workflows that conflict with real service processes.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when designing or reviewing features for restaurant ordering, payment, stock management, table service, staff operations, kitchen workflows, analytics, and financial reports.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/madebyaris/poinf-of-sales/business-logic-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/madebyaris/poinf-of-sales

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for business-logic-patterns

README.md
[![agentmods](https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/business-logic-patterns/github.svg)](https://agentmods.dev/rules/madebyaris/poinf-of-sales/business-logic-patterns)
Your own site
<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/business-logic-patterns"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/business-logic-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for business-logic-patterns

Your own site · 80×15
<a href="https://agentmods.dev/rules/madebyaris/poinf-of-sales/business-logic-patterns"><img src="https://agentmods.dev/badge/rules/madebyaris/poinf-of-sales/business-logic-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,226 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.07226
Opus 5 $0.00009 $0.03613
Sonnet 5 $0.00003 $0.01445
Haiku 4.5 $0.00002 $0.00723

Measured 13d ago against content hash b7d0e78f7859, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

business-logic-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/business-logic-patterns.mdc · 975 lines

How it starts

The opening of the file, as written. The whole thing — 975 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🍽️ POS Business Logic & Domain Patterns

🎯 Core Business Domain Understanding

Restaurant Operations Model

The POS system orchestrates complex restaurant operations with multiple stakeholders and intricate workflows:

// Domain Model - Core Business Entities
interface RestaurantDomain {
  // Revenue Generation
  orders: OrderLifecycle[]
  payments: PaymentProcessing[]
  inventory: InventoryManagement
  
  // Operations Management  
  tables: TableManagement
  staff: StaffOperations
  kitchen: KitchenWorkflow
  
  // Business Intelligence
  analytics: BusinessAnalytics
  reporting: FinancialReporting
}

// Business Rules Engine
class POSBusinessRules {
  validateOrderCreation(order: CreateOrderRequest): ValidationResult
  calculatePricing(items: OrderItem[]): PricingCalculation
  manageInventory(productId: string, quantity: number): InventoryResult
  optimizeKitchenWorkflow(orders: Order[]): WorkflowOptimization
}

🔄 Critical User Journeys & Performance Optimization

1. Server Journey: Dine-In Order Creation (Target: <30 seconds)

// ✅ PERFORMANCE-OPTIMIZED: Server workflow
class ServerWorkflowOptimization {
  // Pre-load critical data for instant access
  private async preloadServerData(): Promise<ServerContext> {
    const [products, categories, tables, activeOrders] = await Promise.all([
      this.productService.getAvailableProducts(), // Cache for 5 minutes
      this.categoryService.getActiveCategories(), // Cache for 1 hour  
      this.tableService.getTableStatus(), // Real-time, 30s cache
      this.orderService.getActiveOrders() // Real-time, 10s cache
    ])
    
    return { products, categories, tables, activeOrders }
  }

  // Optimistic order creation with rollback
  async createOrderOptimistic(orderData: CreateOrderRequest): Promise<Order> {
    // 1. Immediate UI feedback (0ms)
    this.ui.showOrderCreating(orderData)
    
    // 2. Validate business rules locally (5-10ms)
    const validation = await this.validateOrderBusiness(orderData)
    if (!validation.isValid) {
      throw new BusinessRuleError(validation.errors)
    }
    
    // 3. Optimistic update (10-15ms)
    const optimisticOrder = this.generateOptimisticOrder(orderData)
    this.ui.showOrderCreated(optimisticOrder)
    
    // 4. Background server sync (100-200ms)
    try {
      const serverOrder = await this.orderService.createOrder(orderData)
      this.reconcileOptimisticOrder(optimisticOrder, serverOrder)
      return serverOrder
    } catch (error) {
      // Rollback optimistic changes
      this.rollbackOptimisticOrder(optimisticOrder)
      throw error
    }
  }

  // Business rule validation (prevent API round-trips)
  private async validateOrderBusiness(order: CreateOrderRequest): Promise<ValidationResult> {
    const errors: string[] = []
    
    // Table availability check
    if (order.table_id && !this.isTableAvailable(order.table_id)) {
      errors.push('Table is not available')
    }
    
    // Product availability batch check
    const unavailableItems = order.items.filter(item => 
      !this.isProductAvailable(item.product_id, item.quantity)
    )
    if (unavailableItems.length > 0) {
      errors.push(`Products unavailable: ${unavailableItems.map(i => i.product_id).join(', ')}`)
    }
    
    // Business hours validation
    if (!this.isDuringBusinessHours()) {
      errors.push('Orders cannot be created outside business hours')
    }
    
    return { isValid: errors.length === 0, errors }
  }
}

Read the full file on GitHub · 975 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 975 lines · 17 tokens per session scan A b7d0e78f7859

Subscribe to this mod's changes

business-logic-patterns is a cursor rule published in the GitHub repository madebyaris/poinf-of-sales (142 stars, last pushed 1y ago), licensed MIT. It adds 17 tokens to every session and 7,226 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.