@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
package/AGENTS.md ADDED
@@ -0,0 +1,149 @@
1
+ # Stanford Web Services: agent contract
2
+
3
+ You are working on a Stanford University website. This file is the behavioral
4
+ contract. Read it once, follow it throughout.
5
+
6
+ ## Non-negotiables
7
+
8
+ 1. **Accessibility target is WCAG 2.1 AA.** Automated testing catches roughly
9
+ 30 percent of issues per ODA guidance, so a green axe run is a floor, not a
10
+ conformance claim. Never describe a site as accessible on the strength of a
11
+ passing test.
12
+ 2. **The Stanford Global Footer is immutable.** Its links may not be altered,
13
+ reordered, or added to, and nothing else goes inside it. Unit links belong
14
+ in a local footer above it. The exact contract is
15
+ `standards/fragments/global-footer.yml`. Read it; do not type the footer
16
+ from memory.
17
+ 3. **Nothing above the Identity Bar** except a skip navigation link.
18
+ 4. **Never commit credentials.** This is the only thing in the whole system
19
+ that blocks a build, because it is the only irreversible harm.
20
+ 5. **A named business owner and technical administrator**, both with valid
21
+ Stanford affiliation and email, must be discoverable on the site.
22
+ 6. **Content comes from the repository.** This package has no tested CMS path:
23
+ not Storyblok, not decoupled Drupal. Out of scope is not forbidden, and the
24
+ existing SWS CMS work is not wrong — but do not prescribe a content backend
25
+ here, and do not build half of one to avoid telling someone it is not covered
26
+ yet. `standards/scope.md`.
27
+ 7. **No cookie consent banner is required.** The Global Footer's Privacy link
28
+ satisfies the disclosure obligation, so a banner is never the default. It is
29
+ **not forbidden** — a unit may add one. If it does, record the choice in
30
+ `.sws/manifest.yml` and send the vendor question to the University Privacy
31
+ Office. Do not tell people they cannot have one.
32
+
33
+ ## How to work
34
+
35
+ **Check prior art before you build.** SWS has built a lot of sites and most
36
+ problems are solved. Run `sws prior-art find "<what you are building>"` or read
37
+ `standards/prior-art/`. Then apply the precedence rule, all three clauses:
38
+
39
+ - Prior art tells you **how we solved a shape of problem**. Standards tell you
40
+ **what to build it with**. When they disagree, standards win.
41
+ - **Repeated identical choices across repos are a convention**, not drift.
42
+ Adopt them — but **count lineages, not repos.** Sibling repos made by
43
+ copy-forking share one decision, not several, and that decision may be frozen
44
+ rather than current.
45
+ - Prior art **cannot tell you why** a dependency is there, or **where the org
46
+ is going**. Both need a person. Never infer purpose from presence, and never
47
+ present current practice as intent.
48
+
49
+ **Install latest. Do not pin versions.** Recipes name no version numbers, with
50
+ one exception: Decanter 8, never 7, because they are architecturally different
51
+ and getting it wrong fails silently. Everything else follows or does not
52
+ matter. Prefer expressing a standard as a thing to avoid, which ages better
53
+ than a version to require.
54
+
55
+ **Follow the recipe, and record divergence.** `standards/recipes/` describes
56
+ what to build. Deviating is supported and expected: read the swap points, take
57
+ the stated cost, and record the choice in `.sws/manifest.yml`. Silent
58
+ divergence is the only kind that is a problem.
59
+
60
+ **Say which source you used.** When Figma and Decanter's CSS disagree, CSS wins
61
+ on token names and values. When `www.stanford.edu` and Decanter disagree, note
62
+ that the homesite is a Decanter-derived system that feeds Decanter 8, so it is
63
+ a preview rather than a target.
64
+
65
+ ## Tone of enforcement
66
+
67
+ Everything is advisory except committed secrets. Report findings, explain the
68
+ policy behind them, offer a fix, and move on. Do not block, do not lecture, and
69
+ do not refuse to proceed because a check failed. A person who finds this tool
70
+ obstructive will stop using it, and then nothing is compliant.
71
+
72
+ **Carrot, not stick.** Almost everything in the Stanford web ecosystem is an
73
+ incentive rather than a mandate, and this tool has to be attractive to work with
74
+ or it gets bypassed — someone who feels blocked simply goes their own way, and
75
+ then you have no influence at all. **Policy governs only a sliver of a site**,
76
+ mostly the page furniture in `standards/policy/brand.md`. Decanter is the easiest
77
+ compliant path, not a hard line: design creativity above the footer and Identity
78
+ Bar is welcome, including adopting a `www.stanford.edu` pattern before it lands in
79
+ Decanter. Be the reason someone stays, not the reason they leave.
80
+
81
+ If someone cannot fix something now, record it in `.sws/acknowledged.yml` with a
82
+ reason and a review date. That is a supported action, not a workaround.
83
+
84
+ ## Escalation
85
+
86
+ You can explain requirements and fix findings. You **cannot** grant an
87
+ exception, approve a subdomain, sign off a launch, or interpret policy on the
88
+ university's behalf. Route those to the right office and the right door, per
89
+ `standards/policy/escalation.md`. Give one door with a reason, not a list of
90
+ links. Never invent a door: the general contact plus an honest "they will route
91
+ you" beats a confident wrong link.
92
+
93
+ Do not recommend or rank vendors for anything with legal, policy, or
94
+ procurement implications. State the obligation, name the office, stop.
95
+
96
+ ## Installing this
97
+
98
+ **Three named jobs, no default:** `install` puts the skills in a person's tool
99
+ once per machine, `init` starts a new site, `add .` adds to an existing one; no
100
+ job prints help. **A project holds no skills** — correct, not a failed install.
101
+
102
+ If you are an agent asked to set up a Stanford site, install non-interactively
103
+ and read the result rather than the prose:
104
+
105
+ ```bash
106
+ npx @su-sws/synthetic-web-team init --json --answers '{"siteName":"...","unit":"..."}'
107
+ ```
108
+
109
+ Every **flag** is optional — with a TTY the job interviews instead — so **never
110
+ say the JSON form is required**. The command itself is not optional.
111
+
112
+ Act on four fields: `next[]` for next steps, `incomplete[]` for manifest fields
113
+ still holding placeholders (**ask the user, never invent an owner email**),
114
+ `counts` to tell a fresh install from a re-run, and `dependency` — since unscoped
115
+ `sws` is somebody else's package, **run `npm install` before verifying**.
116
+
117
+ ## Where things are
118
+
119
+ | Path | What |
120
+ |---|---|
121
+ | `standards/scope.md` | **What this package covers.** Static sites, content in the repo, no CMS. Read it before proposing a content backend |
122
+ | `standards/policy/` | Stanford requirements: MinSec, MinWeb, accessibility, privacy, brand, identity, procurement, escalation. Each file dated with `reviewed:` |
123
+ | `standards/patterns/` | How SWS builds: Decanter, components, content, IA, forms, discoverability, conventions |
124
+ | `standards/stack/` | `requirements.yml`, what must be installed on the machine and how to detect it — run `sws preflight`. Plus `reference-versions.yml`, a dated snapshot for the canary to diff. Advisory. **Nothing installs from either** |
125
+ | `standards/recipes/` | Build contracts, with acceptance criteria per recipe |
126
+ | `standards/hosting/` | `capabilities.yml`, what a site needs from a host, plus one profile per host. **SWS runs both Netlify and Vercel**, one per family, so neither is a divergence |
127
+ | `standards/fragments/` | Byte-exact compliance content. The Global Footer lives here |
128
+ | `standards/prior-art/` | Existing SWS work, with era, lineage, and judgment |
129
+ | `.sws/manifest.yml` | What this project is, resolved versions, divergences, prior art reused |
130
+ | `.sws/acknowledged.yml` | Accepted risks, with reasons and review dates |
131
+
132
+ ## Current stack defaults
133
+
134
+ Astro or Next, Tailwind 4 via Decanter 8, npm (yarn is fine, never convert a
135
+ project), Playwright plus axe for testing. **Hosting: GitHub Pages for static,
136
+ then Netlify or Vercel** — SWS runs both, one per family, so start from whichever
137
+ the unit already administers rather than picking for them. Ship the default
138
+ security headers from `standards/hosting/capabilities.yml`; a **CSP is optional
139
+ and off by default**, because it breaks pages at content-edit time and the person
140
+ holding that problem is the one least able to diagnose it. No
141
+ component workshop: these sites have few components and one consumer.
142
+
143
+ **Content is authored in the repo. No CMS.** See `standards/scope.md`. Every
144
+ content change is therefore a commit that runs `sws a11y` in CI, which is a
145
+ stronger control than an authoring-time overlay — but automated testing still
146
+ catches only about 30 percent of issues, so that floor has not moved.
147
+
148
+ Push to `main` deploys. Pull requests are first-class but never required, and
149
+ nothing should make one mandatory.
package/README.md ADDED
@@ -0,0 +1,321 @@
1
+ # Synthetic Web Team
2
+
3
+ [![Stanford compliance](https://img.shields.io/endpoint?url=https%3A%2F%2Fsu-sws.github.io%2Fsynthetic-web-team%2Fbadge.json)](https://su-sws.github.io/synthetic-web-team/)
4
+
5
+ **A portable agent team that reproduces Stanford Web Services practice inside whichever AI coding tool you already use.**
6
+
7
+ <sub>The badge reads its own score from `badge.json`, which the site deploys — no gist, no secret, no service beyond shields.io. It will show `inaccessible` until the first deploy publishes the file.</sub>
8
+
9
+ Open Claude Code, Cursor, VS Code, Codex, or Antigravity in a Stanford project and get the working knowledge of a full SWS web team: strategy, information architecture, content design, UX, front end, accessibility, discoverability, and delivery. The output is a Stanford site that is compliant by default and that you can actually maintain.
10
+
11
+ Everything here is Markdown, YAML, and a small CLI. **No application code, no starter templates, no design system fork.**
12
+
13
+ ## Status
14
+
15
+ Early. The plan is complete and reviewed; the implementation is partway through.
16
+
17
+ | | |
18
+ |---|---|
19
+ | Project plan | Done. [`PROJECT-PLAN.md`](PROJECT-PLAN.md) |
20
+ | Scope | **Static sites, content in the repo, no CMS.** [`standards/scope.md`](standards/scope.md) |
21
+ | Standards (L0) | **Complete for v1.** 8 policy files, 7 patterns, prior art, 3 recipes, 4 hosting profiles, the footer fragment, reference versions |
22
+ | `astro-static` recipe | Written, and **executed end to end** against a real build |
23
+ | `astro-ssr` recipe | Written, extends `astro-static`. **Not executed**, and no SWS Astro project runs SSR, so its hosting half is reasoned rather than copied |
24
+ | `next-ssr` recipe | Written, extends `astro-static`. Renamed from `next-netlify` on 2026-09-03. Not yet executed end to end |
25
+ | Hosting profiles | **New.** `standards/hosting/`: a capability contract plus GitHub Pages, Netlify, and Vercel |
26
+ | Shared skills | **8 of 8 done**, including `sws-github` (provisions a repo and Pages deploy through `gh`) and `sws-preflight` (is this machine equipped?) |
27
+ | Role skills | **8 of 8 built, 11 of 11 stubs.** 30 skills total, all validated |
28
+ | Documentation site | **Working.** [`site/`](site/), built by our own recipe, scores 100/100 with zero failures |
29
+ | `sws` CLI | **Working.** `preflight` reports whether the machine has the tools to build at all. `doctor` and `check` run 13 check modules against 68 criteria. `sws a11y` runs axe and an interactive-state audit — hover and focus measured with a real mouse and a real Tab key — and `sws perf` measures a byte budget, all in real Chromium |
30
+ | Report delivery | **Working.** PR comment and a persistent "Site health" issue, both updated in place. Score trend, sparkline, HTML artifact, README badge |
31
+ | Install wizard | **Working, agent-first, two-part.** `user` scope installs the skills into your tools once per machine and is removable; project scope installs `AGENTS.md`, the standards, and the per-site record. Non-interactive by default off a TTY, `--json` result with machine-readable next steps, `--answers` input, idempotent re-runs that preserve project state |
32
+ | Copy-a-prompt install | **Working.** Five prompts on the site — install into your editor, start a new site, add to an existing project, review, update — each carrying an `npx` route and a `git clone` fallback |
33
+ | Publishable packages | **Working, not yet published.** Two packages — `@su-sws/synthetic-web-team` and `@su-sws/synthetic-web-team-mcp` — verified by installing the tarballs into a clean project with no repository present |
34
+ | Updates | **Working.** Re-install is the update: project state preserved, local edits reported as conflicts rather than overwritten, stale files reported not deleted, staleness nag in `sws doctor` |
35
+ | Recipe canary | **Deliberately deferred**, 2026-09-01. Not in production, so nobody is exposed to upstream drift yet. Revisit before the first pilot |
36
+ | Standards freshness CI | Planned, and the priority ahead of the canary. Keeps policy, prior art, and sourced facts from going stale |
37
+ | MCP server | **Working.** [`packages/mcp/`](packages/mcp/). 5 tools, 26 resources, verified over the real stdio protocol |
38
+
39
+ End to end, verified: `synthetic-web-team` installs, an agent follows the recipe, then `npm run build && sws a11y && sws perf && sws check` reports **100/100 with zero automated failures** — 52 criteria passing, none to fix, 8 unchecked. axe runs in real Chromium against every built route and finds 0 violations at WCAG 2.1 AA; the byte budget passes at 154 KB of 800. **Every one of the 8 unchecked items is genuinely unautomatable** — the manual WCAG checklist, ODA review, subdomain approval, MFA attestation, the DRA question — and each says so with a reason rather than being quietly dropped.
40
+
41
+ **A green axe run is a floor, not a conformance claim.** It covers roughly 30 percent of accessibility issues per ODA guidance, and this project says so in the report itself.
42
+
43
+ ## Install
44
+
45
+ ### Easiest: paste a prompt into your agent
46
+
47
+ Copy the install prompt from [the site](https://su-sws.github.io/synthetic-web-team/)
48
+ and paste it into Claude Code, Cursor, VS Code Copilot, Codex, Zed — anything that
49
+ can run a command. It tells the agent how to install, what to read first, and
50
+ **to ask you for the owner names and emails rather than inventing them**, because
51
+ MinWeb requires real ones.
52
+
53
+ There are five, following the two-step shape: **install into your editor**,
54
+ then either **start a new site** or **add to an existing project**, plus review
55
+ an existing site without changing it, and update. Each names both the `npx`
56
+ route and a `git clone` fallback, so it stays correct even where the registry is
57
+ unreachable.
58
+
59
+ ### Or run it yourself and answer the questions
60
+
61
+ **It installs in two parts.** Once per machine, into whichever AI tools you use:
62
+
63
+ ```bash
64
+ npx @su-sws/synthetic-web-team install
65
+ ```
66
+
67
+ That writes the 30 skills to `~/.claude/skills/` and `~/.agents/skills/` and
68
+ nothing else — no standards, no `AGENTS.md`, nothing per-site, because at that
69
+ point there is no site. It touches no file it did not write, so unrelated skills
70
+ already in those directories are safe, and `install --remove` takes it back out.
71
+
72
+ Then once per project, in its root:
73
+
74
+ ```bash
75
+ npx @su-sws/synthetic-web-team init # a new site, in an empty directory
76
+ npx @su-sws/synthetic-web-team add . # a project you already have
77
+ ```
78
+
79
+ **The command is required; every flag is optional.** There is no bare form and
80
+ no default: `install` writes to your home directory while `init` and `add` write
81
+ into whichever directory you are standing in, and those are too different to
82
+ guess between. Run it with no command and it prints its help and writes nothing.
83
+
84
+ With a terminal attached each job asks what the site is, what it handles, who
85
+ owns it, and which AI tools you use, then shows you every file before writing
86
+ anything. **A project gets no skills** — they are already installed for every
87
+ project — so their absence there is correct.
88
+
89
+ Where a `package.json` is present it also adds `@su-sws/synthetic-web-team` to
90
+ your `devDependencies`, so that `npx sws` afterwards runs this CLI. Unscoped
91
+ `sws` on the public registry is an unrelated package, and without the local
92
+ dependency that is what you would get.
93
+
94
+ ### Or drive the installer yourself
95
+
96
+ **The primary caller is an agent, so that is the first-class path.** One command,
97
+ no prompts, one JSON document on stdout, stable exit codes:
98
+
99
+ ```bash
100
+ npx @su-sws/synthetic-web-team init --json --answers '{
101
+ "siteName": "Stanford Bioengineering",
102
+ "unit": "Bioengineering",
103
+ "purpose": "Help prospective graduate students apply",
104
+ "url": "https://bioe.stanford.edu",
105
+ "businessOwnerName": "...", "businessOwnerEmail": "...@stanford.edu",
106
+ "techAdminName": "...", "techAdminEmail": "...@stanford.edu",
107
+ "collectsPersonalData": false, "authenticates": false
108
+ }'
109
+ ```
110
+
111
+ **Non-interactive is the default whenever stdin is not a TTY**, so an agent
112
+ cannot hang on a prompt. With `--json`, stdout is exactly one JSON document and
113
+ every human-readable line goes to stderr.
114
+
115
+ Three fields in the result are the ones an agent should act on:
116
+
117
+ | Field | Why it matters |
118
+ |---|---|
119
+ | `next[]` | What to do next, **as data**: `read-contract`, `orient`, `follow-recipe`, `complete-manifest`, `verify`. Each has a path or command and a `why` |
120
+ | `incomplete[]` | Manifest fields that are still placeholders. **Ask the user for these; do not invent them** — MinWeb requires a named business owner and technical administrator with valid Stanford email |
121
+ | `counts` | `created` / `updated` / `unchanged` / `preserved`. A re-run reports `unchanged`, so "already installed" is a truthful answer rather than a second claim of success |
122
+
123
+ Exit codes: `0` success or dry run, `2` bad input or no content found, `3` a human
124
+ declined at the confirmation prompt.
125
+
126
+ Re-running is safe. `.sws/manifest.yml` and `.sws/acknowledged.yml` are project
127
+ state and are **preserved**, never overwritten — everything else is content and is
128
+ rewritten from source.
129
+
130
+ ### Updating
131
+
132
+ **Re-running the installer *is* the update.** There is no separate `update`
133
+ command, because the content is vendored into your project rather than resolved
134
+ at runtime — so an update is a re-copy, and the only question is what it is
135
+ allowed to touch.
136
+
137
+ ```bash
138
+ npx @su-sws/synthetic-web-team add .
139
+ ```
140
+
141
+ Three guarantees make that safe to run at any time:
142
+
143
+ | Verdict | What happens |
144
+ |---|---|
145
+ | `preserved` | `.sws/manifest.yml` and `.sws/acknowledged.yml` are **never** overwritten. They hold your owners, resolved versions, recorded divergences and accepted risks |
146
+ | `conflict` | A file **you edited** is reported and left alone. `--force` overrides |
147
+ | `orphan` | A file we shipped before and no longer do is **reported, not deleted**, every run until you remove it |
148
+
149
+ `.sws/installed.json` records the hash of everything written, which is what lets
150
+ an update tell a local edit from an old version. **Commit it.** Delete it and you
151
+ lose conflict detection until the next install.
152
+
153
+ `npx sws doctor` tells you when a project is behind: content and tools ship in
154
+ one package, so the CLI's version *is* the standards version — no network call.
155
+
156
+ ### If you are a human
157
+
158
+ Same command without `--json`. It detects your editors, asks a handful of
159
+ questions, and shows you the file list before writing anything. `--dry-run`
160
+ reports what it would do and writes nothing; `--interactive` forces prompts even
161
+ without a TTY.
162
+
163
+ Nothing is published to npm yet. Until it is, install from a checkout — the
164
+ wizard finds its content beside itself or in the current directory:
165
+
166
+ ```bash
167
+ git clone https://github.com/SU-SWS/synthetic-web-team
168
+ cd synthetic-web-team && npm install
169
+ cd /path/to/your/project
170
+ node /path/to/synthetic-web-team/packages/wizard/bin/wizard.mjs
171
+ ```
172
+
173
+ Or copy the files by hand, which is all the wizard is really doing:
174
+
175
+ ```bash
176
+ # From your project root
177
+ cp -r path/to/synthetic-web-team/AGENTS.md .
178
+ cp -r path/to/synthetic-web-team/standards .
179
+ mkdir -p .agents .claude
180
+ # Skills go in your HOME directory, once, not in the project
181
+ cp -r path/to/synthetic-web-team/skills ~/.agents/skills
182
+ cp -r path/to/synthetic-web-team/skills ~/.claude/skills
183
+ echo '@AGENTS.md' > CLAUDE.md
184
+ ```
185
+
186
+ Those two skill paths between them are read natively by Claude Code, VS Code Copilot, Cursor, Codex CLI, Gemini CLI, Zed, Antigravity, and Cline. No build step, no compiler, no plugin to install.
187
+
188
+ Two copies because no single path is read by every editor, and we deliberately have no compiler. If you only use one editor, delete the other directory. See [`docs/skill-paths.md`](docs/skill-paths.md).
189
+
190
+ To start a new site, hand your agent [`standards/recipes/astro-static/RECIPE.md`](standards/recipes/astro-static/RECIPE.md) and ask it to follow it.
191
+
192
+ Then check it:
193
+
194
+ ```bash
195
+ npm install --prefix packages/cli
196
+ node packages/cli/bin/sws.mjs doctor --standards standards
197
+ ```
198
+
199
+ `doctor` always exits 0, so it is safe anywhere. `check` is the CI form and exits non-zero only on a blocking finding, which today means exactly one thing: committed credentials.
200
+
201
+ ## What is in here
202
+
203
+ | Path | What it does |
204
+ |---|---|
205
+ | [`AGENTS.md`](AGENTS.md) | The behavioral contract. 100 lines, read by every tool |
206
+ | [`skills/`](skills/) | The team: 30 skills, each one `SKILL.md` with two frontmatter keys. 8 built roles, 11 honest stubs, 11 shared |
207
+ | [`standards/policy/`](standards/policy/) | Stanford requirements: MinSec, MinWeb, accessibility, privacy, brand, identity, procurement, escalation. Each file carries a `reviewed:` date |
208
+ | [`standards/patterns/`](standards/patterns/) | How SWS actually builds: Decanter, components, content, IA, forms, discoverability, plus conventions derived from reading 11 production repos |
209
+ | [`standards/stack/`](standards/stack/) | `reference-versions.yml`, a dated baseline. Advisory — nothing installs from it. Plus `performance-budget.yml`, the byte budget `sws perf` enforces |
210
+ | [`standards/recipes/`](standards/recipes/) | Build contracts with machine-checkable acceptance criteria |
211
+ | [`standards/fragments/`](standards/fragments/) | Byte-exact compliance content, like the Global Footer link set |
212
+ | [`standards/prior-art/`](standards/prior-art/) | Existing SWS work, with era, lineage, and judgment attached |
213
+ | [`packages/cli/`](packages/cli/) | The `sws` CLI. 13 check modules, plus axe, interactive-state, and performance runners in real Chromium |
214
+ | [`packages/wizard/`](packages/wizard/) | The install wizard |
215
+ | [`packages/mcp/`](packages/mcp/) | `@su-sws/synthetic-web-team-mcp`. The same standards as MCP tools and resources, for agents that prefer calling a tool to shelling out |
216
+
217
+ **Two published packages, not four.** `@su-sws/synthetic-web-team` ships the content, the CLI
218
+ and the wizard together — one version number, so the CLI always knows which
219
+ standards version it carries. `@su-sws/synthetic-web-team-mcp` is separate only so CI does not
220
+ download an MCP SDK to run `sws check`. `packages/cli` and
221
+ `packages/wizard` are internal: they are published *inside*
222
+ `@su-sws/synthetic-web-team`, which is why there is no staging script and no empty-looking
223
+ package directory.
224
+
225
+ ## Five decisions that surprise people
226
+
227
+ **Recipes, not starter templates.** We do not ship or maintain application code. A recipe says what must be true and delegates boilerplate to the upstream scaffolder (`npm create astro@latest`), so you get current versions and we have nothing to keep updated. A template starts rotting the day it is committed and every consumer inherits the rot.
228
+
229
+ **Install latest. Pin nothing.** Recipes name no version numbers, with exactly one exception: Decanter 8 rather than 7, because they are architecturally different and getting it wrong fails silently. Standards are expressed as things to avoid, which age far better than versions to require.
230
+
231
+ **Advisory, not blocking.** Findings are reports, PR comments, and a visible score that trends. Exactly one thing fails a build: committed credentials, because that harm is irreversible. A tool that fails your build over a contrast ratio gets uninstalled by Friday, and then nothing is compliant.
232
+
233
+ The report is designed to **find the reader** rather than expecting the reader to find CI. A push to `main` rewrites one long-lived "Site health" issue in place — findable by someone who has never opened the Actions tab, and it notifies watchers. A pull request gets one comment, also updated in place, because a new comment per push is noise people mute. The score trend lives in that issue's body as an HTML comment, which is why it needs no database, no artifact that expires, and no commit churn.
234
+
235
+ **Push to `main` deploys.** Pull requests are first-class but never required, and nothing in the setup makes one mandatory. Many campus editors work through the GitHub web UI and will not open a pull request to fix a typo. With a CMS, git disappears entirely.
236
+
237
+ **Recipes extend each other.** `next-ssr` declares `extends: astro-static` and contains only its differences: three criteria that do not apply, two whose mechanism changes, and ten that are new. The 52 shared criteria live in one place, so they cannot drift between recipes. Four CI gates enforce the contract in both directions: every criterion maps to a check, is marked manual, or declares `unimplemented:` with a reason; every finding a check can emit has a criterion somewhere; every criterion naming a check has a check that emits its id; and every `check:` names a module that exists. Each gate was added after the previous set missed something real — the last two because five criteria named checks that emitted nothing and one named a module that had never existed.
238
+
239
+ **Scoped to static sites with content in the repo.** No CMS: not Storyblok, not decoupled Drupal. [`standards/scope.md`](standards/scope.md) is the declaration. The narrow scope is what makes the rest of the guidance testable — nothing arrives after the build that CI cannot see. It also has a genuine accessibility payoff: `standards/patterns/content.md` used to say content published after launch was the real risk, reachable only by `sa11y` in a CMS Visual Editor overlay. With content in git, every edit is a commit that runs `sws a11y` before it is public, so that gap mostly closes and the control moves somewhere stronger. The 30 percent ceiling on automated testing is untouched by this, and embedded third-party content is still outside the build. Out of scope is not forbidden, and the eleven CMS-backed SWS repos are not wrong — there is simply no tested recipe here yet, and saying so beats shipping guidance nobody has run.
240
+
241
+ **Hosting is an axis, not a recipe.** Recipes are framework- and build-shaped; hosts live in `standards/hosting/` as a capability contract plus one profile each. This keeps two frameworks times three hosts from becoming six near-identical recipes. The contract is deliberately short, because **MinWeb requires no response headers at all** — not CSP, not HSTS — so hosting is not where compliance is won or lost, and a recipe implying otherwise is overreaching. Security headers ship as sensible defaults that cannot break a page; a **CSP is optional and off by default**, since it breaks pages at content-edit time and the person holding that problem is the one least able to diagnose it.
242
+
243
+ **SWS runs two hosts, not one.** `storyblok-next-netlify` (6 repos) is on Netlify; `decoupled-drupal` (5 repos, including `library.stanford.edu`) is on Vercel. That is two lineages and two decisions, neither a majority. Until 2026-09-03 this project asserted Netlify was the platform and Vercel "appears once", because hosting had been inferred from `package.json` — which does not record a deploy target. The Vercel family was nearly invisible to dependency inspection *because* it uses `node-vault` rather than a host build plugin, the more portable choice. That correction is [kept in full](standards/prior-art/repos.yml), and it is the second time the third precedence clause produced the largest fix in a pass.
244
+
245
+ **Prior art is step zero.** SWS has built a lot of sites and most problems are solved. The agent checks existing work before inventing anything, under a rule with three clauses, the third of which is that prior art cannot tell you *why* a choice was made or *where* the team is going. Both need a person. That clause exists because ignoring it produced three wrong conclusions in an afternoon, [written up as a record of error](standards/patterns/sws-conventions.md).
246
+
247
+ ## Compliance, concretely
248
+
249
+ Generated sites are built to satisfy Stanford's actual requirements rather than a generic checklist:
250
+
251
+ - **WCAG 2.1 AA**, with an honest statement that automation catches roughly 30 percent of issues per ODA guidance
252
+ - **Global Footer and Identity Bar** exactly as the Identity Guide requires, from a contract extracted from the upstream component
253
+ - **MinWeb**: named business owner and technical administrator, MFA on admin logins, HTTPS, no keys in Git, subdomain approved by University Communications
254
+ - **MinSec**, which applies to low-risk static sites too
255
+ - **Siteimprove** registration, which is required. Google Analytics is not
256
+ - **No cookie banner**, because none is required at Stanford
257
+
258
+ For anything with legal, policy, or procurement weight, this project names the responsible university office and the specific door to use rather than recommending a product. It will not grant an exception, approve a subdomain, sign off a launch, or interpret policy on the university's behalf.
259
+
260
+ ## Who this is for
261
+
262
+ **SWS staff** are the primary audience. This encodes how we already work, including the parts that live only in people's heads.
263
+
264
+ **Stanford units** building their own sites are the close second. If you are a department with no web developer, consider [Stanford Sites](https://uit.stanford.edu/service/stanfordsites) first: it is free and already compliant. This project is for when you need something Stanford Sites cannot do.
265
+
266
+ **Other universities** are welcome. The architecture is not Stanford-specific; only `standards/policy/` and `standards/fragments/` are. Swap those and the rest works. If you do that, we would like to hear about it.
267
+
268
+ ## Stack
269
+
270
+ Astro or Next, Tailwind 4 via [Decanter 8](https://github.com/SU-SWS/decanter), npm (yarn fine, never converted), Playwright plus axe, GitHub Pages then Netlify. Optional Storyblok. No component workshop, because these sites have few components and one consumer.
271
+
272
+ Divergence is supported and expected. Every recipe lists its swap points with the cost of each, and deliberate departures get recorded rather than argued about.
273
+
274
+ ## Contributing
275
+
276
+ Standards changes need a reason and a date. If you correct something, say what was wrong and how you know, because the record of a mistake is usually more reusable than the fix.
277
+
278
+ Two rules with teeth:
279
+
280
+ 1. **Never edit an `acceptance.yml` criterion or a fragment to make a project pass.** Fragments change when upstream changes.
281
+ 2. **Every criterion must map to an implemented check.** A criterion with no check is a wish. Delete it or implement it.
282
+
283
+ ## Releasing
284
+
285
+ **Every push to `main` cuts a release.** Patch by default:
286
+
287
+ | You want | Do this |
288
+ |---|---|
289
+ | A patch | Nothing. Push to `main` |
290
+ | A minor | Put `[minor]` anywhere in the commit message |
291
+ | A major | Put `[major]` anywhere in the commit message |
292
+ | No release | Put `[skip release]` in the commit message |
293
+ | A specific bump, by hand | Run the **release** workflow and pick `patch`, `minor`, `major`, or `none` |
294
+ | Publish the current version without bumping | Run it by hand with `none` |
295
+
296
+ [`.github/workflows/release.yml`](.github/workflows/release.yml) validates,
297
+ versions, tags, publishes and drafts release notes, in that order. It needs one
298
+ repository secret, **`NPM_TOKEN`**, an npm automation token with publish rights
299
+ on the `@su-sws` scope. Publishing uses `--provenance`, so releases are
300
+ attested to this repository and this workflow.
301
+
302
+ **Both packages move together.** `@su-sws/synthetic-web-team-mcp` depends on the root package, and
303
+ a caret range survives a patch bump but not a minor one — `^0.1.0` does not
304
+ match `0.2.0`, so a published server would quietly resolve *old* standards.
305
+ [`scripts/set-version.mjs`](scripts/set-version.mjs) rewrites that range along
306
+ with the versions, which is the whole reason `npm version` is not used here. Run
307
+ it with `--dry-run` to see what a bump would do.
308
+
309
+ Ordering is deliberate: the gates run before anything is versioned, the version
310
+ is checked against the registry before anything is committed, and the tag is
311
+ pushed before anything is published. A failure at any point leaves the registry
312
+ untouched, because publishing to a public registry is the only step here that
313
+ cannot be undone.
314
+
315
+ ## License
316
+
317
+ GPL-3.0-or-later, matching [Decanter](https://github.com/SU-SWS/decanter).
318
+
319
+ ---
320
+
321
+ Maintained by [Stanford Web Services](https://uit.stanford.edu/sws).
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@su-sws/synthetic-web-team",
3
+ "version": "0.1.0",
4
+ "description": "Stanford Web Services standards and agent team: policy, patterns, recipes, fragments, prior art, 30 skills, the two-part install wizard, and the advisory compliance CLI.",
5
+ "license": "GPL-3.0-or-later",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/SU-SWS/synthetic-web-team.git"
9
+ },
10
+ "scripts": {
11
+ "sync-skills": "node scripts/sync-skills.mjs",
12
+ "validate": "node scripts/validate-skills.mjs && node scripts/validate-emit.mjs && node scripts/validate-criteria.mjs && node scripts/validate-state-classifier.mjs",
13
+ "check": "npm run validate && npm run sync-skills -- --check",
14
+ "pack:all": "mkdir -p .pack && npm pack --pack-destination ./.pack && npm pack -w @su-sws/synthetic-web-team-mcp --pack-destination ./.pack"
15
+ },
16
+ "engines": {
17
+ "node": ">=22.12.0"
18
+ },
19
+ "workspaces": [
20
+ ".",
21
+ "packages/*"
22
+ ],
23
+ "devDependencies": {
24
+ "yaml": "^2.8.1"
25
+ },
26
+ "bin": {
27
+ "synthetic-web-team": "packages/wizard/bin/wizard.mjs",
28
+ "sws": "packages/cli/bin/sws.mjs"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "files": [
34
+ "AGENTS.md",
35
+ "standards",
36
+ "skills",
37
+ "packages/cli/bin",
38
+ "packages/cli/src",
39
+ "packages/wizard/bin",
40
+ "packages/wizard/src"
41
+ ],
42
+ "dependencies": {
43
+ "node-html-parser": "^7.0.1",
44
+ "yaml": "^2.8.1"
45
+ },
46
+ "peerDependencies": {
47
+ "@playwright/test": "*",
48
+ "@axe-core/playwright": "*"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "@playwright/test": {
52
+ "optional": true
53
+ },
54
+ "@axe-core/playwright": {
55
+ "optional": true
56
+ }
57
+ }
58
+ }