<?xml version="1.0"?>
<ruleset name="Tryly.ai WordPress Plugin">
    <description>WordPress Coding Standards for Tryly.ai Plugin</description>
    
    <!-- Scan all PHP files -->
    <file>.</file>
    
    <!-- Exclude vendor and node_modules -->
    <exclude-pattern>*/vendor/*</exclude-pattern>
    <exclude-pattern>*/node_modules/*</exclude-pattern>
    
    <!-- Include the WordPress-Core standard -->
    <rule ref="WordPress-Core">
        <!-- Allow short array syntax -->
        <exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
    </rule>
    
    <!-- Include WordPress-Docs standard -->
    <rule ref="WordPress-Docs"/>
    
    <!-- Include WordPress-Extra standard -->
    <rule ref="WordPress-Extra">
        <!-- Allow multiple assignments in conditionals for common patterns -->
        <exclude name="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"/>
    </rule>
    
    <!-- Security rules -->
    <rule ref="WordPress.Security"/>
    
    <!-- Check for proper text domain -->
    <rule ref="WordPress.WP.I18n">
        <properties>
            <property name="text_domain" type="array" value="tryly-ai"/>
        </properties>
    </rule>
    
    <!-- Set minimum supported WP version -->
    <config name="minimum_supported_wp_version" value="5.0"/>
</ruleset>