Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Policy on AI use for darnit projects

The following is inspired by in-toto's guidance on coding assistants and broader genAI contributions.

## Summary (TL;DR)

While the darnit project does not ban AI-based contributions, we require users to disclose the use of AI assistance.
Whether or not a user chooses to disclose the usage of AI, all submitted code must still meet the same quality standards *as if they had written it themselves*.
That is, submitted code that the author of a pull-request themselves does not understand may be automatically rejected regardless of AI use.
To reiterate: you write code however you want, but it is your responsibility to understand the code you submit.

Further, *please disclose this information inside of the PR body* so as to help reviewers review accordingly.

For guidelines on code quality for all darnit contributions, refer to [CONTRIBUTING.md](./CONTRIBUTING.md).

## Interaction and Process

### Responsibility

You are responsible for any code you submit to darnit's repositories, regardless of whether it was manually written or generated by AI.
You must understand and be able to explain the code you submit as well as the existing related code.
It is not acceptable to submit a patch that you cannot understand and explain yourself.
In explaining your contribution, do not use AI to automatically generate comments, pull request descriptions, or issue descriptions.
See below for our policy on AI translation systems.

### Communication

When interacting with developers (e.g., slack, issues, PRs) do not use AI to speak for you, except for translation or grammar editing.
Human-to-human communication is essential for an open source community to thrive.

### Disclosure

You are required to disclose whether AI has been used to assist in the development of your pull request.
If so, you must document which tool(s) have been used, how they were used, and specify what code or text is AI generated.
We will reject any pull request that does not include the disclosure.

## Contribution Contents

### Code Quality

Contributors are expected to submit code that meets darnit's standards.
We will reject pull requests that we deem to be "AI slop" (of note, not all AI contributions are deemed AI slop).

### Licensing and Legal Requirements

All contributions must comply with the darnit project’s licensing requirements.
All code must be compatible with Apache2 license, or the target subproject license.

### Signed-off-by and Developer Certificate of Origin

AI agents MUST NOT add Signed-off-by tags.
Only humans can legally certify the Developer Certificate of Origin (DCO).
The human submitter is responsible for:

- Reviewing all AI-generated code
- Ensuring compliance with licensing requirements
- Adding their own Signed-off-by tag to certify the DCO
- Taking full responsibility for the contribution

## Attribution

When AI tools contribute to darnit development, proper attribution helps track the evolving role of AI in the development process.
Contributions should include an Assisted-by tag in the following format:

Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]

Where: AGENT_NAME is the name of the AI tool or framework MODEL_VERSION is the specific model version used [TOOL1] [TOOL2] are optional specialized analysis tools used (e.g., coccinelle, sparse, smatch, clang-tidy)

Basic development tools (git, gcc, make, editors) should not be listed.

Example:

Assisted-by: Claude:claude-3-opus
Loading