Imported from riddlemd/clean-qr (
AGENTS.md). Install upstream withnpx skills add riddlemd/clean-qr. Copyright stays with the author.
AGENTS.md
Clean QR — a Firefox extension (MV3), plain unbundled ES modules, no build step. Features are documented in README.md, layout and the release process in DEVELOPMENT.md; WHY-comments at the point of use carry the code-level traps. This file holds only what lives nowhere else.
RULES
- Run
npm testandnpm run lintbefore every commit. Both must pass. - After adding any file, confirm it doesn't ship: web-ext bundles everything not
in
webExt.ignoreFiles(package.json). Checkunzip -Z1 web-ext-artifacts/*.zip. - Never run
npm run submit:amounless explicitly told to. It submits a version to Mozilla; AMO refuses reused version strings, so a stray run permanently burns the number.--dry-rundoes NOT protect you — npm ignores it forrunscripts. - Do not commit or push unless asked.
Traps not visible at the point of edit
browser.menusrequires the"menus"permission. With"contextMenus"onlybrowser.contextMenusexists, and everybrowser.menus.*call silently no-ops — the manifest is JSON, so nothing at the call sites warns about this.- Shortcut choices are constrained:
Ctrl+Shift+Qis Firefox Quit on Windows/Linux,Cmd+Shift+Qis macOS Log Out.Alt+Shift+Qis safe; Firefox maps Alt to Option on macOS, so no"mac"override is needed.
AMO
- The extension ID (
clean-qr@riddlemd) is permanent after the first submission. update_urland a listed submission are mutually exclusive; listed installs auto-update via AMO by ID, even when the XPI is downloaded from a GitHub Release.web-ext signwaits up to 15 minutes for review, then prints the dev-hub URL to fetch the signed XPI later — that timeout is not a failure.npm run status:amoreports where a version sits and exits non-zero until it is approved, sonpm run status:amo && npm run releaseis safe to chain.releasepulls the signed XPI from AMO and publishes the GitHub Release, refusing if the version is unapproved or the file is unsigned.- A listed submission needs a
licenseand exactly onecategoriesentry, neither of which comes frommanifest.json— seeamo-metadata.json."other"cannot be combined with another category. - The first listed submission needs summary/category/license on the AMO dev hub.
Android emulator
- Fenix needs "Remote debugging via USB" enabled in its settings before
web-ext run -t firefox-androidcan connect (times out otherwise). - Apple Silicon AVDs need the arm64 APK (
INSTALL_FAILED_NO_MATCHING_ABISon x86_64). Nightly: taskcluster indexgecko.v2.mozilla-central.latest.mobile.fenix-nightly, artifactpublic/build/target.arm64-v8a.apk. - The emulator runs with
-no-snapshot-save: Fenix, the extension, and the debugging toggle are all lost on shutdown and must be redone next boot.