Skip to content

Commit 64529bb

Browse files
Copilotsofthack007
andauthored
chore: move coding guidelines from .github to docs/ (#358)
* Reorganized repository documentation and updated internal configuration to reference the new docs location. Documentation * Updated contributor and instruction guides to point to the relocated documentation files so links and references remain correct. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
1 parent e4c8e34 commit 64529bb

7 files changed

Lines changed: 17 additions & 15 deletions

File tree

.coderabbit.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# CodeRabbit configuration — references existing guideline files to avoid
44
# duplicating conventions. See:
55
# .github/copilot-instructions.md — project overview & general rules
6-
# .github/cpp.instructions.md — C++ coding conventions
7-
# .github/web.instructions.md — Web UI coding conventions
8-
# .github/cicd.instructions.md — GitHub Actions / CI-CD conventions
9-
# .github/esp-idf.instructions.md — ESP-IDF / chip-specific coding guidelines
6+
# docs/cpp.instructions.md — C++ coding conventions
7+
# docs/web.instructions.md — Web UI coding conventions
8+
# docs/cicd.instructions.md — GitHub Actions / CI-CD conventions
9+
# docs/esp-idf.instructions.md — ESP-IDF / chip-specific coding guidelines
1010
# (apply when code directly uses ESP-IDF APIs:
1111
# esp_idf_*, I2S, RMT, ADC, GPIO, heap_caps, etc.)
1212
#
@@ -20,11 +20,11 @@ reviews:
2020
path_instructions:
2121
- path: "**/*.{cpp,h,hpp,ino}"
2222
instructions: >
23-
Follow the C++ coding conventions documented in .github/cpp.instructions.md
23+
Follow the C++ coding conventions documented in docs/cpp.instructions.md
2424
and the general project guidelines in .github/copilot-instructions.md.
2525
If the code under review directly uses ESP-IDF APIs (e.g. heap_caps_malloc,
2626
I2S, RMT, ADC, GPIO, esp_timer, or any esp_idf_* / soc_* symbols), also
27-
apply the guidelines in .github/esp-idf.instructions.md.
27+
apply the guidelines in docs/esp-idf.instructions.md.
2828
2929
Key rules: 2-space indentation (no tabs), camelCase functions/variables,
3030
PascalCase classes, UPPER_CASE macros. Mark WLED-MM-specific changes with
@@ -36,7 +36,7 @@ reviews:
3636
3737
- path: "wled00/data/**"
3838
instructions: >
39-
Follow the web UI conventions documented in .github/web.instructions.md.
39+
Follow the web UI conventions documented in docs/web.instructions.md.
4040
4141
Key rules: indent HTML and JavaScript with tabs, CSS with tabs or spaces.
4242
Files here are built into wled00/html_*.h by tools/cdata.js — never
@@ -54,11 +54,11 @@ reviews:
5454
Each usermod lives in its own directory under usermods/ and is implemented
5555
as a .h file that is pulled in by wled00/usermods_list.cpp (guarded by
5656
#ifdef). Usermods do not use library.json. Follow the same C++ conventions
57-
as the core firmware (.github/cpp.instructions.md).
57+
as the core firmware (docs/cpp.instructions.md).
5858
5959
- path: ".github/workflows/*.{yml,yaml}"
6060
instructions: >
61-
Follow the CI/CD conventions documented in .github/cicd.instructions.md.
61+
Follow the CI/CD conventions documented in docs/cicd.instructions.md.
6262
6363
Key rules: 2-space indentation, descriptive name: on every workflow/job/step.
6464
Third-party actions must be pinned to a specific version tag — branch pins
@@ -67,7 +67,7 @@ reviews:
6767
into run: steps — pass them through an env: variable to prevent script
6868
injection. Do not use pull_request_target unless fully justified.
6969
70-
- path: ".github/*.instructions.md"
70+
- path: "**/*.instructions.md"
7171
instructions: |
7272
This file contains both AI-facing rules and human-only reference sections.
7373
Human-only sections are enclosed in `<!-- HUMAN_ONLY_START -->` /
@@ -81,4 +81,4 @@ reviews:
8181
2. Flag any HUMAN_ONLY section whose content has drifted from the surrounding
8282
AI-facing rules due to edits introduced in this PR.
8383
3. If new AI-facing rules were added without updating a related HUMAN_ONLY
84-
reference section, note this as a suggestion (not a required fix).
84+
reference section, note this as a suggestion (not a required fix).

.github/copilot-instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ tl;dr:
5454
* Auto-generated headers: `wled00/html_*.h` and `wled00/js_*.h`**never edit or commit**.
5555
* ArduinoJSON + AsyncJSON: `wled00/src/dependencies/json` (included via `wled.h`). CI/CD: `.github/workflows/`.
5656
* Usermods: `usermods/` (`.h` files, included via `usermods_list.cpp`).
57+
* Contributor docs: `docs/` (coding guidelines, design docs).
5758

5859
Main development trunk: `mdev` branch. Make PRs against this branch.
5960

@@ -77,6 +78,7 @@ tools/ # Build tools (Node.js), partition files, and generi
7778
tools/cdata.js # Web UI → header build script
7879
tools/cdata-test.js # Test suite
7980
package.json # Node.js scripts and release ID
81+
docs/ # Contributor docs: coding guidelines and design documentation
8082
.github/workflows/ # CI/CD pipelines
8183
```
8284

@@ -95,7 +97,7 @@ package.json # Node.js scripts and release ID
9597
- **C++ formatting available**: `clang-format` is installed but not in CI
9698
- No automated linting is configured — match existing code style in files you edit.
9799

98-
See `cpp.instructions.md`, `esp-idf.instructions.md` and `web.instructions.md` for language-specific conventions, and `cicd.instructions.md` for GitHub Actions workflows.
100+
See `docs/cpp.instructions.md`, `docs/esp-idf.instructions.md` and `docs/web.instructions.md` for language-specific conventions, and `docs/cicd.instructions.md` for GitHub Actions workflows.
99101

100102
### Attribution for AI-generated code
101103
Using AI-generated code can hide the source of the inspiration / knowledge / sources it used.

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ When in doubt, it is easiest to replicate the code style you find in the files y
7676
Our review bot (coderabbit) has learned lots of detailed guides and hints - it will suggest them automatically when you submit a PR for review.
7777

7878
If you are curious, these are the detailed guides:
79-
* [C++ Coding](https://github.com/MoonModules/WLED-MM/blob/mdev/.github/cpp.instructions.md)
80-
* [WebUi: HTML, JS, CSS](https://github.com/MoonModules/WLED-MM/blob/mdev/.github/web.instructions.md)
81-
* [Using ESP-IDF directly](https://github.com/MoonModules/WLED-MM/blob/mdev/.github/esp-idf.instructions.md)
79+
* [C++ Coding](https://github.com/MoonModules/WLED-MM/blob/mdev/docs/cpp.instructions.md)
80+
* [WebUi: HTML, JS, CSS](https://github.com/MoonModules/WLED-MM/blob/mdev/docs/web.instructions.md)
81+
* [Using ESP-IDF directly](https://github.com/MoonModules/WLED-MM/blob/mdev/docs/esp-idf.instructions.md)
8282

8383
Below are the main rules used the WLED-MM repository.
8484

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)