github: Add instructions for Copilot#314
Merged
Merged
Conversation
trantanen
approved these changes
May 21, 2026
MarkusLassila
approved these changes
May 22, 2026
There was a problem hiding this comment.
Pull request overview
Adds GitHub Copilot repository instructions and per-path instruction files, and introduces a Zephyr-derived .clang-format configuration to standardize formatting behavior for tooling in this repo.
Changes:
- Add documentation-specific and C-code-specific instruction files under
.github/instructions/. - Add a comprehensive
.github/copilot-instructions.mddescribing repo purpose, build/test commands, and conventions. - Add a Zephyr RTOS
.clang-formatconfiguration at the repo root.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/instructions/DOC.instructions.md |
Adds documentation (RST + diagrams) style guidance for doc/**. |
.github/instructions/C-CODE.instructions.md |
Adds embedded C guidance intended to apply to *.c/*.h. |
.github/copilot-instructions.md |
Adds repo-wide Copilot instructions for build, tests, layout, and conventions. |
.clang-format |
Adds Zephyr RTOS clang-format rules (100-col, tab-indented, Linux brace style, etc.). |
Comments suppressed due to low confidence (2)
.github/instructions/C-CODE.instructions.md:29
- This link points to
nrf/doc/..., but the repository doesn't contain annrf/directory, so the link will be broken in-repo. Consider linking to an external URL or to a path that exists in this repo/workspace (or clarify that this is a west workspace path, not a repo-relative link).
### NCS Coding Standards
- Follow contribution guidelines: [contributions.rst](nrf/doc/nrf/dev_model_and_contributions/contributions.rst)
- Follow Zephyr coding guidelines: [index.rst](zephyr/doc/contribute/index.rst)
- Reference additional guidelines in:
- `nrf/doc/nrf/dev_model_and_contributions`
- `zephyr/doc/contribute`
.github/instructions/DOC.instructions.md:113
- "stylised" is British spelling; the document specifies American English. Please change to "stylized".
### Connectors and arrows
- Use simple open or filled arrowheads. Avoid decorative, doubled, or overly stylised arrow ends.
- Arrowhead size: medium as a default; scale down proportionally if shapes are small.
- Place connector label text above the connector line.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
juhaylinen
approved these changes
May 22, 2026
da31fde to
2139684
Compare
Add instructions for Copilot AI agent. Also include clang-format rules from Zephyr to help tools. Also, added a minimal rule for Cursor to read rules under .github/ tree. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2139684 to
76d0733
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add instructions for Copilot AI agent.
Also include clang-format rules from Zephyr to help tools.