Skip to content

Commit 24ba4e1

Browse files
committed
chore: sync AI instruction files from enterprise template
Updated boilerplate sections to match current conventions in edx/ai-devtools-internal docs/templates/.
1 parent 6af07e3 commit 24ba4e1

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,43 @@ At the start of every session, before doing any other work, read:
1010

1111
Treat their contents as binding project instructions for the remainder of the
1212
session, equivalent to instructions in this file.
13+
14+
## PR Review Instructions
15+
16+
When reviewing a PR, focus on the areas below.
17+
18+
### Code correctness and performance
19+
20+
1. Flag incorrect business logic.
21+
2. Flag areas that are potentially inefficient or unperformant.
22+
23+
### Excess and redundancy
24+
25+
Bias toward flagging **excess and redundancy**.
26+
27+
1. **Reuse before reinvent.** Flag code that duplicates existing functionality - identify the existing equivalent symbol.
28+
2. **Earn every guard.** Defensive code (try/except, null-checks, fallbacks) must address a
29+
failure that can actually happen at this call site given the system's invariants.
30+
3. **Don't swallow exceptions.** If you catch an exception, re-raise it or convert it to a more actionable error; avoid catch-and-log-only (or catch-and-ignore) handling.
31+
4. **YAGNI / trust the defaults.** Don't build for hypothetical futures. Don't re-implement what
32+
the framework already does (DRF pagination, auth, serializer defaults). Flag speculative
33+
generality and needless overrides of correct defaults.
34+
5. **Respect the source of truth.** Data should be read from its canonical owner. Flag calls to
35+
external services for data the system already stores locally (e.g. a live Stripe price lookup
36+
when a local price table keyed by slug exists). Name the local source you're pointing to.
37+
38+
### Security
39+
40+
Check auth/permission classes, input validation at trust boundaries, injection vectors, secrets
41+
in code, missing PII annotations, CSRF. For Django/DRF backends: verify `edx-drf-extensions`
42+
and `edx-rbac` patterns. For React frontends: check XSS vectors and exposed keys. Cite
43+
`file:line` for every finding.
44+
45+
### Test coverage
46+
47+
Flag new logic shipped without tests, tests that assert implementation detail rather than
48+
behavior, missing edge cases that can actually happen, and brittle snapshot tests.
49+
50+
### Output format
51+
52+
Briefly highlight any critical or high severity issues.

0 commit comments

Comments
 (0)