Repository navigation
Add AI contribution policy and AGENTS.md - #3521
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3521 +/- ##
=======================================
Coverage 91.72% 91.72%
=======================================
Files 37 37
Lines 30839 30839
Branches 4921 4921
=======================================
Hits 28286 28286
Misses 2223 2223
Partials 330 330
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
State the project's position on AI-assisted contributions in CONTRIBUTING.md: LLM use by tskit users is welcome, but automated contributions based purely on code scanning are discouraged, other than clear bug fixes in documented workflows. Add an AGENTS.md giving coding agents the same notice along with the conventions and commands they need to work in the repository. The first half is intended to be shared across tskit-dev repositories; the second half is specific to tskit. CLAUDE.md imports AGENTS.md so that Claude Code picks it up. Text written by an agent and posted to an issue or PR should start with a marker line, so that readers know what they are looking at.
Link the AI-assisted contributions policy from the git workflow section. Also correct two instructions that named the repository root where the python directory was meant, and fix a typo.
0f2a6fa to
c69b900
Compare
Make personal review explicit in the PR checklist so contributors own the changes they submit, including AI-generated material.
|
I asked Astra how it would handle a user request to do a code scan given the changes in this PR: it claimed it would likely report back to the user about how the repo's policy discourages code scanning. It's main concern is that the exception in AGENTS.md for code scanning in the case of "clear bugs" could be interpreted by an agent as “scan until you can construct a failing example in a documented workflow”. This could still result in an agent-written PR to fix a minor bug that hasn't affected a user in practice. I had Sol to do a code scan to find the lowest impact bug that would still satisfy the new requirements in this PR for code scanning contributions by an agent. It found that that the I'm guessing this minor bug hasn't been caught before because of how little used the migrations feature is. I'm not sure if this would be considered a worthwhile contribution; if not, maybe adding a qualification like the one in italics below might be useful?
|
The policy only discouraged contributions found by code scanning, but most recent pull requests from non-users pick open issues off the tracker instead. Say that contributions are expected to come from personal use of tskit or from wanting to get involved, and that an open issue is not an invitation to submit a fix. Tell agents to find out the motivation before starting, since they cannot otherwise know whether the person they work for uses tskit, and limit the clear-bug exception to bugs nobody has reported. Ask for the motivation in the PR template so that its absence is a basis for closing.
|
I'm going to go ahead and merge this. The discussion has been open on Slack for several weeks and there has been no dissent. We can easily update later, but I think it's important to get some sort of policy live ASAP. |
🤖 AI generated message
Adds a policy on AI-assisted contributions, and an
AGENTS.mdgiving coding agents the conventions for working in this repository. The intention is to trial this in tskit and, if it is accepted, apply the same thing across the other tskit-dev repositories.What changes
CONTRIBUTING.md: a new "AI-assisted contributions" section. LLM use by tskit users is welcome. Automated contributions based purely on code scanning are discouraged, other than clear bug fixes in documented workflows.AGENTS.md(new), in two halves:uvusage, Python style, git conventions, no model or tool attribution in commit messages, and flagging agent-written text posted to issues and PRs with a🤖 AI generated messageline.CLAUDE.md(new): one line importingAGENTS.md, because Claude Code readsCLAUDE.mdrather thanAGENTS.md.docs/development.md(separate commit):pythondirectory was meant;