@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,111 @@
1
+ ---
2
+ policy: scope
3
+ title: What this package covers, and what it does not
4
+ reviewed: 2026-09-03
5
+ ---
6
+
7
+ # Scope
8
+
9
+ **This package builds static Stanford sites with content authored in the
10
+ repository.** That is the whole scope. It is deliberately narrow, and narrowing
11
+ it is what makes the rest of the guidance honest: every claim here can be tested
12
+ against a real build, because there is nothing arriving after the build that we
13
+ cannot see.
14
+
15
+ ## In scope
16
+
17
+ - **Static content**, authored in the repo as Markdown, MDX, or framework
18
+ templates, and reviewed through git.
19
+ - **All three recipes.** `astro-static`, `astro-ssr`, and `next-ssr`. A server
20
+ runtime is in scope for response headers, redirects, search, and forms.
21
+ Content still comes from the repo.
22
+ - **All hosts in `standards/hosting/`.** GitHub Pages, Netlify, Vercel.
23
+
24
+ **Note that "static content" is about the content SOURCE, not the build output.**
25
+ `astro-ssr` and `next-ssr` render at request time and are fully in scope. What is
26
+ out of scope is content that arrives from somewhere other than the repo.
27
+
28
+ ## Out of scope, for now
29
+
30
+ **No CMS attachments.** Not Storyblok, not decoupled Drupal, not any other
31
+ content backend. Concretely, that means this package does not currently ship:
32
+
33
+ | Deferred | Where it will come back |
34
+ |---|---|
35
+ | Storyblok integration and content modelling | A `*-storyblok` recipe overlay |
36
+ | Decoupled Drupal via GraphQL | A separate recipe; it is a different shape of project |
37
+ | `sa11y` in a Visual Editor overlay | Returns with the CMS that needs it |
38
+ | Webhook-triggered rebuilds on publish | Returns with the CMS that triggers them |
39
+ | A separate CSP for a Visual Editor route | Returns with the iframe that needs it |
40
+ | Preview and draft modes | Returns with the CMS that has drafts |
41
+
42
+ **"Out of scope" means we do not prescribe it. It does not mean it is
43
+ forbidden**, and it does not mean the existing SWS CMS work is wrong. Six SWS
44
+ repos run Storyblok and five run decoupled Drupal, all of them in production.
45
+ If a project needs a CMS, that is a legitimate project — this package just does
46
+ not have a tested recipe for it yet, and saying so is better than shipping
47
+ guidance nobody has run.
48
+
49
+ ## Two consequences worth stating plainly
50
+
51
+ ### 1. The post-launch accessibility gap mostly closes
52
+
53
+ This is the good news, and it is the strongest argument for the narrow scope.
54
+
55
+ `standards/patterns/content.md` used to say that content published after launch
56
+ is the real accessibility risk, because CI tests the site **as built** and says
57
+ nothing about what an editor publishes next week. On a CMS-backed site that is
58
+ true, and `sa11y` in the Visual Editor was the only control that reached it.
59
+
60
+ **With content in the repo, there is no "published next week" that bypasses the
61
+ build.** Every content change is a commit, every commit runs `sws a11y` and
62
+ `sws perf`, and an untagged heading or a missing `alt` is caught before it is
63
+ public. The control moved from an authoring-time overlay into CI, where it is
64
+ stronger.
65
+
66
+ Two things this does **not** fix, so do not overclaim:
67
+
68
+ - **Automated testing still catches roughly 30 percent of issues** per ODA
69
+ guidance. A green axe run is a floor, not a conformance claim. That is
70
+ unchanged and it is the more important limit.
71
+ - **Embedded third-party content** — a Qualtrics form, a YouTube player, a
72
+ map — is still published outside the build, and its accessibility is still not
73
+ yours to control. Raise it as a procurement question with a VPAT, per
74
+ `standards/policy/procurement.md`.
75
+
76
+ ### 2. "Making git disappear" now has one path, not two
77
+
78
+ For a non-technical unit this matters more than any technical detail here,
79
+ because it decides **who can maintain the site**.
80
+
81
+ Without a CMS, the options are:
82
+
83
+ - **GitHub web UI editing.** Edit a Markdown file, commit to `main`, the site
84
+ rebuilds. This works today, it is why push-to-main must keep deploying, and it
85
+ is why nothing should make a pull request mandatory. It is a real answer for a
86
+ unit with one or two people willing to edit Markdown.
87
+ - **Point them at Stanford Sites.** Free, already compliant, and someone else
88
+ maintains it. `astro-static` already says this, and it remains the right
89
+ referral for a unit that will maintain a site alone with no appetite for git.
90
+
91
+ **Raise this during discovery, not at launch.** If the unit needs a CMS, say so
92
+ early and honestly: this package does not cover it yet. Do not build half a
93
+ content backend to avoid the conversation.
94
+
95
+ ## Reading prior art under this scope
96
+
97
+ `standards/prior-art/` is a **factual record of what SWS has built**, and most of
98
+ it is CMS-backed. That record stays exactly as it is — it is not rewritten to
99
+ match the current scope, because it is evidence rather than instruction.
100
+
101
+ So when prior art shows you a Storyblok pattern:
102
+
103
+ - It is **still correct about what SWS did.**
104
+ - It is **not a recipe you should follow here**, because this package has no
105
+ tested CMS path.
106
+ - Cite it for the **shape of the problem** — content modelling, IA, component
107
+ composition — and not for the CMS wiring.
108
+
109
+ This is the ordinary precedence rule doing its job: prior art tells you how we
110
+ solved a shape of problem, standards tell you what to build it with, and when
111
+ they disagree, standards win.
@@ -0,0 +1,95 @@
1
+ # Performance budget for a static Stanford information site.
2
+ #
3
+ # ==============================================================================
4
+ # WHAT IS MEASURED, AND WHY IT IS NOT LIGHTHOUSE
5
+ #
6
+ # The criterion this backs used to say "Lighthouse performance budget". It now
7
+ # budgets BYTES AND REQUEST COUNTS measured in real Chromium, not Lighthouse
8
+ # scores. Three reasons, in order of weight:
9
+ #
10
+ # 1. A Lighthouse performance score varies by ten points or more between runs on
11
+ # a shared CI runner. This project trends a compliance score and reports it in
12
+ # a PR comment. A check that moves on its own would teach people to ignore the
13
+ # number, which is the one failure mode the whole advisory design is built to
14
+ # avoid. Byte counts are exact and identical run to run.
15
+ #
16
+ # 2. Bytes are what a Stanford unit can act on. `role-frontend-developer` already
17
+ # says the wins are "fewer images, correctly sized; fewer islands; no
18
+ # client-side framework for static content" -- all three are byte problems. A
19
+ # score of 84 tells nobody what to delete.
20
+ #
21
+ # 3. Lab timings on a build server say little about a reader on campus wifi.
22
+ # Field data would be better and we do not have it. Measuring bytes honestly
23
+ # beats measuring latency badly.
24
+ #
25
+ # Timings ARE recorded (domContentLoaded, load) as unscored context, so a person
26
+ # can look. They never affect the result.
27
+ #
28
+ # ONLY FIRST-PARTY BYTES COUNT. Everything served from the site's own origin.
29
+ # Third-party requests are counted and reported separately, because including
30
+ # them would make the check depend on the network and fail in an offline CI. See
31
+ # the third_party section below: it earns its place for a second reason.
32
+ #
33
+ # BYTES ARE UNCOMPRESSED. The local server does not gzip, and emulating a CDN's
34
+ # compression would be guesswork. Real transfer of text assets will be roughly a
35
+ # third of these numbers, so the budgets below are set with that slack in mind.
36
+ # Do not "fix" this by multiplying by a guessed ratio.
37
+ # ==============================================================================
38
+
39
+ version: 1
40
+ reviewed: 2026-09-01
41
+
42
+ # Calibrated against this project's own docs site on 2026-09-01, which measured
43
+ # 51.8 KB of first-party bytes across 5 requests (26.9 KB CSS, 15.2 KB HTML, no
44
+ # JS). The budgets are deliberately far above that: a budget exists to catch
45
+ # regression and bloat, not to freeze the current page. A site that trips one of
46
+ # these has done something worth a conversation.
47
+ budgets:
48
+ # Binding overall limit. Per-type limits below are sub-limits, so a site can
49
+ # sit under every type and still exceed the total.
50
+ total_kb: 800
51
+
52
+ by_type:
53
+ html_kb: 100
54
+ css_kb: 150
55
+ # 150 KB catches the failure this project cares most about: shipping a
56
+ # client-side framework to render static content. Astro's default is zero
57
+ # JS, so a unit site with 150 KB of script has almost certainly added an
58
+ # island that did not need to be one.
59
+ js_kb: 150
60
+ images_kb: 500
61
+ fonts_kb: 400
62
+ other_kb: 100
63
+
64
+ requests: 50
65
+
66
+ # Not budgeted, reported. A third-party request is two things at once, and the
67
+ # second is the reason this section exists:
68
+ # - a performance cost outside our control
69
+ # - a PRIVACY surface. MinPriv treats introducing a third-party service as
70
+ # something to disclose, and it can trigger a Data Risk Assessment.
71
+ # See standards/policy/privacy.md.
72
+ # So the check lists the origins rather than scoring them, and says to check the
73
+ # privacy consequence. This project's own site loads 147 KB of fonts from an
74
+ # external origin, which is worth knowing on both counts.
75
+ third_party:
76
+ report_origins: true
77
+ warn_above_origins: 4
78
+ note: >
79
+ Self-hosting fonts removes a third-party origin and usually gets faster.
80
+ Decanter ships no font assets, so the CDN reference is the default rather
81
+ than a decision anyone made. Worth revisiting per site.
82
+
83
+ # Any project may override any number above in .sws/manifest.yml under
84
+ # `performance_budget:`, which is a recorded divergence rather than a workaround.
85
+ # An image-led site legitimately needs a larger images_kb. Say so there, with a
86
+ # reason, and the check uses your number and reports that it did.
87
+ override:
88
+ location: .sws/manifest.yml
89
+ key: performance_budget
90
+ example: |
91
+ performance_budget:
92
+ images_kb: 1200
93
+ reason: >
94
+ Photo-led admissions landing page; images are the content. Reviewed
95
+ with the unit 2026-09-01.
@@ -0,0 +1,168 @@
1
+ # Reference versions: a dated snapshot, NOT a pin file.
2
+ #
3
+ # ==============================================================================
4
+ # NOTHING INSTALLS FROM THIS FILE. Read that again before editing it.
5
+ #
6
+ # Recipes install at current latest and record what resolved in
7
+ # .sws/manifest.yml. This file is a baseline to diff against, so someone can say
8
+ # "astro moved a major since we last looked" instead of "something changed."
9
+ #
10
+ # It was built for the recipe canary. The canary is DEFERRED as of 2026-09-01
11
+ # (not in production, nobody exposed yet -- see PROJECT-PLAN.md standing risks),
12
+ # so until the standards freshness pipeline lands, the consumer of this file is a
13
+ # human doing a periodic check. That is worse, and it is why the `rechecked:`
14
+ # block below exists: a partial recheck with a date beats a whole-file snapshot
15
+ # nobody trusts.
16
+ #
17
+ # An earlier draft of this project had a constraints.yml of allowed major
18
+ # ranges. On reflection that was a version-pinning scheme wearing a different
19
+ # hat, recreating the rot that dropping starter packages was meant to avoid.
20
+ # So: this file is ADVISORY and DATED. A number here going stale is the
21
+ # expected outcome, not a defect. The canary's job is to notice, not to block.
22
+ #
23
+ # The one genuinely load-bearing constraint in the whole project is
24
+ # `decanter: 8, never 7`, and it lives in standards/patterns/decanter.md as
25
+ # prose, because a thing-to-avoid ages better than a version-to-require.
26
+ # ==============================================================================
27
+
28
+ snapshot: 2026-08-10
29
+ verified_against: npm registry
30
+ recorded_by: sheamck@stanford.edu
31
+
32
+ # Partial recheck 2026-09-01: decanter dist-tags only. Everything else in this
33
+ # file still carries the 2026-08-10 date and has not been re-verified.
34
+ rechecked:
35
+ - date: 2026-09-01
36
+ scope: decanter dist-tags and the 8.x line
37
+ source: npm view decanter dist-tags, plus upstream UPGRADE.md
38
+
39
+ # How the canary should read this file.
40
+ canary:
41
+ compare: major # a minor or patch move is noise; a major move is news
42
+ on_major_move: open an issue naming the package, the old major, and the new one
43
+ on_missing_package: open an issue; a package disappearing is more interesting
44
+ than a package moving
45
+ never: fail a consumer's build because a number here is old
46
+
47
+ runtime:
48
+ node: "24.15" # Active LTS. Not 20 (ruled out by engines), not 26 (Current)
49
+ npm: "12.0.2" # requires node 24.15+
50
+ pnpm: "11.21.0"
51
+
52
+ astro:
53
+ astro: "7.2.0"
54
+ "@astrojs/mdx": "7.0.5"
55
+ "@astrojs/sitemap": "3.7.3"
56
+ "@astrojs/react": "6.0.2"
57
+ "@astrojs/netlify": "8.2.0"
58
+ "@astrojs/vercel": "11.0.5"
59
+
60
+ next:
61
+ next: "16.3.0"
62
+
63
+ styling:
64
+ # THE one load-bearing constraint: 8, never 7. v7 is a Tailwind 3 JS preset,
65
+ # v8 is CSS-first on Tailwind 4, and mixing them fails silently.
66
+ #
67
+ # DIST-TAGS RECHECKED 2026-09-01, and they moved since the August snapshot:
68
+ # latest = 7.5.3 <- a bare `npm i decanter` now gets v7
69
+ # beta = 8.0.0-beta.0 <- use this
70
+ # alpha = 8.0.0-alpha.1
71
+ # In August the alpha briefly sat on `latest`. It no longer does, which is the
72
+ # safer arrangement: existing v7 consumers are not pulled forward. Recipes must
73
+ # therefore install `decanter@beta` explicitly. Drop the tag when 8.0.0 ships
74
+ # to `latest`.
75
+ # RESOLVED: the v7->v8 class delta is now documented upstream in UPGRADE.md.
76
+ decanter: "8.0.0-beta.0"
77
+ decanter_dist_tag_required: "beta"
78
+ tailwindcss: "^4.1.16" # decanter 8's own dependency, arrives transitively
79
+ "@tailwindcss/vite": "4.3.3" # the Astro compile path
80
+ "@tailwindcss/postcss": null # the Next compile path; version not captured
81
+ "@tailwindcss/typography": "0.5.20"
82
+ # @tailwindcss/forms: still a declared dependency of decanter 8 (^0.5.11) and
83
+ # still installs transitively. What changed in v8 is that its reset and the
84
+ # form classes are only EMITTED when the project imports `decanter/forms`.
85
+ # Package = transitive. Styles = opt-in. Do not install it directly.
86
+ # DO NOT USE @astrojs/tailwind: dead since Astro 6, last published 2025-03-26.
87
+
88
+ # No component workshop. Deliberate, not an omission:
89
+ # see standards/patterns/components.md.
90
+
91
+ testing:
92
+ "@playwright/test": "1.62.1"
93
+ "axe-core": "4.13.0"
94
+ "@axe-core/playwright": "4.12.1"
95
+ "@axe-core/cli": "4.12.1"
96
+ vitest: "4.1.10"
97
+ vite: "8.2.1"
98
+
99
+ # CMS packages are DEFERRED, not recorded. See standards/scope.md.
100
+ # This package has no tested CMS path, so these versions are noted here only so
101
+ # their absence is not read as an oversight. NOTHING installs from this file
102
+ # anyway -- it is a dated snapshot for the canary to diff.
103
+ #
104
+ # cms:
105
+ # "@storyblok/astro" in use across the storyblok-next-netlify family
106
+ # "@storyblok/react" same
107
+ # storyblok the CLI
108
+
109
+ search:
110
+ "@docsearch/react": "5.0.0"
111
+ algoliasearch: "5.56.0"
112
+ "react-instantsearch": "7.42.0"
113
+
114
+ hosting:
115
+ "netlify-cli": "27.1.1" # storyblok-next-netlify family
116
+ vercel: "58.9.0" # decoupled-drupal family
117
+ # CORRECTED 2026-09-03: the old comment here said Vercel "appears once across
118
+ # 11 SWS repos". That counted npm dependencies, which do not record a deploy
119
+ # target. Both hosts are in production, one per lineage. See
120
+ # standards/prior-art/repos.yml, ANSWERED block H1.
121
+
122
+ # Verified 2026-08-10. Check releases at generation time rather than trusting
123
+ # these, because Actions majors move on GitHub's schedule, not npm's.
124
+ github_actions:
125
+ # UPDATED 2026-09-03 to what .github/workflows/static.yml actually runs, which
126
+ # is a live Pages deploy (su-sws.github.io/synthetic-web-team, status "built").
127
+ # The previous values were the 2026-08-10 snapshot and had gone stale.
128
+ "actions/checkout": "v7"
129
+ "actions/setup-node": "v7"
130
+ "actions/configure-pages": "v6"
131
+ "actions/upload-pages-artifact": "v5" # NOTE: excludes dotfiles
132
+ "actions/deploy-pages": "v4"
133
+ # Artifact actions v3 are no longer supported for Pages (Dec 2024 deprecation).
134
+ #
135
+ # CLAIM RETRACTED: this block used to say deploy-pages "must be >= artifact
136
+ # major". Our own working deploy runs upload-pages-artifact v5 with
137
+ # deploy-pages v4, which that rule forbids. The correct, narrower constraint
138
+ # was already stated properly in astro-static/RECIPE.md step 8:
139
+ # "upload-pages-artifact@v4 requires deploy-pages@v4 or newer". v5 + v4
140
+ # satisfies that. This file had restated it as a general ordering rule and
141
+ # got it wrong -- a good argument for citing the recipe rather than
142
+ # paraphrasing it here.
143
+ #
144
+ # Advisory, as with everything in this file: nothing installs from here.
145
+
146
+ # Things deliberately absent, so their absence is not read as an oversight.
147
+ not_recorded:
148
+ - what: "@astrojs/tailwind"
149
+ why: Dead package. Named here only so nobody adds it back.
150
+ - what: tailwindcss as a direct dependency
151
+ why: Arrives transitively through Decanter. Installing it directly is the
152
+ v7 mental model.
153
+ - what: a component workshop
154
+ why: These sites have few components and one consumer.
155
+ - what: any Drupal or Acquia version
156
+ why: v2 scope.
157
+ - what: "@storyblok/* and the storyblok CLI"
158
+ why: >
159
+ DEFERRED 2026-09-03. This package is scoped to static content authored in
160
+ the repo, with no CMS attachment. Six SWS repos run Storyblok in
161
+ production and that work is not wrong; there is simply no tested recipe
162
+ for it here yet. See standards/scope.md.
163
+ - what: sa11y
164
+ why: >
165
+ DEFERRED with the CMS. It is a CONTENT-AUTHOR tool for a Visual Editor
166
+ overlay, so it has nothing to attach to when content comes from git.
167
+ Under the static-content scope, `sws a11y` in CI reaches every content
168
+ change instead. See standards/scope.md.
@@ -0,0 +1,154 @@
1
+ # What has to be on the machine, and how to tell whether it is
2
+ #
3
+ # reviewed: 2026-09-04
4
+ #
5
+ # Read by `sws preflight` and by the sws-preflight skill.
6
+ #
7
+ # ==============================================================================
8
+ # THIS FILE DELIBERATELY DOES NOT SAY HOW TO INSTALL ANYTHING.
9
+ #
10
+ # It says what is needed, why, what breaks without it, and the command that
11
+ # proves it is there. The install itself is the agent's job, its own way.
12
+ #
13
+ # That is a deliberate choice, not laziness:
14
+ # - An agent knows what platform it is on and what package manager exists.
15
+ # A hardcoded matrix of brew/winget/apt/dnf/pacman/tarball lines is a guess
16
+ # about someone else's machine, and it is wrong on a good fraction of them.
17
+ # - An install matrix goes stale. Package names move, repos change keyrings,
18
+ # new managers appear. A detection command does not go stale.
19
+ # - It matches the house style: express a standard as a thing to verify rather
20
+ # than a procedure to follow, because the verification ages better.
21
+ #
22
+ # So the loop is: CHECK -> the agent installs what is missing however it likes
23
+ # -> CHECK AGAIN to confirm it actually worked. That last step is the one people
24
+ # skip, and it is the whole point of having this file.
25
+ # ==============================================================================
26
+
27
+ version: 1
28
+
29
+ tools:
30
+ - id: node
31
+ name: Node.js
32
+ why: >
33
+ Runs the build, the sws CLI, and the test harness. Everything else here is
34
+ downstream of it.
35
+ detect: node --version
36
+ version_min: "22.12.0"
37
+ required: always
38
+ blocks: Everything. Nothing in this toolchain runs without it.
39
+ note: >
40
+ Bootstrap paradox worth naming: `sws preflight` is itself a Node program,
41
+ so if it ran at all, Node is present. The check still reports the VERSION,
42
+ which is the part that actually goes wrong -- an old Node fails deep inside
43
+ a build with an error that does not mention Node.
44
+ .nvmrc in this repo pins 24 for CI; 22.12 is the floor.
45
+
46
+ - id: npm
47
+ name: npm
48
+ why: Installs dependencies and runs scripts.
49
+ detect: npm --version
50
+ required: always
51
+ blocks: Dependency install, so the build.
52
+ note: >
53
+ yarn is equally fine and is in production use at SWS. NEVER CONVERT A
54
+ PROJECT from one to the other. If the project has a yarn.lock, yarn is the
55
+ requirement and npm is not -- preflight reports whichever the project
56
+ actually uses.
57
+
58
+ - id: git
59
+ name: git
60
+ why: >
61
+ Version control, and the only way to get a working tree onto a remote.
62
+ detect: git --version
63
+ required: always
64
+ blocks: >
65
+ Any deployment at all. THIS IS THE ONE WITH NO SUBSTITUTE: the GitHub API
66
+ can create a repo and write single files, but it cannot init a repo, make
67
+ a local commit, add a remote, or push a tree. No API and no MCP server
68
+ replaces it.
69
+ note: >
70
+ On macOS, running `git --version` when the Command Line Tools are absent
71
+ pops a GUI installer dialog. A person has to click that; an agent cannot.
72
+ Warn before running it rather than letting a box appear from nowhere.
73
+
74
+ - id: gh
75
+ name: GitHub CLI
76
+ why: >
77
+ Authentication, repo creation, and the Pages API, all without handing a
78
+ raw token around. See standards/hosting/github-pages.yml.
79
+ detect: gh --version
80
+ required_when: hosting.provider == github-pages
81
+ blocks: >
82
+ The scripted GitHub provisioning path. Not the build, and not the site.
83
+ note: >
84
+ Every command in the github-pages provisioning runbook was confirmed on
85
+ gh 2.21 (early 2023), so an old gh is not a reason to stop and upgrade.
86
+ Latest at the time of writing was 2.100.0.
87
+ also_check:
88
+ what: Authentication state, which is separate from being installed.
89
+ detect: gh auth status
90
+ note: >
91
+ Installed and authenticated are different failures with different fixes,
92
+ so report them separately. `gh auth login --web` handles the second.
93
+
94
+ - id: playwright-browser
95
+ name: Playwright Chromium
96
+ why: >
97
+ axe needs a REAL browser. So does the interactive-state audit, which
98
+ measures hover and focus with a real mouse and a real Tab key.
99
+ detect: npx playwright --version
100
+ required: always
101
+ blocks: >
102
+ `sws a11y` and `sws perf`. Both then report `unknown` rather than `pass`,
103
+ and withhold their weight from the score.
104
+ note: >
105
+ TWO SEPARATE THINGS, and this is the most-missed item in the file. The
106
+ npm packages (@playwright/test, @axe-core/playwright) are project
107
+ dependencies; the BROWSER BINARY is a separate download via
108
+ `npx playwright install chromium`. The packages can be present and the
109
+ browser absent, and the failure then looks like a broken test rather than
110
+ a missing download.
111
+ A missing browser must never read as a clean a11y result. An accessibility
112
+ check that did not run is `unknown`, not a pass -- see
113
+ standards/policy/accessibility.md.
114
+
115
+ - id: netlify-cli
116
+ name: Netlify CLI
117
+ why: Local dev against Netlify features, and manual deploys.
118
+ detect: netlify --version
119
+ required_when: hosting.provider == netlify
120
+ optional: true
121
+ blocks: >
122
+ Nothing essential. Netlify deploys from its git integration, so the CLI is
123
+ a convenience rather than a dependency.
124
+
125
+ - id: vercel-cli
126
+ name: Vercel CLI
127
+ why: Local dev against Vercel features, and manual deploys.
128
+ detect: vercel --version
129
+ required_when: hosting.provider == vercel
130
+ optional: true
131
+ blocks: >
132
+ Nothing essential. Vercel deploys from its git integration too.
133
+
134
+ # ------------------------------------------------------------------ not listed
135
+ not_required:
136
+ # Named so their absence is not read as an oversight.
137
+ - what: Docker
138
+ why: >
139
+ Only the LOCAL GitHub MCP server needs it, and we do not recommend that
140
+ path: git is mandatory anyway, so the MCP server cannot complete a
141
+ deployment on its own. See standards/hosting/github-pages.yml.
142
+ - what: Homebrew, or any specific package manager
143
+ why: >
144
+ Never a requirement. Do not install Homebrew to obtain one binary -- it is
145
+ a very large dependency for that, and every tool here has a
146
+ package-manager-free download.
147
+ - what: A GitHub MCP server
148
+ why: >
149
+ Supplement, not a requirement, and only for an agent with no shell. Such
150
+ an agent cannot run git either. Do not install it alongside gh.
151
+ - what: Decanter, Astro, Next, Tailwind
152
+ why: >
153
+ PROJECT dependencies, not system tools. They arrive via npm install and
154
+ are checked by `sws check`, not here.