## How to Contribute to swpui

#### **Did you find a bug?**

- **Do not open up a GitHub issue if the bug is a security vulnerability in swpui**, and instead
  [contact the maintainer](mailto:hi@beeb.li).
- **Ensure the bug was not already reported** by searching on GitHub under
  [Issues](https://github.com/beeb/swpui/issues).
- If you're unable to find an open issue addressing the problem,
  [open a new one](https://github.com/beeb/swpui/issues/new). Be sure to include a **title and clear description**, as
  much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected
  behavior that is not occurring.

#### **Did you write a patch that fixes a bug?**

- Read the AI Policy section below.
- Open a new GitHub pull request with the patch.
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
- Make sure to add unit tests to avoid regressions.

#### **Did you fix whitespace, format code, or make a purely cosmetic patch?**

Changes that are cosmetic in nature and do not add anything substantial to the stability, functionality, or testability
of swpui will generally not be accepted.

#### **Do you intend to add a new feature or change an existing one?**

- Suggest your change in a feature request issue and wait on feedback from the maintainers before writing code.
- Do not open an issue on GitHub until you have collected positive feedback about the change.

Thanks! :heart: :heart: :heart:

## AI Policy

_This policy is a modified version of the
[Ghostty AI Policy](https://github.com/ghostty-org/ghostty/blob/main/AI_POLICY.md)._

This project has strict rules for AI usage:

- **All AI usage in any form must be disclosed.** You must state the tool you used (e.g. Claude Code, Cursor, Amp) along
  with the extent that the work was AI-assisted.

- **The human-in-the-loop must fully understand all code.** If you can't explain what your changes do and how they
  interact with the greater system without the aid of AI tools, do not contribute to this project.

- **Issues and discussions can use AI assistance but must have a full human-in-the-loop.** This means that any content
  generated with AI must have been reviewed _and edited_ by a human before submission. AI is very good at being overly
  verbose and including noise that distracts from the main point. Humans must do their research and trim this down.

- **No AI-generated media is allowed (art, images, videos, audio, etc.).** Text and code are the only acceptable
  AI-generated content, per the other rules in this policy.

- **Bad AI drivers will be blocked.** People who produce bad contributions that are clearly AI (slop) even after being
  warned will be blocked from future contributions.

These rules apply only to outside contributions to swpui. Maintainers are exempt from these rules and may use AI tools
at their discretion; they've proven themselves trustworthy to apply good judgment.

### There are Humans Here

Please remember that swpui is maintained by humans.

Every discussion, issue, and pull request is read and reviewed by humans. It is a boundary point at which people
interact with each other and the work done. It is rude and disrespectful to approach this boundary with low-effort,
unqualified work, since it puts the burden of validation on the maintainer.

In a perfect world, AI would produce high-quality, accurate work every time. But today, that reality depends on the
driver of the AI. And today, most drivers of AI are just not good enough. So, until either the people get better, the AI
gets better, or both, we have to have strict rules to protect maintainers.

### AI is Accepted Here

This is not an anti-AI policy, it can be a wonderful tool for analysis, debugging and repetitive coding tasks.
Contributions which use these tools are welcome, as long as they are not a substitute for qualified contributors.
