Skip to content

Commit 4eabe80

Browse files
committed
Address Peter's comments
1 parent e0b8edb commit 4eabe80

1 file changed

Lines changed: 57 additions & 5 deletions

File tree

doc/contributing/source/ai-policy.rst

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,53 @@
1010
AI tool policy
1111
--------------
1212

13+
Motivation
14+
**********
15+
16+
As a community |ns3| values contributions from new as well as experienced developers,
17+
as discussed in our
18+
[Code of Conduct Policy](https://www.nsnam.org/about/governance/policies/).
19+
We expect that participating in |ns3| will be a learning experience,
20+
especially for new contributors, and we strive to support that learning
21+
throughout our code review process.
22+
23+
As a project we rely on various external tools to support development,
24+
and encourage developers to use whatever tools improve their productivity
25+
and quality of contributions, including AI-type tools. There is a downside,
26+
however, in over-reliance on AI tools, when contributors don't fully understand
27+
what the tool has generated, haven't reviewed it fully themselves,
28+
and are not committed to learning themselves.
29+
30+
As a project we recognize that code reviews are not free;
31+
they _do_ consume reviewers' and maintainers' time and effort.
32+
Therefore we strive to find a balance between supporting new contributors
33+
and being judicious in committing reviewers time.
34+
35+
We believe a key factor in achieving that balance is to recognize
36+
that participation in |ns3| is fundamentally a _human_ process.
37+
Therefore we value interacting with human contributors to enhance submissions,
38+
enabling contributor learning, and maintaining high quality |ns3| code.
39+
When contributors rely excessively on AI tools they put |ns3| reviewers
40+
in the position of refining the AI output, through the mediation of the submitter,
41+
rather than working directly with an engaged contributor. This does not contribute
42+
to learning, by contributors or maintainers, nor to efficient enhancement of |ns3|.
43+
44+
Therefore the project has adopted this policy guiding use of AI tools.
45+
1346
This policy is mostly copied from a proposal being discussed for
1447
`LLVM <https://github.com/llvm/llvm-project/pull/154441>`_.
1548

49+
Summary of the policy
50+
=====================
51+
52+
The main principles of this policy are
53+
* Contributors can use whatever tools they would like
54+
* There must be a *human in the loop*
55+
* Contributors must read and review all generated contributions _before_ asking for review
56+
* Contributions containing substantial generated content should be labeled
57+
* Agents **must not** take action in our digital spaces without human approval
58+
* Issues labeled "good first issue" are strictly for humans; AI tools must not be used
59+
1660
Policy
1761
******
1862

@@ -61,8 +105,9 @@ tool assistance.
61105

62106
An important implication of this policy is that it bans agents that take action
63107
in our digital spaces without human approval, such as the `GitHub @claude
64-
agent <https://github.com/claude/>`_. Similarly, automated review tools that
65-
publish comments without human review are not allowed. However, an opt-in
108+
agent <https://github.com/claude/>`_. Automated review tools that may publish
109+
review comments without human review can be considered by the ns-3 project as a
110+
possible exception to this policy on a case-by-case basis. However, an opt-in
66111
review tool that *keeps a human in the loop* is acceptable under this policy.
67112
As another example, using an LLM to generate documentation, which a contributor
68113
manually reviews for correctness, edits, and then posts as a MR, is an approved
@@ -107,7 +152,8 @@ they should paste the following response to request changes:
107152

108153
.. code-block:: text
109154
110-
This MR doesn't appear to comply with our policy on tool-generated content,
155+
This MR doesn't appear to comply with our [our policy on tool-generated
156+
content](https://www.nsnam.org/docs/contributing/html/general.html#ai-policy),
111157
and requires additional justification for why it is valuable enough to the
112158
project for us to review it. Please see our developer policy on
113159
AI-generated contributions: (URL TBD)
@@ -137,6 +183,10 @@ contributors are responsible for ensuring that such material does not appear in
137183
their contributions. Contributions found to violate this policy will be removed
138184
just like any other offending contribution.
139185

186+
Agents should explicitly warn the user if external code being proposed or
187+
integrated for ns-3 is observed to be licensed under a license incompatible
188+
with the GNU GPLv2-only license.
189+
140190
Examples of when to mention tool use
141191
************************************
142192

@@ -159,13 +209,15 @@ you, or if you instead asked it to review and tidy up something that you
159209
generated largely by yourself. If the former, disclose the tool use, but
160210
otherwise, use need not be mentioned.
161211

162-
Here are some examples of contributions that demonstrate how to apply
212+
Here are some examples of commit messages that demonstrate how to apply
163213
the principles of this policy:
164214

165215
.. code-block:: text
166216
167-
Examples to be provided
217+
core: Create mp-units attribute wrappers
218+
Claude Code assisted with implementation
168219
220+
Other examples will be provided at a later date.
169221

170222
Use of LLMs to review merge requests
171223
************************************

0 commit comments

Comments
 (0)