Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions docs/release/trg-11/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "TRG 11 - Generative AI"
}
150 changes: 150 additions & 0 deletions docs/release/trg-11/trg-11-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
title: TRG 11.01 - Generative AI Usage Guidelines
---

| Status | Created | Post-History |
|--------|-------------|-------------------------------|
| Draft | 20-Jul-2026 | Initial contribution |

## Why

Generative AI tools (e.g., GitHub Copilot, ChatGPT, Google Gemini) are increasingly used by contributors to write code, documentation, and configuration. The Eclipse Foundation has established [Generative Artificial Intelligence Usage Guidelines for Eclipse Committers](https://www.eclipse.org/projects/handbook/#genai) that all Eclipse Tractus-X committers must follow.

Using AI-generated content without proper disclosure and licensing poses intellectual property risks. Since AI-generated content is likely not copyrightable under current law in the EU and U.S., it requires a distinct treatment from human-authored contributions. The [CC0-1.0](https://creativecommons.org/public-domain/cc0/) ("No Rights Reserved") dedication is widely used to designate AI-generated content that cannot be claimed under traditional copyright.

Transparency in AI usage builds trust within the community and ecosystem and is a fundamental requirement of the Eclipse Foundation Development Process (openness and transparency principles).

## Description

### Scope

This TRG applies to all content contributed to Eclipse Tractus-X repositories, including:

- Source code (`.java`, `.ts`, `.py`, `.go`, etc.)
- Configuration files
- Documentation (`.md`, `.mdx`, etc.)
- Tests and scripts

### Permitted Use of Generative AI

Committers **may** use generative AI tools to assist with contributions, provided they:

1. **Review and verify** all AI-generated content for correctness, security, and alignment with the project scope before merging.
2. **Disclose AI usage** in the file header and/or commit message as described below.
3. **Apply CC0-1.0** to any file that is **largely or entirely** AI-generated.
4. **Comply** with their employer's AI usage policy before using AI for Eclipse work.
5. **Use available anti-plagiarism and security tools** offered by the AI platform.
6. **Never push AI-generated content directly** without human review—a human must review and approve every commit.

### AI Disclosure in File Headers

For files that are **largely or entirely** generated by AI, the standard copyright header must be extended with an AI disclosure. The AI-generated portions are made available under **CC0-1.0** and are not subject to the Apache-2.0 project license.

**Example for a code file:**

```text
################################################################################
# Eclipse Tractus-X - <Repository Name>
#
# Copyright (c) 2026 Contributors to the Eclipse Foundation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please not "Contributors to the Eclipse Foundation" in examples. Just use

Suggested change
# Copyright (c) 2026 Contributors to the Eclipse Foundation
# Copyright (c) 2026 <Intellectual property owner of content>

or something similar

#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# AI Disclosure: This file was [minimally | largely | entirely] AI-generated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this section redundant to the assisted-by clause. I think, we need more than just a new TRG, e.g. We have the statement:

# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.

above, which could be extended to state, that for AI generated stuff, the CC0-1.0 applies. But we should also include this into the other main files, where we state Apache-2.0 and CC-BY-4.0 as project licenses. Then the AI-Generated-By section becomes obsolete.

One problem is, that it is difficult to tell, which license applies to which part of the file, as a reader cannot distinguish between human and ai creation. The options entirely and potentially also largely suggest, that the file is completely under CC0-1.0, whereas minimally suggest mainly Apache-2.0.

Since we run into devils kitchen, I suggest, that we do not exceed the requirements from the Eclipse Foundation and do not get creative at this stage.

# AI-Generated by: <Tool Name>. The AI-generated portions are made
# available under CC0-1.0 and not subject to the project's licence.
# The human contributor has reviewed and verified that the code is correct.
#
# SPDX-License-Identifier: Apache-2.0 AND CC0-1.0
# Assisted-by: <Provider> <Model-Family> (<Version/ID>)
################################################################################
```

**SPDX expression**: `Apache-2.0 AND CC0-1.0` — in SPDX, `AND` indicates that both licenses apply simultaneously (the adopter must accept both).

:::note
For files with only **minimal** AI assistance (e.g., a single code completion or a spelling fix), a full disclosure is **not required**. Use judgement: if you would credit a human for the contribution, provide an AI disclosure.
:::

### AI Disclosure in Commit Messages

Commits that contain AI-assisted content **should** include an `Assisted-by:` footer in the commit message. The format follows the [de facto standard from the Eclipse Handbook](https://www.eclipse.org/projects/handbook/#genai):

```text
Assisted-by: <Provider> <Model-Family> (<Version/ID>)
```

**Examples:**

```text
commit d6cf52411377a039fc2906378711091a26e932cb
Author: Real H. Uman <real@human.com>
Date: Wed Jul 20 10:00:00 2026 +0200

feat: Add data transformation utility

Implements the transformation logic for the BPN mapping service.

Assisted-by: GitHub Copilot (GPT-4o-2024-08-06)
```

```text
Assisted-by: Google gemini-2.5-pro (rev-1)
```

```text
Assisted-by: GitHub Copilot (Claude-Opus-4-2026-06-16)
```

Provide as much detail as is available. If the exact version is not known, specify at least the provider and model family.

### Identifying the AI Tool

Use the format:

```text
Assisted-by: [Provider] [Model-Family] ([Version/ID])
```

| Provider | Example |
|----------|---------|
| GitHub Copilot | `Assisted-by: GitHub Copilot (GPT-4o-2024-08-06)` |
| Google | `Assisted-by: Google gemini-2.5-pro (rev-1)` |
| Anthropic | `Assisted-by: Anthropic Claude-3.5-Sonnet (20241022)` |
| OpenAI | `Assisted-by: OpenAI GPT-4o (2024-08-06)` |

### AI_POLICY.md

Each repository **should** include an `AI_POLICY.md` file in the repository root that specifies the project's rules for AI usage. See [TRG 11.02](trg-11-02.md) for the required content and a template.

### Available Tools

GitHub Copilot is available at no cost to all Eclipse Tractus-X committers who wish to use it. Committers may also use other AI platforms, provided they comply with this TRG and the [Eclipse Generative AI Usage Guidelines](https://www.eclipse.org/projects/handbook/#genai).

### Committer Responsibilities

As stated in the Eclipse Handbook, committers who use AI tools are responsible for:

- Understanding their employer's policy on AI use and ensuring consistency with Eclipse obligations.
- Reviewing the terms of use, privacy policy, and other documents of any AI platform they use.
- Being judicious about inputs — never entering confidential data or personally identifiable information into AI platforms.
- Verifying the accuracy and security of all AI-generated content before merging.
- Accepting contributions containing AI-generated code only when the disclosure requirements above are met.

## References

- [Eclipse Foundation Generative AI Usage Guidelines for Eclipse Committers](https://www.eclipse.org/projects/handbook/#genai)
- [CC0-1.0 Public Domain Dedication](https://creativecommons.org/public-domain/cc0/)
- [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0)
- [SPDX License Expressions](https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/)
122 changes: 122 additions & 0 deletions docs/release/trg-11/trg-11-02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
title: TRG 11.02 - AI_POLICY.md Requirements
---

| Status | Created | Post-History |
|--------|-------------|-------------------------------|
| Draft | 20-Jul-2026 | Initial contribution |

## Why

An `AI_POLICY.md` file makes the project's stance on AI usage **transparent** to every contributor. It explicitly communicates which AI tools are recommended, what quality requirements must be met for AI-assisted contributions, and which—if any—restrictions apply. This transparency aligns with the Eclipse Foundation's open-source rules of engagement and helps contributors make informed decisions before using AI tools.

The Eclipse Handbook recommends that each repository establish and publish its AI contribution policy so contributors can consult it before submitting work.

## Description

Each Eclipse Tractus-X repository **should** include an `AI_POLICY.md` file at the root of the repository. This file must be maintained alongside the `CONTRIBUTING.md`, `SECURITY.md`, and `CODE_OF_CONDUCT.md` files.

### Required Content

The `AI_POLICY.md` file **must** cover the following topics:

1. **Project stance on AI usage** — whether AI assistance is allowed, under which conditions.
2. **Recommended tools** — AI platforms that committers are encouraged to use (e.g., GitHub Copilot).
3. **Quality requirements** — minimum expectations for AI-assisted contributions (e.g., tests must pass, code must be reviewed by a human).
4. **Disclosure requirements** — reference to [TRG 11.01](trg-11-01.md) for header and commit message requirements.
5. **Restrictions** — any content types or areas where AI assistance is discouraged or prohibited (e.g., cryptographic implementations, security-sensitive code).
6. **Review process** — how AI-generated contributions are reviewed and what the merge criteria are.

### Template

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should decide on two fixed versions of the file, one for usage with AI and one without AI, I doubt, that it brings much benefit to let everyone formulate a file on themselves.


The following template **may** be adapted for each repository:

````markdown
# AI Usage Policy for <Repository Name>

This document describes the policy for using Generative AI tools in contributions
to the `<repository-name>` Eclipse Tractus-X repository.

## Allowed AI Usage

Contributors and committers **may** use Generative AI tools (e.g., GitHub Copilot,
Google Gemini, ChatGPT) to assist with:

- Code generation and refactoring
- Documentation and comments
- Test generation
- Configuration files

## Recommended Tools

[GitHub Copilot](https://github.com/features/copilot) is available for all Eclipse Tractus-X
committers at no cost and is the recommended tool for AI-assisted development.

## Disclosure Requirements

All AI-assisted contributions **must** follow [TRG 11.01](https://eclipse-tractusx.github.io/docs/release/trg-11/trg-11-01):

- Files that are **largely or entirely** AI-generated must include an AI disclosure
in the file header and use `SPDX-License-Identifier: Apache-2.0 AND CC0-1.0`.
- Commits containing AI-assisted content **should** include an `Assisted-by:` footer:

```text
Assisted-by: GitHub Copilot (GPT-4o-2024-08-06)
```

## Quality Requirements

All AI-generated contributions must meet the following quality criteria before merging:

- [ ] **Human review**: A committer must review and understand all AI-generated code.
- [ ] **Tests pass**: All existing tests must pass; new functionality must include tests.
- [ ] **No security vulnerabilities**: Use available tools (e.g., GitHub Dependabot,
CodeQL) to scan for vulnerabilities.
- [ ] **No copied third-party code**: Use AI platform anti-plagiarism tools where available.
- [ ] **Code style**: Generated code must comply with the project's code style guidelines.
- [ ] **Documentation**: Public APIs and complex logic must be documented.

## Restrictions

AI assistance is **not recommended** for:

- Cryptographic implementations (must be reviewed by a security expert)
- Security-sensitive authentication and authorization logic
- Processing of personally identifiable information (PII)

## Review Process

Pull requests containing AI-generated content are subject to the same review
process as all other contributions. Reviewers should:

1. Verify that the disclosure requirements are met.
2. Confirm that the code is functionally correct and not just syntactically valid.
3. Check for security vulnerabilities and edge cases that AI tools may miss.
4. Ensure that generated tests actually validate meaningful behavior.

## Questions

If you have questions about this policy, reach out on the project's communication
channels or open a GitHub issue.
````

### Placement

The `AI_POLICY.md` file must be placed in the **root** of the repository alongside other governance files:

```text
<repository-root>/
├── AI_POLICY.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── NOTICE.md
├── README.md
└── SECURITY.md
```

## References

- [TRG 11.01 - Generative AI Usage Guidelines](trg-11-01.md)
- [Eclipse Foundation Generative AI Usage Guidelines for Eclipse Committers](https://www.eclipse.org/projects/handbook/#genai)
- [TRG 1.01 - README.md](../trg-1/trg-1-01.md)
14 changes: 14 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,20 @@ const sidebars = {
},
],
},
{
type: 'category',
label: 'TRG 11 - Generative AI',
link: {
type: 'generated-index',
},
collapsed: true,
items: [
{
type: 'autogenerated',
dirName: 'release/trg-11',
},
],
},
],
},
{
Expand Down
Loading