Skip to main content

Configuration Guide

Jataka uses a flexible configuration system that lets you customize everything from Governor limit thresholds to integration settings.

jataka.yml Structure

The main configuration file lives in your project root as jataka.yml. Here’s a complete example:
# Project Metadata
project: MySalesforceProject
version: 1.0.0
description: "Salesforce development project with Jataka integration"

# Salesforce Org Configuration
org:
  name: production
  type: production  # production, sandbox, developer
  login_url: https://login.salesforce.com

# Governor Limit Thresholds
thresholds:
  soql_queries: 80        # Warn at 80% of 100
  soql_rows: 40000        # Warn at 80% of 50000
  dml_statements: 120     # Warn at 80% of 150
  dml_rows: 8000         # Warn at 80% of 10000
  cpu_time: 8000         # Warn at 80% of 10000ms
  heap_size: 6MB         # Warn at 80% of 12MB
  callouts: 80           # Warn at 80% of 100
  email_invocations: 80  # Warn at 80% of 1000
  future_calls: 40       # Warn at 80% of 50
  queueable_jobs: 40     # Warn at 80% of 50

# Test Configuration
tests:
  # API Firewall Settings
  api_firewall:
    enabled: true
    timeout: 30s
    retry_count: 3
    parallel_scenarios: 5
    capture_headers: true
    
  # Kamikaze Pods Settings
  kamikaze_pods:
    enabled: true
    pod_count: 3
    max_execution_time: 300s
    vision_ai_confidence: 0.8
    screenshot_on_failure: true
    
  # Neo4j Analysis
  neo4j_analysis:
    enabled: true
    depth: 3
    include_test_classes: false
    
# Integration Settings
integrations:
  github:
    enabled: true
    repository: my-org/my-repo
    token: ${GITHUB_TOKEN}
    auto_comment: true
    fail_on_critical: true
    
  slack:
    enabled: true
    webhook: ${SLACK_WEBHOOK_URL}
    channels:
      - "#dev-alerts"
      - "#qa-team"
    notifications:
      - critical_limits
      - test_failures
      - performance_issues
      
  jira:
    enabled: true
    url: https://my-company.atlassian.net
    project: SALES
    auto_create_tickets: true
    
# Environment Variables
environment:
  NODE_ENV: production
  LOG_LEVEL: info
  CACHE_TTL: 3600
  
# Custom Rules
rules:
  soql_in_loop:
    enabled: true
    severity: error
    message: "SOQL query detected inside for loop"
    
  dml_in_loop:
    enabled: true
    severity: error
    message: "DML statement detected inside for loop"
    
  hardcoded_ids:
    enabled: true
    severity: warning
    pattern: "[a-zA-Z0-9]{18}"
    
  test_coverage:
    enabled: true
    minimum: 75
    severity: warning

# Reporting
reporting:
  formats:
    - json
    - junit
    - html
  output_dir: .jataka/reports
  include_screenshots: true
  include_coverage: true

Environment Variables

Sensitive configuration should use environment variables:

Project Types

Salesforce DX Project

project_type: sfdx
sfdx:
  scratch_org: true
  dev_hub: DevHub
  package_directories:
    - force-app

Salesforce CPQ Project

project_type: cpq
cpq:
  enabled_objects:
    - Opportunity
    - Quote
    - Order
    - Contract
  custom_validation: true

Commerce Cloud Project

project_type: commerce_cloud
commerce_cloud:
  environment: staging
  api_version: 56.0
  custom_endpoints:
    - ocapi
    - sra

Advanced Configuration

Custom Test Scenarios

scenarios:
  create_sales_cycle:
    description: "Complete sales cycle from lead to closed opportunity"
    steps:
      - create_lead
      - convert_lead
      - create_opportunity
      - add_products
      - close_won
      
  bulk_data_processing:
    description: "Bulk data processing with large datasets"
    data_size: 10000
    timeout: 600s
    parallel: true

Performance Benchmarks

benchmarks:
  soql_performance:
    max_query_time: 2s
    max_records_returned: 50000
    
  apex_performance:
    max_cpu_time: 5000ms
    max_heap_usage: 10MB
    
  ui_performance:
    max_page_load: 3s
    max_element_interaction: 1s

Compliance Rules

compliance:
  gdpr:
    data_anonymization: true
    consent_tracking: true
    
  hipaa:
    phi_detection: true
    audit_logging: true
    
  sox:
    change_tracking: true
    approval_workflows: true

Configuration Validation

Validate your configuration before running tests:
# Validate configuration
jataka config validate

# Check specific section
jataka config validate --section thresholds

# Show current configuration
jataka config show

# Test connection
jataka config test-connection

Environment-Specific Configs

Use different configs for different environments:
# jataka.dev.yml
org:
  type: sandbox
  login_url: https://test.salesforce.com
thresholds:
  soql_queries: 90  # More lenient for dev
integrations:
  slack:
    enabled: false  # No Slack notifications in dev
# Use environment-specific config
jataka test --config jataka.dev.yml

Best Practices

Start Conservative: Begin with conservative thresholds (70-80%) and adjust based on your org’s patterns.
Version Control: Commit your jataka.yml to version control, but keep sensitive data in environment variables.
Regular Reviews: Review and update your configuration quarterly to match your evolving codebase.

Troubleshooting

What’s Next?

Quick Start: Run jataka init --template enterprise to create a configuration optimized for enterprise environments.