From e4e3565cd68162092ba2de8c1b79a4d290254ef8 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Wed, 3 Dec 2025 15:13:38 +0100 Subject: [PATCH] Update CONTRIBUTING.md with AI usage guidelines Added guidelines for contributions involving AI assistance. --- CONTRIBUTING.md | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 05c60b8b..2b1bb27c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -## Thank you for making WLED better! +## Thank you for making WLED-MM better! Here are a few suggestions to make it easier for you to contribute! -### Describe your PR +## Describe your PR Please add a description of your proposed code changes. It does not need to be an exhaustive essay, however a PR with no description or just a few words might not get accepted, simply because very basic information is missing. @@ -12,7 +12,43 @@ A good description helps us to review and understand your proposed changes. For * testing you performed, known limitations, open ends you possibly could not solve. * any areas where you like to get help from an experienced maintainer (yes WLEDMM has become big 😉) -### Code style +### Target branch for pull requests + +Please make all PRs against the `mdev` branch. + +### Updating your code + +While the PR is open - and under review by maintainers - you may be asked to modify your PR source code. +You can simply update your own branch, and push changes in response to reviewer recommendations. +Github will pick up the changes so your PR stays up-to-date. + +> [!CAUTION] +> Do not use "force-push" while your PR is open! +> It has many subtle and unexpected consequences on our github reposistory. +> For example, we regularly lost review comments when the PR author force-pushes code changes. So, pretty please, do not force-push. + +You can find a collection of very useful tips and tricks here: https://github.com/wled-dev/WLED/wiki/How-to-properly-submit-a-PR + + +### Source Code from an AI agent or bot +> [!IMPORTANT] +> Its OK if you took help from an AI for writing your source code. +> +> However, we expect a few things from you as the person making a contribution to WLED: + +* Make sure you really understand the code suggested by the AI, and don't just accept it because it "seems to work". +* Don't let the AI change already exists without double-checking by you as the contributor. Often, the result will not be complete. For example, comments about the source code may be lost. +* Remember that AI are still "Often-Wrong" ;-) +* If you don't feel very confident using English, you can AI for translating code comments and descriptions into English. AI bots are very good at understanding language. However, always check the results in correct. The translation might still have wrong technical terms, or errors in some details. + +#### best practice with AI: + * As the person who contributes the code to WLED, make sure you understand exactly what the AI code does + * add a comment like ``'// below section of my code was generated by an AI``, when larger parts of your source code were not written by you personally. + * always review translations and code comments for correctness + * If the AI has rewritten existing code, check that the change is necessary and that nothing has been lost or broken. Also check that previous code comments are still intact. + + +## Code style When in doubt, it is easiest to replicate the code style you find in the files you want to edit :) Below are the guidelines we use in the WLED repository.