@su-sws/synthetic-web-team 0.1.0

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 (82) hide show
  1. package/AGENTS.md +149 -0
  2. package/README.md +321 -0
  3. package/package.json +58 -0
  4. package/packages/cli/bin/sws.mjs +722 -0
  5. package/packages/cli/src/axe.mjs +164 -0
  6. package/packages/cli/src/browser.mjs +192 -0
  7. package/packages/cli/src/checks.mjs +1254 -0
  8. package/packages/cli/src/github.mjs +131 -0
  9. package/packages/cli/src/history.mjs +137 -0
  10. package/packages/cli/src/perf.mjs +245 -0
  11. package/packages/cli/src/preflight.mjs +185 -0
  12. package/packages/cli/src/report.mjs +315 -0
  13. package/packages/cli/src/states.mjs +556 -0
  14. package/packages/wizard/bin/wizard.mjs +767 -0
  15. package/packages/wizard/src/detect.mjs +135 -0
  16. package/packages/wizard/src/emit.mjs +553 -0
  17. package/skills/role-accessibility-lead/SKILL.md +183 -0
  18. package/skills/role-api-architect/SKILL.md +65 -0
  19. package/skills/role-backend-developer/SKILL.md +66 -0
  20. package/skills/role-compliance-officer/SKILL.md +73 -0
  21. package/skills/role-content-designer/SKILL.md +145 -0
  22. package/skills/role-devops/SKILL.md +200 -0
  23. package/skills/role-discoverability/SKILL.md +164 -0
  24. package/skills/role-frontend-developer/SKILL.md +167 -0
  25. package/skills/role-fullstack-developer/SKILL.md +56 -0
  26. package/skills/role-identity-engineer/SKILL.md +77 -0
  27. package/skills/role-information-architect/SKILL.md +136 -0
  28. package/skills/role-infrastructure-architect/SKILL.md +60 -0
  29. package/skills/role-qa-engineer/SKILL.md +81 -0
  30. package/skills/role-security-operations/SKILL.md +56 -0
  31. package/skills/role-software-architect/SKILL.md +75 -0
  32. package/skills/role-staff-technical-architect/SKILL.md +73 -0
  33. package/skills/role-strategist/SKILL.md +122 -0
  34. package/skills/role-user-researcher/SKILL.md +66 -0
  35. package/skills/role-ux-designer/SKILL.md +159 -0
  36. package/skills/sws-compliance-check/SKILL.md +153 -0
  37. package/skills/sws-decanter/SKILL.md +191 -0
  38. package/skills/sws-deploy/SKILL.md +162 -0
  39. package/skills/sws-diverge/SKILL.md +131 -0
  40. package/skills/sws-github/SKILL.md +171 -0
  41. package/skills/sws-install/SKILL.md +97 -0
  42. package/skills/sws-netlify/SKILL.md +110 -0
  43. package/skills/sws-onboard/SKILL.md +85 -0
  44. package/skills/sws-preflight/SKILL.md +87 -0
  45. package/skills/sws-prior-art/SKILL.md +137 -0
  46. package/skills/sws-vercel/SKILL.md +117 -0
  47. package/standards/fragments/global-footer.yml +137 -0
  48. package/standards/fragments/identity-bar.yml +180 -0
  49. package/standards/hosting/capabilities.yml +215 -0
  50. package/standards/hosting/github-pages.yml +306 -0
  51. package/standards/hosting/netlify.yml +234 -0
  52. package/standards/hosting/vercel.yml +284 -0
  53. package/standards/patterns/components.md +162 -0
  54. package/standards/patterns/content.md +130 -0
  55. package/standards/patterns/decanter.md +352 -0
  56. package/standards/patterns/discoverability.md +121 -0
  57. package/standards/patterns/forms.md +116 -0
  58. package/standards/patterns/ia.md +126 -0
  59. package/standards/patterns/motion.md +267 -0
  60. package/standards/patterns/sws-conventions.md +225 -0
  61. package/standards/policy/accessibility.md +241 -0
  62. package/standards/policy/brand.md +213 -0
  63. package/standards/policy/escalation.md +53 -0
  64. package/standards/policy/identity.md +96 -0
  65. package/standards/policy/minsec.md +119 -0
  66. package/standards/policy/minweb.md +87 -0
  67. package/standards/policy/privacy.md +114 -0
  68. package/standards/policy/procurement.md +79 -0
  69. package/standards/prior-art/README.md +205 -0
  70. package/standards/prior-art/catalog.yml +409 -0
  71. package/standards/prior-art/patterns/INDEX.md +53 -0
  72. package/standards/prior-art/repos.yml +734 -0
  73. package/standards/recipes/astro-ssr/RECIPE.md +274 -0
  74. package/standards/recipes/astro-ssr/acceptance.yml +168 -0
  75. package/standards/recipes/astro-static/RECIPE.md +468 -0
  76. package/standards/recipes/astro-static/acceptance.yml +800 -0
  77. package/standards/recipes/next-ssr/RECIPE.md +407 -0
  78. package/standards/recipes/next-ssr/acceptance.yml +187 -0
  79. package/standards/scope.md +111 -0
  80. package/standards/stack/performance-budget.yml +95 -0
  81. package/standards/stack/reference-versions.yml +168 -0
  82. package/standards/stack/requirements.yml +154 -0
