Skip to content

Commit cf49681

Browse files
anakrishCopilot
andcommitted
fix: strengthen review comment format to require perspective tags
Move comment format from a subsection hint to a top-level REQUIRED section with concrete examples and explicit 'no exceptions' language. This should improve compliance from the PR review bot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4bf4818 commit cf49681

1 file changed

Lines changed: 29 additions & 16 deletions

File tree

.github/copilot-code-review-instructions.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,28 +43,41 @@ You decide which scale matters most for each change. A one-line fix in
4343
`value.rs` may need deep big-picture thinking. A large refactor may mostly
4444
need file-level polish review.
4545

46-
## Review Perspectives
46+
## Comment Format (REQUIRED)
4747

48-
Adopt these perspectives during your review. You cannot launch subagents, so
49-
**think from each relevant perspective yourself**. Not every perspective applies
50-
to every change — select the ones that matter based on what changed.
48+
Every review comment you write MUST begin with this exact structure — no exceptions:
49+
50+
**Line 1:** `**[Perspective]** SEVERITY`
51+
**Line 2:** `> One-sentence issue title suitable for a GitHub issue`
52+
**Line 3+:** Your detailed explanation
53+
54+
Where:
55+
- **Perspective** is one of: `Red Teamer`, `Semantics Expert`, `Architect`, `Performance Engineer`, `Test Engineer`, `Security Auditor`, `Reliability Engineer`, `Support Engineer`, `API Steward`, `Refactorer`
56+
- **SEVERITY** is one of: `🔴 critical`, `🟠 important`, `🔵 suggestion`
57+
58+
Here are two examples of correctly formatted comments:
5159

52-
### Comment format
60+
**[Reliability Engineer]** 🔴 critical
61+
> strings.repeat panics on non-numeric input via unwrap()
5362
54-
Start each review comment with:
55-
1. **Perspective tag** — bold prefix identifying which role raised it, e.g. `**[Red Teamer]**`, `**[Semantics Expert]**`, `**[Reliability Engineer]**`
56-
2. **Severity** — one of 🔴 `critical`, 🟠 `important`, 🔵 `suggestion`
57-
3. **Issue-ready summary** — a single sentence in `> blockquote` that can be directly copied as a GitHub issue title
63+
`args[1].as_f64().unwrap()` panics when the argument is not numeric.
64+
Use `ensure_numeric()` and return Undefined for invalid inputs.
5865

59-
Example:
60-
```
61-
**[Red Teamer]** 🔴 critical
62-
> strings.repeat allows unbounded allocation via large count (DoS)
66+
**[Red Teamer]** 🟠 important
67+
> strings.repeat allows unbounded allocation (DoS vector)
6368
64-
The `repeat` function doesn't enforce resource limits...
65-
```
69+
No call to `enforce_limit()` during string growth. A malicious policy
70+
can pass a huge count to exhaust memory.
6671

67-
This format helps maintainers prioritize, understand *why* something was flagged, and quickly file tracking issues for findings they want to address separately.
72+
If a comment does not clearly map to one perspective, use the closest match.
73+
Every comment must have exactly one perspective tag — this tells the maintainer
74+
*which concern* identified the issue and helps them file tracking issues.
75+
76+
## Review Perspectives
77+
78+
Adopt these perspectives during your review. You cannot launch subagents, so
79+
**think from each relevant perspective yourself**. Not every perspective applies
80+
to every change — select the ones that matter based on what changed.
6881

6982
For deeper guidance on any perspective, read the corresponding agent file from
7083
`.github/agents/` — each contains detailed domain-specific checklists.

0 commit comments

Comments
 (0)