Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
Thanks for submitting a PR, your contribution is really appreciated!

Here is a quick checklist that should be present in PRs.

- [ ] Include documentation when adding new features.
- [ ] Include new tests or update existing tests when applicable.
- [X] Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.

If this change fixes an issue, please:

- [ ] Add text like ``Closes #XYZW`` to the PR description and/or commits (where ``XYZW`` is the issue number). See the [github docs](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more information.

> [!IMPORTANT]
> **Unsupervised agentic contributions are not accepted**. See our [AI/LLM-Assisted Contributions Policy](https://github.com/pytest-dev/pytest-localserver/blob/main/README.rst#aillm-assisted-contributions-policy).

- [ ] If AI agents were used to generate any of the content in this PR, they are credited in `Assisted-by` commit trailers.

- [ ] Add yourself to `AUTHORS` in alphabetical order.
-->
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AI Agent Guidelines

This project follows the AI/LLM-Assisted Contributions Policy outlined in `README.rst`.

## LLM Policy

When contributing to this repository, AI agents (and the humans using them) must adhere to the following:

1. **Responsibility**: The human developer is responsible for all contributions. All LLM-generated code must be reviewed and understood by the developer before submission.
2. **PR Disclosure**: Any pull request containing LLM-generated content must explicitly disclose this in the PR description.
3. **Commit Attribution**: Every commit containing LLM-generated content must include an `Assisted-by` (recommended) or `Co-authored-by` commit trailer in the commit message.

### Commit Message Format

Follow the project's requirement for an `Assisted-by` or `Co-authored-by` trailer. A recommended format is:

`Assisted-by: <AGENT_NAME> with <MODEL_VERSION>[, TOOL1, TOOL2, ...]`

Example: `Assisted-by: OpenCode 2.3.0 with gemma4:31b`
28 changes: 28 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,33 @@ I already have a couple of ideas for future versions:
* making the SMTP outbox as convenient to use as ``django.core.mail.outbox``
* add your own here!

AI/LLM-Assisted Contributions Policy
------------------------------------

For consistency, we have adopted the `pytest LLM policy`_ except that
attribution is mandatory. pytest's LLM policy generally allows developers to
include LLM-generated code in their contributions, as long as they understand
what they're contributing and take responsibility for it in the same way as if
they had written it themselves. In particular, taking responsibility for
a contribution means that the human developer needs to check and understand
LLM-generated contributions _before_ submitting them as a PR, and the human
developer must be the one to respond to questions from maintainers and
participate in the process of getting the PR ready to merge.

Again, for ``pytest-localserver`` we have an extra requirement that disclosing
the use of AI tools is mandatory. We ask that it be done in a specific way:

* Use a commit trailer that identifies the model and harness in each commit
that includes LLM-generated content. We recommend ``Assisted-by``, with
a format like this::

Assisted-by: Claude Code 2.1.310-325 with Opus 5
Assisted-by: OpenCode 2.2.5 with Sonnet 5.6 and gpt-5.4

A ``Co-authored-by`` trailer that includes the same information is also
acceptable.
* Mention in the PR description that you used AI tools, just for visibility.

Preparing a release
-------------------

Expand Down Expand Up @@ -332,3 +359,4 @@ For package maintainers, here is how we release a new version:
.. _twine: https://twine.readthedocs.io/en/stable/
.. _new release form on Github: https://github.com/pytest-dev/pytest-localserver/releases/new
.. _release workflows page: https://github.com/pytest-dev/pytest-localserver/actions/workflows/release.yml
.. _pytest LLM policy: https://github.com/pytest-dev/pytest/blob/main/CONTRIBUTING.rst#aillm-assisted-contributions-policy