Skip to content

Commit 736a466

Browse files
committed
Make copilot PR reviews more precise & less noisy
1 parent 232f58f commit 736a466

1 file changed

Lines changed: 103 additions & 10 deletions

File tree

.github/copilot-instructions.md

Lines changed: 103 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ This repository contains a SKOS vocabulary for catalysis. When reviewing pull re
99
**Problem:** New concepts in the SKOS vocabulary must be properly classified by linking them to the hierarchy through `skos:broader` relationships, eventually reaching one of the top concepts.
1010

1111
**What to look for:**
12-
- Excel files in `inbox-excel-vocabs/` with new concepts
12+
- Vocabulary PRs are initiated by uploading an Excel file to
13+
`inbox-excel-vocabs/` (transient: CI converts and removes it). Rely on the PR
14+
description and CI validation artifacts rather than the file’s continued
15+
presence in the branch.
1316
- Check if new concepts have `skos:broader` relationships defined
14-
- Verify the broader concepts eventually chain to a top concept like:
15-
- Process
16-
- Method
17-
- Material entity
18-
- Quality
19-
- Role
20-
- etc.
17+
- Verify the broader chain reaches one of Voc4Cat's top concepts:
18+
- Physical entity (`voc4cat:0000180`)
19+
- Non-temporal abstract entity (`voc4cat:0000181`)
20+
- Temporal abstract entity (`voc4cat:0000182`)
21+
- Common high-level children: Events (`voc4cat:0000183`), Actions (`voc4cat:0000184`), Processes (`voc4cat:0000185`)
22+
- Attributes (`voc4cat:0000186`)
2123

2224
**Suggested response:**
2325
```
@@ -33,6 +35,31 @@ Let me know if you need help identifying the appropriate parent concepts!
3335

3436
## General Guidance
3537

38+
### PR Review Style (Concise, no diff rehash)
39+
40+
- Summarize changes in plain language: what changed and why.
41+
- Do not restate or quote diffs, hunks, or line-by-line changes.
42+
- Do not link to individual file diffs; reference files only when necessary (path + short purpose).
43+
- Focus feedback on correctness, classification, scope, and follow-ups rather than code excerpts.
44+
- Keep the review brief, actionable, and non-repetitive with what the GitHub diff already shows.
45+
46+
### Choosing the Right Review Template
47+
48+
Use simple heuristics based on PR intent and CI signals:
49+
- Use the Vocabulary template when the PR clearly introduces vocabulary changes
50+
(e.g., PR description mentions an Excel upload or CI ran vocabulary
51+
validation). Direct `.ttl` edits should be flagged (TTLs are CI-generated).
52+
- Use the Docs / CI template when changes are in `docs/**`, Sphinx config (`docs/conf.py`), `.github/workflows/**`, tooling, or other infrastructure.
53+
- Mixed PRs: pick the primary area of change and mention secondary impacts briefly. If vocabulary + docs both change substantially, you may include two short sections using both templates.
54+
- Always avoid rehashing diffs; focus on correctness, classification, scope, build status, and next steps.
55+
56+
### File Discovery Hints
57+
58+
- Source Excel upload path: `inbox-excel-vocabs/voc4cat.xlsx` (transient; CI converts and removes it)
59+
- TTL files are CI-generated and read-only in reviews; use only for context
60+
- Glob for concept TTLs: `vocabularies/voc4cat/[0-9]*.ttl`
61+
- Regex for concept TTLs: `vocabularies/voc4cat/[0-9]{7}\.ttl`
62+
3663
### What Makes a Good Contribution
3764

3865
- **Small, focused changes**: Single concept additions or small groups (~20 concepts)
@@ -43,8 +70,7 @@ Let me know if you need help identifying the appropriate parent concepts!
4370

4471
### What to Check in PRs
4572

46-
1. **File locations**: Excel files must be in `inbox-excel-vocabs/`
47-
2. **File naming**: Keep as `voc4cat.xlsx`
73+
1. **Excel upload**: `inbox-excel-vocabs/voc4cat.xlsx` (if visible in the initial upload commit; CI may remove it after conversion)
4874
3. **No direct .ttl edits**: Turtle files should only be modified by CI
4975
4. **Documentation**: Changes should be described in PR description
5076
5. **Size**: Large contributions should be split into smaller PRs
@@ -80,3 +106,70 @@ Let me know if you need help identifying the appropriate parent concepts!
80106
4. **Nice-to-have**: Documentation improvements, minor formatting
81107

82108
Focus feedback on critical and important issues first. Mention helpful suggestions but don't insist on them for small contributions.
109+
110+
## Review Templates
111+
112+
Use these templates to structure PR reviews. Keep them concise. Do not quote diffs or link to specific file hunks; summarize in plain language.
113+
114+
### Vocabulary PR Review Template
115+
116+
Scope:
117+
- Additions or changes in vocabulary (Excel upload is transient; TTLs are CI-generated and should not be edited directly)
118+
119+
```
120+
Summary: <1–3 sentences describing what changed and why>
121+
122+
Classification:
123+
- Each concept has skos:broader and a chain to a top concept
124+
(Physical entity, Non-temporal abstract entity, Temporal abstract entity [Events/Actions/Processes], Attributes)
125+
126+
Quality:
127+
- PrefLabel + definition present (EN) per concept
128+
- No direct .ttl edits; TTL generated by CI
129+
- Conformance to guidelines <https://github.com/nfdi4cat/voc4cat/blob/main/docs/docs_usage/guidelines.md>:
130+
British English; noun/noun-phrase form; duplicates avoided; appropriate
131+
hyphenation; no slashes; definitions concise and non-circular.
132+
133+
Suggestions (optional):
134+
- <brief, actionable improvements; keep it short>
135+
- If CI checks failed, add one bullet per failing job with a short, actionable
136+
hint (e.g., "Validation failed – fix missing skos:broader for 3 concepts").
137+
Do not paste logs; reference the job name/title only.
138+
139+
Issues (optional):
140+
- Blocking: <list only items that must be fixed before merge>
141+
- Follow-ups (non-blocking): <short bullets>
142+
143+
Next steps:
144+
- <what the author should do next; or "LGTM – ready to merge">
145+
```
146+
147+
### Docs / CI PR Review Template
148+
149+
Scope:
150+
- Area(s): docs pages, Sphinx config, CI workflow, tooling
151+
- Impact: user-facing docs, build pipeline, release process
152+
153+
```
154+
Summary: <1–3 sentences describing what changed and why>
155+
156+
Build / Checks:
157+
- Local/CI build status: <passes/fails + short note>
158+
- Preview/outputs: <describe availability; do not paste diffs>
159+
- If CI failed, summarize failing job names and add brief, actionable hints in
160+
Suggestions; avoid quoting logs.
161+
162+
Risk / Compatibility (optional):
163+
- Backwards-compatibility: <low/medium/high>
164+
- Notable trade-offs: <short bullets>
165+
166+
Issues (optional):
167+
- Blocking: <list only items that must be fixed before merge>
168+
- Follow-ups (non-blocking): <short bullets>
169+
170+
Suggestions (optional):
171+
- <brief, actionable improvements>
172+
173+
Next steps:
174+
- <what the author should do next; or "LGTM – ready to merge">
175+
```

0 commit comments

Comments
 (0)