Skip to content

Commit 43a6811

Browse files
chmouelclaude
andcommitted
docs: require LLM assistance disclosure for PRs
- fix shellcheck issues in add-llm-coauthor.sh - rename add-llm-coauthor to add-llm-coauthor.sh - Add section to developer docs outlining mandatory AI/LLM usage disclosure - Update PR template to reference helper script for co-author trailers - Rename add-llm-coauthor script for clarity - Promote transparency and proper attribution in collaborative development - Address organizational compliance for AI tool usage Co-authored-by: Claude <[email protected]> Signed-off-by: Chmouel Boudjnah <[email protected]>
1 parent 42fdcdf commit 43a6811

File tree

3 files changed

+61
-6
lines changed

3 files changed

+61
-6
lines changed

.github/pull_request_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ If you have used AI assistance, please provide the following details:
6262
> Co-authored-by: Claude <[email protected]>
6363
> Co-authored-by: Cursor <[email protected]>
6464
> Co-authored-by: Copilot <[email protected]>
65+
>
66+
> **💡You can use the script `./hack/add-llm-coauthor.sh` to automatically add
67+
> these co-author trailers to your commits.
6568
6669
## ✅ Submitter Checklist
6770

docs/content/docs/dev/_index.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,61 @@ for arm64.
432432
- A GitHub action is using [ko](https://ko.build/) to build the amd64 and arm64 images whenever there is
433433
a push to a branch or for a release.
434434

435+
## LLM Assistance Disclosure
436+
437+
When submitting a pull request to Pipelines-as-Code, contributors must disclose
438+
any AI/LLM assistance used during development. This promotes transparency and
439+
proper attribution in our collaborative development environment.
440+
441+
### Required Disclosure
442+
443+
All contributors must:
444+
445+
1. **Check the appropriate boxes** in the PR template's "🤖 AI Assistance"
446+
section
447+
2. **Specify which LLM was used** (GitHub Copilot, ChatGPT, Claude, Cursor,
448+
Gemini, etc.)
449+
3. **Indicate the extent of assistance** (documentation, code generation, PR
450+
description, etc.)
451+
4. **Add Co-authored-by trailers** to commit messages when AI significantly
452+
contributed to the code
453+
454+
### Adding Co-authored-by Trailers
455+
456+
For commits where AI contributed significantly to the code, add appropriate
457+
`Co-authored-by` trailers to your commit messages. You can use our helper
458+
script to automate this process:
459+
460+
```shell
461+
./hack/add-llm-coauthor.sh
462+
```
463+
464+
This interactive script will:
465+
466+
- Help you select commits that used AI assistance
467+
- Choose which AI assistants to credit
468+
- Automatically add proper `Co-authored-by` trailers to your commit messages
469+
470+
**Examples of Co-authored-by trailers:**
471+
472+
```text
473+
Co-authored-by: Claude <[email protected]>
474+
Co-authored-by: ChatGPT <[email protected]>
475+
Co-authored-by: Cursor <[email protected]>
476+
Co-authored-by: Copilot <[email protected]>
477+
Co-authored-by: Gemini <[email protected]>
478+
```
479+
480+
### Why We Require This
481+
482+
- **Transparency**: Helps reviewers understand the development process
483+
- **Attribution**: Properly credits AI tools that significantly contributed
484+
- **Learning**: Helps the team understand effective AI-assisted development patterns
485+
- **Compliance**: Meets organizational requirements for AI tool usage tracking
486+
487+
See the [PR template](.github/pull_request_template.md) for complete details on
488+
the AI assistance disclosure requirements.
489+
435490
## Testing External contributor Pull Requests for E2E Testing
436491

437492
When an external contributor submits a pull request (PR), E2E tests may not run

hack/add-llm-coauthor renamed to hack/add-llm-coauthor.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,7 @@ if [[ ${#commit_args[@]} -eq 0 ]]; then
575575
else
576576
# Direct commit selection: use provided commit arguments
577577
echo "🎯 Direct commit selection: Using provided commit references"
578-
mapfile -t selected_commits < <(validate_commits "${commit_args[@]}")
579-
if [[ $? -ne 0 ]]; then
578+
if ! mapfile -t selected_commits < <(validate_commits "${commit_args[@]}"); then
580579
echo "❌ Commit validation failed. Exiting."
581580
exit 1
582581
fi
@@ -589,8 +588,7 @@ if [[ "$remove_mode" == "true" ]]; then
589588
if [[ -n "$remove_llms" ]]; then
590589
# Auto remove mode: use provided LLM list
591590
echo "🗑️ Auto LLM removal: Using provided LLMs"
592-
mapfile -t selected_llms < <(validate_llms "$remove_llms")
593-
if [[ $? -ne 0 ]]; then
591+
if ! mapfile -t selected_llms < <(validate_llms "$remove_llms"); then
594592
echo "❌ LLM validation failed. Exiting."
595593
exit 1
596594
fi
@@ -608,8 +606,7 @@ else
608606
if [[ -n "$auto_llms" ]]; then
609607
# Auto LLM selection: use provided LLM list
610608
echo "🤖 Auto LLM selection: Using provided LLMs"
611-
mapfile -t selected_llms < <(validate_llms "$auto_llms")
612-
if [[ $? -ne 0 ]]; then
609+
if ! mapfile -t selected_llms < <(validate_llms "$auto_llms"); then
613610
echo "❌ LLM validation failed. Exiting."
614611
exit 1
615612
fi

0 commit comments

Comments
 (0)