Skip to content

adding a PR template with basic structure and in-line user guidance - #5957

Merged
softhack007 merged 7 commits into
mainfrom
PR_template
Nov 4, 2026
Merged

softhack007 merged 7 commits into
mainfrom
PR_template

Conversation

@softhack007

@softhack007 softhack007 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member
  • PR template
  • guardrails for AI agents: use the template!

Summary by CodeRabbit

  • Documentation
    • Added a pull request template prompting contributors to describe changes and context, disclose AI assistance and verification, explain implementation, report testing and limitations, and confirm review and contributor responsibilities.
    • Added guidance for agents to use the template and complete every section when drafting pull request descriptions. Additional information may be included below the template.

* PR template
* guardrails for AI agents: use the template!
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds a pull request template with prompts for change details, references, AI assistance, implementation, testing, and contributor responsibilities. Updates AGENTS.md to require contributors to use the template and complete all sections.

Changes

Pull Request Description Guidance

Layer / File(s) Summary
Template and repository guidance
.github/PULL_REQUEST_TEMPLATE.md, AGENTS.md
The template requests change details, references, AI assistance, implementation details, testing, and checklist responses. AGENTS.md requires contributors to use the template and complete all sections.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: dedehai

Merge Risk: Minimal · up to b33f1

No actionable issue remains in the supplied changes; this PR is mergeable after normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title "adding a PR template with basic structure and in-line user guidance" matches the main change. The PR replaces the pull request template at .github/PULL_REQUEST_TEMPLATE.md with prompts for …
Full details: Title check

Explanation

