@su-sws/synthetic-web-team 0.1.1 → 0.2.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.
- package/AGENTS.md +79 -50
- package/README.md +22 -11
- package/package.json +3 -3
- package/packages/cli/bin/sws.mjs +22 -19
- package/packages/cli/src/checks.mjs +71 -1
- package/packages/cli/src/standards.mjs +26 -0
- package/packages/wizard/bin/wizard.mjs +112 -24
- package/packages/wizard/src/emit.mjs +672 -75
- package/skills/role-devops/SKILL.md +25 -2
- package/skills/role-frontend-developer/SKILL.md +9 -0
- package/skills/sws-code-review/SKILL.md +121 -0
- package/skills/sws-deploy/SKILL.md +13 -0
- package/skills/sws-github/SKILL.md +65 -1
- package/skills/sws-install/SKILL.md +23 -4
- package/skills/sws-onboard/SKILL.md +7 -4
- package/standards/connectors/README.md +56 -0
- package/standards/connectors/events/CONNECTOR.md +62 -0
- package/standards/connectors/news/CONNECTOR.md +51 -0
- package/standards/connectors/profiles/CONNECTOR.md +58 -0
- package/standards/patterns/bolt-ons.md +45 -0
- package/standards/recipes/add-to-existing/RECIPE.md +85 -0
- package/standards/recipes/astro-ssr/RECIPE.md +4 -1
- package/standards/recipes/astro-static/RECIPE.md +31 -1
- package/standards/recipes/astro-static/acceptance.yml +22 -0
- package/standards/recipes/html-static/RECIPE.md +137 -0
- package/standards/recipes/jekyll-static/RECIPE.md +88 -0
- package/standards/recipes/next-ssr/RECIPE.md +7 -0
- package/standards/recipes/quarto-static/RECIPE.md +81 -0
- package/standards/scope.md +10 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Recipe: add-to-existing
|
|
2
|
+
|
|
3
|
+
**Stub. Not written, not executed.** The retrofit recipe: bring an existing
|
|
4
|
+
Stanford site up to standard without rebuilding it. It is the agent-facing half of
|
|
5
|
+
the wizard's `add .` job. `add .` installs the contract, the standards, and the
|
|
6
|
+
manifest; this recipe is what the agent follows next.
|
|
7
|
+
|
|
8
|
+
| | |
|
|
9
|
+
|---|---|
|
|
10
|
+
| Recipe ID | `add-to-existing`, the retrofit recipe |
|
|
11
|
+
| Status | **Stub, 2026-09-30.** Never run end to end. Reserved in the section 5 layout of `PROJECT-PLAN.md` since the first draft |
|
|
12
|
+
| Origin | `PROJECT-PLAN.md` section 13a |
|
|
13
|
+
| Acceptance | **None, and possibly never in the usual form.** A retrofit inherits whatever generator the site already uses, so its criteria are the generator's recipe plus a before-and-after score |
|
|
14
|
+
|
|
15
|
+
## Why this recipe is coming
|
|
16
|
+
|
|
17
|
+
Plenty of Stanford sites already exist that were built outside a web team, often
|
|
18
|
+
with an AI coding tool. Many are static, many are on GitHub Pages, and many are
|
|
19
|
+
missing the policy furniture: no Global Footer, or a hand-built one, and no
|
|
20
|
+
Decanter. Getting those sites to standard reaches more people than any new-site
|
|
21
|
+
recipe, because the sites are already live.
|
|
22
|
+
|
|
23
|
+
## The principle the recipe has to keep
|
|
24
|
+
|
|
25
|
+
**The owner keeps their site.** A retrofit that rewrites someone's site into our
|
|
26
|
+
preferred stack is a rebuild, and they will rightly refuse it. So:
|
|
27
|
+
|
|
28
|
+
- **Never convert the generator, the package manager, or the host.** Jekyll stays
|
|
29
|
+
Jekyll, yarn stays yarn, Netlify stays Netlify.
|
|
30
|
+
- **Policy furniture first, design system second.** Only a sliver of a site is
|
|
31
|
+
governed by policy (`standards/policy/brand.md`). Decanter is the easiest
|
|
32
|
+
compliant path, not a requirement. A Bootstrap site that gets the exact Global
|
|
33
|
+
Footer and an Identity Bar is a success, not a partial one.
|
|
34
|
+
- **Record divergences, do not fix them.** Anything kept on purpose goes in
|
|
35
|
+
`divergences:` with a reason.
|
|
36
|
+
|
|
37
|
+
## Likely order of work
|
|
38
|
+
|
|
39
|
+
A sketch to be tested in a pilot, not a procedure yet.
|
|
40
|
+
|
|
41
|
+
1. **Run `add .`** and fill in what the manifest lists in `incomplete[]`. Ask the
|
|
42
|
+
user for the owner names and emails. Never invent an owner email.
|
|
43
|
+
2. **Baseline.** Run `sws check` before changing anything, so the owner can see
|
|
44
|
+
the improvement.
|
|
45
|
+
3. **Global Footer and Identity Bar** from `standards/fragments/`, replacing any
|
|
46
|
+
hand-built version. Unit links move to a local footer above it.
|
|
47
|
+
4. **Named business owner and technical administrator** visible on the site.
|
|
48
|
+
5. **Checks in CI**, push to `main`, never a required pull request.
|
|
49
|
+
6. **Then, optionally, Decanter**, using the matching generator recipe once one
|
|
50
|
+
exists (`jekyll-static`, `quarto-static`, `html-static`, `astro-static`).
|
|
51
|
+
|
|
52
|
+
## Things a retrofit is likely to meet
|
|
53
|
+
|
|
54
|
+
Listed so the recipe covers them.
|
|
55
|
+
|
|
56
|
+
- **A repository on a personal GitHub account.** It disappears when the person
|
|
57
|
+
leaves. Moving it to a Stanford org is an access request to that org's owners,
|
|
58
|
+
per `standards/policy/escalation.md`. The agent does not do the move.
|
|
59
|
+
- **Tailwind's Play CDN in production.** Tailwind does not intend it for
|
|
60
|
+
production use. A thing to avoid, in the house style.
|
|
61
|
+
- **Keys in browser code** for a hosted database. Any value in a static build is
|
|
62
|
+
public, as `standards/hosting/github-pages.yml` already says. If that value
|
|
63
|
+
matters, it is a secrets finding; route to UIT Security for anything beyond
|
|
64
|
+
that.
|
|
65
|
+
- **Third-party services already live** with no review (forms, data, AI,
|
|
66
|
+
analytics). See `standards/patterns/bolt-ons.md`. A retrofit surfaces them; it
|
|
67
|
+
does not approve or remove them.
|
|
68
|
+
- **A hand-built footer that is close but not exact.** The footer check will say
|
|
69
|
+
where it differs.
|
|
70
|
+
- **Blocking hooks**: husky, lefthook, a pre-commit config, or agent hooks in a
|
|
71
|
+
committed `.claude/settings.json`. `sws check` reports them, as advice. They
|
|
72
|
+
are the team's choice, so leave them, add none, and suggest moving the check
|
|
73
|
+
into a CI job the deploy does not wait on (`astro-static` step 8).
|
|
74
|
+
- **Its own `AGENTS.md`, `CLAUDE.md` and `.mcp.json`.** `add .` keeps all three:
|
|
75
|
+
the contract goes between markers at the end of `AGENTS.md`, `CLAUDE.md` gets
|
|
76
|
+
`@AGENTS.md` if it lacks it, and the `sws` server joins the project's own MCP
|
|
77
|
+
servers. Scripts that a committed file calls belong in `scripts/`, not in
|
|
78
|
+
`.claude/`, which many teams git-ignore.
|
|
79
|
+
|
|
80
|
+
## What to do now
|
|
81
|
+
|
|
82
|
+
1. Say that this recipe is a stub.
|
|
83
|
+
2. Run `add .`, then follow steps 2 to 5 above, which need nothing new.
|
|
84
|
+
3. Run `sws check` with the recipe closest to the site's generator, and
|
|
85
|
+
acknowledge criteria that do not apply in `.sws/acknowledged.yml`.
|
|
@@ -186,7 +186,10 @@ diagnose it is the one holding the problem.
|
|
|
186
186
|
Replaces `astro-static` step 8. Both hosts deploy from their git integration
|
|
187
187
|
rather than from a Pages workflow:
|
|
188
188
|
|
|
189
|
-
- **Push to `main` deploys.** Keep the GitHub Actions workflow for checks only
|
|
189
|
+
- **Push to `main` deploys.** Keep the GitHub Actions workflow for checks only:
|
|
190
|
+
the build with `sws a11y`, `sws perf` and `sws check`, plus the `checks` job
|
|
191
|
+
from `astro-static` step 8. Red there is the nag; the host deploys anyway. No
|
|
192
|
+
git hooks, and no agent hooks that block.
|
|
190
193
|
- **Do not add branch protection or required status checks.** Each quietly
|
|
191
194
|
converts push-to-main into a pull-request requirement, and campus editors
|
|
192
195
|
working through the GitHub web UI cannot open one.
|
|
@@ -192,7 +192,7 @@ Every page uses one layout containing, in this order:
|
|
|
192
192
|
2. **Stanford Identity Bar.** Use `standards/fragments/identity-bar.yml` verbatim. Nothing may go above it except the skip link.
|
|
193
193
|
3. Local header, navigation, and page content. Unit-specific, design freely within Decanter.
|
|
194
194
|
4. Optional local footer.
|
|
195
|
-
5. **Stanford Global Footer.** Generate it from `standards/fragments/global-footer.yml`.
|
|
195
|
+
5. **Stanford Global Footer.** Generate it from `standards/fragments/global-footer.yml`, which in a project is `.sws/standards/fragments/global-footer.yml`. Read it from there at build time.
|
|
196
196
|
|
|
197
197
|
**The Identity Bar has a fixed height, and two things decide it.**
|
|
198
198
|
|
|
@@ -360,6 +360,36 @@ on:
|
|
|
360
360
|
|
|
361
361
|
Then gate only the deploy: `if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'`. A pull request gets a build plus `sws check`; a push to `main` gets a build, `sws check`, and a deploy.
|
|
362
362
|
|
|
363
|
+
**Checks nag; they never gate.** Lint, typecheck, tests, and a check for switched-off tests run in a `checks` job of their own, which the deploy job does **not** list in `needs`. A failure there is a red check on the commit that everyone can see and a person decides about, and the site still deploys. `sws check` stays in the build job, because it reads the build. Put none of this in a git hook (husky, lefthook, pre-commit) or an agent hook that blocks: nothing should refuse a commit, an edit, or a push. `sws check` reports a hook it finds, as advice.
|
|
364
|
+
|
|
365
|
+
```yaml
|
|
366
|
+
checks:
|
|
367
|
+
# Not in deploy's `needs`: red here is the nag, never a held-back publish.
|
|
368
|
+
runs-on: ubuntu-latest
|
|
369
|
+
steps:
|
|
370
|
+
- uses: actions/checkout@v7
|
|
371
|
+
- uses: actions/setup-node@v7
|
|
372
|
+
with:
|
|
373
|
+
node-version: lts/*
|
|
374
|
+
- run: npm ci
|
|
375
|
+
- run: npm run lint --if-present
|
|
376
|
+
- run: npm run typecheck --if-present
|
|
377
|
+
# Its own build and browser: nothing the build job made is on this
|
|
378
|
+
# runner, and a test over the built site (step 7) needs both.
|
|
379
|
+
- run: npm run build
|
|
380
|
+
- run: npx playwright install --with-deps chromium
|
|
381
|
+
- run: npm run test --if-present
|
|
382
|
+
- name: No switched-off tests
|
|
383
|
+
run: |
|
|
384
|
+
if git grep -nE '(^|[^[:alnum:]_$.])(test|it|describe|context)(\.[a-z]+)*\.(only|skip|fixme)([^[:alnum:]_$]|$)' -- \
|
|
385
|
+
'*.js' '*.mjs' '*.cjs' '*.ts' '*.mts' '*.cts' '*.jsx' '*.tsx'; then
|
|
386
|
+
echo "::error::A test is switched off with .only, .skip or .fixme. Turn it back on, or delete it."
|
|
387
|
+
exit 1
|
|
388
|
+
fi
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
`--if-present` runs the scripts the project defines and skips the rest, so add scripts rather than editing steps: `"typecheck": "astro check"` with `@astrojs/check` and `typescript` as dev dependencies, and `lint` and `test` once there is something for them to check. The job builds the site and installs Chromium itself, which repeats work the build job does; that is the price of the deploy never waiting on it. The last step also catches `test.only.each(...)` and a space before the call. A deliberate conditional skip trips it too. That is the nag working: a person looks, and decides.
|
|
392
|
+
|
|
363
393
|
**Do not set up branch protection, required status checks, or a protected environment beyond `github-pages`.** Each one quietly turns push-to-main into a pull-request requirement, and this recipe's audience includes people editing a page through the GitHub web UI who will not open a pull request to fix a typo.
|
|
364
394
|
|
|
365
395
|
Note that GitHub Pages serves **one site**, so a pull request gets checks but **no preview URL**. Netlify and Vercel give per-PR previews for free, which is a real reason to move once review matters. Say so rather than letting someone expect previews here.
|
|
@@ -727,6 +727,28 @@ criteria:
|
|
|
727
727
|
rather than `pass` when the token cannot see them. Never auto-remove a
|
|
728
728
|
protection rule: a team may have added one deliberately. Report and ask.
|
|
729
729
|
|
|
730
|
+
- id: workflow.no-blocking-hooks
|
|
731
|
+
requires: >
|
|
732
|
+
Checks run in CI, where a failure is a red check rather than a refused
|
|
733
|
+
commit. No shared git hook (husky, lefthook, pre-commit,
|
|
734
|
+
simple-git-hooks) and no agent hook that can block (Claude Code
|
|
735
|
+
`PreToolUse`, `Stop` or `SubagentStop` in a committed
|
|
736
|
+
`.claude/settings.json`).
|
|
737
|
+
check: workflow
|
|
738
|
+
severity: info
|
|
739
|
+
weight: 0
|
|
740
|
+
policy: null
|
|
741
|
+
mechanism: >
|
|
742
|
+
At the repository root: hook files in `.husky/`, a lefthook or pre-commit
|
|
743
|
+
config, hook keys in package.json, and blocking events under `hooks` in
|
|
744
|
+
`.claude/settings.json` unless git ignores that file, in which case it is
|
|
745
|
+
one developer's own setup. A developer's `.git/hooks` are never read.
|
|
746
|
+
Reports and suggests CI. Never removes a hook: a team may have chosen it.
|
|
747
|
+
note: >
|
|
748
|
+
Nagging, not gating. Weight 0, like workflow.no-forced-review, because a
|
|
749
|
+
team's own hook is a choice about how they work, not a fact about whether
|
|
750
|
+
the site meets Stanford's requirements.
|
|
751
|
+
|
|
730
752
|
- id: workflow.report-reaches-a-reader
|
|
731
753
|
requires: >
|
|
732
754
|
The advisory report is written to the job summary and a persistent
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Recipe: html-static
|
|
2
|
+
|
|
3
|
+
**Stub. Not written, not executed.** The plain HTML option: hand-written pages, no
|
|
4
|
+
generator, often no `package.json`. A common shape of Stanford site, and the one
|
|
5
|
+
with no recipe at all.
|
|
6
|
+
|
|
7
|
+
| | |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Recipe ID | `html-static`, following the `<generator>-<mode>` naming the other recipes use |
|
|
10
|
+
| Status | **Stub, 2026-09-30.** Never run end to end |
|
|
11
|
+
| Origin | Already on the roadmap as a v2 item; see `PROJECT-PLAN.md` sections 13 and 13a |
|
|
12
|
+
| Acceptance | **None yet.** There is no `acceptance.yml`, so `sws check --recipe html-static` exits with "No acceptance.yml" |
|
|
13
|
+
| Versions | None specified, as with every recipe |
|
|
14
|
+
|
|
15
|
+
## Why this recipe is coming
|
|
16
|
+
|
|
17
|
+
An AI agent with no generator in front of it writes plain HTML happily, so
|
|
18
|
+
this population will grow.
|
|
19
|
+
|
|
20
|
+
It is also the honest answer for someone who will never run `npm`. The person
|
|
21
|
+
editing the site may be fine with HTML and lost with a build step.
|
|
22
|
+
|
|
23
|
+
## What the recipe will have to settle
|
|
24
|
+
|
|
25
|
+
Open questions. Anything stated as fact is labelled.
|
|
26
|
+
|
|
27
|
+
1. **How Decanter gets in without Node.** Decanter 8 is CSS-first on
|
|
28
|
+
Tailwind 4, and Tailwind generates classes on demand from the markup it
|
|
29
|
+
scans. **There is no precompiled file, and there will not be one**: a file
|
|
30
|
+
holding every combination would be far too large to serve. Confirmed with
|
|
31
|
+
SWS 2026-09-30. So a compile step that scans the site's HTML is always
|
|
32
|
+
needed, and **it has to run on the author's machine**, so they can preview
|
|
33
|
+
work in progress before it ships. Direction from SWS, 2026-09-30. See
|
|
34
|
+
"Compiling Decanter on the author's machine" below. Not the Tailwind Play
|
|
35
|
+
CDN, which Tailwind says is not for production.
|
|
36
|
+
2. **Full entry point, not `minimal`.** Already decided in section 3 of the
|
|
37
|
+
plan: `decanter/minimal` is a lighter base reset for when something else
|
|
38
|
+
owns base styles. On a plain HTML site nothing else does, so use the full
|
|
39
|
+
entry point.
|
|
40
|
+
3. **Fragments on every page.** With no layout system, the Identity Bar and
|
|
41
|
+
Global Footer are copied into every file, and copies drift. The footer check
|
|
42
|
+
runs per page, which catches drift once it has happened. Whether the recipe
|
|
43
|
+
should also suggest a tiny include step is open.
|
|
44
|
+
4. **Where the checks run.** The author may never install Node, but CI can.
|
|
45
|
+
`sws check`, `sws a11y`, and the secrets gate run in GitHub Actions against
|
|
46
|
+
the repository root. That is how the recipe keeps "no build step" for the
|
|
47
|
+
author without giving up the checks.
|
|
48
|
+
|
|
49
|
+
## Compiling Decanter on the author's machine
|
|
50
|
+
|
|
51
|
+
**Primary path: Tailwind's standalone CLI.** It is a single executable with
|
|
52
|
+
Tailwind and its first-party plugins built in, so it needs no Node and no npm.
|
|
53
|
+
|
|
54
|
+
**Verified 2026-09-30** with the standalone `tailwindcss` v4.3.3 on macOS arm64
|
|
55
|
+
and `decanter@8.0.0-beta.2`, in a folder with no `package.json`:
|
|
56
|
+
|
|
57
|
+
| Test | Result |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `@import 'decanter';` with Decanter unpacked into `node_modules/decanter/` | Resolves. No Node involved |
|
|
60
|
+
| `@import` of a copy in `vendor/decanter/` by relative path | Resolves |
|
|
61
|
+
| `decanter/forms`, which declares `@plugin '@tailwindcss/forms'` | Works. The plugin comes from the CLI itself, with nothing else installed |
|
|
62
|
+
| Classes in `.html`, Jekyll `.liquid`, and Quarto `.qmd` files | All detected, with no `@source` line |
|
|
63
|
+
| Arbitrary values, opacity modifiers, `md:` and `hover:` variants, `.button`, `type-2` | All generated |
|
|
64
|
+
| `--watch=always`: edit a page, then add a new file | Rebuilt in about 5 ms, both times |
|
|
65
|
+
| A `vendor/decanter/` folder without exclusion | **Scanned as markup.** 52 KB of CSS instead of 23 KB, from classes in Decanter's own docs. Fixed by `@source not` |
|
|
66
|
+
|
|
67
|
+
Published for macOS (arm64, x64), Linux (x64, arm64, and musl builds), and
|
|
68
|
+
Windows x64, with `sha256sums.txt` on each release. **Only macOS arm64 was run.**
|
|
69
|
+
Homebrew also packages `tailwindcss`. Whether that build includes the forms
|
|
70
|
+
plugin was not checked, and Homebrew is never worth installing just for this,
|
|
71
|
+
per `standards/stack/requirements.yml`.
|
|
72
|
+
|
|
73
|
+
### The shape it suggests
|
|
74
|
+
|
|
75
|
+
To be confirmed when the recipe is run:
|
|
76
|
+
|
|
77
|
+
1. **Get the CLI** from the latest Tailwind release for the platform, and check
|
|
78
|
+
it against `sha256sums.txt`.
|
|
79
|
+
2. **Get Decanter 8 onto disk without npm.** Unpack the registry tarball for the
|
|
80
|
+
current `decanter@beta` (later `latest`, once 8 is final) into
|
|
81
|
+
`vendor/decanter/` and commit it, so a fresh clone needs only the CLI. If
|
|
82
|
+
the author has Node anyway, `npm install decanter@beta` and a bare
|
|
83
|
+
`@import 'decanter';` is simpler and is not a divergence.
|
|
84
|
+
3. **The entry CSS**, with paths relative to the CSS file:
|
|
85
|
+
|
|
86
|
+
```css
|
|
87
|
+
@import '../vendor/decanter/src/css/index.css';
|
|
88
|
+
/* Only if the site has forms. Form styles are opt-in in Decanter 8. */
|
|
89
|
+
@import '../vendor/decanter/src/css/forms.css';
|
|
90
|
+
/* Otherwise Decanter's own docs are scanned as if they were the site. */
|
|
91
|
+
@source not '../vendor';
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
4. **Preview.** Run `tailwindcss -i css/site.css -o css/site.out.css --watch`
|
|
95
|
+
and open the pages. Plain `--watch` stops when its terminal input closes,
|
|
96
|
+
which is what happens when an agent runs it in the background, so an agent
|
|
97
|
+
should use `--watch=always`.
|
|
98
|
+
5. **Ship.** CI runs the same command before deploying, so the CSS that ships
|
|
99
|
+
always matches the HTML that ships. The output file can then be
|
|
100
|
+
gitignored.
|
|
101
|
+
|
|
102
|
+
**The cost to name: a vendored Decanter is a frozen copy.** That cuts against
|
|
103
|
+
"install latest, pin nothing". Record the vendored version under `resolved:` in
|
|
104
|
+
`.sws/manifest.yml`, and re-fetch it to update. Whether `sws doctor` should
|
|
105
|
+
flag a vendored copy that has fallen behind is open.
|
|
106
|
+
|
|
107
|
+
**Fallback: compile in GitHub Actions only.** For a machine where the CLI cannot
|
|
108
|
+
be installed (locked down, or a platform with no published binary), CI compiles
|
|
109
|
+
on every push to `main`. The site still ships correctly. What the author loses
|
|
110
|
+
is the preview: a class used for the first time shows up only after pushing, and
|
|
111
|
+
GitHub Pages has no per-push preview URL. Say so rather than letting someone find
|
|
112
|
+
out.
|
|
113
|
+
|
|
114
|
+
## What already works, for a site built today
|
|
115
|
+
|
|
116
|
+
- **The built-HTML checks apply as they are.** Point `sws check --dist .` at
|
|
117
|
+
the folder that holds the HTML. Footer, Identity Bar, a11y, and SEO checks
|
|
118
|
+
read HTML and do not care how it was made.
|
|
119
|
+
- **Acceptance will probably `extends: astro-static`** with every `decanter.*`
|
|
120
|
+
and `build.*` criterion that inspects a Node project overridden or reworked.
|
|
121
|
+
With no `package.json`, more of the parent will need overriding than for
|
|
122
|
+
Jekyll or Quarto.
|
|
123
|
+
|
|
124
|
+
## What to do now, if someone asks for a plain HTML site
|
|
125
|
+
|
|
126
|
+
1. Say plainly that this recipe is a stub and has not been tested.
|
|
127
|
+
2. Plain HTML is a legitimate choice, not a lesser one. Do not argue someone
|
|
128
|
+
into Astro who has said they do not want a build step.
|
|
129
|
+
3. The policy furniture applies in full: Identity Bar, the exact Global Footer,
|
|
130
|
+
a named business owner and technical administrator, WCAG 2.1 AA. Paste the
|
|
131
|
+
fragments from `standards/fragments/` or `sws_footer_html`. Never type them
|
|
132
|
+
from memory.
|
|
133
|
+
4. Run `sws check --recipe astro-static --dist .` and acknowledge the
|
|
134
|
+
Node-specific criteria in `.sws/acknowledged.yml` with the reason
|
|
135
|
+
"html-static recipe not yet written".
|
|
136
|
+
5. Record the choice under `divergences:` in `.sws/manifest.yml`. **Do not set
|
|
137
|
+
`recipe: html-static` yet.** `sws check` reads that field and exits.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Recipe: jekyll-static
|
|
2
|
+
|
|
3
|
+
**Stub. Not written, not executed.** This placeholder exists because Jekyll is
|
|
4
|
+
already how a lot of Stanford sites get built, and an agent asked to work on one
|
|
5
|
+
should find an honest "not yet" here instead of inventing a recipe on the spot.
|
|
6
|
+
|
|
7
|
+
| | |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Recipe ID | `jekyll-static` |
|
|
10
|
+
| Status | **Stub, 2026-09-30.** Never run end to end |
|
|
11
|
+
| Origin | `PROJECT-PLAN.md` section 13a |
|
|
12
|
+
| Acceptance | **None yet.** There is no `acceptance.yml`, so `sws check --recipe jekyll-static` exits with "No acceptance.yml" |
|
|
13
|
+
| Versions | None specified, as with every recipe |
|
|
14
|
+
|
|
15
|
+
## Why this recipe is coming
|
|
16
|
+
|
|
17
|
+
Jekyll is the generator GitHub Pages has always built natively, so it is what
|
|
18
|
+
people reach for when they want a site to "just work on Pages". Many Stanford
|
|
19
|
+
sites are already built this way, often from a theme, and often without the
|
|
20
|
+
Global Footer or Decanter.
|
|
21
|
+
|
|
22
|
+
## What the recipe will have to settle
|
|
23
|
+
|
|
24
|
+
These are open questions, not decisions. Anything stated here as fact is labelled.
|
|
25
|
+
|
|
26
|
+
1. **How Decanter gets in.** Decanter 8 is CSS-first on Tailwind 4, so it needs a
|
|
27
|
+
CSS compile step that scans the site's templates, and Jekyll has none of its
|
|
28
|
+
own. **There is no precompiled Decanter file and there will not be one.**
|
|
29
|
+
Tailwind generates classes on demand, so a file holding every combination
|
|
30
|
+
would be far too large. Confirmed with SWS 2026-09-30. The compile runs **on
|
|
31
|
+
the author's machine**, so they can preview before shipping, using
|
|
32
|
+
**Tailwind's standalone CLI**, which needs no Node. CI runs the same command
|
|
33
|
+
to deploy. If the CLI cannot be installed, CI alone is the fallback, and the
|
|
34
|
+
author loses the preview of new classes. Verified 2026-09-30: the standalone
|
|
35
|
+
CLI resolves Decanter 8 and detects classes in `.liquid` files with no
|
|
36
|
+
`@source` line. The full test table, the entry CSS, and the vendoring cost
|
|
37
|
+
are in `html-static/RECIPE.md`, under "Compiling Decanter on the author's
|
|
38
|
+
machine". For Jekyll specifically:
|
|
39
|
+
- Run `tailwindcss --watch` alongside `jekyll serve`, writing into a folder
|
|
40
|
+
Jekyll copies, such as `assets/css/`. Whether `jekyll serve --livereload`
|
|
41
|
+
then reloads on the CSS change is **unverified**.
|
|
42
|
+
- Tailwind skips gitignored paths, so keep `_site/` gitignored, which Jekyll
|
|
43
|
+
projects normally do. Otherwise the built output is scanned as markup.
|
|
44
|
+
- Ruby is still needed, for Jekyll. Node no longer is, for the CSS.
|
|
45
|
+
|
|
46
|
+
**Not the Tailwind Play CDN**, which Tailwind says is not for production.
|
|
47
|
+
2. **Classic Pages build or Actions build.** Fact: Pages builds Jekyll
|
|
48
|
+
natively with no workflow file. But that path runs no `sws a11y`, no
|
|
49
|
+
`sws check`, and no secrets gate. The Actions path gives you all three. Our
|
|
50
|
+
expectation is that this recipe uses Actions, as `astro-static` does, and
|
|
51
|
+
says why.
|
|
52
|
+
3. **Fragments as includes.** The Identity Bar and Global Footer would become
|
|
53
|
+
`_includes/identity-bar.html` and `_includes/global-footer.html`, rendered
|
|
54
|
+
from `standards/fragments/*.yml`. **Do not type them from memory.** Read the
|
|
55
|
+
fragment, or call `sws_footer_html` through the MCP server.
|
|
56
|
+
4. **Themes.** Most Jekyll sites start from a gem theme that ships its own CSS
|
|
57
|
+
and footer. Taking Decanter alongside a theme is a swap point to document,
|
|
58
|
+
not a failure.
|
|
59
|
+
5. **Toolchain.** Jekyll needs Ruby and Bundler, which `standards/stack/requirements.yml`
|
|
60
|
+
does not cover today. The checks still need Node to run in CI.
|
|
61
|
+
|
|
62
|
+
## What already works, for a site built today
|
|
63
|
+
|
|
64
|
+
- **`sws check` already finds Jekyll output.** It auto-detects `_site/` along
|
|
65
|
+
with `dist/`, `build/` and `out/`. The footer, Identity Bar, a11y, and SEO
|
|
66
|
+
checks read built HTML, so they apply as they are.
|
|
67
|
+
- **Acceptance will probably `extends: astro-static`**, as `astro-ssr` and
|
|
68
|
+
`next-ssr` do, with overrides for the `decanter.*` and `build.*` criteria,
|
|
69
|
+
because those inspect a Node project. Which ones need overriding gets decided
|
|
70
|
+
when the recipe is run, not before.
|
|
71
|
+
|
|
72
|
+
## What to do now, if someone asks for a Jekyll site
|
|
73
|
+
|
|
74
|
+
1. Say plainly that this recipe is a stub and has not been tested.
|
|
75
|
+
2. If they have no reason to prefer Jekyll, offer `astro-static`, which is
|
|
76
|
+
tested and also deploys to GitHub Pages. Do not push: if they already know
|
|
77
|
+
Jekyll, that is a good reason.
|
|
78
|
+
3. If they keep Jekyll, the policy furniture still applies in full: Identity
|
|
79
|
+
Bar, the exact Global Footer, a named business owner and technical
|
|
80
|
+
administrator, WCAG 2.1 AA. Take those from `standards/fragments/` and
|
|
81
|
+
`standards/policy/`.
|
|
82
|
+
4. Run `sws check --recipe astro-static --dist _site` and expect the
|
|
83
|
+
Node-specific criteria to fail or report `unknown`. Acknowledge them in
|
|
84
|
+
`.sws/acknowledged.yml` with the reason "jekyll-static recipe not yet written".
|
|
85
|
+
That is a supported action.
|
|
86
|
+
5. Record the choice under `divergences:` in `.sws/manifest.yml`: Jekyll, not
|
|
87
|
+
a tested recipe. **Do not set `recipe: jekyll-static` yet.** `sws check`
|
|
88
|
+
reads that field and exits, because there is no acceptance file to load.
|
|
@@ -352,6 +352,13 @@ reading either baseline.
|
|
|
352
352
|
is right at flagship scale and wrong for a unit site with a handful of components
|
|
353
353
|
and one consumer. Read it for what thorough looks like, not as a shopping list.
|
|
354
354
|
|
|
355
|
+
**Run the checks in CI, never in a hook.** Use the `checks` job from
|
|
356
|
+
`astro-static` step 8 unchanged, with Next's scripts: `"lint": "eslint"`, which
|
|
357
|
+
`create-next-app --eslint` writes, and `"typecheck": "tsc --noEmit"`. The deploy
|
|
358
|
+
does not wait on it, so a failure is a red check rather than a held-back
|
|
359
|
+
publish. Next projects often arrive with husky and lint-staged; leave an
|
|
360
|
+
existing hook to the team that chose it, and add none.
|
|
361
|
+
|
|
355
362
|
### 10. Secrets
|
|
356
363
|
|
|
357
364
|
**Not `.env` in production.** SWS uses HashiCorp Vault, via
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Recipe: quarto-static
|
|
2
|
+
|
|
3
|
+
**Stub. Not written, not executed.** A placeholder for research groups who already
|
|
4
|
+
write in Quarto and want the site to be another output of the same work.
|
|
5
|
+
|
|
6
|
+
| | |
|
|
7
|
+
|---|---|
|
|
8
|
+
| Recipe ID | `quarto-static` |
|
|
9
|
+
| Status | **Stub, 2026-09-30.** Never run end to end |
|
|
10
|
+
| Origin | `PROJECT-PLAN.md` section 13a |
|
|
11
|
+
| Acceptance | **None yet.** There is no `acceptance.yml`, so `sws check --recipe quarto-static` exits with "No acceptance.yml" |
|
|
12
|
+
| Versions | None specified, as with every recipe |
|
|
13
|
+
|
|
14
|
+
## Why this recipe is coming
|
|
15
|
+
|
|
16
|
+
Quarto is a scientific publishing system: Markdown and notebooks go in, a
|
|
17
|
+
website comes out. The audience is people who already have the content in
|
|
18
|
+
`.qmd` or `.ipynb` and would not otherwise build a website.
|
|
19
|
+
|
|
20
|
+
## What the recipe will have to settle
|
|
21
|
+
|
|
22
|
+
Open questions. Anything stated as fact is labelled.
|
|
23
|
+
|
|
24
|
+
1. **Quarto's own theme.** Fact: Quarto websites ship with Bootstrap-based
|
|
25
|
+
themes by default. Decanter on top of Bootstrap means two resets and two
|
|
26
|
+
type scales fighting each other. Whether Quarto's minimal or no-theme mode
|
|
27
|
+
removes enough of that is **unverified**.
|
|
28
|
+
2. **How Decanter gets in.** Same problem as `jekyll-static`: Decanter 8 needs a
|
|
29
|
+
Tailwind 4 compile that scans the site's markup, and Quarto does not run
|
|
30
|
+
one. **There is no precompiled Decanter file and there will not be one**
|
|
31
|
+
(confirmed with SWS 2026-09-30). The compile runs **on the author's
|
|
32
|
+
machine**, so they can preview, using **Tailwind's standalone CLI**, which
|
|
33
|
+
needs no Node. CI runs the same command to deploy, and is the fallback if
|
|
34
|
+
the CLI cannot be installed. Verified 2026-09-30: the standalone CLI
|
|
35
|
+
resolves Decanter 8 and picks up a class written as a fenced-div attribute
|
|
36
|
+
in a `.qmd` file. Full detail in `html-static/RECIPE.md`, under "Compiling
|
|
37
|
+
Decanter on the author's machine". Still open for Quarto:
|
|
38
|
+
- Run `tailwindcss --watch` alongside `quarto preview`, and point `css:` in
|
|
39
|
+
`_quarto.yml` at the output. Whether `quarto preview` reloads when that
|
|
40
|
+
file changes is **unverified**.
|
|
41
|
+
- Classes that Quarto adds itself appear only in the rendered HTML in
|
|
42
|
+
`_site/`, not in the `.qmd` sources. Styling those means scanning
|
|
43
|
+
`_site/`, which in turn means compiling after Quarto renders.
|
|
44
|
+
|
|
45
|
+
Not the Tailwind Play CDN.
|
|
46
|
+
3. **Where the fragments go.** Quarto has its own page-footer option, but the
|
|
47
|
+
Global Footer must match the fragment exactly and nothing else may go inside
|
|
48
|
+
it. The likely route is an HTML include injected after the body, rendered
|
|
49
|
+
from `standards/fragments/global-footer.yml`. **Unverified.** Unit links go
|
|
50
|
+
in a local footer above it, never in Quarto's footer slot next to the
|
|
51
|
+
Global Footer.
|
|
52
|
+
4. **Computed content.** Notebooks that run at render time can pull data from
|
|
53
|
+
outside the repo. That collides with `standards/scope.md` the moment the
|
|
54
|
+
data is page content rather than an analysis output. Settle where that line
|
|
55
|
+
is before writing guidance that blurs it.
|
|
56
|
+
5. **Toolchain.** Quarto is its own binary, often with Python or R behind it.
|
|
57
|
+
`standards/stack/requirements.yml` covers none of that today.
|
|
58
|
+
|
|
59
|
+
## What already works, for a site built today
|
|
60
|
+
|
|
61
|
+
- **`sws check` already finds Quarto output**, as long as it is written to
|
|
62
|
+
`_site/`, which is the default for a Quarto website. The checks read built
|
|
63
|
+
HTML, so the footer, Identity Bar, a11y, and SEO checks apply as they are.
|
|
64
|
+
- **Acceptance will probably `extends: astro-static`**, with overrides for the
|
|
65
|
+
`decanter.*` and `build.*` criteria that inspect a Node project. That gets
|
|
66
|
+
decided when the recipe is run.
|
|
67
|
+
|
|
68
|
+
## What to do now, if someone asks for a Quarto site
|
|
69
|
+
|
|
70
|
+
1. Say plainly that this recipe is a stub and has not been tested.
|
|
71
|
+
2. If the content is already in Quarto, staying in Quarto is reasonable. Do not
|
|
72
|
+
steer them to Astro just because Astro has a recipe.
|
|
73
|
+
3. The policy furniture applies in full: Identity Bar, the exact Global Footer,
|
|
74
|
+
a named business owner and technical administrator, WCAG 2.1 AA. Take those
|
|
75
|
+
from `standards/fragments/` and `standards/policy/`, and do not type the
|
|
76
|
+
footer from memory.
|
|
77
|
+
4. Run `sws check --recipe astro-static --dist _site` and acknowledge the
|
|
78
|
+
Node-specific criteria in `.sws/acknowledged.yml` with the reason
|
|
79
|
+
"quarto-static recipe not yet written".
|
|
80
|
+
5. Record the choice under `divergences:` in `.sws/manifest.yml`. **Do not set
|
|
81
|
+
`recipe: quarto-static` yet.** `sws check` reads that field and exits.
|
package/standards/scope.md
CHANGED
|
@@ -21,6 +21,16 @@ cannot see.
|
|
|
21
21
|
Content still comes from the repo.
|
|
22
22
|
- **All hosts in `standards/hosting/`.** GitHub Pages, Netlify, Vercel.
|
|
23
23
|
|
|
24
|
+
**Stubs are not in scope yet.** `jekyll-static`, `quarto-static`, `html-static`,
|
|
25
|
+
and `add-to-existing` exist as placeholders with no acceptance criteria and no
|
|
26
|
+
end-to-end run. They are static and content-in-the-repo, so they fit this scope
|
|
27
|
+
in shape; they move into it once they have been executed. Each stub says what to
|
|
28
|
+
do in the meantime. The same goes for `standards/patterns/bolt-ons.md` and the
|
|
29
|
+
connectors in `standards/connectors/`. A connector brings content from outside
|
|
30
|
+
the repo, so whether its proposed shape (snapshot into the repo at build time)
|
|
31
|
+
counts as in scope is an open question for SWS, recorded in
|
|
32
|
+
`standards/connectors/README.md`.
|
|
33
|
+
|
|
24
34
|
**Note that "static content" is about the content SOURCE, not the build output.**
|
|
25
35
|
`astro-ssr` and `next-ssr` render at request time and are fully in scope. What is
|
|
26
36
|
out of scope is content that arrives from somewhere other than the repo.
|