[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EKW6XP5ENT18Z8Z8Q42HT5":3,"skill-same:01M7EKW6XP5ENT18Z8Z8Q42HT5":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7EKW6XP5ENT18Z8Z8Q42HT5","qa-prod-drive",null,"Drive a deployed app as a real signed-in user — mint a Clerk session or one-time sign-in ticket for the project's QA account, lift and restore the ban on QA accounts that are banned at rest, get past Vercel Deployment Protection, drive screens headless with Playwright at 1280px and 375px, and report only what was actually observed. Use when asked to QA prod or a preview, verify a shipped feature as a user, reproduce a user-reported bug, or check a role's access.","cromford-ai\u002Fcromford","cromford-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F337433536?v=4","01M7EKS8W940TH665E6PV7T9AZ","Cromford","01M7EKS8WYVS7HDACNHPJQBKPK",29,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Fskills\u002Fqa-prod-drive\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: qa-prod-drive\ndescription: Drive a deployed app as a real signed-in user — mint a Clerk session or one-time sign-in ticket for the project's QA account, lift and restore the ban on QA accounts that are banned at rest, get past Vercel Deployment Protection, drive screens headless with Playwright at 1280px and 375px, and report only what was actually observed. Use when asked to QA prod or a preview, verify a shipped feature as a user, reproduce a user-reported bug, or check a role's access.\n---\n\n# qa-prod-drive\n\nTwo ways into an app as a user, both backed by Clerk's backend API. No password is\never typed, and no browser is ever driven by a human on this box.\n\n- **Session JWT** (`bin\u002Fqa-session.sh`) — a bearer token for API calls. Fastest way\n  to probe authz, read a route's real payload, or do incident ops.\n- **Sign-in ticket** (`bin\u002Fqa-drive.mjs`, smoke-tested by `bin\u002Fqa-signin-check.mjs`)\n  — a one-time `__clerk_ticket` that lands a *browser* in a real session. This is\n  what \"tested as a user\" means. It satisfies instances that enforce MFA, because\n  the trusted backend IS the factor.\n\nBoth are gated by one thing that used to be invisible: **the account's Clerk ban\nstate**. Read \"Banned at rest\" below before you drive anything privileged.\n\n## The honesty rule — read this before you write any claim\n\n**Never say \"tested as a user\" unless a browser really loaded the screens and you\nreally observed the outcome.** Build-proof is stated as exactly that: \"typecheck and\n`npm run build` green\". If Playwright would not install, the sign-in never landed, or\nyou drove two of the five screens, the report says so **as the headline** — a pass\nwith nothing behind it is the one outcome that must never happen. Count what you\nactually did (screens loaded, flows driven, shots written), never what the plan\nlisted or what you intended.\n\n**A page that landed on `\u002Fsign-in` is a FAIL.** Not a skip, not a pass with a\ncaveat, not \"the screen was behind auth\". `bin\u002Fqa-drive.mjs` exits non-zero on it\nand `bin\u002Fqa-signin-check.mjs` does too (it used to print `FAIL:` and exit 0, so\nevery caller that checked `$?` read a bounced sign-in as a working one — that is\nthe bug this skill was rewritten around on 2026-08-29).\n\n## Guardrails\n\n- **Previews share the PROD database.** Use obviously fake inputs, on\n  non-destructive actions only. Never trigger deletes, payments, emails, or writes\n  to real client records.\n- **Mint short, mint often.** Default session TTL is 600s.\n- **Privileged QA accounts are BANNED at rest** (`qa-owner`, `qa-admin`,\n  `qa-administrator`). That is the rest state working, not a bug — see \"Banned at\n  rest\" below for the ONE sanctioned way through it, and never reach for the Clerk\n  dashboard instead.\n- **A permission wall is an observation, not a defect.** Screens the QA role\n  legitimately cannot reach get recorded as such.\n- Secrets live in `\u002Froot\u002Fharness\u002Fenv\u002F\u003Cproject>.env` (chmod 600). Read them with\n  `set -a; . \u003Cfile>; set +a` — never echo a value, never paste one into a report,\n  a commit, a board comment or a log line.\n\n## Accounts and env\n\n`\u002Froot\u002Fharness\u002Fstate\u002Fqa-accounts.json` maps `project -> role -> {email, user_id}`\n(project-1 carries owner\u002Fadmin\u002Fread_only\u002F\nuser; other projects carry their own tiers). Per-project env\n(`env-templates\u002Fproject.env.example` documents all of these):\n\n| var | what it unlocks |\n|---|---|\n| `QA_CLERK_SECRET_KEY` | minting sessions and sign-in tokens for that app's Clerk instance |\n| `QA_TEST_USER_ID` | the default low-privilege QA user for browser drives |\n| `QA_TEST_EMAIL` \u002F `QA_TEST_PASSWORD` | the same user's credentials (rarely needed — the ticket flow beats them) |\n| `VERCEL_AUTOMATION_BYPASS_SECRET` | getting past Deployment Protection on previews |\n\nAny of them absent = that capability is off. QA the public surface and say the\nauthed screens were not covered. Do not invent a workaround.\n\n## Banned at rest — the trap that made drives lie\n\nPrivileged QA accounts are **BANNED in Clerk** by our own design: project-3's\n`qa-administrator` has been banned since 2026-08-16, project-1' `qa-owner` and\n`qa-admin` the same. Keep it that way; a privileged account that is live in\nproduction is a standing risk nobody is watching.\n\nThe trap is what Clerk does with a banned user:\n\n> `POST \u002Fv1\u002Fsign_in_tokens` for a banned user **returns 200 and mints a real\n> ticket.** The refusal happens later, in the browser, when the session is\n> refused and the app redirects to `\u002Fsign-in`.\n\nSo a drive minted a ticket, \"signed in\", bounced, screenshotted the sign-in page\nand reported coverage. Every authed observation in such a report was of a screen\nnobody ever loaded. Two things fix it and both are already wired:\n\n**1. Ask, don't assume.** `bin\u002Fqa-drive.mjs` reads the ban state *before* minting\nand fails by name. By hand:\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-clerk-ban.sh \u003Cproject> \u003Cuser_...> status   # -> banned | active\n```\n\nAn unreadable state is never \"active\" — it exits non-zero and prints nothing.\n\n**2. Lift it for the drive, and always put it back.**\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-unbanned.sh \u003Cproject> \u003Crole|user_...> -- \u003Ccommand…>\n```\n\nIt reads the state, unbans only if the account was **observed** banned, runs your\ncommand, and re-bans from an **EXIT trap** — on success, on failure, on a\nnon-zero exit, on SIGINT\u002FSIGTERM. Three retries; if the re-ban still will not\nland it writes an `ALERTS.log` line naming the account, fires a `fleet_alert`\nbeat and **exits 90 whatever your command returned**. A drive that passed while\nleaving a privileged account unbanned is not a pass.\n\nIt restores the state it found rather than banning unconditionally, so wrapping\nan account that is legitimately active at rest (project-4 `qa-harness`, project-1\n`user`) is a no-op. **So wrap every drive** — an \"unban only when I think I need\nit\" habit is a habit that will be wrong once, silently. `flock` per account makes\nthe window exclusive; a second drive waits, then declines with rc 75 rather than\ndriving inside someone else's window.\n\nMinting a JWT and *then* re-banning is pointless: a ban revokes live sessions, so\nthe token dies with the window. The unban has to wrap the whole drive.\n\n## 1. Session JWT — for API-level probes\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-session.sh \u003Cproject> \u003Crole> [ttl-seconds]   # default TTL 600\n```\n\nIt reads `QA_CLERK_SECRET_KEY` from `env\u002F\u003Cproject>.env`, resolves the role's\n`user_id` through `bin\u002Fqa-account.sh` (the one lookup both this and\n`qa-unbanned.sh` use), creates a session (`POST \u002Fv1\u002Fsessions`) and prints a JWT\n(`POST \u002Fv1\u002Fsessions\u002F\u003Cid>\u002Ftokens`). A banned account exits **3** with a message\nnaming `qa-unbanned.sh` — run it inside that wrapper's window and it mints\nnormally. Use the JWT as a bearer token:\n\n```bash\nJWT=$(\u002Froot\u002Fharness\u002Fbin\u002Fqa-session.sh project-1 user 900)\ncurl -s -H \"Authorization: Bearer $JWT\" https:\u002F\u002F\u003Capp-domain>\u002Fapi\u002F\u003Croute> | jq .\n```\n\nThe role matrix probe: same route, every role, assert the status codes match the\napp's intent. A `403` where you expected `200` is a finding; a `200` where you\nexpected `403` is a **security** finding — report it as one.\n\n## 2. Browser drive — the real thing\n\n**Smoke test first.** `bin\u002Fqa-signin-check.mjs` proves sign-in works at all\nbefore you write a longer script:\n\n```bash\nset -a; . \u002Froot\u002Fharness\u002Fenv\u002F\u003Cproject>.env; set +a\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-unbanned.sh \u003Cproject> \"$QA_TEST_USER_ID\" -- \\\n  node \u002Froot\u002Fharness\u002Fbin\u002Fqa-signin-check.mjs https:\u002F\u002F\u003Cbase-url> \u002Froot\u002Frepos\u002F\u003Cproject>\u002F\n```\n\nPrints `LANDED:\u003Curl>` + `TITLE:` and **exits 0** on success; any `FAIL:` line\ncomes with a **non-zero exit**, so `$?` is a usable gate. Args: base URL, then the\nroot Playwright is resolved from (ESM imports ignore `NODE_PATH`, so it uses\n`createRequire` against the project repo — pass the repo path, with or without a\ntrailing slash).\n\n**Then drive.** `bin\u002Fqa-drive.mjs` is the reference implementation AND a usable\ntool: it signs in, loads each path at 1280px and 375px, screenshots, and collects\nthe mechanical findings (console errors, failed requests, horizontal body scroll\nat 375px, native dialogs).\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-unbanned.sh \u003Cproject> \u003Crole> -- \\\n  node \u002Froot\u002Fharness\u002Fbin\u002Fqa-drive.mjs https:\u002F\u002F\u003Cbase-url> \u002Froot\u002Frepos\u002F\u003Cproject>\u002F \\\n       \u002Ftmp\u002Fqa-out \u002Fclients \u002Fclients\u002Fabc123\n```\n\nIt writes `\u002Ftmp\u002Fqa-out\u002Fobserved.json` plus one PNG per screen per viewport, ends\non `QA COVERAGE: …` and `QA: PASS|FAIL`, and exits non-zero on FAIL. Import\n`signIn()` from it rather than re-typing the sign-in flow in a one-off script —\ntwo implementations of \"are we really signed in\" is how one of them comes to be\nwrong quietly.\n\nThe flow any script of your own must copy:\n\n1. **Bypass Deployment Protection in COOKIE mode** (previews only):\n   navigate first to\n   `\u003Cbase>\u002F?x-vercel-protection-bypass=$VERCEL_AUTOMATION_BYPASS_SECRET&x-vercel-set-bypass-cookie=true`,\n   after which the cookie authenticates every request.\n   **Never set the bypass as a global Playwright `extraHTTPHeaders`** — a global\n   header rides along on third-party requests (Clerk's CDN) and breaks their CORS\n   preflight. That lesson cost a full QA stage on 2026-07-28.\n2. **Mint a one-time ticket:**\n   `POST https:\u002F\u002Fapi.clerk.com\u002Fv1\u002Fsign_in_tokens` with\n   `{\"user_id\": \"$QA_TEST_USER_ID\", \"expires_in_seconds\": 300}` and\n   `Authorization: Bearer $QA_CLERK_SECRET_KEY`. Take `.token`.\n3. **Land the session:** `goto(\u003Cbase>\u002Fsign-in?__clerk_ticket=\u003Ctoken>)`, then\n   `waitForURL(u => !u.pathname.startsWith('\u002Fsign-in'))`, then **re-read the\n   landed URL** — `waitForURL` can be satisfied by a transient URL that redirects\n   straight back. Ending on `\u002Fsign-in` or `\u002Fsign-up` is a **FAIL**: do not\n   proceed, and never record it as covered. Check the ban state first (above) so\n   the failure names its own cause.\n4. **Drive:** headless chromium, each screen at **1280px and 375px**, exercise the\n   primary flow, capture console errors and failed requests, screenshot every screen.\n5. Prefer ARIA \u002F `data-*` selectors, poll for an observable end state rather than\n   sleeping, and `evaluate()` only to READ state.\n\nIf the repo has `docs\u002Fverification-map\u002F`, it is the established record of how each\nfeature is reached and driven — take nav paths, routes, selectors and preconditions\nfrom there instead of rediscovering them. An entry that no longer matches the app is\na finding to write down, not something to quietly work around.\nBefore you claim a pass on a screen, read that entry's **What usually lies:** field\nand check each way it names that the screen can look right and not be. A repo with\nno map can get a draft from `bin\u002Ffeature-map-draft.sh \u003Cproject>` in cromford:\nan operator runs it, it opens a PR, and it never merges.\n\n## 3. What to check on every screen you load\n\nThe UI iron laws, because a drive is the only thing that can see them:\n\n- no horizontal body scroll at 375px (wide content scrolls inside its own container)\n- data tables sort on header click, with a visible direction indicator\n- every identity cell links to its detail view — no dead rows\n- no native `confirm` \u002F `alert` \u002F `prompt` dialogs\n- console errors and failed requests are findings, not noise\n\n## 4. The automated lane — post-merge production QA\n\n`bin\u002Fpostmerge-qa.sh \u003Cproject>` is this skill wired as a pipeline stage. Cron,\none build per tick, entirely after the merge so it can never block one:\n\n1. **Deploy gate first** — production must be serving the merge sha (the\n   project's `VERSION_URL` when it has one, else a successful GitHub production\n   deployment). \"Not deployed yet\" requeues; nothing is ever driven against the\n   previous build.\n2. **`bin\u002Fqa-drive.mjs`**, through `qa-unbanned.sh`, on the screens named in the\n   build's `plan.md` \"## QA screens\" (falling back to `\u002F`, and saying so).\n3. **The `prodqa` agent lane** for the flows and the judgement calls — skipped\n   entirely when step 2 never landed a session, because an LLM cannot observe a\n   screen the browser never reached.\n4. **Attach**: `qa-prod.md` in the build dir, findings into `logs\u002Ffindings.log`\n   as `lens=prodqa`, and a comment on the merged PR. A FAIL also writes\n   `ALERTS.log` and fires a `fleet_alert` beat.\n\nKill switches: `flags\u002Fpostmerge-qa-disabled` or `POSTMERGE_QA_DISABLED=1`. To\ndrive one build by hand: `postmerge-qa.sh \u003Cproject> \u002Froot\u002Fharness\u002Fbuilds\u002F\u003Cdir>`.\n\n## 5. Report\n\nState the base URL, the account and role you drove as, and honest counts:\n\n```\nQA COVERAGE: screens=\u003Cn> flows=\u003Cn> shots=\u003Cn>\n```\n\ncounting only screens really loaded, flows really driven, and screenshots really\nwritten. Zero coverage is `screens=0` and a FAIL verdict — never a pass. Pre-existing\nissues outside the ticket are noted separately, not failed. Then, plainly: what you\nsaw, what you could not reach and why, and which claims rest on build-proof rather\nthan a drive.\n","# qa-prod-drive\n\nTwo ways into an app as a user, both backed by Clerk's backend API. No password is\never typed, and no browser is ever driven by a human on this box.\n\n- **Session JWT** (`bin\u002Fqa-session.sh`) — a bearer token for API calls. Fastest way\n  to probe authz, read a route's real payload, or do incident ops.\n- **Sign-in ticket** (`bin\u002Fqa-drive.mjs`, smoke-tested by `bin\u002Fqa-signin-check.mjs`)\n  — a one-time `__clerk_ticket` that lands a *browser* in a real session. This is\n  what \"tested as a user\" means. It satisfies instances that enforce MFA, because\n  the trusted backend IS the factor.\n\nBoth are gated by one thing that used to be invisible: **the account's Clerk ban\nstate**. Read \"Banned at rest\" below before you drive anything privileged.\n\n## The honesty rule — read this before you write any claim\n\n**Never say \"tested as a user\" unless a browser really loaded the screens and you\nreally observed the outcome.** Build-proof is stated as exactly that: \"typecheck and\n`npm run build` green\". If Playwright would not install, the sign-in never landed, or\nyou drove two of the five screens, the report says so **as the headline** — a pass\nwith nothing behind it is the one outcome that must never happen. Count what you\nactually did (screens loaded, flows driven, shots written), never what the plan\nlisted or what you intended.\n\n**A page that landed on `\u002Fsign-in` is a FAIL.** Not a skip, not a pass with a\ncaveat, not \"the screen was behind auth\". `bin\u002Fqa-drive.mjs` exits non-zero on it\nand `bin\u002Fqa-signin-check.mjs` does too (it used to print `FAIL:` and exit 0, so\nevery caller that checked `$?` read a bounced sign-in as a working one — that is\nthe bug this skill was rewritten around on 2026-08-29).\n\n## Guardrails\n\n- **Previews share the PROD database.** Use obviously fake inputs, on\n  non-destructive actions only. Never trigger deletes, payments, emails, or writes\n  to real client records.\n- **Mint short, mint often.** Default session TTL is 600s.\n- **Privileged QA accounts are BANNED at rest** (`qa-owner`, `qa-admin`,\n  `qa-administrator`). That is the rest state working, not a bug — see \"Banned at\n  rest\" below for the ONE sanctioned way through it, and never reach for the Clerk\n  dashboard instead.\n- **A permission wall is an observation, not a defect.** Screens the QA role\n  legitimately cannot reach get recorded as such.\n- Secrets live in `\u002Froot\u002Fharness\u002Fenv\u002F\u003Cproject>.env` (chmod 600). Read them with\n  `set -a; . \u003Cfile>; set +a` — never echo a value, never paste one into a report,\n  a commit, a board comment or a log line.\n\n## Accounts and env\n\n`\u002Froot\u002Fharness\u002Fstate\u002Fqa-accounts.json` maps `project -> role -> {email, user_id}`\n(project-1 carries owner\u002Fadmin\u002Fread_only\u002F\nuser; other projects carry their own tiers). Per-project env\n(`env-templates\u002Fproject.env.example` documents all of these):\n\n| var | what it unlocks |\n|---|---|\n| `QA_CLERK_SECRET_KEY` | minting sessions and sign-in tokens for that app's Clerk instance |\n| `QA_TEST_USER_ID` | the default low-privilege QA user for browser drives |\n| `QA_TEST_EMAIL` \u002F `QA_TEST_PASSWORD` | the same user's credentials (rarely needed — the ticket flow beats them) |\n| `VERCEL_AUTOMATION_BYPASS_SECRET` | getting past Deployment Protection on previews |\n\nAny of them absent = that capability is off. QA the public surface and say the\nauthed screens were not covered. Do not invent a workaround.\n\n## Banned at rest — the trap that made drives lie\n\nPrivileged QA accounts are **BANNED in Clerk** by our own design: project-3's\n`qa-administrator` has been banned since 2026-08-16, project-1' `qa-owner` and\n`qa-admin` the same. Keep it that way; a privileged account that is live in\nproduction is a standing risk nobody is watching.\n\nThe trap is what Clerk does with a banned user:\n\n> `POST \u002Fv1\u002Fsign_in_tokens` for a banned user **returns 200 and mints a real\n> ticket.** The refusal happens later, in the browser, when the session is\n> refused and the app redirects to `\u002Fsign-in`.\n\nSo a drive minted a ticket, \"signed in\", bounced, screenshotted the sign-in page\nand reported coverage. Every authed observation in such a report was of a screen\nnobody ever loaded. Two things fix it and both are already wired:\n\n**1. Ask, don't assume.** `bin\u002Fqa-drive.mjs` reads the ban state *before* minting\nand fails by name. By hand:\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-clerk-ban.sh \u003Cproject> \u003Cuser_...> status   # -> banned | active\n```\n\nAn unreadable state is never \"active\" — it exits non-zero and prints nothing.\n\n**2. Lift it for the drive, and always put it back.**\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-unbanned.sh \u003Cproject> \u003Crole|user_...> -- \u003Ccommand…>\n```\n\nIt reads the state, unbans only if the account was **observed** banned, runs your\ncommand, and re-bans from an **EXIT trap** — on success, on failure, on a\nnon-zero exit, on SIGINT\u002FSIGTERM. Three retries; if the re-ban still will not\nland it writes an `ALERTS.log` line naming the account, fires a `fleet_alert`\nbeat and **exits 90 whatever your command returned**. A drive that passed while\nleaving a privileged account unbanned is not a pass.\n\nIt restores the state it found rather than banning unconditionally, so wrapping\nan account that is legitimately active at rest (project-4 `qa-harness`, project-1\n`user`) is a no-op. **So wrap every drive** — an \"unban only when I think I need\nit\" habit is a habit that will be wrong once, silently. `flock` per account makes\nthe window exclusive; a second drive waits, then declines with rc 75 rather than\ndriving inside someone else's window.\n\nMinting a JWT and *then* re-banning is pointless: a ban revokes live sessions, so\nthe token dies with the window. The unban has to wrap the whole drive.\n\n## 1. Session JWT — for API-level probes\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-session.sh \u003Cproject> \u003Crole> [ttl-seconds]   # default TTL 600\n```\n\nIt reads `QA_CLERK_SECRET_KEY` from `env\u002F\u003Cproject>.env`, resolves the role's\n`user_id` through `bin\u002Fqa-account.sh` (the one lookup both this and\n`qa-unbanned.sh` use), creates a session (`POST \u002Fv1\u002Fsessions`) and prints a JWT\n(`POST \u002Fv1\u002Fsessions\u002F\u003Cid>\u002Ftokens`). A banned account exits **3** with a message\nnaming `qa-unbanned.sh` — run it inside that wrapper's window and it mints\nnormally. Use the JWT as a bearer token:\n\n```bash\nJWT=$(\u002Froot\u002Fharness\u002Fbin\u002Fqa-session.sh project-1 user 900)\ncurl -s -H \"Authorization: Bearer $JWT\" https:\u002F\u002F\u003Capp-domain>\u002Fapi\u002F\u003Croute> | jq .\n```\n\nThe role matrix probe: same route, every role, assert the status codes match the\napp's intent. A `403` where you expected `200` is a finding; a `200` where you\nexpected `403` is a **security** finding — report it as one.\n\n## 2. Browser drive — the real thing\n\n**Smoke test first.** `bin\u002Fqa-signin-check.mjs` proves sign-in works at all\nbefore you write a longer script:\n\n```bash\nset -a; . \u002Froot\u002Fharness\u002Fenv\u002F\u003Cproject>.env; set +a\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-unbanned.sh \u003Cproject> \"$QA_TEST_USER_ID\" -- \\\n  node \u002Froot\u002Fharness\u002Fbin\u002Fqa-signin-check.mjs https:\u002F\u002F\u003Cbase-url> \u002Froot\u002Frepos\u002F\u003Cproject>\u002F\n```\n\nPrints `LANDED:\u003Curl>` + `TITLE:` and **exits 0** on success; any `FAIL:` line\ncomes with a **non-zero exit**, so `$?` is a usable gate. Args: base URL, then the\nroot Playwright is resolved from (ESM imports ignore `NODE_PATH`, so it uses\n`createRequire` against the project repo — pass the repo path, with or without a\ntrailing slash).\n\n**Then drive.** `bin\u002Fqa-drive.mjs` is the reference implementation AND a usable\ntool: it signs in, loads each path at 1280px and 375px, screenshots, and collects\nthe mechanical findings (console errors, failed requests, horizontal body scroll\nat 375px, native dialogs).\n\n```bash\n\u002Froot\u002Fharness\u002Fbin\u002Fqa-unbanned.sh \u003Cproject> \u003Crole> -- \\\n  node \u002Froot\u002Fharness\u002Fbin\u002Fqa-drive.mjs https:\u002F\u002F\u003Cbase-url> \u002Froot\u002Frepos\u002F\u003Cproject>\u002F \\\n       \u002Ftmp\u002Fqa-out \u002Fclients \u002Fclients\u002Fabc123\n```\n\nIt writes `\u002Ftmp\u002Fqa-out\u002Fobserved.json` plus one PNG per screen per viewport, ends\non `QA COVERAGE: …` and `QA: PASS|FAIL`, and exits non-zero on FAIL. Import\n`signIn()` from it rather than re-typing the sign-in flow in a one-off script —\ntwo implementations of \"are we really signed in\" is how one of them comes to be\nwrong quietly.\n\nThe flow any script of your own must copy:\n\n1. **Bypass Deployment Protection in COOKIE mode** (previews only):\n   navigate first to\n   `\u003Cbase>\u002F?x-vercel-protection-bypass=$VERCEL_AUTOMATION_BYPASS_SECRET&x-vercel-set-bypass-cookie=true`,\n   after which the cookie authenticates every request.\n   **Never set the bypass as a global Playwright `extraHTTPHeaders`** — a global\n   header rides along on third-party requests (Clerk's CDN) and breaks their CORS\n   preflight. That lesson cost a full QA stage on 2026-07-28.\n2. **Mint a one-time ticket:**\n   `POST https:\u002F\u002Fapi.clerk.com\u002Fv1\u002Fsign_in_tokens` with\n   `{\"user_id\": \"$QA_TEST_USER_ID\", \"expires_in_seconds\": 300}` and\n   `Authorization: Bearer $QA_CLERK_SECRET_KEY`. Take `.token`.\n3. **Land the session:** `goto(\u003Cbase>\u002Fsign-in?__clerk_ticket=\u003Ctoken>)`, then\n   `waitForURL(u => !u.pathname.startsWith('\u002Fsign-in'))`, then **re-read the\n   landed URL** — `waitForURL` can be satisfied by a transient URL that redirects\n   straight back. Ending on `\u002Fsign-in` or `\u002Fsign-up` is a **FAIL**: do not\n   proceed, and never record it as covered. Check the ban state first (above) so\n   the failure names its own cause.\n4. **Drive:** headless chromium, each screen at **1280px and 375px**, exercise the\n   primary flow, capture console errors and failed requests, screenshot every screen.\n5. Prefer ARIA \u002F `data-*` selectors, poll for an observable end state rather than\n   sleeping, and `evaluate()` only to READ state.\n\nIf the repo has `docs\u002Fverification-map\u002F`, it is the established record of how each\nfeature is reached and driven — take nav paths, routes, selectors and preconditions\nfrom there instead of rediscovering them. An entry that no longer matches the app is\na finding to write down, not something to quietly work around.\nBefore you claim a pass on a screen, read that entry's **What usually lies:** field\nand check each way it names that the screen can look right and not be. A repo with\nno map can get a draft from `bin\u002Ffeature-map-draft.sh \u003Cproject>` in cromford:\nan operator runs it, it opens a PR, and it never merges.\n\n## 3. What to check on every screen you load\n\nThe UI iron laws, because a drive is the only thing that can see them:\n\n- no horizontal body scroll at 375px (wide content scrolls inside its own container)\n- data tables sort on header click, with a visible direction indicator\n- every identity cell links to its detail view — no dead rows\n- no native `confirm` \u002F `alert` \u002F `prompt` dialogs\n- console errors and failed requests are findings, not noise\n\n## 4. The automated lane — post-merge production QA\n\n`bin\u002Fpostmerge-qa.sh \u003Cproject>` is this skill wired as a pipeline stage. Cron,\none build per tick, entirely after the merge so it can never block one:\n\n1. **Deploy gate first** — production must be serving the merge sha (the\n   project's `VERSION_URL` when it has one, else a successful GitHub production\n   deployment). \"Not deployed yet\" requeues; nothing is ever driven against the\n   previous build.\n2. **`bin\u002Fqa-drive.mjs`**, through `qa-unbanned.sh`, on the screens named in the\n   build's `plan.md` \"## QA screens\" (falling back to `\u002F`, and saying so).\n3. **The `prodqa` agent lane** for the flows and the judgement calls — skipped\n   entirely when step 2 never landed a session, because an LLM cannot observe a\n   screen the browser never reached.\n4. **Attach**: `qa-prod.md` in the build dir, findings into `logs\u002Ffindings.log`\n   as `lens=prodqa`, and a comment on the merged PR. A FAIL also writes\n   `ALERTS.log` and fires a `fleet_alert` beat.\n\nKill switches: `flags\u002Fpostmerge-qa-disabled` or `POSTMERGE_QA_DISABLED=1`. To\ndrive one build by hand: `postmerge-qa.sh \u003Cproject> \u002Froot\u002Fharness\u002Fbuilds\u002F\u003Cdir>`.\n\n## 5. Report\n\nState the base URL, the account and role you drove as, and honest counts:\n\n```\nQA COVERAGE: screens=\u003Cn> flows=\u003Cn> shots=\u003Cn>\n```\n\ncounting only screens really loaded, flows really driven, and screenshots really\nwritten. Zero coverage is `screens=0` and a FAIL verdict — never a pass. Pre-existing\nissues outside the ticket are noted separately, not failed. Then, plainly: what you\nsaw, what you could not reach and why, and which claims rest on build-proof rather\nthan a drive.\n",{"name":5,"description":7},"main","f7d6afda17e7ff1bd4c226e801c99408d997bf4c","skills\u002Fqa-prod-drive",14,"https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford","https:\u002F\u002Fcromford.dev","https:\u002F\u002Fgithub.com\u002Fcromford-ai","The open-source software factory. Tickets in, production-checked changes out.","2026-11-15 07:01:43",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add cromford-ai\u002Fcromford --skill qa-prod-drive",{"tool":39,"command":40},"bunx","bunx skills add cromford-ai\u002Fcromford --skill qa-prod-drive",{"tool":42,"command":43},"pnpm","pnpm dlx skills add cromford-ai\u002Fcromford --skill qa-prod-drive","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Fskills\u002Fqa-prod-drive\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EKW2KCEAY2SVHR5XGKAR8E","qa-personas","Write or refresh a project's QA personas — draft the answers from the code (role guards, route tree, nav per role) or ask the people who know the product, turn them into qa\u002Fpersonas.json, qa\u002Fapps.json and the verification-map entry with bin\u002Fqa-personas.sh, and open the PR the orchestrator reads before it merges. Use when a repo has no personas yet, when a new role or flow appears, or when a persona's flows have gone stale.","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Fskills\u002Fqa-personas\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7EKVX5DD1TVK2XK5HZFG8YV","migration-judged-apply","Apply a merged migration SQL file to a product app's production database through its own \u002Fapi\u002Finternal\u002Fmigrations\u002Fapply endpoint — deploy gate first, classifier verdict respected, verified against the app's own ledger, one ALERT and stop on failure. Use when a migration is pending, an apply was refused or flagged, or someone asks to \"apply the migration\" \u002F \"why is this migration stuck\".","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Fskills\u002Fmigration-judged-apply\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7EKVQ69F0CAZ589ZXN3E7B2","harness","Work on any of the operator's projects through the cromford fleet — load a project into the fleet (load-project.sh), plan locally and hand the plan off as ai-build GitHub Issues the remote pipeline executes, and check\u002Fsteer remote build status. Use when asked to \"load a project into the harness\", \"hand this plan to the harness\", \"have the harness build this\", \"harness status\", or to onboard a repo for remote autonomous builds.","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Fskills\u002Fharness\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7EKVGMGEAPEE5QQPS2SGJSK","console-deploy","Deploy Mission Control (console-ui) to Cloudflare Pages (normally auto-deployed by harness-sync on the hub; this is the check and the fallback) and the harness-jobs worker\u002FD1 that back it — Pages project env + D1 bindings via the Cloudflare API, npm ci + vite build, wrangler@3 pages deploy, and fail-closed anonymous probes as the verification. Use when console-ui or worker\u002F changed and the live console must be updated, or a console screen answers 503.","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Fskills\u002Fconsole-deploy\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7EKVCREQPFAB4YAZD6WGDCG","triage-thread","Decide whether a product-board ticket is ready to build by reading its whole thread, status, waitingOn and triageVerdict first. Use before building, scoping or folding any ticket into other work.","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Forchestrator\u002Fskills\u002Ftriage-thread\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7EKVA11V6DK3MKPF26E8YJ2","steward-initiative","Look after one initiative the operator asked Archie to keep an eye on. Read its metric and last check, then stay silent, send one beat, or escalate when the rule says the operator decides.","https:\u002F\u002Fgithub.com\u002Fcromford-ai\u002Fcromford\u002Fblob\u002Fmain\u002Forchestrator\u002Fskills\u002Fsteward-initiative\u002FSKILL.md",[],[]]