Skip to content

Commit e6cc935

Browse files
committed
Add AIToolPolicy.md
1 parent b87d15d commit e6cc935

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

AIToolPolicy.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# AI Tool Use Policy
2+
3+
This policy aims to be compatible with the [LLVM AI Tool Use
4+
Policy](https://llvm.org/docs/AIToolPolicy.html) so that people contributing to
5+
both projects have a similar policy to work with.
6+
7+
Contributors to DirectXShaderCompiler can use whatever tools they would like to
8+
craft their contributions, but there must be a **human in the loop. Contributors
9+
must read and review all LLM-generated code or text before they ask other
10+
project members to review it.** The contributor is always the author and is
11+
fully accountable for their contributions. Contributors should be sufficiently
12+
confident that the contribution is high enough quality that asking for a review
13+
is a good use of scarce maintainer time, and they should be **able to answer
14+
questions about their work during review.**
15+
16+
We expect that new contributors will be less confident in their contributions,
17+
and our guidance to them is to **start with small contributions** that they can
18+
fully understand to build confidence. We aspire to be a welcoming community that
19+
helps new contributors grow their expertise, but learning involves taking small
20+
steps, getting feedback, and iterating. Passing maintainer feedback to an LLM
21+
doesn't help anyone grow and does not sustain our community.
22+
23+
Contributors are expected to **be transparent and label contributions that
24+
contain substantial amounts of tool-generated content.** Our policy on labelling
25+
is intended to facilitate reviews, and not track which parts of the project are
26+
generated. Contributors should note tool usage in their pull request
27+
description, commit message, or wherever authorship is normally indicated for
28+
the work. For instance, use a commit message trailer like Assisted-by: .
29+
Th[AS3.1]is transparency helps the community develop best practices and
30+
understand the role of these new tools.
31+
32+
## Copilot Code Reviews
33+
34+
Copilot code reviews are allowed. It's TBD whether we will enable these by
35+
default for all PRs - but feel free to request a review from copilot.
36+
37+
## Cloud Agents
38+
39+
The cloud-based version of github copilot is a great way to have multiple agents
40+
work simultaneously and autonomously on issues. However, we require that these
41+
run in a fork of the repo rather than in the main repo itself. Then, once the
42+
change has been crafted such that it is ready for others to review, a PR can be
43+
opened to merge it into upstream. Rationale:
44+
45+
* Everyone should be working in a fork rather than creating branches in the main
46+
repo, agents are no different.
47+
* We shouldn't be spamming people watching the main repo with the agent's work.
48+
* As you're responsible for the work copilot is doing, the PR into upstream
49+
should come from you, not from copilot.
50+
51+
Note that cloud agents are only able to build and test on Linux, and this
52+
affects the sort of work an agent can do.
53+
54+
## Local Agents
55+
56+
CLI, or editor-hosted agents, run on your own machine, so there is less concern
57+
about the activity of these agents impacting others.

0 commit comments

Comments
 (0)