# Contributing to Fast RAGbot for WordPress

Thank you for your interest in contributing to Fast RAGbot for WordPress! This document provides guidelines for contributing to the project.

## Getting Started

1. Fork the repository
2. Create a new branch for your feature or bug fix
3. Make your changes following the coding standards below
4. Test your changes thoroughly
5. Submit a pull request

## Coding Standards

### WordPress Coding Standards
- Follow [WordPress PHP Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)
- Use WordPress functions and APIs when available
- Ensure all code is properly escaped and sanitized
- Use nonces for security verification

### PHP Standards
- Use PHP 7.4+ features appropriately
- Follow PSR-4 autoloading standards
- Use type hints where possible
- Write clear, self-documenting code

### JavaScript Standards
- Use modern JavaScript (ES6+) features
- Follow WordPress JavaScript coding standards
- Ensure accessibility compliance
- Test across different browsers

### CSS Standards
- Use semantic class names
- Follow mobile-first responsive design
- Ensure cross-browser compatibility
- Maintain consistent styling

## Security Guidelines

- Always sanitize user input
- Escape output appropriately
- Use WordPress nonces for form submissions
- Implement proper capability checks
- Follow principle of least privilege

## Testing

- Test on multiple WordPress versions (6.0+)
- Test with different PHP versions (7.4+)
- Verify mobile responsiveness
- Test with popular themes and plugins
- Check accessibility compliance

## Documentation

- Update readme.txt for user-facing changes
- Add inline code comments for complex logic
- Update CHANGELOG.md for all changes
- Include PHPDoc blocks for functions and classes

## Submitting Issues

When submitting issues, please include:
- WordPress version
- PHP version
- Plugin version
- Steps to reproduce
- Expected vs actual behavior
- Any error messages

## Pull Request Process

1. Ensure your code follows all coding standards
2. Update documentation as needed
3. Add or update tests if applicable
4. Ensure all existing tests pass
5. Provide a clear description of changes
6. Reference any related issues

## Code Review

All contributions will be reviewed for:
- Code quality and standards compliance
- Security best practices
- Performance implications
- Compatibility with WordPress core
- User experience impact

## License

By contributing to Fast RAGbot for WordPress, you agree that your contributions will be licensed under the GPL v2 or later license.

## Questions?

If you have questions about contributing, please open an issue for discussion.