openGauss Community Code of Conduct

1. To build an open and friendly environment, we as contributors and maintainers pledge to make participation in our community a harassment-free experience for participants of the program and community, regardless of age, body size, visible or invisible disability, ethnicity, level of experience, education, socioeconomic status, nationality, personal appearance, or race.

2. Behaviors that contribute to a positive environment for our community include:

  • (1) Friendly and inclusive wording;
  • (2) Respecting different viewpoints and experiences;
  • (3) Gracefully accepting constructive feedback;
  • (4) Focusing on what is best for the community;
  • (5) Demonstrating kindness toward other people.
  • (6) Compliant code submissions, proper use of permissions, and safeguarding project supply chain and infrastructure security.

3. Unacceptable behaviors in the program and community include:

  • (1) Use of sexualized and violent language or imagery;
  • (2) Disruption, incitement, rumor-making, insulting, derogatory comments, and personal and political attacks;
  • (3) Public or private harassment to participants in the program and community;
  • (4) Publishing others' information, such as physical and email addresses, without their explicit authorization;
  • (5) Implanting malicious backdoors, polluting project dependencies, destroying project assets, and other violations that endanger community security;
  • (6) Other conduct that can reasonably be considered as a violation of this Code of Conduct.

4. Community project maintainers are responsible for clarifying and enforcing our standards of "proper conduct" and will take appropriate and fair corrective action in response to any conduct that they deem inappropriate. Community project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, and issues that violate this Code of Conduct, and will temporarily or permanently ban any participant because of the behavior they consider to be threatening, offensive, or harmful.

5. This Code of Conduct applies within all community spaces, and applies when an individual represents the community in public spaces.

6. Examples of representing the community include using an official email address, posting through an official media account, and participating in online or offline events as an appointed representative.

7. The program office can further define and interpret the conduct of representing the community and report to the openGauss Committee for approval and publishing.

openGauss Community Generative AI Use and Open Source Contribution Policy

1. Openness Strategy

Guided by the spirit of openness, collaboration, and innovation, the openGauss community recognizes generative AI and intelligent agents as essential drivers for advancing community technologies. 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 openGauss community actively embraces new technologies. Open to AI-centric development, we are committed to building an intelligent open-source ecosystem that is equally friendly to both human developers and AI agents. The openGauss community welcomes both developers and automated agents to contribute deeply to the community, whether through code writing, document translation, test case generation, or O&M automation.

  • Core Principle 2: Developer Ultimate Responsibility

    AI is strictly a supporting tool for human contributors. Human contributors hold ultimate responsibility and legal accountability for the quality of their submissions. Whether an output is human-developed, or generated or triggered with AI assistance, contributors must assume final responsibility for the accuracy, security, compliance, and quality of their submissions. Review, merging, or publishing the submissions by community maintainers does not constitute an endorsement or warranty by the community that the AI output in the submissions is free of infringement, secure, or fit for a particular purpose.

  • Core Principle 3: Transparency and Traceability

    Upon submission, contributors should disclose the use of AI tools, sources of third-party materials, license information, and human review status associated with the submission. The openGauss 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 AI-assisted code contributions.

2. Scope of Application

This policy applies to all forms of contributions submitted to the openGauss community (including but not limited to all code and documentation repositories under the openGauss 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 Containerfiles/Dockerfiles, and CI/CD configuration files.

3. Legal & Compliance

Any submissions incorporating AI-generated content to the openGauss community shall be governed by the following legal and compliance frameworks:

3.1 Contributor License Agreement (CLA)

The openGauss community implements a Contributor License Agreement (CLA).

  • Contributors must sign the CLA before submitting any contributions.
  • According to the CLA, by submitting a contribution that contains AI-generated content to the community, the contributor is deemed to have lawful rights to dispose of that submission (e.g., having obtained sufficient authorization). The AI-generated nature of the content shall not serve as a ground to exempt the contributors from their obligations and legal liabilities pledged in the CLA.

3.2 Traceability: Full Logging of Key Metadata

For contributions that contain code or documents fundamentally generated or automatically processed by AI, contributors shall fully record and attach the following key metadata when submitting a pull request. This metadata can be recorded in the pull request template.

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 Specfile"). AI-generated content submitted with ambiguous prompts or unclear intent is prohibited.

Example (pull request):

### AI involvement in this PR:
[]  No
[x]  Yes
__1. Agent platform: Claude Code 2.1.156
__2. 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. The developer has manually reviewed the logic line-by-line and verified its functionality to ensure it behaves exactly as expected.

4. 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 openGauss community, the following system prompt is formulated:

# Role and objective:
You are an AI agent dedicated to serving the openGauss community. Your goal is to assist human developers in contributing efficiently while strictly adhering to the compliance baseline, ensuring all outputs meet the openGauss community's compliance 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)
- Do not directly replicate or paraphrase any code snippets from repositories under restrictive licenses (such as GPL-2.0, GPL-3.0, etc.) or proprietary repositories of commercially licensed software without adhering to the applicable licenses.
- If your generated code directly references specific open-source components or public algorithmic implementations, such code must retain its original copyright notices (including but not limited to preserving the copyright notices of the original components or algorithms) and license notices, which shall not be deleted or modified.

## 3. Explicit exposure of key metadata
- When assisting humans in code generation or when independently submitting PRs to openGauss repositories as an automated agent, you must use the designated PR template. The metadata must include:
  - Agent platform: [Agent platform name and version]
  - Model: [AI model name and version]
  - Prompt summary: [core prompts or intent]

## 4. openGauss technology stack adaptation
- Code style: Before submitting any code to the openGauss community, 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 secure functions verified by the openGauss community.

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 or lacking substantial participation by human contributors.

6. Contributor Responsibilities

When submitting AI-assisted contributions to the community, contributors shall acknowledge and agree that they:

  • Have manually reviewed the AI-assisted contributions to be submitted;
  • Understand the technical implications, design impact, and maintenance costs of the AI-assisted contributions to be submitted;
  • Have completed all necessary testing, builds, license checks, and security reviews on the AI-assisted contributions to be submitted;
  • Have verified that the AI output does not introduce content incompatible with the project license;
  • Have confirmed that the AI-assisted contributions do 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 this project;
  • Have complied with all applicable policies of the contributors' employers, clients, academic institutions, or affiliated organizations regarding AI tools and open-source contributions;
  • Take the same responsibility for AI-assisted contributions as for non-AI-assisted contributions.

7. Review and Merging Rules

Community maintainers may request modifications, additional explanations, resubmissions of AI-assisted contributions by the contributors, or reject AI-assisted contributions for any of the following reasons:

  • The contributor fails to disclose information regarding the AI-assisted contribution as required;
  • The contributor is unable to explain the logic or source of the submitted code;
  • The contribution is substantially similar to unauthorized third-party code, documentation, or images;
  • The licensing, copyright, or attribution information is unclear;
  • The AI-assisted contribution is of poor quality, untested, unmaintainable, or introduces security risks;
  • Automated, mass submissions of low-quality AI-assisted contributions disrupt the maintainability and operations of the community;
  • The community maintainers consider the AI-assisted contribution inappropriate for merging based on the openGauss project's risk control.