Skip to content

github: Add instructions for Copilot#314

Merged
SeppoTakalo merged 1 commit into
nrfconnect:mainfrom
SeppoTakalo:copilot_instructions
May 22, 2026
Merged

github: Add instructions for Copilot#314
SeppoTakalo merged 1 commit into
nrfconnect:mainfrom
SeppoTakalo:copilot_instructions

Conversation

@SeppoTakalo
Copy link
Copy Markdown
Contributor

Add instructions for Copilot AI agent.
Also include clang-format rules from Zephyr to help tools.

@SeppoTakalo SeppoTakalo requested a review from trantanen May 21, 2026 13:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md describing repo purpose, build/test commands, and conventions.
  • Add a Zephyr RTOS .clang-format configuration 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 an nrf/ 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.

Comment thread .github/instructions/C-CODE.instructions.md
Comment thread .github/instructions/DOC.instructions.md Outdated
Comment thread .github/instructions/DOC.instructions.md Outdated
Comment thread .github/copilot-instructions.md Outdated
@SeppoTakalo SeppoTakalo force-pushed the copilot_instructions branch 2 times, most recently from da31fde to 2139684 Compare May 22, 2026 07:34
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>
@SeppoTakalo SeppoTakalo force-pushed the copilot_instructions branch from 2139684 to 76d0733 Compare May 22, 2026 07:51
@SeppoTakalo SeppoTakalo merged commit f1fefdc into nrfconnect:main May 22, 2026
2 checks passed
@SeppoTakalo SeppoTakalo deleted the copilot_instructions branch May 22, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants