@appsforgood/next-supabase-kit 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/USER_GUIDE.html +65 -12
  3. package/USER_GUIDE.md +47 -11
  4. package/agents/app-engineer/agent.md +1 -1
  5. package/agents/design/agent.md +14 -6
  6. package/agents/optional/deploy/agent.md +1 -1
  7. package/agents/qa/agent.md +5 -2
  8. package/agents/security/agent.md +1 -1
  9. package/dist/index.js +5 -5
  10. package/dist/index.js.map +1 -1
  11. package/examples/next-supabase-installed/.agent-kit/manifest.json +45 -45
  12. package/examples/next-supabase-installed/.antigravity/agent-kit/commands/browser-qa.toml +1 -1
  13. package/examples/next-supabase-installed/.antigravity/agent-kit/commands/frontend.toml +1 -1
  14. package/examples/next-supabase-installed/.antigravity/agent-kit/commands/ship.toml +1 -1
  15. package/examples/next-supabase-installed/.antigravity/agent-kit/commands/test.toml +1 -1
  16. package/examples/next-supabase-installed/.antigravity/runtime-skills/accessibility-wcag/SKILL.md +66 -9
  17. package/examples/next-supabase-installed/.antigravity/runtime-skills/browser-qa/SKILL.md +1 -0
  18. package/examples/next-supabase-installed/.antigravity/runtime-skills/frontend-design/SKILL.md +146 -14
  19. package/examples/next-supabase-installed/.antigravity/runtime-skills/planning/SKILL.md +6 -5
  20. package/examples/next-supabase-installed/.antigravity/runtime-skills/ship/SKILL.md +53 -8
  21. package/examples/next-supabase-installed/.antigravity/runtime-skills/testing-qa/SKILL.md +52 -13
  22. package/examples/next-supabase-installed/.claude/agents/app-engineer.md +1 -1
  23. package/examples/next-supabase-installed/.claude/agents/design.md +14 -6
  24. package/examples/next-supabase-installed/.claude/agents/qa.md +5 -2
  25. package/examples/next-supabase-installed/.claude/agents/security.md +1 -1
  26. package/examples/next-supabase-installed/.codex/agents/app-engineer.toml +1 -1
  27. package/examples/next-supabase-installed/.codex/agents/design.toml +15 -7
  28. package/examples/next-supabase-installed/.codex/agents/qa.toml +5 -2
  29. package/examples/next-supabase-installed/.codex/agents/security.toml +1 -1
  30. package/examples/next-supabase-installed/.cursor/agents/app-engineer.md +1 -1
  31. package/examples/next-supabase-installed/.cursor/agents/design.md +14 -6
  32. package/examples/next-supabase-installed/.cursor/agents/qa.md +5 -2
  33. package/examples/next-supabase-installed/.cursor/agents/security.md +1 -1
  34. package/examples/next-supabase-installed/.cursor/skills/accessibility-wcag/SKILL.md +66 -9
  35. package/examples/next-supabase-installed/.cursor/skills/browser-qa/SKILL.md +1 -0
  36. package/examples/next-supabase-installed/.cursor/skills/frontend-design/SKILL.md +146 -14
  37. package/examples/next-supabase-installed/.cursor/skills/planning/SKILL.md +6 -5
  38. package/examples/next-supabase-installed/.cursor/skills/ship/SKILL.md +53 -8
  39. package/examples/next-supabase-installed/.cursor/skills/testing-qa/SKILL.md +52 -13
  40. package/examples/next-supabase-installed/AGENTS.md +2 -1
  41. package/examples/next-supabase-installed/USER_GUIDE.html +65 -12
  42. package/examples/next-supabase-installed/USER_GUIDE.md +47 -11
  43. package/examples/next-supabase-installed/skills/accessibility-wcag/SKILL.md +66 -9
  44. package/examples/next-supabase-installed/skills/browser-qa/SKILL.md +1 -0
  45. package/examples/next-supabase-installed/skills/frontend-design/SKILL.md +146 -14
  46. package/examples/next-supabase-installed/skills/planning/SKILL.md +6 -5
  47. package/examples/next-supabase-installed/skills/ship/SKILL.md +53 -8
  48. package/examples/next-supabase-installed/skills/testing-qa/SKILL.md +52 -13
  49. package/examples/next-supabase-installed/tree.txt +12 -0
  50. package/package.json +1 -1
  51. package/research/agent-skill-gap-report.md +4 -0
  52. package/skills/accessibility-wcag/SKILL.md +66 -9
  53. package/skills/browser-qa/SKILL.md +1 -0
  54. package/skills/frontend-design/SKILL.md +146 -14
  55. package/skills/optional/ui-polish/SKILL.md +2 -2
  56. package/skills/planning/SKILL.md +6 -5
  57. package/skills/ship/SKILL.md +53 -8
  58. package/skills/testing-qa/SKILL.md +52 -13
  59. package/templates/next-supabase/AGENTS.md +2 -1
@@ -23,6 +23,12 @@ Plan this change. Name the owning agent, extra reviewers, and which screenshots
23
23
 
24
24
  You should get a named owner (`app-engineer`, `security`, `design`, `qa`, or `copy`) and, if the work is user-visible, a desktop + mobile screenshot list.
25
25
 
26
+ If this repo has no product `DESIGN.md` yet, also paste to Design:
27
+
28
+ ```text
29
+ Act as design. This is a new repo. Scan what is already here, then ask me what we need to set up: who it is for, what they must get done, and what you should produce. Recommend from my answers. Write the style guide and principles with me before any CSS.
30
+ ```
31
+
26
32
  ## How to invoke in each IDE
27
33
 
28
34
  ### Cursor
