CONTRIBUTING.md becomes a short entry point: the two positions and an index. The rules move to one file per trigger in docs/contributing/ (setup, making a change, AI assistance, code style, reviewing), each written as the rule, its reason and how it is held. GLOSSARY.md gains Driver, Unattended agent and Agent account. CLAUDE.md's bot-branch note now points to the new rule against pushing to someone else's branch. Closes #189 Assisted-by: Claude Code:claude-opus-5-5
56 lines
3.3 KiB
Markdown
56 lines
3.3 KiB
Markdown
# AI assistance
|
|
|
|
Read this before working on this repository with an agent, committing agent-written content, or
|
|
setting up an agent account.
|
|
|
|
These rules are our own, credited to the
|
|
[Ansible community AI policy](https://docs.ansible.com/projects/ansible/13/community/ai_policy.html);
|
|
they do not adopt it by reference. Every rule gives its reason and how it is held: by a control (a
|
|
named hook or check), by review, or aspirational (checked by nothing and nobody). Links between the
|
|
contributor docs are held by review until an offline link check exists. Terms such as *driver*,
|
|
*unattended agent* and *agent account* are defined in [GLOSSARY.md](../../GLOSSARY.md).
|
|
|
|
## Authorship and disclosure
|
|
|
|
- **The author of record of a pull request is the person who opened it, or the person accountable for
|
|
the account that opened it. They answer for every line: they understand it and have run the checks
|
|
it touches. An agent is a tool, never an author.** No driver line is needed in the pull request.
|
|
*Reason:* review only works if someone can explain the change.
|
|
*Held by:* review.
|
|
- **Every pull request, issue, comment and review reply an agent writes in a session with someone
|
|
live in it has a human driver who started that session and answers for it.**
|
|
*Reason:* what an agent posts needs a person who answers for it, as much as what it commits.
|
|
*Held by:* review.
|
|
- **Every commit that contains agent-written content carries `Assisted-by: <tool>[:<model>]` (tool
|
|
required, model optional), for example `Assisted-by: Claude Code:claude-opus-5-5`. A pull request
|
|
written with an agent carries the same line in its description.** There is no "substantial use"
|
|
threshold.
|
|
*Reason:* AI assistance is disclosed, and in an agent-first repository a threshold cannot be applied
|
|
consistently.
|
|
*Held by:* review.
|
|
- **Never add `Co-Authored-By:` for an agent, `Claude-Session:` or any other session link, or any other
|
|
AI trailer.** Agent tools often add these by default: set yours to write `Assisted-by:` instead.
|
|
History is not rewritten.
|
|
*Reason:* a co-author trailer makes the tool an author, and a session link is private and points
|
|
outside this repository.
|
|
*Held by:* review until the commit-msg hook that refuses these trailers lands (issue #272); then
|
|
control.
|
|
|
|
## What agents may do
|
|
|
|
- **An unattended agent acts from the agent account. It may code, push, open pull requests and
|
|
issues, comment and review; it may not approve or merge.**
|
|
*Reason:* unattended work still has to reach review, and the prompt-injection risk this carries is
|
|
accepted while every account is created by the maintainer (the Accepted risks in
|
|
[SECURITY.md](../../SECURITY.md)).
|
|
*Held by:* aspirational.
|
|
- **No agent approves or merges a pull request, driven or unattended.**
|
|
*Reason:* approval by a code owner is the gate, and an agent that approves passes its own gate.
|
|
*Held by:* control for agent accounts (they are outside the merge and approvals allowlists of the
|
|
branch protection); review for an agent acting with a contributor's own token.
|
|
- **Every agent account has exactly one accountable person, named in its Gitea profile.**
|
|
*Reason:* everything an agent account does needs one person who answers for it.
|
|
*Held by:* aspirational.
|
|
- Which issues an unattended agent may act on, and how it treats issue text, is in
|
|
[docs/agents/issue-tracker.md](../agents/issue-tracker.md).
|