Skip to content

Commit 708dcfd

Browse files
committed
docs: harden agent release guidance
1 parent 7282870 commit 708dcfd

6 files changed

Lines changed: 83 additions & 22 deletions

File tree

.agents/skills/code-review/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ Use Waza `/check` for the generic review method. This adapter adds Pake-specific
2020
- [ ] Changes to package metadata embedded by Rollup (`package.json` name/version/repository/bin/scripts/exports) rebuild and commit `dist/cli.js`.
2121
- [ ] Release version bumps keep `package.json`, `src-tauri/Cargo.toml`, `src-tauri/Cargo.lock`, and `src-tauri/tauri.conf.json` in sync.
2222
- [ ] npm release workflow changes preserve Trusted Publishing: `.github/workflows/npm-publish.yml`, `id-token: write`, canonical `git+https://github.com/tw93/Pake.git`, and `scripts/check-release-version.mjs`.
23+
- [ ] Release/status changes keep npm registry, GitHub Release/assets, workflow run state, and issue closeout as separate truth surfaces.
24+
- [ ] `workflow_dispatch` release logic does not infer the release tag from `headBranch`, run title, or compare UI; use an explicit tag/ref and verify the package `gitHead`.
2325
- [ ] No new `tauriConf: any` or other untyped config objects; use `PakeTauriConfig`.
2426
- [ ] No user-reachable `panic!` or `.unwrap()` on config, CLI, or event paths.
2527
- [ ] Silent `catch {}` blocks surface the real error through `logger.warn`.
2628
- [ ] New helper in `bin/utils/` or `bin/helpers/` has a matching `tests/unit/<basename>.test.ts`.
2729
- [ ] Binary parsers have a round-trip test, not only builder assertions.
30+
- [ ] Linux WebKit/AppImage runtime flag changes keep the default conservative, add or update tests for the decision logic, and update `docs/faq*.md` when users need a fallback command.
31+
- [ ] macOS `--new-window` or auth URL changes include targeted tests for popup/auth routing in `src-tauri/src/inject/event.js`.
2832

2933
## Quick Review Commands
3034

.agents/skills/release/SKILL.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ Four files must be updated in sync — never update one without the others:
2828
### Pre-Release
2929

3030
1. [ ] Confirm the new version number (check current: `cat package.json | jq .version`)
31-
2. [ ] Update all four version files above
32-
3. [ ] Run `pnpm run format` — must pass cleanly
33-
4. [ ] Run `pnpm test` — must pass cleanly. If the release workflow step fails with `pnpm install ... exit code 1` against the CN mirror, re-run once; a single transient flake is acceptable, two consecutive failures is not.
34-
5. [ ] Run `pnpm run cli:build` — Rollup + TS must pass (catches type errors that `format` misses).
35-
6. [ ] Run `pnpm run release:check` — verifies version sync, package contents, and npm dry-run
36-
7. [ ] No uncommitted changes: `git status`
37-
8. [ ] Commit version bump with message: `chore: bump version to VX.X.X`
31+
2. [ ] Confirm the version is not already on npm: `npm view pake-cli@X.Y.Z version` should return 404 before publishing
32+
3. [ ] Update all four version files above
33+
4. [ ] Run `pnpm run format` — must pass cleanly
34+
5. [ ] Run `pnpm test` — must pass cleanly. If the release workflow step fails with `pnpm install ... exit code 1` against the CN mirror, re-run once; a single transient flake is acceptable, two consecutive failures is not.
35+
6. [ ] Run `pnpm run cli:build` — Rollup + TS must pass (catches type errors that `format` misses).
36+
7. [ ] Run `pnpm run release:check` — verifies version sync, package contents, and npm dry-run
37+
8. [ ] No uncommitted changes: `git status`
38+
9. [ ] Commit version bump with message: `chore: bump version to VX.X.X`
3839

3940
### Tagging (triggers CI)
4041

@@ -49,19 +50,32 @@ Tag format: uppercase `V` prefix (e.g. `V3.11.0`), not `v3.11.0`.
4950

5051
1. [ ] Confirm CI triggered: `gh run list --workflow=release.yml`
5152
2. [ ] Watch CI status: `gh run watch`
52-
3. [ ] Verify GitHub Release was created: `gh release view VX.X.X`
53+
3. [ ] Verify GitHub Release was created: `gh release view VX.X.X --json tagName,url,assets`
5354
4. [ ] Confirm npm workflow exists and is active: `gh workflow list --all | grep "Publish npm Package"`
5455
5. [ ] Confirm npm Trusted Publishing triggered: `gh run list --workflow=npm-publish.yml`
55-
6. [ ] Verify npm published the package: `npm view pake-cli version` and `npm view pake-cli@X.Y.Z dist.tarball`
56+
6. [ ] Verify npm published the exact package: `npm view pake-cli@X.Y.Z version gitHead dist.tarball --json`
57+
7. [ ] Verify latest now resolves to the release: `npm view pake-cli version`
58+
8. [ ] Record Quality & Testing status separately: `gh run list --workflow=quality-and-test.yml --limit 3`
5659