@@ -73,6 +79,7 @@ Files: `.antigravity/agent-kit/commands/*.toml`, `.antigravity/runtime-skills/*/
73
79
  | Implementation | App engineer |
74
80
  | Auth / RLS / secrets | Security |
75
81
  | It looks wrong | Design |
82
+ | Style guide / first UI / no DESIGN.md | Design (`setup`) |
76
83
  | Is this done? | QA |
77
84
  | Landing / CTA words | Copy |
78
85
 
@@ -87,15 +94,15 @@ Do not ask one chat to be all six. Planner names the next specialist. It does no
87
94
  | `supabase-auth-rls` | Auth, RLS, service role, Storage |
88
95
  | `postgres-migrations` | Schema, constraints, RLS in the same change |
89
96
  | `owasp-security-review` | Mutations, uploads, SSRF, secrets |
90
- | `frontend-design` | Layout, simple palette, anti-generic UI |
91
- | `accessibility-wcag` | Keyboard, contrast, labels |
97
+ | `frontend-design` | Setup, build, review, or detect UI. Tokens first. Anti-generic |
98
+ | `accessibility-wcag` | Keyboard pass in the running browser. Contrast, labels. Not a screenshot guess |
92
99
  | `browser-qa` | Any screen. Required for QA of UI |
93
- | `testing-qa` | Unit / regression / smoke only |
100
+ | `testing-qa` | Unit / regression / smoke. List commands run. Not screenshots |
94
101
  | `product-copy` | Headlines and CTAs |
95
102
  | `deslop` | Last copy pass. Copy always runs this |
96
- | `ship` | Release, env, rollback |
103
+ | `ship` | Go / no-go. Env, rollback, commands. UI needs screenshot paths |
97
104
 
98
- QA of a screen always uses `browser-qa`, not `testing-qa` alone. Each agent file names the skills it must run, then points at `catalog.json` for the rest.
105
+ QA of a screen always uses `browser-qa`, not `testing-qa` alone. User-facing screens also run `accessibility-wcag` (keyboard in the browser, not a contrast guess from the screenshot). Each agent file names the skills it must run, then points at `catalog.json` for the rest.
99
106
 
100
107
  ## Standard workflows
101
108
 
@@ -104,23 +111,51 @@ QA of a screen always uses `browser-qa`, not `testing-qa` alone. Each agent file
104
111
  1. **Planner** — paste: `Plan this change. Name the owning agent, extra reviewers, and which screenshots QA must capture. Do not write code.`
105
112
  2. **App engineer** — paste: `Implement the plan. Smoke the changed route in the browser before you hand off.`
106
113
  3. **Security** if data/auth/secrets changed.
107
- 4. **Design** if the UI changed — paste: `Review the running UI from screenshots first. Desktop and mobile. Reject generic AI-looking layout.`
108
- 5. **QA** — paste: `Do not review code alone. Open the app, capture desktop and mobile screenshots, read the images, then give accept / accept-with-nits / reject.`
114
+ 4. **Design** if the UI changed — paste: `Act as design. Name the mode (setup, build, review, or detect). Review the running UI from screenshots first. Desktop and mobile. Reject generic AI-looking layout.` If `DESIGN.md` is missing, run setup first.
115
+ 5. **QA** — paste: `Do not review code alone. Open the app, capture desktop and mobile screenshots, read the images, then give accept / accept-with-nits / reject.` For screens, also run `accessibility-wcag`.
109
116
 
110
- Done when QA attaches `qa-evidence/<date>-<slug>/desktop.png` and `mobile.png` plus a verdict.
117
+ Done when QA attaches `qa-evidence/<date>-<slug>/desktop.png` and `mobile.png` plus a verdict, and the changed flow passed a keyboard-only check.
111
118
 
112
119
  ### Auth / RLS change
113
120
 
114
121
  Planner → App engineer → Security → QA. QA must open login/logout/denied in the browser and still run tests. Screenshots required when the finding is user-visible.
115
122
 
123
+ ### New repo design setup
124
+
125
+ After `init`, before the first product CSS, paste to Design:
126
+
127
+ ```text
128
+ Act as design. This is a new repo. Scan what is already here, then ask me what we need to set up: who it is for, what they must get done, and what you should produce. Recommend from my answers. Write the style guide and principles with me before any CSS.
129
+ ```
130
+
131
+ Design scans the stack, then asks what you need. Recommendations come from those answers. It writes a short product `DESIGN.md` and frontend `STYLE_GUIDE.md` rules only after that. It does not paste this kit’s charcoal desk onto the app. Screenshots wait until there is a screen to capture.
132
+
116
133
  ### UI polish
117
134
 
118
- Design + `frontend-design` + `browser-qa`. Desktop and mobile required. One happy-path shot is a fail.
135
+ Design + `frontend-design` + `accessibility-wcag` + `browser-qa`. Name setup, build, review, or detect. Desktop and mobile required once a screen exists. One happy-path shot is a fail. A contrast guess from the screenshot is a fail.
136
+
137
+ ### Accessibility pass
138
+
139
+ On any user-facing screen, paste to Design or QA:
140
+
141
+ ```text
142
+ Run accessibility-wcag. Open the changed flow. Keyboard-only pass. Do not accept contrast from the screenshot alone.
143
+ ```
119
144
 
120
145
  ### Copy pass
121
146
 
122
147
  Copy reviews **rendered** screenshots, not just strings in TSX. Run `product-copy`, then **`deslop` last**. Do not hand off after the first draft.
123
148
 
149
+ ### Release / ship
150
+
151
+ Before you promote or deploy, paste to QA:
152
+
153
+ ```text
154
+ Run ship. Go or no-go. Name env, migration order, rollback, commands run. User-visible needs browser-qa screenshot paths. Reject LGTM, ship it.
155
+ ```
156
+
157
+ QA names the verdict. App engineer names env and the app rollback. Security names secrets and RLS. Missing screenshot paths on a user-visible release is a no-go.
158
+
124
159
  ## QA screenshot loop
125
160
 
126
161
  Bad request (reject this):
@@ -141,8 +176,9 @@ Steps the QA agent must follow:
141
176
  2. Open the changed route with the real auth/role/data state.
142
177
  3. Capture desktop (~1280) and mobile (~390) into `qa-evidence/<yyyy-mm-dd>-<slug>/`.
143
178
  4. **Read the images.** List blockers from what is on screen.
144
- 5. Run applicable tests.
145
- 6. Write `notes.md` with route, viewports, auth state, verdict.
179
+ 5. Keyboard-only the changed flow (`accessibility-wcag`). Do not accept contrast from the screenshot alone.
180
+ 6. Run applicable tests (`testing-qa`). List the commands. `toBeVisible` is not a screenshot.
181
+ 7. Write `notes.md` with route, viewports, auth state, keyboard result, commands run, verdict.
146
182
 
147
183
  Cursor: use the built-in browser first. Claude / Codex / Copilot / Antigravity: use the host browser if present, otherwise Playwright:
148
184
 
@@ -1,26 +1,83 @@
1
1
  ---
2
2
  name: accessibility-wcag
3
- description: Use for keyboard, focus, labels, contrast, semantics, and WCAG 2.1 AA checks on user-facing screens.
3
+ description: Use when the user can't tab, a screen reader misses a control, contrast fails, a modal traps focus, or you need a WCAG 2.1 AA pass. Keyboard in the running browser, not a screenshot guess.
4
4
  ---
5
5
 
6
6
  # Accessibility (WCAG 2.1 AA)
7
7
 
8
+ Scan 2026-09-12 (structure only, no bodies copied): W3C WCAG 2.1 AA; GitHub packs that split keyboard / contrast / forms into specialist swarms. This pack keeps **one** skill. Do not install axe, Pa11y, an a11y MCP, or an 11-agent accessibility roster. Visual proof stays in `browser-qa`. Access control stays in `supabase-auth-rls` — hiding a control is not an accessibility pass and not authorization.
9
+
8
10
  ## Use when
9
11
 
10
- Interactive UI, forms, navigation, or any screen a keyboard or screen-reader user will use.
12
+ Interactive UI, forms, navigation, dialogs, menus, tables, or any screen a keyboard or screen-reader user will use. Also when someone says “can't tab”, “contrast looks fine”, “add aria”, “WCAG”, or “is this accessible?”
13
+
14
+ Not a substitute for `frontend-design` (look and tokens) or `owasp-security-review` (auth). Run those as their owners; this skill is the keyboard-and-semantics pass.
15
+
16
+ ## Do
17
+
18
+ 1. Open the **running** changed flow. Name the route, auth state, and what the user must finish.
19
+ 2. Keyboard-only: Tab, Shift+Tab, Enter, Space, and Escape. Record traps, missing focus, and controls you cannot reach.
20
+ 3. Check the mapping table. Skip rows that do not apply; do not skip keyboard because “it's a mouse app.”
21
+ 4. Capture desktop (~1280) and mobile (~390) for `browser-qa`. Screenshots help for contrast and target size; they do not replace step 2.
22
+ 5. Return a findings table (P0 / P1 / P2) with where it showed up and whether it is **code-certain** or **inferred**.
11
23
 
12
24
  ## Checks
13
25
 
14
- - Semantic headings, landmarks, and labels.
15
- - Keyboard order matches visual order; focus is visible.
16
- - Contrast meets 4.5:1 for text.
17
- - Tap targets are usable on mobile.
18
- - Errors are announced; motion is not the only signal.
26
+ Map the change to a concrete control. Skip rows that do not apply.
27
+
28
+ | Area | In this pack |
29
+ | --- | --- |
30
+ | Semantics (1.3.1) | Real headings, landmarks, lists, and buttons. One `h1`. ARIA only when native HTML cannot. |
31
+ | Keyboard (2.1.1, 2.1.2, 2.4.3, 2.4.7) | Tab order matches visual order. Focus is visible. No trap except a real dialog. Escape closes overlays. |
32
+ | Contrast (1.4.3, 1.4.11) | 4.5:1 normal text, 3:1 large text and UI chrome. Do not sign off from the screenshot alone. |
33
+ | Color (1.4.1) | Color or a left-edge rail is not the only selected / error / success signal. |
34
+ | Forms (3.3.1–3.3.3) | Visible `<label htmlFor>`. Errors associated (`aria-describedby` / `aria-invalid`) and announced. |
35
+ | Name, Role, Value (4.1.2) | Custom controls expose name, role, and state. A `div` with an onClick is a finding. |
36
+ | Status (4.1.3) | Save, error, and loading results are announced (live region or a focus move). |
37
+ | Non-text (1.1.1) | `next/image` (and other images) have meaningful `alt`. Decorative images use empty `alt`. |
38
+ | Bypass (2.4.1) | Skip link or landmarks so repeating chrome is skippable. Kit HTML already has a skip link. |
39
+ | Motion | Honor `prefers-reduced-motion`. Motion is not the only signal. |
40
+ | Targets | Taps are usable on mobile. WCAG 2.1 AA does not require 2.2’s 24×24 rule; this pack still rejects unusable hits. |
41
+ | Auth vs a11y | A hidden button is not an a11y fix for unauthorized users. Enforce access in RLS / the server. |
42
+
43
+ ## App Router mapping
44
+
45
+ - **Server Action forms:** every field has a label. Validation errors render in the UI, bound to the field, not only a thrown Error. Disabled submit is explained; `disabled` removes the control from the tab order — do not use it as the only “you cannot do this” hint if the user still needs to reach help text.
46
+ - **Dialogs / sheets:** labelled (`aria-labelledby` or visible title), focus moves in, Tab cycles inside, Escape closes, focus returns to the opener.
47
+ - **Menus / disclosure:** keyboard opens and closes; collapsed content is not in the tab order.
48
+ - **`next/image`:** `alt` describes the image’s job, not the filename.
49
+ - **Kit HTML (`USER_GUIDE.html`):** keep the skip link and safelight `:focus-visible` outline. Do not add `border-left` selection rails. Do not drop `lang` on `<html>`.
50
+
51
+ Field checklist: `checklists/accessibility.md`.
19
52
 
20
53
  ## Tools
21
54
 
22
- Confirm in the running browser. Screenshots help for contrast and target size; keyboard must still be exercised.
55
+ Confirm in the running browser. Preferred: host IDE browser. Playwright is backup for capture, not a substitute for Tab.
56
+
57
+ Screenshots are evidence for contrast, clipping, and target size. **Keyboard must still be exercised.** Optional automated scanners (axe, Pa11y) may run *after* the keyboard pass; they are not the pass.
58
+
59
+ Visual proof: `browser-qa` (`qa-evidence/<date>-<slug>/` plus `notes.md`). Record keyboard results in `notes.md`:
60
+
61
+ ```text
62
+ keyboard: tab-order pass|fail; focus-visible pass|fail; trap none|expected-modal|unexpected
63
+ contrast: measured|inferred-from-screenshot
64
+ ```
65
+
66
+ `inferred-from-screenshot` is not enough to accept.
67
+
68
+ ## Reject
69
+
70
+ - “Contrast looks fine in the screenshot” without a keyboard pass.
71
+ - Approving from TSX, ARIA comments, or a Storybook file without opening the running UI.
72
+ - Color or a left-edge rail as the only selected / error / success signal.
73
+ - Installing axe, Pa11y, or an accessibility MCP as the required tool.
74
+ - Copying a third-party accessibility skill body or standing up an a11y-agent swarm.
75
+ - Treating a hidden control as the accessibility fix for a user who is not allowed to act (that is `supabase-auth-rls`).
76
+ - A modal that does not restore focus, or that traps the page with no Escape.
77
+ - `aria-label` that contradicts visible text.
78
+ - Skipping keyboard because the flow is “mouse-only” or “admin-only.”
79
+ - Kit HTML: dropping the skip link or the `:focus-visible` outline.
23
80
 
24
81
  ## Done when
25
82
 
26
- A keyboard-only pass works on the changed flow and remaining gaps are named.
83
+ A **keyboard-only pass works on the changed flow in the running UI**. Tab order matches visual order. Focus is visible. Remaining gaps are named with severity and code-certain vs inferred. Visual proof is in `browser-qa` evidence. Contrast was not signed off from the screenshot alone.
@@ -54,6 +54,7 @@ Use the host browser when it exists. Playwright is required text for Claude, Cod
54
54
  - Playwright `toBeVisible` with no image.
55
55
  - Updating screenshot baselines without saying what changed in the picture.
56
56
  - Skipping mobile, or skipping auth/empty/error when those states exist.
57
+ - “Contrast looks fine in the screenshot” with no keyboard-only pass (`accessibility-wcag`).
57
58
 
58
59
  ## Screenshot critique
59
60
 
@@ -1,21 +1,121 @@
1
1
  ---
2
2
  name: frontend-design
3
- description: Use when building or reviewing user-facing UI. Commit one simple palette and type pairing. Reject default AI layouts, timid color spreads, and decoration that is not the task.
3
+ description: Use when setting up design on a new repo, or building, reviewing, or auditing UI. Name the mode (setup, build, review, or detect). Setup asks what the user needs, then recommends principles before CSS.
4
4
  ---
5
5
 
6
6
  # Frontend Design
7
7
 
8
8
  Build or review a screen as if a stranger must name the product from the first viewport. Simple and specific beats decorated.
9
9
 
10
- Scan 2026-09-06 (structure only, no bodies copied): Anthropic `frontend-design` (updated 2026-06), addyosmani `frontend-ui-engineering`, `educlopez/ui-craft`, `funboy322/avoid-ai-design`, `superdesigndev/superdesign-skill`.
10
+ Scan 2026-09-12 (structure only, no bodies copied): Anthropic `frontend-design` (2026-06), addyosmani `frontend-ui-engineering`, `educlopez/ui-craft`, `funboy322/avoid-ai-design`, `superdesigndev/superdesign-skill`, `google-labs-code/design.md`. Do not install their CLIs, canvases, MCP servers, or slash-command catalogs.
11
11
 
12
12
  ## Use when
13
13
 
14
- Any user-facing layout, component, HTML page, or “it looks generic.” Required for `USER_GUIDE.html` and for app screens.
14
+ Any user-facing layout, component, HTML page, or “it looks generic.” Required for `USER_GUIDE.html` and for app screens. Also required on a **new repo** or first UI job when `DESIGN.md` is missing or TBD — run `setup` before CSS.
15
+
16
+ ## Mode
17
+
18
+ Name the mode before CSS. Default is `setup` when `DESIGN.md` is missing or TBD, `review` when the UI already exists, `build` when it does not.
19
+
20
+ | Mode | Do |
21
+ | --- | --- |
22
+ | `setup` | New repo or missing/TBD `DESIGN.md`. Scan, then ask what they need. Recommend from the answers. Record principles and style-guide rules only after that. No CSS unless they then ask to build. |
23
+ | `build` | Write tokens and one layout idea, then CSS. Screenshot after. |
24
+ | `review` | Screenshot first. Findings table, then fix P0s. |
25
+ | `detect` | Audit only. No edits. Use when asked to scan, flag, or not change code. |
26
+
27
+ ## Surface
28
+
29
+ Pick one profile and stay at that depth. Setup names a likely surface after the scan; it does not require one before questions.
30
+
31
+ | Profile | Depth |
32
+ | --- | --- |
33
+ | `landing` / standalone artifact | Full direction. Spend boldness once. |
34
+ | `app-chrome` | Quiet and dense. Loading, empty, error, and success before decoration. |
35
+ | `inside-design-system` | Surgical. Keep tokens and primitives. Swap tells; do not invent a second brand. |
36
+ | `kit-html` | This pack’s charcoal assignment desk. Not a SaaS landing page. |
37
+
38
+ ## Setup (new repo)
39
+
40
+ Run this when any of these is true: `DESIGN.md` is missing; it is still TBD / `[product]` / “your product”; the user asked to set up design, a style guide, or principles; this is first UI work after `init`.
41
+
42
+ The job is **asking good questions so you know what they need**. Docs and tokens are the record of that conversation. Do **not** dump a 17-doc council template. Do **not** paste this kit’s charcoal desk onto the product. `init` does not install `DESIGN.md`.
43
+
44
+ ### 1. Scan first — do not re-ask what you can read
45
+
46
+ Read enough to name:
47
+
48
+ - Product name and one-line job from README / `package.json`
49
+ - Router: App Router (`app/`) vs Pages (`pages/`)
50
+ - Styling: Tailwind, CSS modules, CSS variables, shadcn/ui, Radix, other component library
51
+ - Fonts: `next/font`, self-hosted, or unset
52
+ - Auth or first useful screens (login, invite, empty app)
53
+ - Existing tokens in `globals.css`, Tailwind theme, or a mature `STYLE_GUIDE.md`
54
+
55
+ Report the architecture in a short list, then ask. If a real visual system already exists, stay surgical (`inside-design-system`) and offer to record it rather than invent a second brand.
56
+
57
+ ### 2. Ask what they need
58
+
59
+ Setup is an interview. Use the scan as context, not as a quiz.
60
+
61
+ **How to ask**
62
+
63
+ - One message, in their language (the work, the person), not ours (hex, motion budget, “three personality traits”).
64
+ - Skip anything they already answered or the scan already settled.
65
+ - If an answer is vague (“make it modern,” “make it pop”), ask one follow-up: *what should a stranger see, and what would be the wrong product?*
66
+ - Do not ask them to pick a hex, a font, or a motion budget until you know the need.
67
+ - Public words still belong to Copy.
68
+
69
+ **Need questions** (ask these; drop any they already covered)
70
+
71
+ 1. What are we setting up, and what do you need from this pass — principles, a style guide, a first-screen direction, or all of it?
72
+ 2. Who has to succeed, and what are they trying to finish?
73
+ 3. On the first useful screen, what must they be able to do?
74
+ 4. What is already decided — brand, components, legal, accessibility — and what must it *not* look like?
75
+ 5. When this works, what is in front of them? When it fails, what did we get wrong?
76
+
77
+ Listen. Follow up once if needed. Then recommend.
78
+
79
+ ### 3. Recommend from the answers, then pause
80
+
81
+ Best practices are tailored, not a canned list. Always include:
82
+
83
+ - The **need** you heard, in one sentence.
84
+ - **Principles (4–6)** that serve that need. Default bar unless they overrode it: first screen = the work; one field, one ink, one accent, one line; states before decoration; WCAG 2.1 AA contrast (4.5:1 text); match the existing stack; no left-edge selection rails.
85
+ - **Visual direction** only if they asked for one: a token recipe from Color below that fits *this* domain, or a surgical pass if shadcn/existing tokens already exist. Downstream apps never copy kit charcoal `#10100e`. Two one-sentence options and a pick.
86
+ - **Anti-references** in their words, plus any 2026 defaults that would make this the wrong product.
87
+ - What you will write vs what can wait.
88
+
89
+ Pause for confirm. If the session is non-interactive, or the user said to proceed, **state assumptions** and continue.
90
+
91
+ ### 4. Record what they need — no CSS yet
92
+
93
+ Write only the files this pass called for. Default, when they want a style guide and principles, is a **short** product `DESIGN.md` (not the 160-line kit template):
94
+
95
+ ```markdown
96
+ # DESIGN.md
97
+
98
+ ## Need
99
+ ## Product
100
+ ## Who it is for
101
+ ## First-screen job
102
+ ## Architecture found
103
+ ## Principles
104
+ ## Tokens
105
+ | Token | Value | Use |
106
+ | --- | --- | --- |
107
+ ## Anti-references
108
+ ```
109
+
110
+ `STYLE_GUIDE.md`: if missing, write a short **Frontend (product)** section (tokens live in `DESIGN.md`, states, stack, anti-slop). If a mature guide already exists, **append** that section — do not overwrite.
111
+
112
+ Then stop. If they asked to build a screen, switch to `build`. Setup does **not** require screenshots when nothing can render yet. Do not drop `requiredTools` on the Design agent.
15
113
 
