chore(copilot): add a short instructions file, stop recommending @copilot review

Copilot has billed by TOKEN since 2026-06-01 (GitHub AI Credits, 1 credit =
$0.01), not by premium request. Two consequences for this repo:

- `.github/copilot-instructions.md` is resent as input on every request, so
  it is deliberately ~40 lines: the rules whose violation is a build break
  (C89/MSVC, generated trees, JTRM-over-comments), the review priorities,
  and an explicit do-not-flag list. Depth belongs in
  `.github/prompts/*.prompt.md`, which load only when invoked.

- CLAUDE.md documented `gh pr comment N --body "@copilot review"` as the way
  to get a review. That spawns a Copilot *coding agent* session -- 38 of them
  in Aug 2026, up to 4 on a single PR -- and `kimi-review.yml` already reviews
  every PR to develop/master automatically on a different provider's budget.
  The guidance is now "don't, unless a second opinion is worth the spend".
  Same edit in the CD revival plan, which hard-coded the trigger as a step.

Not addressed here because it is a repo SETTING with no REST endpoint:
automatic Copilot code review still fires ~1s after every human PR is opened
(144 runs Aug 1-13). Turn it off in Settings -> Copilot -> Code review.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Joseph MattielloandClaude Opus 5 committed 2026-08-14 23:02:25 -04:00
1 parent 2d26ece801
commit 8735992f5c
2 files changed
+45 -1

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
Return code only. No conversational filler, no restatement of the diff, no
markdown commentary unless asked. One line per finding.
Deliberately short: this file is input on every request, and GitHub bills
Copilot by token since 2026-06-01. Depth belongs in `.github/prompts/*.prompt.md`,
invoked on demand. Do not grow this file.
## What this is
Virtual Jaguar libretro core — Atari Jaguar emulator. C, GPLv3, big-endian
hardware, four processors sharing one memory map.
## Hard rules (a violation is a build break, not a style opinion)
- **C89/GNU89 only.** The libretro buildbot uses MSVC. No mid-block
declarations, no `for (int i…)`, no compound literals, no designated
initializers, no VLAs. All variables at the top of a block, before any
statement. This is the most common violation — check it first.
- **Never "clean up" generated or vendored code**: `src/m68000/cpu*.c` and
`read*.c` (UAE 68K, machine-generated, ~1.8 MB), `src/bios/jag*bios*.c`
(bin2c hex tables), `libretro-common/`.
- **Hardware behaviour is settled against the JTRM and the jag_sim netlists,
never against source comments** — the comments have been wrong before (the
PIT clock was documented at half its real rate for years). Distilled
reference: `docs/jtrm-*.md`.
- **Branch from `develop`.** `master` is release-only.
## Review priorities, in order
1. Correctness against the hardware reference, for anything touching
`src/tom/`, `src/jerry/`, `src/cd/`, or the memory map.
2. C89 violations.
3. Tests that cannot fail — an assertion that passes when its fixture is
broken, a script that exits 0 having skipped everything, a check made
tautological by the code it guards. This repo has shipped all three.
4. Savestate coverage: new persistent emulator state must be in the state
blob, or run-ahead and netplay desync.
## Do not flag
- Missing explanations, comment density, or formatting.
- The `//` comment style — GNU89 allows it and existing code uses it.
- Anything in the exempt paths above.
+2 -1
View File
@@ -186,8 +186,9 @@ The "Acid suite (linux x86_64)" job can show `conclusion: failure` for two unrel
- List unresolved threads: `gh api graphql -f query='{repository(owner:"libretro",name:"virtualjaguar-libretro"){pullRequest(number:N){reviewThreads(first:30){nodes{id isResolved comments(first:1){nodes{id author{login} body}}}}}}}'`
- Inline reply: `gh api -X POST repos/libretro/virtualjaguar-libretro/pulls/N/comments/<REST_ID>/replies -f body="..."` — parent is the REST `id` from `gh api .../comments`, NOT the GraphQL `PRRC_*` id (returns 404).
- Resolve thread: `gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "PRRT_..."}) { thread { isResolved } } }'`.
- Trigger a Copilot review: `gh pr comment N --body "@copilot review"`. The `requested_reviewers` REST endpoint rejects `copilot-pull-request-reviewer` as "not a collaborator".
- Always reply AND resolve when addressing feedback — leaving a thread open after a fix is noise for the next reviewer.
- **Do NOT trigger Copilot reviews.** `gh pr comment N --body "@copilot review"` used to be the documented trigger; it is now discouraged. Copilot bills per token since 2026-06-01, that comment spawns a *coding agent* session (38 of them in Aug 2026, up to 4 on a single PR), and `kimi-review.yml` already reviews every PR to `develop`/`master` automatically on a different provider's budget. Reach for it only when a second opinion is genuinely worth the spend, and say why in the PR.
- Repo-level custom instructions for Copilot live in `.github/copilot-instructions.md`. Keep it short — it is input on every request. Depth goes in `.github/prompts/*.prompt.md`, which load only when invoked.
### Headless framebuffer caveat