@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,274 @@
1
+ # Recipe: astro-ssr
2
+
3
+ **Generate a compliant Stanford Astro site with Decanter 8, served with a
4
+ runtime.**
5
+
6
+ | | |
7
+ |---|---|
8
+ | Recipe ID | `astro-ssr` |
9
+ | Status | Draft. **Not executed end to end.** See Provenance |
10
+ | Compliance tier | Low risk. Escalate to `moderate` if the site collects personal data |
11
+ | Acceptance | `acceptance.yml` in this directory, which extends `astro-static` |
12
+ | Hosting | Netlify or Vercel. Pick per `standards/hosting/` |
13
+ | Content source | **The repo. No CMS** — see `standards/scope.md` |
14
+ | Versions | **None specified by design.** Install latest |
15
+
16
+ ## This recipe is `astro-static` plus two things
17
+
18
+ Read [`astro-static/RECIPE.md`](../astro-static/RECIPE.md) first and follow it.
19
+ Everything about Decanter, Tailwind, the Identity Bar, the Global Footer,
20
+ required content, motion, and the accessibility harness is **identical** and is
21
+ not repeated here. Duplicating it would guarantee it drifts.
22
+
23
+ The only differences are:
24
+
25
+ 1. An **adapter** and `output: 'server'` instead of `output: 'static'`.
26
+ 2. **Response headers**, which a static build cannot send.
27
+
28
+ If you do not need item 2 or a server runtime, **stop and use `astro-static`.**
29
+ It is free to host, has fewer moving parts, and is cheaper to keep compliant.
30
+
31
+ ## When to use this
32
+
33
+ You need one or more of:
34
+
35
+ - **Response headers** — the default security set in
36
+ `standards/hosting/capabilities.yml`.
37
+ - **Real redirects and rewrites**, which matters if the site replaces a legacy
38
+ site with inbound links. `sulgryphon-nextjs`'s `vercel.json` is the reference:
39
+ nine rules catching `/node/*`, `/wp-content/*`, `*.php`.
40
+ - **Server-rendered routes** — a search results page, a form handler, content
41
+ that must be fresh per request.
42
+
43
+ **A runtime does not mean a CMS.** Content still comes from the repo; see
44
+ `standards/scope.md`. Server rendering here is for headers, redirects, search,
45
+ and forms, not for fetching content from a backend.
46
+
47
+ **Be honest about the size of this.** MinWeb requires none of it. Headers are
48
+ good engineering, not policy. A twelve-page department site needs none of this
49
+ and should be static.
50
+
51
+ **Prefer this over `next-ssr` for a content site.** Same capability, much less
52
+ weight, and no React unless you ask for it via `@astrojs/react` islands. Reach
53
+ for Next when you actually want the React ecosystem or a decoupled Drupal front
54
+ end, not for headers alone.
55
+
56
+ ## Choosing a host
57
+
58
+ **SWS runs both Netlify and Vercel**, one per family, and neither is a house
59
+ default. Full profiles are in `standards/hosting/`.
60
+
61
+ | If the unit... | Host |
62
+ |---|---|
63
+ | Already administers a Netlify account | **Netlify.** `standards/hosting/netlify.yml` |
64
+ | Already administers a Vercel account | **Vercel.** `standards/hosting/vercel.yml` |
65
+ | Has neither, and wants the better-trodden path | Netlify, to inherit the ADAPT family's Vault wiring |
66
+ | Has neither and no budget | You want `astro-static` on GitHub Pages |
67
+
68
+ An account someone already knows how to administer beats any shared-tooling
69
+ argument. Record the choice in `.sws/manifest.yml` under `hosting`, and do not
70
+ introduce a third host on your own — that is a procurement question for the
71
+ office, not a technical preference.
72
+
73
+ **Note on prior art:** no SWS Astro project runs SSR today. `sws-astro` is
74
+ static and has no deploy config at all. So this recipe's Astro-plus-Decanter
75
+ half is well-trodden and its hosting half is **reasoned from the Next families,
76
+ not copied from a running Astro site.** Treat the adapter specifics as
77
+ unverified until someone executes this.
78
+
79
+ ## Steps
80
+
81
+ Follow `astro-static` steps 1, 2, 4, 5, 6, 7 unchanged. Replace step 3, and add
82
+ steps 3b and 8b below.
83
+
84
+ ### 3. Wire Tailwind, Decanter, and the adapter
85
+
86
+ Identical to `astro-static` step 3 except for `output` and `adapter`:
87
+
88
+ ```js
89
+ import { defineConfig } from 'astro/config';
90
+ import tailwindcss from '@tailwindcss/vite';
91
+ import sitemap from '@astrojs/sitemap';
92
+ import netlify from '@astrojs/netlify'; // or: import vercel from '@astrojs/vercel';
93
+
94
+ export default defineConfig({
95
+ site: 'https://<unit>.stanford.edu', // still required: sitemap + canonical URLs
96
+ output: 'server',
97
+ adapter: netlify(),
98
+ trailingSlash: 'ignore',
99
+ integrations: [sitemap()],
100
+ vite: { plugins: [tailwindcss()] },
101
+ });
102
+ ```
103
+
104
+ ```bash
105
+ npm install @astrojs/netlify # or @astrojs/vercel
106
+ ```
107
+
108
+ Install latest; do not pin. Four things to get right:
109
+
110
+ - **`site` is still not optional.** Same as static: without it `@astrojs/sitemap`
111
+ emits nothing and canonical URLs are wrong, failing two acceptance criteria.
112
+ Server rendering does not supply it for you.
113
+ - **`output: 'server'`, not `'hybrid'`.** `'hybrid'` was removed from Astro. With
114
+ `'server'`, opt individual pages back into prerendering with
115
+ `export const prerender = true`, which is the modern equivalent and the right
116
+ default for most pages on a content site.
117
+ - **`src/styles/global.css` is still one line**: `@import 'decanter'`. The
118
+ adapter changes nothing about the Decanter integration.
119
+ - **`base` is not needed.** Both hosts serve from the root. `base` is a GitHub
120
+ Pages subpath concern.
121
+
122
+ ### 3b. Security headers
123
+
124
+ **Ship the sensible defaults, switched on. Leave CSP off.** The canonical values
125
+ are in `standards/hosting/capabilities.yml` under `default_header_set`; take them
126
+ from there if this table ever disagrees.
127
+
128
+ | Header | Value |
129
+ |---|---|
130
+ | `Strict-Transport-Security` | `max-age=31536000; includeSubDomains; preload` |
131
+ | `X-Content-Type-Options` | `nosniff` |
132
+ | `Referrer-Policy` | `origin-when-cross-origin` |
133
+ | `Permissions-Policy` | `geolocation=(), camera=(), microphone=(), midi=(), payment=(), usb=()` |
134
+ | `X-Frame-Options` | `SAMEORIGIN` |
135
+
136
+ That set is deliberately the headers that **cannot break a page**. On Astro, set
137
+ them in host config rather than in application code — it applies to prerendered
138
+ and server-rendered routes alike, which per-route middleware does not:
139
+
140
+ **Netlify** — `netlify.toml`:
141
+
142
+ ```toml
143
+ [[headers]]
144
+ for = "/*"
145
+ [headers.values]
146
+ Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload"
147
+ X-Content-Type-Options = "nosniff"
148
+ Referrer-Policy = "origin-when-cross-origin"
149
+ Permissions-Policy = "geolocation=(), camera=(), microphone=(), midi=(), payment=(), usb=()"
150
+ X-Frame-Options = "SAMEORIGIN"
151
+ ```
152
+
153
+ **Vercel** — `vercel.json`, using the `headers` array shown in
154
+ `standards/hosting/vercel.yml`.
155
+
156
+ Two notes on the values:
157
+
158
+ 1. **`SAMEORIGIN`, not `DENY`.** `DENY` breaks a CMS Visual Editor preview and
159
+ then needs a second policy to work around itself. **There is no CMS here**
160
+ (`standards/scope.md`), so that problem is absent and `SAMEORIGIN` is simply
161
+ the right answer — do not import the homesite's two-policy pattern to solve
162
+ a problem you do not have.
163
+ 2. **`X-Frame-Options` is the simple option.** If you prefer
164
+ `frame-ancestors`, that is a CSP directive, and CSP is opt-in — see below.
165
+
166
+ #### Content-Security-Policy is optional, and off by default
167
+
168
+ **Confirmed by SWS 2026-09-03: CSP is a nice-to-have.** MinWeb
169
+ requires no response headers at all, so a site without a CSP is fully compliant.
170
+
171
+ It is off by default because of **who absorbs the breakage**. CSP is the one
172
+ header that breaks pages, and it breaks them when someone *edits content*, not
173
+ when someone deploys. An owner embeds a YouTube video, a Qualtrics survey, or a
174
+ Google Font; the browser blocks it silently; and the person least able to
175
+ diagnose it is the one holding the problem.
176
+
177
+ - **Never build a CSP from a domain allowlist.** It drifts, ends up allowing
178
+ everything, and makes every future embed a support ticket.
179
+ - **Start with `Content-Security-Policy-Report-Only`.** It cannot break a page by
180
+ construction and still tells you what a real policy would have blocked.
181
+ - **Record it in `.sws/manifest.yml`** as a divergence, and name who owns the
182
+ breakage.
183
+
184
+ ### 8b. Deploy
185
+
186
+ Replaces `astro-static` step 8. Both hosts deploy from their git integration
187
+ rather than from a Pages workflow:
188
+
189
+ - **Push to `main` deploys.** Keep the GitHub Actions workflow for checks only.
190
+ - **Do not add branch protection or required status checks.** Each quietly
191
+ converts push-to-main into a pull-request requirement, and campus editors
192
+ working through the GitHub web UI cannot open one.
193
+ - **Both hosts give per-PR preview URLs.** That is the real gain over Pages. Do
194
+ not make pull requests mandatory in order to get it.
195
+ - **Secrets come from Vault**, not `.env`. `node-vault` is the host-portable
196
+ option; `netlify-plugin-vault-variables` is the Netlify-specific one. Committed
197
+ credentials are the only thing in this system that fails a build.
198
+ - **MFA on the host dashboard.** MinWeb's "MFA on all administrative logins"
199
+ includes the hosting dashboard, which can trigger a deploy and read
200
+ environment variables. Most-missed item in `capabilities.yml`.
201
+
202
+ **To provision Netlify, use the `sws-netlify` skill.** It drives the account,
203
+ team, and site-creation steps in `standards/hosting/netlify.yml`, and is honest
204
+ about the one step that cannot be scripted: connecting the repo needs a GitHub
205
+ App authorization in a browser, the same shape of limit as GitHub account
206
+ creation in `sws-github`. **For Vercel, use the `sws-vercel` skill** instead;
207
+ it carries the same honest limit at its own `connect-repo` step.
208
+
209
+ ### 9. Verify
210
+
211
+ ```bash
212
+ npm run build
213
+ sws a11y
214
+ sws perf
215
+ npx sws check
216
+ ```
217
+
218
+ `sws a11y` and `sws perf` serve the build locally, so they behave the same as on
219
+ a static build. Note that **`sws check` cannot verify a served header** without a
220
+ deployed URL: it reads config and reports `unknown` rather than `pass` when it
221
+ cannot follow the value. Check the real headers against the deployed site once
222
+ it is up.
223
+
224
+ ## Swap points
225
+
226
+ | Swap | Cost |
227
+ |---|---|
228
+ | `astro-static` instead | **Usually the better choice.** Free hosting, fewer moving parts. You give up response headers, real redirects, and preview URLs |
229
+ | `next-ssr` instead | Same capability, more weight. Right if you want the React ecosystem or a decoupled Drupal front end; wrong if you only want headers |
230
+ | Netlify or Vercel, either way | **Not a divergence.** SWS runs both. Pick what the unit administers |
231
+ | `output: 'static'` with a host adapter | Legitimate and often overlooked: a fully static build deploys to Netlify or Vercel unchanged and still gets headers, redirects, and previews from host config. **You do not need `output: 'server'` for headers.** Take this if you want the host but not the runtime |
232
+ | A CSP | Supported and welcome. You take on the support cost of a policy that breaks at content-edit time. Name who owns it |
233
+ | A CMS for content | **Out of scope for now, and not a swap you can take here.** See `standards/scope.md`. Content comes from the repo. Eleven SWS repos are CMS-backed in production, so the capability exists at SWS — just not as anything this recipe can hand you |
234
+
235
+ Record every swap in `.sws/manifest.yml` under `divergences` with a one-line
236
+ reason.
237
+
238
+ ## Known gotchas
239
+
240
+ All ten from `astro-static` still apply. These are additional:
241
+
242
+ 1. **`output: 'hybrid'`.** Removed from Astro. Use `'server'` plus
243
+ `export const prerender = true` per page.
244
+ 2. **Dropping `site` because the server "knows" the URL.** It does not. The
245
+ sitemap and canonical URLs still need it.
246
+ 3. **Reaching for `output: 'server'` when you only wanted headers.** A static
247
+ build on Netlify or Vercel gets headers from host config. See the swap table.
248
+ 4. **Setting headers in middleware instead of host config.** Middleware does not
249
+ run for prerendered routes, so you get headers on some pages and not others —
250
+ and the pages that miss out are the ones most likely to be public.
251
+ 5. **Setting the same header in both host config and application code.** On
252
+ Netlify the `netlify.toml` value wins; on Vercel the collision is not merged
253
+ predictably. Pick one place.
254
+ 6. **Assuming the adapter is interchangeable mid-project.** Swapping
255
+ `@astrojs/netlify` for `@astrojs/vercel` also means moving secrets, redirects,
256
+ headers, and DNS. Decide the host before launch, not after.
257
+
258
+ ## Provenance
259
+
260
+ Astro, Decanter 8, and Tailwind 4 wiring inherited wholesale from
261
+ `astro-static`, which **was** executed end to end on 2026-08-10.
262
+
263
+ **The SSR and hosting half of this recipe has not been executed, and no SWS
264
+ Astro project runs SSR.** `sws-astro` is static with no deploy config. The
265
+ adapter configuration and the header mechanisms are reasoned from the Astro
266
+ documentation and from how the Next families do the equivalent thing on the
267
+ same two hosts — not copied from a running Astro deployment. Treat the step
268
+ ordering as reasoned rather than proven, and executing it is the next task for
269
+ this recipe.
270
+
271
+ Written 2026-09-03, alongside `standards/hosting/`. The header and CSP posture
272
+ follows the SWS answer of the same day: security headers ship with sensible
273
+ defaults, and a CSP locked to specific domains is explicitly not wanted because
274
+ it puts a non-technical owner one embed away from a page they cannot fix.
@@ -0,0 +1,168 @@
1
+ # Acceptance criteria for recipe: astro-ssr
2
+ #
3
+ # EXTENDS astro-static. Everything about Decanter, the footer, the Identity Bar,
4
+ # accessibility, MinWeb, privacy, discoverability, and provenance is SHARED and
5
+ # lives there. Duplicating those criteria would guarantee they drift, which is
6
+ # the failure this whole project is organised against.
7
+ #
8
+ # Only differences belong in this file:
9
+ # - criteria that do not apply here (marked `applies: false`)
10
+ # - criteria whose mechanism differs under output: 'server'
11
+ # - criteria that exist only here
12
+ #
13
+ # Same rules as the parent: every criterion maps to an implemented check, is
14
+ # marked `manual: true`, or declares `unimplemented:` with a reason. `unknown`
15
+ # is never a pass. `block` is reserved for irreversible harm, which today is
16
+ # exactly one thing: committed secrets.
17
+
18
+ recipe: astro-ssr
19
+ version: 1
20
+ extends: astro-static
21
+
22
+ standard:
23
+ accessibility: WCAG 2.1 AA
24
+ policy_refs: [minweb, minsec/applications/low, accessibility, minpriv]
25
+
26
+ # ---------------------------------------------------------------- overrides
27
+ overrides:
28
+ - id: build.static-output
29
+ applies: false
30
+ why: >
31
+ This recipe uses output: 'server' with a host adapter. That is the whole
32
+ point of it. Individual pages opt back into prerendering with
33
+ `export const prerender = true`, which is the right default for most
34
+ pages on a content site, but the build as a whole is not static.
35
+
36
+ - id: build.base-path
37
+ applies: false
38
+ why: >
39
+ Netlify and Vercel both serve from the root. `base` is a GitHub Pages
40
+ subpath concern.
41
+
42
+ - id: build.site-set
43
+ mechanism: >
44
+ UNCHANGED from the parent, and worth stating because it is the criterion
45
+ people assume server rendering makes redundant. It does not: `site` is
46
+ still required or @astrojs/sitemap emits nothing and canonical URLs are
47
+ wrong. Check astro.config.* for `site` exactly as the parent does.
48
+
49
+ - id: workflow.push-to-main-deploys
50
+ mechanism: >
51
+ On this recipe the HOST's git integration deploys, not a GitHub Actions
52
+ job, so do not look for a deploy job. The criterion still holds and still
53
+ matters: pushing to the default branch must publish. Report `unknown`
54
+ rather than `fail` when no deploy job is found and a host config file
55
+ (netlify.toml or vercel.json) is present, because the deploy is then
56
+ configured outside the repo and this check cannot see it.
57
+
58
+ - id: workflow.report-reaches-a-reader
59
+ mechanism: >
60
+ Same requirement, different plumbing. There is no Pages deploy job to
61
+ attach the report to, so the advisory report comes from the checks
62
+ workflow. `issues: write` and `pull-requests: write` are still needed, and
63
+ omitting them still produces a report nobody sees.
64
+
65
+ # ---------------------------------------------------------------- additions
66
+ criteria:
67
+ - id: astro.adapter-configured
68
+ requires: >
69
+ astro.config.* sets `output: 'server'` and an `adapter`, and the adapter
70
+ package matches the host recorded in .sws/manifest.yml.
71
+ check: build
72
+ severity: warn
73
+ weight: 4
74
+ policy: patterns
75
+ mechanism: >
76
+ Parses astro.config.* for an `@astrojs/netlify` or `@astrojs/vercel`
77
+ import and compares it against `.sws/manifest.yml`'s `hosting.provider`.
78
+ `not_applicable` when `output` is not `'server'`; `unknown` when an
79
+ adapter is found but the manifest records no `hosting.provider` to
80
+ compare it against.
81
+ note: >
82
+ A mismatch here is a real and quiet failure: @astrojs/vercel configured on
83
+ a project deploying to Netlify builds successfully and serves wrongly.
84
+
85
+ - id: astro.no-hybrid-output
86
+ requires: "astro.config.* does not set output: 'hybrid'."
87
+ check: build
88
+ severity: warn
89
+ weight: 2
90
+ policy: patterns
91
+ mechanism: The build check reads `output` from astro.config.* directly.
92
+ note: >
93
+ 'hybrid' was removed from Astro. Its presence signals a config copied from
94
+ an older project, and it fails at build time rather than silently, so this
95
+ is a low-severity convenience rather than a real risk.
96
+
97
+ - id: astro.headers-in-host-config
98
+ requires: >
99
+ The default security header set is configured in host config
100
+ (netlify.toml [[headers]] or vercel.json headers), not only in middleware.
101
+ check: security
102
+ severity: warn
103
+ weight: 5
104
+ policy: minsec
105
+ mechanism: >
106
+ Reads netlify.toml or vercel.json (whichever is present) and checks each
107
+ header in the default set by name. `not_applicable` when neither file
108
+ exists, since a Next config is then the thing to check instead (see
109
+ security.headers-set).
110
+ note: >
111
+ MIDDLEWARE IS THE WRONG PLACE and this is the substantive Astro-specific
112
+ finding in this recipe. Astro middleware does not run for prerendered
113
+ routes, so headers set there apply to some pages and not others -- and the
114
+ pages that miss out are the prerendered ones, which is most of a content
115
+ site. Host config covers both. Canonical values are in
116
+ standards/hosting/capabilities.yml under default_header_set.
117
+
118
+ - id: hosting.recorded
119
+ requires: >
120
+ .sws/manifest.yml records `hosting` with the chosen host, and that host
121
+ has a profile in standards/hosting/.
122
+ check: manifest
123
+ severity: warn
124
+ weight: 3
125
+ policy: patterns
126
+ mechanism: >
127
+ Reads `hosting.provider` from .sws/manifest.yml and confirms
128
+ standards/hosting/<provider>.yml exists.
129
+ note: >
130
+ Neither Netlify nor Vercel is a divergence: SWS runs both, one per family.
131
+ This criterion asks only that the choice be WRITTEN DOWN, so the next
132
+ person knows where the site lives without guessing from a lockfile. That
133
+ guess is exactly how this project spent three weeks believing Netlify was
134
+ the only SWS host.
135
+
136
+ - id: hosting.dashboard-mfa
137
+ requires: >
138
+ MFA, or SSO with MFA, is enabled on the hosting dashboard, not only on
139
+ GitHub.
140
+ manual: true
141
+ check: manifest
142
+ severity: warn
143
+ weight: 4
144
+ policy: minweb
145
+ note: >
146
+ THE MOST-MISSED ITEM in standards/hosting/capabilities.yml. MinWeb's "MFA
147
+ on all administrative logins" is routinely read as covering only the
148
+ obvious ones, but the host dashboard can trigger a deploy and read
149
+ environment variables, so it is an administrative login. Neither host
150
+ enables it by default. Attest to it on the launch checklist; no automated
151
+ check can see it.
152
+
153
+ - id: hosting.production-domain
154
+ requires: >
155
+ The production URL is the approved Stanford subdomain, not a
156
+ *.netlify.app or *.vercel.app preview domain.
157
+ manual: true
158
+ check: manifest
159
+ severity: warn
160
+ weight: 3
161
+ policy: minweb
162
+ note: >
163
+ Worth checking explicitly because it happens: press-nextjs publishes to
164
+ stanford-university-press.vercel.app. A vendor preview domain is fine
165
+ pre-launch and not fine at launch. The subdomain NAME is approved by
166
+ University Communications, has a lead time, and is not a decision this
167
+ tool, an agent, or a developer can make. Route per
168
+ standards/policy/escalation.md.