16
114
  ## Ground in the subject
17
115
 
18
- Name the product, the user, and this screen’s job before CSS. Tokens come from the domain (materials, time of day, one real object) — not from a theme pack. A toy store and a ledger cannot share a palette.
116
+ Name the product, the user, and this screen’s job before CSS. Read `DESIGN.md` when it exists — tokens there are normative; prose is how to apply them. Tokens come from the domain (materials, time of day, one real object) — not from a theme pack. A toy store and a ledger cannot share a palette.
117
+
118
+ Match the project’s stack (CSS variables, Tailwind, existing component library). Do not mix a second styling approach.
19
119
 
20
120
  **This kit’s HTML** (`USER_GUIDE.html`): charcoal assignment desk.
21
121
 
@@ -40,7 +140,7 @@ One field, one ink, one accent, one line. That is enough.
40
140
 
41
141
  1. **Dominant field** (~80%): the page. Flat. Not a gradient, not a mesh.
42
142
  2. **Ink** (~15%): body text. Contrast ≥ 4.5:1 (3:1 for large type).
43
- 3. **Accent** (~5%): one action or one required state. Recolor-as-decoration fails.
143
+ 3. **Accent** (~5%): one action or one required state. A few placements in the first viewport (primary CTA, one required/fail). Recolor-as-decoration fails.
44
144
  4. **Line / well**: borders and code wells, one step off the field.
45
145
 
46
146
  Recipes (pick one that fits the product, then stop):
@@ -87,23 +187,55 @@ None, or one moment that answers a click. Fade-and-slide on every section is gen
87
187
 
88
188
  ## Process
89
189
 
90
- 1. Name the product, the user, and the job of this screen.
91
- 2. Write the 4–6 tokens and one-sentence layout idea.
92
- 3. Check the plan is not a 2026 default (cream editorial, neon-on-black decoration, SaaS card kit, newsprint desk, last week’s “tasteful” swap). If it is, change one axis: field, accent, or structure.
93
- 4. Build. Spend boldness once. Remove one accessory.
94
- 5. Screenshot desktop (~1280) and mobile (~390). Fix from pixels. Ask: would a stranger believe a person chose this?
190
+ If mode is `setup`, follow **Setup** instead of this list.
191
+
192
+ 1. Name the mode, the surface profile, the product, the user, and the job of this screen.
193
+ 2. Read `DESIGN.md` and existing tokens if they exist. If the brief names a look, follow it — including when it asks for a 2026 default.
194
+ 3. Write the 4–6 tokens and one-sentence layout idea (build), or skip to screenshots (review/detect).
195
+ 4. Check the plan is not a 2026 default (cream editorial, neon-on-black decoration, SaaS card kit, newsprint desk, last week’s “tasteful” swap). If it is and the brief did not ask, change one axis: field, accent, or structure.
196
+ 5. Build or rewrite at the profile’s depth. Spend boldness once. Remove one accessory.
197
+ 6. Screenshot desktop (~1280) and mobile (~390). Fix from pixels. Ask: would a stranger believe a person chose this?
198
+ 7. If you cannot render, mark visual findings **inferred** and say so. Code-level tells (literal `from-indigo-500`, Inter, untouched shadcn zinc) stay **code-certain**.
95
199
 
96
200
  ## Checks
97
201
 
98
202
  - A stranger can name the product from the first screen.
99
- - Loading, empty, error, disabled, success exist where the flow has them.
100
- - Focus visible, tap targets usable.
203
+ - Loading, empty, error, disabled, success exist where the flow has them. Color is not the only state signal.
204
+ - Focus visible, tap targets usable. Keyboard order matches visual order. Keyboard, labels, and contrast fail-closed live in `accessibility-wcag` — a pretty screenshot is not a keyboard pass.
101
205
  - Copy on the screen is real. If words are public-facing, Copy runs `deslop` last.
102
206
 
207
+ ## Review output
208
+
209
+ For `review` and `detect`, use a table. Do not approve from a vibe.
210
+
211
+ | Severity | Finding | Where | Confidence |
212
+ | --- | --- | --- | --- |
213
+ | P0 | Layperson would call it AI-made, or it blocks use | screenshot or file | code-certain / inferred |
214
+ | P1 | A designer would notice | screenshot or file | code-certain / inferred |
215
+ | P2 | Craft gap | screenshot or file | code-certain / inferred |
216
+
217
+ P0 list lives in `deslop`. A clean catalog pass is necessary but not enough: the result must still look chosen for this product.
218
+
219
+ ## Reject
220
+
221
+ - Approving UI from TSX or HTML alone.
222
+ - Starting CSS on a new product before `setup` when `DESIGN.md` is missing or TBD.
223
+ - Quizzing them on hex, fonts, or motion before you know what they need.
224
+ - Writing `DESIGN.md` from a template without asking what this setup is for.
225
+ - Overwriting a mature `STYLE_GUIDE.md`.
226
+ - Pasting this kit’s charcoal desk onto a downstream product.
227
+ - Installing a design MCP, canvas CLI, or slash-command pack to “do design.”
228
+ - Detect-mode edits.
229
+ - A full rebuild inside an existing design system when a surgical pass would do.
230
+ - Mesh gradients, noise overlays, and decorative atmosphere as the default “bold” move (older `frontend-design` forks). The brief can ask; the model must not invent it.
231
+ - “We’ll make it distinctive later.” Use the product’s tokens now.
232
+
103
233
  ## Tools