The title "adding a PR template with basic structure and in-line user guidance" matches the main change. The PR replaces the pull request template at .github/PULL_REQUEST_TEMPLATE.md with prompts for describing the change, AI assistance disclosure, implementation, testing, limitations, and review responsibilities. The AGENTS.md change (one line requiring agents to use the template) is a minor supporting change. The title is specific and single-sentence, though it uses lowercase and the phrase "in-line user guidance" is slightly vague. It does not describe anything absent from the changeset.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: wled/WLED
  • Branch: PR_template
  • File: .coderabbit.yaml
  • Commit: b33f110
  • Layers: Repository YAML (base), Repository UI (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9646c65e-032e-4a5c-9052-b01f83a39823
Commits

Reviewing files that changed from the base of the PR and between 4e4363f and b33f110.

Files selected for processing: 1
  • .github/PULL_REQUEST_TEMPLATE.md
Files skipped from review as they are similar to previous changes: 1
  • .github/PULL_REQUEST_TEMPLATE.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Recent review details
Context from checks skipped due to timeout: 1
  • GitHub Check: CodeRabbit
Additional context used
Learnings: 1
Common learnings
Learnt from: softhack007
Repo: wled/WLED PR: 5957
File: AGENTS.md:339-339
Timestamp: 2026-11-04T16:17:39.971Z
Learning: Within repository "wled/WLED", only for files matching one of ["AGENTS.md"]: When reviewing PR-template requirements in AGENTS.md, evaluate them as instructions for AI agents. Require agents to retain and complete the AI disclosure section. Do not flag the requirement to populate every section as conflicting with an omission option intended for contributors who used no AI.
Learnt from: CR
Repo: wled/WLED

Timestamp: 2026-11-04T18:00:31.745Z
Learning: Source excerpt:
# AGENTS.md — WLED AI Coding Agent & AI Code Review Reference

## General Rules

- Important: Repository language is **English**. This applies to source code (including comments), commit messages and any kind of documentation for developer or users.
Learnt from: CR
Repo: wled/WLED

Timestamp: 2026-11-04T17:59:36.135Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
See also: `.github/copilot-instructions.md`, `.github/agent-build.instructions.md`,
`docs/cpp.instructions.md`, `docs/web.instructions.md`, `docs/cicd.instructions.md`,
`docs/hardening.instructions.md`, `docs/securecode.instructions.md`.

Source excerpt:
# WLED - ESP32/ESP8266 LED Controller Firmware

## General Guidelines

- **Repository language is English.** Suggest translations for non-English content.

coderabbitai[bot]

This comment was marked as resolved.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@softhack007

Copy link
Copy Markdown
Member Author

@coderabbitai please check .github/PULL_REQUEST_TEMPLATE.md against github documentation and recommendations for PR templates.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Analysis chain

Script executed:

#!/bin/bash
set -euo pipefail
fd --hidden --exclude .git '^(PULL_REQUEST_TEMPLATE\.md|AGENTS\.md)$' .
printf '\n--- Pull request template ---\n'
nl -ba .github/PULL_REQUEST_TEMPLATE.md
printf '\n--- Root agent instructions ---\n'
nl -ba AGENTS.md | sed -n '1,230p'
printf '\n--- Additional GitHub directory agent instructions ---\n'
find .github -name AGENTS.md -print -exec cat {} \;

Length of output: 19429


web_search executed:

Find official GitHub Docs on creating a pull request template for a repository, accepted filenames and locations (.github/PULL_REQUEST_TEMPLATE.md), default branch requirement, supported Markdown task lists and HTML comments, and recommendations for pull request description content (purpose, context, testing, linked issues). Distinguish GitHub requirements from optional recommendations. Provide source URLs and relevant excerpts.

Length of output: 17672


web_search executed:

Retrieve official GitHub Docs excerpts for (1) basic writing and formatting syntax: task lists using - [ ] or * [ ], and hiding content with HTML comments; (2) best practices for pull requests: clear descriptions, purpose, overview, context, testing; (3) linking a pull request to an issue with Closes #123 and the default branch condition. Provide exact source URLs. Avoid unrelated issue-template and repository-template documents.

Length of output: 30980


@softhack007 I checked .github/PULL_REQUEST_TEMPLATE.md against GitHub’s documentation. The template uses a supported location and format. I found no GitHub compatibility issue.

What meets GitHub’s guidance

  • Filename and location: .github/PULL_REQUEST_TEMPLATE.md is supported. GitHub treats PR template filenames as case-insensitive. The template becomes available automatically after it reaches the repository’s default branch. Template documentation
  • Markdown: The headings, HTML comments, and task lists use valid syntax. Both * [ ] and - [ ] work. HTML comments provide instructions without appearing in the rendered description. Formatting documentation
  • Content: The sections request purpose, context, technical details, testing, and limitations. The checklist also asks contributors to review their own changes. These requests align with GitHub’s review guidance. Helping others review your changes
  • AI disclosure: This is a WLED policy choice, not a GitHub template requirement. GitHub does not prescribe a fixed set of PR template sections.

Optional improvements

  1. Allow “not applicable” for testing — Line 32–Line 33. Documentation-only changes do not need firmware compilation or hardware testing. Add a short instruction to explain unchecked items or mark them “N/A.”
  2. Use plain bullets for limitations — Line 34–Line 35. These items request information rather than confirm completed tasks. Plain bullets would make their meaning clearer. This is a usability recommendation, not a syntax defect.
  3. Show issue-linking examples — Line 11. Suggest Related to #123 for context and Closes #123 when the PR resolves an issue. Closing keywords take effect only when the PR targets the default branch. Issue-linking documentation

Important distinction: A Markdown PR template pre-fills the description. It does not enforce section completion or checked boxes. Any required completion rule needs a separate check or human review.

No filename, directory, or format change is needed. This assessment covers the source and documentation; I did not test automatic insertion in GitHub’s new-PR interface.

You are interacting with an AI system


Learnings used
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:16:08.536Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Code style

#### Blocks

Prefer compact function parameter lists and `if` conditions rather than putting each parameter or condition part on its own line. Wrap parameter lists only when they become very long.
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:16:08.536Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Code style

#### Comments

Comments should have a space between the delimiting characters (e.g. `//`) and the comment text.
We're gradually adopting this style - don't worry if you see older code without spaces!
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:16:08.536Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Code style

#### Blocks

There should always be a space between a keyword and its condition and between the condition and brace.  
Within the condition, no space should be between the parenthesis and variables.  
Spaces between variables and operators are up to the authors discretion.
There should be no space between function names and their argument parenthesis.
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:24:49.630Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Code style

#### Blocks

Whether the opening bracket of e.g. an `if` block is in the same line as the condition or in a separate line is up to your discretion. If there is only one statement, leaving out block brackets is acceptable.
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:16:08.536Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Code style

Don't stress too much about style! When in doubt, just match the style in the files you're editing. 😊
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:16:08.536Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Code style

#### Comments

There is no hard character limit for a comment within a line,
though as a rule of thumb consider wrapping after 120 characters.
Inline comments are OK if they describe that line only and are not exceedingly wide.
Learnt from: CR
Repo: wled/WLED PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-10-31T16:24:49.630Z
Learning: Applicability reference:
AGENTS.md: # AGENTS.md — WLED AI Coding Agent & AI Code Review Reference
## Required User Agreement
### No agent-posted replies or issues
Reviewer time is limited, and checking long AI-generated explanations for reasoning errors and hallucinations is costly. Even after the user agreement is confirmed:

- Creating or updating pull requests remains allowed (after the user agreement is confirmed). Keep PR descriptions concise and factual, and include a summary written by the user in their own words, leading with what they want to achieve or what bothers them in plain language, as described in [CONTRIBUTING.md](CONTRIBUTING.md#opening-issues--feature-requests).

Source excerpt:
# Thank you for making WLED better!

## Coding Guidelines

### Source Code from an AI agent or bot

#### Best Practice with AI

- ✅ **Be transparent** - Add comments `// AI: below section was generated by an AI` ... `// AI: end` around larger chunks

You are interacting with an AI system.

* change non-checklist items into bullet points
* examples for links
* small clarification for the "I have personally reviewed" checklist item
coderabbitai[bot]

This comment was marked as low quality.

@softhack007

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as duplicate.

Clarify that agents are allowed to add more information after filling the template.
@softhack007 softhack007 changed the title adding a PR template with basic structure and user guidelines adding a PR template with basic structure and in-line user guidance Nov 4, 2026
@softhack007
softhack007 merged commit d7cfcf9 into main Nov 4, 2026
66 checks passed
@softhack007
softhack007 deleted the PR_template branch November 4, 2026 20:58

<!-- Testing you performed, and known limitations. Anything you couldn't quite solve. Let us know if you'd like guidance from a maintainer -->

* [ ] It compiles without error: _please list platformio build environments_

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feels redundant. The CI pipeline will tell us if it builds ok

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good point, you're right we can remove this item


- [ ] _In the case of AI agents being involved:_ As a human contributor, I understand that I am fully responsible for this PR.
- [ ] I have personally reviewed all changes (incl. source code) before opening this PR.
- [ ] I am ready to explain my proposed changes line-by-line (without any AI agent responding on my behalf).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This feels a bit too heavy

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Well depends if you mean the "line-by-line" or the overall list?

  • We can remove "i am fully responsible" because that's somewhat obvious 🤔
  • the line-by-line checkbox is kind of an early defense against vibe coders - if you can't explain every line, why should I (as reviewer) try to fill that gap?

Maybe the wording is a bit too strong, i'm open for suggestions.

@softhack007 softhack007 Nov 5, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@netmindz proposal

  • remove the first checkbox
  • change item 3 to "I'm ready to explain my proposed changes (without an AI agent answering for me)."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That is certainly an improvement. I'm still a bit conflicted about "blocking" PRs from anyone who isn't a developer

@softhack007 softhack007 Nov 7, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For me its not "are you a developer or not", its more "do you understand this code". Even a hobby coder (maybe writing a usermod) should be able to explain what his code does, and why it seems to work. Maybe some answer will be like "just copied this from the example, and then changed a few UI labels". That's still a way of "i can explain it".

A major pain we had with some PRs like the "auto-translate UI" chinese one. Whenever we asked "why do you program it like this", the response was "understood, my AI has completely rewritten everything now, is that better?"

I'm open to discussion and suggestions here.

Edit: we might allow people to mark a PR as "POC" to waive the "i can explain my code" requirement. Like your SyncV2 one, which was more to share an idea than to have high quality code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do agree with @softhack007 on this. If the issue can be solved with a few AI prompts, we don't really need someone inexperienced in coding to do it, opening an issue would be less work in that case.
For a draft as a discussion basis a fully vibe coded suggestion is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants