{"owner":"zephyrproject-rtos","repo":"zephyr","hasSkills":true,"totalSkillsCount":6,"totalTokensCount":4814,"categories":["root-instruction","claude-rule","copilot-instructions","mcp-config","marketplace","plugin-manifest"],"hasMcp":true,"mcpConfig":{"mcpServers":{"zephyr":{"command":"npx","args":["-y","@modelcontextprotocol/server-zephyr"]}}},"found":["AGENTS.md","CLAUDE.md",".github/copilot-instructions.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"AGENTS.md":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr RTOS: instructions for AI coding agents\n\nThis file is for coding agents, and for the humans driving them, working in this repository.\nIt is a digest of `doc/contribute/` plus the things CI and maintainers reject most often. Where\nit is silent or disagrees with the documentation, the documentation wins:\n`doc/contribute/guidelines.rst` (process, DCO, AI-assistant policy),\n`doc/contribute/contributor_expectations.rst` (PR shape), `doc/contribute/style/` (C, Kconfig,\nCMake, Doxygen and devicetree style) and `doc/contribute/coding_guidelines/index.rst` (the\nMISRA-C subset). Read the relevant page before working in an area you have not touched before;\ndo not rely on this digest or on training data alone.\n\n## Rules for agents\n\n- Every commit must carry a `Signed-off-by:` line from the human responsible for the work; it\n  is required, not optional. Never add, edit or copy one yourself: only a human can certify the\n  DCO, and the submitter adds their own (`git commit -s`). Never add `Co-authored-by:`. Do not\n  put \"Generated with ...\", session links or any other mention of AI tools in commit messages,\n  PR bodies, issues or comments. The `Assisted-by:` trailer below is the only place AI\n  involvement is recorded.\n- Add exactly one `Assisted-by: <Agent>:<model-version> [tool ...]` trailer, for example\n  `Assisted-by: Claude:claude-opus-4.6 coccinelle`, naming the tool actually used. Replace it\n  rather than stacking when a different model amends the commit. `checkpatch.pl` validates the\n  format; basic tools (git, gcc, cmake, editors) are not listed.\n- The human reviews and tests every change before it is submitted. State what you did not do\n  (not built, not run, not run on hardware, no reproducer) instead of implying it was done.\n- Review comments written with AI help are verified by the human before posting; never post raw\n  model output (`doc/contribute/reviewer_expectations.rst`).\n- Commit messages, code comments, Kconfig help texts and docs describe the tree as it is: no\n  references to prompts, plans, sessions, \"the rework\" or \"as requested\". Write tersely and\n  concretely; maintainers reject verbose, hedging or self-congratulatory prose. No emoji.\n- Change what the task needs, which can mean refactoring the code a fix touches, but keep\n  unrelated reformatting, renames and cleanups out of the change; style is enforced on new or\n  modified lines only. A wider cleanup is a separate PR.\n\n## Build and test\n\n- Zephyr builds only inside a west workspace: from the parent directory of the clone,\n  `west init -l <zephyr-dir> && west update` (most boards need HAL and module repositories from\n  `west.yml`). Build with `west build -b <board> <app-dir>`; `native_sim` runs on the host.\n  See `doc/develop/west/workspaces.rst`.\n- Tests and samples are run by twister: `west twister -p native_sim -T <test-dir>` or\n  `-s <test-dir>/<scenario-id>`; `--build-only` skips execution; `-i` prints failing logs.\n  Suites whose `tests.yaml` lists `unit_testing` as platform need `-p unit_testing`. See\n  `doc/develop/twister/index.rst`.\n- In a `git worktree`, export `ZEPHYR_BASE=<worktree>` for `west build` and twister; otherwise\n  the workspace's registered checkout is built silently instead of your tree.\n- Every commit in a series must build and pass its tests on its own (bisectability).\n\n## Checks to run before pushing\n\nCI runs the same checks (`.github/workflows/compliance.yml`); each failure costs a full round\ntrip. Fix the cause, never work around a check.\n\n- `pip install -r scripts/requirements-compliance.txt`, then\n  `./scripts/ci/check_compliance.py --parallel -c upstream/main..HEAD` (`upstream` being the\n  zephyrproject-rtos remote, `origin` in a plain clone; the same below). `-l` lists the checks\n  (Checkpatch, Gitlint, KconfigBasic, CMakeStyle, DevicetreeBindings, Ruff, Pylint, YAMLLint,\n  SphinxLint, KeepSorted, ...); `-m <Check>` runs one.\n- checkpatch on one commit: `git format-patch -1 --stdout <sha> | ./scripts/checkpatch.pl -`.\n  Piping `git show` instead produces bogus `BAD_SIGN_OFF` errors.\n- ClangFormat is advisory (`.clang-format`). Apply it to your own hunks only and skip hunks\n  where it reflows surrounding macro tables; never run it on whole files.\n- CMake style (`doc/contribute/style/cmake.rst`) is checked on touched lines only and old files\n  are grandfathered: copying an old `CMakeLists.txt` as a template can fail CI although the\n  original passes. The same holds for any in-tree file you copy: check it against the current\n  style page, not only against its neighbors.\n\n## Commits\n\n    area: subarea: imperative summary (75 columns max, no trailing period)\n\n    Body wrapped at 75 columns: what the change does, why this approach,\n    which assumptions were made and how it was tested. Never empty.\n\n    Fixes #12345\n\n    Assisted-by: Claude:claude-opus-4.6\n    Signed-off-by: Full Name <email@example.com>\n\n- `area:` is the prefix the file's recent history uses: `git log --format=%s -20 -- <path>`.\n  Examples: `Bluetooth: Host:`, `drivers: i2c: nrfx:`, `dts: arm: st:`, `boards: nordic:`,\n  `kernel:`, `doc:`, `.github:`. Never `subsys:` or `treewide:`, never `WIP`.\n- Trailers (`Assisted-by`, `Signed-off-by`, `Link:`, `(cherry picked from commit ...)`) form one\n  block as the last paragraph. `Fixes #N` goes in its own paragraph directly before that\n  block. Reference other commits as `commit <12-char sha> (\"subject\")`.\n- One `Signed-off-by:` line must match the commit `Author:` name and e-mail; never remove an\n  existing sign-off. Verify with `git log -1 --format='%an <%ae>%n%b'`.\n- One logical change per commit: a fix, its tests and its docs may be separate commits, but one\n  commit never mixes unrelated changes. No fixup, squash or merge commits in a PR: fold review\n  fixes into the commit that owns the lines. Without an interactive terminal:\n  `git commit --fixup=<sha>`, then\n  `GIT_SEQUENCE_EDITOR=true GIT_EDITOR=true git rebase -i --autosquash <base>`.\n- Update a branch with `git rebase upstream/main`, never by merging `main` into it.\n- Stage explicit paths (`git add <file>`); never `git add -A`, `git add .` or `commit -a`, which\n  pick up build directories, notes and reports. Before pushing, review\n  `git show --stat upstream/main..HEAD`.\n\n## Pull requests\n\n- A PR is one self-contained change. Reviewers are assigned from the `MAINTAINERS.yml` areas of\n  the touched files (`./scripts/get_maintainer.py path <files>` lists them), so when a change\n  spans several areas and splits cleanly, split it so each part gets the right reviewers.\n  Small PRs get reviewed; large changes start as an RFC issue\n  (`doc/contribute/proposals_and_rfcs.rst`).\n- The PR description summarizes the change and its rationale and carries the `Fixes #N` line\n  when the change addresses an issue.\n  It is rendered as Markdown: unwrap paragraphs instead of pasting hard-wrapped commit text.\n  Keep title and description in sync with the commits after every force-push.\n- Breaking changes to stable APIs are described in the migration guide; new, deprecated and\n  removed APIs are listed in the release notes. Both go in the same PR as the\n  change: `doc/releases/migration-guide-X.Y.rst` and `doc/releases/release-notes-X.Y.rst`, where\n  `X.Y` is the next release (`VERSION` shows `X.(Y-1).99` during development). Stable APIs\n  follow `doc/develop/api/api_lifecycle.rst`.\n- Backports to `v*-branch` are opened by a bot when a maintainer adds `backport vX.Y-branch`\n  labels after merge. Do not open manual backport PRs unless the bot failed. Every backport PR\n  body must contain a `Fixes #N` line resolving to a real issue\n  (`.github/workflows/backport_issue_check.yml`), so bug fixes that may be backported need a\n  public issue.\n- Issues use a GitHub issue type (Bug, Feature, Enhancement, RFC, Task) and the templates in\n  `.github/ISSUE_TEMPLATE/`, not a `bug` label: `gh issue create --type Bug ...`.\n- Security: never file a public issue or PR describing an undisclosed vulnerability, and never\n  reference an unpublished advisory (GHSA/CVE) in a commit, PR or issue. See\n  `.github/SECURITY.md`.\n- When reviewing, remember that CI tests the PR rebased onto current `main`. Reproduce the same\n  way before reporting a failure or claiming what `main` does or does not contain:\n  `git fetch upstream main && git fetch upstream pull/<N>/head && git checkout --detach\n  FETCH_HEAD && git rebase upstream/main` (two fetches: after a multi-ref fetch `FETCH_HEAD` is\n  the first ref, `main`).\n\n## Code rules agents get wrong most often\n\nComplete lists: `doc/contribute/style/code.rst`, `doc/contribute/coding_guidelines/index.rst`.\n\n- Linux kernel style: 8-column tabs, 100-column lines, braces on every `if`/`else`/loop body,\n  `/* */` comments only (no `//`), `snake_case`, no binary literals; non-ASCII symbols only\n  where they significantly improve clarity, emoji never.\n- Explicit comparisons: `if (err != 0)`, `if (ptr == NULL)`, `if (len > 0)`. Controlling\n  expressions must be essentially Boolean (coding guideline rule 85); `if (!err)` on an\n  integer is not allowed.\n- Fixed-width types (`uint8_t`, `int32_t`) for numeric data and `size_t` for sizes instead of\n  bare `int`, `short` or `long` (Dir 4.6; `char` stays for text); `U` suffix on unsigned\n  constants; no octal constants.\n- No commented-out code; check every return value that carries an error; include guards in\n  every header.\n- Minimize object scope (coding guideline rule 50, MISRA C:2012 Rule 8.9, CERT DCL19-C). If\n  only one function references an object, define it there, as a `static` local when it must\n  persist; if only one branch references it, define it in that branch. This holds in tests and\n  samples too, where file-scope state is the common idiom.\n- Dynamic allocation: the coding guidelines list MISRA Dir 4.12 (no dynamic allocation) and\n  Rule 21.3 (no `<stdlib.h>` allocators) as required, while Rule A.4 allows the libc allocators\n  in the kernel and subsystems use `k_malloc()`, `k_heap`, slabs and `net_buf` pools. Follow the\n  surrounding subsystem: do not \"fix\" existing allocation, and do not add a heap where a static\n  pool fits.\n- Prefer `if (IS_ENABLED(CONFIG_FOO)) { ... }` to `#ifdef CONFIG_FOO` for code paths. Both\n  branches must compile, so declarations in headers stay unconditional (guideline Rule A.1).\n  Use the preprocessor only for real memory or ABI differences, and follow the surrounding\n  file's pattern for small edits.\n- Public symbols carry their subsystem prefix (`k_`, `sys_`, `net_`, `bt_`, `i2c_`, ...). Public\n  functions have Doxygen with a brief description, `@param` and `@retval <value> <text>` for\n  each discrete return value, success first and a value repeated when different conditions\n  produce it: `@retval -EINVAL Invalid argument`, not \"if the argument is invalid\"\n  (`doc/contribute/style/doxygen.rst`).\n- Every `CONFIG_` symbol referenced in code or Kconfig must be defined in the tree (KconfigBasic\n  check). Symbol naming and `menuconfig`/`if` structure: `doc/contribute/style/kconfig.rst`;\n  `select` versus `depends on`: `doc/build/kconfig/tips.rst`.\n- New original files start with the two SPDX header lines in the file's comment syntax: the\n  copyright text (`Copyright The Zephyr Project Contributors`, or the actual holder) and the\n  `Apache-2.0` license identifier; the top of this file shows the Markdown form. Code imported\n  under another license keeps its own headers, needs the approval described in\n  `doc/contribute/guidelines.rst` (Components using other Licenses) and an annotation in\n  `REUSE.toml`; never rewrite existing license metadata.\n- Test and sample metadata lives in `tests.yaml`; `sample.yaml` and `testcase.yaml` are legacy\n  names CI rejects for new files. Scripts that twister executes directly, such as bsim\n  `tests_scripts/*.sh`, must be committed with mode `100755`.\n- Blocks delimited by `zephyr-keep-sorted` start/stop marker comments stay sorted (KeepSorted\n  check). No binary files except images under `doc/`, `boards/` and `samples/` within the\n  size limits (the BinaryFiles check holds the exact allow-list).\n- Devicetree: a compatible for a vendor's device is `<vendor>,<device>` with the vendor listed\n  in `dts/bindings/vendor-prefixes.txt`; generic hardware such as `gpio-leds` gets no invented\n  prefix. Every new compatible needs a binding under `dts/bindings/`. See\n  `doc/contribute/style/devicetree.rst` and `doc/build/dts/bindings-upstream.rst`.\n- Documentation under `doc/` is reStructuredText in American English, 100 columns (URLs\n  excepted): `doc/contribute/documentation/guidelines.rst`.\n\n## Finding things\n\n- Subsystems: `subsys/`; drivers: `drivers/<class>/`; public API headers: `include/zephyr/` and\n  the APIs defined under `lib/` (a subsystem's own `include/zephyr/`, such as ztest's, is not\n  public API); kernel: `kernel/`; boards: `boards/<vendor>/`; SoCs: `soc/`; devicetree: `dts/`;\n  tests: `tests/`; samples: `samples/`; tooling: `scripts/`.\n- `MAINTAINERS.yml` maps paths to areas and people. The recent history of a path is the best\n  guide to its local conventions: `git log --oneline -20 -- <path>`.\n- The documentation source is `doc/`, published at https://docs.zephyrproject.org/latest/. The\n  published docs, the source tree and the last six months of issues and PRs are also searchable\n  through the project's MCP server, `https://zephyrproject.mcp.kapa.ai`\n  (`doc/develop/tools/kapa_ai.rst`); its answers are generated and must be verified against the\n  tree.\n","CLAUDE.md":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n@AGENTS.md\n",".github/copilot-instructions.md":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr Project — Copilot Instructions\n\nThe instructions for AI coding agents working on this repository are in `AGENTS.md` at the\nrepository root. Copilot cloud agent, Copilot code review and the IDE agents load that file\ndirectly; this file only covers the Copilot features that do not, and code review.\n\n## All Copilot features\n\n- Follow `AGENTS.md`, `doc/contribute/guidelines.rst` and `doc/contribute/style/`.\n- Never add `Signed-off-by:` or `Co-authored-by:`; add one `Assisted-by: Copilot:<model>`\n  trailer to commits you help write.\n\n## Code review\n\n- Report only concrete, verifiable problems: a rule violation with the rule, a bug with the\n  input that triggers it, a missing test with the untested behavior. Skip praise and summaries.\n- Do not request changes for anything CI catches (checkpatch, gitlint, compliance); reviewers\n  are asked not to (`doc/contribute/reviewer_expectations.rst`).\n- Do not flag style in lines the PR does not touch, and do not ask for tree-wide cleanups.\n- Check commit messages: `area:` prefix, non-empty body, `Signed-off-by` present, exactly one\n  `Assisted-by:` trailer when AI tools were used, no `Co-authored-by`. A change that addresses\n  an issue carries `Fixes #N` in the PR description or a commit.\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/plugin.json)"},"files":{"AGENTS.md":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr RTOS: instructions for AI coding agents\n\nThis file is for coding agents, and for the humans driving them, working in this repository.\nIt is a digest of `doc/contribute/` plus the things CI and maintainers reject most often. Where\nit is silent or disagrees with the documentation, the documentation wins:\n`doc/contribute/guidelines.rst` (process, DCO, AI-assistant policy),\n`doc/contribute/contributor_expectations.rst` (PR shape), `doc/contribute/style/` (C, Kconfig,\nCMake, Doxygen and devicetree style) and `doc/contribute/coding_guidelines/index.rst` (the\nMISRA-C subset). Read the relevant page before working in an area you have not touched before;\ndo not rely on this digest or on training data alone.\n\n## Rules for agents\n\n- Every commit must carry a `Signed-off-by:` line from the human responsible for the work; it\n  is required, not optional. Never add, edit or copy one yourself: only a human can certify the\n  DCO, and the submitter adds their own (`git commit -s`). Never add `Co-authored-by:`. Do not\n  put \"Generated with ...\", session links or any other mention of AI tools in commit messages,\n  PR bodies, issues or comments. The `Assisted-by:` trailer below is the only place AI\n  involvement is recorded.\n- Add exactly one `Assisted-by: <Agent>:<model-version> [tool ...]` trailer, for example\n  `Assisted-by: Claude:claude-opus-4.6 coccinelle`, naming the tool actually used. Replace it\n  rather than stacking when a different model amends the commit. `checkpatch.pl` validates the\n  format; basic tools (git, gcc, cmake, editors) are not listed.\n- The human reviews and tests every change before it is submitted. State what you did not do\n  (not built, not run, not run on hardware, no reproducer) instead of implying it was done.\n- Review comments written with AI help are verified by the human before posting; never post raw\n  model output (`doc/contribute/reviewer_expectations.rst`).\n- Commit messages, code comments, Kconfig help texts and docs describe the tree as it is: no\n  references to prompts, plans, sessions, \"the rework\" or \"as requested\". Write tersely and\n  concretely; maintainers reject verbose, hedging or self-congratulatory prose. No emoji.\n- Change what the task needs, which can mean refactoring the code a fix touches, but keep\n  unrelated reformatting, renames and cleanups out of the change; style is enforced on new or\n  modified lines only. A wider cleanup is a separate PR.\n\n## Build and test\n\n- Zephyr builds only inside a west workspace: from the parent directory of the clone,\n  `west init -l <zephyr-dir> && west update` (most boards need HAL and module repositories from\n  `west.yml`). Build with `west build -b <board> <app-dir>`; `native_sim` runs on the host.\n  See `doc/develop/west/workspaces.rst`.\n- Tests and samples are run by twister: `west twister -p native_sim -T <test-dir>` or\n  `-s <test-dir>/<scenario-id>`; `--build-only` skips execution; `-i` prints failing logs.\n  Suites whose `tests.yaml` lists `unit_testing` as platform need `-p unit_testing`. See\n  `doc/develop/twister/index.rst`.\n- In a `git worktree`, export `ZEPHYR_BASE=<worktree>` for `west build` and twister; otherwise\n  the workspace's registered checkout is built silently instead of your tree.\n- Every commit in a series must build and pass its tests on its own (bisectability).\n\n## Checks to run before pushing\n\nCI runs the same checks (`.github/workflows/compliance.yml`); each failure costs a full round\ntrip. Fix the cause, never work around a check.\n\n- `pip install -r scripts/requirements-compliance.txt`, then\n  `./scripts/ci/check_compliance.py --parallel -c upstream/main..HEAD` (`upstream` being the\n  zephyrproject-rtos remote, `origin` in a plain clone; the same below). `-l` lists the checks\n  (Checkpatch, Gitlint, KconfigBasic, CMakeStyle, DevicetreeBindings, Ruff, Pylint, YAMLLint,\n  SphinxLint, KeepSorted, ...); `-m <Check>` runs one.\n- checkpatch on one commit: `git format-patch -1 --stdout <sha> | ./scripts/checkpatch.pl -`.\n  Piping `git show` instead produces bogus `BAD_SIGN_OFF` errors.\n- ClangFormat is advisory (`.clang-format`). Apply it to your own hunks only and skip hunks\n  where it reflows surrounding macro tables; never run it on whole files.\n- CMake style (`doc/contribute/style/cmake.rst`) is checked on touched lines only and old files\n  are grandfathered: copying an old `CMakeLists.txt` as a template can fail CI although the\n  original passes. The same holds for any in-tree file you copy: check it against the current\n  style page, not only against its neighbors.\n\n## Commits\n\n    area: subarea: imperative summary (75 columns max, no trailing period)\n\n    Body wrapped at 75 columns: what the change does, why this approach,\n    which assumptions were made and how it was tested. Never empty.\n\n    Fixes #12345\n\n    Assisted-by: Claude:claude-opus-4.6\n    Signed-off-by: Full Name <email@example.com>\n\n- `area:` is the prefix the file's recent history uses: `git log --format=%s -20 -- <path>`.\n  Examples: `Bluetooth: Host:`, `drivers: i2c: nrfx:`, `dts: arm: st:`, `boards: nordic:`,\n  `kernel:`, `doc:`, `.github:`. Never `subsys:` or `treewide:`, never `WIP`.\n- Trailers (`Assisted-by`, `Signed-off-by`, `Link:`, `(cherry picked from commit ...)`) form one\n  block as the last paragraph. `Fixes #N` goes in its own paragraph directly before that\n  block. Reference other commits as `commit <12-char sha> (\"subject\")`.\n- One `Signed-off-by:` line must match the commit `Author:` name and e-mail; never remove an\n  existing sign-off. Verify with `git log -1 --format='%an <%ae>%n%b'`.\n- One logical change per commit: a fix, its tests and its docs may be separate commits, but one\n  commit never mixes unrelated changes. No fixup, squash or merge commits in a PR: fold review\n  fixes into the commit that owns the lines. Without an interactive terminal:\n  `git commit --fixup=<sha>`, then\n  `GIT_SEQUENCE_EDITOR=true GIT_EDITOR=true git rebase -i --autosquash <base>`.\n- Update a branch with `git rebase upstream/main`, never by merging `main` into it.\n- Stage explicit paths (`git add <file>`); never `git add -A`, `git add .` or `commit -a`, which\n  pick up build directories, notes and reports. Before pushing, review\n  `git show --stat upstream/main..HEAD`.\n\n## Pull requests\n\n- A PR is one self-contained change. Reviewers are assigned from the `MAINTAINERS.yml` areas of\n  the touched files (`./scripts/get_maintainer.py path <files>` lists them), so when a change\n  spans several areas and splits cleanly, split it so each part gets the right reviewers.\n  Small PRs get reviewed; large changes start as an RFC issue\n  (`doc/contribute/proposals_and_rfcs.rst`).\n- The PR description summarizes the change and its rationale and carries the `Fixes #N` line\n  when the change addresses an issue.\n  It is rendered as Markdown: unwrap paragraphs instead of pasting hard-wrapped commit text.\n  Keep title and description in sync with the commits after every force-push.\n- Breaking changes to stable APIs are described in the migration guide; new, deprecated and\n  removed APIs are listed in the release notes. Both go in the same PR as the\n  change: `doc/releases/migration-guide-X.Y.rst` and `doc/releases/release-notes-X.Y.rst`, where\n  `X.Y` is the next release (`VERSION` shows `X.(Y-1).99` during development). Stable APIs\n  follow `doc/develop/api/api_lifecycle.rst`.\n- Backports to `v*-branch` are opened by a bot when a maintainer adds `backport vX.Y-branch`\n  labels after merge. Do not open manual backport PRs unless the bot failed. Every backport PR\n  body must contain a `Fixes #N` line resolving to a real issue\n  (`.github/workflows/backport_issue_check.yml`), so bug fixes that may be backported need a\n  public issue.\n- Issues use a GitHub issue type (Bug, Feature, Enhancement, RFC, Task) and the templates in\n  `.github/ISSUE_TEMPLATE/`, not a `bug` label: `gh issue create --type Bug ...`.\n- Security: never file a public issue or PR describing an undisclosed vulnerability, and never\n  reference an unpublished advisory (GHSA/CVE) in a commit, PR or issue. See\n  `.github/SECURITY.md`.\n- When reviewing, remember that CI tests the PR rebased onto current `main`. Reproduce the same\n  way before reporting a failure or claiming what `main` does or does not contain:\n  `git fetch upstream main && git fetch upstream pull/<N>/head && git checkout --detach\n  FETCH_HEAD && git rebase upstream/main` (two fetches: after a multi-ref fetch `FETCH_HEAD` is\n  the first ref, `main`).\n\n## Code rules agents get wrong most often\n\nComplete lists: `doc/contribute/style/code.rst`, `doc/contribute/coding_guidelines/index.rst`.\n\n- Linux kernel style: 8-column tabs, 100-column lines, braces on every `if`/`else`/loop body,\n  `/* */` comments only (no `//`), `snake_case`, no binary literals; non-ASCII symbols only\n  where they significantly improve clarity, emoji never.\n- Explicit comparisons: `if (err != 0)`, `if (ptr == NULL)`, `if (len > 0)`. Controlling\n  expressions must be essentially Boolean (coding guideline rule 85); `if (!err)` on an\n  integer is not allowed.\n- Fixed-width types (`uint8_t`, `int32_t`) for numeric data and `size_t` for sizes instead of\n  bare `int`, `short` or `long` (Dir 4.6; `char` stays for text); `U` suffix on unsigned\n  constants; no octal constants.\n- No commented-out code; check every return value that carries an error; include guards in\n  every header.\n- Minimize object scope (coding guideline rule 50, MISRA C:2012 Rule 8.9, CERT DCL19-C). If\n  only one function references an object, define it there, as a `static` local when it must\n  persist; if only one branch references it, define it in that branch. This holds in tests and\n  samples too, where file-scope state is the common idiom.\n- Dynamic allocation: the coding guidelines list MISRA Dir 4.12 (no dynamic allocation) and\n  Rule 21.3 (no `<stdlib.h>` allocators) as required, while Rule A.4 allows the libc allocators\n  in the kernel and subsystems use `k_malloc()`, `k_heap`, slabs and `net_buf` pools. Follow the\n  surrounding subsystem: do not \"fix\" existing allocation, and do not add a heap where a static\n  pool fits.\n- Prefer `if (IS_ENABLED(CONFIG_FOO)) { ... }` to `#ifdef CONFIG_FOO` for code paths. Both\n  branches must compile, so declarations in headers stay unconditional (guideline Rule A.1).\n  Use the preprocessor only for real memory or ABI differences, and follow the surrounding\n  file's pattern for small edits.\n- Public symbols carry their subsystem prefix (`k_`, `sys_`, `net_`, `bt_`, `i2c_`, ...). Public\n  functions have Doxygen with a brief description, `@param` and `@retval <value> <text>` for\n  each discrete return value, success first and a value repeated when different conditions\n  produce it: `@retval -EINVAL Invalid argument`, not \"if the argument is invalid\"\n  (`doc/contribute/style/doxygen.rst`).\n- Every `CONFIG_` symbol referenced in code or Kconfig must be defined in the tree (KconfigBasic\n  check). Symbol naming and `menuconfig`/`if` structure: `doc/contribute/style/kconfig.rst`;\n  `select` versus `depends on`: `doc/build/kconfig/tips.rst`.\n- New original files start with the two SPDX header lines in the file's comment syntax: the\n  copyright text (`Copyright The Zephyr Project Contributors`, or the actual holder) and the\n  `Apache-2.0` license identifier; the top of this file shows the Markdown form. Code imported\n  under another license keeps its own headers, needs the approval described in\n  `doc/contribute/guidelines.rst` (Components using other Licenses) and an annotation in\n  `REUSE.toml`; never rewrite existing license metadata.\n- Test and sample metadata lives in `tests.yaml`; `sample.yaml` and `testcase.yaml` are legacy\n  names CI rejects for new files. Scripts that twister executes directly, such as bsim\n  `tests_scripts/*.sh`, must be committed with mode `100755`.\n- Blocks delimited by `zephyr-keep-sorted` start/stop marker comments stay sorted (KeepSorted\n  check). No binary files except images under `doc/`, `boards/` and `samples/` within the\n  size limits (the BinaryFiles check holds the exact allow-list).\n- Devicetree: a compatible for a vendor's device is `<vendor>,<device>` with the vendor listed\n  in `dts/bindings/vendor-prefixes.txt`; generic hardware such as `gpio-leds` gets no invented\n  prefix. Every new compatible needs a binding under `dts/bindings/`. See\n  `doc/contribute/style/devicetree.rst` and `doc/build/dts/bindings-upstream.rst`.\n- Documentation under `doc/` is reStructuredText in American English, 100 columns (URLs\n  excepted): `doc/contribute/documentation/guidelines.rst`.\n\n## Finding things\n\n- Subsystems: `subsys/`; drivers: `drivers/<class>/`; public API headers: `include/zephyr/` and\n  the APIs defined under `lib/` (a subsystem's own `include/zephyr/`, such as ztest's, is not\n  public API); kernel: `kernel/`; boards: `boards/<vendor>/`; SoCs: `soc/`; devicetree: `dts/`;\n  tests: `tests/`; samples: `samples/`; tooling: `scripts/`.\n- `MAINTAINERS.yml` maps paths to areas and people. The recent history of a path is the best\n  guide to its local conventions: `git log --oneline -20 -- <path>`.\n- The documentation source is `doc/`, published at https://docs.zephyrproject.org/latest/. The\n  published docs, the source tree and the last six months of issues and PRs are also searchable\n  through the project's MCP server, `https://zephyrproject.mcp.kapa.ai`\n  (`doc/develop/tools/kapa_ai.rst`); its answers are generated and must be verified against the\n  tree.\n","CLAUDE.md":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n@AGENTS.md\n",".github/copilot-instructions.md":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr Project — Copilot Instructions\n\nThe instructions for AI coding agents working on this repository are in `AGENTS.md` at the\nrepository root. Copilot cloud agent, Copilot code review and the IDE agents load that file\ndirectly; this file only covers the Copilot features that do not, and code review.\n\n## All Copilot features\n\n- Follow `AGENTS.md`, `doc/contribute/guidelines.rst` and `doc/contribute/style/`.\n- Never add `Signed-off-by:` or `Co-authored-by:`; add one `Assisted-by: Copilot:<model>`\n  trailer to commits you help write.\n\n## Code review\n\n- Report only concrete, verifiable problems: a rule violation with the rule, a bug with the\n  input that triggers it, a missing test with the untested behavior. Skip praise and summaries.\n- Do not request changes for anything CI catches (checkpatch, gitlint, compliance); reviewers\n  are asked not to (`doc/contribute/reviewer_expectations.rst`).\n- Do not flag style in lines the PR does not touch, and do not ask for tree-wide cleanups.\n- Check commit messages: `area:` prefix, non-empty body, `Signed-off-by` present, exactly one\n  `Assisted-by:` trailer when AI tools were used, no `Co-authored-by`. A change that addresses\n  an issue carries `Fixes #N` in the PR description or a commit.\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr RTOS: instructions for AI coding agents\n\nThis file is for coding agents, and for the humans driving them, working in this repository.\nIt is a digest of `doc/contribute/` plus the things CI and maintainers reject most often. Where\nit is silent or disagrees with the documentation, the documentation wins:\n`doc/contribute/guidelines.rst` (process, DCO, AI-assistant policy),\n`doc/contribute/contributor_expectations.rst` (PR shape), `doc/contribute/style/` (C, Kconfig,\nCMake, Doxygen and devicetree style) and `doc/contribute/coding_guidelines/index.rst` (the\nMISRA-C subset). Read the relevant page before working in an area you have not touched before;\ndo not rely on this digest or on training data alone.\n\n## Rules for agents\n\n- Every commit must carry a `Signed-off-by:` line from the human responsible for the work; it\n  is required, not optional. Never add, edit or copy one yourself: only a human can certify the\n  DCO, and the submitter adds their own (`git commit -s`). Never add `Co-authored-by:`. Do not\n  put \"Generated with ...\", session links or any other mention of AI tools in commit messages,\n  PR bodies, issues or comments. The `Assisted-by:` trailer below is the only place AI\n  involvement is recorded.\n- Add exactly one `Assisted-by: <Agent>:<model-version> [tool ...]` trailer, for example\n  `Assisted-by: Claude:claude-opus-4.6 coccinelle`, naming the tool actually used. Replace it\n  rather than stacking when a different model amends the commit. `checkpatch.pl` validates the\n  format; basic tools (git, gcc, cmake, editors) are not listed.\n- The human reviews and tests every change before it is submitted. State what you did not do\n  (not built, not run, not run on hardware, no reproducer) instead of implying it was done.\n- Review comments written with AI help are verified by the human before posting; never post raw\n  model output (`doc/contribute/reviewer_expectations.rst`).\n- Commit messages, code comments, Kconfig help texts and docs describe the tree as it is: no\n  references to prompts, plans, sessions, \"the rework\" or \"as requested\". Write tersely and\n  concretely; maintainers reject verbose, hedging or self-congratulatory prose. No emoji.\n- Change what the task needs, which can mean refactoring the code a fix touches, but keep\n  unrelated reformatting, renames and cleanups out of the change; style is enforced on new or\n  modified lines only. A wider cleanup is a separate PR.\n\n## Build and test\n\n- Zephyr builds only inside a west workspace: from the parent directory of the clone,\n  `west init -l <zephyr-dir> && west update` (most boards need HAL and module repositories from\n  `west.yml`). Build with `west build -b <board> <app-dir>`; `native_sim` runs on the host.\n  See `doc/develop/west/workspaces.rst`.\n- Tests and samples are run by twister: `west twister -p native_sim -T <test-dir>` or\n  `-s <test-dir>/<scenario-id>`; `--build-only` skips execution; `-i` prints failing logs.\n  Suites whose `tests.yaml` lists `unit_testing` as platform need `-p unit_testing`. See\n  `doc/develop/twister/index.rst`.\n- In a `git worktree`, export `ZEPHYR_BASE=<worktree>` for `west build` and twister; otherwise\n  the workspace's registered checkout is built silently instead of your tree.\n- Every commit in a series must build and pass its tests on its own (bisectability).\n\n## Checks to run before pushing\n\nCI runs the same checks (`.github/workflows/compliance.yml`); each failure costs a full round\ntrip. Fix the cause, never work around a check.\n\n- `pip install -r scripts/requirements-compliance.txt`, then\n  `./scripts/ci/check_compliance.py --parallel -c upstream/main..HEAD` (`upstream` being the\n  zephyrproject-rtos remote, `origin` in a plain clone; the same below). `-l` lists the checks\n  (Checkpatch, Gitlint, KconfigBasic, CMakeStyle, DevicetreeBindings, Ruff, Pylint, YAMLLint,\n  SphinxLint, KeepSorted, ...); `-m <Check>` runs one.\n- checkpatch on one commit: `git format-patch -1 --stdout <sha> | ./scripts/checkpatch.pl -`.\n  Piping `git show` instead produces bogus `BAD_SIGN_OFF` errors.\n- ClangFormat is advisory (`.clang-format`). Apply it to your own hunks only and skip hunks\n  where it reflows surrounding macro tables; never run it on whole files.\n- CMake style (`doc/contribute/style/cmake.rst`) is checked on touched lines only and old files\n  are grandfathered: copying an old `CMakeLists.txt` as a template can fail CI although the\n  original passes. The same holds for any in-tree file you copy: check it against the current\n  style page, not only against its neighbors.\n\n## Commits\n\n    area: subarea: imperative summary (75 columns max, no trailing period)\n\n    Body wrapped at 75 columns: what the change does, why this approach,\n    which assumptions were made and how it was tested. Never empty.\n\n    Fixes #12345\n\n    Assisted-by: Claude:claude-opus-4.6\n    Signed-off-by: Full Name <email@example.com>\n\n- `area:` is the prefix the file's recent history uses: `git log --format=%s -20 -- <path>`.\n  Examples: `Bluetooth: Host:`, `drivers: i2c: nrfx:`, `dts: arm: st:`, `boards: nordic:`,\n  `kernel:`, `doc:`, `.github:`. Never `subsys:` or `treewide:`, never `WIP`.\n- Trailers (`Assisted-by`, `Signed-off-by`, `Link:`, `(cherry picked from commit ...)`) form one\n  block as the last paragraph. `Fixes #N` goes in its own paragraph directly before that\n  block. Reference other commits as `commit <12-char sha> (\"subject\")`.\n- One `Signed-off-by:` line must match the commit `Author:` name and e-mail; never remove an\n  existing sign-off. Verify with `git log -1 --format='%an <%ae>%n%b'`.\n- One logical change per commit: a fix, its tests and its docs may be separate commits, but one\n  commit never mixes unrelated changes. No fixup, squash or merge commits in a PR: fold review\n  fixes into the commit that owns the lines. Without an interactive terminal:\n  `git commit --fixup=<sha>`, then\n  `GIT_SEQUENCE_EDITOR=true GIT_EDITOR=true git rebase -i --autosquash <base>`.\n- Update a branch with `git rebase upstream/main`, never by merging `main` into it.\n- Stage explicit paths (`git add <file>`); never `git add -A`, `git add .` or `commit -a`, which\n  pick up build directories, notes and reports. Before pushing, review\n  `git show --stat upstream/main..HEAD`.\n\n## Pull requests\n\n- A PR is one self-contained change. Reviewers are assigned from the `MAINTAINERS.yml` areas of\n  the touched files (`./scripts/get_maintainer.py path <files>` lists them), so when a change\n  spans several areas and splits cleanly, split it so each part gets the right reviewers.\n  Small PRs get reviewed; large changes start as an RFC issue\n  (`doc/contribute/proposals_and_rfcs.rst`).\n- The PR description summarizes the change and its rationale and carries the `Fixes #N` line\n  when the change addresses an issue.\n  It is rendered as Markdown: unwrap paragraphs instead of pasting hard-wrapped commit text.\n  Keep title and description in sync with the commits after every force-push.\n- Breaking changes to stable APIs are described in the migration guide; new, deprecated and\n  removed APIs are listed in the release notes. Both go in the same PR as the\n  change: `doc/releases/migration-guide-X.Y.rst` and `doc/releases/release-notes-X.Y.rst`, where\n  `X.Y` is the next release (`VERSION` shows `X.(Y-1).99` during development). Stable APIs\n  follow `doc/develop/api/api_lifecycle.rst`.\n- Backports to `v*-branch` are opened by a bot when a maintainer adds `backport vX.Y-branch`\n  labels after merge. Do not open manual backport PRs unless the bot failed. Every backport PR\n  body must contain a `Fixes #N` line resolving to a real issue\n  (`.github/workflows/backport_issue_check.yml`), so bug fixes that may be backported need a\n  public issue.\n- Issues use a GitHub issue type (Bug, Feature, Enhancement, RFC, Task) and the templates in\n  `.github/ISSUE_TEMPLATE/`, not a `bug` label: `gh issue create --type Bug ...`.\n- Security: never file a public issue or PR describing an undisclosed vulnerability, and never\n  reference an unpublished advisory (GHSA/CVE) in a commit, PR or issue. See\n  `.github/SECURITY.md`.\n- When reviewing, remember that CI tests the PR rebased onto current `main`. Reproduce the same\n  way before reporting a failure or claiming what `main` does or does not contain:\n  `git fetch upstream main && git fetch upstream pull/<N>/head && git checkout --detach\n  FETCH_HEAD && git rebase upstream/main` (two fetches: after a multi-ref fetch `FETCH_HEAD` is\n  the first ref, `main`).\n\n## Code rules agents get wrong most often\n\nComplete lists: `doc/contribute/style/code.rst`, `doc/contribute/coding_guidelines/index.rst`.\n\n- Linux kernel style: 8-column tabs, 100-column lines, braces on every `if`/`else`/loop body,\n  `/* */` comments only (no `//`), `snake_case`, no binary literals; non-ASCII symbols only\n  where they significantly improve clarity, emoji never.\n- Explicit comparisons: `if (err != 0)`, `if (ptr == NULL)`, `if (len > 0)`. Controlling\n  expressions must be essentially Boolean (coding guideline rule 85); `if (!err)` on an\n  integer is not allowed.\n- Fixed-width types (`uint8_t`, `int32_t`) for numeric data and `size_t` for sizes instead of\n  bare `int`, `short` or `long` (Dir 4.6; `char` stays for text); `U` suffix on unsigned\n  constants; no octal constants.\n- No commented-out code; check every return value that carries an error; include guards in\n  every header.\n- Minimize object scope (coding guideline rule 50, MISRA C:2012 Rule 8.9, CERT DCL19-C). If\n  only one function references an object, define it there, as a `static` local when it must\n  persist; if only one branch references it, define it in that branch. This holds in tests and\n  samples too, where file-scope state is the common idiom.\n- Dynamic allocation: the coding guidelines list MISRA Dir 4.12 (no dynamic allocation) and\n  Rule 21.3 (no `<stdlib.h>` allocators) as required, while Rule A.4 allows the libc allocators\n  in the kernel and subsystems use `k_malloc()`, `k_heap`, slabs and `net_buf` pools. Follow the\n  surrounding subsystem: do not \"fix\" existing allocation, and do not add a heap where a static\n  pool fits.\n- Prefer `if (IS_ENABLED(CONFIG_FOO)) { ... }` to `#ifdef CONFIG_FOO` for code paths. Both\n  branches must compile, so declarations in headers stay unconditional (guideline Rule A.1).\n  Use the preprocessor only for real memory or ABI differences, and follow the surrounding\n  file's pattern for small edits.\n- Public symbols carry their subsystem prefix (`k_`, `sys_`, `net_`, `bt_`, `i2c_`, ...). Public\n  functions have Doxygen with a brief description, `@param` and `@retval <value> <text>` for\n  each discrete return value, success first and a value repeated when different conditions\n  produce it: `@retval -EINVAL Invalid argument`, not \"if the argument is invalid\"\n  (`doc/contribute/style/doxygen.rst`).\n- Every `CONFIG_` symbol referenced in code or Kconfig must be defined in the tree (KconfigBasic\n  check). Symbol naming and `menuconfig`/`if` structure: `doc/contribute/style/kconfig.rst`;\n  `select` versus `depends on`: `doc/build/kconfig/tips.rst`.\n- New original files start with the two SPDX header lines in the file's comment syntax: the\n  copyright text (`Copyright The Zephyr Project Contributors`, or the actual holder) and the\n  `Apache-2.0` license identifier; the top of this file shows the Markdown form. Code imported\n  under another license keeps its own headers, needs the approval described in\n  `doc/contribute/guidelines.rst` (Components using other Licenses) and an annotation in\n  `REUSE.toml`; never rewrite existing license metadata.\n- Test and sample metadata lives in `tests.yaml`; `sample.yaml` and `testcase.yaml` are legacy\n  names CI rejects for new files. Scripts that twister executes directly, such as bsim\n  `tests_scripts/*.sh`, must be committed with mode `100755`.\n- Blocks delimited by `zephyr-keep-sorted` start/stop marker comments stay sorted (KeepSorted\n  check). No binary files except images under `doc/`, `boards/` and `samples/` within the\n  size limits (the BinaryFiles check holds the exact allow-list).\n- Devicetree: a compatible for a vendor's device is `<vendor>,<device>` with the vendor listed\n  in `dts/bindings/vendor-prefixes.txt`; generic hardware such as `gpio-leds` gets no invented\n  prefix. Every new compatible needs a binding under `dts/bindings/`. See\n  `doc/contribute/style/devicetree.rst` and `doc/build/dts/bindings-upstream.rst`.\n- Documentation under `doc/` is reStructuredText in American English, 100 columns (URLs\n  excepted): `doc/contribute/documentation/guidelines.rst`.\n\n## Finding things\n\n- Subsystems: `subsys/`; drivers: `drivers/<class>/`; public API headers: `include/zephyr/` and\n  the APIs defined under `lib/` (a subsystem's own `include/zephyr/`, such as ztest's, is not\n  public API); kernel: `kernel/`; boards: `boards/<vendor>/`; SoCs: `soc/`; devicetree: `dts/`;\n  tests: `tests/`; samples: `samples/`; tooling: `scripts/`.\n- `MAINTAINERS.yml` maps paths to areas and people. The recent history of a path is the best\n  guide to its local conventions: `git log --oneline -20 -- <path>`.\n- The documentation source is `doc/`, published at https://docs.zephyrproject.org/latest/. The\n  published docs, the source tree and the last six months of issues and PRs are also searchable\n  through the project's MCP server, `https://zephyrproject.mcp.kapa.ai`\n  (`doc/develop/tools/kapa_ai.rst`); its answers are generated and must be verified against the\n  tree.\n","isInternal":false,"tokens":3547,"sizeBytes":13600},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n@AGENTS.md\n","isInternal":false,"tokens":33,"sizeBytes":122},{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr Project — Copilot Instructions\n\nThe instructions for AI coding agents working on this repository are in `AGENTS.md` at the\nrepository root. Copilot cloud agent, Copilot code review and the IDE agents load that file\ndirectly; this file only covers the Copilot features that do not, and code review.\n\n## All Copilot features\n\n- Follow `AGENTS.md`, `doc/contribute/guidelines.rst` and `doc/contribute/style/`.\n- Never add `Signed-off-by:` or `Co-authored-by:`; add one `Assisted-by: Copilot:<model>`\n  trailer to commits you help write.\n\n## Code review\n\n- Report only concrete, verifiable problems: a rule violation with the rule, a bug with the\n  input that triggers it, a missing test with the untested behavior. Skip praise and summaries.\n- Do not request changes for anything CI catches (checkpatch, gitlint, compliance); reviewers\n  are asked not to (`doc/contribute/reviewer_expectations.rst`).\n- Do not flag style in lines the PR does not touch, and do not ask for tree-wide cleanups.\n- Check commit messages: `area:` prefix, non-empty body, `Signed-off-by` present, exactly one\n  `Assisted-by:` trailer when AI tools were used, no `Co-authored-by`. A change that addresses\n  an issue carries `Fixes #N` in the PR description or a commit.\n","isInternal":false,"tokens":334,"sizeBytes":1366},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":204},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":190},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":183}],"systemPromptSnippet":"<yakaai_skills repo=\"zephyrproject-rtos/zephyr\">\n<!-- File: AGENTS.md (Tokens: ~3547 | Category: root-instruction) -->\n<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr RTOS: instructions for AI coding agents\n\nThis file is for coding agents, and for the humans driving them, working in this repository.\nIt is a digest of `doc/contribute/` plus the things CI and maintainers reject most often. Where\nit is silent or disagrees with the documentation, the documentation wins:\n`doc/contribute/guidelines.rst` (process, DCO, AI-assistant policy),\n`doc/contribute/contributor_expectations.rst` (PR shape), `doc/contribute/style/` (C, Kconfig,\nCMake, Doxygen and devicetree style) and `doc/contribute/coding_guidelines/index.rst` (the\nMISRA-C subset). Read the relevant page before working in an area you have not touched before;\ndo not rely on this digest or on training data alone.\n\n## Rules for agents\n\n- Every commit must carry a `Signed-off-by:` line from the human responsible for the work; it\n  is required, not optional. Never add, edit or copy one yourself: only a human can certify the\n  DCO, and the submitter adds their own (`git commit -s`). Never add `Co-authored-by:`. Do not\n  put \"Generated with ...\", session links or any other mention of AI tools in commit messages,\n  PR bodies, issues or comments. The `Assisted-by:` trailer below is the only place AI\n  involvement is recorded.\n- Add exactly one `Assisted-by: <Agent>:<model-version> [tool ...]` trailer, for example\n  `Assisted-by: Claude:claude-opus-4.6 coccinelle`, naming the tool actually used. Replace it\n  rather than stacking when a different model amends the commit. `checkpatch.pl` validates the\n  format; basic tools (git, gcc, cmake, editors) are not listed.\n- The human reviews and tests every change before it is submitted. State what you did not do\n  (not built, not run, not run on hardware, no reproducer) instead of implying it was done.\n- Review comments written with AI help are verified by the human before posting; never post raw\n  model output (`doc/contribute/reviewer_expectations.rst`).\n- Commit messages, code comments, Kconfig help texts and docs describe the tree as it is: no\n  references to prompts, plans, sessions, \"the rework\" or \"as requested\". Write tersely and\n  concretely; maintainers reject verbose, hedging or self-congratulatory prose. No emoji.\n- Change what the task needs, which can mean refactoring the code a fix touches, but keep\n  unrelated reformatting, renames and cleanups out of the change; style is enforced on new or\n  modified lines only. A wider cleanup is a separate PR.\n\n## Build and test\n\n- Zephyr builds only inside a west workspace: from the parent directory of the clone,\n  `west init -l <zephyr-dir> && west update` (most boards need HAL and module repositories from\n  `west.yml`). Build with `west build -b <board> <app-dir>`; `native_sim` runs on the host.\n  See `doc/develop/west/workspaces.rst`.\n- Tests and samples are run by twister: `west twister -p native_sim -T <test-dir>` or\n  `-s <test-dir>/<scenario-id>`; `--build-only` skips execution; `-i` prints failing logs.\n  Suites whose `tests.yaml` lists `unit_testing` as platform need `-p unit_testing`. See\n  `doc/develop/twister/index.rst`.\n- In a `git worktree`, export `ZEPHYR_BASE=<worktree>` for `west build` and twister; otherwise\n  the workspace's registered checkout is built silently instead of your tree.\n- Every commit in a series must build and pass its tests on its own (bisectability).\n\n## Checks to run before pushing\n\nCI runs the same checks (`.github/workflows/compliance.yml`); each failure costs a full round\ntrip. Fix the cause, never work around a check.\n\n- `pip install -r scripts/requirements-compliance.txt`, then\n  `./scripts/ci/check_compliance.py --parallel -c upstream/main..HEAD` (`upstream` being the\n  zephyrproject-rtos remote, `origin` in a plain clone; the same below). `-l` lists the checks\n  (Checkpatch, Gitlint, KconfigBasic, CMakeStyle, DevicetreeBindings, Ruff, Pylint, YAMLLint,\n  SphinxLint, KeepSorted, ...); `-m <Check>` runs one.\n- checkpatch on one commit: `git format-patch -1 --stdout <sha> | ./scripts/checkpatch.pl -`.\n  Piping `git show` instead produces bogus `BAD_SIGN_OFF` errors.\n- ClangFormat is advisory (`.clang-format`). Apply it to your own hunks only and skip hunks\n  where it reflows surrounding macro tables; never run it on whole files.\n- CMake style (`doc/contribute/style/cmake.rst`) is checked on touched lines only and old files\n  are grandfathered: copying an old `CMakeLists.txt` as a template can fail CI although the\n  original passes. The same holds for any in-tree file you copy: check it against the current\n  style page, not only against its neighbors.\n\n## Commits\n\n    area: subarea: imperative summary (75 columns max, no trailing period)\n\n    Body wrapped at 75 columns: what the change does, why this approach,\n    which assumptions were made and how it was tested. Never empty.\n\n    Fixes #12345\n\n    Assisted-by: Claude:claude-opus-4.6\n    Signed-off-by: Full Name <email@example.com>\n\n- `area:` is the prefix the file's recent history uses: `git log --format=%s -20 -- <path>`.\n  Examples: `Bluetooth: Host:`, `drivers: i2c: nrfx:`, `dts: arm: st:`, `boards: nordic:`,\n  `kernel:`, `doc:`, `.github:`. Never `subsys:` or `treewide:`, never `WIP`.\n- Trailers (`Assisted-by`, `Signed-off-by`, `Link:`, `(cherry picked from commit ...)`) form one\n  block as the last paragraph. `Fixes #N` goes in its own paragraph directly before that\n  block. Reference other commits as `commit <12-char sha> (\"subject\")`.\n- One `Signed-off-by:` line must match the commit `Author:` name and e-mail; never remove an\n  existing sign-off. Verify with `git log -1 --format='%an <%ae>%n%b'`.\n- One logical change per commit: a fix, its tests and its docs may be separate commits, but one\n  commit never mixes unrelated changes. No fixup, squash or merge commits in a PR: fold review\n  fixes into the commit that owns the lines. Without an interactive terminal:\n  `git commit --fixup=<sha>`, then\n  `GIT_SEQUENCE_EDITOR=true GIT_EDITOR=true git rebase -i --autosquash <base>`.\n- Update a branch with `git rebase upstream/main`, never by merging `main` into it.\n- Stage explicit paths (`git add <file>`); never `git add -A`, `git add .` or `commit -a`, which\n  pick up build directories, notes and reports. Before pushing, review\n  `git show --stat upstream/main..HEAD`.\n\n## Pull requests\n\n- A PR is one self-contained change. Reviewers are assigned from the `MAINTAINERS.yml` areas of\n  the touched files (`./scripts/get_maintainer.py path <files>` lists them), so when a change\n  spans several areas and splits cleanly, split it so each part gets the right reviewers.\n  Small PRs get reviewed; large changes start as an RFC issue\n  (`doc/contribute/proposals_and_rfcs.rst`).\n- The PR description summarizes the change and its rationale and carries the `Fixes #N` line\n  when the change addresses an issue.\n  It is rendered as Markdown: unwrap paragraphs instead of pasting hard-wrapped commit text.\n  Keep title and description in sync with the commits after every force-push.\n- Breaking changes to stable APIs are described in the migration guide; new, deprecated and\n  removed APIs are listed in the release notes. Both go in the same PR as the\n  change: `doc/releases/migration-guide-X.Y.rst` and `doc/releases/release-notes-X.Y.rst`, where\n  `X.Y` is the next release (`VERSION` shows `X.(Y-1).99` during development). Stable APIs\n  follow `doc/develop/api/api_lifecycle.rst`.\n- Backports to `v*-branch` are opened by a bot when a maintainer adds `backport vX.Y-branch`\n  labels after merge. Do not open manual backport PRs unless the bot failed. Every backport PR\n  body must contain a `Fixes #N` line resolving to a real issue\n  (`.github/workflows/backport_issue_check.yml`), so bug fixes that may be backported need a\n  public issue.\n- Issues use a GitHub issue type (Bug, Feature, Enhancement, RFC, Task) and the templates in\n  `.github/ISSUE_TEMPLATE/`, not a `bug` label: `gh issue create --type Bug ...`.\n- Security: never file a public issue or PR describing an undisclosed vulnerability, and never\n  reference an unpublished advisory (GHSA/CVE) in a commit, PR or issue. See\n  `.github/SECURITY.md`.\n- When reviewing, remember that CI tests the PR rebased onto current `main`. Reproduce the same\n  way before reporting a failure or claiming what `main` does or does not contain:\n  `git fetch upstream main && git fetch upstream pull/<N>/head && git checkout --detach\n  FETCH_HEAD && git rebase upstream/main` (two fetches: after a multi-ref fetch `FETCH_HEAD` is\n  the first ref, `main`).\n\n## Code rules agents get wrong most often\n\nComplete lists: `doc/contribute/style/code.rst`, `doc/contribute/coding_guidelines/index.rst`.\n\n- Linux kernel style: 8-column tabs, 100-column lines, braces on every `if`/`else`/loop body,\n  `/* */` comments only (no `//`), `snake_case`, no binary literals; non-ASCII symbols only\n  where they significantly improve clarity, emoji never.\n- Explicit comparisons: `if (err != 0)`, `if (ptr == NULL)`, `if (len > 0)`. Controlling\n  expressions must be essentially Boolean (coding guideline rule 85); `if (!err)` on an\n  integer is not allowed.\n- Fixed-width types (`uint8_t`, `int32_t`) for numeric data and `size_t` for sizes instead of\n  bare `int`, `short` or `long` (Dir 4.6; `char` stays for text); `U` suffix on unsigned\n  constants; no octal constants.\n- No commented-out code; check every return value that carries an error; include guards in\n  every header.\n- Minimize object scope (coding guideline rule 50, MISRA C:2012 Rule 8.9, CERT DCL19-C). If\n  only one function references an object, define it there, as a `static` local when it must\n  persist; if only one branch references it, define it in that branch. This holds in tests and\n  samples too, where file-scope state is the common idiom.\n- Dynamic allocation: the coding guidelines list MISRA Dir 4.12 (no dynamic allocation) and\n  Rule 21.3 (no `<stdlib.h>` allocators) as required, while Rule A.4 allows the libc allocators\n  in the kernel and subsystems use `k_malloc()`, `k_heap`, slabs and `net_buf` pools. Follow the\n  surrounding subsystem: do not \"fix\" existing allocation, and do not add a heap where a static\n  pool fits.\n- Prefer `if (IS_ENABLED(CONFIG_FOO)) { ... }` to `#ifdef CONFIG_FOO` for code paths. Both\n  branches must compile, so declarations in headers stay unconditional (guideline Rule A.1).\n  Use the preprocessor only for real memory or ABI differences, and follow the surrounding\n  file's pattern for small edits.\n- Public symbols carry their subsystem prefix (`k_`, `sys_`, `net_`, `bt_`, `i2c_`, ...). Public\n  functions have Doxygen with a brief description, `@param` and `@retval <value> <text>` for\n  each discrete return value, success first and a value repeated when different conditions\n  produce it: `@retval -EINVAL Invalid argument`, not \"if the argument is invalid\"\n  (`doc/contribute/style/doxygen.rst`).\n- Every `CONFIG_` symbol referenced in code or Kconfig must be defined in the tree (KconfigBasic\n  check). Symbol naming and `menuconfig`/`if` structure: `doc/contribute/style/kconfig.rst`;\n  `select` versus `depends on`: `doc/build/kconfig/tips.rst`.\n- New original files start with the two SPDX header lines in the file's comment syntax: the\n  copyright text (`Copyright The Zephyr Project Contributors`, or the actual holder) and the\n  `Apache-2.0` license identifier; the top of this file shows the Markdown form. Code imported\n  under another license keeps its own headers, needs the approval described in\n  `doc/contribute/guidelines.rst` (Components using other Licenses) and an annotation in\n  `REUSE.toml`; never rewrite existing license metadata.\n- Test and sample metadata lives in `tests.yaml`; `sample.yaml` and `testcase.yaml` are legacy\n  names CI rejects for new files. Scripts that twister executes directly, such as bsim\n  `tests_scripts/*.sh`, must be committed with mode `100755`.\n- Blocks delimited by `zephyr-keep-sorted` start/stop marker comments stay sorted (KeepSorted\n  check). No binary files except images under `doc/`, `boards/` and `samples/` within the\n  size limits (the BinaryFiles check holds the exact allow-list).\n- Devicetree: a compatible for a vendor's device is `<vendor>,<device>` with the vendor listed\n  in `dts/bindings/vendor-prefixes.txt`; generic hardware such as `gpio-leds` gets no invented\n  prefix. Every new compatible needs a binding under `dts/bindings/`. See\n  `doc/contribute/style/devicetree.rst` and `doc/build/dts/bindings-upstream.rst`.\n- Documentation under `doc/` is reStructuredText in American English, 100 columns (URLs\n  excepted): `doc/contribute/documentation/guidelines.rst`.\n\n## Finding things\n\n- Subsystems: `subsys/`; drivers: `drivers/<class>/`; public API headers: `include/zephyr/` and\n  the APIs defined under `lib/` (a subsystem's own `include/zephyr/`, such as ztest's, is not\n  public API); kernel: `kernel/`; boards: `boards/<vendor>/`; SoCs: `soc/`; devicetree: `dts/`;\n  tests: `tests/`; samples: `samples/`; tooling: `scripts/`.\n- `MAINTAINERS.yml` maps paths to areas and people. The recent history of a path is the best\n  guide to its local conventions: `git log --oneline -20 -- <path>`.\n- The documentation source is `doc/`, published at https://docs.zephyrproject.org/latest/. The\n  published docs, the source tree and the last six months of issues and PRs are also searchable\n  through the project's MCP server, `https://zephyrproject.mcp.kapa.ai`\n  (`doc/develop/tools/kapa_ai.rst`); its answers are generated and must be verified against the\n  tree.\n\n<!-- File: CLAUDE.md (Tokens: ~33 | Category: claude-rule) -->\n<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n@AGENTS.md\n\n<!-- File: .github/copilot-instructions.md (Tokens: ~334 | Category: copilot-instructions) -->\n<!--\nSPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\nSPDX-License-Identifier: Apache-2.0\n-->\n\n# Zephyr Project — Copilot Instructions\n\nThe instructions for AI coding agents working on this repository are in `AGENTS.md` at the\nrepository root. Copilot cloud agent, Copilot code review and the IDE agents load that file\ndirectly; this file only covers the Copilot features that do not, and code review.\n\n## All Copilot features\n\n- Follow `AGENTS.md`, `doc/contribute/guidelines.rst` and `doc/contribute/style/`.\n- Never add `Signed-off-by:` or `Co-authored-by:`; add one `Assisted-by: Copilot:<model>`\n  trailer to commits you help write.\n\n## Code review\n\n- Report only concrete, verifiable problems: a rule violation with the rule, a bug with the\n  input that triggers it, a missing test with the untested behavior. Skip praise and summaries.\n- Do not request changes for anything CI catches (checkpatch, gitlint, compliance); reviewers\n  are asked not to (`doc/contribute/reviewer_expectations.rst`).\n- Do not flag style in lines the PR does not touch, and do not ask for tree-wide cleanups.\n- Check commit messages: `area:` prefix, non-empty body, `Signed-off-by` present, exactly one\n  `Assisted-by:` trailer when AI tools were used, no `Co-authored-by`. A change that addresses\n  an issue carries `Fixes #N` in the PR description or a commit.\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/zephyrproject-rtos/zephyr/HEAD/.cursor/mcp.json)\n</yakaai_skills>"}