104
234
 
105
- `browser` + `screenshot` + `image-review` first. Do not approve UI from TSX or HTML alone.
235
+ `browser` + `screenshot` + `image-review` first for `build`, `review`, and `detect`. Do not approve UI from TSX or HTML alone. Setup may skip capture when nothing can render yet.
106
236
 
107
237
  ## Done when
108
238
 
109
- Desktop and mobile images were read. Token list is in the change or in `DESIGN.md`. No P0 slop from `deslop` remains unless Design names it as an accepted exception.
239
+ **Setup:** architecture was reported, need questions were asked (and followed up if vague) or assumptions stated, recommendations match what they need, and the files this pass called for were written. No unsolicited CSS. Screenshots are not required if nothing can render.
240
+
241
+ **Build / review / detect:** Mode and surface were named. Desktop and mobile images were read (or detect listed what could not be rendered). Token list is in the change or in `DESIGN.md`. No P0 slop from `deslop` remains unless Design names it as an accepted exception. Detect ends with the table and no file edits.
@@ -16,11 +16,12 @@ Planning, roadmaps, “what should we do,” or any request that needs an owner.
16
16
  3. Name the skill that owner must run first:
17
17
  - App engineer: `nextjs-app-router` and, if data/auth, `supabase-auth-rls` / `postgres-migrations`
18
18
  - Security: `owasp-security-review` + `supabase-auth-rls`
19
- - Design: `frontend-design`
20
- - QA: `browser-qa` (screens) and `testing-qa` (commands)
19
+ - Design: `frontend-design` (name setup, build, review, or detect) and, for screens, `accessibility-wcag`
20
+ - QA: `browser-qa` (screens), `testing-qa` (commands), `accessibility-wcag` for user-facing screens, and `ship` for a release go/no-go
21
21
  - Copy: `product-copy` then `deslop` last
22
- 4. Add extra reviewers: Security for auth/data/secrets, Design for UI, QA for behavior/UI, Copy for public words.
23
- 5. If the change is user-visible, list the desktop and mobile screenshots QA must capture.
22
+ 4. If the work is user-visible and `DESIGN.md` is missing, TBD, or the user asked for a style guide / principles: owner is Design in `setup` first. Design must ask what they need before inventing tokens. Do not let App engineer invent tokens.
23
+ 5. Add extra reviewers: Security for auth/data/secrets, Design for UI, QA for behavior/UI, Copy for public words.
24
+ 6. If the change is user-visible, list the desktop and mobile screenshots QA must capture. Setup may skip screenshots when nothing can render yet.
24
25
 