5760
npm publishes through Trusted Publishing from `.github/workflows/npm-publish.yml`. Configure npm package settings with GitHub Actions, `tw93/Pake`, workflow file `npm-publish.yml`, and no environment. Local `npm publish` is only a fallback if CI or registry state blocks the trusted path.
5861

62+
Keep release surfaces separate in the final status:
63+
64+
- npm registry: the authority for `pake-cli` installability and CLI/npm issue closeout.
65+
- GitHub Release/assets: the authority for app installers and popular-app artifact availability.
66+
- Quality workflow: the authority for post-push CI health, but it can continue after npm has already shipped.
67+
- Source/tag: the authority for what code was intended to ship.
68+
69+
Do not collapse these into "released" without naming which surface was verified. If GitHub Release assets are visible while `gh run list` still reports the release workflow as queued or in progress, trust `gh release view` for asset state and report the workflow state separately.
70+
5971
## Trusted Publishing Notes
6072

6173
- The first real Trusted Publishing test must use a new version and a new `V*` tag; do not retry an already-published version.
6274
- npm package settings should use the strict publishing option: require two-factor authentication and disallow tokens. Trusted Publishing still works with this setting.
6375
- If local fallback is unavoidable, prefer `npm exec --yes --package=pnpm@10.26.2 -- npm publish --registry=https://registry.npmjs.org` so `prepublishOnly` can find the pinned pnpm version.
64-
- Do not reply to GitHub issues or close them as released until `npm view pake-cli@X.Y.Z version` returns the expected version.
76+
- Do not reply to GitHub issues or close them as released until `npm view pake-cli@X.Y.Z version` returns the expected version. `npm view pake-cli version` alone is not enough because `latest` can point at a different commit than the fix under review.
77+
- A `workflow_dispatch` run may execute on `main`; do not treat `headBranch`, run title, or compare UI as the release tag. Check the pushed tag and published package `gitHead`.
78+
- If CI creates `chore: update contributors [skip ci]` after the tag is pushed, fast-forward local `main` after the release. Do not retag just to include generated contributor art.
6579

6680
## Build Commands (local only)
6781

.agents/skills/use-pake/SKILL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,22 @@ After build, confirm:
136136

137137
Not supported. Pake uses system WebView (WKWebView on macOS, WebView2 on Windows, WebKitGTK on Linux), not a full Chrome browser. Use `--inject` to add custom JS/CSS as an alternative.
138138

139+
### Linux Wayland Input Issues
140+
141+
If an AppImage opens but buttons cannot be clicked or keyboard input does not reach the page on a pure Wayland compositor, especially niri, first rebuild with the latest `pake-cli`. Then try the native WebKit path:
142+
143+
```bash
144+
PAKE_LINUX_WEBKIT_SAFE_MODE=0 ./YourApp.AppImage
145+
```
146+
147+
If that produces a blank window on the same system, re-enable the conservative WebKit workaround:
148+
149+
```bash
150+
PAKE_LINUX_WEBKIT_SAFE_MODE=1 ./YourApp.AppImage
151+
```
152+
153+
Do not diagnose this from GTK, appindicator, or GStreamer warnings alone; those can be optional runtime warnings unrelated to the input failure.
154+
139155
## Common Patterns
140156

141157
### Website behind proxy (icon also needs proxy)

.claude/rules/rust.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@
3434
### Platform sensitivity
3535

3636
- WebKit compositing on Linux/Wayland is platform-sensitive. Don't change defaults without testing on the affected platform or documenting the risk.
37+
- Linux WebKit runtime flags live in `src-tauri/src/lib.rs`. Keep the default conservative; compositor-specific exceptions need unit tests for the decision function and FAQ guidance for users.
38+
- AppImage logs often contain optional GTK, appindicator, or GStreamer warnings. Do not treat those warnings as the root cause unless the user-visible symptom and target path confirm it.
3739
- `--incognito` trades persistence for clean private sessions; be deliberate around login / cookies / local storage / embedded-WebView detection.
3840
- Google OAuth and other embedded-WebView restrictions may still apply even with `--new-window` / `--multi-window`.

.claude/skills/release/SKILL.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ Four files must be updated in sync — never update one without the others:
2828
### Pre-Release
2929

