From d381c3fb8dbd54cafeee63a10c19386955dde9f3 Mon Sep 17 00:00:00 2001 From: Marc-cn Date: Tue, 8 Sep 2026 19:09:12 +0000 Subject: [PATCH] docs: add AI policy. Starting point until the foundation-level guidance is refactored. --- AI_POLICY.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 AI_POLICY.md diff --git a/AI_POLICY.md b/AI_POLICY.md new file mode 100644 index 0000000..4f1012f --- /dev/null +++ b/AI_POLICY.md @@ -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