25
26
  ## Done when
26
27
 
@@ -28,4 +29,4 @@ Owner, extra reviewers, required skills, preserved behavior, and required screen
28
29
 
29
30
  ## Reject
30
31
 
31
- Implementing in the planning pass. Asking one chat to play every role. Skipping `supabase-auth-rls` because “it’s just a table.” Skipping `nextjs-app-router` because the route is small.
32
+ Implementing in the planning pass. Asking one chat to play every role. Skipping `supabase-auth-rls` because “it’s just a table.” Skipping `nextjs-app-router` because the route is small. Skipping Design `setup` on a new product UI because “we’ll pick colors in CSS.” Skipping `accessibility-wcag` because “contrast looks fine in the screenshot.” Skipping `testing-qa` because “we’ll add tests later” on auth/RLS. Skipping `ship` because “LGTM, ship it.”
@@ -1,22 +1,67 @@
1
1
  ---
2
2
  name: ship
3
- description: Use before release. Check env vars, migration order, smoke, and rollback. User-visible releases still need browser-qa evidence.
3
+ description: Use before deploy, promote, rollback, or when someone says LGTM, ship it. Go or no-go. Name env, migration order, rollback, commands run. User-visible still needs browser-qa screenshot paths.
4
4
  ---
5
5
 
6
6
  # Ship
7
7
 
8
+ This skill is **go / no-go**. Commands live in `testing-qa`. Screenshots live in `browser-qa`. Keyboard pass lives in `accessibility-wcag`. Policies live in `supabase-auth-rls`. Schema order lives in `postgres-migrations`. Secrets and OWASP live in `owasp-security-review`. This skill does not replace those.
9
+
8
10
  ## Use when
9
11
 
10
- Preparing to deploy, promote, or roll back.
12
+ Preparing to deploy, promote, roll back, or cut a production release. Also when someone says “ship it”, “LGTM”, “is this ready?”, “promote preview”, or “rollback”.
13
+
14
+ Not a substitute for writing the feature. Run this **after** the owning specialists finish. QA names the verdict; App engineer names env and the app rollback; Security names secrets and RLS.
15
+
16
+ ## Do
17
+
18
+ 1. Name the target (`preview` / `production` / named env) and what commit or deployment is going out.
19
+ 2. List production-critical **env var names** (not values). Confirm they exist on that target. Flag any `NEXT_PUBLIC_` secret or service role on the client.
20
+ 3. Name migration order. If schema changed, say whether the migration already ran and how to reverse it (`postgres-migrations`). Do not drop a column the live app still reads.
21
+ 4. Run `testing-qa`: list commands actually run. Smoke of the primary path is required for a go.
22
+ 5. If anything user-visible changed: attach `browser-qa` desktop + mobile paths. For screens, `accessibility-wcag` already ran. Missing paths are a no-go.
23
+ 6. Return **go** or **no-go** with gaps. Do not imply go by omitting the word.
11
24
 
12
25
  ## Checks
13
26
 
14
- - Production-critical env vars are named.
15
- - Migration order and rollback are explicit.
16
- - Smoke of the primary path passed.
17
- - User-visible changes have desktop and mobile screenshot evidence from `browser-qa`.
18
- - Secrets are not in the repo or client bundle.
27
+ | Area | Pass |
28
+ | --- | --- |
29
+ | Target | Preview vs production (or named env) is explicit. |
30
+ | Env | Critical names listed. Values are not pasted into the verdict. |
31
+ | Secrets | No secrets in git, `NEXT_PUBLIC_*`, client bundle, or logs. Service role stays server-only. |
32
+ | Migrations | Order named. Rollback named, or expand/contract reverse named. Empty “N/A” only if schema did not change. |
33
+ | Commands | `testing-qa` list with results. Smoke of the primary path (login or the workflow being released). |
34
+ | UI | User-visible changes have `qa-evidence/<date>-<slug>/desktop.png` and `mobile.png`. |
35
+ | Host | If this app is on Vercel (or similar), name preview vs production and how to restore the previous deployment. Do not require a Vercel CLI install from this kit. |
36
+
37
+ ## Evidence
38
+
39
+ ```text
40
+ verdict: go | no-go
41
+ target: preview | production
42
+ commands:
43
+ - npx vitest run # pass
44
+ - npm run smoke # pass
45
+ env: NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY set; SERVICE_ROLE not in client
46
+ migrations: 0012_widgets applied; rollback = reverse 0012 / expand-contract reverse
47
+ rollback:
48
+ app: previous production deployment / git revert <sha>
49
+ db: do not drop 0012 in this release if the app still reads it
50
+ browser-qa: qa-evidence/2026-09-13-settings/desktop.png, mobile.png
51
+ gaps: none | named
52
+ ```
53
+
54
+ ## Reject
55
+
56
+ - “LGTM, ship it” (or “looks good, deploy”) with no env list, no rollback, and no commands.
57
+ - User-visible release without `browser-qa` screenshot **paths**.
58
+ - “We’ll set env in the dashboard later” or shipping with placeholder secrets.
59
+ - `SUPABASE_SERVICE_ROLE_KEY` (or any secret) in `NEXT_PUBLIC_*`, the repo, or a client bundle.
60
+ - Skipping rollback because “it’s a small change” or “we can just migrate forward.”
61
+ - Treating `toBeVisible` or “tests pass” as the ship gate. Use `testing-qa` and, for UI, `browser-qa`.
62
+ - Replacing `testing-qa`, `browser-qa`, `postgres-migrations`, `supabase-auth-rls`, or `owasp-security-review` with this skill.
63
+ - Pasting secret **values** into the go/no-go note.
19
64
 
20
65
  ## Done when
21
66
 
22
- Go / no-go is explicit, with commands run and rollback named.
67
+ Go or no-go is explicit. Commands run, env names, migration order, and rollback are named. User-visible work has `browser-qa` screenshot paths. Secrets were not written into the verdict.
@@ -1,29 +1,68 @@
1
1
  ---
