Skip to content

Add Copilot repository instructions and path-scoped instruction files - #18

Merged
sbokatuk merged 1 commit into
mainfrom
copilot/create-github-copilot-instructions
Jul 30, 2026
Merged

Add Copilot repository instructions and path-scoped instruction files#18
sbokatuk merged 1 commit into
mainfrom
copilot/create-github-copilot-instructions

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The repository had no agent instructions, so every Copilot session had to rediscover the things that are easy to get wrong here: the dual FFmpeg/FFmpegKit version schemes, the checksum-gated native fetch, and the two-pass pack.

Adds .github/copilot-instructions.md plus two path-scoped instruction files. Every command was checked against the script or workflow that runs it (build/resolve-versions.sh was run read-only to confirm both directions and the unmapped-version failure).

.github/copilot-instructions.md (~900 words)

  • Overview — class-parse binding, eight variants from one project via FFmpegKitBuildType, native .aar from dev.ffmpegkit-maintained on Maven Central (arthenica retired), and the two version schemes with build/native-versions.tsv as their single source of truth.
  • Build & verify — FetchJars → BuildNugets → PackageTests, single-variant pack with FFmpegKitSdkBand, --verify, and the baseline-first order for trying a new upstream line.
  • Layout, conventions, CI/release, testingFfmpegkit.Droid never moves, build-file comments are load-bearing, British spelling, invariant parsing returning null; PR beta → merged release note → auto-tag → guarded release; PackageTests always, device script when touching Additions/, Transforms/, the .aar wiring or the consumer .targets.
  • Hard rules — no committed binaries, no unbaselined or unverified fetch, no version-scheme confusion, keep FFMPEGKIT001/FFMPEGKIT002 on PrepareForBuild, keep the GPL/LGPL split and the non-GPL sample, ./artifacts over nuget.org, no hand-edited merged packages, no bypassing the release guard.
  • Closes with the instruction to trust the file and search only where it is incomplete or wrong.

.github/instructions/native-versions.instructions.md

applyTo: "build/native-versions.tsv, build/checksums/**, src/FFmpegKit.Android/Jars/**" — the ordered procedure for adopting a new upstream line: read the FFmpeg version out of the shipped libavcodec.so, record the baseline, add the mapping row, then bump the props.

./build/update-checksums.sh 8.2.0                        # record + commit the baseline first
./src/FFmpegKit.Android/Jars/FetchJars.sh 8.2.0          # refuses to run without one

.github/instructions/workflows.instructions.md

applyTo: ".github/workflows/*.yml"verify input semantics (true on PRs, false on releases), trusted publishing (environment: nuget.org, id-token: write, only NUGET_USER, push immediately after login), the release guard job, the auto-release → dispatch requirement, Linux runners and the x86_64/KVM/disk constraints on the emulator jobs.

No code, build or workflow behaviour is changed.

@sbokatuk
sbokatuk marked this pull request as ready for review July 30, 2026 10:15
@sbokatuk
sbokatuk merged commit bfee97e into main Jul 30, 2026
7 checks passed
@sbokatuk
sbokatuk deleted the copilot/create-github-copilot-instructions branch July 30, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants