From 90ac681c5e7fdce69660994ec71be5c48bde1411 Mon Sep 17 00:00:00 2001 From: Geoffrey Vancoetsem <10533139+geeooff@users.noreply.github.com> Date: Mon, 23 Nov 2026 21:20:45 +0100 Subject: [PATCH] Add project skills for the repeated procedures release, install-locally, upgrade-dependencies and localize, each with the pitfalls met so far (windowed exe and PowerShell, single instance, MuiCache names, eframe+egui families, persona-briefed translation). Machine paths stay in CLAUDE.local.md. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/install-locally/SKILL.md | 46 +++++++++++++++++ .claude/skills/localize/SKILL.md | 52 ++++++++++++++++++++ .claude/skills/release/SKILL.md | 48 ++++++++++++++++++ .claude/skills/upgrade-dependencies/SKILL.md | 45 +++++++++++++++++ AGENTS.md | 4 ++ 5 files changed, 195 insertions(+) create mode 100644 .claude/skills/install-locally/SKILL.md create mode 100644 .claude/skills/localize/SKILL.md create mode 100644 .claude/skills/release/SKILL.md create mode 100644 .claude/skills/upgrade-dependencies/SKILL.md diff --git a/.claude/skills/install-locally/SKILL.md b/.claude/skills/install-locally/SKILL.md new file mode 100644 index 0000000..afad5bb --- /dev/null +++ b/.claude/skills/install-locally/SKILL.md @@ -0,0 +1,46 @@ +--- +name: install-locally +description: Update the maintainer's installed copy of Quick Video Transcoder (the folder their Send to shortcut points at) from a published release with its GitHub attestation verified, or from a build of main. Use when the maintainer asks to update, reinstall or refresh the installed or "release" copy, or to test a published release locally. +--- + +# Updating the installed copy + +The install folder and the shortcut are machine-specific: read them from `CLAUDE.local.md` (never write them +in a tracked file). The folder holds **only** `quick-video-transcoder.exe`; its *Send to* shortcut points at +that exe, so replacing the file in place keeps it working. + +## Rules + +- Never overwrite while the application runs: `Get-Process quick-video-transcoder`. If one runs, ask the + maintainer to close it — never kill their window. Check the *path* of a running process: a test build of + yours may be the one running. +- A windowed exe: PowerShell does not wait for it when capturing output. Ask it for its version with + `Start-Process -ArgumentList '--version' -RedirectStandardOutput -NoNewWindow -Wait`. +- Any script with a backslash goes through a file written with the Write tool. Assert every path before + writing or deleting, and compare hashes after copying. +- Deleting anything else in the install folder needs the maintainer's yes. + +## From a published release (preferred) + +1. `gh release download vX.Y.Z --repo geeooff/quick-video-transcoder --dir `. +2. The SHA-256 of the exe equals the line in `SHA256SUMS.txt`. +3. `gh attestation verify --repo geeooff/quick-video-transcoder --signer-workflow geeooff/quick-video-transcoder/.github/workflows/release.yml --source-ref refs/tags/vX.Y.Z` + — restricted to that workflow and tag; `--format json` shows the commit. Any failure: do not install. +4. `--version` prints `X.Y.Z` and the tag's commit. +5. Copy over the installed exe, re-check the hash, show the folder and the file's version block. + +## From main (between releases, to try what is merged) + +`git worktree add --detach /main-tree origin/main`, `.\scripts\build.ps1 release` there (the +published profile), install `dist\quick-video-transcoder.exe` as above (hash, `--version` naming that +commit), then remove the worktree (`Remove-Item -LiteralPath ('\\?\' + )` for long paths, then +`git worktree prune`). Say plainly that it is not a release (About shows the last version number). + +## Windows details + +- *Open with* / *Send to* names come from the exe's `FileDescription`, cached per path in + `HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache` + (`.FriendlyAppName`, `.ApplicationCompany`). A stale name (an exe once run without a version block) + is fixed by deleting those two values for that path — with the maintainer's yes. +- A shell started by the Claude desktop app may see `%APPDATA%` through the package's private copy: check + the shortcut where Explorer reads it before concluding it is missing. diff --git a/.claude/skills/localize/SKILL.md b/.claude/skills/localize/SKILL.md new file mode 100644 index 0000000..66b22a7 --- /dev/null +++ b/.claude/skills/localize/SKILL.md @@ -0,0 +1,52 @@ +--- +name: localize +description: Translate Quick Video Transcoder — new or changed English messages into French and its regional variants, or a whole new language — with persona-briefed subagents (translator, cold reviewer, regional localizers), screenshots and the project's Fluent rules. Use when messages were added or changed, when the maintainer asks for a new language or variant, or to review a translation. +--- + +# Localizing + +Rules live in `docs/localization.md` (conventions, typography, glossary, regional decisions) and the doc +comment of `src/i18n.rs`. Read both first. The maintainer has no native reviewers: quality comes from the +briefs, context and a cold review — never from literal translation. + +## When code adds or changes texts + +- Every user-facing text is `crate::tr!("area-element", var = value)` with the English message in its source + area of `i18n/en/quick_video_transcoder.ftl`, a `#` comment when the meaning is not obvious (where it + shows, what each variable holds). Numbers through `{ NUM($x, decimals: N) }`, plurals as multi-line + selectors, data (names, codecs, time codes) as string variables, logs stay English. +- `french_is_complete` fails until French has the new ids: translate them in the same change. When a French + message changes, update the same message in regional files (`fr-CA`…). +- Check the layout in the longest languages: debug build, then + `QVT_LANGUAGE=fr-FR` or `QVT_PSEUDO=1` with `QVT_SCREENSHOT=` on a synthetic clip in a scratch + folder (one app instance at a time: a second launch hands its files to the first). + +## Translating with subagents + +A few messages: do it inline with the same rules. Many, or a new language — orchestrate: + +1. **Brief** (one file in scratch, read by every agent): the app and its users (gamers sharing clips in + size-limited chats), `README.md`, `docs/localization.md`, the English file with comments, a screenshot of + the window in English, the Fluent rules (keep ids/variables/selectors, literal U+00A0/U+202F, CLDR plural + categories), the checks (`cargo test --locked --lib i18n`, a screenshot in their language), "edit only your + file, never commit". Only one agent at a time takes screenshots. +2. **Translator** with a strong native persona (a seasoned localizer of games and consumer software from a + precise city, who uses the platform's own terms and hates translated-sounding text). Writes the complete + base file. +3. **Cold reviewer**, another persona (UX writer) who did not write it: contresens against the code, + calques, register, consistency, typography, length on the screenshot. Edits the file, reports + before → after. +4. **Regional localizers**, one persona per variant, in parallel: keep only real differences (vocabulary, + typography conventions applied to every message concerned, keyboard names). An empty result is valid — + then no file; record the decision in `docs/localization.md`. +5. **Orchestrator** (you): read every report, fix what they found in the English source or the code, check + the screenshots yourself, run `.\scripts\build.ps1`, commit per step. + +Use the strongest model for the base translator and the reviewer; a lighter one is fine for variants with +few expected differences. Agents hit by a usage limit are resumed with SendMessage, not restarted. + +## A new language + +`LANGUAGES` in `src/i18n.rs` (variants named in their own language), a complete base file, regional files, +a completeness test if the project commits to it, egui font coverage (Latin, Greek, Cyrillic built in; CJK +via the system font fallback; no right-to-left layout in egui), and a row in the regional decisions table. diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md new file mode 100644 index 0000000..dd8c24e --- /dev/null +++ b/.claude/skills/release/SKILL.md @@ -0,0 +1,48 @@ +--- +name: release +description: Prepare and publish a Quick Video Transcoder release (vX.Y.Z), from the release commit to the published, attested executable and the maintainer's installed copy. Use when the maintainer asks to prepare, cut, tag or publish a release. +--- + +# Releasing Quick Video Transcoder + +A release is one file, `quick-video-transcoder.exe`, built by `release.yml` from a tag. Pushing the release +branch and the tag need the maintainer's go-ahead (a pull request merges by itself once CI is green: that +approval stands). + +## 1. Ready? + +- `main` holds everything meant for the release; open PRs are merged or deliberately left out. +- `CHANGELOG.md` `[Unreleased]` lists what the user sees, under *Added*, *Changed*, *Fixed*, *Removed*. For a + first release of a feature, fixes made before it shipped are not *Fixed*: fold them into the *Added* line. +- The docs describe this version: the release links them at its commit forever (`AGENTS.md`). +- Version (semver): patch for fixes only, minor for a feature, major for a breaking change of what the user + relies on (profiles file, behaviour). Propose it; the maintainer decides. + +## 2. The release commit + +On `release/vX.Y.Z` from an up-to-date `main`: + +1. `version = "X.Y.Z"` in `Cargo.toml`, then `cargo update -p quick-video-transcoder --offline` for the lock. +2. `CHANGELOG.md`: a new empty `## [Unreleased]`, then `## [X.Y.Z] - YYYY-MM-DD` (today) with what was under + it; at the bottom, `[Unreleased]: …/compare/vX.Y.Z...HEAD` and `[X.Y.Z]: …/releases/tag/vX.Y.Z` (and fix + the previous version's link to compare with its predecessor). +3. Commit `Release X.Y.Z` (body: what it brings, why this bump). +4. `.\scripts\build.ps1 release` from that clean commit: the published fat LTO profile, never `-Fast`. + Read the whole output: `notes.md from the changelog`, the notices, `release OK`. + +## 3. Publish + +1. Push the branch, open the PR (`Release X.Y.Z`), `gh pr merge --auto --merge`. +2. Once merged: `git switch main && git pull --ff-only`, check `version` and the dated section, then tag the + **merge commit** and push the tag alone: + `git tag -a vX.Y.Z -m "Quick Video Transcoder X.Y.Z"`, `git push origin vX.Y.Z`. +3. Follow the run: `gh run list --workflow release.yml -L 1`, then + `gh run watch --exit-status` in the background. On failure read `gh run view --log-failed`, + fix on a branch, and re-tag only with the maintainer (a pushed tag is not moved silently). +4. Check the page: `gh release view vX.Y.Z` — `quick-video-transcoder.exe`, `SHA256SUMS.txt`, notes from the + changelog, not a draft. + +## 4. After + +- Install it on this machine with the **install-locally** skill (from the release, attestation verified). +- Report to the maintainer: the release URL, what it contains, what was not verified (other GPUs, Linux). diff --git a/.claude/skills/upgrade-dependencies/SKILL.md b/.claude/skills/upgrade-dependencies/SKILL.md new file mode 100644 index 0000000..3081026 --- /dev/null +++ b/.claude/skills/upgrade-dependencies/SKILL.md @@ -0,0 +1,45 @@ +--- +name: upgrade-dependencies +description: Upgrade Quick Video Transcoder's dependencies across breaking versions — crate 0.x minors and majors (eframe/egui, wgpu, cpal, rfd, ICU4X, i18n-embed…), GitHub Actions majors, a new stable toolchain — following each upgrade guide, without workarounds, and explain a Dependabot PR that did not merge by itself. Use when the maintainer asks to update dependencies or why a Dependabot PR is waiting or failing. +--- + +# Upgrading the dependencies + +Dependabot merges by itself what Cargo calls compatible (patches, minors of crates ≥ 1.0) once the `build` +check passes. A 0.x minor (`rfd` 0.17 → 0.18), a major, or an action major waits — by design of +`dependabot-automerge.yml`. With CI green, such a PR may be merged (standing approval); otherwise the work is +done here. + +## Why a Dependabot PR is waiting or red + +- Waiting with CI green: a 0.x minor or a major — the workflow skipped its merge step on purpose. Say so, + then merge it if the maintainer's standing approval applies. +- Red: read `gh pr checks ` and `gh run view --log-failed`; usually an API break (follow §2) or a new + `rust-version` requirement. + +## What is behind + +`cargo info ` for each direct dependency (`latest` shows the newest), each `uses:` against +`gh api repos///releases/latest --jq .tag_name`, `gh pr list --author app/dependabot`. Show the +list (locked, latest, kind of change) and agree on what to take. + +## One dependency (or family) at a time + +On `deps/-` from `main`: + +1. **Read the upgrade path**: changelog / migration guide of every version between, from the publisher. Note + each break this code meets. +2. Raise `Cargo.toml`, `cargo update -p `. A newer required Rust raises `rust-version` (comment why). +3. Fix each break **the way the guide says**. Never: a silenced lint, a `[patch]` or fork, a held-back + version, a feature turned off to dodge a change. +4. Families that move together, in one commit and one Dependabot group (`.github/dependabot.yml`): + - `eframe` + `egui`: egui is a direct dependency only for `monochrome_emoji_fonts`; a lone eframe bump + builds two eguis and silently drops it. `app::tests::symbols_are_in_the_embedded_fonts` catches it. + - The ICU4X crates (`icu_decimal`, `icu_locale_core`, `icu_provider`, `fixed_decimal`) on one 2.x line; + `i18n-embed` + `i18n-embed-fl`. Check `i18n::tests` and a French screenshot (`25,0 Mo`). +5. egui upgrades: check the window — `QVT_SCREENSHOT` on a synthetic clip, and the pseudo-locale + (`QVT_PSEUDO=1`) for layout regressions. Glyphs can change between versions. +6. `.\scripts\build.ps1` (and `build` for anything that changes the exe), read the whole output. +7. Changelog only for what a user notices. Push, PR, auto-merge (push needs the maintainer's go-ahead). + +An upgrade that cannot be done properly (upstream bug, no replacement) is not forced: stop, write why, ask. diff --git a/AGENTS.md b/AGENTS.md index cfbcfc3..a55d230 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -71,6 +71,10 @@ tests/pipeline.rs end to end on synthetic clips examples/transcode.rs ## Workflow +Project skills in `.claude/skills/`: **release**, **install-locally**, **upgrade-dependencies**, **localize** — +the procedures this repository repeats, with their pitfalls. Use them; update them when a procedure changes. + + ```powershell .\scripts\build.ps1 # fmt, clippy -D warnings, rustdoc -D warnings, tests, doc links, no video / personal path .\scripts\build.ps1 build # + optimized build, release-fast profile (thin LTO, ~20 s)