@@ -0,0 +1,130 @@
1
+ # Content
2
+
3
+ Content design and copywriting are one discipline here. Both are about making the
4
+ reader's job easy, and splitting them produces copy that reads well and does not
5
+ fit the page.
6
+
7
+ ## Structure before prose
8
+
9
+ 1. **Content model** — what types of thing exist, what fields each has, how they
10
+ relate.
11
+ 2. **Page tables** — for each page: its purpose, its audience, the one thing the
12
+ reader should be able to do, and the content blocks in order.
13
+ 3. **Then write.**
14
+
15
+ Skipping to prose produces pages that cannot be maintained, because nobody knows
16
+ what belongs where when the next person adds to it.
17
+
18
+ ## The first paragraph carries the page
19
+
20
+ **Front-load the answer.** Someone scanning, someone using a screen reader, and an
21
+ AI answer engine all reward the same thing: the direct answer in the first one or
22
+ two sentences, then the detail.
23
+
24
+ This is one of the few discoverability practices with real evidence behind it:
25
+ roughly 44 percent of LLM citations come from the first 30 percent of a document.
26
+ It is also just good writing, which is the useful part. See
27
+ [`discoverability.md`](discoverability.md).
28
+
29
+ **Put canonical facts in HTML text.** Deadlines, tuition, program requirements,
30
+ accreditation. **Never only in a PDF or a JS-rendered component.** A PDF-only
31
+ deadline is invisible to search, to AI, and to a lot of assistive technology.
32
+
33
+ ## Stanford voice
34
+
35
+ Confident without being grand. Specific rather than superlative. **Stanford does
36
+ not need to tell people it is excellent, and copy that does reads as insecure.**
37
+
38
+ - **Second person** for instructions. "You will need two letters of
39
+ recommendation."
40
+ - **Active voice** by default. Passive when the actor genuinely does not matter.
41
+ - **Plain words.** "Use," not "utilise." "Help," not "facilitate."
42
+ - **Expand acronyms on first use, every page.** Readers arrive from search, not
43
+ from your homepage.
44
+ - **No institutional throat-clearing.** "The Department is pleased to announce
45
+ that applications are now open" is "Applications are open."
46
+
47
+ ## Plain language is an accessibility requirement, not a style preference
48
+
49
+ Cognitive accessibility is part of WCAG, and plain language is how you get it.
50
+ Short sentences. One idea per paragraph. Concrete nouns. Lists for anything
51
+ sequential or parallel.
52
+
53
+ Reading level is worth checking, and **Siteimprove scores readability** as part of
54
+ its Quality Assurance module, so it gets measured whether or not you choose to
55
+ measure it. See [`../policy/accessibility.md`](../policy/accessibility.md).
56
+
57
+ ## Writing that carries accessibility
58
+
59
+ Most accessibility is won or lost in content, so these belong here rather than in
60
+ a developer's checklist:
61
+
62
+ **Headings describe structure, not appearance.** One `h1` per page, no skipped
63
+ levels. Never pick a heading level because of how it looks.
64
+
65
+ **Link text makes sense alone.** Screen reader users navigate by link list. "Read
66
+ more" and "click here" are useless there. Write "Read the admissions
67
+ requirements."
68
+
69
+ **Alt text describes function, not pixels.** Ask what the image is *doing*. A
70
+ decorative flourish gets `alt=""`. A photo illustrating a point gets the point. A
71
+ chart gets its finding, with the data in text nearby. Keep an **alt-text
72
+ register** in the repo so it survives a redesign.
73
+
74
+ **Tables are for data.** Real headers, real scope. Never for layout.
75
+
76
+ **Error messages say what went wrong and what to do.** "Invalid input" fails WCAG
77
+ 3.3.3. "Enter a date as MM/DD/YYYY" passes and is kinder. See
78
+ [`forms.md`](forms.md).
79
+
80
+ **Captions and audio description are required on all new video** per Stanford
81
+ policy. Not optional, not a nice-to-have.
82
+
83
+ ## Content authored in the repo closes most of the post-launch gap
84
+
85
+ **Updated 2026-09-03 for the static-content scope.** See `standards/scope.md`.
86
+
87
+ Everything in CI tests the site **as built**. On a CMS-backed site that is a real
88
+ limitation: it says nothing about what an editor publishes next week, and most
89
+ accessibility debt arrives exactly that way — an untagged heading, a "click
90
+ here," an image with no alt, a table used for layout. The control for that is
91
+ `sa11y` in the CMS Visual Editor overlay, which every SWS Storyblok project uses.
92
+
93
+ **This package has no CMS, so that gap mostly closes.** Content lives in the
94
+ repo, every content change is a commit, and every commit runs `sws a11y` and
95
+ `sws perf` before it is public. The control moved from an authoring-time overlay
96
+ into CI, where it is stronger and harder to skip.
97
+
98
+ Do not overclaim it, though. Two things are unchanged:
99
+
100
+ - **Automated testing still catches roughly 30 percent of issues** per ODA
101
+ guidance. This is the limit that matters, and moving the check into CI does
102
+ nothing to it. A green axe run is a floor, never a conformance claim.
103
+ - **Embedded third-party content is still published outside the build.** A
104
+ Qualtrics form, a YouTube player, an iframed map: its accessibility is not
105
+ yours to control and CI cannot see inside it. That is a procurement question
106
+ with a VPAT attached, per `standards/policy/procurement.md`.
107
+
108
+ Beyond tooling: give whoever edits the content a short, specific guide rather
109
+ than a link to WCAG. **Five rules they will remember beats twenty they will
110
+ not.** This matters just as much when the author is committing Markdown through
111
+ the GitHub web UI as it did in a CMS.
112
+
113
+ ## Required content that is not yours to reword
114
+
115
+ - **Global Footer text is immutable.** `standards/fragments/global-footer.yml`,
116
+ and see [`../policy/brand.md`](../policy/brand.md).
117
+ - **The Accessibility footer link** points at Stanford's barrier-reporting page.
118
+ - **No cookie consent banner is required**, because the Global Footer's Privacy
119
+ link carries the disclosure. It is not forbidden either: if a unit wants one,
120
+ that is their call and the copy is then yours to write. Do not tell them they
121
+ cannot. See [`../policy/privacy.md`](../policy/privacy.md).
122
+ - **MinPriv requires a transparency notice before collection.** Any form says what
123
+ is collected, why, and what happens to it, in plain language, before the reader
124
+ fills it in.
125
+
126
+ ## Working with a person's own voice
127
+
128
+ When drafting something a person will publish as themselves, match their voice
129
+ rather than this document's. **If they edit your draft, that edit is the signal:**
130
+ adopt it rather than reverting to house style next time.
@@ -0,0 +1,352 @@
1
+ # Decanter 8
2
+
3
+ **Stanford's design system. Version 8 is CSS-first on Tailwind 4.** Version 7 was
4
+ a Tailwind 3 JavaScript preset. These are architecturally different, and the
5
+ difference is the single most common source of failure on a Stanford project.
6
+
7
+ **Decanter 8, never 7, is the one load-bearing version constraint in this entire
8
+ project.** Everything else installs at latest. This one is named because getting
9
+ it wrong fails silently.
10
+
11
+ **Decanter is the easiest compliant path, not a mandate.** It is worth reaching
12
+ for because it hands you the Global Footer, the Identity Bar and the Stanford
13
+ tokens without you maintaining them — that is the carrot. It is **not a hard line
14
+ on design choices**, and a project that diverges deliberately is doing a supported
15
+ thing (see the `sws-diverge` skill). What survives any divergence is the page
16
+ furniture and the policy links: `../policy/brand.md`.
17
+
18
+ Upstream migration docs, and the authority for everything in the migration
19
+ section below:
20
+
21
+ - **7.x → 8.x:** <https://github.com/SU-SWS/decanter/blob/main/UPGRADE.md>
22
+ - **v7 deprecations:** <https://github.com/SU-SWS/decanter/blob/v7/UPGRADE.md>
23
+ (a strict subset of the above; the v7 branch simply lacks the 8.x section)
24
+
25
+ ## Installing it, which is the part that changed
26
+
27
+ **Checked 2026-09-01.** The dist-tags moved, and the old advice is now wrong:
28
+
29
+ | dist-tag | Version |
30
+ |---|---|
31
+ | `latest` | **7.5.3** |
32
+ | `beta` | **8.0.0-beta.0** |
33
+ | `alpha` | `8.0.0-alpha.1` |
34
+
35
+ ```bash
36
+ npm i decanter@beta # correct today
37
+ npm i decanter # gets 7.5.3. WRONG for new work
38
+ ```
39
+
40
+ **A bare `npm i decanter` installs v7.** This is the opposite of what was true in
41
+ August 2026, when the alpha briefly sat on `latest`. It is also the safer
42
+ arrangement, because existing v7 consumers are no longer pulled forward
43
+ unexpectedly.
44
+
45
+ Drop the `@beta` once 8.0.0 ships to `latest`. Record what actually resolved in
46
+ `.sws/manifest.yml` — record it, do not judge it.
47
+
48
+ You will also see the git form in existing SWS projects, and it is valid:
49
+
50
+ ```json
51
+ "decanter": "github:SU-SWS/decanter#v8"
52
+ ```
53
+
54
+ Prefer the npm form for new work, since it is versioned and lockfile-friendly.
55
+ **Never flag the git form as an error.**
56
+
57
+ ## The whole integration
58
+
59
+ ```css
60
+ /* src/styles/global.css */
61
+ @import 'decanter';
62
+ ```
63
+
64
+ One line — **unless the site has a form.** See the next section.
65
+
66
+ ```js
67
+ // astro.config.mjs
68
+ import tailwindcss from '@tailwindcss/vite';
69
+ export default defineConfig({ vite: { plugins: [tailwindcss()] } });
70
+ ```
71
+
72
+ For Next, use `@tailwindcss/postcss` instead of the Vite plugin. `ccc-bulletin`
73
+ is the working example.
74
+
75
+ ## Form styles are opt-in in v8, and this fails silently
76
+
77
+ **The single most consequential v8 change for a Stanford unit site.**
78
+
79
+ In v7 the form classes and the `@tailwindcss/forms` reset came with the package.
80
+ In v8 they moved behind their own entry point:
81
+
82
+ ```css
83
+ @import 'decanter';
84
+ @import 'decanter/forms'; /* ONLY if the site has forms */
85
+ ```
86
+
87
+ Verified against `8.0.0-beta.0`: the package exports `./forms` →
88
+ `src/css/forms.css`.
89
+
90
+ What you lose by omitting it: the classes `.input`, `.select`, `.textarea`,
91
+ `.checkbox`, `.radio`, `.label`, `.legend`, `.fieldset`, **and the global
92
+ form-element reset**. Nothing errors. The form just renders unstyled, which is
93
+ the kind of failure that reaches production because the build stayed green.
94
+
95
+ **`decanter/forms` is not standalone.** Import it alongside `decanter` or
96
+ `decanter/minimal`, which supply the theme variables and root font size it
97
+ depends on.
98
+
99
+ ## Things to avoid, which age better than versions to require
100
+
101
+ - **Do not add `@import 'tailwindcss'`.** Decanter's own `index.css` already does
102
+ it. Doing both is harmless but redundant, costing about 340 bytes.
103
+ - **Do not add `@source`.** Tailwind roots source detection at the entry CSS
104
+ file's project, not at the file containing the `tailwindcss` import, so consumer
105
+ markup is found normally. Adding `@source` produces **byte-identical output**.
106
+ Tested with a controlled experiment; do not re-litigate it.
107
+ - **Do not create `tailwind.config.js`.** Decanter 8 ships no `tailwind.config.js`
108
+ and no TypeScript declarations for one. Reaching for it signals a v7 mental
109
+ model. Anything you had in `theme.extend` moves to your own `@theme` block.
110
+ - **Do not install `@astrojs/tailwind`.** Dead package, supports neither current
111
+ Astro nor Tailwind 4.
112
+ - **Do not install `tailwindcss` directly.** It arrives transitively through
113
+ Decanter.
114
+ - **Do not install `@tailwindcss/forms` directly.** It is still a declared
115
+ dependency of Decanter 8 (`^0.5.11`, verified in `8.0.0-beta.0`) and still
116
+ installs. What changed in v8 is that its reset and Decanter's form classes are
117
+ only *emitted* when you `@import 'decanter/forms'`. The package is transitive;
118
+ the styles are opt-in. Do not conflate the two.
119
+ - **Do not hardcode Stanford hex values.** Use the token.
120
+
121
+ ## Confirm you got v8, because v7 fails silently
122
+
123
+ ```bash
124
+ node -p "require('./node_modules/decanter/package.json').version" # expect 8.x
125
+ node -p "require('./node_modules/decanter/package.json').main" # expect src/css/index.css
126
+ ls node_modules/decanter/node_modules 2>/dev/null # expect nothing
127
+ ```
128
+
129
+ If `main` is `tailwind.config.js`, you have v7. If
130
+ `node_modules/decanter/node_modules/tailwindcss` exists, you have v7 **and** a
131
+ nested Tailwind 3 underneath a top-level Tailwind 4, which produces a build that
132
+ half works and errors that make no sense. Delete `node_modules` and the lockfile,
133
+ then reinstall with `@beta`.
134
+
135
+ ## Entry points
136
+
137
+ | Import | When |
138
+ |---|---|
139
+ | `@import 'decanter'` | Default. Use this |
140
+ | `@import 'decanter/forms'` | **Required if the site has a form.** Not standalone; import alongside one of the two above |
141
+ | `@import 'decanter/minimal'` | Only when something else already owns base element styling, such as a Drupal theme |
142
+ | `@import 'decanter/colors'` | Tokens only |
143
+
144
+ `minimal` is **not** a reduced design system, and the name misleads people. The
145
+ only difference is `base/base-minimal.css` (623 bytes) versus `base/base.css`
146
+ (3,286 bytes). Theme, components, utilities, and variants are identical. On a
147
+ fresh Astro site, `minimal` just removes resets you need.
148
+
149
+ ## Where the tokens are
150
+
151
+ Decanter 8 exposes everything as CSS custom properties, readable offline with no
152
+ account and no network:
153
+
154
+ ```
155
+ node_modules/decanter/src/css/theme/
156
+ colors.css Stanford Identity colors
157
+ breakpoint.css
158
+ font-family.css
159
+ font-size.css
160
+ gap.css
161
+ line-height.css
162
+ responsive-spacing.css
163
+ screen-margins.css
164
+ spacing.css
165
+ transition-duration.css
166
+ ```
167
+
168
+ **Read these files rather than guessing token names.** `decanter/colors` is also
169
+ directly importable. Components live in `src/css/components/`, utilities in
170
+ `src/css/utilities/`, and custom variants in `src/css/custom-variants.css`.
171
+
172
+ Colors follow the Stanford Identity Guide: `--color-cardinal-red` is `#8C1515`,
173
+ with `-light`, `-dark`, `-xdark`, `-xxdark` variants, plus a `black` scale from
174
+ `--color-black` (`#2E2D29`) through `--color-black-30` and similar.
175
+
176
+ **The token name will not tell you whether a pairing passes contrast.** Decanter's
177
+ palette contains both passing and failing combinations. Check at design time.
178
+
179
+ ## Fonts in v8: two families are gone
180
+
181
+ Decanter 8 **no longer ships Roboto Slab or Roboto Mono.**
182
+
183
+ | Utility | v8 behaviour |
184
+ |---|---|
185
+ | `font-slab` | **Removed.** The utility does not exist. Use `font-serif`, or define your own slab family |
186
+ | `font-mono` | **No longer overridden.** Still core Tailwind, but resolves to Tailwind's default system monospace stack, not Roboto Mono. To keep Roboto Mono, load it and set `--font-mono` in your own `@theme` |
187
+ | `font-sans` / `font-serif` | Still lead with **Source Sans 3** and **Source Serif 4**. The superseded `Source Sans Pro` / `Source Serif Pro` fallbacks behind them are gone |
188
+
189
+ The Pro-fallback removal is **inert for most projects**, because `fonts.css` and
190
+ `fonts-basic.css` only ever loaded the current families. It bites only if you load
191
+ the Pro families yourself — in which case ensure Source Sans 3 and Source Serif 4
192
+ are also available, or text falls through to Helvetica Neue and Georgia.
193
+
194
+ **Decanter 8 ships no font assets at all**, and unlike v7 it publishes no
195
+ `fonts.css` or `fonts-basic.css` either — check the package if in doubt, those
196
+ files are absent from `8.0.0-beta.0`. So a project declares its own faces:
197
+ Source Sans 3 and Source Serif 4 from Google Fonts, and **the Stanford ligature
198
+ font from the University Communications media CDN, which is required wherever the
199
+ Identity Bar appears**. See
200
+ [`../fragments/identity-bar.yml`](../fragments/identity-bar.yml) for the exact
201
+ `@font-face`, and [`../policy/brand.md`](../policy/brand.md) for the brand side
202
+ including the Heroicons-not-FontAwesome-Pro rule.
203
+
204
+ ## Decanter has no motion guidance
205
+
206
+ It ships a `transition-duration` scale and nothing else: no entry animation, no
207
+ easing set, no reduced-motion stance, no component-level motion. So every
208
+ Stanford site invents its own and most invent badly.
209
+
210
+ [`motion.md`](motion.md) is this project's answer, built on the `motion` library
211
+ and the `AnimateInView` pattern from
212
+ [sws-astro](https://github.com/SU-SWS/sws-astro). If Decanter later ships motion
213
+ tokens, they win on values and that file keeps the judgment.
214
+
215
+ ## `logo` is a component class, not a utility
216
+
217
+ `.logo` applies `--font-stanford` with discretionary ligatures, and it forces
218
+ cardinal red on `:hover` and `:focus`. Two consequences:
219
+
220
+ - Inside the red Identity Bar you need `text-white hocus:text-white` to override
221
+ it. `hocus:` is a Decanter variant covering hover and focus together.
222
+ - **Never substitute `font-serif`.** That resolves to Source Serif 4 and drops
223
+ the ligature settings.
224
+ - **And load the font.** `--font-stanford` is
225
+ `Stanford, "Source Serif 4", Georgia, Times, "Times New Roman", serif`, and
226
+ **Decanter 8 publishes no font assets** — the woff2 is in its repository but
227
+ not in the npm package. Without an `@font-face` the wordmark silently renders
228
+ in Source Serif 4. Declare it from the University Communications media CDN;
229
+ the CSS is in
230
+ [`../fragments/identity-bar.yml`](../fragments/identity-bar.yml) and
231
+ `brand.identity-bar.font-loaded` checks it.
232
+
233
+ See [`../fragments/identity-bar.yml`](../fragments/identity-bar.yml).
234
+
235
+ ## Class composition
236
+
237
+ `cnbuilder` in Astro and Storyblok projects, pinned at `^3.1.0` across seven SWS
238
+ repos. The decoupled Drupal family uses `clsx` plus `tailwind-merge` instead.
239
+ Both are legitimate. **Pick one per project, not per file.**
240
+
241
+ ## Migrating a v7 project
242
+
243
+ The consumption model changes entirely: `presets: [require('decanter')]` becomes
244
+ `@import 'decanter'`, and `tailwind.config.js` goes away. Tailwind 3 to 4 is a
245
+ separate migration with its own codemod
246
+ (<https://tailwindcss.com/docs/upgrade-guide>).
247
+
248
+ ### The class-level delta
249
+
250
+ From upstream `UPGRADE.md`. Font utilities are in the Fonts section above.
251
+
252
+ | v7 | v8 |
253
+ |---|---|
254
+ | `break-words` | `wrap-anywhere` |
255
+ | `font-regular` | `font-normal` |
256
+ | `link-regular` | `link-normal` |
257
+ | `foggy`, `foggy-light`, `foggy-dark` | `fog`, `fog-light`, `fog-dark` (identical values) |
258
+ | `facebook`, `twitter`, `instagram`, `linkedin`, `youtube` | Arbitrary values: `#4267B2`, `#1DA1F2`, `#E1306C`, `#0077B5`, `#FF0000`, e.g. `bg-[#4267B2]` |
259
+ | `text-shadow`, `-md`, `-lg` | `text-shadow-legacy`, `-legacy-md`, `-legacy-lg` |
260
+ | `rounded` | `rounded-[0.3rem]` |
261
+ | `text-vertical-lr` | `[writing-mode:vertical-lr]` |
262
+ | `text-m0` … `text-m9` | `type-0` … `type-9`, **or** `text-[1.25em]`, `[1.56em]`, `[1.95em]`, `[2.44em]`, `[3.05em]`, `[3.81em]`, `[4.77em]`, `[5.96em]`, `[7.45em]` |
263
+ | `text-09em`, `-text-m1` | `text-[.9em]` (no `type-*` equivalent; 0.9em is not on the scale) |
264
+ | `rs-p-neg1`, `rs-m-neg1` | `p-11 md:p-12 2xl:p-13`, `m-11 md:m-12 2xl:m-13` |
265
+ | `rs-p-neg2`, `rs-m-neg2` | `p-8 md:p-9 2xl:p-10`, `m-8 md:m-9 2xl:m-10` |
266
+ | `embed-container` | `aspect-video` (or `aspect-16/9`) on the wrapper, `size-full` on the embed |
267
+ | `aspect-w-*`, `aspect-h-*` | `aspect-<w>/<h>`, e.g. `aspect-4/3` |
268
+ | `aspect-none` | `aspect-auto` |
269
+ | `credits` | `text-[max(1.6rem,0.9em)] leading-snug italic text-cool-grey` |
270
+ | `children:`, `children-hover:`, `children-focus:`, `children-focus-visible:` | `*:`, `hover:*:`, `focus:*:`, `focus-visible:*:` |
271
+
272
+ The negative responsive spacing replacements cover **all** margin and padding
273
+ variants: `pt pr pb pl px py mt mr mb ml mx my`.
274
+
275
+ ### Four traps in that table
276
+
277
+ **1. `type-N` is not `text-mN`. Pick deliberately.** `type-N` is the recommended
278
+ target, but it matches `text-mN` only at `lg` and up. Below that it is
279
+ deliberately smaller (`1.15^N` mobile, `1.2^N` at `md`, against `text-mN`'s flat
280
+ `1.25^N`) and it adds proportional letter spacing. `type-6` is 3.81em on desktop
281
+ like `text-m6` but **2.31em on mobile**. Use the arbitrary bracket value if you
282
+ need the v7 rendering preserved at every breakpoint. `type-0` and `text-m0` are
283
+ identical.
284
+
285
+ **2. `children:` → `*:` reverses variant order, and the intuitive form is
286
+ wrong.** `hover:*:underline` compiles to `& > *:hover`, which is what
287
+ `children-hover:` did. `*:hover:underline` compiles to `&:hover > *` — every child
288
+ of a hovered *parent*, a different thing. Plain `children:` → `*:` is exact, and
289
+ prefixes stack unchanged (`sm:children:` → `sm:*:`).
290
+
291
+ **3. `break-words` still exists, and that is the problem.** v7 amended core
292
+ Tailwind's `break-words` with `word-break: break-word` to force a long email
293
+ address onto a second line. v8 drops the override, so `break-words` left in your
294
+ markup **keeps working as plain Tailwind, silently without the v7 behaviour**. Use
295
+ `wrap-anywhere`. No error, no build failure, just a layout that quietly regressed.
296
+
297
+ **4. Aspect-ratio utilities changed hands.** v7 loaded
298
+ `@tailwindcss/aspect-ratio`, which suppressed core `aspect-*`. v8 drops the
299
+ plugin: `aspect-auto`, `aspect-square`, `aspect-video` now generate CSS, and
300
+ `aspect-w-*` / `aspect-h-*` / `aspect-none` generate **nothing**. Also,
301
+ `aspect-w-*` absolutely positioned direct children to fill the box; the
302
+ `aspect-ratio` property does not, so add `size-full` to the child.
303
+
304
+ ### If you are still on v7 and not ready to move
305
+
306
+ Migrating the deprecated classes now makes the v8 upgrade a no-op. Every v7→v8
307
+ row above except the font utilities already works in v7.5.x and emits unchanged
308
+ CSS, so it is safe to do early. Use `aspect-[16/9]` rather than `aspect-video`
309
+ while on v7, because the named core utilities generate nothing until v8.
310
+
311
+ ### Two v7.5.0 removals worth auditing for
312
+
313
+ **`.accessibility-hidden` and `.a11y-hidden` were removed in 7.5.0.** This does
314
+ not break the build; elements relying on them simply **become visible**. Search
315
+ templates for both names before upgrading.
316
+
317
+ Their documented behaviour was also wrong for years, which matters more than the
318
+ removal: they were described as visually hiding content while keeping it available
319
+ to screen readers. **They never did that — they hid content from everyone.** The
320
+ correct replacement depends on what you actually wanted:
321
+
322
+ | What you want | Use |
323
+ |---|---|
324
+ | Hide from everyone when `aria-hidden="true"` | `aria-hidden:hidden` (exact swap) |
325
+ | Visually hide, keep for screen readers | `sr-only`, with `focus:not-sr-only` for skip links |
326
+
327
+ See [`../policy/accessibility.md`](../policy/accessibility.md).
328
+
329
+ **`@tailwindcss/forms` moved to 0.5.11**, whose base styles now use
330
+ `input:where([type='…'])` instead of bare attribute selectors. `:where()`
331
+ contributes no specificity, so a bare `input { … }` rule in your own CSS that
332
+ previously lost to the forms base styles now ties and wins on source order. Also
333
+ fixed: `<input type="file" multiple>` was picking up `select` styling. Decanter's
334
+ own `.input`, `.select`, `.textarea` are unaffected.
335
+
336
+ ## Documentation status
337
+
338
+ `decanter.stanford.edu` and the Figma library currently document **v7**. Good for
339
+ visual intent, useless for v8 token names. **When Figma and Decanter's CSS
340
+ disagree, the CSS wins** on token names and values.
341
+
342
+ Upstream has a real `UPGRADE.md` and a `CHANGELOG.md`, so the migration story is
343
+ documented. Prefer them over this file where they disagree, and correct this file
344
+ when they do.
345
+
346
+ **A new Decanter 8 documentation site is in progress** (noted 2026-09-01, no date
347
+ announced). Until it lands, the shipped CSS in `node_modules/decanter/src/css/`
348
+ remains the authority for token names, and this file covers only what SWS
349
+ consumers operationally need. **Do not author v8 reference documentation here** —
350
+ no token catalogues, no per-component class lists. That job belongs upstream, and
351
+ duplicating it now creates a second thing to keep correct. Re-point this section
352
+ when the site ships.
@@ -0,0 +1,121 @@
1
+ # Discoverability: SEO, and what to actually do about AI
2
+
3
+ **Researched 10 August 2026. This is the most hype-saturated area in the project, so every claim below carries a confidence marker and the "do not do this" list is as important as the recommendations.**
4
+
5
+ Confidence: **HIGH** = first-party source (vendor docs, IETF datatracker, arXiv). **MEDIUM** = multiple independent secondary sources. **LOW** = single secondary source, probably agency content.
6
+
7
+ ## The short version
8
+
9
+ Four things drive inclusion in AI answers, per the largest available meta-analysis: **be crawlable, rank in conventional search, answer the question directly, and don't suppress your own snippets.** Everything else is second-order. (MEDIUM, [Zyppy meta-analysis, May 2026](https://signal.zyppy.com/p/ai-citation-ranking-factors))
10
+
11
+ That is not a satisfying answer, and it is why this area attracts so much vendor noise. Good SEO plus clean semantic HTML is most of GEO.
12
+
13
+ ## What is settled
14
+
15
+ ### AI crawlers come in three kinds, controlled separately
16
+
17
+ This is the single most useful operational fact, because it means the choice is not binary. (HIGH, [OpenAI bots docs](https://developers.openai.com/api/docs/bots), [Anthropic crawler support](https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler))
18
+
19
+ | Purpose | OpenAI | Anthropic | Perplexity | Google |
20
+ |---|---|---|---|---|
21
+ | **Training** | `GPTBot` | `ClaudeBot` | `PerplexityBot` | `Google-Extended` (token only) |
22
+ | **Search index** | `OAI-SearchBot` | `Claude-SearchBot` | — | `Googlebot` |
23
+ | **User-triggered fetch** | `ChatGPT-User` | `Claude-User` | `Perplexity-User` | `Google-Agent` |
24
+
25
+ Allowing `OAI-SearchBot` while disallowing `GPTBot` means visible in ChatGPT search, excluded from training. Officially supported.
26
+
27
+ Two traps. **`Google-Extended` and `Applebot-Extended` are robots.txt tokens, not crawlers** — they make zero requests and will never appear in your logs. And **there is no Copilot user agent**: Microsoft Copilot is fed by `Bingbot`, so blocking it blocks Bing search. (HIGH)
28
+
29
+ ### Google now has an AI Overviews opt-out, and Stanford should not use it
30
+
31
+ A **"Search generative AI" toggle in Search Console → Settings** launched 3 June 2026, honored from 17 June. It excludes a property from AI Overviews and AI Mode while leaving normal Search untouched, and Google states it is not a ranking signal. The **Gemini app is explicitly excluded** from the opt-out. (HIGH on existence, MEDIUM on detail: [blog.google](https://blog.google/products-and-platforms/products/search/search-ai-features-controls/), [9to5Google 2026-06-02](https://9to5google.com/2026/06/02/google-ai-mode-overviews-opt-out/))
32
+
33
+ This corrects an earlier assumption in this project that you could not opt out of AI Overviews without losing Search. You now can.
34
+
35
+ **We still recommend against it for Stanford**, because the higher-ed data points the other way. A 51-institution study found a **35% average brand-mention rate but only a 10.5% owned-domain citation rate**, a 24.5-point gap, and only about a third of institutions have any AI-search strategy at all. (MEDIUM, [UPCEA](https://upcea.edu/ai-search-gap-higher-education/)) Prospective students are asking AI about Stanford whether Stanford participates or not. The problem is too few citations to stanford.edu, not too many.
36
+
37
+ ### Google says structured data is not an AI retrieval factor
38
+
39
+ Google's *"Optimizing your website for generative AI features on Google Search"* (circa 15 May 2026) states plainly that **no special markup, schema, AI text file, or Markdown is needed** to appear in generative AI features. Structured data remains valuable for rich results. (HIGH, [developers.google.com](https://developers.google.com/search/docs/appearance/ai-features))
40
+
41
+ Observational work does find 65–71% of AI-cited pages carry structured data, but that is confounded: schema correlates with sites that are simply better built. (MEDIUM/contested)
42
+
43
+ **So: ship JSON-LD for rich results, and record internally that it is not an AI-citation lever**, so nobody claims credit for it later.
44
+
45
+ ### llms.txt is for coding agents, not search engines
46
+
47
+ Across 500M AI bot visits in a 90-day window, only **408** targeted `llms.txt` directly. 97% of published files receive zero requests. No major AI company has committed to reading it, and correlation studies find no citation lift. GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot, and Google-Extended overwhelmingly crawl HTML directly. (HIGH)
48
+
49
+ But **IDE agents do fetch it routinely** — Cursor, Claude Code, Copilot, Cline, Aider all look for `/llms.txt` and `/llms-full.txt` when pointed at a documentation site, which is why Stripe, Vercel, Cloudflare, and Anthropic all ship one.
50
+
51
+ **Implication for us:** `llms.txt` belongs on documentation sites for the coding-agent audience. It is not a GEO tactic. Our own docs site should have one; a department's marketing site has no reason to.
52
+
53
+ ### Cloudflare changes defaults on 15 September 2026, and someone should check
54
+
55
+ From **15 September 2026**, Cloudflare blocks Training and Agent bots **by default** for new domains, new sites on existing accounts, and **all existing free-tier customers** on ad-displaying pages. Search bots stay allowed. (HIGH, [Cloudflare changelog 2026-07-01](https://developers.cloudflare.com/changelog/post/2026-07-01-ai-traffic-options/), [TechCrunch](https://techcrunch.com/2026/07/01/cloudflares-new-policy-pushes-ai-companies-to-pay-for-publishers-content/))
56
+
57
+ **Action item with a real deadline:** any Stanford site behind Cloudflare's free tier may be silently opted into blocking AI training and agent crawlers in about five weeks. That should be a deliberate choice, not a default someone discovers later. Worth a note to whoever owns Cloudflare zones at Stanford.
58
+
59
+ ### Some crawlers simply do not comply
60
+
61
+ `Bytespider` (ByteDance) has been repeatedly observed crawling disallowed paths. Perplexity operates **undeclared stealth crawlers** impersonating Chrome on macOS, rotating IPs and ASNs outside its published ranges, at 3–6M extra requests per day when its declared bot is blocked. In the same test OpenAI's `ChatGPT-User` fetched robots.txt, obeyed, and stopped. (HIGH, [Cloudflare](https://blog.cloudflare.com/perplexity-is-using-stealth-undeclared-crawlers-to-evade-website-no-crawl-directives/))
62
+
63
+ robots.txt is a preference, not a control. Enforcement needs WAF or edge rules.
64
+
65
+ ### The crawl-to-referral ratio is enormous
66
+
67
+ Cloudflare Radar, mid-2026: Google roughly 5:1, Perplexity 186:1, OpenAI 848:1, Anthropic 4,580:1. (HIGH, [Cloudflare Radar](https://blog.cloudflare.com/ai-search-crawl-refer-ratio-on-radar/)) AI referrals are about **1% of total sessions** while organic search has fallen below 25% of traffic share for the first time. (MEDIUM, vendor panels)
68
+
69
+ Useful context for expectation-setting: AI is a large crawl cost and a small traffic source today. Do not let anyone reframe 1% as either a crisis or a win.
70
+
71
+ ## What is contested
72
+
73
+ **Does blocking AI crawlers hurt you?** Genuinely unresolved. Zhao (Rutgers) and Berman (Wharton) find blocking LLM crawlers associated with a **7% to 23% reduction** in visits depending on window and method, across three traffic panels. (HIGH that the study exists, [arXiv 2512.24968](https://arxiv.org/html/2512.24968v4); the range across revisions is real and should be cited as a range)
74
+
75
+ Against that: 70.6% of sites blocking `ChatGPT-User` and 92.3% blocking `Google-Extended` still appeared in citations, because blocks only bind labs that honor them. (MEDIUM)
76
+
77
+ **`noai` / `noimageai`** adoption is growing (88,000+ domains) but they remain a DeviantArt community convention with **no first-party compliance commitment** from OpenAI, Anthropic, or Google that could be verified. Claims that they are respected appear only in agency sources. (adoption MEDIUM, compliance LOW)
78
+
79
+ ## What is vendor hype
80
+
81
+ **The "+40% GEO visibility" number.** The underlying paper (Aggarwal et al., KDD '24, [arXiv 2311.09735](https://arxiv.org/abs/2311.09735)) is real and peer-reviewed. But the first critical survey (Martinez, Sciences Po, [arXiv 2607.14035](https://arxiv.org/abs/2607.14035), 15 July 2026) reviewed **45 studies** and concluded the 40% figure is a *relative maximum on one metric in one fixed-context configuration*, conditional on the source already being in context, and that **no reviewed GEO technique shows a stable, longitudinal, cross-platform causal effect** on discoverability or clicks. It further reports GEO rewrites can **cut AI retrieval by 16%**. (HIGH)
82
+
83
+ This is the single most important citation in this document. Anyone selling a GEO retainer priced against "+40%" is selling a misreading of one table.
84
+
85
+ **Q&A and FAQ formatting for AI citation** measures slightly *negative*: mean influence 0.0947 for Q&A pages versus 0.1005 for non-Q&A, a 5.74% decrease. (HIGH, [arXiv 2604.25707](https://arxiv.org/abs/2604.25707))
86
+
87
+ **"4.3x more likely to be cited if fresh"** is an unsourced inflation of a real ~25.7% effect. (MEDIUM)
88
+
89
+ **Correlation tables sold as ranking factors** — brand mentions r=0.664, YouTube r=0.737, backlinks r=0.218 — are observational data from vendors selling monitoring tools. Directionally interesting, causally worthless. (LOW)
90
+
91
+ **`ai.txt`** (Spawning, 2023) has no standards-body adoption and no confirmed enforcement. **Cloudflare's Content Signals Policy** has no known crawler adoption; John Mueller stated it has "no effects whatsoever for any crawler or LLM." (HIGH, [seroundtable](https://www.seroundtable.com/google-cloudflare-content-signals-41631.html))
92
+
93
+ **IETF `aipref`** is real: two Standards-Track drafts published 28 April 2026, expiring 30 October 2026, no RFC number, no ratified vocabulary. (HIGH, [datatracker](https://datatracker.ietf.org/wg/aipref/about/)) Track it, do not build on it.
94
+
95
+ ## Standard for Stanford sites
96
+
97
+ 1. **Do the SEO properly.** Unique titles and descriptions, correct heading hierarchy, canonical URLs, `sitemap.xml`, internal linking, Core Web Vitals budget. This is most of GEO.
98
+ 2. **Write a real `robots.txt` with explicit AI sections.** Only about 8% of sites with robots.txt have any AI rules. Allow retrieval and user-triggered bots (`OAI-SearchBot`, `Claude-SearchBot`, `PerplexityBot`, `ChatGPT-User`, `Claude-User`, `Googlebot`, `Bingbot`). Treat training crawlers (`GPTBot`, `ClaudeBot`, `CCBot`, `Google-Extended`, `Applebot-Extended`) as a **unit policy decision**, not a default we impose. For public-mission content there is little reason to block; licensed library content, embargoed theses, and anything with student data should be behind auth regardless of bot.
99
+ 3. **Structure for extraction.** A one- or two-sentence direct answer at the top of each page (44.2% of LLM citations come from the first 30% of a document), clear H2/H3 hierarchy, short paragraphs, dated pages, named authors. Put canonical facts — deadlines, tuition, accreditation, program requirements — in **plain HTML text, never only in a PDF or a JS-rendered component.**
100
+ 4. **Ship JSON-LD** for `EducationalOrganization`, `Organization`, `Course`, `Event`, `BreadcrumbList`. For rich results. Not for AI citation.
101
+ 5. **`llms.txt` only on documentation sites**, for the coding-agent audience.
102
+ 6. **Do not use the Search Console AI opt-out** without a specific reason and a conversation.
103
+ 7. **Check your Cloudflare zone before 15 September 2026.**
104
+ 8. **Instrument server logs, not vendor dashboards.** Track AI user agents and your own crawl-to-referral ratio.
105
+
106
+ ## Do not do this
107
+
108
+ - Do not block `Googlebot` or `Bingbot` to escape AI answers. You lose Search and Copilot with them.
109
+ - Do not use site-wide `nosnippet` or `max-snippet:0` as an AI control. It destroys your organic snippets.
110
+ - Do not rely on `Google-Extended` to stay out of AI Overviews. It never did that.
111
+ - Do not rely on `noai`, `noimageai`, `ai.txt`, or Content Signals as enforcement. All are unenforced preferences.
112
+ - Do not implement anything from `draft-ietf-aipref-*` in production.
113
+ - Do not buy a GEO retainer priced against the "+40%" figure.
114
+ - Do not add FAQ or Q&A blocks purely for AI citation. The measured effect is slightly negative.
115
+ - Do not publish canonical facts only inside PDFs.
116
+ - Do not present `llms.txt` as an SEO or GEO tactic.
117
+ - Do not name or rank a GEO vendor. See "route, don't recommend" in the project plan.
118
+
119
+ ## Gaps
120
+
121
+ Not closed, because `web_fetch` was unavailable and only search summaries were accessible: whether the Search Console AI toggle is now globally available or still staged, whether any AI lab has *formally* committed to `noai` (no first-party statement found), and primary-source confirmation of Cloudflare's "8.5% of the top web" coverage figure.