3030
1. [ ] Confirm the new version number (check current: `cat package.json | jq .version`)
31-
2. [ ] Update all four version files above
32-
3. [ ] Run `pnpm run format` — must pass cleanly
33-
4. [ ] Run `pnpm test` — must pass cleanly. If the release workflow step fails with `pnpm install ... exit code 1` against the CN mirror, re-run once; a single transient flake is acceptable, two consecutive failures is not.
34-
5. [ ] Run `pnpm run cli:build` — Rollup + TS must pass (catches type errors that `format` misses).
35-
6. [ ] Run `pnpm run release:check` — verifies version sync, package contents, and npm dry-run
36-
7. [ ] No uncommitted changes: `git status`
37-
8. [ ] Commit version bump with message: `chore: bump version to VX.X.X`
31+
2. [ ] Confirm the version is not already on npm: `npm view pake-cli@X.Y.Z version` should return 404 before publishing
32+
3. [ ] Update all four version files above
33+
4. [ ] Run `pnpm run format` — must pass cleanly
34+
5. [ ] Run `pnpm test` — must pass cleanly. If the release workflow step fails with `pnpm install ... exit code 1` against the CN mirror, re-run once; a single transient flake is acceptable, two consecutive failures is not.
35+
6. [ ] Run `pnpm run cli:build` — Rollup + TS must pass (catches type errors that `format` misses).
36+
7. [ ] Run `pnpm run release:check` — verifies version sync, package contents, and npm dry-run
37+
8. [ ] No uncommitted changes: `git status`
38+
9. [ ] Commit version bump with message: `chore: bump version to VX.X.X`
3839

3940
### Tagging (triggers CI)
4041

@@ -49,19 +50,32 @@ Tag format: uppercase `V` prefix (e.g. `V3.11.0`), not `v3.11.0`.
4950

5051
1. [ ] Confirm CI triggered: `gh run list --workflow=release.yml`
5152
2. [ ] Watch CI status: `gh run watch`
52-
3. [ ] Verify GitHub Release was created: `gh release view VX.X.X`
53+
3. [ ] Verify GitHub Release was created: `gh release view VX.X.X --json tagName,url,assets`
5354
4. [ ] Confirm npm workflow exists and is active: `gh workflow list --all | grep "Publish npm Package"`
5455
5. [ ] Confirm npm Trusted Publishing triggered: `gh run list --workflow=npm-publish.yml`
55-
6. [ ] Verify npm published the package: `npm view pake-cli version` and `npm view pake-cli@X.Y.Z dist.tarball`
56+
6. [ ] Verify npm published the exact package: `npm view pake-cli@X.Y.Z version gitHead dist.tarball --json`
57+
7. [ ] Verify latest now resolves to the release: `npm view pake-cli version`
58+
8. [ ] Record Quality & Testing status separately: `gh run list --workflow=quality-and-test.yml --limit 3`
5659

5760
npm publishes through Trusted Publishing from `.github/workflows/npm-publish.yml`. Configure npm package settings with GitHub Actions, `tw93/Pake`, workflow file `npm-publish.yml`, and no environment. Local `npm publish` is only a fallback if CI or registry state blocks the trusted path.
5861

62+
Keep release surfaces separate in the final status:
63+
64+
- npm registry: the authority for `pake-cli` installability and CLI/npm issue closeout.
65+
- GitHub Release/assets: the authority for app installers and popular-app artifact availability.
66+
- Quality workflow: the authority for post-push CI health, but it can continue after npm has already shipped.
67+
- Source/tag: the authority for what code was intended to ship.
68+
69+
Do not collapse these into "released" without naming which surface was verified. If GitHub Release assets are visible while `gh run list` still reports the release workflow as queued or in progress, trust `gh release view` for asset state and report the workflow state separately.
70+
5971
## Trusted Publishing Notes
6072

6173
- The first real Trusted Publishing test must use a new version and a new `V*` tag; do not retry an already-published version.
6274
- npm package settings should use the strict publishing option: require two-factor authentication and disallow tokens. Trusted Publishing still works with this setting.
6375
- If local fallback is unavoidable, prefer `npm exec --yes --package=pnpm@10.26.2 -- npm publish --registry=https://registry.npmjs.org` so `prepublishOnly` can find the pinned pnpm version.
64-
- Do not reply to GitHub issues or close them as released until `npm view pake-cli@X.Y.Z version` returns the expected version.
76+
- Do not reply to GitHub issues or close them as released until `npm view pake-cli@X.Y.Z version` returns the expected version. `npm view pake-cli version` alone is not enough because `latest` can point at a different commit than the fix under review.
77+
- A `workflow_dispatch` run may execute on `main`; do not treat `headBranch`, run title, or compare UI as the release tag. Check the pushed tag and published package `gitHead`.
78+
- If CI creates `chore: update contributors [skip ci]` after the tag is pushed, fast-forward local `main` after the release. Do not retag just to include generated contributor art.
6579

6680
## Build Commands (local only)
6781

