|
1 | 1 | # AI Usage Policy |
2 | 2 |
|
3 | | -This policy governs the use of generative AI and AI-assisted tooling (LLMs, coding agents, autocomplete assistants, and similar) when contributing to this repository. |
| 3 | +The full AI Usage Policy is now part of the official documentation, published at **[asyncapi.com/docs/tools/generator/ai-policy](https://www.asyncapi.com/docs/tools/generator/ai-policy)**. The source lives in [`apps/generator/docs/ai-policy.md`](apps/generator/docs/ai-policy.md). This file is a short index. |
4 | 4 |
|
5 | | -> **AI tools are instruments; humans are the only authors.** |
| 5 | +> **AI tools are instruments — humans are the only authors.** |
6 | 6 |
|
7 | | -You may use AI tools to help you contribute. But the moment you open a pull request or an issue, **you** are the author of every line in it. The tool is not a co-maintainer, it is not accountable, and it cannot be cited as an excuse. This policy exists so that AI accelerates good contributions without lowering the bar for quality, security, or trust. |
| 7 | +The policy covers when it applies, your responsibilities as a contributor, the required `Generated-by:` disclosure, and the consequences of non-compliance. Read it in full before submitting AI-assisted work. |
8 | 8 |
|
9 | | -This is a contributor-facing policy. It is **not** the same as [`AGENTS.md`](AGENTS.md): that file instructs coding agents on *how to write code that fits this repository*, whereas this policy defines *the rules and expectations for humans who use AI to contribute here*. |
10 | | - |
11 | | -## When this applies |
12 | | - |
13 | | -This policy applies to **any** contribution where a generative AI tool materially assisted in producing the content, including: |
14 | | - |
15 | | -- source code, tests, and configuration, |
16 | | -- documentation and template content, |
17 | | -- issue descriptions, and |
18 | | -- review comments. |
19 | | - |
20 | | -If you only used AI for spell-checking, search, or to understand existing code, disclosure is not required. If AI generated or substantially shaped the content you are submitting, it is. |
21 | | - |
22 | | -## Your responsibilities as a contributor |
23 | | - |
24 | | -Before you submit AI-assisted work, you must: |
25 | | - |
26 | | -1. **Review it thoroughly.** Read and understand every part of the contribution. If you do not understand it, do not submit it. |
27 | | -2. **Verify quality.** Ensure it meets this project's standards — it builds, tests pass, and it follows the conventions in [`CONTRIBUTING.md`](CONTRIBUTING.md) and [`AGENTS.md`](AGENTS.md). |
28 | | -3. **Remove extraneous changes.** Strip out unrelated edits, dead code, speculative abstractions, and noise the tool introduced. Keep the diff focused. |
29 | | -4. **Be prepared to explain it.** You must be able to justify any part of the contribution if a maintainer asks. "The AI wrote it" is not an answer. |
30 | | -5. **Accept responsibility.** You bear full accountability for the contribution, exactly as if you had written every line by hand. |
31 | | -6. **Check licensing.** Confirm that generated material does not reproduce code under incompatible licenses and does not violate this project's [license](LICENSE). |
32 | | - |
33 | | -> Blindly copy-pasting AI output introduces security and stability risks. Maintainers may close such pull requests without review. |
34 | | -
|
35 | | -## Required disclosure |
36 | | - |
37 | | -If a contribution was materially AI-assisted, you **must** disclose it: |
38 | | - |
39 | | -- **Pull requests:** include a `Generated-by:` line in the PR description naming the tool and its version, for example: |
40 | | - |
41 | | - ```text |
42 | | - Generated-by: Claude Code 1.x |
43 | | - Generated-by: GitHub Copilot |
44 | | - ``` |
45 | | - |
46 | | - The pull request template carries a dedicated AI-assistance section — fill in the `Generated-by:` line, or check the "no AI assistance" box if it does not apply. A CI check verifies that one of the two is present; it confirms a declaration exists, it does not and cannot verify its truthfulness. |
47 | | - |
48 | | -- **Issues:** note in the issue body that AI assisted in drafting it. |
49 | | - |
50 | | -Disclosure is a sign of good faith, not an admission of wrongdoing. We welcome AI-assisted contributions that follow this policy. |
51 | | - |
52 | | -## Consequences |
53 | | - |
54 | | -- Maintainers may **close non-compliant pull requests without review**, including undisclosed AI-generated PRs and PRs the contributor cannot explain. |
55 | | -- **Repeated violations** are treated as a breach of our [Code of Conduct](CODE_OF_CONDUCT.md) and may result in the contributor being blocked. |
56 | | - |
57 | | -If you are unsure whether something falls under this policy, ask a maintainer in the `#generator` channel on [AsyncAPI Slack](https://www.asyncapi.com/slack-invite) before submitting. |
| 9 | +See also the [AI tooling guide](https://www.asyncapi.com/docs/tools/generator/ai-tooling) for the AI tools the project runs on your PRs and issues. |
0 commit comments