Team standards for rule complexity and feature usage
Helping organizations choose appropriate rule engine features for their context
This guide helps teams establish standards for:
- 🎯 Feature Selection: Which DSL features are appropriate for your team's skill level
- 📏 Complexity Management: When to use simple vs. advanced patterns
- 👥 Team Coordination: Ensuring consistent rule development practices
- 🔄 Maintenance Strategy: Balancing functionality with long-term maintainability
Before choosing rule complexity, assess your team's readiness:
Characteristics:
- New to rule engines or business rules
- Prefers simple, readable solutions
- Values quick implementation over advanced features
- Limited time for complex rule maintenance
Recommended Approach:
- Start with Quick Start Guide
- Use only Basic patterns from Common Patterns Guide
- Avoid external API integrations initially
- Focus on simple
when/then/elsesyntax
Characteristics:
- Some experience with rule engines
- Comfortable with moderate complexity
- Has dedicated time for rule maintenance
- Needs multi-factor decision making
Recommended Approach:
- Use Basic and Intermediate patterns
- Introduce sequential processing gradually
- Start with simple API integrations
- Mix simple and complex syntax as needed
Characteristics:
- Experienced with rule engines and complex systems
- Has dedicated rule engine specialists
- Requires sophisticated business logic
- Comfortable with external system integration
Recommended Approach:
- Use all pattern complexity levels
- Implement comprehensive error handling
- Leverage full DSL feature set
- Design for high performance and resilience
These features should be used by teams at any maturity level:
# ✅ Always Appropriate
- Basic comparisons (at_least, at_most, equals, not_equals)
- Simple set operations
- Basic calculations
- Input/output definitions
- Simple when/then/else logicExample - Always Safe:
when:
- creditScore at_least 650
- annualIncome greater_than 40000
then:
- set approved to true
- calculate monthly_income as annualIncome / 12These features require some experience and ongoing maintenance:
# 🟡 Use with Team Experience
- Multiple rules with dependencies
- Complex boolean expressions
- List operations (append, prepend, remove)
- Validation operators (is_email, is_phone)
- Conditional actions (if/then within actions)Example - Requires Experience:
rules:
- name: "Stage 1"
when: [creditScore >= 600]
then: [set stage1_passed to true]
- name: "Stage 2"
when: [stage1_passed == true, income > 50000]
then: [set final_approved to true]These features should only be used by experienced teams:
# 🔴 Expert Teams Only
- REST API integrations
- JSON path operations
- Circuit breaker patterns
- Complex condition blocks
- External function callsExample - Expert Level:
then:
- run api_data as rest_get("https://api.example.com/data")
- run user_name as json_get(api_data, "user.name")
- if api_call_failed then circuit_breaker "API_UNAVAILABLE"Use this matrix to choose appropriate rule complexity:
| Business Logic Complexity | Team Experience | Recommended Pattern | Maintenance Effort |
|---|---|---|---|
| Simple (Yes/No decisions) | Any | 🟢 Basic | Low |
| Moderate (Multi-factor) | Intermediate+ | 🟡 Intermediate | Medium |
| Complex (Multi-stage) | Advanced | 🔴 Advanced | High |
| Integration (External APIs) | Expert | 🔴 Advanced | Very High |
Ask these questions to guide your choice:
-
"Can this be solved with simple if/then logic?"
- Yes → Use Basic patterns
- No → Continue to question 2
-
"Does this require multiple processing stages?"
- Yes → Consider Intermediate patterns
- No → Stick with Basic patterns
-
"Do we need external data or complex error handling?"
- Yes → Consider Advanced patterns (if team is ready)
- No → Use Intermediate patterns
-
"Is our team comfortable maintaining complex rules?"
- No → Step down one complexity level
- Yes → Proceed with chosen complexity
Establish consistent naming across your organization:
# ✅ Good Naming
name: "Credit_Assessment_v2.1"
description: "Evaluates credit applications using updated criteria"
# ❌ Poor Naming
name: "rule1"
description: "checks stuff"Recommended Format:
- Name:
BusinessArea_Purpose_Version(e.g.,Lending_CreditCheck_v1.0) - Description: Clear business purpose and key criteria
- Version: Semantic versioning for tracking changes
Set documentation standards based on complexity:
| Complexity | Required Documentation |
|---|---|
| 🟢 Basic | Name, description, business owner |
| 🟡 Intermediate | + Input/output examples, test cases |
| 🔴 Advanced | + Architecture diagrams, error handling docs |
Establish review requirements:
# Review Requirements by Complexity
Basic Rules: 1 reviewer (business analyst OK)
Intermediate: 1 technical reviewer + 1 business reviewer
Advanced: 2 technical reviewers + 1 business reviewer
API Integration: Senior developer + architect review required🟢 Basic Pattern Risks:
- Over-simplifying complex business logic
- Hard-coding values that should be configurable
- Missing edge cases in simple conditions
🟡 Intermediate Pattern Risks:
- Creating overly complex rule chains
- Poor error handling in multi-stage processing
- Difficult-to-debug sequential dependencies
🔴 Advanced Pattern Risks:
- External API failures breaking rule execution
- Performance issues with complex JSON operations
- Security vulnerabilities in API integrations
For All Complexity Levels:
# Always include error handling
else:
- set error_occurred to true
- set error_message to "Specific error description"
- call log with ["Error in rule: " + error_message, "ERROR"]For Intermediate and Advanced:
Use the circuit_breaker action inside then: to short-circuit a rule when a
downstream dependency or risk signal trips:
then:
- if downstream_failure_count at_least 3 then circuit_breaker "DOWNSTREAM_UNAVAILABLE"Phase 1: Foundation (Months 1-3)
- Train team on Basic patterns
- Implement simple rules only
- Establish naming and documentation standards
- Build confidence with successful deployments
Phase 2: Expansion (Months 4-8)
- Introduce Intermediate patterns gradually
- Add multi-stage processing for complex scenarios
- Implement comprehensive testing practices
- Begin performance monitoring
Phase 3: Advanced (Months 9+)
- Evaluate need for Advanced patterns
- Implement API integrations if required
- Add sophisticated error handling
- Optimize for performance and resilience
When upgrading existing rules:
- Assess Current Complexity: Categorize existing rules
- Plan Incremental Updates: Don't rewrite everything at once
- Maintain Backward Compatibility: Keep existing interfaces working
- Test Thoroughly: Validate business logic hasn't changed
- Document Changes: Track what was modified and why
Track these metrics to ensure governance is working:
- Time to implement new rules (should decrease over time)
- Rule complexity distribution (should match team capability)
- Code review feedback volume (should decrease as standards improve)
- Rule execution success rate (should be >99%)
- Performance degradation incidents (should be minimal)
- Business logic errors (should decrease over time)
- Developer confidence scores (survey quarterly)
- Rule maintenance effort (hours per rule per month)
- Knowledge sharing frequency (team learning sessions)
Use the Team Maturity Assessment above to determine your starting point.
Choose appropriate complexity levels and establish basic naming conventions.
Begin with Basic patterns and simple rules to build confidence.
Regularly review and adjust standards based on team growth and experience.
- 📚 Learning Path: Quick Start → Common Patterns → Full Reference
- 🎓 Hands-on Practice: B2B Credit Scoring Tutorial
- 🏗️ Architecture: Architecture Guide
- ⚡ Performance: Performance Optimization
Ready to establish standards for your team? Start with the Quick Start Guide to build foundational knowledge.