AGENTS.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Execution rules:
8585
- Start with the smallest plausible file set
8686
- Prefer targeted search (`rg <symbol|string> <paths>`) over repository-wide scans
8787
- Ignore generated or output-heavy areas unless the task directly targets them, especially `dist/`, `node_modules/`, `src-tauri/target/`, `.app/`, `src-tauri/icons/`, and `src-tauri/png/`. Exception: `dist/cli.js` is the shipped CLI build artifact (see `package.json` `files`); when you change anything under `bin/`, rebuild it via `pnpm run cli:build` and commit the regenerated `dist/cli.js` alongside the source change
88+
- If a task touches release status, issue closeout, npm delivery, or GitHub assets, verify live surfaces separately: source commit/tag, workflow run, npm registry, GitHub Release/assets, and issue state. Do not let one passing surface imply another
8889
- Keep changes local to one subsystem when possible
8990
- Run the narrowest relevant verification first, expand only if needed
9091
- If key context is missing, make one reasonable assumption and proceed
@@ -95,8 +96,11 @@ Execution rules:
9596
- Recent window/runtime options include `--incognito`, `--new-window`, `--min-width`, `--min-height`, `--maximize`, multi-window behavior, notification click handling, and Linux/Wayland WebKit compositing defaults.
9697
- `--incognito` intentionally trades persistence for clean private sessions; be careful around login, cookies, local storage, and WeChat-style WebView detection.
9798
- `--new-window` and `--multi-window` do not bypass every provider policy. Google OAuth and similar embedded-WebView restrictions may still require a normal browser or native client.
99+
- macOS auth-popup behavior is fragile. Auth/sign-in URLs that trigger WebKit `SOAuthorization` popup creation should stay in the current window when that path can abort the app; changes in `src-tauri/src/inject/event.js` need targeted tests.
98100
- Notification flows cross injected JS, Tauri invokes, capabilities, and native notification plugins. Verify the Rust capability and JS caller together.
99-
- WebKit compositing behavior is platform-sensitive on Linux/Wayland. Do not change defaults without testing the affected platform path or documenting the risk.
101+
- WebKit compositing behavior is platform-sensitive on Linux/Wayland. Runtime flag decisions live in `src-tauri/src/lib.rs`; keep the default conservative, cover compositor exceptions with unit tests, and document user-facing fallbacks in `docs/faq*.md`.
102+
- Linux AppImage reports often include harmless GTK, appindicator, or GStreamer warnings. Separate optional runtime warnings from the actual symptom before changing code; input/click failures on pure Wayland compositors are not the same class as blank-window failures.
103+
- Release state can be split. npm Trusted Publishing can succeed before the popular-app release workflow finishes, and GitHub Release assets can exist while a workflow run still shows queued or in progress. Report each surface explicitly.
100104

101105
## Platform-Specific Development
102106

@@ -150,7 +154,14 @@ The workflow can also be triggered manually via `workflow_dispatch` with options
150154

151155
Pushing the same `V*` tag also triggers `.github/workflows/npm-publish.yml`, which publishes `pake-cli` to npm through Trusted Publishing. Configure the npm package's Trusted Publisher as GitHub Actions, `tw93/Pake`, workflow file `npm-publish.yml`, with no environment. Local `npm publish` is only a fallback when CI or npm registry state blocks the trusted path.
152156

153-
Before treating an npm release as shipped, verify both `gh workflow list --all | grep "Publish npm Package"` and `npm view pake-cli@X.Y.Z version`. Do not reply to or close GitHub issues as released until the public registry returns the expected version.
157+
Before treating an npm release as shipped, verify both `gh workflow list --all | grep "Publish npm Package"` and `npm view pake-cli@X.Y.Z version`. Prefer `npm view pake-cli@X.Y.Z version gitHead dist.tarball --json` so the published package can be tied back to the intended commit. Do not reply to or close GitHub issues as released until the public registry returns the expected version.
158+
159+
For release follow-through, keep these boundaries explicit:
160+
161+
- `workflow_dispatch` runs on a branch unless a tag ref or input is supplied. Do not infer a release tag from the branch name, run title, or compare UI.
162+
- For CLI/npm issue closeout, the npm registry is the decisive public surface. GitHub app release assets and quality workflows should still be reported, but they are separate surfaces.
163+
- For app-release claims, inspect the GitHub Release directly with `gh release view <tag> --json assets` and check asset count/state instead of trusting source state or workflow names alone.
164+
- If CI pushes an automatic `chore: update contributors [skip ci]` commit after release, fast-forward local `main`; do not move an already pushed release tag to include it.
154165

155166
`.github/workflows/quality-and-test.yml` runs auto-format on push, Rust quality checks, and CLI/build validation across Linux, Windows, and macOS.
156167

0 commit comments

Comments
 (0)