Skip to content

Commit 7b3f781

Browse files
authored
contributing: Add more human responsibility in AI use (#7120)
This modifies the agent and contributing instructions to back the code in the change and also pre-review the code before submitting it. While the contributing file already has instructions for taking responsibility, this add explicit ask for reviewing your own code before submitting. For the agent instructions, this pushes the agent more to do a review by including explicit instructions. The policy section and these instructions are moved to the top to increase the chances that the agent will pick them up and consider them, and are also formulated more as instructions in imperative (rather than policy). I'm doing the move because Claude was not picking up the instructions anymore even when asked after the file became longer. The no-AI-co-author instructions is now more connected with the acknowledge instruction hopefully providing more clarity to the intention. The language is trying to be direct, imperative-like. The text avoids words like justify and prefers words like evaluate to battle unprompted AI inventing justifications for bad lines.
1 parent 022d529 commit 7b3f781

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

AGENTS.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
Instructions for AI assistants and agents working with code in this
44
repository.
55

6+
After writing or modifying code, self-review it before presenting it.
7+
Review as a human PR reviewer would: Is the reasoning behind each line
8+
sound? Is this line actually needed? Where did this code come from? Will
9+
this be hard to maintain? What if this will need to be changed later?
10+
Make every line of code, comments, and commit messages clear and
11+
well-reasoned. Evaluate each line. Remove or change any line that
12+
lacks a strong justification. Don't invent justifications.
13+
14+
Do not present code you cannot explain. When generating substantial
15+
algorithms or logic, note this to the human so they can disclose it.
16+
617
## Overview
718

819
GRASS is a large, multi-language geospatial processing engine. The codebase
@@ -320,14 +331,6 @@ message rules:
320331
identifier that is conventionally lowercase (e.g., `r.info` or `gs`)
321332
- Use plain ASCII only, no double spaces after periods
322333
- Write in imperative mood (e.g., "Add support for X", not "Added" or "Adds")
323-
- Do not add AI co-authors; the human author is responsible for the code.
324-
However, larger use of AI should be acknowledged in the commit message
325-
and/or PR description, similarly to how a book or a discussion with a
326-
human collaborator would be acknowledged.
327-
328-
## AI Use Policy
329-
330-
See `CONTRIBUTING.md` for the full AI use policy. Key points: AI-assisted
331-
development is acceptable, but contributors must test all code, understand
332-
their submissions, and disclose AI assistance when substantial algorithms
333-
or logic were AI-generated.
334+
- Larger use of AI should be acknowledged in the commit message and/or PR
335+
description, but not as a co-author, similarly to how a book or a
336+
discussion with a human collaborator would be acknowledged.

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Contributors must:
2323
- **Write clear, concise PR descriptions** in your own words.
2424
- **Use your own voice** in GitHub issues and PR discussions.
2525
- **Take responsibility** for code quality, correctness, and maintainability.
26+
Self-review AI-generated code before submitting — question whether each
27+
change is justified and remove what is not.
2628

2729
### Disclosure
2830

0 commit comments

Comments
 (0)