| applyTo | .github/instructions/*.instructions.md |
|---|
These files define Copilot review rules for the BCC project. When editing them, follow the steps below to avoid writing rules that contradict the actual codebase.
-
API / function examples — read the actual source before writing:
- Python BCC API → check
src/python/bcc/table.py - BPF helper signatures → check
libbpf-tools/*.bpf.cexamples - Userspace libbpf patterns → check
libbpf-tools/*.cexamples
- Python BCC API → check
-
Conventions (shebang, imports, prefixes, etc.) — sample the real files:
tools/*.pyfor Python conventions (shebang)libbpf-tools/*.c/*.bpf.cfor C conventionsgit log --oneline origin/master | head -30for commit prefix convention (format:subsystem/toolname:)
-
Do not invent or assume an API method, macro, or convention exists — verify it in the repo first.
| File | applyTo |
Triggers when… |
|---|---|---|
tools.instructions.md |
tools/** |
editing a tool file |
libbpf-tools.instructions.md |
libbpf-tools/**/* |
editing a libbpf tool |
core.instructions.md |
src/cc/** |
editing BCC core library |
examples.instructions.md |
examples/** |
editing an example |
instructions.instructions.md |
.github/instructions/*.instructions.md |
editing these rule files |
- Global rules belong in
copilot-instructions.md; subsystem files add only what is specific to that path - Keep
<CriticalRules>short — Copilot has a ~4,000 character review window - One rule per bullet; no redundancy with
copilot-instructions.md - Flag blockers explicitly; use 🟡 Warning for non-blockers