openEuler Community Generative AI Use and Open Source Contribution Policy
1. Openness Strategy
Guided by the spirit of openness, collaboration, and innovation, the openEuler community recognizes generative AI and intelligent agents as essential drivers for operating system evolution. While we allow the use of generative AI tools in making contributions, provided such use is reasonable, transparent, and reviewable, we strictly adhere to the following principles:
Core Principle 1: Open & AI-Development-Oriented
The openEuler community actively embraces new technologies. Driven by a development-oriented culture, we welcome both developers and automated agents to contribute deeply to the community, whether through code writing, document translation, test case generation, or O&M automation. We are committed to building an intelligent open-source ecosystem that is equally friendly to both human developers and AI agents.
Core Principle 2: Developer Ultimate Responsibility
AI is merely an auxiliary tool, and human developers shall bear ultimate legal and quality liability. Whether an output is self-developed or generated, triggered, and submitted with AI assistance, contributors must assume final responsibility for the accuracy, security, compliance, and quality of their submissions. Review, merging, or publishing by community maintainers does not constitute an endorsement or warranty by the community that the AI output is free of infringement, secure, or fit for a particular purpose.
Core Principle 3: Transparency and Traceability
Contributors should disclose the use of AI tools, sources of third-party materials, license information, and human review status. The community enforces a strict metadata tracking system to fully log critical metadata for AI-generated content, including the agent platform, model, and prompt summaries. This guarantees a clear audit trail for every line of AI-assisted code.
2. Scope of Application
This policy applies to all forms of contributions submitted to the openEuler community (including but not limited to all AtomGit and documentation repositories under the openEuler organization):
- Source code and scripts:including various core code, test cases, and build scripts.
- Technical documents and community content:including API references, deployment guides, release logs, and Wiki pages.
- Configurations and metadata:including RPM Spec files, Containerfiles/Dockerfiles, and CI/CD configuration files.
3. Legal & Compliance
Any submissions incorporating AI-generated content to the openEuler community shall be governed by the following legal and compliance frameworks:
3.1 Contributor License Agreement (CLA)
The openEuler community implements a Contributor License Agreement (CLA).
- Contributors must sign the CLA before submitting any contributions.
- According to the CLA, when a contributor submits AI/agent-generated content, the contributor is deemed to have full, lawful rights to dispose of that submission, or have been fully authorized to do so. The AI-generated nature of the content shall not serve as a ground to exempt the contributors from their intellectual property guarantees, non-infringement obligations, and related legal liabilities pledged in the CLA.
3.2 Traceability: Full Logging of Key Metadata
For any code or documents fundamentally generated by AI or automatically processed by AI/agents, the following key metadata must be fully recorded and attached when submitting a pull request. This metadata can be recorded in the templates of the commit message and pull request.
Commit message template:
- Co-Authored-By: Specify the name of the model used to generate the content.
Pull request template:
- Agent Platform: Specify the name and version of the agent platform used (e.g., Claude Code 2.1.156, Qwen Code 0.16.1, etc.).
- Model: Specify the name and version of the generative AI model used (e.g., GPT-4o, DeepSeek-V3, etc.).
- Prompt Summary: Briefly describe the core prompts or intent that guided the AI generation (e.g., "Optimize memory allocation for Spec file"). Any under-the-table operations are strictly prohibited.
Example (pull request):
### AI involvement in this PR:
[] No
[x] Yes
__1. AI agent platform: Claude Code 2.1.156
__2. AI model: DeepSeek-V3
__3. Prompt summary: Based on the existing code logic, complete the code, optimize logic, add missing branches, and improve annotations to help with function development and problem fixing.
### Notes for reviewers:
1. The code was developed with AI assistance. I have manually reviewed the logic line-by-line and verified its functionality to ensure it behaves exactly as expected.Example (commit message):
Co-Authored-By: Claude Opus 4.74. Standard Prompt for Agents
To ensure that various AI programming assistants and automated agents (such as automated PR reviewers and auto-fixing agents) strictly comply with the preceding policies when serving the openEuler community, the following system prompt is formulated:
# Role and objective:
You are an AI agent dedicated to serving the openEuler community. Your goal is to assist human developers in contributing efficiently while strictly adhering to the compliance baseline, ensuring all outputs meet the openEuler community's legal and quality standards.
# Core Code of Conduct
## 1. Clarify responsibilities and development orientation.
- You serve as an efficiency amplifier for developers, but you must understand that human developers will bear the ultimate legal and quality liability for your outputs. Therefore, your generated code must be clean, readable, and easy for human developers to review.
- Do not generate any complex code blocks with ambiguity, debugging difficulties, or black-box logic.
## 2. Legal and license compliance (red line)
- You are strictly prohibited from directly replicating or paraphrasing any code snippets from restrictive GPL-licensed repositories (e.g., GPL 3.0) or exclusive commercial software without adhering to the applicable licenses.
- If your code directly references specific open-source components or public algorithmic implementations, you must explicitly declare the source and original license.
## 3. Explicit exposure of key metadata
- When assisting humans in code generation or when independently submitting PRs to openEuler repositories as an automated agent, you must use the designated PR template. The metadata must include:
- Agent platform: [Agent platform name and version]
- AI model: [AI model name and version]
- Prompt summary: [core prompts or intent]
- When assisting humans in code generation or when independently committing code to openEuler repositories as an automated agent, you must use the designated commit message template. The metadata must include:
- Co-Authored-By: [collaborating model name]
## 4. openEuler technology stack adaptation
- Code style: Before submitting any code, analyze the coding style of the target repository. Your modifications must strictly conform to that repository's code style guide.
- Security first: Do not introduce security vulnerabilities such as memory leaks and buffer overflows. Always prefer openEuler-verified, secure functions.5. Prohibited or Risky Behaviors
- Unreviewed AI outputs;
- Code that contributors cannot explain, maintain, or verify the source of;
- Content where AI clearly reproduces third-party code, documentation, images, or copyrighted expressions without providing legitimate sources, licenses, and necessary attributions;
- Content that is incompatible with the project's license;
- Content that violates AI terms of service, employer policies, confidentiality obligations, export controls, data compliance regulations, or third-party rights;
- Prompts, outputs, or contributions that contain trade secrets, personal information, sensitive data, private code, internal documents, or undisclosed vulnerability information;
- Contributions submitted in batch by AI agents, low-quality submissions, spam issues/PRs, or any contributions lacking substantial participation by human contributors.
6. Contributor Responsibilities
When submitting AI-assisted contributions, contributors shall acknowledge and agree that they:
- Have manually reviewed the submitted content;
- Understand the technical implications, design impact, and maintenance costs of the contribution;
- Have completed all necessary testing, builds, license checks, and security reviews;
- Have verified that the AI output does not introduce content incompatible with the project license;
- Have confirmed that the contribution does not include any known unauthorized third-party materials, or that any third-party materials, licenses, copyright notices, and attributions have been fully disclosed as required by the project;
- Have complied with all applicable policies of their employers, clients, academic institutions, or affiliated organizations regarding AI tools and open-source contributions;
- Take the same responsibility for contributions as for non-AI-assisted contributions.
7. Review and Merging Rules
Maintainers may request modifications, additional explanations, resubmissions, or reject a contribution for any of the following reasons:
- Failure to disclose the use of AI as required;
- Contributors' inability to explain the code logic or source;
- Suspicion that the contribution reproduces third-party code, documents, or images;
- Unclear information regarding licenses, copyrights, patents, or attributions;
- Poor quality, lack of testing, unmaintainability, or security risks in the AI-generated content;
- Automated, mass, or low-quality AI-generated submissions that disrupt the maintainability and operations of the community;
- Contribution considered inappropriate for merging based on the project's risk control.