2
2
  name: testing-qa
3
- description: Use when adding unit, regression, or smoke tests. Visual proof of a screen always also uses browser-qa.
3
+ description: Use when adding unit, regression, or smoke tests, or when someone says tests pass without listing commands. Visual proof of a screen always also uses browser-qa. RLS tests must fail when another user can read the row.
4
4
  ---
5
5
 
6
6
  # Testing QA
7
7
 
8
+ This skill is **commands**. Screenshots live in `browser-qa`. Keyboard pass lives in `accessibility-wcag`. Policies live in `supabase-auth-rls`. Do not replace those.
9
+
8
10
  ## Use when
9
11
 
10
- Adding or reviewing tests, smoke checks, or regression coverage.
12
+ Adding or reviewing tests, smoke, regression, “is this tested?”, or “tests pass.”
13
+
14
+ ## Do
15
+
16
+ 1. Name the kinds this change needs: unit, regression, smoke. Skip kinds that do not apply; do not skip RLS/auth when data is involved.
17
+ 2. Run the commands that already exist in this repo (`package.json` scripts). Do not invent a second test runner.
18
+ 3. For auth, RLS, or mutations: include a **negative** that fails when another user or anon can read or write the row.
19
+ 4. List what ran, the result, and gaps. If the harness is missing, name it; do not skip silently.
20
+ 5. User-visible work still goes to `browser-qa` (and `accessibility-wcag` for screens). Playwright `toBeVisible` is not that handoff.
21
+
22
+ ## Kinds
23
+
24
+ | Kind | What | Not |
25
+ | --- | --- | --- |
26
+ | Unit | Core logic, schema validation, helpers | A screenshot |
27
+ | Regression | Preserved behavior still holds | Rewriting the old test to match a bug |
28
+ | Smoke | Critical path against a running app (login, primary workflow) | `browser-qa` image review |
29
+
30
+ Smoke may use Playwright if the repo already has it. `toBeVisible` proves a node is in the DOM, not that the screen is correct.
31
+
32
+ ## Auth / RLS
33
+
34
+ `supabase-auth-rls` owns the policy. This skill requires a test that would **fail** if another signed-in user can `select` / `update` / `delete` the row, or if anon can read a private row. A hidden button is not a test of access.
35
+
36
+ Shape (adapt to the repo’s harness):
37
+
38
+ ```ts
39
+ // Must fail the job if RLS is missing or too open
40
+ const { data } = await asOtherUser().from("widgets").select().eq("id", ownerRowId);
41
+ expect(data ?? []).toHaveLength(0);
42
+ ```
43
+
44
+ `ENABLE ROW LEVEL SECURITY` without that negative is not coverage.
11
45
 
12
- ## Checks
46
+ If the change is App Router, Auth/RLS, or a migration, tests must cover those contracts. This skill does not replace `nextjs-app-router`, `supabase-auth-rls`, `postgres-migrations`, or `owasp-security-review`.
13
47
 
14
- - Core logic has unit tests.
15
- - Preserved behavior has regression tests.
16
- - Critical flows have Playwright or equivalent smoke tests.
17
- - Auth, RLS, and mutation paths are prioritized (other-user / anon cannot pass).
18
- - Network failure, empty, and error behavior is covered.
19
- - Gaps are named when infrastructure is missing.
48
+ ## Evidence
20
49
 
21
- If the change is App Router, Auth/RLS, or a migration, tests must cover those contracts. This skill does not replace `nextjs-app-router`, `supabase-auth-rls`, `postgres-migrations`, or `owasp-security-review`. Visual proof of a screen still uses `browser-qa`.
50
+ ```text
51
+ commands:
52
+ - npx vitest run tests/rls.test.ts # pass
53
+ - npm run smoke:install # pass
54
+ gaps: no Playwright harness yet; named
55
+ ```
22
56
 
23
- ## Visual proof
57
+ ## Reject
24
58
 
25
- User-visible screens also require `browser-qa`. This skill does not replace screenshots. Passing `toBeVisible` is not image review.
59
+ - `toBeVisible` (or “the test found the button”) as visual proof. Use `browser-qa`.
60
+ - “Tests pass” with no command list and no results.
61
+ - Skipping RLS/auth tests because “it’s just a table” or “we’ll add tests later.”
62
+ - Replacing `browser-qa` or `accessibility-wcag` with this skill.
63
+ - A green suite that would still pass if another user could read the row.
64
+ - Adding Playwright as a required install of this kit. Use it when the repo already has it.
26
65
 
27
66
  ## Done when
28
67
 
29
- Commands run, results, and residual gaps are listed. RLS/auth tests fail closed when another user can read the row.
68
+ Commands run, results, and residual gaps are listed. RLS/auth tests fail closed when another user or anon can read the row. User-visible work still has `browser-qa` evidence.
@@ -55,6 +55,18 @@ CLAUDE.md
55
55
  .cursor/skills/testing-qa/SKILL.md
56
56
  .github/copilot-instructions.md
57
57
  README.md
58
+ skills/accessibility-wcag/SKILL.md
59
+ skills/browser-qa/SKILL.md
60
+ skills/deslop/SKILL.md
61
+ skills/frontend-design/SKILL.md
62
+ skills/nextjs-app-router/SKILL.md
63
+ skills/owasp-security-review/SKILL.md
64
+ skills/planning/SKILL.md
65
+ skills/postgres-migrations/SKILL.md
66
+ skills/product-copy/SKILL.md
67
+ skills/ship/SKILL.md
68
+ skills/supabase-auth-rls/SKILL.md
69
+ skills/testing-qa/SKILL.md
58
70
  tree.txt
59
71
  USER_GUIDE.html
60
72
  USER_GUIDE.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsforgood/next-supabase-kit",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Agents, skills, and a user guide for Next.js and Supabase projects. QA reviews screenshots, not code alone.",
5
5
  "type": "module",
6
6
  "repository": {