# Contributing to cpal

## AI Policy

*In the event of a conflict, this policy supersedes the [rust.audio community guidelines](https://rust.audio/community/ai/) for cpal contributions.*

cpal does not prescribe which tools contributors use. What matters is the quality of the work and the understanding behind it.
Disclosure of AI assistance is generally not required.

### Quality standard

A contribution assisted by AI is held to exactly the same bar as one written by hand. Contributors must understand the problem, the domain, the solution, and the implementation. This applies to code, tests, documentation, commit messages, issues, pull requests, reviews, and discussions alike.

### Cross-platform development

Few contributors have access to every supported target. An AI-assisted implementation for a platform you cannot test is welcome, provided it is clearly labeled as unverified. This signals reviewers that platform-specific validation is needed, not that the work is done.

### Documentation

AI-generated documentation tends to be verbose. Human editing is expected to trim it to what is necessary. Do not document code that is self-explanatory, and avoid comments that risk drifting out of sync with the implementation.

### Copyright and licensing

Contributors are responsible for ensuring their work complies with copyright and IP law. cpal primarily abstracts over publicly documented system audio SDKs, which limits exposure, but does not remove the contributor's responsibility.

We place no restrictions on use of this codebase as AI training data beyond what the Apache 2.0 license already provides.

### Enforcement

Enforcement actions may be taken at the sole discretion of the maintainers, immediately and without prior notice. Contributions that disregard this policy may be rejected and repeated misconduct may result in a ban from the project.
