Ktor’s policy is that contributors can use whatever tools they would like to craft their contributions, but there must be a human in the loop. Contributors must read and review all LLM-generated code or text before they ask other project members to review it. The contributor is always the author and is fully accountable for their contributions.
Contributors should be sufficiently confident that the contribution is high enough quality that asking for a review is a good use of scarce maintainer time, and they should be able to answer questions about their work during review.
Contributors are expected to be transparent and label contributions that contain substantial amounts of tool-generated
content. Our policy on labelling is intended to facilitate reviews, and not to track which parts of Ktor are
generated.
Contributors should note tool usage in their pull request description, commit message, or wherever authorship is
normally indicated for the work. For instance, use a commit message trailer like Assisted-by: <tool-name>. This
transparency helps the community develop best practices and understand the role of these new tools.
This policy includes, but is not limited to, the following kinds of contributions:
- Code, usually in the form of a pull request
- KLIPs or design proposals
- Issues or security vulnerabilities
- Documentation updates, pages, tutorials, and other content
The one exception to the policy above is direct communication with other people: comments and reviews on pull requests, issues (GitHub and YouTrack), KLIPs, Slack, and similar channels. Do not use AI tools to write these. Discussions exist so that people can understand each other's reasoning, and generated replies defeat that purpose.
You may use tools to translate or to correct grammar and wording, provided the substance, claims, and reasoning are your own.
Descriptions of pull requests, issues, and KLIPs document the change rather than a conversation, so they may be tool-assisted. Label them as described above. However, it is strongly recommended that contributors write these descriptions themselves. The description should explain the motivation, implementation approach, expected impact, and any open questions or uncertainties to the same extent as a contribution made without tool assistance.
AI tools that can do automated commenting, like Codex, added by the maintainers are exempt from this rule.
If a maintainer judges that a contribution doesn’t comply with this policy, they should paste the following response to request changes:
This PR doesn't appear to comply with our policy on AI-generated content, and requires additional justification for why it is valuable enough to the project for us to review it. Please see our developer policy on AI-generated contributions: https://github.com/ktorio/ktor/blob/main/AI_POLICY.md
In case of direct communication violation, the following response should be used:
This comment appears to be generated by an AI tool rather than written by you, and so it doesn't comply with our policy on AI-generated content: https://github.com/ktorio/ktor/blob/main/AI_POLICY.md#direct-communication
We kindly ask you restate your point in your own words.
If or when it becomes clear that an issue or PR is off-track and not moving in the right direction, maintainers may close the issue or PR without further discussion.
Artificial intelligence systems raise many questions around copyright that have yet to be answered. Our policy on AI tools is similar to our copyright policy: Contributors are responsible for ensuring that they have the right to contribute code under the terms of our license, typically meaning that either they, their employer, or their collaborators hold the copyright. Using AI tools to regenerate copyrighted material does not remove the copyright, and contributors are responsible for ensuring that such material does not appear in their contributions. Contributions found to violate this policy will be removed just like any other offending contribution.
Portions of this policy are taken and adapted from the LLVM Project's AI Tool Use Policy (https://llvm.org/docs/AIToolPolicy.html), Copyright © 2003-2026 LLVM Project, licensed under the Apache License 2.0 with LLVM Exceptions, which in turn incorporates text from the Fedora Project's AI policy proposal (https://communityblog.fedoraproject.org/council-policy-proposal-policy-on-ai-assisted-contributions/), licensed under CC BY 4.0. Changes were made.